[maemo-commits] [maemo-commits] r9440 - in projects/haf/trunk/gtkhtml: . debian upstream/patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Jan 29 17:57:06 EET 2007
- Previous message: [maemo-commits] r9439 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9441 - projects/haf/tags/gtkhtml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: schulhof Date: 2007-01-29 17:57:04 +0200 (Mon, 29 Jan 2007) New Revision: 9440 Added: projects/haf/trunk/gtkhtml/upstream/patches/gtkhtml_dont_click_link_when_panning.diff Modified: projects/haf/trunk/gtkhtml/ChangeLog projects/haf/trunk/gtkhtml/debian/changelog projects/haf/trunk/gtkhtml/debian/rules Log: osso-startup-greeting-3.9.1-2osso15: * When grabbing the page by a link for panning purposes, don't follow the link upon button release. * Fixes: NB#50763 Modified: projects/haf/trunk/gtkhtml/ChangeLog =================================================================== --- projects/haf/trunk/gtkhtml/ChangeLog 2007-01-29 15:53:30 UTC (rev 9439) +++ projects/haf/trunk/gtkhtml/ChangeLog 2007-01-29 15:57:04 UTC (rev 9440) @@ -1,3 +1,9 @@ +2007-01-29 Gabriel Schulhof <gabriel.schulhof at nokia.com> + + * When grabbing the page by a link for panning purposes, don't follow the link + upon button release. + * Fixes: NB#50763 + 2007-01-22 Gabriel Schulhof <gabriel.schulhof at nokia.com> * Determine double-click distance tolerance via GtkSettings, not hardcoded value Modified: projects/haf/trunk/gtkhtml/debian/changelog =================================================================== --- projects/haf/trunk/gtkhtml/debian/changelog 2007-01-29 15:53:30 UTC (rev 9439) +++ projects/haf/trunk/gtkhtml/debian/changelog 2007-01-29 15:57:04 UTC (rev 9440) @@ -1,3 +1,11 @@ +gtkhtml (3.9.1-2osso15) unstable; urgency=low + + * When grabbing the page by a link for panning purposes, don't follow the link + upon button release. + * Fixes: NB#50763 + + -- Gabriel Schulhof <gabriel.schulhof at nokia.com> Mon, 29 Jan 2007 17:53:03 +0200 + gtkhtml (3.9.1-2osso14) unstable; urgency=low * Determine double-click distance tolerance via GtkSettings, not hardcoded value Modified: projects/haf/trunk/gtkhtml/debian/rules =================================================================== --- projects/haf/trunk/gtkhtml/debian/rules 2007-01-29 15:53:30 UTC (rev 9439) +++ projects/haf/trunk/gtkhtml/debian/rules 2007-01-29 15:57:04 UTC (rev 9440) @@ -59,6 +59,7 @@ patch -p0 < upstream/patches/gtkhtml_get_motion_hints.diff patch -p0 < upstream/patches/gtkhtml_better_spacing.diff patch -p0 < upstream/patches/gtkhtml_text_selection_with_proper_doubleclick.diff + patch -p0 < upstream/patches/gtkhtml_dont_click_link_when_panning.diff cd $(SOURCE_DIR) && ./autogen.sh Added: projects/haf/trunk/gtkhtml/upstream/patches/gtkhtml_dont_click_link_when_panning.diff =================================================================== --- projects/haf/trunk/gtkhtml/upstream/patches/gtkhtml_dont_click_link_when_panning.diff 2007-01-29 15:53:30 UTC (rev 9439) +++ projects/haf/trunk/gtkhtml/upstream/patches/gtkhtml_dont_click_link_when_panning.diff 2007-01-29 15:57:04 UTC (rev 9440) @@ -0,0 +1,110 @@ +diff -ru gtkhtml-3.9.1/src/gtkhtml.c gtkhtml-3.9.1.mod/src/gtkhtml.c +--- gtkhtml-3.9.1/src/gtkhtml.c 2007-01-24 17:13:28.000000000 +0200 ++++ gtkhtml-3.9.1.mod/src/gtkhtml.c 2007-01-29 17:27:12.000000000 +0200 +@@ -1654,6 +1654,8 @@ + value = adj->lower; + else if (value > (adj->upper - adj->page_size)) + value = adj->upper - adj->page_size; ++ if (GTK_HTML (widget)->y_amount_panned < mouse_double_click_threshold) ++ GTK_HTML (widget)->y_amount_panned += (gint)(value - adj->value) ; + gtk_adjustment_set_value(adj, value); + + /* Horizontal panning */ +@@ -1663,8 +1665,14 @@ + value = adj->lower; + else if (value > (adj->upper - adj->page_size)) + value = adj->upper - adj->page_size; ++ if (GTK_HTML (widget)->x_amount_panned < mouse_double_click_threshold) ++ GTK_HTML (widget)->x_amount_panned += (gint)(value - adj->value) ; + gtk_adjustment_set_value(adj, value); +- } ++ ++ /* g_print ("GtkHTML::motion_notify_event: total pan so far: [%dx%d]\n", GTK_HTML (widget)->x_amount_panned, GTK_HTML (widget)->y_amount_panned) ; */ ++ } /*else { ++ g_print ("GtkHTML::motion_notify_event: Not panning\n") ; ++ }*/ + + return TRUE; + } +@@ -1783,6 +1791,8 @@ + /* (TL 18-Nov-05) First click starts panning, not selection */ + html->in_selection_drag = FALSE; + html->panning = TRUE; ++ html->x_amount_panned = ++ html->y_amount_panned = 0 ; + html->lastx = x; + html->lasty = y; + +@@ -1854,6 +1864,8 @@ + /* (TL 18-Nov-05) Second click starts selection and stops panning */ + html->in_selection_drag = TRUE; + html->panning = FALSE; ++ html->x_amount_panned = ++ html->y_amount_panned = 0 ; + html->in_selection = TRUE; + /* Check for simple double click, for selecting a word */ + html->simple_dblclick = TRUE; +@@ -1866,6 +1878,8 @@ + /* (TL 18-Nov-05) Third click starts selection and stops panning */ + html->in_selection_drag = TRUE; + html->panning = FALSE; ++ html->x_amount_panned = ++ html->y_amount_panned = 0 ; + html->in_selection = TRUE; + } + } +@@ -1908,6 +1922,12 @@ + } + + if (event->button == 1) { ++ guint mouse_double_click_threshold = MOUSE_DBLCLK_THRESHOLD ; ++ GtkSettings *gtk_settings = gtk_widget_get_settings (widget) ; ++ ++ if (NULL != gtk_settings) ++ g_object_get (G_OBJECT (gtk_settings), "gtk-double-click-distance", &mouse_double_click_threshold, NULL) ; ++ + + if (html->in_selection_drag && html_engine_get_editable (engine)) + html_engine_jump_at (engine, x, y); +@@ -1917,6 +1937,8 @@ + html->panning = FALSE; + + if (!html->priv->dnd_in_progress ++ && html->x_amount_panned < mouse_double_click_threshold ++ && html->y_amount_panned < mouse_double_click_threshold + && html->pointer_url != NULL && ! html->in_selection) { + g_signal_emit (widget, signals[LINK_CLICKED], 0, html->pointer_url); + focus_object = html_engine_get_focus_object (html->engine, &focus_object_offset); +@@ -1924,7 +1946,10 @@ + html_text_set_link_visited (HTML_TEXT(focus_object), focus_object_offset, html->engine, TRUE); + } + } +- ++ ++ html->x_amount_panned = ++ html->y_amount_panned = 0 ; ++ + /* If it was a simple doubleclick select a word */ + if (html->simple_dblclick) { + html->simple_dblclick = FALSE; +@@ -3450,6 +3475,8 @@ + + /* (TL 18-Nov-05) For panning */ + html->panning = FALSE; ++ html->x_amount_panned = ++ html->y_amount_panned = 0 ; + html->lastx = 0; + html->lasty = 0; + +diff -ru gtkhtml-3.9.1/src/gtkhtml.h gtkhtml-3.9.1.mod/src/gtkhtml.h +--- gtkhtml-3.9.1/src/gtkhtml.h 2007-01-24 17:13:28.000000000 +0200 ++++ gtkhtml-3.9.1.mod/src/gtkhtml.h 2007-01-29 17:52:28.000000000 +0200 +@@ -66,6 +66,8 @@ + gboolean panning; + gint lastx; + gint lasty; ++ gint x_amount_panned ; ++ gint y_amount_panned ; + + guint in_selection : 1; + guint in_selection_drag : 1;
- Previous message: [maemo-commits] r9439 - in projects/haf/branches/gtk+/maemo-gtk-2-10: . gtk
- Next message: [maemo-commits] r9441 - projects/haf/tags/gtkhtml
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]