ayatana-commits team mailing list archive
-
ayatana-commits team
-
Mailing list archive
-
Message #01406
[Branch ~indicator-applet-developers/indicator-me/trunk] Rev 95: reverting to 0.2.6 with just the -panel fix for #550956
Merge authors:
David Barth (dbarth)
Related merge proposals:
https://code.launchpad.net/~dbarth/indicator-me/lets-keep-it-simple/+merge/23402
proposed by: David Barth (dbarth)
review: Approve - Ted Gould (ted)
------------------------------------------------------------
revno: 95 [merge]
committer: David Barth <david.barth@xxxxxxxxxxxxx>
branch nick: indicator-me
timestamp: Wed 2010-04-14 17:41:31 +0200
message:
reverting to 0.2.6 with just the -panel fix for #550956
modified:
src/about-me-menu-item.c
--
lp:indicator-me
https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk
Your team ayatana-commits is subscribed to branch lp:indicator-me.
To unsubscribe from this branch go to https://code.launchpad.net/~indicator-applet-developers/indicator-me/trunk/+edit-subscription
=== modified file 'src/about-me-menu-item.c'
--- src/about-me-menu-item.c 2010-04-01 23:14:13 +0000
+++ src/about-me-menu-item.c 2010-04-14 14:52:10 +0000
@@ -243,6 +243,16 @@
return TRUE;
}
+static void
+image_size_allocate (GtkWidget *widget,
+ GtkAllocation *allocation,
+ gpointer user_data)
+{
+ gint max = MAX (allocation->width, allocation->height);
+
+ gtk_widget_set_size_request (widget, max, max);
+}
+
static GObject*
about_me_menu_item_constructor (GType type,
guint n_construct_properties,
@@ -258,20 +268,23 @@
priv = GET_PRIVATE (object);
- priv->label = gtk_label_new (priv->realname);
- gdouble pixels_per_em = get_pixels_per_em (priv->label);
+ GtkWidget *frame = gtk_frame_new (NULL);
+ gdouble pixels_per_em = get_pixels_per_em (frame);
GdkPixbuf *pixbuf = load_icon ("stock_person-panel", pixels_per_em * 3);
if (pixbuf == NULL)
pixbuf = load_icon ("stock_person", pixels_per_em * 3);
priv->image = gtk_image_new_from_pixbuf (pixbuf);
+ g_signal_connect (frame, "size-allocate", G_CALLBACK (image_size_allocate), NULL);
gtk_misc_set_padding (GTK_MISC (priv->image), 2, 2);
+ gtk_container_add (GTK_CONTAINER (frame), priv->image);
align = gtk_alignment_new (0, 0.3, 0, 0);
+ priv->label = gtk_label_new (priv->realname);
gtk_misc_set_padding (GTK_MISC (priv->label), 2, 2);
gtk_container_add (GTK_CONTAINER (align), priv->label);
hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), priv->image, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox), align, TRUE, TRUE, DEFAULT_PIXELS_PER_EM);
gtk_container_add (GTK_CONTAINER (object), hbox);