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.
This commit is contained in:
Bastien Nocera 2010-11-21 02:15:59 +00:00
parent 7e5aecdf98
commit 254513f75d

View file

@ -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);