Hi,
With allow_always_save=true, both Save and Save All are always enabled
(unless there are no files, of course). Obviously, that makes sense for
Save. But what you invoke Save All and there are no modified files? It
doesn't save all files regardless of modification, as you may think,
nor does it save the current file - in fact, it does nothing, and
allow_always_save has no effect on it. So IMHO, en/disabling of Save
All should not be affected by the value of allow_always_save.
The attached patch does that, and makes the preference changeable,
provided that you call ui_save_buttons_toggle() after change (we'll
need this when/if the various preferences editor is included in Geany).
I also edited the documentation accordingly.
But that's enough description for a one-liner...
--
E-gards: Jimmy
--- ./src/ui_utils.c.orig 2011-04-18 21:02:13.0 +0300
+++ ./src/ui_utils.c 2011-05-20 20:13:12.0 +0300
@@ -661,7 +661,7 @@
gboolean dirty_tabs = FALSE;
if (ui_prefs.allow_always_save)
- return;
+ enable = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)) ? TRUE : FALSE;
ui_widget_set_sensitive(widgets.save_buttons[0], enable);
ui_widget_set_sensitive(widgets.save_buttons[1], enable);
--- ./doc/geany.html.orig 2011-05-20 20:07:52.0 +0300
+++ ./doc/geany.html 2011-05-20 20:13:12.0 +0300
@@ -5082,11 +5082,11 @@
allow_always_save
Whether files can be saved always, even if
they don't have any changes. By default,
-the Save buttons and menu items are
-disabled when a file is unchanged. When
-setting this option to true, the Save
-buttons and menu items are always active
-and files can be saved.
+the Save button and menu item are disabled
+when a file is unchanged. When setting
+this option to true, the Save button and
+menu item are always active and files can
+be saved.
false
compiler_tab_autoscroll
--- ./doc/geany.txt.orig 2011-05-20 20:07:52.0 +0300
+++ ./doc/geany.txt 2011-05-20 20:13:12.0 +0300
@@ -4373,11 +4373,11 @@
available with GTK 2.12 or above).
allow_always_save Whether files can be saved always, even if false
they don't have any changes. By default,
- the Save buttons and menu items are
- disabled when a file is unchanged. When
- setting this option to true, the Save
- buttons and menu items are always active
- and files can be saved.
+ the Save button and menu item are disabled
+ when a file is unchanged. When setting
+ this option to true, the Save button and
+ menu item are always active and files can
+ be saved.
compiler_tab_autoscroll Whether to automatically scroll to the true
last line of the output in the Compiler
tab.
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel