Revision: 510 Author: eht16 Date: 2006-06-30 06:42:53 -0700 (Fri, 30 Jun 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=510&view=rev
Log Message: ----------- Added "Select All" menu item.
Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c trunk/src/sciwrappers.c trunk/src/sciwrappers.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/ChangeLog 2006-06-30 13:42:53 UTC (rev 510) @@ -6,6 +6,8 @@ Process the switch_page callback only once. * src/callbacks.c: Finally fixed the second call of the switch_page callback. + * geany.glade, src/interface.c, src/callbacks.c, src/sci_wrappers.c: + Added "Select All" menu item.
2006-06-29 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/geany.glade 2006-06-30 13:42:53 UTC (rev 510) @@ -57,7 +57,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image754"> + <widget class="GtkImage" id="image791"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -150,7 +150,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="image755"> + <widget class="GtkImage" id="image792"> <property name="visible">True</property> <property name="stock">gtk-save</property> <property name="icon_size">1</property> @@ -227,7 +227,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="image756"> + <widget class="GtkImage" id="image793"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -337,13 +337,28 @@ </child>
<child> + <widget class="GtkMenuItem" id="menu_select_all1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Select _All</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_menu_select_all1_activate" last_modification_time="Fri, 30 Jun 2006 13:25:08 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkSeparatorMenuItem" id="separator25"> + <property name="visible">True</property> + </widget> + </child> + + <child> <widget class="GtkImageMenuItem" id="insert_include2"> <property name="visible">True</property> <property name="label" translatable="yes">Insert "include <...>"</property> <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image757"> + <widget class="GtkImage" id="image794"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -375,7 +390,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image758"> + <widget class="GtkImage" id="image795"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -553,7 +568,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="image759"> + <widget class="GtkImage" id="image796"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -580,7 +595,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="image760"> + <widget class="GtkImage" id="image797"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -615,7 +630,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="image761"> + <widget class="GtkImage" id="image798"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -637,7 +652,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="image762"> + <widget class="GtkImage" id="image799"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -2000,6 +2015,21 @@ </child>
<child> + <widget class="GtkMenuItem" id="menu_select_all2"> + <property name="visible">True</property> + <property name="label" translatable="yes">Select _All</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_menu_select_all1_activate" last_modification_time="Fri, 30 Jun 2006 13:35:07 GMT"/> + </widget> + </child> + + <child> + <widget class="GtkSeparatorMenuItem" id="separator26"> + <property name="visible">True</property> + </widget> + </child> + + <child> <widget class="GtkImageMenuItem" id="zoom_in1"> <property name="visible">True</property> <property name="label">gtk-zoom-in</property> @@ -2039,7 +2069,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image686"> + <widget class="GtkImage" id="image787"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2071,7 +2101,7 @@ <property name="use_underline">True</property>
<child internal-child="image"> - <widget class="GtkImage" id="image687"> + <widget class="GtkImage" id="image788"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -2190,7 +2220,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="image688"> + <widget class="GtkImage" id="image789"> <property name="visible">True</property> <property name="stock">gtk-find</property> <property name="icon_size">1</property> @@ -2236,7 +2266,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="image689"> + <widget class="GtkImage" id="image790"> <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 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/src/callbacks.c 2006-06-30 13:42:53 UTC (rev 510) @@ -2450,3 +2450,16 @@
document_print(idx); } + + +void +on_menu_select_all1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + gint idx = document_get_cur_idx(); + + if (idx < 0 || ! doc_list[idx].is_valid) return; + + sci_select_all(doc_list[idx].sci); +} +
Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/src/callbacks.h 2006-06-30 13:42:53 UTC (rev 510) @@ -586,3 +586,7 @@ void on_print1_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_menu_select_all1_activate (GtkMenuItem *menuitem, + gpointer user_data);
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/src/interface.c 2006-06-30 13:42:53 UTC (rev 510) @@ -37,7 +37,7 @@ GtkWidget *menuitem1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image754; + GtkWidget *image791; GtkWidget *menu_new_with_template1_menu; GtkWidget *invisible2; GtkWidget *separator12; @@ -49,7 +49,7 @@ GtkWidget *menu_save1; GtkWidget *menu_save_as1; GtkWidget *menu_save_all1; - GtkWidget *image755; + GtkWidget *image792; GtkWidget *revert1; GtkWidget *separator21; GtkWidget *preferences2; @@ -58,7 +58,7 @@ GtkWidget *separator14; GtkWidget *menu_close1; GtkWidget *menu_close_all1; - GtkWidget *image756; + GtkWidget *image793; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -71,12 +71,14 @@ GtkWidget *menu_paste1; GtkWidget *menu_delete1; GtkWidget *menu_seperator2; + GtkWidget *menu_select_all1; + GtkWidget *separator25; GtkWidget *insert_include2; - GtkWidget *image757; + GtkWidget *image794; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *add_comments1; - GtkWidget *image758; + GtkWidget *image795; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -97,16 +99,16 @@ GtkWidget *find_next1; GtkWidget *find_previous1; GtkWidget *replace1; - GtkWidget *image759; + GtkWidget *image796; GtkWidget *separator11; GtkWidget *go_to_line1; - GtkWidget *image760; + GtkWidget *image797; GtkWidget *menuitem3; GtkWidget *menuitem3_menu; GtkWidget *menu_change_font1; - GtkWidget *image761; + GtkWidget *image798; GtkWidget *menu_choose_color1; - GtkWidget *image762; + GtkWidget *image799; GtkWidget *menu_separator4; GtkWidget *menu_fullscreen1; GtkWidget *menu_show_messages_window1; @@ -237,9 +239,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_new_with_template1);
- image754 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image754); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image754); + image791 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image791); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image791);
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); @@ -284,9 +286,9 @@ gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_save_all1); gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL);
- image755 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image755); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image755); + image792 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image792); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image792);
revert1 = gtk_image_menu_item_new_from_stock ("gtk-revert-to-saved", accel_group); gtk_widget_show (revert1); @@ -325,9 +327,9 @@ gtk_container_add (GTK_CONTAINER (menuitem1_menu), menu_close_all1); gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL);
- image756 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image756); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image756); + image793 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image793); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image793);
menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -380,13 +382,22 @@ gtk_container_add (GTK_CONTAINER (edit1_menu), menu_seperator2); gtk_widget_set_sensitive (menu_seperator2, FALSE);
+ menu_select_all1 = gtk_menu_item_new_with_mnemonic (_("Select _All")); + gtk_widget_show (menu_select_all1); + gtk_container_add (GTK_CONTAINER (edit1_menu), menu_select_all1); + + separator25 = gtk_separator_menu_item_new (); + gtk_widget_show (separator25); + gtk_container_add (GTK_CONTAINER (edit1_menu), separator25); + gtk_widget_set_sensitive (separator25, FALSE); + insert_include2 = gtk_image_menu_item_new_with_mnemonic (_("Insert "include <...>"")); gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2);
- image757 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image757); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image757); + image794 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image794); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image794);
insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -398,9 +409,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1);
- image758 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image758); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image758); + image795 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image795); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image795);
add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -487,9 +498,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1);
- image759 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image759); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image759); + image796 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image796); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image796);
separator11 = gtk_separator_menu_item_new (); gtk_widget_show (separator11); @@ -500,9 +511,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1);
- image760 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image760); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image760); + image797 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image797); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image797);
menuitem3 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menuitem3); @@ -516,18 +527,18 @@ gtk_container_add (GTK_CONTAINER (menuitem3_menu), menu_change_font1); gtk_tooltips_set_tip (tooltips, menu_change_font1, _("Change the default font"), NULL);
- image761 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image761); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image761); + image798 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image798); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image798);
menu_choose_color1 = gtk_image_menu_item_new_with_mnemonic (_("Show _Colour Chooser")); gtk_widget_show (menu_choose_color1); gtk_container_add (GTK_CONTAINER (menuitem3_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);
- image762 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image762); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image762); + image799 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image799); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image799);
menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -1025,6 +1036,9 @@ g_signal_connect ((gpointer) menu_delete1, "activate", G_CALLBACK (on_delete1_activate), NULL); + g_signal_connect ((gpointer) menu_select_all1, "activate", + G_CALLBACK (on_menu_select_all1_activate), + NULL); g_signal_connect ((gpointer) menu_add_changelog_entry1, "activate", G_CALLBACK (on_comments_changelog_activate), NULL); @@ -1212,7 +1226,7 @@ GLADE_HOOKUP_OBJECT (window1, menuitem1_menu, "menuitem1_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, image754, "image754"); + GLADE_HOOKUP_OBJECT (window1, image791, "image791"); 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"); @@ -1224,7 +1238,7 @@ 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, image755, "image755"); + GLADE_HOOKUP_OBJECT (window1, image792, "image792"); GLADE_HOOKUP_OBJECT (window1, revert1, "revert1"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); GLADE_HOOKUP_OBJECT (window1, preferences2, "preferences2"); @@ -1233,7 +1247,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, image756, "image756"); + GLADE_HOOKUP_OBJECT (window1, image793, "image793"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1246,12 +1260,14 @@ GLADE_HOOKUP_OBJECT (window1, menu_paste1, "menu_paste1"); GLADE_HOOKUP_OBJECT (window1, menu_delete1, "menu_delete1"); GLADE_HOOKUP_OBJECT (window1, menu_seperator2, "menu_seperator2"); + GLADE_HOOKUP_OBJECT (window1, menu_select_all1, "menu_select_all1"); + GLADE_HOOKUP_OBJECT (window1, separator25, "separator25"); GLADE_HOOKUP_OBJECT (window1, insert_include2, "insert_include2"); - GLADE_HOOKUP_OBJECT (window1, image757, "image757"); + GLADE_HOOKUP_OBJECT (window1, image794, "image794"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, add_comments1, "add_comments1"); - GLADE_HOOKUP_OBJECT (window1, image758, "image758"); + GLADE_HOOKUP_OBJECT (window1, image795, "image795"); 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"); @@ -1272,16 +1288,16 @@ GLADE_HOOKUP_OBJECT (window1, find_next1, "find_next1"); GLADE_HOOKUP_OBJECT (window1, find_previous1, "find_previous1"); GLADE_HOOKUP_OBJECT (window1, replace1, "replace1"); - GLADE_HOOKUP_OBJECT (window1, image759, "image759"); + GLADE_HOOKUP_OBJECT (window1, image796, "image796"); GLADE_HOOKUP_OBJECT (window1, separator11, "separator11"); GLADE_HOOKUP_OBJECT (window1, go_to_line1, "go_to_line1"); - GLADE_HOOKUP_OBJECT (window1, image760, "image760"); + GLADE_HOOKUP_OBJECT (window1, image797, "image797"); GLADE_HOOKUP_OBJECT (window1, menuitem3, "menuitem3"); GLADE_HOOKUP_OBJECT (window1, menuitem3_menu, "menuitem3_menu"); GLADE_HOOKUP_OBJECT (window1, menu_change_font1, "menu_change_font1"); - GLADE_HOOKUP_OBJECT (window1, image761, "image761"); + GLADE_HOOKUP_OBJECT (window1, image798, "image798"); GLADE_HOOKUP_OBJECT (window1, menu_choose_color1, "menu_choose_color1"); - GLADE_HOOKUP_OBJECT (window1, image762, "image762"); + GLADE_HOOKUP_OBJECT (window1, image799, "image799"); GLADE_HOOKUP_OBJECT (window1, menu_separator4, "menu_separator4"); GLADE_HOOKUP_OBJECT (window1, menu_fullscreen1, "menu_fullscreen1"); GLADE_HOOKUP_OBJECT (window1, menu_show_messages_window1, "menu_show_messages_window1"); @@ -1491,16 +1507,18 @@ GtkWidget *paste1; GtkWidget *delete1; GtkWidget *separator3; + GtkWidget *menu_select_all2; + GtkWidget *separator26; GtkWidget *zoom_in1; GtkWidget *zoom_out1; GtkWidget *normal_size2; GtkWidget *separator6; GtkWidget *insert_include1; - GtkWidget *image686; + GtkWidget *image787; GtkWidget *insert_include1_menu; GtkWidget *invisible3; GtkWidget *comments; - GtkWidget *image687; + GtkWidget *image788; GtkWidget *comments_menu; GtkWidget *add_changelog_entry2; GtkWidget *insert_file_header2; @@ -1514,12 +1532,12 @@ GtkWidget *to_upper_case1; GtkWidget *separator7; GtkWidget *find_usage1; - GtkWidget *image688; + GtkWidget *image789; GtkWidget *goto_tag_definition1; GtkWidget *goto_tag_declaration1; GtkWidget *separator15; GtkWidget *go_to_line; - GtkWidget *image689; + GtkWidget *image790; GtkAccelGroup *accel_group; GtkTooltips *tooltips;
@@ -1563,6 +1581,15 @@ gtk_container_add (GTK_CONTAINER (edit_menu1), separator3); gtk_widget_set_sensitive (separator3, FALSE);
+ menu_select_all2 = gtk_menu_item_new_with_mnemonic (_("Select _All")); + gtk_widget_show (menu_select_all2); + gtk_container_add (GTK_CONTAINER (edit_menu1), menu_select_all2); + + separator26 = gtk_separator_menu_item_new (); + gtk_widget_show (separator26); + gtk_container_add (GTK_CONTAINER (edit_menu1), separator26); + gtk_widget_set_sensitive (separator26, FALSE); + zoom_in1 = gtk_image_menu_item_new_from_stock ("gtk-zoom-in", accel_group); gtk_widget_show (zoom_in1); gtk_container_add (GTK_CONTAINER (edit_menu1), zoom_in1); @@ -1584,9 +1611,9 @@ gtk_widget_show (insert_include1); gtk_container_add (GTK_CONTAINER (edit_menu1), insert_include1);
- image686 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image686); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image686); + image787 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image787); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include1), image787);
insert_include1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include1), insert_include1_menu); @@ -1598,9 +1625,9 @@ gtk_widget_show (comments); gtk_container_add (GTK_CONTAINER (edit_menu1), comments);
- image687 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image687); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image687); + image788 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image788); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (comments), image788);
comments_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (comments), comments_menu); @@ -1659,9 +1686,9 @@ gtk_widget_show (find_usage1); gtk_container_add (GTK_CONTAINER (edit_menu1), find_usage1);
- image688 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); - gtk_widget_show (image688); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image688); + image789 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_MENU); + gtk_widget_show (image789); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (find_usage1), image789);
goto_tag_definition1 = gtk_menu_item_new_with_mnemonic (_("Go to tag definition")); gtk_widget_show (goto_tag_definition1); @@ -1681,9 +1708,9 @@ gtk_container_add (GTK_CONTAINER (edit_menu1), go_to_line); gtk_tooltips_set_tip (tooltips, go_to_line, _("Goto to the entered line"), NULL);
- image689 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image689); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image689); + image790 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image790); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line), image790);
g_signal_connect ((gpointer) undo1, "activate", G_CALLBACK (on_undo1_activate), @@ -1703,6 +1730,9 @@ g_signal_connect ((gpointer) delete1, "activate", G_CALLBACK (on_delete1_activate), NULL); + g_signal_connect ((gpointer) menu_select_all2, "activate", + G_CALLBACK (on_menu_select_all1_activate), + NULL); g_signal_connect ((gpointer) zoom_in1, "activate", G_CALLBACK (on_zoom_in1_activate), NULL); @@ -1756,16 +1786,18 @@ GLADE_HOOKUP_OBJECT (edit_menu1, paste1, "paste1"); GLADE_HOOKUP_OBJECT (edit_menu1, delete1, "delete1"); GLADE_HOOKUP_OBJECT (edit_menu1, separator3, "separator3"); + GLADE_HOOKUP_OBJECT (edit_menu1, menu_select_all2, "menu_select_all2"); + GLADE_HOOKUP_OBJECT (edit_menu1, separator26, "separator26"); GLADE_HOOKUP_OBJECT (edit_menu1, zoom_in1, "zoom_in1"); GLADE_HOOKUP_OBJECT (edit_menu1, zoom_out1, "zoom_out1"); GLADE_HOOKUP_OBJECT (edit_menu1, normal_size2, "normal_size2"); GLADE_HOOKUP_OBJECT (edit_menu1, separator6, "separator6"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1, "insert_include1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image686, "image686"); + GLADE_HOOKUP_OBJECT (edit_menu1, image787, "image787"); GLADE_HOOKUP_OBJECT (edit_menu1, insert_include1_menu, "insert_include1_menu"); GLADE_HOOKUP_OBJECT (edit_menu1, invisible3, "invisible3"); GLADE_HOOKUP_OBJECT (edit_menu1, comments, "comments"); - GLADE_HOOKUP_OBJECT (edit_menu1, image687, "image687"); + GLADE_HOOKUP_OBJECT (edit_menu1, image788, "image788"); 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"); @@ -1779,12 +1811,12 @@ GLADE_HOOKUP_OBJECT (edit_menu1, to_upper_case1, "to_upper_case1"); GLADE_HOOKUP_OBJECT (edit_menu1, separator7, "separator7"); GLADE_HOOKUP_OBJECT (edit_menu1, find_usage1, "find_usage1"); - GLADE_HOOKUP_OBJECT (edit_menu1, image688, "image688"); + GLADE_HOOKUP_OBJECT (edit_menu1, image789, "image789"); 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, separator15, "separator15"); GLADE_HOOKUP_OBJECT (edit_menu1, go_to_line, "go_to_line"); - GLADE_HOOKUP_OBJECT (edit_menu1, image689, "image689"); + GLADE_HOOKUP_OBJECT (edit_menu1, image790, "image790"); GLADE_HOOKUP_OBJECT_NO_REF (edit_menu1, tooltips, "tooltips");
gtk_menu_set_accel_group (GTK_MENU (edit_menu1), accel_group);
Modified: trunk/src/sciwrappers.c =================================================================== --- trunk/src/sciwrappers.c 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/src/sciwrappers.c 2006-06-30 13:42:53 UTC (rev 510) @@ -795,10 +795,10 @@ { gint start = SSM(sci, SCI_GETSELECTIONSTART, 0, 0); gint end = SSM(sci, SCI_GETSELECTIONEND, 0, 0); - + if (start == end) return 0; // no selection - + return SSM(sci, SCI_LINEFROMPOSITION, end, 0) - SSM(sci, SCI_LINEFROMPOSITION, start, 0) + 1; }
@@ -811,3 +811,9 @@ { SSM(sci, SCI_STARTSTYLING, pos, mask); } + +void sci_select_all(ScintillaObject *sci) +{ + SSM(sci, SCI_SELECTALL, 0, 0); +} +
Modified: trunk/src/sciwrappers.h =================================================================== --- trunk/src/sciwrappers.h 2006-06-30 12:56:09 UTC (rev 509) +++ trunk/src/sciwrappers.h 2006-06-30 13:42:53 UTC (rev 510) @@ -149,6 +149,7 @@ gint sci_get_lines_selected (ScintillaObject * sci); void sci_set_styling (ScintillaObject * sci, gint len, gint style); void sci_start_styling (ScintillaObject * sci, gint pos, gint mask); +void sci_select_all (ScintillaObject * sci);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.