← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~cjcurran/indicator-session/gtk2-fixes into lp:indicator-session

 

Conor Curran has proposed merging lp:~cjcurran/indicator-session/gtk2-fixes into lp:indicator-session.

Requested reviews:
  Ted Gould (ted)

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/gtk2-fixes/+merge/72711

Fixes any gtk2 issues there may have been
-- 
https://code.launchpad.net/~cjcurran/indicator-session/gtk2-fixes/+merge/72711
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/user-menu-mgr.c'
--- src/user-menu-mgr.c	2011-08-23 11:51:51 +0000
+++ src/user-menu-mgr.c	2011-08-24 12:47:37 +0000
@@ -49,6 +49,9 @@
 static void activate_online_accounts (DbusmenuMenuitem *mi,
                                       guint timestamp,
                                       gpointer user_data);
+static void activate_user_accounts (DbusmenuMenuitem *mi,
+                                    guint timestamp,
+                                    gpointer user_data);                                      
 static void user_menu_mgr_rebuild_items (UserMenuMgr *self,
                                          gboolean greeter_mode);
 static gboolean check_new_session ();

=== modified file 'src/user-widget.c'
--- src/user-widget.c	2011-08-22 17:53:35 +0000
+++ src/user-widget.c	2011-08-24 12:47:37 +0000
@@ -90,6 +90,10 @@
 static gboolean user_widget_primitive_draw_cb (GtkWidget *image,
                                                    GdkEventExpose *event,
                                                    gpointer user_data);
+static gboolean user_widget_draw_usericon_gtk_2 (GtkWidget *widget,
+                                                 GdkEventExpose *event,
+                                                 gpointer user_data);
+                                                   
 #endif
 
 G_DEFINE_TYPE (UserWidget, user_widget, GTK_TYPE_MENU_ITEM);
@@ -174,6 +178,9 @@
   g_signal_connect_after (GTK_WIDGET(self), "expose-event", 
                           G_CALLBACK(user_widget_primitive_draw_cb),
                           GTK_WIDGET(self));  
+  g_signal_connect_after (GTK_WIDGET(priv->user_image), "expose-event", 
+                          G_CALLBACK(user_widget_draw_usericon_gtk_2),
+                          GTK_WIDGET(self));
   #endif  
 }
 
@@ -252,6 +259,23 @@
  */
 // GTK 2 Expose handler
 #else
+
+static gboolean
+user_widget_draw_usericon_gtk_2 (GtkWidget *widget,
+                                 GdkEventExpose *event,
+                                 gpointer user_data)
+{
+  g_return_val_if_fail(IS_USER_WIDGET(user_data), FALSE);
+  UserWidget* meta = USER_WIDGET(user_data);
+  UserWidgetPrivate * priv = USER_WIDGET_GET_PRIVATE(meta);  
+
+  if (priv->using_personal_icon == FALSE)
+    return FALSE;
+  
+  draw_album_border (widget, FALSE);  
+  return FALSE;
+}
+
 static gboolean
 user_widget_primitive_draw_cb (GtkWidget *widget,
                                GdkEventExpose *event,
@@ -273,10 +297,12 @@
   
   gdouble x, y;  
   style = gtk_widget_get_style (widget);
+
+  GtkAllocation allocation;
   
   gtk_widget_get_allocation (widget, &allocation);
   x = allocation.x + 13;        
-  y = allocation.height / 2;
+  y = allocation.y + allocation.height/2;
   
   cairo_arc (cr, x, y, 3.0, 0.0, 2 * G_PI);;
   


Follow ups