Re: Patch: make bookmarks threshold popup optional
Paul Dwerryhouse <[email protected]> Wed, 14 Apr 2004 22:09:04 +0200
| Newsgroups | gmane.comp.web.galeon.devel |
|---|---|
| Message-ID | <20040414200904.GA30043@localhost> |
On Wed, Apr 14, 2004 at 06:57:30PM +0300, Tommi Komulainen wrote:
> Interesting, but you forgot to update the schemas.in and
> README.ExtraPrefs - all preferences need to have documentation and
> default values.
Ok, that's all provided in the updated patch below.
> Also, two new prefs to control such a marginal annoyance, it simply
> feels unwarranted. This is how you end up having gazillion slightly
> overlapping options... The count pref alone should be sufficient
> (with -1 indicating no limit, for example)
Good point, I hadn't thought of that. Fixed that too.
> but I'm not convinced it's even useful to have the threshold
> adjustable.
Hmmm, I can't believe I'm the only one here who puts all the regularly
updated webpages (newspapers, comics, slashdot, etc) he likes to look at
into a single toolbar folder, and then just middle-clicks on it so
they all load up in tabs in the background?
> I can't actually remember why the warning was introduced
> in the first place...
Well, if that's the case, I certainly won't complain if you choose to
remove it ;) Believe me, the popup is really, really annoying. And I'd
imagine that most people know what they are doing when they middle-click
on a folder, asking for confirmation is just going to irritate them.
However, I can see that some people might want to keep the current
behaviour too, so I'd argue that a preference is the way to go.
Cheers,
Paul
diff -urN galeon-1.3.13.orig/README.ExtraPrefs galeon-1.3.13/README.ExtraPrefs
--- galeon-1.3.13.orig/README.ExtraPrefs 2004-02-14 18:14:20.000000000 +0100
+++ galeon-1.3.13/README.ExtraPrefs 2004-04-14 19:35:24.000000000 +0200
@@ -69,6 +69,11 @@
When TRUE, the arrow buttons in a SBM will no longer be shown
(default=false)
+Bookmark Folder open threshold:
+ /apps/galeon/Browsing/Bookmarks/threshold_count (int)
+ Threshold at which opening a folder of bookmarks will cause
+ a warning popup to be displayed. Disabled when set to -1.
+ (default=10)
Location Entry
--------------
diff -urN galeon-1.3.13.orig/galeon.schemas.in galeon-1.3.13/galeon.schemas.in
--- galeon-1.3.13.orig/galeon.schemas.in 2004-02-04 20:16:11.000000000 +0100
+++ galeon-1.3.13/galeon.schemas.in 2004-04-14 19:29:49.000000000 +0200
@@ -50,6 +50,17 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/galeon/Browsing/Bookmarks/threshold_count</key>
+ <applyto>/apps/galeon/Browsing/Bookmarks/threshold_count</applyto>
+ <owner>galeon</owner>
+ <type>int</type>
+ <default>10</default>
+ <locale name="C">
+ <short>Bookmarks Folder Open Threshhold</short>
+ <long>Theshold above which a warning popup will be displayed when opening a folder of bookmarks.</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/galeon/Browsing/Bookmarks/smartbookmarks_hide_arrows</key>
<applyto>/apps/galeon/Browsing/Bookmarks/smartbookmarks_hide_arrows</applyto>
<owner>galeon</owner>
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 19:02:11.000000000 +0200
@@ -2833,6 +2833,7 @@
GbBookmarkActivatedFlags f = ev->flags;
GaleonNewTabFlags flags = 0;
const gchar *final_url;
+ gint threshold = -1;
g_return_if_fail (f == GB_BAF_DEFAULT
|| f == GB_BAF_NEW_TAB_OR_WINDOW
@@ -2931,8 +2932,8 @@
}
}
-#define MANY_BOOKMARKS_WARNING_THRESHOLD 10
- if (count > MANY_BOOKMARKS_WARNING_THRESHOLD)
+
+ if ( (threshold = eel_gconf_get_integer(CONF_BOOKMARKS_THRESHOLD_COUNT)) >= 0 && count > threshold )
{
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 18:46:50.000000000 +0200
@@ -9,6 +9,8 @@
#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_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