diff options
author | Søren Sandmann <sandmann@redhat.com> | 2004-12-22 19:25:24 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2004-12-22 19:25:24 +0000 |
commit | 63f2fd9614e46e0ce8f6bbf61e276f6ae2b7c54a (patch) | |
tree | bafb4c20f24151e41c02c929acf849709f321ecb /tests | |
parent | e9740d62c39fe94b5f214808704c9cb2e17818a5 (diff) | |
download | gdk-pixbuf-63f2fd9614e46e0ce8f6bbf61e276f6ae2b7c54a.tar.gz |
Add sensitivity-changing timeout. Written by Christian Persch.
Wed Dec 22 14:22:19 2004 Søren Sandmann <sandmann@redhat.com>
* tests/testtoolbar.c (timeout_cb): Add sensitivity-changing
timeout. Written by Christian Persch.
Wed Dec 22 14:14:02 2004 Søren Sandmann <sandmann@redhat.com>
Bug #161561
* gdk/x11/gdkwindow-x11.c (tmp_{re,un}set_bg): Only set/reset the
background for windows that get expose events.
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Remove
hack to repaint !expose windows.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testtoolbar.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c index 73e88cc42..9af5d9279 100644 --- a/tests/testtoolbar.c +++ b/tests/testtoolbar.c @@ -476,6 +476,18 @@ toolbar_drag_leave (GtkToolbar *toolbar, gtk_toolbar_set_drop_highlight_item (toolbar, NULL, 0); } +static gboolean +timeout_cb (GtkWidget *widget) +{ + static gboolean sensitive = TRUE; + + sensitive = !sensitive; + + gtk_widget_set_sensitive (widget, sensitive); + + return TRUE; +} + gint main (gint argc, gchar **argv) { @@ -587,6 +599,7 @@ main (gint argc, gchar **argv) gtk_tool_button_set_label (GTK_TOOL_BUTTON (item), NULL); add_item_to_list (store, item, "New"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); + g_timeout_add (3000, (GSourceFunc) timeout_cb, item); gtk_tool_item_set_expand (item, TRUE); menu = gtk_menu_new (); @@ -601,7 +614,7 @@ main (gint argc, gchar **argv) gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (item), menu); add_item_to_list (store, item, "Open"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); - + item = gtk_separator_tool_item_new (); add_item_to_list (store, item, "-----"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); |