lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
June 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
3 participants
109 discussions
Start a n
N
ew thread
SF.net SVN: geany: [2729] trunk
by ntrel@users.sourceforge.net
27 Jun '08
27 Jun '08
Revision: 2729
http://geany.svn.sourceforge.net/geany/?rev=2729&view=rev
Author: ntrel Date: 2008-06-27 10:30:14 -0700 (Fri, 27 Jun 2008) Log Message: ----------- Add 'Close Other Documents' File menu command (#1976724). Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-26 16:39:41 UTC (rev 2728) +++ trunk/ChangeLog 2008-06-27 17:30:14 UTC (rev 2729) @@ -1,3 +1,9 @@ +2008-06-27 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/interface.c, src/callbacks.c, src/callbacks.h, geany.glade: + Add 'Close Other Documents' File menu command (#1976724). + + 2008-06-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/vte.c, src/vte.h: Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2008-06-26 16:39:41 UTC (rev 2728) +++ trunk/geany.glade 2008-06-27 17:30:14 UTC (rev 2729) @@ -58,7 +58,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2443"> + <widget class="GtkImage" id="image2511"> <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="image2444"> + <widget class="GtkImage" id="image2512"> <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="image2445"> + <widget class="GtkImage" id="image2513"> <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="image2446"> + <widget class="GtkImage" id="image2514"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -270,6 +270,27 @@ </child> <child> + <widget class="GtkImageMenuItem" id="close_other_documents1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Close Ot_her Documents</property> + <property name="use_underline">True</property> + <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="image2515"> + <property name="visible">True</property> + <property name="stock">gtk-close</property> + <property name="icon_size">1</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + </child> + </widget> + </child> + + <child> <widget class="GtkImageMenuItem" id="menu_close_all1"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Closes all open files</property> @@ -278,7 +299,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="image2447"> + <widget class="GtkImage" id="image2516"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -477,7 +498,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="image2448"> + <widget class="GtkImage" id="image2517"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -498,7 +519,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="image2449"> + <widget class="GtkImage" id="image2518"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -554,7 +575,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2450"> + <widget class="GtkImage" id="image2519"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -639,7 +660,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2451"> + <widget class="GtkImage" id="image2520"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -671,7 +692,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2452"> + <widget class="GtkImage" id="image2521"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -769,7 +790,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="image2453"> + <widget class="GtkImage" id="image2522"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -844,7 +865,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="image2454"> + <widget class="GtkImage" id="image2523"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -879,7 +900,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="image2455"> + <widget class="GtkImage" id="image2524"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -1308,7 +1329,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="image2456"> + <widget class="GtkImage" id="image2525"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -1329,7 +1350,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="image2457"> + <widget class="GtkImage" id="image2526"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -1350,7 +1371,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="image2458"> + <widget class="GtkImage" id="image2527"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -1409,7 +1430,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="image2459"> + <widget class="GtkImage" id="image2528"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -1463,7 +1484,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="image2460"> + <widget class="GtkImage" id="image2529"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2008-06-26 16:39:41 UTC (rev 2728) +++ trunk/src/callbacks.c 2008-06-27 17:30:14 UTC (rev 2729) @@ -2182,3 +2182,26 @@ gtk_widget_set_sensitive(previous_message, have_messages); } + +/* simple implementation (vs. close all which doesn't close documents if cancelled) */ +void +on_close_other_documents1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + guint i; + GeanyDocument *cur_doc = document_get_current(); + + for (i = 0; i < documents_array->len; i++) + { + GeanyDocument *doc = documents[i]; + gint page; + + if (doc == cur_doc || ! doc->is_valid) + continue; + + page = document_get_notebook_page(doc); + if (! document_remove_page(page)) + break; + } +} + Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2008-06-26 16:39:41 UTC (rev 2728) +++ trunk/src/callbacks.h 2008-06-27 17:30:14 UTC (rev 2729) @@ -614,3 +614,7 @@ void on_search1_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_close_other_documents1_activate (GtkMenuItem *menuitem, + gpointer user_data); Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2008-06-26 16:39:41 UTC (rev 2728) +++ trunk/src/interface.c 2008-06-27 17:30:14 UTC (rev 2729) @@ -37,7 +37,7 @@ GtkWidget *file1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image2443; + GtkWidget *image2511; 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 *image2444; + GtkWidget *image2512; GtkWidget *menu_reload1; - GtkWidget *image2445; + GtkWidget *image2513; GtkWidget *menu_reload_as1; - GtkWidget *image2446; + GtkWidget *image2514; GtkWidget *menu_reload_as1_menu; GtkWidget *invisible7; GtkWidget *separator21; @@ -62,8 +62,10 @@ GtkWidget *print1; GtkWidget *separator14; GtkWidget *menu_close1; + GtkWidget *close_other_documents1; + GtkWidget *image2515; GtkWidget *menu_close_all1; - GtkWidget *image2447; + GtkWidget *image2516; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -88,16 +90,16 @@ GtkWidget *menu_duplicate_line1; GtkWidget *separator29; GtkWidget *menu_increase_indent1; - GtkWidget *image2448; + GtkWidget *image2517; GtkWidget *menu_decrease_indent1; - GtkWidget *image2449; + GtkWidget *image2518; GtkWidget *separator37; GtkWidget *send_selection_to2; GtkWidget *send_selection_to2_menu; GtkWidget *invisible13; GtkWidget *separator18; GtkWidget *add_comments1; - GtkWidget *image2450; + GtkWidget *image2519; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -106,11 +108,11 @@ GtkWidget *insert_gpl_notice2; GtkWidget *insert_bsd_license_notice2; GtkWidget *insert_date1; - GtkWidget *image2451; + GtkWidget *image2520; GtkWidget *insert_date1_menu; GtkWidget *invisible8; GtkWidget *insert_include2; - GtkWidget *image2452; + GtkWidget *image2521; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *separator9; @@ -122,7 +124,7 @@ GtkWidget *find_previous1; GtkWidget *find_in_files1; GtkWidget *replace1; - GtkWidget *image2453; + GtkWidget *image2522; GtkWidget *separator33; GtkWidget *find_nextsel1; GtkWidget *find_prevsel1; @@ -131,11 +133,11 @@ GtkWidget *previous_message1; GtkWidget *separator32; GtkWidget *go_to_line1; - GtkWidget *image2454; + GtkWidget *image2523; GtkWidget *menu_view1; GtkWidget *menu_view1_menu; GtkWidget *menu_change_font1; - GtkWidget *image2455; + GtkWidget *image2524; GtkWidget *menu_separator4; GtkWidget *menu_toggle_all_additional_widgets1; GtkWidget *menu_fullscreen1; @@ -187,24 +189,24 @@ GtkWidget *menu_project1; GtkWidget *menu_project1_menu; GtkWidget *project_new1; - GtkWidget *image2456; + GtkWidget *image2525; GtkWidget *project_open1; - GtkWidget *image2457; + GtkWidget *image2526; GtkWidget *project_close1; - GtkWidget *image2458; + GtkWidget *image2527; GtkWidget *separator34; GtkWidget *project_properties1; GtkWidget *menu_build1; GtkWidget *tools1; GtkWidget *tools1_menu; GtkWidget *menu_choose_color1; - GtkWidget *image2459; + GtkWidget *image2528; GtkWidget *menu_count_words1; GtkWidget *load_tags1; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *help1; - GtkWidget *image2460; + GtkWidget *image2529; GtkWidget *keyboard_shortcuts1; GtkWidget *website1; GtkWidget *separator16; @@ -307,9 +309,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1); - image2443 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2443); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2443); + image2511 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2511); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2511); 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); @@ -352,25 +354,25 @@ gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1); gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL); - image2444 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2444); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2444); + image2512 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2512); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2512); menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); gtk_widget_show (menu_reload1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1); - image2445 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2445); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2445); + image2513 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2513); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2513); 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); - image2446 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2446); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2446); + image2514 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2514); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2514); menu_reload_as1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); @@ -410,14 +412,22 @@ gtk_widget_show (menu_close1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_close1); + close_other_documents1 = gtk_image_menu_item_new_with_mnemonic (_("Close Ot_her Documents")); + gtk_widget_show (close_other_documents1); + gtk_container_add (GTK_CONTAINER (file1_menu), close_other_documents1); + + image2515 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2515); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (close_other_documents1), image2515); + 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); gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL); - image2447 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2447); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2447); + image2516 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2516); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2516); menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -521,17 +531,17 @@ gtk_widget_show (menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1); - image2448 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2448); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2448); + image2517 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2517); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2517); 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); - image2449 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2449); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2449); + image2518 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2518); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2518); separator37 = gtk_separator_menu_item_new (); gtk_widget_show (separator37); @@ -557,9 +567,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1); - image2450 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2450); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2450); + image2519 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2519); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2519); add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -598,9 +608,9 @@ gtk_widget_show (insert_date1); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1); - image2451 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2451); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2451); + image2520 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2520); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2520); insert_date1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu); @@ -612,9 +622,9 @@ gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2); - image2452 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2452); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2452); + image2521 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2521); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2521); insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -658,9 +668,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1); - image2453 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2453); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2453); + image2522 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2522); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2522); separator33 = gtk_separator_menu_item_new (); gtk_widget_show (separator33); @@ -697,9 +707,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1); - image2454 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2454); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2454); + image2523 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2523); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2523); menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menu_view1); @@ -713,9 +723,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); - image2455 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2455); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2455); + image2524 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2524); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2524); menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -940,25 +950,25 @@ gtk_widget_show (project_new1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1); - image2456 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2456); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2456); + image2525 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2525); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2525); 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); - image2457 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2457); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2457); + image2526 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2526); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2526); 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); - image2458 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2458); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2458); + image2527 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2527); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2527); separator34 = gtk_separator_menu_item_new (); gtk_widget_show (separator34); @@ -985,9 +995,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); - image2459 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2459); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2459); + image2528 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2528); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2528); menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); gtk_widget_show (menu_count_words1); @@ -1010,9 +1020,9 @@ gtk_widget_show (help1); gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1); - image2460 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2460); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2460); + image2529 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2529); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2529); keyboard_shortcuts1 = gtk_menu_item_new_with_mnemonic (_("_Keyboard Shortcuts")); gtk_widget_show (keyboard_shortcuts1); @@ -1379,6 +1389,9 @@ g_signal_connect ((gpointer) menu_close1, "activate", G_CALLBACK (on_close1_activate), NULL); + g_signal_connect ((gpointer) close_other_documents1, "activate", + G_CALLBACK (on_close_other_documents1_activate), + NULL); g_signal_connect ((gpointer) menu_close_all1, "activate", G_CALLBACK (on_close_all1_activate), NULL); @@ -1707,7 +1720,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, image2443, "image2443"); + GLADE_HOOKUP_OBJECT (window1, image2511, "image2511"); 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"); @@ -1718,11 +1731,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, image2444, "image2444"); + GLADE_HOOKUP_OBJECT (window1, image2512, "image2512"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); - GLADE_HOOKUP_OBJECT (window1, image2445, "image2445"); + GLADE_HOOKUP_OBJECT (window1, image2513, "image2513"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); - GLADE_HOOKUP_OBJECT (window1, image2446, "image2446"); + GLADE_HOOKUP_OBJECT (window1, image2514, "image2514"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); @@ -1732,8 +1745,10 @@ GLADE_HOOKUP_OBJECT (window1, print1, "print1"); 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, image2515, "image2515"); GLADE_HOOKUP_OBJECT (window1, menu_close_all1, "menu_close_all1"); - GLADE_HOOKUP_OBJECT (window1, image2447, "image2447"); + GLADE_HOOKUP_OBJECT (window1, image2516, "image2516"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1758,16 +1773,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, image2448, "image2448"); + GLADE_HOOKUP_OBJECT (window1, image2517, "image2517"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2449, "image2449"); + GLADE_HOOKUP_OBJECT (window1, image2518, "image2518"); 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, image2450, "image2450"); + GLADE_HOOKUP_OBJECT (window1, image2519, "image2519"); 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"); @@ -1776,11 +1791,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, image2451, "image2451"); + GLADE_HOOKUP_OBJECT (window1, image2520, "image2520"); 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, image2452, "image2452"); + GLADE_HOOKUP_OBJECT (window1, image2521, "image2521"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, separator9, "separator9"); @@ -1792,7 +1807,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, image2453, "image2453"); + GLADE_HOOKUP_OBJECT (window1, image2522, "image2522"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1"); GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1"); @@ -1801,11 +1816,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, image2454, "image2454"); + GLADE_HOOKUP_OBJECT (window1, image2523, "image2523"); 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, image2455, "image2455"); + GLADE_HOOKUP_OBJECT (window1, image2524, "image2524"); 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"); @@ -1855,24 +1870,24 @@ 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, image2456, "image2456"); + GLADE_HOOKUP_OBJECT (window1, image2525, "image2525"); GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1"); - GLADE_HOOKUP_OBJECT (window1, image2457, "image2457"); + GLADE_HOOKUP_OBJECT (window1, image2526, "image2526"); GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1"); - GLADE_HOOKUP_OBJECT (window1, image2458, "image2458"); + GLADE_HOOKUP_OBJECT (window1, image2527, "image2527"); 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, image2459, "image2459"); + GLADE_HOOKUP_OBJECT (window1, image2528, "image2528"); 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, image2460, "image2460"); + GLADE_HOOKUP_OBJECT (window1, image2529, "image2529"); GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1"); GLADE_HOOKUP_OBJECT (window1, website1, "website1"); GLADE_HOOKUP_OBJECT (window1, separator16, "separator16"); This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2728] trunk
by ntrel@users.sourceforge.net
26 Jun '08
26 Jun '08
Revision: 2728
http://geany.svn.sourceforge.net/geany/?rev=2728&view=rev
Author: ntrel Date: 2008-06-26 09:39:41 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Add keybindings for Previous Message, Previous Error commands (#1931125). Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/keybindings.c trunk/src/keybindings.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/ChangeLog 2008-06-26 16:39:41 UTC (rev 2728) @@ -5,6 +5,9 @@ Call vte_restart() in vte_keypress() as the code is the same. * src/build.c, src/build.h, src/msgwindow.c: Add Previous Error menu item. + * src/build.c, src/keybindings.c, src/keybindings.h: + Add keybindings for Previous Message, Previous Error commands + (#1931125). 2008-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/build.c 2008-06-26 16:39:41 UTC (rev 2728) @@ -1108,7 +1108,7 @@ item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error")); gtk_widget_show(item); - /*GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_, item);*/ + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_PREVIOUSERROR, item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL); menu_items->item_previous_error = item; Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/keybindings.c 2008-06-26 16:39:41 UTC (rev 2728) @@ -324,6 +324,8 @@ LW(find_in_files1)); keybindings_set_item(group, GEANY_KEYS_SEARCH_NEXTMESSAGE, cb_func_search_action, 0, 0, "menu_nextmessage", _("Next Message"), LW(next_message1)); + keybindings_set_item(group, GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, cb_func_search_action, + 0, 0, "menu_previousmessage", _("Previous Message"), LW(previous_message1)); keybindings_set_item(group, GEANY_KEYS_SEARCH_FINDUSAGE, cb_func_search_action, 0, 0, "popup_findusage", _("Find Usage"), NULL); @@ -433,6 +435,8 @@ 0, 0, "build_makeobject", _("Make object"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_NEXTERROR, cb_func_build_action, 0, 0, "build_nexterror", _("Next error"), NULL); + keybindings_set_item(group, GEANY_KEYS_BUILD_PREVIOUSERROR, cb_func_build_action, + 0, 0, "build_previouserror", _("Previous error"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_RUN, cb_func_build_action, GDK_F5, 0, "build_run", _("Run"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_RUN2, cb_func_build_action, @@ -1049,6 +1053,8 @@ on_find_in_files1_activate(NULL, NULL); break; case GEANY_KEYS_SEARCH_NEXTMESSAGE: on_next_message1_activate(NULL, NULL); break; + case GEANY_KEYS_SEARCH_PREVIOUSMESSAGE: + on_previous_message1_activate(NULL, NULL); break; case GEANY_KEYS_SEARCH_FINDUSAGE: if (check_current_word()) on_find_usage1_activate(NULL, NULL); @@ -1119,6 +1125,9 @@ case GEANY_KEYS_BUILD_NEXTERROR: item = menu_items->item_next_error; break; + case GEANY_KEYS_BUILD_PREVIOUSERROR: + item = menu_items->item_previous_error; + break; case GEANY_KEYS_BUILD_RUN: item = menu_items->item_exec; break; Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/keybindings.h 2008-06-26 16:39:41 UTC (rev 2728) @@ -71,8 +71,10 @@ extern const gchar keybindings_keyfile_group_name[]; -/* Note: keybinding_groups is not in the API, so we don't need to increment the ABI when - * appending keybindings or keygroups, as the _COUNT item shouldn't be used by plugins. */ +/* Note: we don't need to increment the plugin ABI when appending keybindings or keygroups, + * just make sure to only insert keybindings/groups immediately before the _COUNT item, so + * the existing enum values stay the same. + * The _COUNT item should not be used by plugins, as it may well change. */ /** Keybinding group IDs */ enum @@ -207,6 +209,7 @@ GEANY_KEYS_SEARCH_FINDPREVSEL, GEANY_KEYS_SEARCH_NEXTMESSAGE, GEANY_KEYS_SEARCH_FINDUSAGE, + GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, GEANY_KEYS_SEARCH_COUNT }; @@ -287,6 +290,7 @@ GEANY_KEYS_BUILD_RUN, GEANY_KEYS_BUILD_RUN2, GEANY_KEYS_BUILD_OPTIONS, + GEANY_KEYS_BUILD_PREVIOUSERROR, GEANY_KEYS_BUILD_COUNT }; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2727] trunk
by ntrel@users.sourceforge.net
26 Jun '08
26 Jun '08
Revision: 2727
http://geany.svn.sourceforge.net/geany/?rev=2727&view=rev
Author: ntrel Date: 2008-06-26 09:17:28 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Add Previous Error menu item. Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/build.h trunk/src/msgwindow.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-26 16:14:00 UTC (rev 2726) +++ trunk/ChangeLog 2008-06-26 16:17:28 UTC (rev 2727) @@ -3,6 +3,8 @@ * src/vte.c, src/vte.h: Move struct _VteTerminal, VteFunctions from vte.h to vte.c. Call vte_restart() in vte_keypress() as the code is the same. + * src/build.c, src/build.h, src/msgwindow.c: + Add Previous Error menu item. 2008-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2008-06-26 16:14:00 UTC (rev 2726) +++ trunk/src/build.c 2008-06-26 16:17:28 UTC (rev 2727) @@ -83,9 +83,9 @@ }; static BuildMenuItems default_menu_items = - {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; static BuildMenuItems latex_menu_items = - {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; + {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; static struct @@ -110,6 +110,7 @@ static void on_build_make_activate(GtkMenuItem *menuitem, gpointer user_data); static void on_build_execute_activate(GtkMenuItem *menuitem, gpointer user_data); static void on_build_next_error(GtkMenuItem *menuitem, gpointer user_data); +static void on_build_previous_error(GtkMenuItem *menuitem, gpointer user_data); static void kill_process(GPid *pid); @@ -1105,6 +1106,13 @@ g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL); menu_items->item_next_error = item; + item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error")); + gtk_widget_show(item); + /*GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_, item);*/ + gtk_container_add(GTK_CONTAINER(menu), item); + g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL); + menu_items->item_previous_error = item; + item = gtk_separator_menu_item_new(); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); @@ -1215,6 +1223,13 @@ g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL); menu_items->item_next_error = item; + item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error")); + gtk_widget_show(item); + /*GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_, item);*/ + gtk_container_add(GTK_CONTAINER(menu), item); + g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL); + menu_items->item_previous_error = item; + item = gtk_separator_menu_item_new(); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); @@ -1721,6 +1736,8 @@ NULL) > 0; if (menu_items->item_next_error) gtk_widget_set_sensitive(menu_items->item_next_error, have_errors); + if (menu_items->item_previous_error) + gtk_widget_set_sensitive(menu_items->item_previous_error, have_errors); } @@ -2048,6 +2065,20 @@ } +static void +on_build_previous_error (GtkMenuItem *menuitem, + gpointer user_data) +{ + if (ui_tree_view_find_previous(GTK_TREE_VIEW(msgwindow.tree_compiler), + msgwin_goto_compiler_file_line)) + { + gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_COMPILER); + } + else + ui_set_statusbar(FALSE, _("No more build errors.")); +} + + void build_init() { widgets.compile_button = lookup_widget(main_widgets.window, "toolbutton13"); Modified: trunk/src/build.h =================================================================== --- trunk/src/build.h 2008-06-26 16:14:00 UTC (rev 2726) +++ trunk/src/build.h 2008-06-26 16:17:28 UTC (rev 2727) @@ -55,6 +55,7 @@ GtkWidget *item_make_custom; GtkWidget *item_make_object; GtkWidget *item_next_error; + GtkWidget *item_previous_error; GtkWidget *item_exec; GtkWidget *item_exec2; GtkWidget *item_set_args; Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-06-26 16:14:00 UTC (rev 2726) +++ trunk/src/msgwindow.c 2008-06-26 16:17:28 UTC (rev 2727) @@ -250,6 +250,7 @@ /* calling build_menu_update for every build message would be overkill */ gtk_widget_set_sensitive(build_get_menu_items(-1)->item_next_error, TRUE); + gtk_widget_set_sensitive(build_get_menu_items(-1)->item_previous_error, TRUE); } @@ -1013,9 +1014,9 @@ break; case MSG_COMPILER: - gtk_widget_set_sensitive(build_get_menu_items(-1)->item_next_error, FALSE); - store = msgwindow.store_compiler; - break; + gtk_list_store_clear(msgwindow.store_compiler); + build_menu_update(NULL); /* update next error items */ + return; case MSG_STATUS: store = msgwindow.store_status; break; default: return; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2726] trunk
by ntrel@users.sourceforge.net
26 Jun '08
26 Jun '08
Revision: 2726
http://geany.svn.sourceforge.net/geany/?rev=2726&view=rev
Author: ntrel Date: 2008-06-26 09:14:00 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Move struct _VteTerminal, VteFunctions from vte.h to vte.c. Call vte_restart() in vte_keypress() as the code is the same. Modified Paths: -------------- trunk/ChangeLog trunk/src/vte.c trunk/src/vte.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-25 17:38:31 UTC (rev 2725) +++ trunk/ChangeLog 2008-06-26 16:14:00 UTC (rev 2726) @@ -1,3 +1,10 @@ +2008-06-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/vte.c, src/vte.h: + Move struct _VteTerminal, VteFunctions from vte.h to vte.c. + Call vte_restart() in vte_keypress() as the code is the same. + + 2008-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/interface.c, src/prefs.c, src/keyfile.c, src/search.c, Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2008-06-25 17:38:31 UTC (rev 2725) +++ trunk/src/vte.c 2008-06-26 16:14:00 UTC (rev 2726) @@ -61,11 +61,58 @@ static const gchar VTE_WORDCHARS[] = "-A-Za-z0-9,./?%&#:_"; +/* taken from original vte.h to make my life easier ;-) */ + +typedef struct _VteTerminalPrivate VteTerminalPrivate; + +typedef struct _VteTerminal VteTerminal; +struct _VteTerminal +{ + GtkWidget widget; + GtkAdjustment *adjustment; + glong char_width, char_height; + glong char_ascent, char_descent; + glong row_count, column_count; + gchar *window_title; + gchar *icon_title; + VteTerminalPrivate *pvt; +}; + #define VTE_TERMINAL(obj) (GTK_CHECK_CAST((obj), VTE_TYPE_TERMINAL, VteTerminal)) #define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type()) + +/* store function pointers in a struct to avoid a strange segfault if they are stored directly + * if accessed directly, gdb says the segfault arrives at old_tab_width(prefs.c), don't ask me */ +struct VteFunctions +{ + GtkWidget* (*vte_terminal_new) (void); + pid_t (*vte_terminal_fork_command) (VteTerminal *terminal, const char *command, char **argv, + char **envv, const char *directory, gboolean lastlog, + gboolean utmp, gboolean wtmp); + void (*vte_terminal_set_size) (VteTerminal *terminal, glong columns, glong rows); + void (*vte_terminal_set_word_chars) (VteTerminal *terminal, const char *spec); + void (*vte_terminal_set_mouse_autohide) (VteTerminal *terminal, gboolean setting); + void (*vte_terminal_reset) (VteTerminal *terminal, gboolean full, gboolean clear_history); + GtkType (*vte_terminal_get_type) (void); + void (*vte_terminal_set_scroll_on_output) (VteTerminal *terminal, gboolean scroll); + void (*vte_terminal_set_scroll_on_keystroke) (VteTerminal *terminal, gboolean scroll); + void (*vte_terminal_set_font_from_string) (VteTerminal *terminal, const char *name); + void (*vte_terminal_set_scrollback_lines) (VteTerminal *terminal, glong lines); + gboolean (*vte_terminal_get_has_selection) (VteTerminal *terminal); + void (*vte_terminal_copy_clipboard) (VteTerminal *terminal); + void (*vte_terminal_paste_clipboard) (VteTerminal *terminal); + void (*vte_terminal_set_emulation) (VteTerminal *terminal, const gchar *emulation); + void (*vte_terminal_set_color_foreground) (VteTerminal *terminal, const GdkColor *foreground); + void (*vte_terminal_set_color_background) (VteTerminal *terminal, const GdkColor *background); + void (*vte_terminal_feed_child) (VteTerminal *terminal, const char *data, glong length); + void (*vte_terminal_im_append_menuitems) (VteTerminal *terminal, GtkMenuShell *menushell); +}; + + static void create_vte(void); static void vte_start(GtkWidget *widget); +static void vte_restart(GtkWidget *widget); static gboolean vte_button_pressed(GtkWidget *widget, GdkEventButton *event, gpointer user_data); static gboolean vte_keyrelease(GtkWidget *widget, GdkEventKey *event, gpointer data); static gboolean vte_keypress(GtkWidget *widget, GdkEventKey *event, gpointer data); @@ -300,16 +347,7 @@ event->state & GDK_CONTROL_MASK && ! (event->state & GDK_SHIFT_MASK) && ! (event->state & GDK_MOD1_MASK)) { - vte_get_working_directory(); /* try to keep the working directory when restarting the VTE */ - - if (pid > 0) - { - kill(pid, SIGINT); - pid = 0; - } - vf->vte_terminal_reset(VTE_TERMINAL(widget), TRUE, TRUE); - vte_start(widget); - + vte_restart(widget); return TRUE; } return FALSE; @@ -348,14 +386,14 @@ static void vte_restart(GtkWidget *widget) { - vte_get_working_directory(); /* try to keep the working directory when restarting the VTE */ - if (pid > 0) - { - kill(pid, SIGINT); - pid = 0; - } - vf->vte_terminal_reset(VTE_TERMINAL(widget), TRUE, TRUE); - vte_start(widget); + vte_get_working_directory(); /* try to keep the working directory when restarting the VTE */ + if (pid > 0) + { + kill(pid, SIGINT); + pid = 0; + } + vf->vte_terminal_reset(VTE_TERMINAL(widget), TRUE, TRUE); + vte_start(widget); } Modified: trunk/src/vte.h =================================================================== --- trunk/src/vte.h 2008-06-25 17:38:31 UTC (rev 2725) +++ trunk/src/vte.h 2008-06-26 16:14:00 UTC (rev 2726) @@ -89,51 +89,6 @@ gpointer user_data); */ -/* taken from original vte.h to make my life easier ;-) */ - -typedef struct _VteTerminalPrivate VteTerminalPrivate; - -typedef struct _VteTerminal VteTerminal; -struct _VteTerminal -{ - GtkWidget widget; - GtkAdjustment *adjustment; - glong char_width, char_height; - glong char_ascent, char_descent; - glong row_count, column_count; - gchar *window_title; - gchar *icon_title; - VteTerminalPrivate *pvt; -}; - - -/* store function pointers in a struct to avoid a strange segfault if they are stored directly - * if accessed directly, gdb says the segfault arrives at old_tab_width(prefs.c), don't ask me */ -struct VteFunctions -{ - GtkWidget* (*vte_terminal_new) (void); - pid_t (*vte_terminal_fork_command) (VteTerminal *terminal, const char *command, char **argv, - char **envv, const char *directory, gboolean lastlog, - gboolean utmp, gboolean wtmp); - void (*vte_terminal_set_size) (VteTerminal *terminal, glong columns, glong rows); - void (*vte_terminal_set_word_chars) (VteTerminal *terminal, const char *spec); - void (*vte_terminal_set_mouse_autohide) (VteTerminal *terminal, gboolean setting); - void (*vte_terminal_reset) (VteTerminal *terminal, gboolean full, gboolean clear_history); - GtkType (*vte_terminal_get_type) (void); - void (*vte_terminal_set_scroll_on_output) (VteTerminal *terminal, gboolean scroll); - void (*vte_terminal_set_scroll_on_keystroke) (VteTerminal *terminal, gboolean scroll); - void (*vte_terminal_set_font_from_string) (VteTerminal *terminal, const char *name); - void (*vte_terminal_set_scrollback_lines) (VteTerminal *terminal, glong lines); - gboolean (*vte_terminal_get_has_selection) (VteTerminal *terminal); - void (*vte_terminal_copy_clipboard) (VteTerminal *terminal); - void (*vte_terminal_paste_clipboard) (VteTerminal *terminal); - void (*vte_terminal_set_emulation) (VteTerminal *terminal, const gchar *emulation); - void (*vte_terminal_set_color_foreground) (VteTerminal *terminal, const GdkColor *foreground); - void (*vte_terminal_set_color_background) (VteTerminal *terminal, const GdkColor *background); - void (*vte_terminal_feed_child) (VteTerminal *terminal, const char *data, glong length); - void (*vte_terminal_im_append_menuitems) (VteTerminal *terminal, GtkMenuShell *menushell); -}; - #endif #endif This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2725] trunk
by ntrel@users.sourceforge.net
25 Jun '08
25 Jun '08
Revision: 2725
http://geany.svn.sourceforge.net/geany/?rev=2725&view=rev
Author: ntrel Date: 2008-06-25 10:38:31 -0700 (Wed, 25 Jun 2008) Log Message: ----------- Add Previous Message menu item. Don't abbreviate Find Prev Selected. Add ui_tree_view_find_previous(). Set Next Message menu item sensitivity when clicking on Search menu. Thanks to Beau Barker (skip76) for an initial version of ui_tree_view_find_previous() (see #1931125). Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/callbacks.c trunk/src/callbacks.h trunk/src/interface.c trunk/src/msgwindow.c trunk/src/ui_utils.c trunk/src/ui_utils.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/ChangeLog 2008-06-25 17:38:31 UTC (rev 2725) @@ -11,6 +11,14 @@ Add SettingEntry struct which is used for an array containing keyfile key and group information; currently only used for 3 search-related gboolean settings. + * src/interface.c, src/ui_utils.h, src/msgwindow.c, src/callbacks.c, + src/callbacks.h, src/ui_utils.c, geany.glade: + Add Previous Message menu item. + Don't abbreviate Find Prev Selected. + Add ui_tree_view_find_previous(). + Set Next Message menu item sensitivity when clicking on Search menu. + Thanks to Beau Barker (skip76) for an initial version of + ui_tree_view_find_previous() (see #1931125). 2008-06-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/geany.glade 2008-06-25 17:38:31 UTC (rev 2725) @@ -58,7 +58,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2409"> + <widget class="GtkImage" id="image2443"> <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="image2410"> + <widget class="GtkImage" id="image2444"> <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="image2411"> + <widget class="GtkImage" id="image2445"> <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="image2412"> + <widget class="GtkImage" id="image2446"> <property name="visible">True</property> <property name="stock">gtk-revert-to-saved</property> <property name="icon_size">1</property> @@ -278,7 +278,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="image2413"> + <widget class="GtkImage" id="image2447"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -477,7 +477,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="image2414"> + <widget class="GtkImage" id="image2448"> <property name="visible">True</property> <property name="stock">gtk-indent</property> <property name="icon_size">1</property> @@ -498,7 +498,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="image2415"> + <widget class="GtkImage" id="image2449"> <property name="visible">True</property> <property name="stock">gtk-unindent</property> <property name="icon_size">1</property> @@ -554,7 +554,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2416"> + <widget class="GtkImage" id="image2450"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -639,7 +639,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2417"> + <widget class="GtkImage" id="image2451"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -671,7 +671,7 @@ <property name="use_underline">True</property> <child internal-child="image"> - <widget class="GtkImage" id="image2418"> + <widget class="GtkImage" id="image2452"> <property name="visible">True</property> <property name="stock">gtk-add</property> <property name="icon_size">1</property> @@ -720,6 +720,7 @@ <property name="visible">True</property> <property name="label" translatable="yes">_Search</property> <property name="use_underline">True</property> + <signal name="activate" handler="on_search1_activate" last_modification_time="Wed, 25 Jun 2008 17:08:05 GMT"/> <child> <widget class="GtkMenu" id="search1_menu"> @@ -768,7 +769,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="image2419"> + <widget class="GtkImage" id="image2453"> <property name="visible">True</property> <property name="stock">gtk-find-and-replace</property> <property name="icon_size">1</property> @@ -799,7 +800,7 @@ <child> <widget class="GtkMenuItem" id="find_prevsel1"> <property name="visible">True</property> - <property name="label" translatable="yes">Find Pre_v Selected</property> + <property name="label" translatable="yes">Find Pre_vious Selected</property> <property name="use_underline">True</property> <signal name="activate" handler="on_find_prevsel1_activate" last_modification_time="Tue, 23 Jan 2007 17:22:40 GMT"/> </widget> @@ -821,6 +822,15 @@ </child> <child> + <widget class="GtkMenuItem" id="previous_message1"> + <property name="visible">True</property> + <property name="label" translatable="yes">Pr_evious Message</property> + <property name="use_underline">True</property> + <signal name="activate" handler="on_previous_message1_activate" last_modification_time="Wed, 25 Jun 2008 12:10:04 GMT"/> + </widget> + </child> + + <child> <widget class="GtkSeparatorMenuItem" id="separator32"> <property name="visible">True</property> </widget> @@ -834,7 +844,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="image2420"> + <widget class="GtkImage" id="image2454"> <property name="visible">True</property> <property name="stock">gtk-jump-to</property> <property name="icon_size">1</property> @@ -869,7 +879,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="image2421"> + <widget class="GtkImage" id="image2455"> <property name="visible">True</property> <property name="stock">gtk-select-font</property> <property name="icon_size">1</property> @@ -1298,7 +1308,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="image2422"> + <widget class="GtkImage" id="image2456"> <property name="visible">True</property> <property name="stock">gtk-new</property> <property name="icon_size">1</property> @@ -1319,7 +1329,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="image2423"> + <widget class="GtkImage" id="image2457"> <property name="visible">True</property> <property name="stock">gtk-open</property> <property name="icon_size">1</property> @@ -1340,7 +1350,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="image2424"> + <widget class="GtkImage" id="image2458"> <property name="visible">True</property> <property name="stock">gtk-close</property> <property name="icon_size">1</property> @@ -1399,7 +1409,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="image2425"> + <widget class="GtkImage" id="image2459"> <property name="visible">True</property> <property name="stock">gtk-select-color</property> <property name="icon_size">1</property> @@ -1453,7 +1463,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="image2426"> + <widget class="GtkImage" id="image2460"> <property name="visible">True</property> <property name="stock">gtk-help</property> <property name="icon_size">1</property> Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/callbacks.c 2008-06-25 17:38:31 UTC (rev 2725) @@ -1765,6 +1765,16 @@ void +on_previous_message1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + if (! ui_tree_view_find_previous(GTK_TREE_VIEW(msgwindow.tree_msg), + msgwin_goto_messages_file_line)) + ui_set_statusbar(FALSE, _("No more message items.")); +} + + +void on_menu_comments_multiline_activate (GtkMenuItem *menuitem, gpointer user_data) { @@ -2155,3 +2165,20 @@ editor_replace_spaces(doc); } + +void +on_search1_activate (GtkMenuItem *menuitem, + gpointer user_data) +{ + GtkWidget *next_message = lookup_widget(main_widgets.window, "next_message1"); + GtkWidget *previous_message = lookup_widget(main_widgets.window, "previous_message1"); + gboolean have_messages; + + /* enable commands if the messages window has any items */ + have_messages = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(msgwindow.store_msg), + NULL) > 0; + + gtk_widget_set_sensitive(next_message, have_messages); + gtk_widget_set_sensitive(previous_message, have_messages); +} + Modified: trunk/src/callbacks.h =================================================================== --- trunk/src/callbacks.h 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/callbacks.h 2008-06-25 17:38:31 UTC (rev 2725) @@ -606,3 +606,11 @@ void on_replace_spaces_activate (GtkMenuItem *menuitem, gpointer user_data); + +void +on_previous_message1_activate (GtkMenuItem *menuitem, + gpointer user_data); + +void +on_search1_activate (GtkMenuItem *menuitem, + gpointer user_data); Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/interface.c 2008-06-25 17:38:31 UTC (rev 2725) @@ -37,7 +37,7 @@ GtkWidget *file1_menu; GtkWidget *menu_new1; GtkWidget *menu_new_with_template1; - GtkWidget *image2409; + GtkWidget *image2443; 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 *image2410; + GtkWidget *image2444; GtkWidget *menu_reload1; - GtkWidget *image2411; + GtkWidget *image2445; GtkWidget *menu_reload_as1; - GtkWidget *image2412; + GtkWidget *image2446; GtkWidget *menu_reload_as1_menu; GtkWidget *invisible7; GtkWidget *separator21; @@ -63,7 +63,7 @@ GtkWidget *separator14; GtkWidget *menu_close1; GtkWidget *menu_close_all1; - GtkWidget *image2413; + GtkWidget *image2447; GtkWidget *menu_separatormenuitem1; GtkWidget *menu_quit1; GtkWidget *edit1; @@ -88,16 +88,16 @@ GtkWidget *menu_duplicate_line1; GtkWidget *separator29; GtkWidget *menu_increase_indent1; - GtkWidget *image2414; + GtkWidget *image2448; GtkWidget *menu_decrease_indent1; - GtkWidget *image2415; + GtkWidget *image2449; GtkWidget *separator37; GtkWidget *send_selection_to2; GtkWidget *send_selection_to2_menu; GtkWidget *invisible13; GtkWidget *separator18; GtkWidget *add_comments1; - GtkWidget *image2416; + GtkWidget *image2450; GtkWidget *add_comments1_menu; GtkWidget *menu_add_changelog_entry1; GtkWidget *insert_file_header1; @@ -106,11 +106,11 @@ GtkWidget *insert_gpl_notice2; GtkWidget *insert_bsd_license_notice2; GtkWidget *insert_date1; - GtkWidget *image2417; + GtkWidget *image2451; GtkWidget *insert_date1_menu; GtkWidget *invisible8; GtkWidget *insert_include2; - GtkWidget *image2418; + GtkWidget *image2452; GtkWidget *insert_include2_menu; GtkWidget *invisible4; GtkWidget *separator9; @@ -122,19 +122,20 @@ GtkWidget *find_previous1; GtkWidget *find_in_files1; GtkWidget *replace1; - GtkWidget *image2419; + GtkWidget *image2453; GtkWidget *separator33; GtkWidget *find_nextsel1; GtkWidget *find_prevsel1; GtkWidget *separator35; GtkWidget *next_message1; + GtkWidget *previous_message1; GtkWidget *separator32; GtkWidget *go_to_line1; - GtkWidget *image2420; + GtkWidget *image2454; GtkWidget *menu_view1; GtkWidget *menu_view1_menu; GtkWidget *menu_change_font1; - GtkWidget *image2421; + GtkWidget *image2455; GtkWidget *menu_separator4; GtkWidget *menu_toggle_all_additional_widgets1; GtkWidget *menu_fullscreen1; @@ -186,24 +187,24 @@ GtkWidget *menu_project1; GtkWidget *menu_project1_menu; GtkWidget *project_new1; - GtkWidget *image2422; + GtkWidget *image2456; GtkWidget *project_open1; - GtkWidget *image2423; + GtkWidget *image2457; GtkWidget *project_close1; - GtkWidget *image2424; + GtkWidget *image2458; GtkWidget *separator34; GtkWidget *project_properties1; GtkWidget *menu_build1; GtkWidget *tools1; GtkWidget *tools1_menu; GtkWidget *menu_choose_color1; - GtkWidget *image2425; + GtkWidget *image2459; GtkWidget *menu_count_words1; GtkWidget *load_tags1; GtkWidget *menu_help1; GtkWidget *menu_help1_menu; GtkWidget *help1; - GtkWidget *image2426; + GtkWidget *image2460; GtkWidget *keyboard_shortcuts1; GtkWidget *website1; GtkWidget *separator16; @@ -306,9 +307,9 @@ gtk_widget_show (menu_new_with_template1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_new_with_template1); - image2409 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2409); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2409); + image2443 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2443); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_new_with_template1), image2443); 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); @@ -351,25 +352,25 @@ gtk_container_add (GTK_CONTAINER (file1_menu), menu_save_all1); gtk_tooltips_set_tip (tooltips, menu_save_all1, _("Saves all open files"), NULL); - image2410 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2410); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2410); + image2444 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2444); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_save_all1), image2444); menu_reload1 = gtk_image_menu_item_new_with_mnemonic (_("_Reload")); gtk_widget_show (menu_reload1); gtk_container_add (GTK_CONTAINER (file1_menu), menu_reload1); - image2411 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2411); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2411); + image2445 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2445); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload1), image2445); 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); - image2412 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2412); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2412); + image2446 = gtk_image_new_from_stock ("gtk-revert-to-saved", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2446); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_reload_as1), image2446); menu_reload_as1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_reload_as1), menu_reload_as1_menu); @@ -414,9 +415,9 @@ gtk_container_add (GTK_CONTAINER (file1_menu), menu_close_all1); gtk_tooltips_set_tip (tooltips, menu_close_all1, _("Closes all open files"), NULL); - image2413 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2413); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2413); + image2447 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2447); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_close_all1), image2447); menu_separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separatormenuitem1); @@ -520,17 +521,17 @@ gtk_widget_show (menu_increase_indent1); gtk_container_add (GTK_CONTAINER (menu_format1_menu), menu_increase_indent1); - image2414 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2414); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2414); + image2448 = gtk_image_new_from_stock ("gtk-indent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2448); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_increase_indent1), image2448); 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); - image2415 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2415); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2415); + image2449 = gtk_image_new_from_stock ("gtk-unindent", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2449); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_decrease_indent1), image2449); separator37 = gtk_separator_menu_item_new (); gtk_widget_show (separator37); @@ -556,9 +557,9 @@ gtk_widget_show (add_comments1); gtk_container_add (GTK_CONTAINER (edit1_menu), add_comments1); - image2416 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2416); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2416); + image2450 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2450); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (add_comments1), image2450); add_comments1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (add_comments1), add_comments1_menu); @@ -597,9 +598,9 @@ gtk_widget_show (insert_date1); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_date1); - image2417 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2417); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2417); + image2451 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2451); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_date1), image2451); insert_date1_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_date1), insert_date1_menu); @@ -611,9 +612,9 @@ gtk_widget_show (insert_include2); gtk_container_add (GTK_CONTAINER (edit1_menu), insert_include2); - image2418 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2418); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2418); + image2452 = gtk_image_new_from_stock ("gtk-add", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2452); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (insert_include2), image2452); insert_include2_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (insert_include2), insert_include2_menu); @@ -657,9 +658,9 @@ gtk_widget_show (replace1); gtk_container_add (GTK_CONTAINER (search1_menu), replace1); - image2419 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2419); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2419); + image2453 = gtk_image_new_from_stock ("gtk-find-and-replace", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2453); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (replace1), image2453); separator33 = gtk_separator_menu_item_new (); gtk_widget_show (separator33); @@ -670,7 +671,7 @@ gtk_widget_show (find_nextsel1); gtk_container_add (GTK_CONTAINER (search1_menu), find_nextsel1); - find_prevsel1 = gtk_menu_item_new_with_mnemonic (_("Find Pre_v Selected")); + find_prevsel1 = gtk_menu_item_new_with_mnemonic (_("Find Pre_vious Selected")); gtk_widget_show (find_prevsel1); gtk_container_add (GTK_CONTAINER (search1_menu), find_prevsel1); @@ -683,6 +684,10 @@ gtk_widget_show (next_message1); gtk_container_add (GTK_CONTAINER (search1_menu), next_message1); + previous_message1 = gtk_menu_item_new_with_mnemonic (_("Pr_evious Message")); + gtk_widget_show (previous_message1); + gtk_container_add (GTK_CONTAINER (search1_menu), previous_message1); + separator32 = gtk_separator_menu_item_new (); gtk_widget_show (separator32); gtk_container_add (GTK_CONTAINER (search1_menu), separator32); @@ -692,9 +697,9 @@ gtk_widget_show (go_to_line1); gtk_container_add (GTK_CONTAINER (search1_menu), go_to_line1); - image2420 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2420); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2420); + image2454 = gtk_image_new_from_stock ("gtk-jump-to", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2454); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (go_to_line1), image2454); menu_view1 = gtk_menu_item_new_with_mnemonic (_("_View")); gtk_widget_show (menu_view1); @@ -708,9 +713,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); - image2421 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2421); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2421); + image2455 = gtk_image_new_from_stock ("gtk-select-font", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2455); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_change_font1), image2455); menu_separator4 = gtk_separator_menu_item_new (); gtk_widget_show (menu_separator4); @@ -935,25 +940,25 @@ gtk_widget_show (project_new1); gtk_container_add (GTK_CONTAINER (menu_project1_menu), project_new1); - image2422 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2422); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2422); + image2456 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2456); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_new1), image2456); 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); - image2423 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2423); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2423); + image2457 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2457); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_open1), image2457); 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); - image2424 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2424); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2424); + image2458 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2458); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (project_close1), image2458); separator34 = gtk_separator_menu_item_new (); gtk_widget_show (separator34); @@ -980,9 +985,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); - image2425 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2425); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2425); + image2459 = gtk_image_new_from_stock ("gtk-select-color", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2459); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_choose_color1), image2459); menu_count_words1 = gtk_menu_item_new_with_mnemonic (_("_Word Count")); gtk_widget_show (menu_count_words1); @@ -1005,9 +1010,9 @@ gtk_widget_show (help1); gtk_container_add (GTK_CONTAINER (menu_help1_menu), help1); - image2426 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); - gtk_widget_show (image2426); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2426); + image2460 = gtk_image_new_from_stock ("gtk-help", GTK_ICON_SIZE_MENU); + gtk_widget_show (image2460); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (help1), image2460); keyboard_shortcuts1 = gtk_menu_item_new_with_mnemonic (_("_Keyboard Shortcuts")); gtk_widget_show (keyboard_shortcuts1); @@ -1446,6 +1451,9 @@ g_signal_connect ((gpointer) preferences1, "activate", G_CALLBACK (on_preferences1_activate), NULL); + g_signal_connect ((gpointer) search1, "activate", + G_CALLBACK (on_search1_activate), + NULL); g_signal_connect ((gpointer) find1, "activate", G_CALLBACK (on_find1_activate), NULL); @@ -1470,6 +1478,9 @@ g_signal_connect ((gpointer) next_message1, "activate", G_CALLBACK (on_next_message1_activate), NULL); + g_signal_connect ((gpointer) previous_message1, "activate", + G_CALLBACK (on_previous_message1_activate), + NULL); g_signal_connect ((gpointer) go_to_line1, "activate", G_CALLBACK (on_go_to_line1_activate), NULL); @@ -1696,7 +1707,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, image2409, "image2409"); + GLADE_HOOKUP_OBJECT (window1, image2443, "image2443"); 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"); @@ -1707,11 +1718,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, image2410, "image2410"); + GLADE_HOOKUP_OBJECT (window1, image2444, "image2444"); GLADE_HOOKUP_OBJECT (window1, menu_reload1, "menu_reload1"); - GLADE_HOOKUP_OBJECT (window1, image2411, "image2411"); + GLADE_HOOKUP_OBJECT (window1, image2445, "image2445"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1, "menu_reload_as1"); - GLADE_HOOKUP_OBJECT (window1, image2412, "image2412"); + GLADE_HOOKUP_OBJECT (window1, image2446, "image2446"); GLADE_HOOKUP_OBJECT (window1, menu_reload_as1_menu, "menu_reload_as1_menu"); GLADE_HOOKUP_OBJECT (window1, invisible7, "invisible7"); GLADE_HOOKUP_OBJECT (window1, separator21, "separator21"); @@ -1722,7 +1733,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, image2413, "image2413"); + GLADE_HOOKUP_OBJECT (window1, image2447, "image2447"); GLADE_HOOKUP_OBJECT (window1, menu_separatormenuitem1, "menu_separatormenuitem1"); GLADE_HOOKUP_OBJECT (window1, menu_quit1, "menu_quit1"); GLADE_HOOKUP_OBJECT (window1, edit1, "edit1"); @@ -1747,16 +1758,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, image2414, "image2414"); + GLADE_HOOKUP_OBJECT (window1, image2448, "image2448"); GLADE_HOOKUP_OBJECT (window1, menu_decrease_indent1, "menu_decrease_indent1"); - GLADE_HOOKUP_OBJECT (window1, image2415, "image2415"); + GLADE_HOOKUP_OBJECT (window1, image2449, "image2449"); 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, image2416, "image2416"); + GLADE_HOOKUP_OBJECT (window1, image2450, "image2450"); 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"); @@ -1765,11 +1776,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, image2417, "image2417"); + GLADE_HOOKUP_OBJECT (window1, image2451, "image2451"); 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, image2418, "image2418"); + GLADE_HOOKUP_OBJECT (window1, image2452, "image2452"); GLADE_HOOKUP_OBJECT (window1, insert_include2_menu, "insert_include2_menu"); GLADE_HOOKUP_OBJECT (window1, invisible4, "invisible4"); GLADE_HOOKUP_OBJECT (window1, separator9, "separator9"); @@ -1781,19 +1792,20 @@ 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, image2419, "image2419"); + GLADE_HOOKUP_OBJECT (window1, image2453, "image2453"); GLADE_HOOKUP_OBJECT (window1, separator33, "separator33"); GLADE_HOOKUP_OBJECT (window1, find_nextsel1, "find_nextsel1"); GLADE_HOOKUP_OBJECT (window1, find_prevsel1, "find_prevsel1"); GLADE_HOOKUP_OBJECT (window1, separator35, "separator35"); GLADE_HOOKUP_OBJECT (window1, next_message1, "next_message1"); + 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, image2420, "image2420"); + GLADE_HOOKUP_OBJECT (window1, image2454, "image2454"); 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, image2421, "image2421"); + GLADE_HOOKUP_OBJECT (window1, image2455, "image2455"); 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"); @@ -1843,24 +1855,24 @@ 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, image2422, "image2422"); + GLADE_HOOKUP_OBJECT (window1, image2456, "image2456"); GLADE_HOOKUP_OBJECT (window1, project_open1, "project_open1"); - GLADE_HOOKUP_OBJECT (window1, image2423, "image2423"); + GLADE_HOOKUP_OBJECT (window1, image2457, "image2457"); GLADE_HOOKUP_OBJECT (window1, project_close1, "project_close1"); - GLADE_HOOKUP_OBJECT (window1, image2424, "image2424"); + GLADE_HOOKUP_OBJECT (window1, image2458, "image2458"); 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, image2425, "image2425"); + GLADE_HOOKUP_OBJECT (window1, image2459, "image2459"); 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, image2426, "image2426"); + GLADE_HOOKUP_OBJECT (window1, image2460, "image2460"); GLADE_HOOKUP_OBJECT (window1, keyboard_shortcuts1, "keyboard_shortcuts1"); GLADE_HOOKUP_OBJECT (window1, website1, "website1"); GLADE_HOOKUP_OBJECT (window1, separator16, "separator16"); Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/msgwindow.c 2008-06-25 17:38:31 UTC (rev 2725) @@ -81,8 +81,6 @@ msgwindow.tree_compiler = lookup_widget(main_widgets.window, "treeview5"); msgwindow.find_in_files_dir = NULL; - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "next_message1"), FALSE); - prepare_status_tree_view(); prepare_msg_tree_view(); prepare_compiler_tree_view(); @@ -311,8 +309,6 @@ gtk_list_store_append(msgwindow.store_msg, &iter); gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, doc, 2, color, 3, tmp, -1); - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "next_message1"), TRUE); - g_free(tmp); } @@ -1013,7 +1009,6 @@ switch (tabnum) { case MSG_MESSAGE: - gtk_widget_set_sensitive(lookup_widget(main_widgets.window, "next_message1"), FALSE); store = msgwindow.store_msg; break; Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/ui_utils.c 2008-06-25 17:38:31 UTC (rev 2725) @@ -1221,9 +1221,26 @@ } -/* Returns FALSE if the treeview has items but no matching next item. */ -gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb) +static gboolean tree_model_iter_get_next(GtkTreeModel *model, GtkTreeIter *iter, + gboolean down) { + GtkTreePath *path; + gboolean result; + + if (down) + return gtk_tree_model_iter_next(model, iter); + + path = gtk_tree_model_get_path(model, iter); + result = gtk_tree_path_prev(path) && gtk_tree_model_get_iter(model, iter, path); + gtk_tree_path_free(path); + return result; +} + + +/* note: the while loop might be more efficient when searching upwards if it + * used tree paths instead of tree iters, but in practice it probably doesn't matter much. */ +static gboolean tree_view_find(GtkTreeView *treeview, TVMatchCallback cb, gboolean down) +{ GtkTreeSelection *treesel; GtkTreeIter iter; GtkTreeModel *model; @@ -1232,7 +1249,7 @@ if (gtk_tree_selection_get_selected(treesel, &model, &iter)) { /* get the next selected item */ - if (! gtk_tree_model_iter_next(model, &iter)) + if (! tree_model_iter_get_next(model, &iter, down)) return FALSE; /* no more items */ } else /* no selection */ @@ -1246,7 +1263,7 @@ if (cb()) break; /* found next message */ - if (! gtk_tree_model_iter_next(model, &iter)) + if (! tree_model_iter_get_next(model, &iter, down)) return FALSE; /* no more items */ } /* scroll item in view */ @@ -1262,6 +1279,20 @@ } +/* Returns FALSE if the treeview has items but no matching next item. */ +gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb) +{ + return tree_view_find(treeview, cb, TRUE); +} + + +/* Returns FALSE if the treeview has items but no matching next item. */ +gboolean ui_tree_view_find_previous(GtkTreeView *treeview, TVMatchCallback cb) +{ + return tree_view_find(treeview, cb, FALSE); +} + + void ui_widget_modify_font_from_string(GtkWidget *wid, const gchar *str) { PangoFontDescription *pfd; Modified: trunk/src/ui_utils.h =================================================================== --- trunk/src/ui_utils.h 2008-06-25 11:56:58 UTC (rev 2724) +++ trunk/src/ui_utils.h 2008-06-25 17:38:31 UTC (rev 2725) @@ -233,7 +233,9 @@ gboolean ui_tree_view_find_next(GtkTreeView *treeview, TVMatchCallback cb); +gboolean ui_tree_view_find_previous(GtkTreeView *treeview, TVMatchCallback cb); + void ui_statusbar_showhide(gboolean state); #endif This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2724] trunk
by ntrel@users.sourceforge.net
25 Jun '08
25 Jun '08
Revision: 2724
http://geany.svn.sourceforge.net/geany/?rev=2724&view=rev
Author: ntrel Date: 2008-06-25 04:56:58 -0700 (Wed, 25 Jun 2008) Log Message: ----------- Move 2 search prefs to new Search tab of Preferences dialog. Add new search pref: 'Use the current file's directory for Find in Files' (#1930435). Add PrefEntry struct which is used for an array containing widget names to lookup; currently only used for 3 search-related GtkToggleButton prefs. Add SettingEntry struct which is used for an array containing keyfile key and group information; currently only used for 3 search-related gboolean settings. Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/interface.c trunk/src/keyfile.c trunk/src/prefs.c trunk/src/search.c trunk/src/search.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/ChangeLog 2008-06-25 11:56:58 UTC (rev 2724) @@ -1,3 +1,18 @@ +2008-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/interface.c, src/prefs.c, src/keyfile.c, src/search.c, + src/search.h, geany.glade: + Move 2 search prefs to new Search tab of Preferences dialog. + Add new search pref: 'Use the current file's directory for Find in + Files' (#1930435). + Add PrefEntry struct which is used for an array containing widget + names to lookup; currently only used for 3 search-related + GtkToggleButton prefs. + Add SettingEntry struct which is used for an array containing keyfile + key and group information; currently only used for 3 search-related + gboolean settings. + + 2008-06-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/keybindings.c: Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/geany.glade 2008-06-25 11:56:58 UTC (rev 2724) @@ -3548,44 +3548,6 @@ <property name="fill">False</property> </packing> </child> - - <child> - <widget class="GtkCheckButton" id="check_ask_suppress_search_dialogs"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Always wrap search around the document and hide the Find dialog after clicking Find Next/Previous</property> - <property name="label" translatable="yes">Always wrap search and hide the Find dialog</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="check_search_use_current_word"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Use current word under the cursor when opening the Find, Find in Files or Replace dialog and there is no selection.</property> - <property name="label" translatable="yes">Use the current word under the cursor for Find dialogs</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> </widget> </child> </widget> @@ -7167,6 +7129,144 @@ </child> <child> + <widget class="GtkFrame" id="frame36"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment39"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkVBox" id="vbox36"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkCheckButton" id="check_ask_suppress_search_dialogs"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Always wrap search around the document and hide the Find dialog after clicking Find Next/Previous</property> + <property name="label" translatable="yes">Always wrap search and hide the Find dialog</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="check_search_use_current_word"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Use current word under the cursor when opening the Find, Find in Files or Replace dialog and there is no selection.</property> + <property name="label" translatable="yes">Use the current word under the cursor for Find dialogs</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="check_fif_current_dir"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Use the current file's directory for Find in Files</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + + <child> + <widget class="GtkLabel" id="label215"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Search</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label214"> + <property name="visible">True</property> + <property name="label" translatable="yes">Search</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> <widget class="GtkVBox" id="vbox23"> <property name="visible">True</property> <property name="homogeneous">False</property> Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/src/interface.c 2008-06-25 11:56:58 UTC (rev 2724) @@ -2511,8 +2511,6 @@ GtkWidget *check_switch_pages; GtkWidget *check_suppress_status_msgs; GtkWidget *check_auto_focus; - GtkWidget *check_ask_suppress_search_dialogs; - GtkWidget *check_search_use_current_word; GtkWidget *label199; GtkWidget *frame25; GtkWidget *alignment28; @@ -2714,6 +2712,14 @@ GtkWidget *spin_disk_check; GtkWidget *label198; GtkWidget *label174; + GtkWidget *frame36; + GtkWidget *alignment39; + GtkWidget *vbox36; + GtkWidget *check_ask_suppress_search_dialogs; + GtkWidget *check_search_use_current_word; + GtkWidget *check_fif_current_dir; + GtkWidget *label215; + GtkWidget *label214; GtkWidget *vbox23; GtkWidget *frame20; GtkWidget *alignment23; @@ -2957,20 +2963,6 @@ gtk_tooltips_set_tip (tooltips, check_auto_focus, _("Gives the focus automatically to widgets below the mouse cursor. Works for the main editor widget, the scribble, the toolbar search and goto line fields and the VTE."), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_auto_focus), FALSE); - check_ask_suppress_search_dialogs = gtk_check_button_new_with_mnemonic (_("Always wrap search and hide the Find dialog")); - gtk_widget_show (check_ask_suppress_search_dialogs); - gtk_box_pack_start (GTK_BOX (vbox21), check_ask_suppress_search_dialogs, FALSE, FALSE, 0); - GTK_WIDGET_UNSET_FLAGS (check_ask_suppress_search_dialogs, GTK_CAN_FOCUS); - gtk_tooltips_set_tip (tooltips, check_ask_suppress_search_dialogs, _("Always wrap search around the document and hide the Find dialog after clicking Find Next/Previous"), NULL); - gtk_button_set_focus_on_click (GTK_BUTTON (check_ask_suppress_search_dialogs), FALSE); - - check_search_use_current_word = gtk_check_button_new_with_mnemonic (_("Use the current word under the cursor for Find dialogs")); - gtk_widget_show (check_search_use_current_word); - gtk_box_pack_start (GTK_BOX (vbox21), check_search_use_current_word, FALSE, FALSE, 0); - GTK_WIDGET_UNSET_FLAGS (check_search_use_current_word, GTK_CAN_FOCUS); - gtk_tooltips_set_tip (tooltips, check_search_use_current_word, _("Use current word under the cursor when opening the Find, Find in Files or Replace dialog and there is no selection."), NULL); - gtk_button_set_focus_on_click (GTK_BUTTON (check_search_use_current_word), FALSE); - label199 = gtk_label_new (_("<b>Miscellaneous</b>")); gtk_widget_show (label199); gtk_frame_set_label_widget (GTK_FRAME (frame19), label199); @@ -4091,6 +4083,47 @@ gtk_widget_show (label174); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 4), label174); + frame36 = gtk_frame_new (NULL); + gtk_widget_show (frame36); + gtk_container_add (GTK_CONTAINER (notebook2), frame36); + gtk_frame_set_shadow_type (GTK_FRAME (frame36), GTK_SHADOW_NONE); + + alignment39 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment39); + gtk_container_add (GTK_CONTAINER (frame36), alignment39); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment39), 0, 0, 12, 0); + + vbox36 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox36); + gtk_container_add (GTK_CONTAINER (alignment39), vbox36); + + check_ask_suppress_search_dialogs = gtk_check_button_new_with_mnemonic (_("Always wrap search and hide the Find dialog")); + gtk_widget_show (check_ask_suppress_search_dialogs); + gtk_box_pack_start (GTK_BOX (vbox36), check_ask_suppress_search_dialogs, FALSE, FALSE, 0); + GTK_WIDGET_UNSET_FLAGS (check_ask_suppress_search_dialogs, GTK_CAN_FOCUS); + gtk_tooltips_set_tip (tooltips, check_ask_suppress_search_dialogs, _("Always wrap search around the document and hide the Find dialog after clicking Find Next/Previous"), NULL); + gtk_button_set_focus_on_click (GTK_BUTTON (check_ask_suppress_search_dialogs), FALSE); + + check_search_use_current_word = gtk_check_button_new_with_mnemonic (_("Use the current word under the cursor for Find dialogs")); + gtk_widget_show (check_search_use_current_word); + gtk_box_pack_start (GTK_BOX (vbox36), check_search_use_current_word, FALSE, FALSE, 0); + GTK_WIDGET_UNSET_FLAGS (check_search_use_current_word, GTK_CAN_FOCUS); + gtk_tooltips_set_tip (tooltips, check_search_use_current_word, _("Use current word under the cursor when opening the Find, Find in Files or Replace dialog and there is no selection."), NULL); + gtk_button_set_focus_on_click (GTK_BUTTON (check_search_use_current_word), FALSE); + + check_fif_current_dir = gtk_check_button_new_with_mnemonic (_("Use the current file's directory for Find in Files")); + gtk_widget_show (check_fif_current_dir); + gtk_box_pack_start (GTK_BOX (vbox36), check_fif_current_dir, FALSE, FALSE, 0); + + label215 = gtk_label_new (_("<b>Search</b>")); + gtk_widget_show (label215); + gtk_frame_set_label_widget (GTK_FRAME (frame36), label215); + gtk_label_set_use_markup (GTK_LABEL (label215), TRUE); + + label214 = gtk_label_new (_("Search")); + gtk_widget_show (label214); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 5), label214); + vbox23 = gtk_vbox_new (FALSE, 10); gtk_widget_show (vbox23); gtk_container_add (GTK_CONTAINER (notebook2), vbox23); @@ -4266,7 +4299,7 @@ label96 = gtk_label_new (_("Tools")); gtk_widget_show (label96); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 5), label96); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 6), label96); frame21 = gtk_frame_new (NULL); gtk_widget_show (frame21); @@ -4369,7 +4402,7 @@ label119 = gtk_label_new (_("Templates")); gtk_widget_show (label119); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 6), label119); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 7), label119); frame22 = gtk_frame_new (NULL); gtk_widget_show (frame22); @@ -4416,7 +4449,7 @@ label151 = gtk_label_new (_("Keybindings")); gtk_widget_show (label151); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 7), label151); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 8), label151); vbox27 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox27); @@ -4536,7 +4569,7 @@ label201 = gtk_label_new (_("Printing")); gtk_widget_show (label201); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 8), label201); + gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook2), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook2), 9), label201); dialog_action_area3 = GTK_DIALOG (prefs_dialog)->action_area; gtk_widget_show (dialog_action_area3); @@ -4587,8 +4620,6 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, check_switch_pages, "check_switch_pages"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_suppress_status_msgs, "check_suppress_status_msgs"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_auto_focus, "check_auto_focus"); - GLADE_HOOKUP_OBJECT (prefs_dialog, check_ask_suppress_search_dialogs, "check_ask_suppress_search_dialogs"); - GLADE_HOOKUP_OBJECT (prefs_dialog, check_search_use_current_word, "check_search_use_current_word"); GLADE_HOOKUP_OBJECT (prefs_dialog, label199, "label199"); GLADE_HOOKUP_OBJECT (prefs_dialog, frame25, "frame25"); GLADE_HOOKUP_OBJECT (prefs_dialog, alignment28, "alignment28"); @@ -4778,6 +4809,14 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, spin_disk_check, "spin_disk_check"); GLADE_HOOKUP_OBJECT (prefs_dialog, label198, "label198"); GLADE_HOOKUP_OBJECT (prefs_dialog, label174, "label174"); + GLADE_HOOKUP_OBJECT (prefs_dialog, frame36, "frame36"); + GLADE_HOOKUP_OBJECT (prefs_dialog, alignment39, "alignment39"); + GLADE_HOOKUP_OBJECT (prefs_dialog, vbox36, "vbox36"); + GLADE_HOOKUP_OBJECT (prefs_dialog, check_ask_suppress_search_dialogs, "check_ask_suppress_search_dialogs"); + GLADE_HOOKUP_OBJECT (prefs_dialog, check_search_use_current_word, "check_search_use_current_word"); + GLADE_HOOKUP_OBJECT (prefs_dialog, check_fif_current_dir, "check_fif_current_dir"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label215, "label215"); + GLADE_HOOKUP_OBJECT (prefs_dialog, label214, "label214"); GLADE_HOOKUP_OBJECT (prefs_dialog, vbox23, "vbox23"); GLADE_HOOKUP_OBJECT (prefs_dialog, frame20, "frame20"); GLADE_HOOKUP_OBJECT (prefs_dialog, alignment23, "alignment23"); Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/src/keyfile.c 2008-06-25 11:56:58 UTC (rev 2724) @@ -89,6 +89,25 @@ static gint vpan_position; +/* Used in e.g. save_bool_prefs(). */ +typedef struct SettingEntry +{ + const gchar *group; + const gchar *key_name; + gpointer setting; + gpointer default_value; +} +SettingEntry; + +static SettingEntry bool_prefs[] = +{ + {PACKAGE, "pref_main_suppress_search_dialogs", &search_prefs.suppress_dialogs, GINT_TO_POINTER(FALSE)}, + {PACKAGE, "pref_main_search_use_current_word", &search_prefs.use_current_word, GINT_TO_POINTER(TRUE)}, + {"search", "pref_search_current_file_dir", &search_prefs.use_current_file_dir, GINT_TO_POINTER(TRUE)}, + {NULL, NULL, NULL, NULL} /* must be terminated */ +}; + + static void save_recent_files(GKeyFile *config) { gchar **recent_files = g_new0(gchar*, file_prefs.mru_length + 1); @@ -184,8 +203,21 @@ } +static void save_bool_prefs(GKeyFile *config) +{ + SettingEntry *pe; + + for (pe = bool_prefs; pe->group != NULL; pe++) + { + g_key_file_set_boolean(config, pe->group, pe->key_name, *(gboolean*)pe->setting); + } +} + + static void save_dialog_prefs(GKeyFile *config) { + save_bool_prefs(config); + /* Some of the key names are not consistent, but this is for backwards compatibility */ /* general */ @@ -193,8 +225,6 @@ g_key_file_set_boolean(config, PACKAGE, "pref_main_project_session", project_prefs.project_session); g_key_file_set_boolean(config, PACKAGE, "pref_main_save_winpos", prefs.save_winpos); g_key_file_set_boolean(config, PACKAGE, "pref_main_confirm_exit", prefs.confirm_exit); - g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_search_dialogs", search_prefs.suppress_dialogs); - g_key_file_set_boolean(config, PACKAGE, "pref_main_search_use_current_word", search_prefs.use_current_word); g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_status_messages", prefs.suppress_status_messages); g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", prefs.switch_to_status); g_key_file_set_boolean(config, PACKAGE, "beep_on_errors", prefs.beep_on_errors); @@ -476,6 +506,18 @@ } +static void load_bool_prefs(GKeyFile *config) +{ + SettingEntry *pe; + + for (pe = bool_prefs; pe->group != NULL; pe++) + { + *(gboolean*)pe->setting = utils_get_setting_boolean(config, pe->group, pe->key_name, + GPOINTER_TO_INT(pe->default_value)); + } +} + + #define GEANY_GET_SETTING(propertyname, value, default_value) \ if (g_object_class_find_property( \ G_OBJECT_GET_CLASS(G_OBJECT(gtk_settings_get_default())), propertyname)) \ @@ -489,10 +531,10 @@ gchar *tmp_string, *tmp_string2; const gchar *default_charset = NULL; + load_bool_prefs(config); + /* general */ prefs.confirm_exit = utils_get_setting_boolean(config, PACKAGE, "pref_main_confirm_exit", FALSE); - search_prefs.suppress_dialogs = utils_get_setting_boolean(config, PACKAGE, "pref_main_suppress_search_dialogs", FALSE); - search_prefs.use_current_word = utils_get_setting_boolean(config, PACKAGE, "pref_main_search_use_current_word", TRUE); prefs.suppress_status_messages = utils_get_setting_boolean(config, PACKAGE, "pref_main_suppress_status_messages", FALSE); prefs.load_session = utils_get_setting_boolean(config, PACKAGE, "pref_main_load_session", TRUE); project_prefs.project_session = utils_get_setting_boolean(config, PACKAGE, "pref_main_project_session", TRUE); Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/src/prefs.c 2008-06-25 11:56:58 UTC (rev 2724) @@ -89,6 +89,23 @@ static void on_prefs_print_page_header_toggled(GtkToggleButton *togglebutton, gpointer user_data); +/* used in e.g. init_toggle_button_prefs(). */ +typedef struct PrefEntry +{ + const gchar *widget_name; + gpointer setting; +} +PrefEntry; + +static PrefEntry toggle_prefs[] = +{ + {"check_ask_suppress_search_dialogs", &search_prefs.suppress_dialogs}, + {"check_search_use_current_word", &search_prefs.use_current_word}, + {"check_fif_current_dir", &search_prefs.use_current_file_dir}, + {NULL, NULL} /* must be terminated */ +}; + + enum { KB_TREE_ACTION, @@ -162,11 +179,26 @@ } +static void init_toggle_button_prefs() +{ + PrefEntry *pe; + + for (pe = toggle_prefs; pe->widget_name != NULL; pe++) + { + GtkWidget *widget = lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); + + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), *(gboolean*)pe->setting); + } +} + + void prefs_init_dialog(void) { GtkWidget *widget; GdkColor *color; + init_toggle_button_prefs(); + /* General settings */ /* startup */ widget = lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); @@ -197,12 +229,6 @@ widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), prefs.auto_focus); - widget = lookup_widget(ui_widgets.prefs_dialog, "check_ask_suppress_search_dialogs"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), search_prefs.suppress_dialogs); - - widget = lookup_widget(ui_widgets.prefs_dialog, "check_search_use_current_word"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), search_prefs.use_current_word); - widget = lookup_widget(ui_widgets.prefs_dialog, "entry_contextaction"); gtk_entry_set_text(GTK_ENTRY(widget), tool_prefs.context_action_cmd); @@ -578,6 +604,19 @@ } +static void update_toggle_button_prefs() +{ + PrefEntry *pe; + + for (pe = toggle_prefs; pe->widget_name != NULL; pe++) + { + GtkWidget *widget = lookup_widget(ui_widgets.prefs_dialog, pe->widget_name); + + *(gboolean*)pe->setting = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + } +} + + /* * callbacks */ @@ -589,6 +628,8 @@ GtkWidget *widget; guint i; + update_toggle_button_prefs(); + /* General settings */ /* startup */ widget = lookup_widget(ui_widgets.prefs_dialog, "check_load_session"); @@ -610,18 +651,12 @@ widget = lookup_widget(ui_widgets.prefs_dialog, "check_beep"); prefs.beep_on_errors = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); - widget = lookup_widget(ui_widgets.prefs_dialog, "check_ask_suppress_search_dialogs"); - search_prefs.suppress_dialogs = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); - widget = lookup_widget(ui_widgets.prefs_dialog, "check_switch_pages"); prefs.switch_to_status = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); widget = lookup_widget(ui_widgets.prefs_dialog, "check_suppress_status_msgs"); prefs.suppress_status_messages = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); - widget = lookup_widget(ui_widgets.prefs_dialog, "check_search_use_current_word"); - search_prefs.use_current_word = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); - widget = lookup_widget(ui_widgets.prefs_dialog, "check_auto_focus"); prefs.auto_focus = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); Modified: trunk/src/search.c =================================================================== --- trunk/src/search.c 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/src/search.c 2008-06-25 11:56:58 UTC (rev 2724) @@ -562,7 +562,7 @@ GtkWidget *entry; /* the child GtkEntry of combo (or dir_combo) */ GeanyDocument *doc = document_get_current(); gchar *sel = NULL; - gchar *cur_dir; + gchar *cur_dir = NULL; if (widgets.find_in_files_dialog == NULL) { @@ -725,18 +725,26 @@ entry = GTK_BIN(dir_combo)->child; if (NZV(dir)) - cur_dir = g_strdup(dir); + cur_dir = g_strdup(dir); /* custom directory argument passed */ else - cur_dir = utils_get_current_file_dir_utf8(); + { + gboolean entry_empty = ! NZV(gtk_entry_get_text(GTK_ENTRY(entry))); + + if (search_prefs.use_current_file_dir || entry_empty) + { + cur_dir = utils_get_current_file_dir_utf8(); + + /* use default_open_path if no directory could be determined + * (e.g. when no files are open) */ + if (!cur_dir) + cur_dir = g_strdup(prefs.default_open_path); + } + } if (cur_dir) { gtk_entry_set_text(GTK_ENTRY(entry), cur_dir); g_free(cur_dir); } - else - { /* use default_open_path if no directory could be determined (e.g. when no files are open) */ - gtk_entry_set_text(GTK_ENTRY(entry), prefs.default_open_path); - } /* put the focus to the directory entry if it is empty */ if (utils_str_equal(gtk_entry_get_text(GTK_ENTRY(entry)), "")) Modified: trunk/src/search.h =================================================================== --- trunk/src/search.h 2008-06-24 14:32:54 UTC (rev 2723) +++ trunk/src/search.h 2008-06-25 11:56:58 UTC (rev 2724) @@ -45,6 +45,7 @@ gchar *fif_extra_options; gboolean suppress_dialogs; gboolean use_current_word; + gboolean use_current_file_dir; /* find in files directory to use on showing dialog */ } GeanySearchPrefs; This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2723] trunk
by ntrel@users.sourceforge.net
24 Jun '08
24 Jun '08
Revision: 2723
http://geany.svn.sourceforge.net/geany/?rev=2723&view=rev
Author: ntrel Date: 2008-06-24 07:32:54 -0700 (Tue, 24 Jun 2008) Log Message: ----------- Split Preferences dialog Editor tab into a sub-notebook, with Features, Completions and Display pages. This also reduces the minimum height of the Preferences dialog. Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.html trunk/doc/geany.txt trunk/geany.glade trunk/src/interface.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-24 12:25:23 UTC (rev 2722) +++ trunk/ChangeLog 2008-06-24 14:32:54 UTC (rev 2723) @@ -2,6 +2,10 @@ * src/keybindings.c: Make keyboard shortcuts dialog non-modal (#1999384). + * src/interface.c, doc/geany.txt, doc/geany.html, geany.glade: + Split Preferences dialog Editor tab into a sub-notebook, with + Features, Completions and Display pages. This also reduces the + minimum height of the Preferences dialog. 2008-06-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2008-06-24 12:25:23 UTC (rev 2722) +++ trunk/doc/geany.html 2008-06-24 14:32:54 UTC (rev 2723) @@ -3,10 +3,10 @@ <html xmlns="
http://www.w3.org/1999/xhtml
" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<meta name="generator" content="Docutils 0.4.1:
http://docutils.sourceforge.net/
" /> +<meta name="generator" content="Docutils 0.4:
http://docutils.sourceforge.net/
" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2008-06-08" /> +<meta name="date" content="2008-06-19" /> <style type="text/css"> /* @@ -139,7 +139,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2008-06-08</td></tr> +<td>2008-06-19</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.15</td></tr> </tbody> @@ -258,15 +258,15 @@ <li><a class="reference" href="#appearance" id="id77" name="id77">Appearance</a></li> </ul> </li> -<li><a class="reference" href="#display-tab-in-preferences-dialog" id="id78" name="id78">Display tab in preferences dialog</a><ul> -<li><a class="reference" href="#display" id="id79" name="id79">Display</a></li> -<li><a class="reference" href="#long-line-marker" id="id80" name="id80">Long line marker</a></li> +<li><a class="reference" href="#editor-features-tab-in-preferences-dialog" id="id78" name="id78">Editor Features tab in preferences dialog</a><ul> +<li><a class="reference" href="#indentation-group" id="id79" name="id79">Indentation group</a></li> +<li><a class="reference" href="#features" id="id80" name="id80">Features</a></li> </ul> </li> -<li><a class="reference" href="#editor-tab-in-preferences-dialog" id="id81" name="id81">Editor tab in preferences dialog</a><ul> -<li><a class="reference" href="#indentation-group" id="id82" name="id82">Indentation group</a></li> -<li><a class="reference" href="#features" id="id83" name="id83">Features</a></li> -<li><a class="reference" href="#completions" id="id84" name="id84">Completions</a></li> +<li><a class="reference" href="#editor-completions-tab-in-preferences-dialog" id="id81" name="id81">Editor Completions tab in preferences dialog</a></li> +<li><a class="reference" href="#editor-display-tab-in-preferences-dialog" id="id82" name="id82">Editor Display tab in preferences dialog</a><ul> +<li><a class="reference" href="#display" id="id83" name="id83">Display</a></li> +<li><a class="reference" href="#long-line-marker" id="id84" name="id84">Long line marker</a></li> </ul> </li> <li><a class="reference" href="#files-tab-in-preferences-dialog" id="id85" name="id85">Files tab in preferences dialog</a><ul> @@ -902,7 +902,7 @@ <div class="section"> <h3><a class="toc-backref" href="#id33" id="indentation" name="indentation">Indentation</a></h3> <p>Geany allows each document to indent either with a tab character -or multiple spaces. The default indent mode is set in the <a class="reference" href="#editor-tab-in-preferences-dialog">Editor +or multiple spaces. The default indent mode is set in the <a class="reference" href="#editor-features-tab-in-preferences-dialog">Editor Features tab in preferences dialog</a>. But this can be overridden using either the <em>Document->Indent Type</em> menu, or by using the <em>Detect from file</em> indentation preference. When enabled, this scans each file that is opened @@ -1656,54 +1656,10 @@ </div> </div> <div class="section"> -<h3><a class="toc-backref" href="#id78" id="display-tab-in-preferences-dialog" name="display-tab-in-preferences-dialog">Display tab in preferences dialog</a></h3> -<p>This is for visual elements displayed in the editor window.</p> -<img alt="./images/pref_dialog_display.png" src="./images/pref_dialog_display.png" /> -<div class="section"> -<h4><a class="toc-backref" href="#id79" id="display" name="display">Display</a></h4> -<dl class="docutils"> -<dt>Show indendation guides</dt> -<dd>Show vertical lines to help show how much leading indentation there -is on each line.</dd> -<dt>Show whitespaces</dt> -<dd>Mark all tabs with an arrow "-->" symbol and spaces with dots to -show which kinds of whitespace are used.</dd> -<dt>Show line endings</dt> -<dd>Displays a symbol everywhere that a carriage return or line feed -is present.</dd> -</dl> -</div> -<div class="section"> -<h4><a class="toc-backref" href="#id80" id="long-line-marker" name="long-line-marker">Long line marker</a></h4> -<p>The long line marker helps to indicate overly-long lines, or as a hint -to the user for when to break the line.</p> -<dl class="docutils"> -<dt>Type</dt> -<dd><dl class="first last docutils"> -<dt>Line</dt> -<dd>Show a thin vertical line in the editor window at the given column -position.</dd> -<dt>Background</dt> -<dd>Change the background color of characters after the given column -position to the color set below. (This is recommended over the -<em>Line</em> setting if you use proportional fonts).</dd> -<dt>Disabled</dt> -<dd>Don't mark long lines at all.</dd> -</dl> -</dd> -<dt>Long line marker</dt> -<dd>Set this value to a value greater than zero to specify the column -where it should appear.</dd> -<dt>Long line marker color</dt> -<dd>Set the color of the long line marker.</dd> -</dl> -</div> -</div> -<div class="section"> -<h3><a class="toc-backref" href="#id81" id="editor-tab-in-preferences-dialog" name="editor-tab-in-preferences-dialog">Editor tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id78" id="editor-features-tab-in-preferences-dialog" name="editor-features-tab-in-preferences-dialog">Editor Features tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_edit.png" src="./images/pref_dialog_edit.png" /> <div class="section"> -<h4><a class="toc-backref" href="#id82" id="indentation-group" name="indentation-group">Indentation group</a></h4> +<h4><a class="toc-backref" href="#id79" id="indentation-group" name="indentation-group">Indentation group</a></h4> <p>See <a class="reference" href="#indentation">Indentation</a> for more information.</p> <dl class="docutils"> <dt>Type</dt> @@ -1728,7 +1684,7 @@ </dl> </div> <div class="section"> -<h4><a class="toc-backref" href="#id83" id="features" name="features">Features</a></h4> +<h4><a class="toc-backref" href="#id80" id="features" name="features">Features</a></h4> <dl class="docutils"> <dt>Line wrapping</dt> <dd>Show long lines wrapped around to new display lines.</dd> @@ -1755,8 +1711,9 @@ is enabled for the current document.</dd> </dl> </div> +</div> <div class="section"> -<h4><a class="toc-backref" href="#id84" id="completions" name="completions">Completions</a></h4> +<h3><a class="toc-backref" href="#id81" id="editor-completions-tab-in-preferences-dialog" name="editor-completions-tab-in-preferences-dialog">Editor Completions tab in preferences dialog</a></h3> <dl class="docutils"> <dt>Snippet Completion</dt> <dd>Whether to replace special keywords after typing Tab into a @@ -1791,8 +1748,51 @@ <dd>The maximum number of symbols to show in the autocompletion window.</dd> </dl> </div> +<div class="section"> +<h3><a class="toc-backref" href="#id82" id="editor-display-tab-in-preferences-dialog" name="editor-display-tab-in-preferences-dialog">Editor Display tab in preferences dialog</a></h3> +<p>This is for visual elements displayed in the editor window.</p> +<img alt="./images/pref_dialog_display.png" src="./images/pref_dialog_display.png" /> +<div class="section"> +<h4><a class="toc-backref" href="#id83" id="display" name="display">Display</a></h4> +<dl class="docutils"> +<dt>Show indendation guides</dt> +<dd>Show vertical lines to help show how much leading indentation there +is on each line.</dd> +<dt>Show whitespaces</dt> +<dd>Mark all tabs with an arrow "-->" symbol and spaces with dots to +show which kinds of whitespace are used.</dd> +<dt>Show line endings</dt> +<dd>Displays a symbol everywhere that a carriage return or line feed +is present.</dd> +</dl> </div> <div class="section"> +<h4><a class="toc-backref" href="#id84" id="long-line-marker" name="long-line-marker">Long line marker</a></h4> +<p>The long line marker helps to indicate overly-long lines, or as a hint +to the user for when to break the line.</p> +<dl class="docutils"> +<dt>Type</dt> +<dd><dl class="first last docutils"> +<dt>Line</dt> +<dd>Show a thin vertical line in the editor window at the given column +position.</dd> +<dt>Background</dt> +<dd>Change the background color of characters after the given column +position to the color set below. (This is recommended over the +<em>Line</em> setting if you use proportional fonts).</dd> +<dt>Disabled</dt> +<dd>Don't mark long lines at all.</dd> +</dl> +</dd> +<dt>Long line marker</dt> +<dd>Set this value to a value greater than zero to specify the column +where it should appear.</dd> +<dt>Long line marker color</dt> +<dd>Set the color of the long line marker.</dd> +</dl> +</div> +</div> +<div class="section"> <h3><a class="toc-backref" href="#id85" id="files-tab-in-preferences-dialog" name="files-tab-in-preferences-dialog">Files tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" /> <div class="section"> @@ -4141,7 +4141,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference" href="geany.txt">View document source</a>. -Generated on: 2008-06-19 15:57 UTC. +Generated on: 2008-06-24 14:28 UTC. Generated by <a class="reference" href="
http://docutils.sourceforge.net/
">Docutils</a> from <a class="reference" href="
http://docutils.sourceforge.net/rst.html
">reStructuredText</a> source. </div> Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2008-06-24 12:25:23 UTC (rev 2722) +++ trunk/doc/geany.txt 2008-06-24 14:32:54 UTC (rev 2723) @@ -583,7 +583,7 @@ ^^^^^^^^^^^ Geany allows each document to indent either with a tab character -or multiple spaces. The default indent mode is set in the `Editor +or multiple spaces. The default indent mode is set in the `Editor Features tab in preferences dialog`_. But this can be overridden using either the *Document->Indent Type* menu, or by using the *Detect from file* indentation preference. When enabled, this scans each file that is opened @@ -1425,56 +1425,9 @@ Select the size of the icons you see (large or small). -Display tab in preferences dialog -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Editor Features tab in preferences dialog +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -This is for visual elements displayed in the editor window. - -.. image:: ./images/pref_dialog_display.png - - -Display -``````` - -Show indendation guides - Show vertical lines to help show how much leading indentation there - is on each line. - -Show whitespaces - Mark all tabs with an arrow "-->" symbol and spaces with dots to - show which kinds of whitespace are used. - -Show line endings - Displays a symbol everywhere that a carriage return or line feed - is present. - -Long line marker -```````````````` - -The long line marker helps to indicate overly-long lines, or as a hint -to the user for when to break the line. - -Type - Line - Show a thin vertical line in the editor window at the given column - position. - Background - Change the background color of characters after the given column - position to the color set below. (This is recommended over the - *Line* setting if you use proportional fonts). - Disabled - Don't mark long lines at all. - -Long line marker - Set this value to a value greater than zero to specify the column - where it should appear. - -Long line marker color - Set the color of the long line marker. - -Editor tab in preferences dialog -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - .. image:: ./images/pref_dialog_edit.png Indentation group @@ -1536,9 +1489,10 @@ The editor column number to insert a newline at when Line Breaking is enabled for the current document. -Completions -``````````` +Editor Completions tab in preferences dialog +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Snippet Completion Whether to replace special keywords after typing Tab into a pre-defined text snippet. @@ -1576,6 +1530,54 @@ The maximum number of symbols to show in the autocompletion window. +Editor Display tab in preferences dialog +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This is for visual elements displayed in the editor window. + +.. image:: ./images/pref_dialog_display.png + + +Display +``````` + +Show indendation guides + Show vertical lines to help show how much leading indentation there + is on each line. + +Show whitespaces + Mark all tabs with an arrow "-->" symbol and spaces with dots to + show which kinds of whitespace are used. + +Show line endings + Displays a symbol everywhere that a carriage return or line feed + is present. + +Long line marker +```````````````` + +The long line marker helps to indicate overly-long lines, or as a hint +to the user for when to break the line. + +Type + Line + Show a thin vertical line in the editor window at the given column + position. + Background + Change the background color of characters after the given column + position to the color set below. (This is recommended over the + *Line* setting if you use proportional fonts). + Disabled + Don't mark long lines at all. + +Long line marker + Set this value to a value greater than zero to specify the column + where it should appear. + +Long line marker color + Set the color of the long line marker. + + Files tab in preferences dialog ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2008-06-24 12:25:23 UTC (rev 2722) +++ trunk/geany.glade 2008-06-24 14:32:54 UTC (rev 2723) @@ -5275,315 +5275,333 @@ </child> <child> - <widget class="GtkVBox" id="vbox24"> + <widget class="GtkNotebook" id="notebook4"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">10</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> <child> - <widget class="GtkFrame" id="frame5"> + <widget class="GtkVBox" id="vbox5"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="homogeneous">False</property> + <property name="spacing">10</property> <child> - <widget class="GtkAlignment" id="alignment6"> + <widget class="GtkFrame" id="frame27"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">5</property> - <property name="left_padding">12</property> - <property name="right_padding">6</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox12"> + <widget class="GtkAlignment" id="alignment30"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkCheckButton" id="checkbutton1"> - <property name="tooltip" translatable="yes">Use white text on a black background.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Invert syntax highlighting colors</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="check_indent"> + <widget class="GtkVBox" id="vbox25"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Shows small dotted lines to help you to use the right indentation.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show indentation guides</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkCheckButton" id="check_white_space"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Marks spaces with dots and tabs with arrows.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show white space</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkTable" id="table13"> + <property name="visible">True</property> + <property name="n_rows">4</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">3</property> + <property name="column_spacing">24</property> - <child> - <widget class="GtkCheckButton" id="check_line_end"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Show the line ending character</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show line endings</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <child> + <widget class="GtkLabel" id="label183"> + <property name="visible">True</property> + <property name="label" translatable="yes">Auto-indent mode:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkComboBox" id="combo_auto_indent_mode"> + <property name="visible">True</property> + <property name="items" translatable="yes">None +Basic +Current chars +Match braces</property> + <property name="add_tearoffs">False</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="spin_tab_width"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">The width in chars, which one tab character will take</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_IF_VALID</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">True</property> + <property name="adjustment">1 1 99 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label116"> + <property name="visible">True</property> + <property name="label" translatable="yes">Tab width:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox8"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkRadioButton" id="radio_indent_tabs"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Tabs</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radio_indent_spaces"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">_Spaces</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_indent_tabs</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label200"> + <property name="visible">True</property> + <property name="label" translatable="yes">Type:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="check_detect_indent"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Whether to detect the indentation type from file contents when a file is opened.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Detect from file</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> </child> </widget> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label102"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Display</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <child> + <widget class="GtkLabel" id="label195"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Indentation</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> </packing> </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> - </child> - <child> - <widget class="GtkFrame" id="frame8"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - <child> - <widget class="GtkAlignment" id="alignment11"> + <widget class="GtkFrame" id="frame14"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkTable" id="table7"> + <widget class="GtkAlignment" id="alignment17"> <property name="visible">True</property> - <property name="n_rows">3</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">3</property> - <property name="column_spacing">24</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> <child> - <widget class="GtkLabel" id="label133"> + <widget class="GtkVBox" id="vbox17"> <property name="visible">True</property> - <property name="label" translatable="yes">Long line marker:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label134"> - <property name="visible">True</property> - <property name="label" translatable="yes">Long line marker color:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label156"> - <property name="visible">True</property> - <property name="label" translatable="yes">Type:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkColorButton" id="long_line_color"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Sets the color of the long line marker</property> - <property name="can_focus">True</property> - <property name="use_alpha">False</property> - <property name="title" translatable="yes">Color Chooser</property> - <property name="focus_on_click">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="spin_long_line"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">The long line marker is a thin vertical line in the editor. It helps to mark long lines, or as a hint to break the line. Set this value to a value greater than 0 to specify the column where it should appear.</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">True</property> - <property name="adjustment">72 0 1000 1 10 10</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox5"> - <property name="visible">True</property> <property name="homogeneous">False</property> - <property name="spacing">12</property> + <property name="spacing">0</property> <child> - <widget class="GtkRadioButton" id="radio_long_line_line"> + <widget class="GtkCheckButton" id="check_line_wrapping"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Prints a vertical line in the editor window at the given cursor position (see below).</property> + <property name="tooltip" translatable="yes">Wrap the line at the window border and continue it on the next line. Note: line wrapping has a high performance cost for large documents so should be disabled on slow machines.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Line</property> + <property name="label" translatable="yes">Line wrapping</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -5599,18 +5617,17 @@ </child> <child> - <widget class="GtkRadioButton" id="radio_long_line_background"> + <widget class="GtkCheckButton" id="check_smart_home"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">The background color of characters after the given cursor position (see below) changed to the color set below. (This is recommended if you use proportional fonts)</property> + <property name="tooltip" translatable="yes">When "smart" home is enabled, the HOME key will move the caret to the first non-blank character of the line, unless it is already there, it moves to the very beginning of the line. When this feature is disabled, the HOME key always moves the caret to the start of the current line, regardless of its current position.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Background</property> + <property name="label" translatable="yes">Enable "smart" home key</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="focus_on_click">False</property> <property name="active">False</property> <property name="inconsistent">False</property> <property name="draw_indicator">True</property> - <property name="group">radio_long_line_line</property> </widget> <packing> <property name="padding">0</property> @@ -5620,17 +5637,17 @@ </child> <child> - <widget class="GtkRadioButton" id="radio_long_line_disabled"> + <widget class="GtkCheckButton" id="check_disable_dnd"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Disable drag and drop completely in the editor window so you can't drag and drop any selections within or outside of the editor window.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Disabled</property> + <property name="label" translatable="yes">Disable Drag and Drop</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> + <property name="focus_on_click">False</property> <property name="active">False</property> <property name="inconsistent">False</property> <property name="draw_indicator">True</property> - <property name="group">radio_long_line_line</property> </widget> <packing> <property name="padding">0</property> @@ -5638,237 +5655,110 @@ <property name="fill">False</property> </packing> </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> - </packing> - </child> - </widget> - </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label155"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Long line marker</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">label_item</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> - </packing> - </child> - </widget> - <packing> - <property name="tab_expand">False</property> - <property name="tab_fill">True</property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label194"> - <property name="visible">True</property> - <property name="label" translatable="yes">Display</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="type">tab</property> - </packing> - </child> - - <child> - <widget class="GtkVBox" id="vbox5"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">10</property> - - <child> - <widget class="GtkFrame" id="frame27"> - <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> - - <child> - <widget class="GtkAlignment" id="alignment30"> - <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> - - <child> - <widget class="GtkVBox" id="vbox25"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkTable" id="table13"> - <property name="visible">True</property> - <property name="n_rows">4</property> - <property name="n_columns">2</property> - <property name="homogeneous">False</property> - <property name="row_spacing">3</property> - <property name="column_spacing">24</property> - <child> - <widget class="GtkLabel" id="label183"> + <widget class="GtkCheckButton" id="check_folding"> <property name="visible">True</property> - <property name="label" translatable="yes">Auto-indent mode:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="tooltip" translatable="yes">Whether to enable folding the code</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Enable folding</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkComboBox" id="combo_auto_indent_mode"> + <widget class="GtkCheckButton" id="check_unfold_children"> <property name="visible">True</property> - <property name="items" translatable="yes">None -Basic -Current chars -Match braces</property> - <property name="add_tearoffs">False</property> - <property name="focus_on_click">True</property> + <property name="tooltip" translatable="yes">Fold or unfold all children of a fold point. By pressing the Shift key while clicking on a fold symbol the contrary behavior is used.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Fold/Unfold all children of a fold point</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options">fill</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_tab_width"> + <widget class="GtkCheckButton" id="check_indicators"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">The width in chars, which one tab character will take</property> + <property name="tooltip" translatable="yes">Whether to use indicators (a squiggly underline) to highlight the lines where the compiler found a warning or an error.</property> <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_IF_VALID</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">True</property> - <property name="adjustment">1 1 99 1 10 10</property> + <property name="label" translatable="yes">Use indicators to show compile errors</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkLabel" id="label116"> + <widget class="GtkCheckButton" id="check_newline_strip"> <property name="visible">True</property> - <property name="label" translatable="yes">Tab width:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <property name="tooltip" translatable="yes">Enable newline to strip the trailing spaces on the previous line.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Newline strips trailing spaces</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> <child> - <widget class="GtkHBox" id="hbox8"> + <widget class="GtkHBox" id="hbox11"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">12</property> <child> - <widget class="GtkRadioButton" id="radio_indent_tabs"> + <widget class="GtkLabel" id="label209"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">_Tabs</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <property name="label" translatable="yes">Line breaking column:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> <property name="padding">0</property> @@ -5878,136 +5768,107 @@ </child> <child> - <widget class="GtkRadioButton" id="radio_indent_spaces"> + <widget class="GtkSpinButton" id="spin_line_break"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Whether to use tabs or spaces when indentation is inserted.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">_Spaces</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - <property name="group">radio_indent_tabs</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">72 3 1000 1 10 10</property> </widget> <packing> <property name="padding">0</property> <property name="expand">False</property> - <property name="fill">False</property> + <property name="fill">True</property> </packing> </child> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> - - <child> - <widget class="GtkLabel" id="label200"> - <property name="visible">True</property> - <property name="label" translatable="yes">Type:</property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="check_detect_indent"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Whether to detect the indentation type from file contents when a file is opened.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Detect from file</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> - </packing> </child> </widget> </child> - </widget> - </child> - <child> - <widget class="GtkLabel" id="label195"> - <property name="visible">True</property> - <property name="label" translatable="yes"><b>Indentation</b></property> - <property name="use_underline">False</property> - <property name="use_markup">True</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> - <property name="width_chars">-1</property> - <property name="single_line_mode">False</property> - <property name="angle">0</property> + <child> + <widget class="GtkLabel" id="label172"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Features</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> </widget> <packing> - <property name="type">label_item</property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> </packing> </child> + + <child> + <placeholder/> + </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame14"> + <widget class="GtkLabel" id="label211"> <property name="visible">True</property> + <property name="label" translatable="yes">Features</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame18"> + <property name="visible">True</property> <property name="label_xalign">0</property> <property name="label_yalign">0.5</property> <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkAlignment" id="alignment17"> + <widget class="GtkAlignment" id="alignment21"> <property name="visible">True</property> <property name="xalign">0.5</property> <property name="yalign">0.5</property> @@ -6019,39 +5880,19 @@ <property name="right_padding">0</property> <child> - <widget class="GtkVBox" id="vbox17"> + <widget class="GtkVBox" id="vbox19"> <property name="visible">True</property> <property name="homogeneous">False</property> <property name="spacing">0</property> <child> - <widget class="GtkCheckButton" id="check_line_wrapping"> + <widget class="GtkCheckButton" id="check_complete_snippets"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Wrap the line at the window border and continue it on the next line. Note: line wrapping has a high performance cost for large documents so should be disabled on slow machines.</property> + <property name="tooltip" translatable="yes">Type a defined short character sequence and complete it to a more complex string using a single keypress.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Line wrapping</property> + <property name="label" translatable="yes">Snippet completion</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">True</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="check_smart_home"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">When "smart" home is enabled, the HOME key will move the caret to the first non-blank character of the line, unless it is already there, it moves to the very beginning of the line. When this feature is disabled, the HOME key always moves the caret to the start of the current line, regardless of its current position.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable "smart" home key</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property> <property name="active">False</property> <property name="inconsistent">False</property> @@ -6065,11 +5906,11 @@ </child> <child> - <widget class="GtkCheckButton" id="check_disable_dnd"> + <widget class="GtkCheckButton" id="check_xmltag"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Disable drag and drop completely in the editor window so you can't drag and drop any selections within or outside of the editor window.</property> + <property name="tooltip" translatable="yes">Automatic completion and closing of XML tags (includes HTML tags)</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Disable Drag and Drop</property> + <property name="label" translatable="yes">XML tag auto completion</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property> @@ -6085,11 +5926,11 @@ </child> <child> - <widget class="GtkCheckButton" id="check_folding"> + <widget class="GtkCheckButton" id="check_auto_multiline"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Whether to enable folding the code</property> + <property name="tooltip" translatable="yes">Continue automatically multi-line comments in languages like C, C++ and Java when a new line is entered inside such a comment.</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Enable folding</property> + <property name="label" translatable="yes">Automatic continuation multi-line comments</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property> @@ -6105,11 +5946,11 @@ </child> <child> - <widget class="GtkCheckButton" id="check_unfold_children"> + <widget class="GtkCheckButton" id="check_symbol_auto_completion"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Fold or unfold all children of a fold point. By pressing the Shift key while clicking on a fold symbol the contrary behavior is used.</property> + <property name="tooltip" translatable="yes">Automatic completion of known symbols in open files (function names, global variables, ...)</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Fold/Unfold all children of a fold point</property> + <property name="label" translatable="yes">Automatic symbol completion</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property> @@ -6125,61 +5966,74 @@ </child> <child> - <widget class="GtkCheckButton" id="check_indicators"> + <widget class="GtkTable" id="table14"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Whether to use indicators (a squiggly underline) to highlight the lines where the compiler found a warning or an error.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Use indicators to show compile errors</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="n_rows">2</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">3</property> + <property name="column_spacing">12</property> - <child> - <widget class="GtkCheckButton" id="check_newline_strip"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Enable newline to strip the trailing spaces on the previous line.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Newline strips trailing spaces</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkSpinButton" id="spin_symbollistheight"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Number of rows to display in the auto completion list.</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">True</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">9 1 99 1 10 10</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> - <child> - <widget class="GtkHBox" id="hbox11"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> + <child> + <widget class="GtkLabel" id="label205"> + <property name="visible">True</property> + <property name="label" translatable="yes">Characters to type for completion:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> <child> - <widget class="GtkLabel" id="label209"> + <widget class="GtkLabel" id="label173"> <property name="visible">True</property> - <property name="label" translatable="yes">Line breaking column:</property> + <property name="label" translatable="yes">Rows of symbol completion list:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> <property name="selectable">False</property> - <property name="xalign">0.5</property> + <property name="xalign">0</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> @@ -6189,15 +6043,19 @@ <property name="angle">0</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_line_break"> + <widget class="GtkSpinButton" id="spin_symbol_complete_chars"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">The amount of characters which are necessary to show the symbol auto completion list.</property> <property name="can_focus">True</property> <property name="climb_rate">1</property> <property name="digits">0</property> @@ -6205,12 +6063,14 @@ <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> <property name="wrap">False</property> - <property name="adjustment">72 3 1000 1 10 10</property> + <property name="adjustment">9 1 99 1 10 10</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> </packing> </child> </widget> @@ -6226,9 +6086,9 @@ </child> <child> - <widget class="GtkLabel" id="label172"> + <widget class="GtkLabel" id="label177"> <property name="visible">True</property> - <property name="label" translatable="yes"><b>Features</b></property> + <property name="label" translatable="yes"><b>Completions</b></property> <property name="use_underline">False</property> <property name="use_markup">True</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -6249,152 +6109,238 @@ </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> </packing> </child> <child> - <widget class="GtkFrame" id="frame18"> + <widget class="GtkLabel" id="label212"> <property name="visible">True</property> - <property name="label_xalign">0</property> - <property name="label_yalign">0.5</property> - <property name="shadow_type">GTK_SHADOW_NONE</property> + <property name="label" translatable="yes">Completions</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + <child> + <widget class="GtkVBox" id="vbox24"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">10</property> + <child> - <widget class="GtkAlignment" id="alignment21"> + <widget class="GtkFrame" id="frame5"> <property name="visible">True</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xscale">1</property> - <property name="yscale">1</property> - <property name="top_padding">0</property> - <property name="bottom_padding">0</property> - <property name="left_padding">12</property> - <property name="right_padding">0</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> <child> - <widget class="GtkVBox" id="vbox19"> + <widget class="GtkAlignment" id="alignment6"> <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">5</property> + <property name="left_padding">12</property> + <property name="right_padding">6</property> <child> - <widget class="GtkCheckButton" id="check_complete_snippets"> + <widget class="GtkVBox" id="vbox12"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Type a defined short character sequence and complete it to a more complex string using a single keypress.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Snippet completion</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <property name="homogeneous">False</property> + <property name="spacing">0</property> - <child> - <widget class="GtkCheckButton" id="check_xmltag"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Automatic completion and closing of XML tags (includes HTML tags)</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">XML tag auto completion</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkCheckButton" id="checkbutton1"> + <property name="tooltip" translatable="yes">Use white text on a black background.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Invert syntax highlighting colors</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> - <child> - <widget class="GtkCheckButton" id="check_auto_multiline"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Continue automatically multi-line comments in languages like C, C++ and Java when a new line is entered inside such a comment.</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Automatic continuation multi-line comments</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> + <child> + <widget class="GtkCheckButton" id="check_indent"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Shows small dotted lines to help you to use the right indentation.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show indentation guides</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> - <child> - <widget class="GtkCheckButton" id="check_symbol_auto_completion"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Automatic completion of known symbols in open files (function names, global variables, ...)</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Automatic symbol completion</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="focus_on_click">False</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <child> + <widget class="GtkCheckButton" id="check_white_space"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Marks spaces with dots and tabs with arrows.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show white space</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkCheckButton" id="check_line_end"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Show the line ending character</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show line endings</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">False</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> </child> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label102"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Display</b></property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + </widget> + <packing> + <property name="type">label_item</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkFrame" id="frame8"> + <property name="visible">True</property> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property> + + <child> + <widget class="GtkAlignment" id="alignment11"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">1</property> + <property name="yscale">1</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">12</property> + <property name="right_padding">0</property> + <child> - <widget class="GtkTable" id="table14"> + <widget class="GtkTable" id="table7"> <property name="visible">True</property> - <property name="n_rows">2</property> + <property name="n_rows">3</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">3</property> - <property name="column_spacing">12</property> + <property name="column_spacing">24</property> <child> - <widget class="GtkSpinButton" id="spin_symbollistheight"> + <widget class="GtkLabel" id="label133"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Number of rows to display in the auto completion list.</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">True</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> + <property name="label" translatable="yes">Long line marker:</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> <property name="wrap">False</property> - <property name="adjustment">9 1 99 1 10 10</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label205"> + <widget class="GtkLabel" id="label134"> <property name="visible">True</property> - <property name="label" translatable="yes">Characters to type for completion:</property> + <property name="label" translatable="yes">Long line marker color:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -6412,17 +6358,17 @@ <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label173"> + <widget class="GtkLabel" id="label156"> <property name="visible">True</property> - <property name="label" translatable="yes">Rows of symbol completion list:</property> + <property name="label" translatable="yes">Type:</property> <property name="use_underline">False</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -6440,75 +6386,194 @@ <packing> <property name="left_attach">0</property> <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkSpinButton" id="spin_symbol_complete_chars"> + <widget class="GtkColorButton" id="long_line_color"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">The amount of characters which are necessary to show the symbol auto completion list.</property> + <property name="tooltip" translatable="yes">Sets the color of the long line marker</property> <property name="can_focus">True</property> + <property name="use_alpha">False</property> + <property name="title" translatable="yes">Color Chooser</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkSpinButton" id="spin_long_line"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">The long line marker is a thin vertical line in the editor. It helps to mark long lines, or as a hint to break the line. Set this value to a value greater than 0 to specify the column where it should appear.</property> + <property name="can_focus">True</property> <property name="climb_rate">1</property> <property name="digits">0</property> <property name="numeric">True</property> <property name="update_policy">GTK_UPDATE_ALWAYS</property> <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">9 1 99 1 10 10</property> + <property name="wrap">True</property> + <property name="adjustment">72 0 1000 1 10 10</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">12</property> + + <child> + <widget class="GtkRadioButton" id="radio_long_line_line"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Prints a vertical line in the editor window at the given cursor position (see below).</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Line</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkRadioButton" id="radio_long_line_background"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">The background color of characters after the given cursor position (see below) changed to the color set below. (This is recommended if you use proportional fonts)</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Background</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> + <property name="group">radio_long_line_line</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> @@ Diff output truncated at 100000 characters. @@ This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2722] trunk
by ntrel@users.sourceforge.net
24 Jun '08
24 Jun '08
Revision: 2722
http://geany.svn.sourceforge.net/geany/?rev=2722&view=rev
Author: ntrel Date: 2008-06-24 05:25:23 -0700 (Tue, 24 Jun 2008) Log Message: ----------- Make keyboard shortcuts dialog non-modal (#1999384). Modified Paths: -------------- trunk/ChangeLog trunk/src/keybindings.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-21 16:22:51 UTC (rev 2721) +++ trunk/ChangeLog 2008-06-24 12:25:23 UTC (rev 2722) @@ -1,3 +1,9 @@ +2008-06-24 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/keybindings.c: + Make keyboard shortcuts dialog non-modal (#1999384). + + 2008-06-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/win32.c: Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-06-21 16:22:51 UTC (rev 2721) +++ trunk/src/keybindings.c 2008-06-24 12:25:23 UTC (rev 2722) @@ -673,12 +673,12 @@ } -void keybindings_show_shortcuts(void) +static GtkWidget *create_dialog(void) { GtkWidget *dialog, *hbox, *label1, *label2, *label3, *swin, *vbox; GString *text_names; GString *text_keys; - gint height, response; + gint height; dialog = gtk_dialog_new_with_buttons(_("Keyboard Shortcuts"), GTK_WINDOW(main_widgets.window), GTK_DIALOG_DESTROY_WITH_PARENT, @@ -720,9 +720,15 @@ gtk_box_pack_start(GTK_BOX(vbox), label3, FALSE, FALSE, 6); gtk_box_pack_start(GTK_BOX(vbox), swin, TRUE, TRUE, 0); + return dialog; +} - gtk_widget_show_all(dialog); - response = gtk_dialog_run(GTK_DIALOG(dialog)); + +/* non-modal keyboard shortcuts dialog, so user can edit whilst seeing the shortcuts */ +static GtkWidget *key_dialog = NULL; + +static void on_dialog_response(GtkWidget *dialog, gint response, gpointer user_data) +{ if (response == GTK_RESPONSE_APPLY) { GtkWidget *wid; @@ -738,11 +744,22 @@ gtk_notebook_set_current_page(nb, gtk_notebook_page_num(nb, wid)); } } - gtk_widget_destroy(dialog); + key_dialog = NULL; } +void keybindings_show_shortcuts(void) +{ + if (key_dialog) + gtk_widget_destroy(key_dialog); /* in case the key_dialog is still visible */ + + key_dialog = create_dialog(); + g_signal_connect(key_dialog, "response", G_CALLBACK(on_dialog_response), NULL); + gtk_widget_show_all(key_dialog); +} + + static gboolean check_fixed_kb(guint keyval, guint state) { /* check alt-0 to alt-9 for setting current notebook page */ This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2721] trunk
by ntrel@users.sourceforge.net
21 Jun '08
21 Jun '08
Revision: 2721
http://geany.svn.sourceforge.net/geany/?rev=2721&view=rev
Author: ntrel Date: 2008-06-21 09:22:51 -0700 (Sat, 21 Jun 2008) Log Message: ----------- Fix Windows build. Modified Paths: -------------- trunk/ChangeLog trunk/src/win32.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-20 17:10:51 UTC (rev 2720) +++ trunk/ChangeLog 2008-06-21 16:22:51 UTC (rev 2721) @@ -1,3 +1,9 @@ +2008-06-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> + + * src/win32.c: + Fix Windows build. + + 2008-06-20 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> * src/document.c, src/documentprivate.h: Modified: trunk/src/win32.c =================================================================== --- trunk/src/win32.c 2008-06-20 17:10:51 UTC (rev 2720) +++ trunk/src/win32.c 2008-06-21 16:22:51 UTC (rev 2721) @@ -381,8 +381,6 @@ } else { /* open multiple files */ - document_delay_colourise(); - for (; ;) { if (! fname[x]) @@ -399,7 +397,6 @@ } x++; } - document_colourise_new(); } } else This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
SF.net SVN: geany: [2720] trunk
by ntrel@users.sourceforge.net
20 Jun '08
20 Jun '08
Revision: 2720
http://geany.svn.sourceforge.net/geany/?rev=2720&view=rev
Author: ntrel Date: 2008-06-20 10:10:51 -0700 (Fri, 20 Jun 2008) Log Message: ----------- Move on_editor_expose_event(), create_new_sci() to editor.c. Make on_editor_button_press_event() and on_editor_scroll_event() static. Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c trunk/src/editor.c trunk/src/editor.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-20 14:19:57 UTC (rev 2719) +++ trunk/ChangeLog 2008-06-20 17:10:51 UTC (rev 2720) @@ -12,6 +12,10 @@ * src/callbacks.c, src/keyfile.c, src/document.c, src/document.h, src/main.c, src/socket.c: Remove document_delay_colourise(), document_colourise_all(). + * src/document.c, src/editor.c, src/editor.h: + Move on_editor_expose_event(), create_new_sci() to editor.c. + Make on_editor_button_press_event() and on_editor_scroll_event() + static. 2008-06-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-06-20 14:19:57 UTC (rev 2719) +++ trunk/src/document.c 2008-06-20 17:10:51 UTC (rev 2720) @@ -65,7 +65,6 @@ #include "vte.h" #include "build.h" #include "symbols.h" -#include "callbacks.h" #include "geanyobject.h" #include "highlighting.h" #include "navqueue.h" @@ -372,36 +371,6 @@ } -static void setup_sci_keys(ScintillaObject *sci) -{ - /* disable some Scintilla keybindings to be able to redefine them cleanly */ - sci_clear_cmdkey(sci, 'A' | (SCMOD_CTRL << 16)); /* select all */ - sci_clear_cmdkey(sci, 'D' | (SCMOD_CTRL << 16)); /* duplicate */ - sci_clear_cmdkey(sci, 'T' | (SCMOD_CTRL << 16)); /* line transpose */ - sci_clear_cmdkey(sci, 'T' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line copy */ - sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16)); /* line cut */ - sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */ - sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */ - sci_clear_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16)); /* scroll line down */ - - if (editor_prefs.use_gtk_word_boundaries) - { - /* use GtkEntry-like word boundaries */ - sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16), SCI_WORDRIGHTEND); - sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_WORDRIGHTENDEXTEND); - sci_assign_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16), SCI_DELWORDRIGHTEND); - } - sci_assign_cmdkey(sci, SCK_UP | (SCMOD_ALT << 16), SCI_LINESCROLLUP); - sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_ALT << 16), SCI_LINESCROLLDOWN); - sci_assign_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16), SCI_PARAUP); - sci_assign_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_PARAUPEXTEND); - sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16), SCI_PARADOWN); - sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_PARADOWNEXTEND); - - sci_clear_cmdkey(sci, SCK_BACK | (SCMOD_ALT << 16)); /* clear Alt-Backspace (Undo) */ -} - - static void queue_colourise(GeanyDocument *doc) { /* Colourise the editor before it is next drawn */ @@ -415,75 +384,6 @@ } -static void editor_colourise(ScintillaObject *sci) -{ - sci_colourise(sci, 0, -1); - - /* now that the current document is colourised, fold points are now accurate, - * so force an update of the current function/tag. */ - utils_get_current_function(NULL, NULL); - ui_update_statusbar(NULL, -1); -} - - -static gboolean on_editor_expose_event(GtkWidget *widget, GdkEventExpose *event, - gpointer user_data) -{ - GeanyDocument *doc = user_data; - - if (DOCUMENT(doc)->colourise_needed) - { - editor_colourise(doc->sci); - DOCUMENT(doc)->colourise_needed = FALSE; - } - return FALSE; /* propagate event */ -} - - -/* Create new editor (the scintilla widget) */ -static ScintillaObject *create_new_sci(GeanyDocument *doc) -{ - ScintillaObject *sci; - - sci = SCINTILLA(scintilla_new()); - scintilla_set_id(sci, doc->index); - - gtk_widget_show(GTK_WIDGET(sci)); - - sci_set_codepage(sci, SC_CP_UTF8); - /*SSM(sci, SCI_SETWRAPSTARTINDENT, 4, 0);*/ - /* disable scintilla provided popup menu */ - sci_use_popup(sci, FALSE); - - setup_sci_keys(sci); - - sci_set_tab_indents(sci, editor_prefs.use_tab_to_indent); - sci_set_symbol_margin(sci, editor_prefs.show_markers_margin); - sci_set_lines_wrapped(sci, editor_prefs.line_wrapping); - sci_set_scrollbar_mode(sci, editor_prefs.show_scrollbars); - sci_set_caret_policy_x(sci, CARET_JUMPS | CARET_EVEN, 0); - /*sci_set_caret_policy_y(sci, CARET_JUMPS | CARET_EVEN, 0);*/ - SSM(sci, SCI_AUTOCSETSEPARATOR, '\n', 0); - /* (dis)allow scrolling past end of document */ - SSM(sci, SCI_SETENDATLASTLINE, editor_prefs.scroll_stop_at_last_line, 0); - SSM(sci, SCI_SETSCROLLWIDTHTRACKING, 1, 0); - - /* signal for insert-key(works without too, but to update the right status bar) */ - /*g_signal_connect((GtkWidget*) sci, "key-press-event", - G_CALLBACK(keybindings_got_event), GINT_TO_POINTER(new_idx));*/ - /* signal for the popup menu */ - g_signal_connect(G_OBJECT(sci), "button-press-event", - G_CALLBACK(on_editor_button_press_event), doc); - g_signal_connect(G_OBJECT(sci), "scroll-event", - G_CALLBACK(on_editor_scroll_event), doc); - g_signal_connect(G_OBJECT(sci), "motion-notify-event", G_CALLBACK(on_motion_event), NULL); - g_signal_connect(G_OBJECT(sci), "expose-event", - G_CALLBACK(on_editor_expose_event), doc); - - return sci; -} - - /* Creates a new document and editor, adding a tab in the notebook. * @return The index of the created document */ static GeanyDocument *document_create(const gchar *utf8_filename) @@ -516,7 +416,7 @@ this->file_name = g_strdup(utf8_filename); - this->sci = create_new_sci(this); + this->sci = editor_create_new_sci(this); document_apply_update_prefs(this); Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2008-06-20 14:19:57 UTC (rev 2719) +++ trunk/src/editor.c 2008-06-20 17:10:51 UTC (rev 2720) @@ -46,6 +46,7 @@ #include "utils.h" #include "dialogs.h" #include "symbols.h" +#include "callbacks.h" /* holds word under the mouse or keyboard cursor */ @@ -79,7 +80,7 @@ /* calls the edit popup menu in the editor */ -gboolean +static gboolean on_editor_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) @@ -3325,7 +3326,8 @@ } -gboolean on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) +static gboolean +on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { /* Handle scroll events if Shift or Alt is pressed and scroll whole pages instead of a * few lines only, maybe this could/should be done in Scintilla directly */ @@ -3340,3 +3342,103 @@ } +static void editor_colourise(ScintillaObject *sci) +{ + sci_colourise(sci, 0, -1); + + /* now that the current document is colourised, fold points are now accurate, + * so force an update of the current function/tag. */ + utils_get_current_function(NULL, NULL); + ui_update_statusbar(NULL, -1); +} + + +static gboolean on_editor_expose_event(GtkWidget *widget, GdkEventExpose *event, + gpointer user_data) +{ + GeanyDocument *doc = user_data; + + if (DOCUMENT(doc)->colourise_needed) + { + editor_colourise(doc->sci); + DOCUMENT(doc)->colourise_needed = FALSE; + } + return FALSE; /* propagate event */ +} + + +static void setup_sci_keys(ScintillaObject *sci) +{ + /* disable some Scintilla keybindings to be able to redefine them cleanly */ + sci_clear_cmdkey(sci, 'A' | (SCMOD_CTRL << 16)); /* select all */ + sci_clear_cmdkey(sci, 'D' | (SCMOD_CTRL << 16)); /* duplicate */ + sci_clear_cmdkey(sci, 'T' | (SCMOD_CTRL << 16)); /* line transpose */ + sci_clear_cmdkey(sci, 'T' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line copy */ + sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16)); /* line cut */ + sci_clear_cmdkey(sci, 'L' | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16)); /* line delete */ + sci_clear_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16)); /* scroll line up */ + sci_clear_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16)); /* scroll line down */ + + if (editor_prefs.use_gtk_word_boundaries) + { + /* use GtkEntry-like word boundaries */ + sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16), SCI_WORDRIGHTEND); + sci_assign_cmdkey(sci, SCK_RIGHT | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_WORDRIGHTENDEXTEND); + sci_assign_cmdkey(sci, SCK_DELETE | (SCMOD_CTRL << 16), SCI_DELWORDRIGHTEND); + } + sci_assign_cmdkey(sci, SCK_UP | (SCMOD_ALT << 16), SCI_LINESCROLLUP); + sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_ALT << 16), SCI_LINESCROLLDOWN); + sci_assign_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16), SCI_PARAUP); + sci_assign_cmdkey(sci, SCK_UP | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_PARAUPEXTEND); + sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16), SCI_PARADOWN); + sci_assign_cmdkey(sci, SCK_DOWN | (SCMOD_CTRL << 16) | (SCMOD_SHIFT << 16), SCI_PARADOWNEXTEND); + + sci_clear_cmdkey(sci, SCK_BACK | (SCMOD_ALT << 16)); /* clear Alt-Backspace (Undo) */ +} + + +/* Create new editor widget (scintilla). + * @note The @c "sci-notify" signal is connected separately. */ +ScintillaObject *editor_create_new_sci(GeanyDocument *doc) +{ + ScintillaObject *sci; + + sci = SCINTILLA(scintilla_new()); + scintilla_set_id(sci, doc->index); + + gtk_widget_show(GTK_WIDGET(sci)); + + sci_set_codepage(sci, SC_CP_UTF8); + /*SSM(sci, SCI_SETWRAPSTARTINDENT, 4, 0);*/ + /* disable scintilla provided popup menu */ + sci_use_popup(sci, FALSE); + + setup_sci_keys(sci); + + sci_set_tab_indents(sci, editor_prefs.use_tab_to_indent); + sci_set_symbol_margin(sci, editor_prefs.show_markers_margin); + sci_set_lines_wrapped(sci, editor_prefs.line_wrapping); + sci_set_scrollbar_mode(sci, editor_prefs.show_scrollbars); + sci_set_caret_policy_x(sci, CARET_JUMPS | CARET_EVEN, 0); + /*sci_set_caret_policy_y(sci, CARET_JUMPS | CARET_EVEN, 0);*/ + SSM(sci, SCI_AUTOCSETSEPARATOR, '\n', 0); + /* (dis)allow scrolling past end of document */ + SSM(sci, SCI_SETENDATLASTLINE, editor_prefs.scroll_stop_at_last_line, 0); + SSM(sci, SCI_SETSCROLLWIDTHTRACKING, 1, 0); + + /* signal for insert-key(works without too, but to update the right status bar) */ + /*g_signal_connect((GtkWidget*) sci, "key-press-event", + G_CALLBACK(keybindings_got_event), GINT_TO_POINTER(new_idx));*/ + /* signal for the popup menu */ + g_signal_connect(G_OBJECT(sci), "button-press-event", + G_CALLBACK(on_editor_button_press_event), doc); + g_signal_connect(G_OBJECT(sci), "scroll-event", + G_CALLBACK(on_editor_scroll_event), doc); + g_signal_connect(G_OBJECT(sci), "motion-notify-event", G_CALLBACK(on_motion_event), NULL); + g_signal_connect(G_OBJECT(sci), "expose-event", + G_CALLBACK(on_editor_expose_event), doc); + + return sci; +} + + Modified: trunk/src/editor.h =================================================================== --- trunk/src/editor.h 2008-06-20 14:19:57 UTC (rev 2719) +++ trunk/src/editor.h 2008-06-20 17:10:51 UTC (rev 2720) @@ -110,8 +110,7 @@ -gboolean on_editor_button_press_event(GtkWidget *widget, GdkEventButton *event, - gpointer user_data); +ScintillaObject *editor_create_new_sci(GeanyDocument *doc); void on_editor_notification(GtkWidget* editor, gint scn, gpointer lscn, gpointer user_data); @@ -205,6 +204,4 @@ gboolean editor_goto_pos(GeanyDocument *doc, gint pos, gboolean mark); -gboolean on_editor_scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data); - #endif This was sent by the
SourceForge.net
collaborative development platform, the world's largest Open Source development site.
1
0
0
0
← Newer
1
2
3
4
5
...
11
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
Results per page:
10
25
50
100
200