← Back to team overview

ayatana-commits team mailing list archive

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

 

David Barth has proposed merging lp:~dbarth/indicator-me/panel-icon-and-no-frame into lp:indicator-me.

Requested reviews:
  Cody Russell (bratsche)
  Indicator Applet Developers (indicator-applet-developers)
Related bugs:
  #550956 use the proper -panel icon for the default avatar
  https://bugs.launchpad.net/bugs/550956


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?
-- 
https://code.launchpad.net/~dbarth/indicator-me/panel-icon-and-no-frame/+merge/22565
Your team ayatana-commits is subscribed to branch lp:indicator-me.
=== modified file 'src/about-me-menu-item.c'
--- src/about-me-menu-item.c	2010-03-11 16:22:42 +0000
+++ src/about-me-menu-item.c	2010-03-31 20:26:19 +0000
@@ -243,16 +243,6 @@
   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,
@@ -268,21 +258,18 @@
 
   priv = GET_PRIVATE (object);
 
-  GtkWidget *frame = gtk_frame_new (NULL);
-  gdouble pixels_per_em = get_pixels_per_em (frame);
-  GdkPixbuf *pixbuf = load_icon ("stock_person", pixels_per_em * 3);
+  priv->label = gtk_label_new (priv->realname);
+  gdouble pixels_per_em = get_pixels_per_em (priv->label);
+  GdkPixbuf *pixbuf = load_icon ("stock_person-panel", 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), frame, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (hbox), priv->image, FALSE, FALSE, 0);
   gtk_box_pack_start (GTK_BOX (hbox), align, TRUE, TRUE, DEFAULT_PIXELS_PER_EM);
 
   gtk_container_add (GTK_CONTAINER (object), hbox);