Kaydet (Commit) 0a795b2d authored tarafından Enrico Tröger's avatar Enrico Tröger

Toolbar items for file operations can also be hidden.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@564 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 686c4747
......@@ -2,6 +2,9 @@
* src/keybindings.c, src/sci_cb.c:
Show auto completion list immediately when called by a keybinding.
* geany.glade, src/interface.c, src/prefs.c, src/geany.h,
src/keyfile.c, src/utils.c:
Toolbar items for file operations can also be hidden.
2006-07-15 Nick Treleaven <nick.treleaven@btinternet.com>
......
......@@ -3712,6 +3712,25 @@ Bottom
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkCheckButton" id="check_toolbar_fileops">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Display the New, Open, Close, Save and Reload buttons in the toolbar</property>
<property name="label" translatable="yes">Show file operation buttons</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_toolbar_compile">
<property name="visible">True</property>
......
......@@ -170,6 +170,7 @@ typedef struct MyApp
gboolean pref_toolbar_show_compile;
gboolean pref_toolbar_show_zoom;
gboolean pref_toolbar_show_colour;
gboolean pref_toolbar_show_fileops;
gint tab_pos_editor;
gint tab_pos_msgwin;
gint tab_pos_sidebar;
......
......@@ -1948,6 +1948,7 @@ create_prefs_dialog (void)
GtkWidget *frame11;
GtkWidget *alignment14;
GtkWidget *vbox16;
GtkWidget *check_toolbar_fileops;
GtkWidget *check_toolbar_compile;
GtkWidget *check_toolbar_colour;
GtkWidget *check_toolbar_zoom;
......@@ -2480,6 +2481,13 @@ create_prefs_dialog (void)
gtk_widget_show (vbox16);
gtk_container_add (GTK_CONTAINER (alignment14), vbox16);
check_toolbar_fileops = gtk_check_button_new_with_mnemonic (_("Show file operation buttons"));
gtk_widget_show (check_toolbar_fileops);
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_fileops, FALSE, FALSE, 0);
GTK_WIDGET_UNSET_FLAGS (check_toolbar_fileops, GTK_CAN_FOCUS);
gtk_tooltips_set_tip (tooltips, check_toolbar_fileops, _("Display the New, Open, Close, Save and Reload buttons in the toolbar"), NULL);
gtk_button_set_focus_on_click (GTK_BUTTON (check_toolbar_fileops), FALSE);
check_toolbar_compile = gtk_check_button_new_with_mnemonic (_("Show Compile and Run"));
gtk_widget_show (check_toolbar_compile);
gtk_box_pack_start (GTK_BOX (vbox16), check_toolbar_compile, FALSE, FALSE, 0);
......@@ -3132,6 +3140,7 @@ create_prefs_dialog (void)
GLADE_HOOKUP_OBJECT (prefs_dialog, frame11, "frame11");
GLADE_HOOKUP_OBJECT (prefs_dialog, alignment14, "alignment14");
GLADE_HOOKUP_OBJECT (prefs_dialog, vbox16, "vbox16");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_fileops, "check_toolbar_fileops");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_compile, "check_toolbar_compile");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_colour, "check_toolbar_colour");
GLADE_HOOKUP_OBJECT (prefs_dialog, check_toolbar_zoom, "check_toolbar_zoom");
......
......@@ -129,6 +129,7 @@ void configuration_save(void)
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_undo", app->pref_toolbar_show_undo);
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_compile", app->pref_toolbar_show_compile);
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_colour", app->pref_toolbar_show_colour);
g_key_file_set_boolean(config, PACKAGE, "pref_toolbar_show_fileops", app->pref_toolbar_show_fileops);
g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_style", app->toolbar_icon_style);
g_key_file_set_integer(config, PACKAGE, "pref_toolbar_icon_size", app->toolbar_icon_size);
g_key_file_set_boolean(config, PACKAGE, "pref_editor_new_line", app->pref_editor_new_line);
......@@ -298,6 +299,7 @@ gboolean configuration_load(void)
app->pref_toolbar_show_compile = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_compile", TRUE);
app->pref_toolbar_show_undo = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_undo", FALSE);
app->pref_toolbar_show_colour = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_colour", TRUE);
app->pref_toolbar_show_fileops = utils_get_setting_boolean(config, PACKAGE, "pref_toolbar_show_fileops", TRUE);
#ifdef HAVE_VTE
app->load_vte = utils_get_setting_boolean(config, PACKAGE, "load_vte", TRUE);
app->terminal_settings = utils_get_setting_string(config, PACKAGE, "terminal_settings", "");
......
......@@ -163,6 +163,9 @@ void prefs_init_dialog(void)
widget = lookup_widget(app->prefs_dialog, "check_toolbar_colour");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_colour);
widget = lookup_widget(app->prefs_dialog, "check_toolbar_fileops");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), app->pref_toolbar_show_fileops);
switch (app->toolbar_icon_style)
{
......@@ -436,6 +439,9 @@ void on_prefs_button_clicked(GtkDialog *dialog, gint response, gpointer user_dat
widget = lookup_widget(app->prefs_dialog, "check_toolbar_colour");
app->pref_toolbar_show_colour = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
widget = lookup_widget(app->prefs_dialog, "check_toolbar_fileops");
app->pref_toolbar_show_fileops = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
widget = lookup_widget(app->prefs_dialog, "radio_toolbar_imagetext");
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) app->toolbar_icon_style = 2;
else
......
......@@ -2500,6 +2500,15 @@ void utils_update_toolbar_items(void)
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), FALSE);
}
// fileops
utils_widget_show_hide(lookup_widget(app->window, "menutoolbutton1"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton9"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton10"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton22"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton23"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton15"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem7"), app->pref_toolbar_show_fileops);
utils_widget_show_hide(lookup_widget(app->window, "separatortoolitem2"), app->pref_toolbar_show_fileops);
// search
utils_widget_show_hide(lookup_widget(app->window, "entry1"), app->pref_toolbar_show_search);
utils_widget_show_hide(lookup_widget(app->window, "toolbutton18"), app->pref_toolbar_show_search);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment