Revision: 1771 http://geany.svn.sourceforge.net/geany/?rev=1771&view=rev Author: eht16 Date: 2007-08-05 04:03:44 -0700 (Sun, 05 Aug 2007)
Log Message: ----------- Add option to suppress messages in the status bar.
Modified Paths: -------------- trunk/ChangeLog trunk/geany.glade trunk/src/geany.h trunk/src/interface.c trunk/src/keyfile.c trunk/src/msgwindow.c trunk/src/prefs.c trunk/src/ui_utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/ChangeLog 2007-08-05 11:03:44 UTC (rev 1771) @@ -1,3 +1,10 @@ +2007-08-05 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * geany.glade, src/geany.h, src/interface.c, src/keyfile.c, + src/msgwindow.c, src/prefs.c, src/ui_utils.c: + Add option to suppress messages in the status bar. + + 2007-08-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* configure.in: Fix error in "make install" caused by old automake
Modified: trunk/geany.glade =================================================================== --- trunk/geany.glade 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/geany.glade 2007-08-05 11:03:44 UTC (rev 1771) @@ -3253,6 +3253,26 @@ </child>
<child> + <widget class="GtkCheckButton" id="check_suppress_status_msgs"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Removes all messages from the status bar. The messages are still displayed in the status messages window.</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Suppress status messages in the status bar</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_auto_focus"> <property name="visible">True</property> <property name="tooltip" translatable="yes">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.</property>
Modified: trunk/src/geany.h =================================================================== --- trunk/src/geany.h 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/geany.h 2007-08-05 11:03:44 UTC (rev 1771) @@ -109,6 +109,7 @@ gboolean pref_main_save_winpos; gboolean pref_main_confirm_exit; gboolean pref_main_suppress_search_dialogs; + gboolean pref_main_suppress_status_messages; gboolean pref_toolbar_show_search; gboolean pref_toolbar_show_goto; gboolean pref_toolbar_show_undo;
Modified: trunk/src/interface.c =================================================================== --- trunk/src/interface.c 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/interface.c 2007-08-05 11:03:44 UTC (rev 1771) @@ -2410,6 +2410,7 @@ GtkWidget *vbox21; GtkWidget *check_beep; GtkWidget *check_switch_pages; + GtkWidget *check_suppress_status_msgs; GtkWidget *check_auto_focus; GtkWidget *check_ask_suppress_search_dialogs; GtkWidget *label178; @@ -2747,6 +2748,12 @@ gtk_tooltips_set_tip (tooltips, check_switch_pages, _("Switch to the status message tab (in the notebook window at the bottom) if a new status message arrives."), NULL); gtk_button_set_focus_on_click (GTK_BUTTON (check_switch_pages), FALSE);
+ check_suppress_status_msgs = gtk_check_button_new_with_mnemonic (_("Suppress status messages in the status bar")); + gtk_widget_show (check_suppress_status_msgs); + gtk_box_pack_start (GTK_BOX (vbox21), check_suppress_status_msgs, FALSE, FALSE, 0); + gtk_tooltips_set_tip (tooltips, check_suppress_status_msgs, _("Removes all messages from the status bar. The messages are still displayed in the status messages window."), NULL); + gtk_button_set_focus_on_click (GTK_BUTTON (check_suppress_status_msgs), FALSE); + check_auto_focus = gtk_check_button_new_with_mnemonic (_("Auto focus widgets (focus follows mouse)")); gtk_widget_show (check_auto_focus); gtk_box_pack_start (GTK_BOX (vbox21), check_auto_focus, FALSE, FALSE, 0); @@ -4133,6 +4140,7 @@ GLADE_HOOKUP_OBJECT (prefs_dialog, vbox21, "vbox21"); GLADE_HOOKUP_OBJECT (prefs_dialog, check_beep, "check_beep"); 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, label178, "label178");
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/keyfile.c 2007-08-05 11:03:44 UTC (rev 1771) @@ -250,6 +250,7 @@ g_key_file_set_boolean(config, PACKAGE, "pref_editor_use_tabs", editor_prefs.use_tabs); g_key_file_set_boolean(config, PACKAGE, "pref_main_confirm_exit", app->pref_main_confirm_exit); g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_search_dialogs", app->pref_main_suppress_search_dialogs); + g_key_file_set_boolean(config, PACKAGE, "pref_main_suppress_status_messages", app->pref_main_suppress_status_messages); g_key_file_set_boolean(config, PACKAGE, "pref_main_load_session", app->pref_main_load_session); g_key_file_set_boolean(config, PACKAGE, "pref_main_save_winpos", app->pref_main_save_winpos); g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show", app->toolbar_visible); @@ -475,6 +476,7 @@ } app->pref_main_confirm_exit = utils_get_setting_boolean(config, PACKAGE, "pref_main_confirm_exit", FALSE); app->pref_main_suppress_search_dialogs = utils_get_setting_boolean(config, PACKAGE, "pref_main_suppress_search_dialogs", FALSE); + app->pref_main_suppress_status_messages = utils_get_setting_boolean(config, PACKAGE, "pref_main_suppress_status_messages", FALSE); app->pref_main_load_session = utils_get_setting_boolean(config, PACKAGE, "pref_main_load_session", TRUE); app->pref_main_save_winpos = utils_get_setting_boolean(config, PACKAGE, "pref_main_save_winpos", TRUE); app->pref_toolbar_show_search = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_search", TRUE);
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/msgwindow.c 2007-08-05 11:03:44 UTC (rev 1771) @@ -291,7 +291,8 @@ va_end(args);
// display status message in status bar - ui_set_statusbar("%s", string); + if (! app->pref_main_suppress_status_messages) + ui_set_statusbar("%s", string);
// add a timestamp to status messages time_str = utils_get_current_time_string();
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/prefs.c 2007-08-05 11:03:44 UTC (rev 1771) @@ -96,6 +96,9 @@ widget = lookup_widget(app->prefs_dialog, "check_switch_pages"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->switch_msgwin_pages);
+ widget = lookup_widget(app->prefs_dialog, "check_suppress_status_msgs"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_suppress_status_messages); + widget = lookup_widget(app->prefs_dialog, "check_auto_focus"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->auto_focus);
@@ -479,6 +482,9 @@ widget = lookup_widget(app->prefs_dialog, "check_switch_pages"); app->switch_msgwin_pages = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+ widget = lookup_widget(app->prefs_dialog, "check_suppress_status_msgs"); + app->pref_main_suppress_status_messages = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); + widget = lookup_widget(app->prefs_dialog, "check_auto_focus"); app->auto_focus = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2007-08-04 16:25:13 UTC (rev 1770) +++ trunk/src/ui_utils.c 2007-08-05 11:03:44 UTC (rev 1771) @@ -86,7 +86,8 @@ }
-// Display text on the statusbar (without logging it to the Status window). +/* Display text on the statusbar or log it to the Status window if + * app->pref_main_suppress_status_messages is set */ void ui_set_statusbar(const gchar *format, ...) { gchar string[512]; @@ -99,7 +100,10 @@ g_vsnprintf(string, 512, format, args); va_end(args);
- set_statusbar(string, FALSE); + if (app->pref_main_suppress_status_messages) + msgwin_status_add("%s", string); + else + set_statusbar(string, FALSE); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.