[anjuta] git: Show the log column in the merge dialog



commit fa68b34610d321a75cd5e5e297d8b4a2f1731d9f
Author: James Liggett <jrliggett cox net>
Date:   Sun Aug 9 17:22:09 2009 -0700

    git: Show the log column in the merge dialog

 plugins/git/anjuta-git.ui      |   40 ++++++++++++++++++++++++++++++----------
 plugins/git/git-merge-dialog.c |   25 +++++++++++++++++++------
 2 files changed, 49 insertions(+), 16 deletions(-)
---
diff --git a/plugins/git/anjuta-git.ui b/plugins/git/anjuta-git.ui
index 56e2370..4491025 100644
--- a/plugins/git/anjuta-git.ui
+++ b/plugins/git/anjuta-git.ui
@@ -1062,22 +1062,42 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkScrolledWindow" id="scrolledwindow1">
+                          <object class="GtkVBox" id="merge_log_vbox">
                             <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="hscrollbar_policy">automatic</property>
-                            <property name="vscrollbar_policy">automatic</property>
-                            <property name="shadow_type">in</property>
+                            <property name="sensitive">False</property>
+                            <property name="orientation">vertical</property>
                             <child>
-                              <object class="GtkTextView" id="merge_log_view">
-                                <property name="width_request">400</property>
+                              <object class="GtkScrolledWindow" id="scrolledwindow1">
                                 <property name="visible">True</property>
-                                <property name="sensitive">False</property>
                                 <property name="can_focus">True</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="indent">5</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
+                                <property name="shadow_type">in</property>
+                                <child>
+                                  <object class="GtkTextView" id="merge_log_view">
+                                    <property name="width_request">400</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="indent">5</property>
+                                    <property name="buffer">log_view_buffer</property>
+                                  </object>
+                                </child>
                               </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="merge_log_column_label">
+                                <property name="visible">True</property>
+                                <property name="xalign">1</property>
+                                <property name="label" translatable="yes">Column 1</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
                             </child>
                           </object>
                           <packing>
diff --git a/plugins/git/git-merge-dialog.c b/plugins/git/git-merge-dialog.c
index 0bb3ce3..ada22e9 100644
--- a/plugins/git/git-merge-dialog.c
+++ b/plugins/git/git-merge-dialog.c
@@ -128,9 +128,10 @@ on_merge_dialog_response (GtkDialog *dialog, gint response_id,
 }
 
 static void
-on_use_custom_log_check_toggled (GtkToggleButton *toggle_button, GtkWidget *merge_log_view)
+on_use_custom_log_check_toggled (GtkToggleButton *toggle_button, 
+                                 GtkWidget *merge_log_vbox)
 {
-	gtk_widget_set_sensitive (merge_log_view,
+	gtk_widget_set_sensitive (merge_log_vbox,
 							  gtk_toggle_button_get_active (toggle_button));
 }
 
@@ -138,12 +139,15 @@ static void
 merge_dialog (Git *plugin)
 {
 	GtkBuilder *bxml;
-	gchar *objects[] = {"merge_dialog", "branch_combo_model", NULL};
+	gchar *objects[] = {"merge_dialog", "branch_combo_model", "log_view_buffer", 
+						NULL};
 	GError *error;
 	GtkWidget *dialog;
 	GtkWidget *merge_branch_combo;
 	GtkWidget *use_custom_log_check;
-	GtkWidget *merge_log_view;
+	GtkWidget *merge_log_vbox;
+	GtkWidget *merge_log_column_label;
+	GtkTextBuffer *log_view_buffer;
 	GtkListStore *branch_combo_model;
 	GitUIData *data;
 	GitBranchListCommand *list_command;
@@ -162,7 +166,12 @@ merge_dialog (Git *plugin)
 	                                                         "merge_branch_combo"));
 	use_custom_log_check = GTK_WIDGET (gtk_builder_get_object (bxml, 
 															   "use_custom_log_check"));
-	merge_log_view = GTK_WIDGET (gtk_builder_get_object (bxml, "merge_log_view"));
+	merge_log_vbox = GTK_WIDGET (gtk_builder_get_object (bxml, 
+	                                                     "merge_log_vbox"));
+	merge_log_column_label = GTK_WIDGET (gtk_builder_get_object (bxml,
+	                                                             "merge_log_column_label"));
+	log_view_buffer = GTK_TEXT_BUFFER (gtk_builder_get_object (bxml,
+	                                                           "log_view_buffer"));
 	branch_combo_model = GTK_LIST_STORE (gtk_builder_get_object (bxml, "branch_combo_model"));
 	
 	data = git_ui_data_new (plugin, bxml);
@@ -186,7 +195,11 @@ merge_dialog (Git *plugin)
 	
 	g_signal_connect (G_OBJECT (use_custom_log_check), "toggled",
 					  G_CALLBACK (on_use_custom_log_check_toggled),
-					  merge_log_view);
+					  merge_log_vbox);
+
+	g_signal_connect (G_OBJECT (log_view_buffer), "mark-set",
+	                  G_CALLBACK (git_set_log_view_column_label),
+	                  merge_log_column_label);
 	
 	gtk_widget_show_all (dialog);
 }



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