diff options
author | Soeren Sandmann <sandmann@daimi.au.dk> | 2004-06-05 18:24:53 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2004-06-05 18:24:53 +0000 |
commit | e47c0d46b16e5eef904a807cec70a70570a1868f (patch) | |
tree | 92345eb3b981680302208d083c6d1a6d10691d8c /tests/testmerge.c | |
parent | bb376968cf0f6639a148842d91bfeeca4543e90f (diff) | |
download | gtk+-e47c0d46b16e5eef904a807cec70a70570a1868f.tar.gz |
Add a checkbox to queue an merge/unmerge. Patch from Matthias Clasen.
Sat Jun 5 20:05:39 2004 Soeren Sandmann <sandmann@daimi.au.dk>
* tests/testmerge.c: Add a checkbox to queue an
merge/unmerge. Patch from Matthias Clasen.
* gtk/gtktoolbar.c (struct _GtkToolbarPrivate): Add a new flag
"need_rebuild"
(rebuild_menu): New function that rebuilds the overflow menu and
makes sure it doesn't start or end with a separator.
(toolbar_content_new_tool_item)
(toolbar_content_remove)
(toolbar_content_new_compatibility): Set the rebuild_needed flag
(gtk_toolbar_size_allocate): Only show the overflow arrow when we
have actually overflown an item with a proxy menu item. Also make
sure we rebuild the menu if needed.
Fix #125504, #142377, #143463
* gtk/gtkseparatortoolitem.c (gtk_separator_tool_item_expose):
Obey the "priv->draw" flag. (#143692)
Diffstat (limited to 'tests/testmerge.c')
-rw-r--r-- | tests/testmerge.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/testmerge.c b/tests/testmerge.c index d1c6e4781d..05bbf3133b 100644 --- a/tests/testmerge.c +++ b/tests/testmerge.c @@ -66,9 +66,8 @@ toggle_tearoffs (GtkWidget *button, gtk_ui_manager_set_add_tearoffs (merge, !add_tearoffs); } -static void -toggle_dynamic (GtkWidget *button, - GtkUIManager *merge) +static gint +delayed_toggle_dynamic (GtkUIManager *merge) { GtkAction *dyn; static GtkActionGroup *dynamic = NULL; @@ -89,6 +88,7 @@ toggle_dynamic (GtkWidget *button, "label", "Dynamic action 2", "stock_id", GTK_STOCK_EXECUTE, NULL); + g_object_set (dyn, "name", "dyn2", NULL); gtk_action_group_add_action (dynamic, dyn); } @@ -114,8 +114,16 @@ toggle_dynamic (GtkWidget *button, gtk_ui_manager_remove_ui (merge, merge_id); merge_id = 0; } + + return FALSE; } +static void +toggle_dynamic (GtkWidget *button, + GtkUIManager *merge) +{ + g_timeout_add (2000, delayed_toggle_dynamic, merge); +} static void activate_action (GtkAction *action) |