[accounts-dialog] Avoid empty photo popup menu



commit cb4e4ae3dc453e808d3a4461ef0a81fd82de2010
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Oct 14 12:42:19 2010 +0100

    Avoid empty photo popup menu
    
    When the pixmaps faces directory isn't available, still show
    the "Use other file" menu item (at least).

 src/um-photo-dialog.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/um-photo-dialog.c b/src/um-photo-dialog.c
index fc3415c..2061ebe 100644
--- a/src/um-photo-dialog.c
+++ b/src/um-photo-dialog.c
@@ -382,7 +382,7 @@ setup_photo_popup (UmPhotoDialog *um)
         if (dir == NULL) {
                 g_warning ("Failed to load faces: %s", error->message);
                 g_error_free (error);
-                goto out;
+                goto skip_faces;
         }
 
         while ((face = g_dir_read_name (dir)) != NULL) {
@@ -425,6 +425,8 @@ setup_photo_popup (UmPhotoDialog *um)
 
         y++;
 
+skip_faces:
+
 #ifdef HAVE_CHEESE
         um->take_photo_menuitem = gtk_menu_item_new_with_label (_("Take a photo..."));
         gtk_menu_attach (GTK_MENU (menu), GTK_WIDGET (um->take_photo_menuitem),
@@ -451,7 +453,6 @@ setup_photo_popup (UmPhotoDialog *um)
                           G_CALLBACK (file_icon_selected), um);
         gtk_widget_show (menuitem);
 
-out:
         um->photo_popup = menu;
 }
 



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