[Geany-devel] allow always save all fix

2011-05-20 Thread Dimitar Zhekov
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 @@
 trtdallow_always_save/td
 tdWhether 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./td
+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./td
 tdfalse/td
 /tr
 trtdcompiler_tab_autoscroll/td
--- ./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


[Geany-devel] GProject geany-plugins integration

2011-05-20 Thread Jiří Techet
Hi,

I've finally found some time to integrate my GProject plugin into
geany-plugins; for those who like git, the result is here:

https://gitorious.org/geany-plugins-gproject/geany-plugins-gproject

For those who dislike it, the patch is here:

http://db.tt/esDNpPw

I hope I've updated all the necessary files. The automake build should
be working correctly; however, in the waf build I'm not sure how to
integrate icon cache rebuild into the waf script. From what I could
see no other plugin ships with its own icons and even though Geany's
waf script contains the necessary code to rebuild the icon cache, I'm
not sure how to integrate it properly into the plugin build system.
Anyone willing to help?

Cheers,

Jiri
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel