[gnome-control-center] user-accounts: Don't allow opening non-images



commit 254513f75d040778f72372743541cd8adc12f797
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Nov 21 02:15:59 2010 +0000

    user-accounts: Don't allow opening non-images
    
    We need to be able to load it, otherwise it's not something
    we'll support, and can use.

 panels/user-accounts/um-photo-dialog.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/panels/user-accounts/um-photo-dialog.c b/panels/user-accounts/um-photo-dialog.c
index 18819f4..acc42b0 100644
--- a/panels/user-accounts/um-photo-dialog.c
+++ b/panels/user-accounts/um-photo-dialog.c
@@ -186,6 +186,10 @@ update_preview (GtkFileChooser               *chooser,
                                                                                      mime_type);
                 }
 
+                gtk_dialog_set_response_sensitive (GTK_DIALOG (chooser),
+                                                   GTK_RESPONSE_ACCEPT,
+                                                   (pixbuf != NULL));
+
                 if (pixbuf != NULL) {
                         gtk_image_set_from_pixbuf (GTK_IMAGE (preview), pixbuf);
                         g_object_unref (pixbuf);



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