gdm r6133 - in trunk: . gui/simple-greeter



Author: halfline
Date: Tue Apr  8 03:41:29 2008
New Revision: 6133
URL: http://svn.gnome.org/viewvc/gdm?rev=6133&view=rev

Log:
2008-04-07 Ray Strode <rstrode redhat com>

	* gui/simple-greeter/gdm-user-chooser-widget.c
	(add_user_other), (add_user_auto),
	(gdm_user_chooser_widget_dispose),
	(get_empty_pixbuf), (load_icons):
	Drop icons for Other and Auto users for now


Modified:
   trunk/ChangeLog
   trunk/gui/simple-greeter/gdm-user-chooser-widget.c

Modified: trunk/gui/simple-greeter/gdm-user-chooser-widget.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-chooser-widget.c	(original)
+++ trunk/gui/simple-greeter/gdm-user-chooser-widget.c	Tue Apr  8 03:41:29 2008
@@ -55,6 +55,7 @@
 
         GdkPixbuf      *logged_in_pixbuf;
         GdkPixbuf      *stock_person_pixbuf;
+        GdkPixbuf      *empty_pixbuf;
 
         guint           show_other_user : 1;
         guint           show_guest_user : 1;
@@ -76,7 +77,7 @@
 {
         gdm_chooser_widget_add_item (GDM_CHOOSER_WIDGET (widget),
                                      GDM_USER_CHOOSER_USER_OTHER,
-                                     widget->priv->stock_person_pixbuf,
+                                     widget->priv->empty_pixbuf,
                                      _("Other..."),
                                      _("Choose a different account"),
                                      0,
@@ -102,7 +103,7 @@
 {
         gdm_chooser_widget_add_item (GDM_CHOOSER_WIDGET (widget),
                                      GDM_USER_CHOOSER_USER_AUTO,
-                                     widget->priv->stock_person_pixbuf,
+                                     widget->priv->empty_pixbuf,
                                      _("Automatic Login"),
                                      _("Automatically login to the system after selecting options"),
                                      0,
@@ -268,6 +269,11 @@
                 g_object_unref (widget->priv->stock_person_pixbuf);
                 widget->priv->stock_person_pixbuf = NULL;
         }
+
+        if (widget->priv->empty_pixbuf != NULL) {
+                g_object_unref (widget->priv->empty_pixbuf);
+                widget->priv->empty_pixbuf = NULL;
+        }
 }
 
 static void
@@ -284,6 +290,24 @@
 }
 
 static GdkPixbuf *
+get_empty_pixbuf (GdmUserChooserWidget *widget)
+{
+        GdkPixbuf *pixbuf;
+        guchar    *pixels;
+        int        row;
+        int        rowstride;
+
+        pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, ICON_SIZE, ICON_SIZE);
+        pixels = gdk_pixbuf_get_pixels (pixbuf);
+        rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+        for (row = 0; row < ICON_SIZE; row++) {
+                memset (pixels + row * rowstride, 0, ICON_SIZE * 4);
+        }
+
+        return pixbuf;
+}
+
+static GdkPixbuf *
 get_stock_person_pixbuf (GdmUserChooserWidget *widget)
 {
         GdkPixbuf *pixbuf;
@@ -345,6 +369,7 @@
                 g_object_unref (widget->priv->logged_in_pixbuf);
         }
         widget->priv->logged_in_pixbuf = get_logged_in_pixbuf (widget);
+        widget->priv->empty_pixbuf = get_empty_pixbuf (widget);
 
         old_pixbuf = widget->priv->stock_person_pixbuf;
         widget->priv->stock_person_pixbuf = get_stock_person_pixbuf (widget);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]