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
=== modified file 'os/os-scrollbar.c'
--- os/os-scrollbar.c 2011-03-03 17:59:02 +0000
+++ os/os-scrollbar.c 2011-03-04 16:27:08 +0000
@@ -1291,16 +1291,7 @@
1291static void1291static void
1292os_scrollbar_hide (GtkWidget *widget)1292os_scrollbar_hide (GtkWidget *widget)
1293{1293{
1294 OsScrollbarPrivate *priv;
1295
1296 priv = OS_SCROLLBAR_GET_PRIVATE (OS_SCROLLBAR (widget));
1297
1298 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->hide (widget);1294 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->hide (widget);
1299
1300 priv->proximity = FALSE;
1301
1302 if (priv->pager != NULL)
1303 os_pager_hide (OS_PAGER (priv->pager));
1304}1295}
13051296
1306static void1297static void
@@ -1387,16 +1378,7 @@
1387static void1378static void
1388os_scrollbar_show (GtkWidget *widget)1379os_scrollbar_show (GtkWidget *widget)
1389{1380{
1390 OsScrollbarPrivate *priv;
1391
1392 priv = OS_SCROLLBAR_GET_PRIVATE (OS_SCROLLBAR (widget));
1393
1394 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->show (widget);1381 GTK_WIDGET_CLASS (os_scrollbar_parent_class)->show (widget);
1395
1396 priv->proximity = TRUE;
1397
1398 if (priv->pager != NULL)
1399 os_pager_show (OS_PAGER (priv->pager));
1400}1382}
14011383
1402static void1384static void

Subscribers

People subscribed via source and target branches