Patch: make bookmarks threshold popup optional

Paul Dwerryhouse <[email protected]> Wed, 14 Apr 2004 14:47:37 +0200
Newsgroups gmane.comp.web.galeon.devel
Message-ID <20040414124736.GA4363@localhost>
Hi all, 

I find the popup box that appears when I middle-click on a bookmarks
folder with more than 10 bookmarks in it to be incredibly annoying.
I have a number of folders with lots of bookmarks in them, and I
generally know what I'm doing when I middle-click on them.

So, I've made a patch that makes this configurable, via gconf. There are
two new gconf variables:

/apps/galeon/Browsing/Bookmarks/threshold_warning (boolean)
	- if true, the warning is enabled
	- if false, the warning is disabled

/apps/galeon/Browsing/Bookmarks/threshold_count (integer)
	- sets the threshold that causes the popup to appear (only valid
	if threshold_warning is set to true)

The patch itself was made against galeon 1.3.13, but it applies cleanly
to the CVS version.

Cheers,

Paul.



diff -urN galeon-1.3.13.orig/src/galeon-window.c galeon-1.3.13/src/galeon-window.c
--- galeon-1.3.13.orig/src/galeon-window.c	2004-02-10 22:08:48.000000000 +0100
+++ galeon-1.3.13/src/galeon-window.c	2004-04-14 13:19:44.000000000 +0200
@@ -2931,8 +2931,9 @@
 			}
 		}
 		
-#define MANY_BOOKMARKS_WARNING_THRESHOLD 10
-		if (count > MANY_BOOKMARKS_WARNING_THRESHOLD)
+
+		if (eel_gconf_get_boolean(CONF_BOOKMARKS_THRESHOLD_WARNING)
+				&& count > eel_gconf_get_integer(CONF_BOOKMARKS_THRESHOLD_COUNT))
 		{
 			gint response;
 			GtkWidget *dialog = hig_alert_new
diff -urN galeon-1.3.13.orig/utils/prefs-strings.h galeon-1.3.13/utils/prefs-strings.h
--- galeon-1.3.13.orig/utils/prefs-strings.h	2004-02-04 20:31:42.000000000 +0100
+++ galeon-1.3.13/utils/prefs-strings.h	2004-04-14 13:20:16.000000000 +0200
@@ -9,6 +9,9 @@
 #define CONF_BOOKMARKS_EDITOR_SPLIT_VIEW "/apps/galeon/Browsing/Bookmarks/Editor/split_view"
 #define CONF_BOOKMARKS_EDITOR_EDIT_PANE "/apps/galeon/Browsing/Bookmarks/Editor/edit_pane"
 
+#define CONF_BOOKMARKS_THRESHOLD_WARNING "/apps/galeon/Browsing/Bookmarks/threshold_warning"
+#define CONF_BOOKMARKS_THRESHOLD_COUNT "/apps/galeon/Browsing/Bookmarks/threshold_count"
+
 /* Autocompletion */
 #define CONF_HISTORY_AUTOCOMP_ENABLE "/apps/galeon/Browsing/History/completion_enabled"
 #define CONF_COMPLETION_SHOW_LIST_AUTO "/apps/galeon/Browsing/History/completion_show_list_auto"

-- 
Paul Dwerryhouse						| PGP Key ID: 
Amsterdam, The Netherlands (X) <-> Melbourne, Australia ( )	| 0x6B91B584


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click