summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-11-03 00:28:08 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-02 13:18:16 +0100
commit10d10f5ee8db39f441a2fae623ccb7d7898f9f0a (patch)
tree151d4d9c4e7c7d7730bbe463a03ed2ab65636c5c /src
parent8011a6fb42fdfc1ac99bfc1802433c20056c51e9 (diff)
downloadeom-10d10f5ee8db39f441a2fae623ccb7d7898f9f0a.tar.bz2
eom-10d10f5ee8db39f441a2fae623ccb7d7898f9f0a.tar.xz
GTK3: replace deprecated gtk_widget_size_request with gtk_widget_get_preferred_size
Diffstat (limited to 'src')
-rw-r--r--src/eom-plugin-manager.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eom-plugin-manager.c b/src/eom-plugin-manager.c
index c1e063e..127db89 100644
--- a/src/eom-plugin-manager.c
+++ b/src/eom-plugin-manager.c
@@ -566,7 +566,11 @@ menu_position_under_widget (GtkMenu *menu,
GtkAllocation allocation;
gdk_window_get_origin (gtk_widget_get_window (w), x, y);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+#endif
gtk_widget_get_allocation (w, &allocation);
if (gtk_widget_get_direction (w) == GTK_TEXT_DIR_RTL) {
@@ -621,7 +625,11 @@ menu_position_under_tree_view (GtkMenu *menu,
if (gtk_widget_get_direction (GTK_WIDGET (tree)) == GTK_TEXT_DIR_RTL) {
GtkRequisition requisition;
+#if GTK_CHECK_VERSION(3, 0, 0)
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &requisition, NULL);
+#else
gtk_widget_size_request (GTK_WIDGET (menu), &requisition);
+#endif
*x += rect.width - requisition.width;
}