aboutsummaryrefslogtreecommitdiff
path: root/src/idoscalemenuitem.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-12-14 12:19:26 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-12-14 12:19:26 -0500
commit9b717e50b0890d938cd2cf6bb4ec938240740f31 (patch)
tree1c3ced03cd9ec27f3406099e33cfb6892aa7ee2e /src/idoscalemenuitem.c
parent50b234a41b70db8f4c8b15ddaf2d15beacb602d6 (diff)
downloadayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.tar.gz
ayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.tar.bz2
ayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.zip
removed deprecations from gtk3 and fixed sizing issues with idemessagedialog (LP: #888392)
Diffstat (limited to 'src/idoscalemenuitem.c')
-rw-r--r--src/idoscalemenuitem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
index b7c93b7..f973f52 100644
--- a/src/idoscalemenuitem.c
+++ b/src/idoscalemenuitem.c
@@ -157,16 +157,26 @@ ido_scale_menu_item_size_allocate (GtkWidget *widget,
switch (priv->style)
{
case IDO_SCALE_MENU_ITEM_STYLE_IMAGE:
+#ifdef USE_GTK3
+ gtk_widget_get_preferred_size (priv->primary_image, &primary_req, NULL);
+ gtk_widget_get_preferred_size (priv->secondary_image, &secondary_req, NULL);
+#else
gtk_widget_get_child_requisition (priv->primary_image, &primary_req);
gtk_widget_get_child_requisition (priv->secondary_image, &secondary_req);
+#endif
primary_padding = gtk_widget_get_visible (priv->primary_image) ? primary_req.width : 0;
secondary_padding = gtk_widget_get_visible (priv->secondary_image) ? secondary_req.width : 0;
break;
case IDO_SCALE_MENU_ITEM_STYLE_LABEL:
+#ifdef USE_GTK3
+ gtk_widget_get_preferred_size (priv->primary_label, &primary_req, NULL);
+ gtk_widget_get_preferred_size (priv->secondary_label, &secondary_req, NULL);
+#else
gtk_widget_get_child_requisition (priv->primary_label, &primary_req);
gtk_widget_get_child_requisition (priv->secondary_label, &secondary_req);
+#endif
primary_padding = gtk_widget_get_visible (priv->primary_label) ? primary_req.width : 0;
secondary_padding = gtk_widget_get_visible (priv->secondary_label) ? secondary_req.width : 0;
@@ -247,7 +257,11 @@ ido_scale_menu_item_constructed (GObject *object)
gtk_container_add (GTK_CONTAINER (priv->proxy), priv->scale);
#endif
+#ifdef USE_GTK3
+ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
hbox = gtk_hbox_new (FALSE, 0);
+#endif
priv->primary_image = gtk_image_new ();
g_signal_connect (priv->primary_image, "notify",