+Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ * tests/testcombochange.c: Add an animation mode, to test
+ how the combobox behaves if the model changes while it is popped
+ up.
+
Tue Mar 2 17:06:05 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
+Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ * tests/testcombochange.c: Add an animation mode, to test
+ how the combobox behaves if the model changes while it is popped
+ up.
+
Tue Mar 2 17:06:05 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
+Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ * tests/testcombochange.c: Add an animation mode, to test
+ how the combobox behaves if the model changes while it is popped
+ up.
+
Tue Mar 2 17:06:05 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
+Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ * tests/testcombochange.c: Add an animation mode, to test
+ how the combobox behaves if the model changes while it is popped
+ up.
+
Tue Mar 2 17:06:05 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
+Wed Mar 3 00:28:59 2004 Matthias Clasen <maclas@gmx.de>
+
+ * tests/testcombochange.c: Add an animation mode, to test
+ how the combobox behaves if the model changes while it is popped
+ up.
+
Tue Mar 2 17:06:05 2004 Owen Taylor <otaylor@redhat.com>
* === Released 2.3.5 ===
for (i = 0; i < contents->len; i++)
shuffle_array[i] = i;
- for (i = 0; i < contents->len - 1; i++)
+ for (i = 0; i + 1 < contents->len; i++)
{
gint pos = g_random_int_range (i, contents->len);
gint tmp;
-
+
tmp = shuffle_array[i];
shuffle_array[i] = shuffle_array[pos];
shuffle_array[pos] = tmp;
g_free (shuffle_array);
}
+static int n_animations = 0;
+static int timer = 0;
+
+static gint
+animation_timer (gpointer data)
+{
+ switch (g_random_int_range (0, 3))
+ {
+ case 0:
+ on_insert ();
+ break;
+ case 1:
+ on_delete ();
+ break;
+ case 2:
+ on_reorder ();
+ break;
+ }
+
+ n_animations--;
+ return n_animations > 0;
+}
+
+static void
+on_animate (void)
+{
+ n_animations += 20;
+
+ timer = g_timeout_add (1000, (GSourceFunc) animation_timer, NULL);
+}
+
int
main (int argc, char **argv)
{
gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
g_signal_connect (button, "clicked", G_CALLBACK (on_reorder), NULL);
+ button = align_button_new ("Animate");
+ gtk_box_pack_start (GTK_BOX (button_vbox), button, FALSE, FALSE, 0);
+ g_signal_connect (button, "clicked", G_CALLBACK (on_animate), NULL);
+
gtk_widget_show_all (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));