Revision: 4517 http://geany.svn.sourceforge.net/geany/?rev=4517&view=rev Author: eht16 Date: 2009-12-31 15:48:39 +0000 (Thu, 31 Dec 2009)
Log Message: ----------- Add a checkbox in the preferences dialog to explicitly toggle the visibility of the sidebar (closes #2923340).
Modified Paths: -------------- trunk/ChangeLog trunk/doc/geany.html trunk/doc/geany.txt trunk/geany.glade trunk/src/callbacks.c trunk/src/interface.c trunk/src/prefs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/ChangeLog 2009-12-31 15:48:39 UTC (rev 4517) @@ -5,8 +5,12 @@ * plugins/geanyfunctions.h, src/plugins.c, src/plugindata.h, src/sciwrappers.c: Add sci_find_text() to the plugin API. + * doc/geany.html, doc/geany.txt, geany.glade, src/callbacks.c, + src/interface.c, src/prefs.c: + Add a checkbox in the preferences dialog to explicitly toggle + the visibility of the sidebar (closes #2923340). +
- 2009-12-29 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/editor.c, src/plugins.c, src/plugindata.h,
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/doc/geany.html 2009-12-31 15:48:39 UTC (rev 4517) @@ -6,7 +6,7 @@ <meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2009-12-29" /> +<meta name="date" content="2009-12-31" /> <style type="text/css">
/* @@ -139,7 +139,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2009-12-29</td></tr> +<td>2009-12-31</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.19</td></tr> </tbody> @@ -2017,6 +2017,8 @@ <div class="section" id="sidebar"> <h4><a class="toc-backref" href="#id93">Sidebar</a></h4> <dl class="docutils"> +<dt>Show sidebar</dt> +<dd>Whether to show the sidebar at all.</dd> <dt>Show symbol list</dt> <dd>Show the list of functions, variables, and other information in the current document you are editing.</dd> @@ -5847,7 +5849,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference external" href="geany.txt">View document source</a>. -Generated on: 2009-12-29 17:04 UTC. +Generated on: 2009-12-31 15:43 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/doc/geany.txt 2009-12-31 15:48:39 UTC (rev 4517) @@ -1687,6 +1687,9 @@ Sidebar ```````
+Show sidebar + Whether to show the sidebar at all. + Show symbol list Show the list of functions, variables, and other information in the current document you are editing.
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/geany.glade 2009-12-31 15:48:39 UTC (rev 4517) @@ -3885,37 +3885,90 @@ <property name="spacing">0</property>
<child> - <widget class="GtkCheckButton" id="check_list_symbol"> + <widget class="GtkFrame" id="frame39"> <property name="visible">True</property> - <property name="tooltip" translatable="yes">Toggle the symbol list on and off</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show symbol list</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> + <property name="label_xalign">0</property> + <property name="label_yalign">0.5</property> + <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child> - <widget class="GtkCheckButton" id="check_list_openfiles"> - <property name="visible">True</property> - <property name="tooltip" translatable="yes">Toggle the documents list on and off</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Show documents list</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> + <child> + <widget class="GtkAlignment" id="alignment46"> + <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="vbox46"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkCheckButton" id="check_list_symbol"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Toggle the symbol list on and off</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show symbol list</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_list_openfiles"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Toggle the documents list on and off</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show documents list</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="GtkCheckButton" id="check_sidebar_visible"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Show sidebar</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="type">label_item</property> + </packing> + </child> </widget> <packing> <property name="padding">0</property> @@ -3996,8 +4049,8 @@ </widget> <packing> <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/src/callbacks.c 2009-12-31 15:48:39 UTC (rev 4517) @@ -1646,14 +1646,14 @@
void on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) + gpointer user_data) { if (ignore_callback) return;
ui_prefs.sidebar_visible = ! ui_prefs.sidebar_visible;
- if ((! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible)) + if (! interface_prefs.sidebar_openfiles_visible && ! interface_prefs.sidebar_symbol_visible) { interface_prefs.sidebar_openfiles_visible = TRUE; interface_prefs.sidebar_symbol_visible = TRUE;
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/src/interface.c 2009-12-31 15:48:39 UTC (rev 4517) @@ -2399,8 +2399,12 @@ GtkWidget *frame7; GtkWidget *alignment9; GtkWidget *vbox11; + GtkWidget *frame39; + GtkWidget *alignment46; + GtkWidget *vbox46; GtkWidget *check_list_symbol; GtkWidget *check_list_openfiles; + GtkWidget *check_sidebar_visible; GtkWidget *hbox17; GtkWidget *label237; GtkWidget *radio_sidebar_left; @@ -3033,19 +3037,37 @@ gtk_widget_show (vbox11); gtk_container_add (GTK_CONTAINER (alignment9), vbox11);
+ frame39 = gtk_frame_new (NULL); + gtk_widget_show (frame39); + gtk_box_pack_start (GTK_BOX (vbox11), frame39, FALSE, FALSE, 0); + gtk_frame_set_shadow_type (GTK_FRAME (frame39), GTK_SHADOW_NONE); + + alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1); + gtk_widget_show (alignment46); + gtk_container_add (GTK_CONTAINER (frame39), alignment46); + gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 0, 12, 0); + + vbox46 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox46); + gtk_container_add (GTK_CONTAINER (alignment46), vbox46); + check_list_symbol = gtk_check_button_new_with_mnemonic (_("Show symbol list")); gtk_widget_show (check_list_symbol); - gtk_box_pack_start (GTK_BOX (vbox11), check_list_symbol, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox46), check_list_symbol, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, check_list_symbol, _("Toggle the symbol list on and off"), NULL);
check_list_openfiles = gtk_check_button_new_with_mnemonic (_("Show documents list")); gtk_widget_show (check_list_openfiles); - gtk_box_pack_start (GTK_BOX (vbox11), check_list_openfiles, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox46), check_list_openfiles, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, check_list_openfiles, _("Toggle the documents list on and off"), NULL);
+ check_sidebar_visible = gtk_check_button_new_with_mnemonic (_("Show sidebar")); + gtk_widget_show (check_sidebar_visible); + gtk_frame_set_label_widget (GTK_FRAME (frame39), check_sidebar_visible); + hbox17 = gtk_hbox_new (FALSE, 12); gtk_widget_show (hbox17); - gtk_box_pack_start (GTK_BOX (vbox11), hbox17, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox11), hbox17, FALSE, FALSE, 0);
label237 = gtk_label_new (_("Position:")); gtk_widget_show (label237); @@ -4756,8 +4778,12 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, frame7, "frame7"); GLADE_HOOKUP_OBJECT (prefs_dialog, alignment9, "alignment9"); GLADE_HOOKUP_OBJECT (prefs_dialog, vbox11, "vbox11"); + GLADE_HOOKUP_OBJECT (prefs_dialog, frame39, "frame39"); + GLADE_HOOKUP_OBJECT (prefs_dialog, alignment46, "alignment46"); + GLADE_HOOKUP_OBJECT (prefs_dialog, vbox46, "vbox46"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_list_symbol, "check_list_symbol"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_list_openfiles, "check_list_openfiles"); + GLADE_HOOKUP_OBJECT (prefs_dialog, check_sidebar_visible, "check_sidebar_visible"); GLADE_HOOKUP_OBJECT (prefs_dialog, hbox17, "hbox17"); GLADE_HOOKUP_OBJECT (prefs_dialog, label237, "label237"); GLADE_HOOKUP_OBJECT (prefs_dialog, radio_sidebar_left, "radio_sidebar_left");
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2009-12-31 15:47:56 UTC (rev 4516) +++ trunk/src/prefs.c 2009-12-31 15:48:39 UTC (rev 4517) @@ -88,6 +88,7 @@ static void on_enable_plugins_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_use_folding_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_open_encoding_toggled(GtkToggleButton *togglebutton, gpointer user_data); +static void on_sidebar_visible_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_prefs_print_radio_button_toggled(GtkToggleButton *togglebutton, gpointer user_data); static void on_prefs_print_page_header_toggled(GtkToggleButton *togglebutton, gpointer user_data);
@@ -378,6 +379,10 @@
/* Interface settings */ + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_sidebar_visible"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), ui_prefs.sidebar_visible); + on_sidebar_visible_toggled(GTK_TOGGLE_BUTTON(widget), NULL); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), interface_prefs.sidebar_symbol_visible);
@@ -792,6 +797,9 @@
/* Interface settings */ + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_sidebar_visible"); + ui_prefs.sidebar_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + widget = ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"); interface_prefs.sidebar_symbol_visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
@@ -1115,8 +1123,6 @@ toolbar_apply_settings(); toolbar_update_ui(); toolbar_show_hide(); - if (interface_prefs.sidebar_openfiles_visible || interface_prefs.sidebar_symbol_visible) - ui_prefs.sidebar_visible = TRUE; ui_sidebar_show_hide(); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(main_widgets.notebook), interface_prefs.show_notebook_tabs);
@@ -1438,6 +1444,15 @@ }
+static void on_sidebar_visible_toggled(GtkToggleButton *togglebutton, gpointer user_data) +{ + gboolean sens = gtk_toggle_button_get_active(togglebutton); + + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_openfiles"), sens); + gtk_widget_set_sensitive(ui_lookup_widget(ui_widgets.prefs_dialog, "check_list_symbol"), sens); +} + + static void on_prefs_print_radio_button_toggled(GtkToggleButton *togglebutton, gpointer user_data) { gboolean sens = gtk_toggle_button_get_active(togglebutton); @@ -1689,6 +1704,8 @@ "toggled", G_CALLBACK(on_use_folding_toggled), NULL); g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_open_encoding"), "toggled", G_CALLBACK(on_open_encoding_toggled), NULL); + g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "check_sidebar_visible"), + "toggled", G_CALLBACK(on_sidebar_visible_toggled), NULL);
g_signal_connect(ui_lookup_widget(ui_widgets.prefs_dialog, "button_help"), "button-press-event", G_CALLBACK(prefs_dialog_button_press_event_cb), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.