Revision: 4380 http://geany.svn.sourceforge.net/geany/?rev=4380&view=rev Author: ntrel Date: 2009-10-27 17:27:24 +0000 (Tue, 27 Oct 2009)
Log Message: ----------- Add Edit->Commands submenu which is shared with the editor popup menu.
Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/interface.c trunk/src/templates.c trunk/src/ui_utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-10-27 15:38:40 UTC (rev 4379) +++ trunk/ChangeLog 2009-10-27 17:27:24 UTC (rev 4380) @@ -13,6 +13,8 @@ * src/editor.c: Fix using tab to autocomplete in some other situations that word part 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.
2009-10-26 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2009-10-27 15:38:40 UTC (rev 4379) +++ trunk/geany.glade 2009-10-27 17:27:24 UTC (rev 4380) @@ -67,7 +67,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2980"> + <widget class="GtkImage" id="image3021"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -144,7 +144,7 @@ <signal name="activate" handler="on_save_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2981"> + <widget class="GtkImage" id="image3022"> <property name="visible">True</property> <property name="stock">gtk-save</property> <property name="icon_size">1</property> @@ -165,7 +165,7 @@ <signal name="activate" handler="on_toolbutton_reload_clicked" last_modification_time="Mon, 01 Sep 2008 16:57:06 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2982"> + <widget class="GtkImage" id="image3023"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -185,7 +185,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2983"> + <widget class="GtkImage" id="image3024"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -272,7 +272,7 @@ <signal name="activate" handler="on_close_other_documents1_activate" last_modification_time="Fri, 27 Jun 2008 15:19:28 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2984"> + <widget class="GtkImage" id="image3025"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -293,7 +293,7 @@ <signal name="activate" handler="on_close_all1_activate" last_modification_time="Thu, 02 Jun 2005 14:15:30 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2985"> + <widget class="GtkImage" id="image3026"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -481,7 +481,7 @@ <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2986"> + <widget class="GtkImage" id="image3027"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -502,7 +502,7 @@ <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:28:54 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2987"> + <widget class="GtkImage" id="image3028"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -555,6 +555,14 @@ </child>
<child> + <widget class="GtkMenuItem" id="commands2"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Commands</property> + <property name="use_underline">True</property> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separator18"> <property name="visible">True</property> </widget> @@ -567,7 +575,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2988"> + <widget class="GtkImage" id="image3029"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -646,7 +654,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2989"> + <widget class="GtkImage" id="image3030"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -678,7 +686,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2990"> + <widget class="GtkImage" id="image3031"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -717,7 +725,7 @@ <signal name="activate" handler="on_preferences1_activate" last_modification_time="Wed, 08 Jun 2005 11:35:19 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2991"> + <widget class="GtkImage" id="image3032"> <property name="visible">True</property> <property name="stock">gtk-preferences</property> <property name="icon_size">1</property> @@ -788,7 +796,7 @@ <signal name="activate" handler="on_replace1_activate" last_modification_time="Sun, 23 Oct 2005 13:22:36 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2992"> + <widget class="GtkImage" id="image3033"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -863,7 +871,7 @@ <signal name="activate" handler="on_go_to_line_activate" last_modification_time="Sat, 06 Dec 2008 17:41:21 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2993"> + <widget class="GtkImage" id="image3034"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -897,7 +905,7 @@ <signal name="activate" handler="on_change_font1_activate" last_modification_time="Fri, 22 Apr 2005 18:58:45 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2994"> + <widget class="GtkImage" id="image3035"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -1369,7 +1377,7 @@ <signal name="activate" handler="on_project_new1_activate" last_modification_time="Thu, 18 Jan 2007 22:16:24 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2995"> + <widget class="GtkImage" id="image3036"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -1390,7 +1398,7 @@ <signal name="activate" handler="on_project_open1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2996"> + <widget class="GtkImage" id="image3037"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -1419,7 +1427,7 @@ <signal name="activate" handler="on_project_close1_activate" last_modification_time="Mon, 15 Jan 2007 17:34:17 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2997"> + <widget class="GtkImage" id="image3038"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -1476,7 +1484,7 @@ <signal name="activate" handler="on_menu_reload_configuration1_activate" last_modification_time="Mon, 30 Jun 2008 16:19:40 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image2998"> + <widget class="GtkImage" id="image3039"> <property name="visible">True</property> <property name="stock">gtk-refresh</property> <property name="icon_size">1</property> @@ -1496,7 +1504,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image2999"> + <widget class="GtkImage" id="image3040"> <property name="visible">True</property> <property name="stock">gtk-file</property> <property name="icon_size">1</property> @@ -1523,7 +1531,7 @@ <signal name="activate" handler="on_show_color_chooser1_activate" last_modification_time="Wed, 22 Jun 2005 18:10:21 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image3000"> + <widget class="GtkImage" id="image3041"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -1575,7 +1583,7 @@ <signal name="activate" handler="on_help1_activate" last_modification_time="Sun, 24 Jul 2005 15:23:11 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image3001"> + <widget class="GtkImage" id="image3042"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property>
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2009-10-27 15:38:40 UTC (rev 4379) +++ trunk/src/interface.c 2009-10-27 17:27:24 UTC (rev 4380) @@ -38,7 +38,7 @@ GtkWidget *file1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image2980; + GtkWidget *image3021; GtkWidget *separator12; GtkWidget *menu_open1; GtkWidget *menu_open_selected_file1; @@ -47,11 +47,11 @@ GtkWidget *menu_save1; GtkWidget *menu_save_as1; GtkWidget *menu_save_all1; - GtkWidget *image2981; + GtkWidget *image3022; GtkWidget *menu_reload1; - GtkWidget *image2982; + GtkWidget *image3023; GtkWidget *menu_reload_as1; - GtkWidget *image2983; + GtkWidget *image3024; GtkWidget *menu_reload_as1_menu; GtkWidget *invisible7; GtkWidget *separator21; @@ -62,9 +62,9 @@ GtkWidget *separator14; GtkWidget *menu_close1; GtkWidget *close_other_documents1; - GtkWidget *image2984; + GtkWidget *image3025; GtkWidget *menu_close_all1; - GtkWidget *image2985; + GtkWidget *image3026; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -88,17 +88,18 @@ GtkWidget *menu_toggle_line_commentation1; GtkWidget *separator29; GtkWidget *menu_increase_indent1; - GtkWidget *image2986; + GtkWidget *image3027; GtkWidget *menu_decrease_indent1; - GtkWidget *image2987; + GtkWidget *image3028; GtkWidget *separator37; GtkWidget *send_selection_to_vte1; GtkWidget *send_selection_to2; GtkWidget *send_selection_to2_menu; GtkWidget *invisible13; + GtkWidget *commands2; GtkWidget *separator18; GtkWidget *add_comments1; - GtkWidget *image2988; + GtkWidget *image3029; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -107,16 +108,16 @@ GtkWidget *insert_gpl_notice2; GtkWidget *insert_bsd_license_notice2; GtkWidget *insert_date1; - GtkWidget *image2989; + GtkWidget *image3030; GtkWidget *insert_date1_menu; GtkWidget *invisible8; GtkWidget *insert_include2; - GtkWidget *image2990; + GtkWidget *image3031; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *separator9; GtkWidget *preferences1; - GtkWidget *image2991; + GtkWidget *image3032; GtkWidget *search1; GtkWidget *search1_menu; GtkWidget *find1; @@ -124,7 +125,7 @@ GtkWidget *find_previous1; GtkWidget *find_in_files1; GtkWidget *replace1; - GtkWidget *image2992; + GtkWidget *image3033; GtkWidget *separator33; GtkWidget *find_nextsel1; GtkWidget *find_prevsel1; @@ -133,11 +134,11 @@ GtkWidget *previous_message1; GtkWidget *separator32; GtkWidget *go_to_line1; - GtkWidget *image2993; + GtkWidget *image3034; GtkWidget *menu_view1; GtkWidget *menu_view1_menu; GtkWidget *menu_change_font1; - GtkWidget *image2994; + GtkWidget *image3035; GtkWidget *menu_separator4; GtkWidget *menu_toggle_all_additional_widgets1; GtkWidget *menu_fullscreen1; @@ -195,30 +196,30 @@ GtkWidget *menu_project1; GtkWidget *menu_project1_menu; GtkWidget *project_new1; - GtkWidget *image2995; + GtkWidget *image3036; GtkWidget *project_open1; - GtkWidget *image2996; + GtkWidget *image3037; GtkWidget *recent_projects1; GtkWidget *project_close1; - GtkWidget *image2997; + GtkWidget *image3038; GtkWidget *separator34; GtkWidget *project_properties1; GtkWidget *menu_build1; GtkWidget *tools1; GtkWidget *tools1_menu; GtkWidget *menu_reload_configuration1; - GtkWidget *image2998; + GtkWidget *image3039; GtkWidget *configuration_files1; - GtkWidget *image2999; + GtkWidget *image3040; GtkWidget *separator47; GtkWidget *menu_choose_color1; - GtkWidget *image3000; + GtkWidget *image3041; GtkWidget *menu_count_words1; GtkWidget *load_tags1; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *help1; - GtkWidget *image3001; + GtkWidget *image3042; GtkWidget *website1; GtkWidget *keyboard_shortcuts1; GtkWidget *debug_messages1; @@ -285,9 +286,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
- image2980 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2980); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2980); + image3021 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3021); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image3021);
separator12 = gtk_separator_menu_item_new (); gtk_widget_show (separator12); @@ -323,25 +324,25 @@ gtk_widget_show (menu_save_all1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1);
- image2981 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2981); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2981); + image3022 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3022); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image3022);
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); gtk_widget_show (menu_reload1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
- image2982 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2982); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2982); + image3023 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3023); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image3023);
menu_reload_as1 = gtk_image_menu_item_new_with_mnemonic (_("R_eload As")); gtk_widget_show (menu_reload_as1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload_as1);
- image2983 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2983); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2983); + image3024 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3024); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image3024);
menu_reload_as1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); @@ -384,17 +385,17 @@ gtk_widget_show (close_other_documents1); gtk_container_add (GTK_CONTAINER (file1_menu), close_other_documents1);
- image2984 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2984); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2984); + image3025 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3025); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image3025);
menu_close_all1 = gtk_image_menu_item_new_with_mnemonic (_("C_lose All")); gtk_widget_show (menu_close_all1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1);
- image2985 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2985); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2985); + image3026 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3026); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image3026);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -492,17 +493,17 @@ gtk_widget_show (menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
- image2986 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2986); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2986); + image3027 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3027); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image3027);
menu_decrease_indent1 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent")); gtk_widget_show (menu_decrease_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_decrease_indent1);
- image2987 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2987); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2987); + image3028 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3028); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image3028);
separator37 = gtk_separator_menu_item_new (); gtk_widget_show (separator37); @@ -523,6 +524,10 @@ invisible13 = gtk_menu_item_new_with_mnemonic (_("invisible")); gtk_container_add (GTK_CONTAINER (send_selection_to2_menu), invisible13);
+ commands2 = gtk_menu_item_new_with_mnemonic (_("_Commands")); + gtk_widget_show (commands2); + gtk_container_add (GTK_CONTAINER (edit1_menu), commands2); + separator18 = gtk_separator_menu_item_new (); gtk_widget_show (separator18); gtk_container_add (GTK_CONTAINER (edit1_menu), separator18); @@ -532,9 +537,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
- image2988 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2988); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2988); + image3029 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3029); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image3029);
add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -567,9 +572,9 @@ gtk_widget_show (insert_date1); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
- image2989 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2989); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2989); + image3030 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3030); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image3030);
insert_date1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu); @@ -581,9 +586,9 @@ gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
- image2990 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2990); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2990); + image3031 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3031); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image3031);
insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -600,9 +605,9 @@ gtk_widget_show (preferences1); gtk_container_add (GTK_CONTAINER (edit1_menu), preferences1);
- image2991 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2991); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences1), image2991); + image3032 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3032); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (preferences1), image3032);
search1 = gtk_menu_item_new_with_mnemonic (_("_Search")); gtk_widget_show (search1); @@ -631,9 +636,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
- image2992 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2992); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2992); + image3033 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3033); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image3033);
separator33 = gtk_separator_menu_item_new (); gtk_widget_show (separator33); @@ -670,9 +675,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
- image2993 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2993); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2993); + image3034 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3034); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image3034);
menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menu_view1); @@ -685,9 +690,9 @@ gtk_widget_show (menu_change_font1); gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1);
- image2994 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2994); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2994); + image3035 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3035); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image3035);
menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -926,17 +931,17 @@ gtk_widget_show (project_new1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
- image2995 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2995); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2995); + image3036 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3036); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image3036);
project_open1 = gtk_image_menu_item_new_with_mnemonic (_("_Open")); gtk_widget_show (project_open1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_open1);
- image2996 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2996); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2996); + image3037 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3037); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image3037);
recent_projects1 = gtk_menu_item_new_with_mnemonic (_("_Recent Projects")); gtk_widget_show (recent_projects1); @@ -946,9 +951,9 @@ gtk_widget_show (project_close1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_close1);
- image2997 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2997); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2997); + image3038 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3038); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image3038);
separator34 = gtk_separator_menu_item_new (); gtk_widget_show (separator34); @@ -974,17 +979,17 @@ gtk_widget_show (menu_reload_configuration1); gtk_container_add (GTK_CONTAINER (tools1_menu), menu_reload_configuration1);
- image2998 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2998); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image2998); + image3039 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3039); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_configuration1), image3039);
configuration_files1 = gtk_image_menu_item_new_with_mnemonic (_("C_onfiguration Files")); gtk_widget_show (configuration_files1); gtk_container_add (GTK_CONTAINER (tools1_menu), configuration_files1);
- image2999 = gtk_image_new_from_stock ("gtk-file", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2999); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (configuration_files1), image2999); + image3040 = gtk_image_new_from_stock ("gtk-file", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3040); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (configuration_files1), image3040);
separator47 = gtk_separator_menu_item_new (); gtk_widget_show (separator47); @@ -995,9 +1000,9 @@ gtk_widget_show (menu_choose_color1); gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1);
- image3000 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image3000); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image3000); + image3041 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3041); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image3041);
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); gtk_widget_show (menu_count_words1); @@ -1018,9 +1023,9 @@ gtk_widget_show (help1); gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
- image3001 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image3001); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image3001); + image3042 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image3042); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image3042);
website1 = gtk_menu_item_new_with_mnemonic (_("_Website")); gtk_widget_show (website1); @@ -1481,7 +1486,7 @@ GLADE_HOOKUP_OBJECT (window1, file1_menu, "file1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_new1, "menu_new1"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1, "menu_new_with_template1"); - GLADE_HOOKUP_OBJECT (window1, image2980, "image2980"); + GLADE_HOOKUP_OBJECT (window1, image3021, "image3021"); GLADE_HOOKUP_OBJECT (window1, separator12, "separator12"); GLADE_HOOKUP_OBJECT (window1, menu_open1, "menu_open1"); GLADE_HOOKUP_OBJECT (window1, menu_open_selected_file1, "menu_open_selected_file1"); @@ -1490,11 +1495,11 @@ GLADE_HOOKUP_OBJECT (window1, menu_save1, "menu_save1"); GLADE_HOOKUP_OBJECT (window1, menu_save_as1, "menu_save_as1"); GLADE_HOOKUP_OBJECT (window1, menu_save_all1, "menu_save_all1"); - GLADE_HOOKUP_OBJECT (window1, image2981, "image2981"); + GLADE_HOOKUP_OBJECT (window1, image3022, "image3022"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); - GLADE_HOOKUP_OBJECT (window1, image2982, "image2982"); + GLADE_HOOKUP_OBJECT (window1, image3023, "image3023"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); - GLADE_HOOKUP_OBJECT (window1, image2983, "image2983"); + GLADE_HOOKUP_OBJECT (window1, image3024, "image3024"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); @@ -1505,9 +1510,9 @@ GLADE_HOOKUP_OBJECT (window1, separator14, "separator14"); GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1"); GLADE_HOOKUP_OBJECT (window1, close_other_documents1, "close_other_documents1"); - GLADE_HOOKUP_OBJECT (window1, image2984, "image2984"); + GLADE_HOOKUP_OBJECT (window1, image3025, "image3025"); GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1"); - GLADE_HOOKUP_OBJECT (window1, image2985, "image2985"); + GLADE_HOOKUP_OBJECT (window1, image3026, "image3026"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1531,17 +1536,18 @@ GLADE_HOOKUP_OBJECT (window1, menu_toggle_line_commentation1, "menu_toggle_line_commentation1"); GLADE_HOOKUP_OBJECT (window1, separator29, "separator29"); GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2986, "image2986"); + GLADE_HOOKUP_OBJECT (window1, image3027, "image3027"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2987, "image2987"); + GLADE_HOOKUP_OBJECT (window1, image3028, "image3028"); GLADE_HOOKUP_OBJECT (window1, separator37, "separator37"); GLADE_HOOKUP_OBJECT (window1, send_selection_to_vte1, "send_selection_to_vte1"); GLADE_HOOKUP_OBJECT (window1, send_selection_to2, "send_selection_to2"); 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, separator18, "separator18"); GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1"); - GLADE_HOOKUP_OBJECT (window1, image2988, "image2988"); + GLADE_HOOKUP_OBJECT (window1, image3029, "image3029"); GLADE_HOOKUP_OBJECT (window1, add_comments1_menu, "add_comments1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_add_changelog_entry1, "menu_add_changelog_entry1"); GLADE_HOOKUP_OBJECT (window1, insert_file_header1, "insert_file_header1"); @@ -1550,16 +1556,16 @@ GLADE_HOOKUP_OBJECT (window1, insert_gpl_notice2, "insert_gpl_notice2"); GLADE_HOOKUP_OBJECT (window1, insert_bsd_license_notice2, "insert_bsd_license_notice2"); GLADE_HOOKUP_OBJECT (window1, insert_date1, "insert_date1"); - GLADE_HOOKUP_OBJECT (window1, image2989, "image2989"); + GLADE_HOOKUP_OBJECT (window1, image3030, "image3030"); GLADE_HOOKUP_OBJECT (window1, insert_date1_menu, "insert_date1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible8, "invisible8"); GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2"); - GLADE_HOOKUP_OBJECT (window1, image2990, "image2990"); + GLADE_HOOKUP_OBJECT (window1, image3031, "image3031"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, separator9, "separator9"); GLADE_HOOKUP_OBJECT (window1, preferences1, "preferences1"); - GLADE_HOOKUP_OBJECT (window1, image2991, "image2991"); + GLADE_HOOKUP_OBJECT (window1, image3032, "image3032"); GLADE_HOOKUP_OBJECT (window1, search1, "search1"); GLADE_HOOKUP_OBJECT (window1, search1_menu, "search1_menu"); GLADE_HOOKUP_OBJECT (window1, find1, "find1"); @@ -1567,7 +1573,7 @@ GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1"); GLADE_HOOKUP_OBJECT (window1, find_in_files1, "find_in_files1"); GLADE_HOOKUP_OBJECT (window1, replace1, "replace1"); - GLADE_HOOKUP_OBJECT (window1, image2992, "image2992"); + GLADE_HOOKUP_OBJECT (window1, image3033, "image3033"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1"); GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1"); @@ -1576,11 +1582,11 @@ GLADE_HOOKUP_OBJECT (window1, previous_message1, "previous_message1"); GLADE_HOOKUP_OBJECT (window1, separator32, "separator32"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); - GLADE_HOOKUP_OBJECT (window1, image2993, "image2993"); + GLADE_HOOKUP_OBJECT (window1, image3034, "image3034"); GLADE_HOOKUP_OBJECT (window1, menu_view1, "menu_view1"); GLADE_HOOKUP_OBJECT (window1, menu_view1_menu, "menu_view1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1"); - GLADE_HOOKUP_OBJECT (window1, image2994, "image2994"); + GLADE_HOOKUP_OBJECT (window1, image3035, "image3035"); GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4"); GLADE_HOOKUP_OBJECT (window1, menu_toggle_all_additional_widgets1, "menu_toggle_all_additional_widgets1"); GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1"); @@ -1636,30 +1642,30 @@ GLADE_HOOKUP_OBJECT (window1, menu_project1, "menu_project1"); GLADE_HOOKUP_OBJECT (window1, menu_project1_menu, "menu_project1_menu"); GLADE_HOOKUP_OBJECT (window1, project_new1, "project_new1"); - GLADE_HOOKUP_OBJECT (window1, image2995, "image2995"); + GLADE_HOOKUP_OBJECT (window1, image3036, "image3036"); GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1"); - GLADE_HOOKUP_OBJECT (window1, image2996, "image2996"); + GLADE_HOOKUP_OBJECT (window1, image3037, "image3037"); GLADE_HOOKUP_OBJECT (window1, recent_projects1, "recent_projects1"); GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1"); - GLADE_HOOKUP_OBJECT (window1, image2997, "image2997"); + GLADE_HOOKUP_OBJECT (window1, image3038, "image3038"); GLADE_HOOKUP_OBJECT (window1, separator34, "separator34"); GLADE_HOOKUP_OBJECT (window1, project_properties1, "project_properties1"); GLADE_HOOKUP_OBJECT (window1, menu_build1, "menu_build1"); GLADE_HOOKUP_OBJECT (window1, tools1, "tools1"); GLADE_HOOKUP_OBJECT (window1, tools1_menu, "tools1_menu"); GLADE_HOOKUP_OBJECT (window1, menu_reload_configuration1, "menu_reload_configuration1"); - GLADE_HOOKUP_OBJECT (window1, image2998, "image2998"); + GLADE_HOOKUP_OBJECT (window1, image3039, "image3039"); GLADE_HOOKUP_OBJECT (window1, configuration_files1, "configuration_files1"); - GLADE_HOOKUP_OBJECT (window1, image2999, "image2999"); + GLADE_HOOKUP_OBJECT (window1, image3040, "image3040"); GLADE_HOOKUP_OBJECT (window1, separator47, "separator47"); GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1"); - GLADE_HOOKUP_OBJECT (window1, image3000, "image3000"); + GLADE_HOOKUP_OBJECT (window1, image3041, "image3041"); GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1"); GLADE_HOOKUP_OBJECT (window1, load_tags1, "load_tags1"); GLADE_HOOKUP_OBJECT (window1, menu_help1, "menu_help1"); GLADE_HOOKUP_OBJECT (window1, menu_help1_menu, "menu_help1_menu"); GLADE_HOOKUP_OBJECT (window1, help1, "help1"); - GLADE_HOOKUP_OBJECT (window1, image3001, "image3001"); + GLADE_HOOKUP_OBJECT (window1, image3042, "image3042"); GLADE_HOOKUP_OBJECT (window1, website1, "website1"); GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1"); GLADE_HOOKUP_OBJECT (window1, debug_messages1, "debug_messages1");
Modified: trunk/src/templates.c =================================================================== --- trunk/src/templates.c 2009-10-27 15:38:40 UTC (rev 4379) +++ trunk/src/templates.c 2009-10-27 17:27:24 UTC (rev 4380) @@ -436,7 +436,7 @@ }
-static void on_menu_new_with_template1_show(GtkWidget *item) +static void on_file_menu_show(GtkWidget *item) { geany_menu_button_action_set_menu( GEANY_MENU_BUTTON_ACTION(toolbar_get_action_by_name("New")), NULL); @@ -445,7 +445,7 @@ }
-static void on_menu_new_with_template1_hide(GtkWidget *item) +static void on_file_menu_hide(GtkWidget *item) { item = ui_lookup_widget(main_widgets.window, "menu_new_with_template1"); gtk_menu_item_set_submenu(GTK_MENU_ITEM(item), NULL); @@ -459,6 +459,7 @@ gchar *year = utils_get_date_time(template_prefs.year_format, NULL); gchar *date = utils_get_date_time(template_prefs.date_format, NULL); gchar *datetime = utils_get_date_time(template_prefs.datetime_format, NULL); + GtkWidget *item;
init_general_templates(year, date, datetime); init_ft_templates(year, date, datetime); @@ -468,15 +469,14 @@ g_free(year);
create_file_template_menu(); - /* we hold our own ref on the menu as it has no parent whilst being moved */ + /* we hold our own ref for the menu as it has no parent whilst being moved */ g_object_ref(new_with_template_menu); - { - GtkWidget *item = ui_lookup_widget(main_widgets.window, "file1"); - /* reparent the template menu as needed */ - item = gtk_menu_item_get_submenu(GTK_MENU_ITEM(item)); - g_signal_connect(item, "show", G_CALLBACK(on_menu_new_with_template1_show), NULL); - g_signal_connect(item, "hide", G_CALLBACK(on_menu_new_with_template1_hide), NULL); - } + + /* reparent the template menu as needed */ + item = ui_lookup_widget(main_widgets.window, "file1"); + item = gtk_menu_item_get_submenu(GTK_MENU_ITEM(item)); + g_signal_connect(item, "show", G_CALLBACK(on_file_menu_show), NULL); + g_signal_connect(item, "hide", G_CALLBACK(on_file_menu_hide), NULL); }
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2009-10-27 15:38:40 UTC (rev 4379) +++ trunk/src/ui_utils.c 2009-10-27 17:27:24 UTC (rev 4380) @@ -70,6 +70,7 @@ GtkWidget *undo_items[3]; GtkWidget *save_buttons[4]; GtkWidget *config_files_menu; + GtkWidget *commands_menu; } widgets;
@@ -1854,8 +1855,37 @@ }
+static void ui_menu_move(GtkWidget *menu, GtkWidget *old, GtkWidget *new) +{ + g_object_ref(menu); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(old), NULL); + gtk_menu_item_set_submenu(GTK_MENU_ITEM(new), menu); + g_object_unref(menu); +} + + +static void on_edit_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); +} + + +static void on_edit_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); +} + + void ui_init(void) { + GtkWidget *item; + init_recent_files();
ui_widgets.statusbar = ui_lookup_widget(main_widgets.window, "statusbar"); @@ -1882,6 +1912,15 @@ 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"); + 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); + ui_init_toolbar_widgets(); init_document_widgets(); create_config_files_menu();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.