aboutsummaryrefslogtreecommitdiff
path: root/src/user-widget.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-22 18:53:35 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-22 18:53:35 +0100
commitc8b7d9a2d30fbcd6e0d072a60318b6466653ebb1 (patch)
tree57b946045ee2b009794835730c31f69be45b3257 /src/user-widget.c
parent282f1128e3612e58461c1a134cbb411377fe7e63 (diff)
downloadayatana-indicator-session-c8b7d9a2d30fbcd6e0d072a60318b6466653ebb1.tar.gz
ayatana-indicator-session-c8b7d9a2d30fbcd6e0d072a60318b6466653ebb1.tar.bz2
ayatana-indicator-session-c8b7d9a2d30fbcd6e0d072a60318b6466653ebb1.zip
don't draw border on default icon
Diffstat (limited to 'src/user-widget.c')
-rw-r--r--src/user-widget.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/user-widget.c b/src/user-widget.c
index 41b6eda..a3ad1e4 100644
--- a/src/user-widget.c
+++ b/src/user-widget.c
@@ -37,6 +37,7 @@ struct _UserWidgetPrivate
{
DbusmenuMenuitem* twin_item;
GtkWidget* user_image;
+ gboolean using_personal_icon;
GtkWidget* user_name;
GtkWidget* container;
GtkWidget* tick_icon;
@@ -235,8 +236,15 @@ user_widget_draw_usericon_gtk_3 (GtkWidget *widget,
cairo_t* cr,
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 TRUE;
+ return FALSE;
}
/**
* TODO:
@@ -643,12 +651,17 @@ user_widget_set_twin_item (UserWidget* self,
error = NULL;
}
+ priv->using_personal_icon = FALSE;
+
pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
USER_ITEM_ICON_DEFAULT,
32,
GTK_ICON_LOOKUP_FORCE_SIZE,
&error);
}
+ else{
+ priv->using_personal_icon = TRUE;
+ }
if (pixbuf == NULL || error != NULL) {
g_warning ("Could not load the user image");