Re: Patched to save with click+ctrl
Pietro <[email protected]> Sat, 14 Feb 2004 15:28:19 +0100
| Newsgroups | gmane.comp.web.galeon.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi!, sorry to repost the patch, but this is released by the programmer. (I've generated the .diff file, so it may be not work, tell me, I'll send the galeon-tab.c file). Bye, Pietro
galeon-tab.diff
(text/plain, 2.7 KB)
--- galeon-tab.c 2004-01-17 16:28:20.000000000 +0100 +++ galeon-tab.mod.c 2004-02-14 15:22:06.000000000 +0100 @@ -16,6 +16,23 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* + * .oO* Patch by Giovanni Dicanio <[email protected]> *Oo. + * -------------=================------------- + * I did it for my friend-cousin Pietro <[email protected]>. + * (He deserves it :-) + * + * Date: 2004-Feb-14 (S.Valentine ...oops, better "hacking" + * with the girlfriend this day ;-) + * + * Modified function: galeon_tab_dom_mouse_click_cb() + * + * [ $GDS$ = me ] + * + */ + + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -1245,6 +1262,14 @@ return FALSE; } + + +/* + * $GDS$ Modified function. + * + * Desc: 1) Swap CTRL+click and SHIFT+click + * 2) Call download manager both with links and images + */ static gint galeon_tab_dom_mouse_click_cb(GaleonEmbed *embed, GaleonEmbedEvent *event, @@ -1263,34 +1288,47 @@ galeon_embed_event_get_context(event, &context); galeon_embed_event_get_modifier(event, &modifier); + + /* + * $GDS$ Swap CTRL+click and SHIFT+click + * (GDK_CONTROL_MASK and GDK_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"); + + /* + * $GDS$ Call the download manager also on images + */ + 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;