Revision: 1860 http://geany.svn.sourceforge.net/geany/?rev=1860&view=rev Author: eht16 Date: 2007-09-07 12:01:55 -0700 (Fri, 07 Sep 2007)
Log Message: ----------- Remove convert to lower-/upper-case keybindings. Add toggle case keybinding and change shortcut to Ctrl-Alt-U.
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.txt trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c trunk/src/keybindings.c trunk/src/keybindings.h trunk/src/ui_utils.h trunk/src/utils.c trunk/src/utils.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/ChangeLog 2007-09-07 19:01:55 UTC (rev 1860) @@ -1,3 +1,12 @@ +2007-09-07 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * geany.glade, doc/geany.txt, src/callbacks.c, src/callbacks.h, + src/interface.c, src/keybindings.c, src/keybindings.h, src/utils.c, + src/utils.h, src/ui_utils.h: + Remove convert to lower-/upper-case keybindings. + Add toggle case keybinding and change shortcut to Ctrl-Alt-U. + + 2007-09-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c, src/keybindings.h, doc/geany.txt, doc/geany.html:
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/doc/geany.txt 2007-09-07 19:01:55 UTC (rev 1860) @@ -1533,10 +1533,12 @@
**Editing operations**
-Convert selection to lower case Converts the current selection to lower case. +Toggle case of selection Changes the case of the selection. A lowercase + selection will be changed into uppercase and vice + versa. If the selection contains lower- and + uppercase characters, all will be converted to + lowercase.
-Convert selection to upper case Converts the current selection to upper case. - Duplicate line or selection Duplicates the current line or selection.
Delete current line(s) Deletes the current line (and any lines with a
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/geany.glade 2007-09-07 19:01:55 UTC (rev 1860) @@ -58,7 +58,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1951"> + <widget class="GtkImage" id="image2010"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -148,7 +148,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="image1952"> + <widget class="GtkImage" id="image2011"> <property name="visible">True</property> <property name="stock">gtk-save</property> <property name="icon_size">1</property> @@ -169,7 +169,7 @@ <signal name="activate" handler="on_toolbutton23_clicked" last_modification_time="Mon, 24 Jul 2006 19:26:04 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1953"> + <widget class="GtkImage" id="image2012"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -189,7 +189,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1954"> + <widget class="GtkImage" id="image2013"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -285,7 +285,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="image1955"> + <widget class="GtkImage" id="image2014"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -420,24 +420,15 @@ <widget class="GtkMenu" id="menu_format1_menu">
<child> - <widget class="GtkMenuItem" id="menu_to_lower_case2"> + <widget class="GtkMenuItem" id="menu_toggle_case2"> <property name="visible">True</property> - <property name="label" translatable="yes">Convert Selection to _Lower-case</property> + <property name="label" translatable="yes">T_oggle Case of Selection</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_to_lower-case1_activate" last_modification_time="Fri, 06 May 2005 18:21:23 GMT"/> + <signal name="activate" handler="on_toggle_case1_activate" last_modification_time="Thu, 06 Sep 2007 18:17:22 GMT"/> </widget> </child>
<child> - <widget class="GtkMenuItem" id="menu_to_upper_case2"> - <property name="visible">True</property> - <property name="label" translatable="yes">Convert Selection to _Upper-case</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_to_upper-case1_activate" last_modification_time="Fri, 06 May 2005 18:21:23 GMT"/> - </widget> - </child> - - <child> <widget class="GtkSeparatorMenuItem" id="separator28"> <property name="visible">True</property> </widget> @@ -493,7 +484,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="image1956"> + <widget class="GtkImage" id="image2015"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -514,7 +505,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="image1957"> + <widget class="GtkImage" id="image2016"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -570,7 +561,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1958"> + <widget class="GtkImage" id="image2017"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -655,7 +646,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1959"> + <widget class="GtkImage" id="image2018"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -687,7 +678,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1960"> + <widget class="GtkImage" id="image2019"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -784,7 +775,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="image1961"> + <widget class="GtkImage" id="image2020"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -850,7 +841,7 @@ <signal name="activate" handler="on_go_to_line1_activate" last_modification_time="Tue, 23 May 2006 17:10:49 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1962"> + <widget class="GtkImage" id="image2021"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -885,7 +876,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="image1963"> + <widget class="GtkImage" id="image2022"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -1245,7 +1236,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="image1964"> + <widget class="GtkImage" id="image2023"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -1266,7 +1257,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="image1965"> + <widget class="GtkImage" id="image2024"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -1287,7 +1278,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="image1966"> + <widget class="GtkImage" id="image2025"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -1345,7 +1336,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="image1967"> + <widget class="GtkImage" id="image2026"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -1389,7 +1380,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="image1968"> + <widget class="GtkImage" id="image2027"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> @@ -2587,24 +2578,15 @@ <widget class="GtkMenu" id="menu_format2_menu">
<child> - <widget class="GtkMenuItem" id="to_lower_case1"> + <widget class="GtkMenuItem" id="toggle_case1"> <property name="visible">True</property> - <property name="label" translatable="yes">Convert Selection to _Lower-case</property> + <property name="label" translatable="yes">T_oggle Case of Selection</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_to_lower-case1_activate" last_modification_time="Thu, 05 May 2005 08:29:19 GMT"/> + <signal name="activate" handler="on_toggle_case1_activate" last_modification_time="Thu, 06 Sep 2007 18:17:18 GMT"/> </widget> </child>
<child> - <widget class="GtkMenuItem" id="to_upper_case1"> - <property name="visible">True</property> - <property name="label" translatable="yes">Convert Selection to _Upper-case</property> - <property name="use_underline">True</property> - <signal name="activate" handler="on_to_upper-case1_activate" last_modification_time="Thu, 05 May 2005 08:29:19 GMT"/> - </widget> - </child> - - <child> <widget class="GtkSeparatorMenuItem" id="separator30"> <property name="visible">True</property> </widget> @@ -2660,7 +2642,7 @@ <signal name="activate" handler="on_menu_increase_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:31:38 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1944"> + <widget class="GtkImage" id="image1969"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -2681,7 +2663,7 @@ <signal name="activate" handler="on_menu_decrease_indent1_activate" last_modification_time="Tue, 01 Aug 2006 10:31:38 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1945"> + <widget class="GtkImage" id="image1970"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -2737,7 +2719,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1946"> + <widget class="GtkImage" id="image1971"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2822,7 +2804,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1947"> + <widget class="GtkImage" id="image1972"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2854,7 +2836,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image1948"> + <widget class="GtkImage" id="image1973"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2893,7 +2875,7 @@ <signal name="activate" handler="on_find_usage1_activate" last_modification_time="Fri, 27 May 2005 21:55:12 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1949"> + <widget class="GtkImage" id="image1974"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">1</property> @@ -2948,7 +2930,7 @@ <signal name="activate" handler="on_go_to_line_activate" last_modification_time="Sat, 16 Jul 2005 11:20:32 GMT"/>
<child internal-child="image"> - <widget class="GtkImage" id="image1950"> + <widget class="GtkImage" id="image1975"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/callbacks.c 2007-09-07 19:01:55 UTC (rev 1860) @@ -889,26 +889,32 @@
void -on_to_lower_case1_activate (GtkMenuItem *menuitem, +on_toggle_case1_activate (GtkMenuItem *menuitem, gpointer user_data) { gint idx = document_get_cur_idx(); + gchar *text;
- if (idx < 0 || ! doc_list[idx].is_valid) return; + if (! DOC_IDX_VALID(idx)) + return;
- sci_cmd(doc_list[idx].sci, SCI_LOWERCASE); -} + if (sci_can_copy(doc_list[idx].sci)) + { + gchar *result;
+ text = g_malloc(sci_get_selected_text_length(doc_list[idx].sci) + 1); + sci_get_selected_text(doc_list[idx].sci, text);
-void -on_to_upper_case1_activate (GtkMenuItem *menuitem, - gpointer user_data) -{ - gint idx = document_get_cur_idx(); + if (utils_str_has_upper(text)) + result = g_utf8_strdown(text, -1); + else + result = g_utf8_strup(text, -1);
- if (idx < 0 || ! doc_list[idx].is_valid) return; + sci_replace_sel(doc_list[idx].sci, result);
- sci_cmd(doc_list[idx].sci, SCI_UPPERCASE); + g_free(result); + g_free(text); + } }
Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/callbacks.h 2007-09-07 19:01:55 UTC (rev 1860) @@ -196,14 +196,10 @@ gpointer user_data);
void -on_to_lower_case1_activate (GtkMenuItem *menuitem, +on_toggle_case1_activate (GtkMenuItem *menuitem, gpointer user_data);
void -on_to_upper_case1_activate (GtkMenuItem *menuitem, - gpointer user_data); - -void on_fullscreen1_activate (GtkMenuItem *menuitem, gpointer user_data);
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/interface.c 2007-09-07 19:01:55 UTC (rev 1860) @@ -37,7 +37,7 @@ GtkWidget *file1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image1951; + GtkWidget *image2010; GtkWidget *menu_new_with_template1_menu; GtkWidget *invisible2; GtkWidget *separator12; @@ -48,11 +48,11 @@ GtkWidget *menu_save1; GtkWidget *menu_save_as1; GtkWidget *menu_save_all1; - GtkWidget *image1952; + GtkWidget *image2011; GtkWidget *menu_reload1; - GtkWidget *image1953; + GtkWidget *image2012; GtkWidget *menu_reload_as1; - GtkWidget *image1954; + GtkWidget *image2013; GtkWidget *menu_reload_as1_menu; GtkWidget *invisible7; GtkWidget *separator21; @@ -64,7 +64,7 @@ GtkWidget *separator14; GtkWidget *menu_close1; GtkWidget *menu_close_all1; - GtkWidget *image1955; + GtkWidget *image2014; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -81,8 +81,7 @@ GtkWidget *separator25; GtkWidget *menu_format1; GtkWidget *menu_format1_menu; - GtkWidget *menu_to_lower_case2; - GtkWidget *menu_to_upper_case2; + GtkWidget *menu_toggle_case2; GtkWidget *separator28; GtkWidget *menu_comment_line1; GtkWidget *menu_uncomment_line1; @@ -90,16 +89,16 @@ GtkWidget *menu_duplicate_line1; GtkWidget *separator29; GtkWidget *menu_increase_indent1; - GtkWidget *image1956; + GtkWidget *image2015; GtkWidget *menu_decrease_indent1; - GtkWidget *image1957; + GtkWidget *image2016; GtkWidget *separator37; GtkWidget *send_selection_to2; GtkWidget *send_selection_to2_menu; GtkWidget *invisible13; GtkWidget *separator18; GtkWidget *add_comments1; - GtkWidget *image1958; + GtkWidget *image2017; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -108,11 +107,11 @@ GtkWidget *insert_gpl_notice2; GtkWidget *insert_bsd_license_notice2; GtkWidget *insert_date1; - GtkWidget *image1959; + GtkWidget *image2018; GtkWidget *insert_date1_menu; GtkWidget *invisible8; GtkWidget *insert_include2; - GtkWidget *image1960; + GtkWidget *image2019; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *separator9; @@ -124,7 +123,7 @@ GtkWidget *find_previous1; GtkWidget *find_in_files1; GtkWidget *replace1; - GtkWidget *image1961; + GtkWidget *image2020; GtkWidget *separator33; GtkWidget *find_nextsel1; GtkWidget *find_prevsel1; @@ -132,11 +131,11 @@ GtkWidget *next_message1; GtkWidget *separator32; GtkWidget *go_to_line1; - GtkWidget *image1962; + GtkWidget *image2021; GtkWidget *menu_view1; GtkWidget *menu_view1_menu; GtkWidget *menu_change_font1; - GtkWidget *image1963; + GtkWidget *image2022; GtkWidget *menu_separator4; GtkWidget *menu_toggle_all_additional_widgets1; GtkWidget *menu_fullscreen1; @@ -179,23 +178,23 @@ GtkWidget *menu_project1; GtkWidget *menu_project1_menu; GtkWidget *project_new1; - GtkWidget *image1964; + GtkWidget *image2023; GtkWidget *project_open1; - GtkWidget *image1965; + GtkWidget *image2024; GtkWidget *project_close1; - GtkWidget *image1966; + GtkWidget *image2025; GtkWidget *separator34; GtkWidget *project_properties1; GtkWidget *menu_build1; GtkWidget *tools1; GtkWidget *tools1_menu; GtkWidget *menu_choose_color1; - GtkWidget *image1967; + GtkWidget *image2026; GtkWidget *menu_count_words1; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *help1; - GtkWidget *image1968; + GtkWidget *image2027; GtkWidget *keyboard_shortcuts1; GtkWidget *website1; GtkWidget *separator16; @@ -295,9 +294,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1);
- image1951 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1951); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image1951); + image2010 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2010); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2010);
menu_new_with_template1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_new_with_template1), menu_new_with_template1_menu); @@ -340,25 +339,25 @@ gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1); gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL);
- image1952 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1952); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image1952); + image2011 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2011); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2011);
menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); gtk_widget_show (menu_reload1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1);
- image1953 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1953); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image1953); + image2012 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2012); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2012);
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);
- image1954 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1954); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image1954); + image2013 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2013); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2013);
menu_reload_as1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); @@ -409,9 +408,9 @@ gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1); gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL);
- image1955 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1955); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image1955); + image2014 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2014); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2014);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -481,14 +480,10 @@ menu_format1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_format1), menu_format1_menu);
- menu_to_lower_case2 = gtk_menu_item_new_with_mnemonic (_("Convert Selection to _Lower-case")); - gtk_widget_show (menu_to_lower_case2); - gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_to_lower_case2); + menu_toggle_case2 = gtk_menu_item_new_with_mnemonic (_("T_oggle Case of Selection")); + gtk_widget_show (menu_toggle_case2); + gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_toggle_case2);
- menu_to_upper_case2 = gtk_menu_item_new_with_mnemonic (_("Convert Selection to _Upper-case")); - gtk_widget_show (menu_to_upper_case2); - gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_to_upper_case2); - separator28 = gtk_separator_menu_item_new (); gtk_widget_show (separator28); gtk_container_add (GTK_CONTAINER (menu_format1_menu), separator28); @@ -519,17 +514,17 @@ gtk_widget_show (menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1);
- image1956 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1956); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image1956); + image2015 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2015); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2015);
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);
- image1957 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1957); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image1957); + image2016 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2016); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2016);
separator37 = gtk_separator_menu_item_new (); gtk_widget_show (separator37); @@ -555,9 +550,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
- image1958 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1958); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image1958); + image2017 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2017); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2017);
add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -596,9 +591,9 @@ gtk_widget_show (insert_date1); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1);
- image1959 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1959); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image1959); + image2018 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2018); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2018);
insert_date1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu); @@ -610,9 +605,9 @@ gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
- image1960 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1960); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image1960); + image2019 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2019); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2019);
insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -656,9 +651,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
- image1961 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1961); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image1961); + image2020 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2020); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2020);
separator33 = gtk_separator_menu_item_new (); gtk_widget_show (separator33); @@ -691,9 +686,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
- image1962 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1962); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image1962); + image2021 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2021); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2021);
menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menu_view1); @@ -707,9 +702,9 @@ gtk_container_add (GTK_CONTAINER (menu_view1_menu), menu_change_font1); gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL);
- image1963 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1963); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image1963); + image2022 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2022); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2022);
menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -897,25 +892,25 @@ gtk_widget_show (project_new1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1);
- image1964 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1964); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image1964); + image2023 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2023); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2023);
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);
- image1965 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1965); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image1965); + image2024 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2024); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2024);
project_close1 = gtk_image_menu_item_new_with_mnemonic (_("_Close")); gtk_widget_show (project_close1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_close1);
- image1966 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1966); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image1966); + image2025 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2025); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2025);
separator34 = gtk_separator_menu_item_new (); gtk_widget_show (separator34); @@ -942,9 +937,9 @@ gtk_container_add (GTK_CONTAINER (tools1_menu), menu_choose_color1); gtk_tooltips_set_tip (tooltips, menu_choose_color1, _("Open a color chooser dialog, to interactively pick colors from a palette."), NULL);
- image1967 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1967); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image1967); + image2026 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2026); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2026);
menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); gtk_widget_show (menu_count_words1); @@ -962,9 +957,9 @@ gtk_widget_show (help1); gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1);
- image1968 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1968); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image1968); + image2027 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2027); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2027);
keyboard_shortcuts1 = gtk_menu_item_new_with_mnemonic (_("_Keyboard Shortcuts")); gtk_widget_show (keyboard_shortcuts1); @@ -1343,12 +1338,9 @@ g_signal_connect ((gpointer) menu_select_all1, "activate", G_CALLBACK (on_menu_select_all1_activate), NULL); - g_signal_connect ((gpointer) menu_to_lower_case2, "activate", - G_CALLBACK (on_to_lower_case1_activate), + g_signal_connect ((gpointer) menu_toggle_case2, "activate", + G_CALLBACK (on_toggle_case1_activate), NULL); - g_signal_connect ((gpointer) menu_to_upper_case2, "activate", - G_CALLBACK (on_to_upper_case1_activate), - NULL); g_signal_connect ((gpointer) menu_comment_line1, "activate", G_CALLBACK (on_menu_comment_line1_activate), NULL); @@ -1608,7 +1600,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, image1951, "image1951"); + GLADE_HOOKUP_OBJECT (window1, image2010, "image2010"); GLADE_HOOKUP_OBJECT (window1, menu_new_with_template1_menu, "menu_new_with_template1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible2, "invisible2"); GLADE_HOOKUP_OBJECT (window1, separator12, "separator12"); @@ -1619,11 +1611,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, image1952, "image1952"); + GLADE_HOOKUP_OBJECT (window1, image2011, "image2011"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); - GLADE_HOOKUP_OBJECT (window1, image1953, "image1953"); + GLADE_HOOKUP_OBJECT (window1, image2012, "image2012"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); - GLADE_HOOKUP_OBJECT (window1, image1954, "image1954"); + GLADE_HOOKUP_OBJECT (window1, image2013, "image2013"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); @@ -1635,7 +1627,7 @@ GLADE_HOOKUP_OBJECT (window1, separator14, "separator14"); GLADE_HOOKUP_OBJECT (window1, menu_close1, "menu_close1"); GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1"); - GLADE_HOOKUP_OBJECT (window1, image1955, "image1955"); + GLADE_HOOKUP_OBJECT (window1, image2014, "image2014"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1652,8 +1644,7 @@ GLADE_HOOKUP_OBJECT (window1, separator25, "separator25"); GLADE_HOOKUP_OBJECT (window1, menu_format1, "menu_format1"); GLADE_HOOKUP_OBJECT (window1, menu_format1_menu, "menu_format1_menu"); - GLADE_HOOKUP_OBJECT (window1, menu_to_lower_case2, "menu_to_lower_case2"); - GLADE_HOOKUP_OBJECT (window1, menu_to_upper_case2, "menu_to_upper_case2"); + GLADE_HOOKUP_OBJECT (window1, menu_toggle_case2, "menu_toggle_case2"); GLADE_HOOKUP_OBJECT (window1, separator28, "separator28"); GLADE_HOOKUP_OBJECT (window1, menu_comment_line1, "menu_comment_line1"); GLADE_HOOKUP_OBJECT (window1, menu_uncomment_line1, "menu_uncomment_line1"); @@ -1661,16 +1652,16 @@ GLADE_HOOKUP_OBJECT (window1, menu_duplicate_line1, "menu_duplicate_line1"); GLADE_HOOKUP_OBJECT (window1, separator29, "separator29"); GLADE_HOOKUP_OBJECT (window1, menu_increase_indent1, "menu_increase_indent1"); - GLADE_HOOKUP_OBJECT (window1, image1956, "image1956"); + GLADE_HOOKUP_OBJECT (window1, image2015, "image2015"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); - GLADE_HOOKUP_OBJECT (window1, image1957, "image1957"); + GLADE_HOOKUP_OBJECT (window1, image2016, "image2016"); GLADE_HOOKUP_OBJECT (window1, separator37, "separator37"); 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, separator18, "separator18"); GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1"); - GLADE_HOOKUP_OBJECT (window1, image1958, "image1958"); + GLADE_HOOKUP_OBJECT (window1, image2017, "image2017"); 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"); @@ -1679,11 +1670,11 @@ 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, image1959, "image1959"); + GLADE_HOOKUP_OBJECT (window1, image2018, "image2018"); 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, image1960, "image1960"); + GLADE_HOOKUP_OBJECT (window1, image2019, "image2019"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, separator9, "separator9"); @@ -1695,7 +1686,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, image1961, "image1961"); + GLADE_HOOKUP_OBJECT (window1, image2020, "image2020"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1"); GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1"); @@ -1703,11 +1694,11 @@ GLADE_HOOKUP_OBJECT (window1, next_message1, "next_message1"); GLADE_HOOKUP_OBJECT (window1, separator32, "separator32"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); - GLADE_HOOKUP_OBJECT (window1, image1962, "image1962"); + GLADE_HOOKUP_OBJECT (window1, image2021, "image2021"); 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, image1963, "image1963"); + GLADE_HOOKUP_OBJECT (window1, image2022, "image2022"); 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"); @@ -1749,23 +1740,23 @@ 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, image1964, "image1964"); + GLADE_HOOKUP_OBJECT (window1, image2023, "image2023"); GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1"); - GLADE_HOOKUP_OBJECT (window1, image1965, "image1965"); + GLADE_HOOKUP_OBJECT (window1, image2024, "image2024"); GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1"); - GLADE_HOOKUP_OBJECT (window1, image1966, "image1966"); + GLADE_HOOKUP_OBJECT (window1, image2025, "image2025"); 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_choose_color1, "menu_choose_color1"); - GLADE_HOOKUP_OBJECT (window1, image1967, "image1967"); + GLADE_HOOKUP_OBJECT (window1, image2026, "image2026"); GLADE_HOOKUP_OBJECT (window1, menu_count_words1, "menu_count_words1"); 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, image1968, "image1968"); + GLADE_HOOKUP_OBJECT (window1, image2027, "image2027"); GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1"); GLADE_HOOKUP_OBJECT (window1, website1, "website1"); GLADE_HOOKUP_OBJECT (window1, separator16, "separator16"); @@ -1953,8 +1944,7 @@ GtkWidget *separator36; GtkWidget *menu_format2; GtkWidget *menu_format2_menu; - GtkWidget *to_lower_case1; - GtkWidget *to_upper_case1; + GtkWidget *toggle_case1; GtkWidget *separator30; GtkWidget *menu_comment_line2; GtkWidget *menu_uncomment_line2; @@ -1962,16 +1952,16 @@ GtkWidget *menu_duplicate_line2; GtkWidget *separator31; GtkWidget *menu_increase_indent2; - GtkWidget *image1944; + GtkWidget *image1969; GtkWidget *menu_decrease_indent2; - GtkWidget *image1945; + GtkWidget *image1970; GtkWidget *separator38; GtkWidget *send_selection_to1; GtkWidget *send_selection_to1_menu; GtkWidget *invisible12; GtkWidget *separator17; GtkWidget *comments; - GtkWidget *image1946; + GtkWidget *image1971; GtkWidget *comments_menu; GtkWidget *add_changelog_entry2; GtkWidget *insert_file_header2; @@ -1980,22 +1970,22 @@ GtkWidget *insert_gpl_notice1; GtkWidget *insert_bsd_license_notice1; GtkWidget *insert_date2; - GtkWidget *image1947; + GtkWidget *image1972; GtkWidget *insert_date2_menu; GtkWidget *invisible10; GtkWidget *insert_include1; - GtkWidget *image1948; + GtkWidget *image1973; GtkWidget *insert_include1_menu; GtkWidget *invisible3; GtkWidget *separator7; GtkWidget *find_usage1; - GtkWidget *image1949; + GtkWidget *image1974; GtkWidget *goto_tag_definition1; GtkWidget *goto_tag_declaration1; GtkWidget *context_action1; GtkWidget *separator15; GtkWidget *go_to_line; - GtkWidget *image1950; + GtkWidget *image1975; GtkAccelGroup *accel_group; GtkTooltips *tooltips;
@@ -2064,14 +2054,10 @@ menu_format2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_format2), menu_format2_menu);
- to_lower_case1 = gtk_menu_item_new_with_mnemonic (_("Convert Selection to _Lower-case")); - gtk_widget_show (to_lower_case1); - gtk_container_add (GTK_CONTAINER (menu_format2_menu), to_lower_case1); + toggle_case1 = gtk_menu_item_new_with_mnemonic (_("T_oggle Case of Selection")); + gtk_widget_show (toggle_case1); + gtk_container_add (GTK_CONTAINER (menu_format2_menu), toggle_case1);
- to_upper_case1 = gtk_menu_item_new_with_mnemonic (_("Convert Selection to _Upper-case")); - gtk_widget_show (to_upper_case1); - gtk_container_add (GTK_CONTAINER (menu_format2_menu), to_upper_case1); - separator30 = gtk_separator_menu_item_new (); gtk_widget_show (separator30); gtk_container_add (GTK_CONTAINER (menu_format2_menu), separator30); @@ -2102,17 +2088,17 @@ gtk_widget_show (menu_increase_indent2); gtk_container_add (GTK_CONTAINER (menu_format2_menu), menu_increase_indent2);
- image1944 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1944); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent2), image1944); + image1969 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1969); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent2), image1969);
menu_decrease_indent2 = gtk_image_menu_item_new_with_mnemonic (_("_Decrease Indent")); gtk_widget_show (menu_decrease_indent2); gtk_container_add (GTK_CONTAINER (menu_format2_menu), menu_decrease_indent2);
- image1945 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1945); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent2), image1945); + image1970 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1970); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent2), image1970);
separator38 = gtk_separator_menu_item_new (); gtk_widget_show (separator38); @@ -2138,9 +2124,9 @@ gtk_widget_show (comments); gtk_container_add (GTK_CONTAINER (edit_menu1), comments);
- image1946 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1946); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image1946); + image1971 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1971); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image1971);
comments_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (comments), comments_menu); @@ -2179,9 +2165,9 @@ gtk_widget_show (insert_date2); gtk_container_add (GTK_CONTAINER (edit_menu1), insert_date2);
- image1947 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1947); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date2), image1947); + image1972 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1972); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date2), image1972);
insert_date2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date2), insert_date2_menu); @@ -2193,9 +2179,9 @@ gtk_widget_show (insert_include1); gtk_container_add (GTK_CONTAINER (edit_menu1), insert_include1);
- image1948 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1948); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image1948); + image1973 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1973); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image1973);
insert_include1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include1), insert_include1_menu); @@ -2212,9 +2198,9 @@ gtk_widget_show (find_usage1); gtk_container_add (GTK_CONTAINER (edit_menu1), find_usage1);
- image1949 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1949); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image1949); + image1974 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1974); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image1974);
goto_tag_definition1 = gtk_menu_item_new_with_mnemonic (_("Go to Tag Definition")); gtk_widget_show (goto_tag_definition1); @@ -2238,9 +2224,9 @@ gtk_container_add (GTK_CONTAINER (edit_menu1), go_to_line); gtk_tooltips_set_tip (tooltips, go_to_line, _("Go to the entered line"), NULL);
- image1950 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image1950); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image1950); + image1975 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image1975); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image1975);
g_signal_connect ((gpointer) undo1, "activate", G_CALLBACK (on_undo1_activate), @@ -2266,12 +2252,9 @@ g_signal_connect ((gpointer) menu_open_selected_file2, "activate", G_CALLBACK (on_menu_open_selected_file1_activate), NULL); - g_signal_connect ((gpointer) to_lower_case1, "activate", - G_CALLBACK (on_to_lower_case1_activate), + g_signal_connect ((gpointer) toggle_case1, "activate", + G_CALLBACK (on_toggle_case1_activate), NULL); - g_signal_connect ((gpointer) to_upper_case1, "activate", - G_CALLBACK (on_to_upper_case1_activate), - NULL); g_signal_connect ((gpointer) menu_comment_line2, "activate", G_CALLBACK (on_menu_comment_line1_activate), NULL); @@ -2340,8 +2323,7 @@ GLADE_HOOKUP_OBJECT (edit_menu1, separator36, "separator36"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_format2, "menu_format2"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_format2_menu, "menu_format2_menu"); - GLADE_HOOKUP_OBJECT (edit_menu1, to_lower_case1, "to_lower_case1"); - GLADE_HOOKUP_OBJECT (edit_menu1, to_upper_case1, "to_upper_case1"); + GLADE_HOOKUP_OBJECT (edit_menu1, toggle_case1, "toggle_case1"); GLADE_HOOKUP_OBJECT (edit_menu1, separator30, "separator30"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_comment_line2, "menu_comment_line2"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_uncomment_line2, "menu_uncomment_line2"); @@ -2349,16 +2331,16 @@ GLADE_HOOKUP_OBJECT (edit_menu1, menu_duplicate_line2, "menu_duplicate_line2"); GLADE_HOOKUP_OBJECT (edit_menu1, separator31, "separator31"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_increase_indent2, "menu_increase_indent2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1944, "image1944"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1969, "image1969"); GLADE_HOOKUP_OBJECT (edit_menu1, menu_decrease_indent2, "menu_decrease_indent2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1945, "image1945"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1970, "image1970"); GLADE_HOOKUP_OBJECT (edit_menu1, separator38, "separator38"); GLADE_HOOKUP_OBJECT (edit_menu1, send_selection_to1, "send_selection_to1"); 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, separator17, "separator17"); GLADE_HOOKUP_OBJECT (edit_menu1, comments, "comments"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1946, "image1946"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1971, "image1971"); GLADE_HOOKUP_OBJECT (edit_menu1, comments_menu, "comments_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, add_changelog_entry2, "add_changelog_entry2"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_file_header2, "insert_file_header2"); @@ -2367,22 +2349,22 @@ GLADE_HOOKUP_OBJECT (edit_menu1, insert_gpl_notice1, "insert_gpl_notice1"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_bsd_license_notice1, "insert_bsd_license_notice1"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_date2, "insert_date2"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1947, "image1947"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1972, "image1972"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_date2_menu, "insert_date2_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible10, "invisible10"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1, "insert_include1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1948, "image1948"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1973, "image1973"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1_menu, "insert_include1_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible3, "invisible3"); GLADE_HOOKUP_OBJECT (edit_menu1, separator7, "separator7"); GLADE_HOOKUP_OBJECT (edit_menu1, find_usage1, "find_usage1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1949, "image1949"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1974, "image1974"); GLADE_HOOKUP_OBJECT (edit_menu1, goto_tag_definition1, "goto_tag_definition1"); GLADE_HOOKUP_OBJECT (edit_menu1, goto_tag_declaration1, "goto_tag_declaration1"); GLADE_HOOKUP_OBJECT (edit_menu1, context_action1, "context_action1"); GLADE_HOOKUP_OBJECT (edit_menu1, separator15, "separator15"); GLADE_HOOKUP_OBJECT (edit_menu1, go_to_line, "go_to_line"); - GLADE_HOOKUP_OBJECT (edit_menu1, image1950, "image1950"); + GLADE_HOOKUP_OBJECT (edit_menu1, image1975, "image1975"); GLADE_HOOKUP_OBJECT_NO_REF (edit_menu1, tooltips, "tooltips");
gtk_menu_set_accel_group (GTK_MENU (edit_menu1), accel_group);
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/keybindings.c 2007-09-07 19:01:55 UTC (rev 1860) @@ -258,10 +258,8 @@ GDK_x, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "edit_cutline", _("Cut current line(s)")); keys[GEANY_KEYS_EDIT_TRANSPOSELINE] = fill(cb_func_edit, GDK_t, GDK_CONTROL_MASK, "edit_transposeline", _("Transpose current line")); - keys[GEANY_KEYS_EDIT_TOLOWERCASE] = fill(cb_func_edit, - GDK_u, GDK_CONTROL_MASK, "edit_tolowercase", _("Convert Selection to lower-case")); - keys[GEANY_KEYS_EDIT_TOUPPERCASE] = fill(cb_func_edit, - GDK_u, GDK_SHIFT_MASK | GDK_CONTROL_MASK, "edit_touppercase", _("Convert Selection to upper-case")); + keys[GEANY_KEYS_EDIT_TOGGLECASE] = fill(cb_func_edit, + GDK_u, GDK_CONTROL_MASK | GDK_MOD1_MASK, "edit_togglecase", _("Toggle Case of Selection")); keys[GEANY_KEYS_EDIT_COMMENTLINETOGGLE] = fill(cb_func_edit, GDK_e, GDK_CONTROL_MASK, "edit_commentlinetoggle", _("Toggle line commentation")); keys[GEANY_KEYS_EDIT_COMMENTLINE] = fill(cb_func_edit, @@ -359,7 +357,7 @@ keys[GEANY_KEYS_MENU_OPENCOLORCHOOSER]->section = _("Tools menu"); keys[GEANY_KEYS_MENU_HELP]->section = _("Help menu"); keys[GEANY_KEYS_SWITCH_EDITOR]->section = _("Focus commands"); - keys[GEANY_KEYS_EDIT_TOLOWERCASE]->section = _("Editing commands"); + keys[GEANY_KEYS_EDIT_TOGGLECASE]->section = _("Editing commands"); keys[GEANY_KEYS_EDIT_AUTOCOMPLETE]->section = _("Tag commands");
g_free(configfile); @@ -420,8 +418,7 @@ GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FOLDALL, menu_fold_all1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_UNFOLDALL, menu_unfold_all1); //~ GEANY_ADD_ACCEL(GEANY_KEYS_MENU_INSERTSPECIALCHARS, menu_insert_special_chars1); - GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_TOLOWERCASE, menu_to_lower_case2); - GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_TOUPPERCASE, menu_to_upper_case2); + GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_TOGGLECASE, menu_toggle_case2); GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_COMMENTLINE, menu_comment_line1); GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_UNCOMMENTLINE, menu_uncomment_line1); GEANY_ADD_ACCEL(GEANY_KEYS_EDIT_COMMENTLINETOGGLE, menu_toggle_line_commentation1); @@ -439,8 +436,7 @@ GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_POPUP_GOTOTAGDECLARATION, goto_tag_declaration1); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_POPUP_CONTEXTACTION, context_action1); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_MENU_GOTOLINE, go_to_line); - GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_TOLOWERCASE, to_lower_case1); - GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_TOUPPERCASE, to_upper_case1); + GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_TOGGLECASE, toggle_case1); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_COMMENTLINE, menu_comment_line2); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_UNCOMMENTLINE, menu_uncomment_line2); GEANY_ADD_POPUP_ACCEL(GEANY_KEYS_EDIT_COMMENTLINETOGGLE, menu_toggle_line_commentation2); @@ -1236,12 +1232,9 @@ case GEANY_KEYS_EDIT_AUTOINDENT: editor_auto_line_indentation(idx, -1); break; - case GEANY_KEYS_EDIT_TOLOWERCASE: - on_to_lower_case1_activate(NULL, NULL); + case GEANY_KEYS_EDIT_TOGGLECASE: + on_toggle_case1_activate(NULL, NULL); break; - case GEANY_KEYS_EDIT_TOUPPERCASE: - on_to_upper_case1_activate(NULL, NULL); - break; case GEANY_KEYS_EDIT_SENDTOCMD1: if (ui_prefs.custom_commands && g_strv_length(ui_prefs.custom_commands) > 0) tools_execute_custom_command(idx, ui_prefs.custom_commands[0]);
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/keybindings.h 2007-09-07 19:01:55 UTC (rev 1860) @@ -117,8 +117,7 @@ GEANY_KEYS_NAV_FORWARD, GEANY_KEYS_NAV_BACK,
- GEANY_KEYS_EDIT_TOLOWERCASE, - GEANY_KEYS_EDIT_TOUPPERCASE, + GEANY_KEYS_EDIT_TOGGLECASE, GEANY_KEYS_EDIT_DUPLICATELINE, GEANY_KEYS_EDIT_DELETELINE, GEANY_KEYS_EDIT_COPYLINE,
Modified: trunk/src/ui_utils.h =================================================================== --- trunk/src/ui_utils.h 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/ui_utils.h 2007-09-07 19:01:55 UTC (rev 1860) @@ -54,8 +54,8 @@ GtkWidget *recent_files_toolbar; GtkWidget *menu_insert_include_items[2]; GtkWidget *popup_goto_items[3]; - GtkWidget *popup_items[5]; - GtkWidget *menu_copy_items[5]; + GtkWidget *popup_items[4]; + GtkWidget *menu_copy_items[4]; GtkWidget *redo_items[3]; GtkWidget *undo_items[3]; GtkWidget *save_buttons[4];
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/utils.c 2007-09-07 19:01:55 UTC (rev 1860) @@ -1600,3 +1600,21 @@ }
+/* returns TRUE if any letter in str is a capital, FALSE otherwise. Should be Unicode safe. */ +gboolean utils_str_has_upper(const gchar *str) +{ + gunichar c; + + if (str == NULL || *str == '\0' || ! g_utf8_validate(str, -1, NULL)) + return FALSE; + + while (*str != '\0') + { + c = g_utf8_get_char(str); + // check only letters and stop once the first non-capital was found + if (g_unichar_isalpha(c) && g_unichar_isupper(c)) + return TRUE; + str = g_utf8_next_char(str); + } + return FALSE; +}
Modified: trunk/src/utils.h =================================================================== --- trunk/src/utils.h 2007-09-07 16:45:17 UTC (rev 1859) +++ trunk/src/utils.h 2007-09-07 19:01:55 UTC (rev 1860) @@ -174,4 +174,6 @@ /* Gets a sorted list of files in the specified directory. */ GSList *utils_get_file_list(const gchar *path, guint *length, GError **error);
+gboolean utils_str_has_upper(const gchar *str); + #endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.