diff options
author | Stefano Karapetsas <[email protected]> | 2014-03-30 10:38:49 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-03-30 10:38:49 +0200 |
commit | 256d520ce80c3adb6beb7156429610234bcadbe7 (patch) | |
tree | 7953b66323358dffcb20bf30e1ea86f39a11e9d0 | |
parent | ec3b83d34ffeaf2c0d16ba013fcba64f17fab203 (diff) | |
parent | 02a7efaf7d34c2ecbe5e4a367fc72c46028e5765 (diff) | |
download | atril-256d520ce80c3adb6beb7156429610234bcadbe7.tar.bz2 atril-256d520ce80c3adb6beb7156429610234bcadbe7.tar.xz |
Merge pull request #76 from Glorf/master
GTK3-compatibility fixes.
-rw-r--r-- | libview/ev-timeline.c | 4 | ||||
-rw-r--r-- | shell/ev-window.c | 22 |
2 files changed, 19 insertions, 7 deletions
diff --git a/libview/ev-timeline.c b/libview/ev-timeline.c index 5887c73b..4f918ea3 100644 --- a/libview/ev-timeline.c +++ b/libview/ev-timeline.c @@ -150,7 +150,7 @@ ev_timeline_run_frame (EvTimeline *timeline) gdouble progress; guint elapsed_time; - GDK_THREADS_ENTER (); + gdk_threads_enter(); priv = EV_TIMELINE_GET_PRIV (timeline); @@ -174,7 +174,7 @@ ev_timeline_run_frame (EvTimeline *timeline) } } - GDK_THREADS_LEAVE (); + gdk_threads_leave(); return TRUE; } diff --git a/shell/ev-window.c b/shell/ev-window.c index 6bd6fe85..8914d2e2 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -5070,14 +5070,26 @@ zoom_control_changed_cb (EphyZoomAction *action, * we must account for their sizes in calculating * the new expanded window size. */ - if (ev_window->priv->chrome & EV_CHROME_SIDEBAR) - new_width += ev_window->priv->sidebar_thumbs->allocation.width; - if (ev_window->priv->chrome & EV_CHROME_TOOLBAR) - new_height += GTK_WIDGET(ev_window->priv->toolbar)->allocation.height; + if (ev_window->priv->chrome & EV_CHROME_SIDEBAR) + { + GtkAllocation alloc; + gtk_widget_get_allocation(ev_window->priv->sidebar_thumbs, &alloc); + new_width += alloc.width; + } + if (ev_window->priv->chrome & EV_CHROME_TOOLBAR) + { + GtkAllocation alloc; + gtk_widget_get_allocation(GTK_WIDGET(ev_window->priv->toolbar), &alloc); + new_height += alloc.height; + } if (ev_window->priv->chrome & EV_CHROME_MENUBAR) - new_height += GTK_WIDGET(ev_window->priv->menubar)->allocation.height; + { + GtkAllocation alloc; + gtk_widget_get_allocation(GTK_WIDGET(ev_window->priv->menubar), &alloc); + new_height += alloc.height; + } /* * Add a little slack |