diff options
author | infirit <[email protected]> | 2014-11-26 14:59:01 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-26 18:13:43 +0100 |
commit | 7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1 (patch) | |
tree | 8bc45fd0079293b4a328d779d4d9ff23356f9900 /charpick | |
parent | d2d685818a85b773c49802c494a0c386917b5ee6 (diff) | |
download | mate-applets-7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1.tar.bz2 mate-applets-7aebf38bbbe79c3a82fc4723f3fa4b01e230b0f1.tar.xz |
Gtk3: don't use deprecated gtk_widget_size_request
Taken from gnome-panel commit: c05c6b07ec493d174062a06caf185d324fd6e0c4
From: Alberts Muktupāvels <[email protected]>
Diffstat (limited to 'charpick')
-rw-r--r-- | charpick/charpick.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/charpick/charpick.c b/charpick/charpick.c index 299df110..a9ff423b 100644 --- a/charpick/charpick.c +++ b/charpick/charpick.c @@ -328,8 +328,12 @@ get_menu_pos (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data) GtkRequisition reqmenu; gint tempx, tempy, width, height; gint screen_width, screen_height; - + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &reqmenu); +#else gtk_widget_size_request (GTK_WIDGET (menu), &reqmenu); +#endif gdk_window_get_origin (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), &tempx, &tempy); gdk_window_get_geometry (GDK_WINDOW (gtk_widget_get_window(curr_data->applet)), NULL, NULL, &width, &height @@ -488,8 +492,12 @@ build_table(charpick_data *p_curr_data) force_no_focus_padding (toggle_button[i]); gtk_widget_set_tooltip_text (toggle_button[i], name); g_free (name); - + +#if GTK_CHECK_VERSION (3, 0, 0) + gtk_widget_get_preferred_size (toggle_button[i], NULL, &req); +#else gtk_widget_size_request (toggle_button[i], &req); +#endif max_width = MAX (max_width, req.width); max_height = MAX (max_height, req.height-2); |