summaryrefslogtreecommitdiff
path: root/tests/testdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-07-17 12:11:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-07-17 12:17:32 -0400
commitdf007fb982f7e8928770d64b57b3b14986799518 (patch)
tree032d1cffceaa03e047de18125e4bddc666188672 /tests/testdialog.c
parentdc1317a521f956cc1e42f442b43a87a48aa28337 (diff)
downloadgtk+-df007fb982f7e8928770d64b57b3b14986799518.tar.gz
Add another dialog to test
This one is taken from polari, and currently doesn't work as expected.
Diffstat (limited to 'tests/testdialog.c')
-rw-r--r--tests/testdialog.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/testdialog.c b/tests/testdialog.c
index dbc2ff2de1..3c955074d5 100644
--- a/tests/testdialog.c
+++ b/tests/testdialog.c
@@ -177,6 +177,21 @@ show_dialog_with_header_buttons (GtkWindow *parent)
gtk_widget_destroy (dialog);
}
+static void
+show_dialog_with_header_buttons2 (GtkWindow *parent)
+{
+ GtkBuilder *builder;
+ GtkWidget *dialog;
+
+ builder = gtk_builder_new ();
+ gtk_builder_add_from_file (builder, "dialog.ui", NULL);
+ dialog = (GtkWidget *)gtk_builder_get_object (builder, "dialog");
+ g_object_unref (builder);
+
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+}
+
typedef struct {
GtkDialog parent;
} MyDialog;
@@ -364,6 +379,12 @@ main (int argc, char *argv[])
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (box), button);
+ button = gtk_button_new_with_label ("Header & Buttons & Builder");
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (show_dialog_with_header_buttons2), window);
+ gtk_widget_show (button);
+ gtk_container_add (GTK_CONTAINER (box), button);
+
+ button = gtk_button_new_with_label ("Template");
button = gtk_button_new_with_label ("Template");
g_signal_connect_swapped (button, "clicked", G_CALLBACK (show_dialog_from_template), window);
gtk_widget_show (button);