Patched to save with click+ctrl

Pietro <[email protected]> Sat, 14 Feb 2004 13:03:43 +0100
Newsgroups gmane.comp.web.galeon.devel
Message-ID <[email protected]>
Hi,
I've asked help to my cousin, and he patched galeon-tab.c in order to let me
save the thing I ctrl+click via Download manager. I do not know whether the
patch is elengant, smart and so on, but it works.

This is a feature I missed from galeon 1.2.x, maybe there are other people
who like to have it.
Bye,
Pietro
-- 
+-------------------------------+
|  "Pietro"  <[email protected]>  |
+-------------------------------+

An elephant is a mouse with an operating system.
galeon-tab.diff (text/plain, 1.9 KB)
--- galeon-tab.c	2004-01-17 16:28:20.000000000 +0100
+++ appo/galeon-tab.c	2004-02-14 12:57:55.000000000 +0100
@@ -1245,6 +1245,9 @@
 	return FALSE;
 }
 
+
+
+/* $GDS$ Modified Function */
 static gint
 galeon_tab_dom_mouse_click_cb(GaleonEmbed *embed,
 			      GaleonEmbedEvent *event,
@@ -1263,34 +1266,42 @@
 	galeon_embed_event_get_context(event, &context);
 	galeon_embed_event_get_modifier(event, &modifier);
 
+	/* 
+	 * Inverted CONTROL_MASK with SHIFT_MASK,
+	 */
+	 
 	if (button == 0 && (context & EMBED_CONTEXT_LINK) &&
 	    !(context & EMBED_CONTEXT_INPUT) &&
-	    (modifier & GDK_SHIFT_MASK))
+	    (modifier & GDK_CONTROL_MASK))
 	{
+		
 		galeon_embed_utils_download_event_property(embed,event,
 							   eel_gconf_get_boolean
 							   (CONF_DOWNLOADING_ASK_DIR),
-							   TRUE, /* update_state */
+							   TRUE,
 							   CONF_DOWNLOADING_DIR,
 							   CONF_STATE_LAST_DOWNLOAD_DIR,
 							   "link");
+	
 	}
 	else if (button == 0 && (context & EMBED_CONTEXT_IMAGE) &&
 		 !(context & EMBED_CONTEXT_INPUT) &&
-		 (modifier & GDK_SHIFT_MASK))
+		 (modifier & GDK_CONTROL_MASK))
 	{
-		galeon_embed_utils_save_event_property(embed,event,
-						       TRUE, /* ask_dir */
-						       FALSE, /* show_progress */
-						       TRUE, /* update_state */
-						       CONF_DOWNLOADING_DIR,
-						       CONF_STATE_LAST_DOWNLOAD_DIR,
-						       "image");
+		
+		galeon_embed_utils_download_event_property(embed,event,
+							   eel_gconf_get_boolean
+							   (CONF_DOWNLOADING_ASK_DIR),
+							   TRUE,
+							   CONF_DOWNLOADING_DIR,
+							   CONF_STATE_LAST_DOWNLOAD_DIR,
+							   "image");
+
 	}
 
 	if ((button == 0 && (context & EMBED_CONTEXT_LINK) &&
 	     !(context & EMBED_CONTEXT_INPUT) &&
-	     (modifier & GDK_CONTROL_MASK)) ||
+	     (modifier & GDK_SHIFT_MASK)) ||
 	    (button == 1 && (context & EMBED_CONTEXT_LINK)))
 	{
 		GaleonNewTabFlags flags;