[gitg] Implemented vertical layout for commit view



commit fcff4dfb935bc2b495ef773b2ef3233fba2183c0
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sun Jul 5 12:49:27 2009 +0200

    Implemented vertical layout for commit view
    
    This layout is conform to gitx where the stage/unstage areas are
    respectively on the left and right of the commit message

 gitg/gitg-commit-view.c |    3 +-
 gitg/gitg-commit-view.h |    4 +-
 gitg/gitg-settings.h    |    7 +-
 gitg/gitg-utils.c       |   62 ++++++++
 gitg/gitg-utils.h       |    2 +
 gitg/gitg-window.c      |   55 ++++---
 gitg/gitg-window.ui     |  400 ++++++++++++++++++++++++++---------------------
 7 files changed, 325 insertions(+), 208 deletions(-)
---
diff --git a/gitg/gitg-commit-view.c b/gitg/gitg-commit-view.c
index 35aca78..6f90062 100644
--- a/gitg/gitg-commit-view.c
+++ b/gitg/gitg-commit-view.c
@@ -93,7 +93,7 @@ struct _GitgCommitViewPrivate
 
 static void gitg_commit_view_buildable_iface_init(GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_EXTENDED(GitgCommitView, gitg_commit_view, GTK_TYPE_HPANED, 0,
+G_DEFINE_TYPE_EXTENDED(GitgCommitView, gitg_commit_view, GTK_TYPE_VPANED, 0,
 	G_IMPLEMENT_INTERFACE(GTK_TYPE_BUILDABLE, gitg_commit_view_buildable_iface_init));
 
 static GtkBuildableIface parent_iface;
@@ -946,6 +946,7 @@ gitg_commit_view_parser_finished(GtkBuildable *buildable, GtkBuilder *builder)
 	                      self->priv->comment_view, "right-margin-position");
 	
 	self->priv->hscale_context = GTK_HSCALE(gtk_builder_get_object(builder, "hscale_context"));
+	gtk_range_set_value (GTK_RANGE (self->priv->hscale_context), 3);
 	
 	initialize_dnd_staged(self);
 	initialize_dnd_unstaged(self);
diff --git a/gitg/gitg-commit-view.h b/gitg/gitg-commit-view.h
index b2bb3cf..2ec87aa 100644
--- a/gitg/gitg-commit-view.h
+++ b/gitg/gitg-commit-view.h
@@ -41,13 +41,13 @@ typedef struct _GitgCommitViewClass		GitgCommitViewClass;
 typedef struct _GitgCommitViewPrivate	GitgCommitViewPrivate;
 
 struct _GitgCommitView {
-	GtkHPaned parent;
+	GtkVPaned parent;
 	
 	GitgCommitViewPrivate *priv;
 };
 
 struct _GitgCommitViewClass {
-	GtkHPanedClass parent_class;
+	GtkVPanedClass parent_class;
 };
 
 GType gitg_commit_view_get_type (void) G_GNUC_CONST;
diff --git a/gitg/gitg-settings.h b/gitg/gitg-settings.h
index b6aa6bf..0ad9609 100644
--- a/gitg/gitg-settings.h
+++ b/gitg/gitg-settings.h
@@ -47,8 +47,11 @@ G_BEGIN_DECLS
 #define gitg_settings_set_vpaned_main_position(settings, value) gitg_settings_set_integer(settings, "vpaned-main-position", value)
 #define gitg_settings_get_vpaned_main_position(settings, def) gitg_settings_get_integer(settings, "vpaned-main-position", def)
 
-#define gitg_settings_set_hpaned_commit_position(settings, value) gitg_settings_set_integer(settings, "hpaned-commit-position", value)
-#define gitg_settings_get_hpaned_commit_position(settings, def) gitg_settings_get_integer(settings, "hpaned-commit-position", def)
+#define gitg_settings_set_hpaned_commit1_position(settings, value) gitg_settings_set_integer(settings, "hpaned-commit1-position", value)
+#define gitg_settings_get_hpaned_commit1_position(settings, def) gitg_settings_get_integer(settings, "hpaned-commit1-position", def)
+
+#define gitg_settings_set_hpaned_commit2_position(settings, value) gitg_settings_set_integer(settings, "hpaned-commit2-position", value)
+#define gitg_settings_get_hpaned_commit2_position(settings, def) gitg_settings_get_integer(settings, "hpaned-commit2-position", def)
 
 #define gitg_settings_set_vpaned_commit_position(settings, value) gitg_settings_set_integer(settings, "vpaned-commit-position", value)
 #define gitg_settings_get_vpaned_commit_position(settings, def) gitg_settings_get_integer(settings, "vpaned-commit-position", def)
diff --git a/gitg/gitg-utils.c b/gitg/gitg-utils.c
index afabee3..59e0e70 100644
--- a/gitg/gitg-utils.c
+++ b/gitg/gitg-utils.c
@@ -544,3 +544,65 @@ gitg_utils_find_cell_at_pos (GtkTreeView *tree_view, GtkTreeViewColumn *column,
 	g_list_free (cells);
 	return ret;
 }
+
+typedef struct
+{
+	gint position;
+	gboolean reversed;
+} PanedRestoreInfo;
+
+static void
+free_paned_restore_info (PanedRestoreInfo *info)
+{
+	g_slice_free (PanedRestoreInfo, info);
+}
+
+static void
+paned_set_position (GtkPaned *paned, gint position, gboolean reversed)
+{
+	if (position == -1)
+	{
+		return;
+	}
+
+	if (!reversed)
+	{
+		gtk_paned_set_position (paned, position);
+	}
+	else
+	{
+		gtk_paned_set_position (paned, GTK_WIDGET (paned)->allocation.width - position);
+	}
+}
+
+static void
+on_paned_mapped (GtkPaned *paned, PanedRestoreInfo *info)
+{
+	paned_set_position (paned, info->position, info->reversed);
+	
+	g_signal_handlers_disconnect_by_func (paned, on_paned_mapped, info);
+}
+
+void
+gitg_utils_restore_pane_position (GtkPaned *paned, gint position, gboolean reversed)
+{
+	g_return_if_fail (GTK_IS_PANED (paned));
+	
+	if (GTK_WIDGET_MAPPED (paned))
+	{
+		paned_set_position (paned, position, reversed);
+		
+		return;
+	}
+	
+	PanedRestoreInfo *info = g_slice_new (PanedRestoreInfo);
+	info->position = position;
+	info->reversed = reversed;
+	
+	g_signal_connect_data (paned,
+	                       "map",
+	                       G_CALLBACK (on_paned_mapped), 
+	                       info,
+	                       (GClosureNotify)free_paned_restore_info,
+	                       G_CONNECT_AFTER);
+}
diff --git a/gitg/gitg-utils.h b/gitg/gitg-utils.h
index 05fb90a..1dd2ad8 100644
--- a/gitg/gitg-utils.h
+++ b/gitg/gitg-utils.h
@@ -66,4 +66,6 @@ gchar *gitg_utils_timestamp_to_str(guint64 timestamp);
 GtkBuilder *gitg_utils_new_builder(gchar const *filename);
 GtkCellRenderer *gitg_utils_find_cell_at_pos (GtkTreeView *tree_view, GtkTreeViewColumn *column, GtkTreePath *path, gint x);
 
+void gitg_utils_restore_pane_position (GtkPaned *paned, gint position, gboolean reversed);
+
 #endif /* __GITG_UTILS_H__ */
diff --git a/gitg/gitg-window.c b/gitg/gitg-window.c
index 6d42003..56f7d3d 100644
--- a/gitg/gitg-window.c
+++ b/gitg/gitg-window.c
@@ -73,7 +73,8 @@ struct _GitgWindowPrivate
 	GtkUIManager *menus_ui_manager;
 	
 	GtkWidget *vpaned_main;
-	GtkWidget *hpaned_commit;
+	GtkWidget *hpaned_commit1;
+	GtkWidget *hpaned_commit2;
 	GtkWidget *vpaned_commit;
 	
 	GtkActionGroup *edit_group;
@@ -442,22 +443,26 @@ restore_state(GitgWindow *window)
 	gtk_window_set_default_size(GTK_WINDOW(window), 
 							    gitg_settings_get_window_width(settings, dw), 
 							    gitg_settings_get_window_height(settings, dh));
+	
+	gitg_utils_restore_pane_position (GTK_PANED(window->priv->vpaned_main),
+	                                  gitg_settings_get_vpaned_main_position(settings, -1),
+	                                  FALSE);
+
+	gitg_utils_restore_pane_position (GTK_PANED(window->priv->vpaned_commit),
+	                                  gitg_settings_get_vpaned_commit_position(settings, -1),
+	                                  FALSE);
 
-	gint orig = gtk_paned_get_position(GTK_PANED(window->priv->vpaned_main));
-	gtk_paned_set_position(GTK_PANED(window->priv->vpaned_main),
-						   gitg_settings_get_vpaned_main_position(settings, orig));
-						   
-	orig = gtk_paned_get_position(GTK_PANED(window->priv->vpaned_commit));
-	gtk_paned_set_position(GTK_PANED(window->priv->vpaned_commit),
-						   gitg_settings_get_vpaned_commit_position(settings, orig));
+	gitg_utils_restore_pane_position (GTK_PANED(window->priv->hpaned_commit1),
+	                                  gitg_settings_get_hpaned_commit1_position(settings, 200),
+	                                  FALSE);
 
-	orig = gtk_paned_get_position(GTK_PANED(window->priv->hpaned_commit));
-	gtk_paned_set_position(GTK_PANED(window->priv->hpaned_commit),
-						   gitg_settings_get_hpaned_commit_position(settings, orig));
+	gitg_utils_restore_pane_position (GTK_PANED(window->priv->hpaned_commit2),
+	                                  gitg_settings_get_hpaned_commit2_position(settings, 200),
+	                                  TRUE);
 
-	orig = gtk_paned_get_position(GTK_PANED(window->priv->revision_tree_view));
-	gtk_paned_set_position(GTK_PANED(window->priv->revision_tree_view),
-						   gitg_settings_get_revision_tree_view_position(settings, orig));
+	gitg_utils_restore_pane_position (GTK_PANED(window->priv->revision_tree_view),
+	                                  gitg_settings_get_revision_tree_view_position(settings, -1),
+	                                  FALSE);
 }
 
 static void
@@ -573,7 +578,8 @@ gitg_window_parser_finished(GtkBuildable *buildable, GtkBuilder *builder)
 	g_object_unref(b);	
 
 	window->priv->vpaned_main = GTK_WIDGET(gtk_builder_get_object(builder, "vpaned_main"));
-	window->priv->hpaned_commit = GTK_WIDGET(gtk_builder_get_object(builder, "hpaned_commit"));
+	window->priv->hpaned_commit1 = GTK_WIDGET(gtk_builder_get_object(builder, "hpaned_commit1"));
+	window->priv->hpaned_commit2 = GTK_WIDGET(gtk_builder_get_object(builder, "hpaned_commit2"));
 	window->priv->vpaned_commit = GTK_WIDGET(gtk_builder_get_object(builder, "vpaned_commit"));
 	
 	window->priv->notebook_main = GTK_NOTEBOOK(gtk_builder_get_object(builder, "notebook_main"));
@@ -581,7 +587,7 @@ gitg_window_parser_finished(GtkBuildable *buildable, GtkBuilder *builder)
 	window->priv->statusbar = GTK_STATUSBAR(gtk_builder_get_object(builder, "statusbar"));
 	window->priv->revision_view = GITG_REVISION_VIEW(gtk_builder_get_object(builder, "revision_view"));
 	window->priv->revision_tree_view = GITG_REVISION_TREE_VIEW(gtk_builder_get_object(builder, "revision_tree_view"));
-	window->priv->commit_view = GITG_COMMIT_VIEW(gtk_builder_get_object(builder, "hpaned_commit"));
+	window->priv->commit_view = GITG_COMMIT_VIEW(gtk_builder_get_object(builder, "vpaned_commit"));
 
 	restore_state(window);
 	
@@ -628,9 +634,16 @@ save_state(GitgWindow *window)
 	gitg_settings_set_window_width(settings, allocation->width);
 	gitg_settings_set_window_height(settings, allocation->height);
 
-	gitg_settings_set_vpaned_main_position(settings, gtk_paned_get_position(GTK_PANED(window->priv->vpaned_main)));
-	gitg_settings_set_vpaned_commit_position(settings, gtk_paned_get_position(GTK_PANED(window->priv->vpaned_commit)));
-	gitg_settings_set_hpaned_commit_position(settings, gtk_paned_get_position(GTK_PANED(window->priv->hpaned_commit)));
+	gitg_settings_set_vpaned_main_position (settings, 
+	                                        gtk_paned_get_position(GTK_PANED(window->priv->vpaned_main)));
+	gitg_settings_set_vpaned_commit_position (settings, 
+	                                          gtk_paned_get_position(GTK_PANED(window->priv->vpaned_commit)));
+	gitg_settings_set_hpaned_commit1_position (settings, 
+	                                           gtk_paned_get_position(GTK_PANED(window->priv->hpaned_commit1)));
+	gitg_settings_set_hpaned_commit2_position (settings, 
+	                                           GTK_WIDGET (window->priv->hpaned_commit2)->allocation.width - 
+	                                           gtk_paned_get_position(GTK_PANED(window->priv->hpaned_commit2)));
+
 	gitg_settings_set_revision_tree_view_position(settings, gtk_paned_get_position(GTK_PANED(window->priv->revision_tree_view)));
 
 	gitg_settings_save(settings);
diff --git a/gitg/gitg-window.ui b/gitg/gitg-window.ui
index aa0509b..99b4136 100644
--- a/gitg/gitg-window.ui
+++ b/gitg/gitg-window.ui
@@ -4,10 +4,6 @@
   <!-- interface-requires gitg 0.2 -->
   <!-- interface-requires sourceview2 0.0 -->
   <!-- interface-naming-policy toplevel-contextual -->
-  <object class="GtkImage" id="image_commit">
-    <property name="visible">True</property>
-    <property name="stock">gtk-apply</property>
-  </object>
   <object class="GtkAdjustment" id="adjustment_context">
     <property name="value">3</property>
     <property name="lower">1</property>
@@ -40,6 +36,7 @@
                     <child>
                       <object class="GtkVBox" id="vbox2">
                         <property name="visible">True</property>
+                        <property name="border_width">6</property>
                         <child>
                           <object class="GtkHBox" id="hbox_top">
                             <property name="visible">True</property>
@@ -155,6 +152,7 @@
                       <object class="GtkNotebook" id="notebook">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
+                        <property name="border_width">6</property>
                         <child>
                           <object class="GitgRevisionView" id="revision_view">
                             <property name="visible">True</property>
@@ -394,7 +392,7 @@
                           </object>
                         </child>
                         <child type="tab">
-                          <object class="GtkLabel" id="label1">
+                          <object class="GtkLabel" id="label_details">
                             <property name="visible">True</property>
                             <property name="label" translatable="yes">Details</property>
                           </object>
@@ -408,7 +406,7 @@
                             <property name="can_focus">True</property>
                             <property name="position">200</property>
                             <child>
-                              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                              <object class="GtkScrolledWindow" id="scrolled_window_revision_tree">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="hscrollbar_policy">automatic</property>
@@ -469,7 +467,7 @@
                           </packing>
                         </child>
                         <child type="tab">
-                          <object class="GtkLabel" id="label2">
+                          <object class="GtkLabel" id="label_tree">
                             <property name="visible">True</property>
                             <property name="label" translatable="yes">Tree</property>
                           </object>
@@ -501,177 +499,113 @@
               </packing>
             </child>
             <child>
-              <object class="GitgCommitView" id="hpaned_commit">
+              <object class="GitgCommitView" id="vpaned_commit">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="position">200</property>
+                <property name="border_width">6</property>
+                <property name="orientation">vertical</property>
+                <property name="position">450</property>
+                <property name="position_set">True</property>
                 <child>
-                  <object class="GtkVBox" id="vbox_staging">
+                  <object class="GtkVBox" id="vbox_changes">
                     <property name="visible">True</property>
+                    <property name="orientation">vertical</property>
                     <property name="spacing">3</property>
                     <child>
-                      <object class="GtkLabel" id="label_unstaged">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="xpad">1</property>
-                        <property name="label" translatable="yes">_Unstaged</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">tree_view_unstaged</property>
-                      </object>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkScrolledWindow" id="scrolled_window_unstaged">
+                      <object class="GtkHBox" id="hbox_changes">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">etched-in</property>
+                        <property name="spacing">3</property>
                         <child>
-                          <object class="GtkTreeView" id="tree_view_unstaged">
+                          <object class="GtkLabel" id="label_changes">
                             <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="xpad">1</property>
+                            <property name="label" translatable="yes">_Changes</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">source_view_changes</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label_context">
+                            <property name="label" translatable="yes">Context:</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHScale" id="hscale_context">
+                            <property name="width_request">200</property>
+                            <property name="sensitive">False</property>
                             <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <child>
-                              <object class="GtkTreeViewColumn" id="unstaged_column_icon">
-                                <property name="sizing">fixed</property>
-                                <property name="fixed_width">20</property>
-                                <child>
-                                  <object class="GtkCellRendererPixbuf" id="unstaged_cell_renderer_icon"/>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" id="unstaged_column_name">
-                                <property name="resizable">True</property>
-                                <property name="title">Unstaged</property>
-                                <child>
-                                  <object class="GtkCellRendererText" id="unstaged_cell_renderer"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
+                            <property name="adjustment">adjustment_context</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">right</property>
                           </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="pack_type">end</property>
+                            <property name="position">1</property>
+                          </packing>
                         </child>
                       </object>
                       <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <object class="GtkLabel" id="label_staged">
-                        <property name="visible">True</property>
-                        <property name="xalign">0</property>
-                        <property name="label" translatable="yes">_Staged</property>
-                        <property name="use_underline">True</property>
-                        <property name="mnemonic_widget">tree_view_staged</property>
-                      </object>
-                      <packing>
                         <property name="expand">False</property>
-                        <property name="position">2</property>
+                        <property name="position">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkScrolledWindow" id="scrolled_window_staged">
+                      <object class="GtkScrolledWindow" id="scrolled_window_changes">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="hscrollbar_policy">automatic</property>
                         <property name="vscrollbar_policy">automatic</property>
                         <property name="shadow_type">etched-in</property>
                         <child>
-                          <object class="GtkTreeView" id="tree_view_staged">
-                            <property name="visible">True</property>
+                          <object class="GitgDiffView" id="source_view_changes">
                             <property name="can_focus">True</property>
-                            <property name="headers_visible">False</property>
-                            <child>
-                              <object class="GtkTreeViewColumn" id="staged_column_icon">
-                                <property name="sizing">fixed</property>
-                                <property name="fixed_width">20</property>
-                                <child>
-                                  <object class="GtkCellRendererPixbuf" id="staged_cell_renderer_icon"/>
-                                </child>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkTreeViewColumn" id="staged_column_name">
-                                <property name="resizable">True</property>
-                                <child>
-                                  <object class="GtkCellRendererText" id="staged_cell_renderer_name"/>
-                                  <attributes>
-                                    <attribute name="text">0</attribute>
-                                  </attributes>
-                                </child>
-                              </object>
-                            </child>
+                            <property name="editable">False</property>
+                            <property name="left_margin">2</property>
+                            <property name="right_margin">2</property>
+                            <property name="cursor_visible">False</property>
+                            <property name="show_line_numbers">True</property>
+                            <property name="tab_width">4</property>
                           </object>
                         </child>
                       </object>
                       <packing>
-                        <property name="position">3</property>
+                        <property name="position">1</property>
                       </packing>
                     </child>
                   </object>
                   <packing>
-                    <property name="resize">True</property>
+                    <property name="resize">False</property>
                     <property name="shrink">True</property>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkVPaned" id="vpaned_commit">
+                  <object class="GtkHPaned" id="hpaned_commit1">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="position">450</property>
                     <child>
-                      <object class="GtkVBox" id="vbox_changes">
+                      <object class="GtkVBox" id="vbox_unstaged">
                         <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
                         <property name="spacing">3</property>
                         <child>
-                          <object class="GtkHBox" id="hbox_changes">
+                          <object class="GtkLabel" id="label_unstaged">
                             <property name="visible">True</property>
-                            <property name="spacing">3</property>
-                            <child>
-                              <object class="GtkLabel" id="label_changes">
-                                <property name="visible">True</property>
-                                <property name="xalign">0</property>
-                                <property name="xpad">1</property>
-                                <property name="label" translatable="yes">_Changes</property>
-                                <property name="use_underline">True</property>
-                                <property name="mnemonic_widget">source_view_changes</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="label_context">
-                                <property name="label" translatable="yes">Context:</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="pack_type">end</property>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkHScale" id="hscale_context">
-                                <property name="width_request">200</property>
-                                <property name="sensitive">False</property>
-                                <property name="adjustment">adjustment_context</property>
-                                <property name="digits">0</property>
-                                <property name="value_pos">right</property>
-                              </object>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="pack_type">end</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="xpad">1</property>
+                            <property name="label" translatable="yes">_Unstaged</property>
+                            <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">tree_view_unstaged</property>
                           </object>
                           <packing>
                             <property name="expand">False</property>
@@ -679,18 +613,39 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolled_window_changes">
+                          <object class="GtkScrolledWindow" id="scrolled_window_unstaged">
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="hscrollbar_policy">automatic</property>
                             <property name="vscrollbar_policy">automatic</property>
                             <property name="shadow_type">etched-in</property>
                             <child>
-                              <object class="GitgDiffView" id="source_view_changes">
-                                <property name="editable">False</property>
-                                <property name="cursor_visible">False</property>
-                                <property name="show_line_numbers">True</property>
-                                <property name="tab_width">4</property>
+                              <object class="GtkTreeView" id="tree_view_unstaged">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="headers_visible">False</property>
+                                <property name="headers_clickable">False</property>
+                                <child>
+                                  <object class="GtkTreeViewColumn" id="unstaged_column_icon">
+                                    <property name="sizing">fixed</property>
+                                    <property name="fixed_width">20</property>
+                                    <child>
+                                      <object class="GtkCellRendererPixbuf" id="unstaged_cell_renderer_icon"/>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkTreeViewColumn" id="unstaged_column_name">
+                                    <property name="resizable">True</property>
+                                    <property name="title">Unstaged</property>
+                                    <child>
+                                      <object class="GtkCellRendererText" id="unstaged_cell_renderer"/>
+                                      <attributes>
+                                        <attribute name="text">0</attribute>
+                                      </attributes>
+                                    </child>
+                                  </object>
+                                </child>
                               </object>
                             </child>
                           </object>
@@ -701,86 +656,163 @@
                       </object>
                       <packing>
                         <property name="resize">False</property>
-                        <property name="shrink">True</property>
+                        <property name="shrink">False</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkVBox" id="vbox_comment">
+                      <object class="GtkHPaned" id="hpaned_commit2">
                         <property name="visible">True</property>
-                        <property name="spacing">3</property>
-                        <child>
-                          <object class="GtkLabel" id="label_comment">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="xpad">1</property>
-                            <property name="label" translatable="yes">Co_mmit message</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">text_view_comment</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
+                        <property name="can_focus">True</property>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolled_window_comment">
+                          <object class="GtkVBox" id="vbox_comment">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">etched-in</property>
+                            <property name="orientation">vertical</property>
+                            <property name="spacing">3</property>
+                            <child>
+                              <object class="GtkLabel" id="label_comment">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="xpad">1</property>
+                                <property name="label" translatable="yes">Co_mmit message</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">text_view_comment</property>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
                             <child>
-                              <object class="GtkSourceView" id="text_view_comment">
+                              <object class="GtkScrolledWindow" id="scrolled_window_comment">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="wrap_mode">word-char</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
+                                <property name="shadow_type">etched-in</property>
+                                <child>
+                                  <object class="GtkSourceView" id="text_view_comment">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="wrap_mode">word-char</property>
+                                    <property name="left_margin">2</property>
+                                    <property name="right_margin">2</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox_commit">
+                                <property name="visible">True</property>
+                                <property name="spacing">3</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="check_button_signed_off_by">
+                                    <property name="label" translatable="yes">Add signed-off-by</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="button_commit">
+                                    <property name="label" translatable="yes">Commit</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="image">image_commit</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="pack_type">end</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
                               </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">2</property>
+                              </packing>
                             </child>
                           </object>
                           <packing>
-                            <property name="position">1</property>
+                            <property name="resize">True</property>
+                            <property name="shrink">False</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkHBox" id="hbox_commit">
+                          <object class="GtkVBox" id="vbox_staged">
                             <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
                             <property name="spacing">3</property>
                             <child>
-                              <object class="GtkCheckButton" id="check_button_signed_off_by">
-                                <property name="label" translatable="yes">Add signed-off-by</property>
-                                <property name="can_focus">False</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
+                              <object class="GtkLabel" id="label_staged">
+                                <property name="visible">True</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">_Staged</property>
+                                <property name="use_underline">True</property>
+                                <property name="mnemonic_widget">tree_view_staged</property>
                               </object>
                               <packing>
                                 <property name="expand">False</property>
-                                <property name="position">1</property>
+                                <property name="position">0</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkButton" id="button_commit">
-                                <property name="label" translatable="yes">Commit</property>
+                              <object class="GtkScrolledWindow" id="scrolled_window_staged">
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="image">image_commit</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
+                                <property name="shadow_type">etched-in</property>
+                                <child>
+                                  <object class="GtkTreeView" id="tree_view_staged">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="headers_visible">False</property>
+                                    <property name="headers_clickable">False</property>
+                                    <child>
+                                      <object class="GtkTreeViewColumn" id="staged_column_icon">
+                                        <property name="sizing">fixed</property>
+                                        <property name="fixed_width">20</property>
+                                        <child>
+                                          <object class="GtkCellRendererPixbuf" id="staged_cell_renderer_icon"/>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkTreeViewColumn" id="staged_column_name">
+                                        <property name="resizable">True</property>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="staged_cell_renderer_name"/>
+                                          <attributes>
+                                            <attribute name="text">0</attribute>
+                                          </attributes>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
                               </object>
                               <packing>
-                                <property name="expand">False</property>
-                                <property name="pack_type">end</property>
-                                <property name="position">0</property>
+                                <property name="position">1</property>
                               </packing>
                             </child>
                           </object>
                           <packing>
-                            <property name="expand">False</property>
-                            <property name="position">2</property>
+                            <property name="resize">False</property>
+                            <property name="shrink">False</property>
                           </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="resize">True</property>
-                        <property name="shrink">True</property>
+                        <property name="shrink">False</property>
                       </packing>
                     </child>
                   </object>
@@ -822,4 +854,8 @@
       </object>
     </child>
   </object>
+  <object class="GtkImage" id="image_commit">
+    <property name="visible">True</property>
+    <property name="stock">gtk-apply</property>
+  </object>
 </interface>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]