From 49f3411a5c414ec1a6a7cf68de9ef7c8c8cb7938 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 16 Sep 2011 14:14:17 +0200 Subject: avatar-chooser: split creation of the file chooser dialog https://bugzilla.gnome.org/show_bug.cgi?id=652985 --- libempathy-gtk/empathy-avatar-chooser.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index e1487d563..62ff491ea 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -934,17 +934,18 @@ avatar_chooser_clicked_cb (GtkWidget *button, gtk_file_chooser_dialog_new (_("Select Your Avatar Image"), empathy_get_toplevel_window (GTK_WIDGET (self)), GTK_FILE_CHOOSER_ACTION_OPEN, - #ifdef HAVE_CHEESE - _("Take a picture..."), - EMPATHY_AVATAR_CHOOSER_RESPONSE_WEBCAM, - #endif - _("No Image"), - EMPATHY_AVATAR_CHOOSER_RESPONSE_NO_IMAGE, - GTK_STOCK_CANCEL, - EMPATHY_AVATAR_CHOOSER_RESPONSE_CANCEL, - GTK_STOCK_OPEN, - EMPATHY_AVATAR_CHOOSER_RESPONSE_FILE, - NULL)); + NULL, NULL)); + +#ifdef HAVE_CHEESE + gtk_dialog_add_button (GTK_DIALOG (self->priv->chooser_dialog), + _("Take a picture..."), EMPATHY_AVATAR_CHOOSER_RESPONSE_WEBCAM); +#endif + + gtk_dialog_add_buttons (GTK_DIALOG (self->priv->chooser_dialog), + _("No Image"), EMPATHY_AVATAR_CHOOSER_RESPONSE_NO_IMAGE, + GTK_STOCK_CANCEL, EMPATHY_AVATAR_CHOOSER_RESPONSE_CANCEL, + GTK_STOCK_OPEN, EMPATHY_AVATAR_CHOOSER_RESPONSE_FILE, + NULL); chooser_dialog = self->priv->chooser_dialog; gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser_dialog), TRUE); -- cgit v1.2.3