From 1f8942769b08a48c83cc748e52ae480f38045b4a Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Thu, 3 Jul 2003 01:02:04 +0000 Subject: Insert cast to fix warning. Assign something to old_value to quiet gcc Thu Jul 3 03:13:20 2003 Soeren Sandmann * gtk/gtkpaned.c (gtk_paned_set_child_property): Insert cast to fix warning. Assign something to old_value to quiet gcc * gtk/gtkcalendar.c (start_spinning): gtk_timeout_add->g_timeout_add * gtk/gtkicontheme.c (theme_lookup_icon): Make it compile (remove double semicolon) * gtk/gtktoolbutton.c (gtk_tool_button_class_init): Long comment about properties. (gtk_tool_button_class_init): Improve text for "use_underline" property (gtk_tool_button_create_menu_proxy): Fix up to use_mnemonic based on whether the passed-in label has use_mnemonic set (gtk_tool_button_create_menu_proxy): Split image cloning out in new function. Make that function also handle image with pixbuf storage. (gtk_tool_button_construct_contents): Use gtk_widget_destroy() instead of gtk_container_remove(). (gtk_tool_button_construct_contents): Fix eliding bug * gtk/gtktoolbar.c (gtk_toolbar_finalize): New function. Unref tooltips, pointed out by Morten Welinder (gtk_toolbar_button_press): Make popup_context_menu signal provide coordinates and button number * tests/testtoolbar.c (main): Add new pixbuf toolbutton * tests/apple-red.png: new file --- tests/apple-red.png | Bin 0 -> 3569 bytes tests/testtoolbar.c | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/apple-red.png (limited to 'tests') diff --git a/tests/apple-red.png b/tests/apple-red.png new file mode 100644 index 0000000000..8d0f458491 Binary files /dev/null and b/tests/apple-red.png differ diff --git a/tests/testtoolbar.c b/tests/testtoolbar.c index 6ad3b8e848..6d8b92c2af 100644 --- a/tests/testtoolbar.c +++ b/tests/testtoolbar.c @@ -532,15 +532,19 @@ main (gint argc, gchar **argv) item = gtk_radio_tool_button_new_from_stock (group, GTK_STOCK_JUSTIFY_CENTER); make_prop_editor (G_OBJECT (item)); - group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item)); + group = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (item)); add_item_to_list (store, item, "Center"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); item = gtk_radio_tool_button_new_from_stock (group, GTK_STOCK_JUSTIFY_RIGHT); - add_item_to_list (store, item, "Right"); gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); + item = gtk_tool_button_new ("_Apple", gtk_image_new_from_file ("apple-red.png")); + add_item_to_list (store, item, "Apple"); + gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1); + gtk_tool_button_set_use_underline (GTK_TOOL_BUTTON (item), TRUE); + hbox = gtk_hbox_new (FALSE, 5); gtk_container_set_border_width (GTK_CONTAINER (hbox), 5); gtk_table_attach (GTK_TABLE (table), hbox, -- cgit v1.2.1