Re: Disable drag and drop in the main content window.
Matt Hughes <[email protected]>
| Newsgroups | gmane.comp.web.galeon.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 10 Jul 2003, M. C. Hughes wrote: > I have a patch that disables link dragging (for kiosk mode); it simply > returns from embed_drag_data_received_cb(...) in embed_callbacks.c if > dragging is off. My patch has it as part of larger kiosk mode setting, so > it's not that useful for you in it's current state. > Here is a small patch that disables dnd for the embed. The right way to do this would probably be not to register the embeds as being able to recieve dnd events, but this patch just ignores them when they come in. A gconf key /apps/galeon/UI/Mouse/dnd_disabled has been added to enable this (it's off by default). This patch is against the galeon-1-2 branch. Matt > > On Thu, 10 Jul 2003, Evan Brewer wrote: > > > > > I apologize if this question has been already answered on this list, but > > sourceforge's archives for this list returned "Forum not found." > > > > I am working with a tablet PC, and nine times out of ten, clicking links > > ends up in a drag. Ultimately I would like to see Galeon use the gconf > > setting /desktop/gnome/peripherals/mouse/drag_threshold to adjust this, > > but for now I would like to just disable dragging of links (in the main > > window) altogether. I have looked through Galeon 1.2.11 source and is my > > assumption that this handling is done in the Mozilla libraries. > > > > After a little help and research I was directed to this bug: > > > > http://bugzilla.mozilla.org/show_bug.cgi?id=152080 > > > > Indicating that people are indeed aware of the necessity. Has anyone > > come up with a hack, or a workaround for this bug? Any help would be > > appreciated. > > > > - Evan > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by: Parasoft > > Error proof Web apps, automate testing & more. > > Download & eval WebKing and get a free book. > > www.parasoft.com/bulletproofapps1 > > _______________________________________________ > > Galeon-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/galeon-devel > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Parasoft > Error proof Web apps, automate testing & more. > Download & eval WebKing and get a free book. > www.parasoft.com/bulletproofapps1 > _______________________________________________ > Galeon-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/galeon-devel >
galeon-dnd-disable.patch
(text/plain, 2.2 KB)
diff -Naur galeon-1.2-official-cvs-ref/galeon.schemas.in galeon-1.2-official-cvs/galeon.schemas.in
--- galeon-1.2-official-cvs-ref/galeon.schemas.in 2003-07-10 14:46:29.000000000 -0700
+++ galeon-1.2-official-cvs/galeon.schemas.in 2003-07-10 14:58:32.000000000 -0700
@@ -1580,6 +1580,17 @@
</locale>
</schema>
<schema>
+ <key>/schemas/apps/galeon/UI/Mouse/dnd_disabled</key>
+ <applyto>/apps/galeon/UI/Mouse/dnd_disabled</applyto>
+ <owner>galeon</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Disable drag and drap</short>
+ <long>Disable drag and drop of objects (links, images, etc) on a webpage.</long>
+ </locale>
+ </schema>
+ <schema>
<key>/schemas/apps/galeon/Browsing/History/expire</key>
<applyto>/apps/galeon/Browsing/History/expire</applyto>
<owner>galeon</owner>
diff -Naur galeon-1.2-official-cvs-ref/src/embed_callbacks.c galeon-1.2-official-cvs/src/embed_callbacks.c
--- galeon-1.2-official-cvs-ref/src/embed_callbacks.c 2003-07-10 14:46:29.000000000 -0700
+++ galeon-1.2-official-cvs/src/embed_callbacks.c 2003-07-10 14:56:30.000000000 -0700
@@ -69,6 +69,11 @@
/* get tab status */
tabbed = eel_gconf_get_boolean (CONF_TABS_TABBED);
+ if (eel_gconf_get_boolean (CONF_MOUSE_DND_DISABLED))
+ {
+ return;
+ }
+
switch (info)
{
case DND_TARGET_NETSCAPE_URL:
diff -Naur galeon-1.2-official-cvs-ref/src/prefs_strings.h galeon-1.2-official-cvs/src/prefs_strings.h
--- galeon-1.2-official-cvs-ref/src/prefs_strings.h 2003-07-10 14:46:29.000000000 -0700
+++ galeon-1.2-official-cvs/src/prefs_strings.h 2003-07-10 14:57:13.000000000 -0700
@@ -138,6 +138,7 @@
#define CONF_MOUSE_WHEEL_ALT_STEP "/apps/galeon/UI/Mouse/wheel_alt_step"
#define CONF_MOUSE_WHEEL_SHIFT_STEP "/apps/galeon/UI/Mouse/wheel_shift_step"
#define CONF_MOUSE_WHEEL_STEP_SIZE "/apps/galeon/UI/Mouse/wheel_step_size"
+#define CONF_MOUSE_DND_DISABLED "/apps/galeon/UI/Mouse/dnd_disabled"
#define CONF_HISTORY_EXPIRE "/apps/galeon/Browsing/History/expire"
#define CONF_HISTORY_SORT_ORDER "/apps/galeon/Browsing/History/sort_order"
#define CONF_HISTORY_SORT_COLUMN "/apps/galeon/Browsing/History/sort_column"