added new option "Switch to status message list"

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@11 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2005-11-24 22:28:45 +00:00
parent 127fea6d91
commit f610309337
5 changed files with 26 additions and 3 deletions

View File

@ -81,7 +81,7 @@ typedef struct document
GtkWidget *tab_label;
GtkWidget *tabmenu_label;
GtkTreeIter iter;
gint scid; /* scintilla id */
gint scid;
gboolean readonly;
gboolean changed;
gboolean do_overwrite;
@ -115,6 +115,7 @@ typedef struct MyApp
gboolean show_line_endings;
gboolean show_markers_margin;
gboolean fullscreen;
gboolean switch_msgwin_pages;
gboolean auto_close_xml_tags;
gboolean auto_complete_constructs;
gboolean main_window_realized;
@ -136,6 +137,7 @@ typedef struct MyApp
gchar *msgwin_font;
gchar *configdir;
gchar *search_text;
gchar *terminal_settings;
gchar *build_args_inc;
gchar *build_args_libs;
gchar *build_args_prog;

View File

@ -1933,6 +1933,7 @@ create_prefs_dialog (void)
GtkWidget *vbox4;
GtkWidget *check_load_session;
GtkWidget *check_save_win_pos;
GtkWidget *check_switch_pages;
GtkWidget *check_ask_for_quit;
GtkWidget *label18;
GtkWidget *label106;
@ -2085,10 +2086,17 @@ create_prefs_dialog (void)
gtk_tooltips_set_tip (tooltips, check_save_win_pos, _("Saves the window position and geometry and restores it at the start"), NULL);
gtk_button_set_focus_on_click (GTK_BUTTON (check_save_win_pos), FALSE);
check_switch_pages = gtk_check_button_new_with_mnemonic (_("Switch to status message list at new message"));
gtk_widget_show (check_switch_pages);
gtk_box_pack_start (GTK_BOX (vbox4), check_switch_pages, FALSE, FALSE, 0);
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 arrive."), NULL);
gtk_button_set_focus_on_click (GTK_BUTTON (check_switch_pages), FALSE);
check_ask_for_quit = gtk_check_button_new_with_mnemonic (_("Confirm exit"));
gtk_widget_show (check_ask_for_quit);
gtk_box_pack_start (GTK_BOX (vbox4), check_ask_for_quit, FALSE, FALSE, 0);
GTK_WIDGET_UNSET_FLAGS (check_ask_for_quit, GTK_CAN_FOCUS);
gtk_tooltips_set_tip (tooltips, check_ask_for_quit, _("Shows a confirmation dialog on exit."), NULL);
gtk_button_set_focus_on_click (GTK_BUTTON (check_ask_for_quit), FALSE);
label18 = gtk_label_new (_("<b>Miscellaneous</b>"));
@ -2677,6 +2685,7 @@ create_prefs_dialog (void)
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox4, "vbox4");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_load_session, "check_load_session");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_save_win_pos, "check_save_win_pos");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_switch_pages, "check_switch_pages");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_ask_for_quit, "check_ask_for_quit");
GLADE_HOOKUP_OBJECT (prefs_dialog, label18, "label18");
GLADE_HOOKUP_OBJECT (prefs_dialog, label106, "label106");

View File

@ -77,8 +77,10 @@ void configuration_save(void)
//g_key_file_set_boolean(config, PACKAGE, "line_breaking", app->line_breaking);
g_key_file_set_boolean(config, PACKAGE, "show_line_endings", app->show_line_endings);
g_key_file_set_boolean(config, PACKAGE, "fullscreen", app->fullscreen);
g_key_file_set_boolean(config, PACKAGE, "switch_msgwin_pages", app->switch_msgwin_pages);
g_key_file_set_boolean(config, PACKAGE, "auto_close_xml_tags", app->auto_close_xml_tags);
g_key_file_set_boolean(config, PACKAGE, "auto_complete_constructs", app->auto_complete_constructs);
g_key_file_set_string(config, PACKAGE, "terminal_settings", app->terminal_settings);
g_key_file_set_string(config, PACKAGE, "editor_font", app->editor_font);
g_key_file_set_string(config, PACKAGE, "tagbar_font", app->tagbar_font);
g_key_file_set_string(config, PACKAGE, "msgwin_font", app->msgwin_font);
@ -181,12 +183,15 @@ gboolean configuration_load(void)
app->show_line_endings = utils_get_setting_boolean(config, PACKAGE, "show_line_endings", FALSE);
//app->line_breaking = utils_get_setting_boolean(config, PACKAGE, "line_breaking", TRUE);
app->fullscreen = utils_get_setting_boolean(config, PACKAGE, "fullscreen", FALSE);
app->switch_msgwin_pages = utils_get_setting_boolean(config, PACKAGE, "switch_msgwin_pages", TRUE);
app->auto_close_xml_tags = utils_get_setting_boolean(config, PACKAGE, "auto_close_xml_tags", TRUE);
app->auto_complete_constructs = utils_get_setting_boolean(config, PACKAGE, "auto_complete_constructs", TRUE);
app->editor_font = utils_get_setting_string(config, PACKAGE, "editor_font", "Courier New 9");
app->tagbar_font = utils_get_setting_string(config, PACKAGE, "tagbar_font", "Cursor 8");
app->msgwin_font = utils_get_setting_string(config, PACKAGE, "msgwin_font", "Cursor 8");
scribble_text = utils_get_setting_string(config, PACKAGE, "scribble_text", _("Type here what you want, use it as a notice/scratch board"));
app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", "");
scribble_text = utils_get_setting_string(config, PACKAGE, "scribble_text",
_("Type here what you want, use it as a notice/scratch board"));
hpan_position = utils_get_setting_integer(config, PACKAGE, "treeview_position", -1);

View File

@ -177,7 +177,7 @@ void msgwin_status_add(gchar const *format, ...)
GtkTreePath *path = gtk_tree_model_get_path(gtk_tree_view_get_model(GTK_TREE_VIEW(msgwindow.tree_status)), &iter);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(msgwindow.tree_status), path, NULL, FALSE, 0.0, 0.0);
gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_STATUS);
if (app->switch_msgwin_pages) gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_STATUS);
gtk_tree_path_free(path);
}
}

View File

@ -45,6 +45,9 @@ void prefs_init_dialog(void)
widget = lookup_widget(app->prefs_dialog, "check_save_win_pos");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_save_winpos);
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_ask_for_quit");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_main_confirm_exit);
@ -149,12 +152,16 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
widget = lookup_widget(app->prefs_dialog, "check_ask_for_quit");
app->pref_main_confirm_exit = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
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_toolbar_search");
app->pref_main_show_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
widget = lookup_widget(app->prefs_dialog, "check_toolbar_tags");
app->pref_main_show_tags = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
// Editor settings
widget = lookup_widget(app->prefs_dialog, "spin_tab_width");
app->pref_editor_tab_width = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widget));