SF.net SVN: geany:[4381] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Oct 27 17:47:24 UTC 2009


Revision: 4381
          http://geany.svn.sourceforge.net/geany/?rev=4381&view=rev
Author:   ntrel
Date:     2009-10-27 17:47:23 +0000 (Tue, 27 Oct 2009)

Log Message:
-----------
Change editor popup Commands submenu to start as child of menubar Edit
menu, as this is more usual e.g. for keybindings initialization.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/geany.glade
    trunk/src/interface.c
    trunk/src/keybindings.c
    trunk/src/ui_utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-10-27 17:27:24 UTC (rev 4380)
+++ trunk/ChangeLog	2009-10-27 17:47:23 UTC (rev 4381)
@@ -15,6 +15,9 @@
    completion doesn't apply in.
  * src/templates.c, src/interface.c, src/ui_utils.c, geany.glade:
    Add Edit->Commands submenu which is shared with the editor popup menu.
+ * src/interface.c, src/keybindings.c, src/ui_utils.c, geany.glade:
+   Change editor popup Commands submenu to start as child of menubar Edit
+   menu, as this is more usual e.g. for keybindings initialization.
 
 
 2009-10-26  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>

Modified: trunk/geany.glade
===================================================================
--- trunk/geany.glade	2009-10-27 17:27:24 UTC (rev 4380)
+++ trunk/geany.glade	2009-10-27 17:47:23 UTC (rev 4381)
@@ -559,6 +559,134 @@
 			  <property name="visible">True</property>
 			  <property name="label" translatable="yes">_Commands</property>
 			  <property name="use_underline">True</property>
+
+			  <child>
+			    <widget class="GtkMenu" id="commands1_menu">
+
+			      <child>
+				<widget class="GtkImageMenuItem" id="cut_current_line(s)1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Cut current line(s)</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_cut_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+
+				  <child internal-child="image">
+				    <widget class="GtkImage" id="image3013">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-cut</property>
+				      <property name="icon_size">1</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkImageMenuItem" id="copy_current_line(s)1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Copy current line(s)</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_copy_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+
+				  <child internal-child="image">
+				    <widget class="GtkImage" id="image3014">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-copy</property>
+				      <property name="icon_size">1</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="delete_current_line(s)1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Delete current line(s)</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_delete_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="duplicate_line_or_selection1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Duplicate line or selection</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_duplicate_line_or_selection1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkSeparatorMenuItem" id="separator49">
+				  <property name="visible">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="select_current_line(s)1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Select current line(s)</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_select_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="select_current_paragraph1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Select current paragraph</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_select_current_paragraph1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkSeparatorMenuItem" id="separator50">
+				  <property name="visible">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="insert_alternative_white_space1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Insert alternative white space</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_insert_alternative_white_space1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkSeparatorMenuItem" id="separator51">
+				  <property name="visible">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="go_to_next_marker1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Go to next marker</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_go_to_next_marker1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="go_to_previous_marker1">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Go to previous marker</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_go_to_previous_marker1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
 			</widget>
 		      </child>
 
@@ -2464,134 +2592,6 @@
       <property name="visible">True</property>
       <property name="label" translatable="yes">_Commands</property>
       <property name="use_underline">True</property>
-
-      <child>
-	<widget class="GtkMenu" id="commands1_menu">
-
-	  <child>
-	    <widget class="GtkImageMenuItem" id="cut_current_line(s)1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Cut current line(s)</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_cut_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-
-	      <child internal-child="image">
-		<widget class="GtkImage" id="image3013">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-cut</property>
-		  <property name="icon_size">1</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkImageMenuItem" id="copy_current_line(s)1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Copy current line(s)</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_copy_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-
-	      <child internal-child="image">
-		<widget class="GtkImage" id="image3014">
-		  <property name="visible">True</property>
-		  <property name="stock">gtk-copy</property>
-		  <property name="icon_size">1</property>
-		  <property name="xalign">0.5</property>
-		  <property name="yalign">0.5</property>
-		  <property name="xpad">0</property>
-		  <property name="ypad">0</property>
-		</widget>
-	      </child>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="delete_current_line(s)1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Delete current line(s)</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_delete_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="duplicate_line_or_selection1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Duplicate line or selection</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_duplicate_line_or_selection1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSeparatorMenuItem" id="separator49">
-	      <property name="visible">True</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="select_current_line(s)1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Select current line(s)</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_select_current_line(s)1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="select_current_paragraph1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Select current paragraph</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_select_current_paragraph1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSeparatorMenuItem" id="separator50">
-	      <property name="visible">True</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="insert_alternative_white_space1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Insert alternative white space</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_insert_alternative_white_space1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkSeparatorMenuItem" id="separator51">
-	      <property name="visible">True</property>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="go_to_next_marker1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Go to next marker</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_go_to_next_marker1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-
-	  <child>
-	    <widget class="GtkMenuItem" id="go_to_previous_marker1">
-	      <property name="visible">True</property>
-	      <property name="label" translatable="yes">Go to previous marker</property>
-	      <property name="use_underline">True</property>
-	      <signal name="activate" handler="on_go_to_previous_marker1_activate" last_modification_time="Mon, 26 Oct 2009 17:34:30 GMT"/>
-	    </widget>
-	  </child>
-	</widget>
-      </child>
     </widget>
   </child>
 

Modified: trunk/src/interface.c
===================================================================
--- trunk/src/interface.c	2009-10-27 17:27:24 UTC (rev 4380)
+++ trunk/src/interface.c	2009-10-27 17:47:23 UTC (rev 4381)
@@ -97,6 +97,21 @@
   GtkWidget *send_selection_to2_menu;
   GtkWidget *invisible13;
   GtkWidget *commands2;
+  GtkWidget *commands1_menu;
+  GtkWidget *cut_current_line_s_1;
+  GtkWidget *image3013;
+  GtkWidget *copy_current_line_s_1;
+  GtkWidget *image3014;
+  GtkWidget *delete_current_line_s_1;
+  GtkWidget *duplicate_line_or_selection1;
+  GtkWidget *separator49;
+  GtkWidget *select_current_line_s_1;
+  GtkWidget *select_current_paragraph1;
+  GtkWidget *separator50;
+  GtkWidget *insert_alternative_white_space1;
+  GtkWidget *separator51;
+  GtkWidget *go_to_next_marker1;
+  GtkWidget *go_to_previous_marker1;
   GtkWidget *separator18;
   GtkWidget *add_comments1;
   GtkWidget *image3029;
@@ -528,6 +543,68 @@
   gtk_widget_show (commands2);
   gtk_container_add (GTK_CONTAINER (edit1_menu), commands2);
 
+  commands1_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (commands2), commands1_menu);
+
+  cut_current_line_s_1 = gtk_image_menu_item_new_with_mnemonic (_("Cut current line(s)"));
+  gtk_widget_show (cut_current_line_s_1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), cut_current_line_s_1);
+
+  image3013 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3013);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cut_current_line_s_1), image3013);
+
+  copy_current_line_s_1 = gtk_image_menu_item_new_with_mnemonic (_("Copy current line(s)"));
+  gtk_widget_show (copy_current_line_s_1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), copy_current_line_s_1);
+
+  image3014 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image3014);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_current_line_s_1), image3014);
+
+  delete_current_line_s_1 = gtk_menu_item_new_with_mnemonic (_("Delete current line(s)"));
+  gtk_widget_show (delete_current_line_s_1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), delete_current_line_s_1);
+
+  duplicate_line_or_selection1 = gtk_menu_item_new_with_mnemonic (_("Duplicate line or selection"));
+  gtk_widget_show (duplicate_line_or_selection1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), duplicate_line_or_selection1);
+
+  separator49 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separator49);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), separator49);
+  gtk_widget_set_sensitive (separator49, FALSE);
+
+  select_current_line_s_1 = gtk_menu_item_new_with_mnemonic (_("Select current line(s)"));
+  gtk_widget_show (select_current_line_s_1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), select_current_line_s_1);
+
+  select_current_paragraph1 = gtk_menu_item_new_with_mnemonic (_("Select current paragraph"));
+  gtk_widget_show (select_current_paragraph1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), select_current_paragraph1);
+
+  separator50 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separator50);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), separator50);
+  gtk_widget_set_sensitive (separator50, FALSE);
+
+  insert_alternative_white_space1 = gtk_menu_item_new_with_mnemonic (_("Insert alternative white space"));
+  gtk_widget_show (insert_alternative_white_space1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), insert_alternative_white_space1);
+
+  separator51 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separator51);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), separator51);
+  gtk_widget_set_sensitive (separator51, FALSE);
+
+  go_to_next_marker1 = gtk_menu_item_new_with_mnemonic (_("Go to next marker"));
+  gtk_widget_show (go_to_next_marker1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), go_to_next_marker1);
+
+  go_to_previous_marker1 = gtk_menu_item_new_with_mnemonic (_("Go to previous marker"));
+  gtk_widget_show (go_to_previous_marker1);
+  gtk_container_add (GTK_CONTAINER (commands1_menu), go_to_previous_marker1);
+
   separator18 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator18);
   gtk_container_add (GTK_CONTAINER (edit1_menu), separator18);
@@ -1268,6 +1345,33 @@
   g_signal_connect ((gpointer) send_selection_to_vte1, "activate",
                     G_CALLBACK (on_send_selection_to_vte1_activate),
                     NULL);
+  g_signal_connect ((gpointer) cut_current_line_s_1, "activate",
+                    G_CALLBACK (on_cut_current_line_s_1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) copy_current_line_s_1, "activate",
+                    G_CALLBACK (on_copy_current_line_s_1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) delete_current_line_s_1, "activate",
+                    G_CALLBACK (on_delete_current_line_s_1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) duplicate_line_or_selection1, "activate",
+                    G_CALLBACK (on_duplicate_line_or_selection1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) select_current_line_s_1, "activate",
+                    G_CALLBACK (on_select_current_line_s_1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) select_current_paragraph1, "activate",
+                    G_CALLBACK (on_select_current_paragraph1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) insert_alternative_white_space1, "activate",
+                    G_CALLBACK (on_insert_alternative_white_space1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) go_to_next_marker1, "activate",
+                    G_CALLBACK (on_go_to_next_marker1_activate),
+                    NULL);
+  g_signal_connect ((gpointer) go_to_previous_marker1, "activate",
+                    G_CALLBACK (on_go_to_previous_marker1_activate),
+                    NULL);
   g_signal_connect ((gpointer) menu_add_changelog_entry1, "activate",
                     G_CALLBACK (on_comments_changelog_activate),
                     NULL);
@@ -1545,6 +1649,21 @@
   GLADE_HOOKUP_OBJECT (window1, send_selection_to2_menu, "send_selection_to2_menu");
   GLADE_HOOKUP_OBJECT (window1, invisible13, "invisible13");
   GLADE_HOOKUP_OBJECT (window1, commands2, "commands2");
+  GLADE_HOOKUP_OBJECT (window1, commands1_menu, "commands1_menu");
+  GLADE_HOOKUP_OBJECT (window1, cut_current_line_s_1, "cut_current_line_s_1");
+  GLADE_HOOKUP_OBJECT (window1, image3013, "image3013");
+  GLADE_HOOKUP_OBJECT (window1, copy_current_line_s_1, "copy_current_line_s_1");
+  GLADE_HOOKUP_OBJECT (window1, image3014, "image3014");
+  GLADE_HOOKUP_OBJECT (window1, delete_current_line_s_1, "delete_current_line_s_1");
+  GLADE_HOOKUP_OBJECT (window1, duplicate_line_or_selection1, "duplicate_line_or_selection1");
+  GLADE_HOOKUP_OBJECT (window1, separator49, "separator49");
+  GLADE_HOOKUP_OBJECT (window1, select_current_line_s_1, "select_current_line_s_1");
+  GLADE_HOOKUP_OBJECT (window1, select_current_paragraph1, "select_current_paragraph1");
+  GLADE_HOOKUP_OBJECT (window1, separator50, "separator50");
+  GLADE_HOOKUP_OBJECT (window1, insert_alternative_white_space1, "insert_alternative_white_space1");
+  GLADE_HOOKUP_OBJECT (window1, separator51, "separator51");
+  GLADE_HOOKUP_OBJECT (window1, go_to_next_marker1, "go_to_next_marker1");
+  GLADE_HOOKUP_OBJECT (window1, go_to_previous_marker1, "go_to_previous_marker1");
   GLADE_HOOKUP_OBJECT (window1, separator18, "separator18");
   GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1");
   GLADE_HOOKUP_OBJECT (window1, image3029, "image3029");
@@ -1860,21 +1979,6 @@
   GtkWidget *send_selection_to1_menu;
   GtkWidget *invisible12;
   GtkWidget *commands1;
-  GtkWidget *commands1_menu;
-  GtkWidget *cut_current_line_s_1;
-  GtkWidget *image3013;
-  GtkWidget *copy_current_line_s_1;
-  GtkWidget *image3014;
-  GtkWidget *delete_current_line_s_1;
-  GtkWidget *duplicate_line_or_selection1;
-  GtkWidget *separator49;
-  GtkWidget *select_current_line_s_1;
-  GtkWidget *select_current_paragraph1;
-  GtkWidget *separator50;
-  GtkWidget *insert_alternative_white_space1;
-  GtkWidget *separator51;
-  GtkWidget *go_to_next_marker1;
-  GtkWidget *go_to_previous_marker1;
   GtkWidget *separator17;
   GtkWidget *comments;
   GtkWidget *image3015;
@@ -2034,68 +2138,6 @@
   gtk_widget_show (commands1);
   gtk_container_add (GTK_CONTAINER (edit_menu1), commands1);
 
-  commands1_menu = gtk_menu_new ();
-  gtk_menu_item_set_submenu (GTK_MENU_ITEM (commands1), commands1_menu);
-
-  cut_current_line_s_1 = gtk_image_menu_item_new_with_mnemonic (_("Cut current line(s)"));
-  gtk_widget_show (cut_current_line_s_1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), cut_current_line_s_1);
-
-  image3013 = gtk_image_new_from_stock ("gtk-cut", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3013);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (cut_current_line_s_1), image3013);
-
-  copy_current_line_s_1 = gtk_image_menu_item_new_with_mnemonic (_("Copy current line(s)"));
-  gtk_widget_show (copy_current_line_s_1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), copy_current_line_s_1);
-
-  image3014 = gtk_image_new_from_stock ("gtk-copy", GTK_ICON_SIZE_MENU);
-  gtk_widget_show (image3014);
-  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (copy_current_line_s_1), image3014);
-
-  delete_current_line_s_1 = gtk_menu_item_new_with_mnemonic (_("Delete current line(s)"));
-  gtk_widget_show (delete_current_line_s_1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), delete_current_line_s_1);
-
-  duplicate_line_or_selection1 = gtk_menu_item_new_with_mnemonic (_("Duplicate line or selection"));
-  gtk_widget_show (duplicate_line_or_selection1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), duplicate_line_or_selection1);
-
-  separator49 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separator49);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), separator49);
-  gtk_widget_set_sensitive (separator49, FALSE);
-
-  select_current_line_s_1 = gtk_menu_item_new_with_mnemonic (_("Select current line(s)"));
-  gtk_widget_show (select_current_line_s_1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), select_current_line_s_1);
-
-  select_current_paragraph1 = gtk_menu_item_new_with_mnemonic (_("Select current paragraph"));
-  gtk_widget_show (select_current_paragraph1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), select_current_paragraph1);
-
-  separator50 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separator50);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), separator50);
-  gtk_widget_set_sensitive (separator50, FALSE);
-
-  insert_alternative_white_space1 = gtk_menu_item_new_with_mnemonic (_("Insert alternative white space"));
-  gtk_widget_show (insert_alternative_white_space1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), insert_alternative_white_space1);
-
-  separator51 = gtk_separator_menu_item_new ();
-  gtk_widget_show (separator51);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), separator51);
-  gtk_widget_set_sensitive (separator51, FALSE);
-
-  go_to_next_marker1 = gtk_menu_item_new_with_mnemonic (_("Go to next marker"));
-  gtk_widget_show (go_to_next_marker1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), go_to_next_marker1);
-
-  go_to_previous_marker1 = gtk_menu_item_new_with_mnemonic (_("Go to previous marker"));
-  gtk_widget_show (go_to_previous_marker1);
-  gtk_container_add (GTK_CONTAINER (commands1_menu), go_to_previous_marker1);
-
   separator17 = gtk_separator_menu_item_new ();
   gtk_widget_show (separator17);
   gtk_container_add (GTK_CONTAINER (edit_menu1), separator17);
@@ -2255,33 +2297,6 @@
   g_signal_connect ((gpointer) send_selection_to_vte2, "activate",
                     G_CALLBACK (on_send_selection_to_vte1_activate),
                     NULL);
-  g_signal_connect ((gpointer) cut_current_line_s_1, "activate",
-                    G_CALLBACK (on_cut_current_line_s_1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) copy_current_line_s_1, "activate",
-                    G_CALLBACK (on_copy_current_line_s_1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) delete_current_line_s_1, "activate",
-                    G_CALLBACK (on_delete_current_line_s_1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) duplicate_line_or_selection1, "activate",
-                    G_CALLBACK (on_duplicate_line_or_selection1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) select_current_line_s_1, "activate",
-                    G_CALLBACK (on_select_current_line_s_1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) select_current_paragraph1, "activate",
-                    G_CALLBACK (on_select_current_paragraph1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) insert_alternative_white_space1, "activate",
-                    G_CALLBACK (on_insert_alternative_white_space1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) go_to_next_marker1, "activate",
-                    G_CALLBACK (on_go_to_next_marker1_activate),
-                    NULL);
-  g_signal_connect ((gpointer) go_to_previous_marker1, "activate",
-                    G_CALLBACK (on_go_to_previous_marker1_activate),
-                    NULL);
   g_signal_connect ((gpointer) add_changelog_entry2, "activate",
                     G_CALLBACK (on_comments_changelog_activate),
                     NULL);
@@ -2351,21 +2366,6 @@
   GLADE_HOOKUP_OBJECT (edit_menu1, send_selection_to1_menu, "send_selection_to1_menu");
   GLADE_HOOKUP_OBJECT (edit_menu1, invisible12, "invisible12");
   GLADE_HOOKUP_OBJECT (edit_menu1, commands1, "commands1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, commands1_menu, "commands1_menu");
-  GLADE_HOOKUP_OBJECT (edit_menu1, cut_current_line_s_1, "cut_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, image3013, "image3013");
-  GLADE_HOOKUP_OBJECT (edit_menu1, copy_current_line_s_1, "copy_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, image3014, "image3014");
-  GLADE_HOOKUP_OBJECT (edit_menu1, delete_current_line_s_1, "delete_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, duplicate_line_or_selection1, "duplicate_line_or_selection1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, separator49, "separator49");
-  GLADE_HOOKUP_OBJECT (edit_menu1, select_current_line_s_1, "select_current_line_s_1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, select_current_paragraph1, "select_current_paragraph1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, separator50, "separator50");
-  GLADE_HOOKUP_OBJECT (edit_menu1, insert_alternative_white_space1, "insert_alternative_white_space1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, separator51, "separator51");
-  GLADE_HOOKUP_OBJECT (edit_menu1, go_to_next_marker1, "go_to_next_marker1");
-  GLADE_HOOKUP_OBJECT (edit_menu1, go_to_previous_marker1, "go_to_previous_marker1");
   GLADE_HOOKUP_OBJECT (edit_menu1, separator17, "separator17");
   GLADE_HOOKUP_OBJECT (edit_menu1, comments, "comments");
   GLADE_HOOKUP_OBJECT (edit_menu1, image3015, "image3015");

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2009-10-27 17:27:24 UTC (rev 4380)
+++ trunk/src/keybindings.c	2009-10-27 17:47:23 UTC (rev 4381)
@@ -181,10 +181,6 @@
 #define LW(widget_name) \
 	ui_lookup_widget(main_widgets.window, G_STRINGIFY(widget_name))
 
-/* Lookup a widget in the popup menu */
-#define LWP(widget_name) \
-	ui_lookup_widget(main_widgets.editor_menu, G_STRINGIFY(widget_name))
-
 /* Expansion for group_id = FILE:
  * static GeanyKeyBinding FILE_keys[GEANY_KEYS_FILE_COUNT]; */
 #define DECLARE_KEYS(group_id) \
@@ -261,10 +257,10 @@
 		GDK_y, GDK_CONTROL_MASK, "menu_redo", _("Redo"), LW(menu_redo2));
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_DUPLICATELINE, NULL,
 		GDK_d, GDK_CONTROL_MASK, "edit_duplicateline", _("Duplicate line or selection"),
-		LWP(duplicate_line_or_selection1));
+		LW(duplicate_line_or_selection1));
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_DELETELINE, NULL,
 		GDK_k, GDK_CONTROL_MASK, "edit_deleteline", _("Delete current line(s)"),
-		LWP(delete_current_line_s_1));
+		LW(delete_current_line_s_1));
 	keybindings_set_item(group, GEANY_KEYS_EDITOR_DELETELINETOEND, NULL,
 		GDK_Delete, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "edit_deletelinetoend",
 		_("Delete to line end"), NULL);
@@ -307,10 +303,10 @@
 		GDK_v, GDK_CONTROL_MASK, "menu_paste", _("Paste"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_CLIPBOARD_COPYLINE, NULL,
 		GDK_c, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "edit_copyline", _("Copy current line(s)"),
-		LWP(cut_current_line_s_1));
+		LW(cut_current_line_s_1));
 	keybindings_set_item(group, GEANY_KEYS_CLIPBOARD_CUTLINE, NULL,
 		GDK_x, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "edit_cutline", _("Cut current line(s)"),
-		LWP(copy_current_line_s_1));
+		LW(copy_current_line_s_1));
 
 	group = ADD_KB_GROUP(SELECT, _("Select"), cb_func_select_action);
 
@@ -320,10 +316,10 @@
 		GDK_w, GDK_SHIFT_MASK | GDK_MOD1_MASK, "edit_selectword", _("Select current word"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_SELECT_LINE, NULL,
 		GDK_l, GDK_SHIFT_MASK | GDK_MOD1_MASK, "edit_selectline", _("Select current line(s)"),
-		LWP(select_current_line_s_1));
+		LW(select_current_line_s_1));
 	keybindings_set_item(group, GEANY_KEYS_SELECT_PARAGRAPH, NULL,
 		GDK_p, GDK_SHIFT_MASK | GDK_MOD1_MASK, "edit_selectparagraph", _("Select current paragraph"),
-		LWP(select_current_paragraph1));
+		LW(select_current_paragraph1));
 	keybindings_set_item(group, GEANY_KEYS_SELECT_WORDPARTLEFT, NULL,
 		0, 0, "edit_selectwordpartleft", _("Select to previous word part"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_SELECT_WORDPARTRIGHT, NULL,
@@ -371,7 +367,7 @@
 		LW(insert_date_custom1));
 	keybindings_set_item(group, GEANY_KEYS_INSERT_ALTWHITESPACE, NULL,
 		0, 0, "edit_insertwhitespace", _("Insert alternative white space"),
-		LWP(insert_alternative_white_space1));
+		LW(insert_alternative_white_space1));
 
 	group = ADD_KB_GROUP(SETTINGS, _("Settings"), NULL);
 
@@ -424,10 +420,10 @@
 		_("Toggle marker"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_GOTO_NEXTMARKER, NULL,
 		GDK_period, GDK_CONTROL_MASK, "edit_gotonextmarker",
-		_("Go to next marker"), LWP(go_to_next_marker1));
+		_("Go to next marker"), LW(go_to_next_marker1));
 	keybindings_set_item(group, GEANY_KEYS_GOTO_PREVIOUSMARKER, NULL,
 		GDK_comma, GDK_CONTROL_MASK, "edit_gotopreviousmarker",
-		_("Go to previous marker"), LWP(go_to_previous_marker1));
+		_("Go to previous marker"), LW(go_to_previous_marker1));
 	keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDEFINITION, NULL,
 		0, 0, "popup_gototagdefinition", _("Go to Tag Definition"), NULL);
 	keybindings_set_item(group, GEANY_KEYS_GOTO_TAGDECLARATION, NULL,

Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c	2009-10-27 17:27:24 UTC (rev 4380)
+++ trunk/src/ui_utils.c	2009-10-27 17:47:23 UTC (rev 4381)
@@ -1864,21 +1864,21 @@
 }
 
 
-static void on_edit_menu_show(GtkWidget *item)
+static void on_editor_menu_show(GtkWidget *item)
 {
 	GtkWidget *popup = ui_lookup_widget(main_widgets.editor_menu, "commands1");
 	GtkWidget *bar = ui_lookup_widget(main_widgets.window, "commands2");
 
-	ui_menu_move(widgets.commands_menu, popup, bar);
+	ui_menu_move(widgets.commands_menu, bar, popup);
 }
 
 
-static void on_edit_menu_hide(GtkWidget *item)
+static void on_editor_menu_hide(GtkWidget *item)
 {
 	GtkWidget *popup = ui_lookup_widget(main_widgets.editor_menu, "commands1");
 	GtkWidget *bar = ui_lookup_widget(main_widgets.window, "commands2");
 
-	ui_menu_move(widgets.commands_menu, bar, popup);
+	ui_menu_move(widgets.commands_menu, popup, bar);
 }
 
 
@@ -1912,14 +1912,13 @@
 	widgets.undo_items[0] = ui_lookup_widget(main_widgets.editor_menu, "undo1");
 	widgets.undo_items[1] = ui_lookup_widget(main_widgets.window, "menu_undo2");
 
-	item = ui_lookup_widget(main_widgets.editor_menu, "commands1");
+	item = ui_lookup_widget(main_widgets.window, "commands2");
 	widgets.commands_menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(item));
 
 	/* reparent edit submenus as needed */
-	item = ui_lookup_widget(main_widgets.window, "edit1");
-	item = gtk_menu_item_get_submenu(GTK_MENU_ITEM(item));
-	g_signal_connect(item, "show", G_CALLBACK(on_edit_menu_show), NULL);
-	g_signal_connect(item, "hide", G_CALLBACK(on_edit_menu_hide), NULL);
+	item = main_widgets.editor_menu;
+	g_signal_connect(item, "show", G_CALLBACK(on_editor_menu_show), NULL);
+	g_signal_connect(item, "hide", G_CALLBACK(on_editor_menu_hide), NULL);
 
 	ui_init_toolbar_widgets();
 	init_document_widgets();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list