Merge lp:~dbarth/indicator-me/panel-icon-and-no-frame into lp:indicator-me

Proposed by David Barth
Status: Merged
Merge reported by: David Barth
Merged at revision: not available
Proposed branch: lp:~dbarth/indicator-me/panel-icon-and-no-frame
Merge into: lp:indicator-me
Diff against target: 46 lines (+4/-17)
1 file modified
src/about-me-menu-item.c (+4/-17)
To merge this branch: bzr merge lp:~dbarth/indicator-me/panel-icon-and-no-frame
Reviewer Review Type Date Requested Status
Cody Russell (community) Approve
Indicator Applet Developers Pending
Review via email: mp+22565@code.launchpad.net

Description of the change

Use the right icon, without the image-helper, as recommend by Ted.
Also gets rid of the frame that is not needed anymore (and reduces the avatar size, see https://bugs.launchpad.net/ubuntu/+source/indicator-me/+bug/538003

I also removed the callback to reinforce the size. Cody: can you check that it's not needed anymore?

To post a comment you must log in.
Revision history for this message
Cody Russell (bratsche) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/about-me-menu-item.c'
2--- src/about-me-menu-item.c 2010-03-11 16:22:42 +0000
3+++ src/about-me-menu-item.c 2010-03-31 20:26:32 +0000
4@@ -243,16 +243,6 @@
5 return TRUE;
6 }
7
8-static void
9-image_size_allocate (GtkWidget *widget,
10- GtkAllocation *allocation,
11- gpointer user_data)
12-{
13- gint max = MAX (allocation->width, allocation->height);
14-
15- gtk_widget_set_size_request (widget, max, max);
16-}
17-
18 static GObject*
19 about_me_menu_item_constructor (GType type,
20 guint n_construct_properties,
21@@ -268,21 +258,18 @@
22
23 priv = GET_PRIVATE (object);
24
25- GtkWidget *frame = gtk_frame_new (NULL);
26- gdouble pixels_per_em = get_pixels_per_em (frame);
27- GdkPixbuf *pixbuf = load_icon ("stock_person", pixels_per_em * 3);
28+ priv->label = gtk_label_new (priv->realname);
29+ gdouble pixels_per_em = get_pixels_per_em (priv->label);
30+ GdkPixbuf *pixbuf = load_icon ("stock_person-panel", pixels_per_em * 3);
31 priv->image = gtk_image_new_from_pixbuf (pixbuf);
32- g_signal_connect (frame, "size-allocate", G_CALLBACK (image_size_allocate), NULL);
33 gtk_misc_set_padding (GTK_MISC (priv->image), 2, 2);
34- gtk_container_add (GTK_CONTAINER (frame), priv->image);
35
36 align = gtk_alignment_new (0, 0.3, 0, 0);
37- priv->label = gtk_label_new (priv->realname);
38 gtk_misc_set_padding (GTK_MISC (priv->label), 2, 2);
39 gtk_container_add (GTK_CONTAINER (align), priv->label);
40
41 hbox = gtk_hbox_new (FALSE, 0);
42- gtk_box_pack_start (GTK_BOX (hbox), frame, FALSE, FALSE, 0);
43+ gtk_box_pack_start (GTK_BOX (hbox), priv->image, FALSE, FALSE, 0);
44 gtk_box_pack_start (GTK_BOX (hbox), align, TRUE, TRUE, DEFAULT_PIXELS_PER_EM);
45
46 gtk_container_add (GTK_CONTAINER (object), hbox);

Subscribers

People subscribed via source and target branches