Merge lp:~cimi/overlay-scrollbar/show-hide-updated into lp:overlay-scrollbar

Proposed by Andrea Cimitan
Status: Merged
Merged at revision: 141
Proposed branch: lp:~cimi/overlay-scrollbar/show-hide-updated
Merge into: lp:overlay-scrollbar
Diff against target: 37 lines (+0/-18)
1 file modified
os/os-scrollbar.c (+0/-18)
To merge this branch: bzr merge lp:~cimi/overlay-scrollbar/show-hide-updated
Reviewer Review Type Date Requested Status
Loïc Molinari (community) Approve
Review via email: mp+52218@code.launchpad.net

Description of the change

Now show/hide vfunc won't disable/enable proximity and show/hide the pager, as it was already handled by the map/unmap vfunc.
In theory, GTK_WIDGET_CLASS (os_scrollbar_parent_class)->hide/show (widget), should call gtk_widget_unmap/map (widget) which will call os_scrollbar_unmap/map (widget) only when needed, and will do the proximity and pager checks only when needed.
This should be the right approach, I've not encountered bugs so far, but if this merge will expose new bad behavior, that means we might have to fix something elsewhere.

To post a comment you must log in.
Revision history for this message
Loïc Molinari (loic.molinari) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'os/os-scrollbar.c'
2--- os/os-scrollbar.c 2011-03-03 17:59:02 +0000
3+++ os/os-scrollbar.c 2011-03-04 16:27:08 +0000
4@@ -1291,16 +1291,7 @@
5 static void
6 os_scrollbar_hide (GtkWidget *widget)
7 {
8- OsScrollbarPrivate *priv;
9-
10- priv = OS_SCROLLBAR_GET_PRIVATE (OS_SCROLLBAR (widget));
11-
12 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->hide (widget);
13-
14- priv->proximity = FALSE;
15-
16- if (priv->pager != NULL)
17- os_pager_hide (OS_PAGER (priv->pager));
18 }
19
20 static void
21@@ -1387,16 +1378,7 @@
22 static void
23 os_scrollbar_show (GtkWidget *widget)
24 {
25- OsScrollbarPrivate *priv;
26-
27- priv = OS_SCROLLBAR_GET_PRIVATE (OS_SCROLLBAR (widget));
28-
29 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->show (widget);
30-
31- priv->proximity = TRUE;
32-
33- if (priv->pager != NULL)
34- os_pager_show (OS_PAGER (priv->pager));
35 }
36
37 static void

Subscribers

People subscribed via source and target branches