[gtk+] GtkAppChooserDialog: Simplify the construction
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkAppChooserDialog: Simplify the construction
- Date: Wed, 24 Aug 2011 04:51:03 +0000 (UTC)
commit 80b94156edccdc1c4b8a994a989164581170de51
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Aug 24 00:11:32 2011 -0400
GtkAppChooserDialog: Simplify the construction
We do the same in other places.
gtk/gtkappchooserdialog.c | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c
index 3f1b798..84afceb 100644
--- a/gtk/gtkappchooserdialog.c
+++ b/gtk/gtkappchooserdialog.c
@@ -527,23 +527,9 @@ build_dialog_ui (GtkAppChooserDialog *self)
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
- /* Create a custom stock icon */
- self->priv->button = gtk_button_new ();
-
- label = gtk_label_new_with_mnemonic (_("_Select"));
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (self->priv->button));
- gtk_widget_set_halign (label, GTK_ALIGN_CENTER);
- gtk_widget_show (label);
- self->priv->open_label = label;
-
- gtk_container_add (GTK_CONTAINER (self->priv->button),
- self->priv->open_label);
-
- gtk_widget_show (self->priv->button);
- gtk_widget_set_can_default (self->priv->button, TRUE);
-
- gtk_dialog_add_action_widget (GTK_DIALOG (self),
- self->priv->button, GTK_RESPONSE_OK);
+ self->priv->button = gtk_dialog_add_button (GTK_DIALOG (self),
+ _("_Select"),
+ GTK_RESPONSE_OK);
gtk_dialog_set_default_response (GTK_DIALOG (self),
GTK_RESPONSE_OK);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]