From a11951d98dad7f9b65be6c5866c3dd46b3f077e6 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Wed, 24 Aug 2011 10:22:02 +0100 Subject: gtk2 user widget drawing fixed --- src/user-widget.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/user-widget.c b/src/user-widget.c index a3ad1e4..1530967 100644 --- a/src/user-widget.c +++ b/src/user-widget.c @@ -90,6 +90,10 @@ static gboolean user_widget_draw_usericon_gtk_3 (GtkWidget *widget, 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 @@ user_widget_init (UserWidget *self) 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 @@ user_widget_draw_usericon_gtk_3 (GtkWidget *widget, */ // 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,6 +297,8 @@ user_widget_primitive_draw_cb (GtkWidget *widget, gdouble x, y; style = gtk_widget_get_style (widget); + + GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); x = allocation.x + 13; -- cgit v1.2.3 From a7004c65b73ddf79a69b504a5e70227c32c75eeb Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Wed, 24 Aug 2011 10:36:58 +0100 Subject: fix that broken trunk --- src/user-menu-mgr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 588d3d0..e59dda8 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -49,6 +49,9 @@ static gint compare_users_by_username (const gchar *a, 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 (); -- cgit v1.2.3 From 5654480a85100da972d03729f7012c4402eb7e13 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Wed, 24 Aug 2011 12:45:58 +0100 Subject: fix the dot alignment in the gtk2s user widget --- src/user-widget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user-widget.c b/src/user-widget.c index 1530967..937a9eb 100644 --- a/src/user-widget.c +++ b/src/user-widget.c @@ -302,7 +302,7 @@ user_widget_primitive_draw_cb (GtkWidget *widget, 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);; -- cgit v1.2.3