mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
teststack: don't enumerate transitions manually
Thats what introspection is for.
This commit is contained in:
parent
3957ce4898
commit
3db60baf2d
@ -108,6 +108,7 @@ main (gint argc,
|
||||
GtkWidget *scrolled_win;
|
||||
int i;
|
||||
GtkTreeIter iter;
|
||||
GEnumClass *class;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
@ -210,30 +211,14 @@ main (gint argc,
|
||||
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "NONE");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "CROSSFADE");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_RIGHT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_LEFT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_UP");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_DOWN");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_LEFT_RIGHT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "SLIDE_UP_DOWN");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_UP");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_DOWN");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_LEFT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_RIGHT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "UNDER_UP");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "UNDER_DOWN");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "UNDER_LEFT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "UNDER_RIGHT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_UP_DOWN");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_DOWN_UP");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_LEFT_RIGHT");
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "OVER_RIGHT_LEFT");
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
||||
class = g_type_class_ref (GTK_TYPE_STACK_TRANSITION_TYPE);
|
||||
for (i = 0; i < class->n_values; i++)
|
||||
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), class->values[i].value_nick);
|
||||
g_type_class_unref (class);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (hbox), combo);
|
||||
g_signal_connect (combo, "changed", (GCallback) toggle_transitions, NULL);
|
||||
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
|
Loading…
Reference in New Issue
Block a user