diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-05-15 21:46:42 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-05-15 21:46:42 +0000 |
commit | 70d78734c5c9469bc0863136159f1ad1ac229627 (patch) | |
tree | 1b22f28f3180850361371ce9fcefd3176093ed60 /tests | |
parent | 030ac8095a0d31386a197c7fe066b2fd96095d0e (diff) | |
download | gtk+-70d78734c5c9469bc0863136159f1ad1ac229627.tar.gz |
Special case menu items to pop down on motion. (#75961)
Wed May 15 17:12:50 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtktooltips.c: Special case menu items to
pop down on motion. (#75961)
* tests/testgtk.c (create_item_factory): Add tooltips
to the File menu.
* gtk/gtkentry.c (update_im_cursor_location): Fix
cursor locations passed to the IM context.
(#80027, Yao Zhang)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testgtk.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c index 62c8036089..2baf054e86 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -3598,6 +3598,7 @@ create_item_factory (GtkWidget *widget) GtkWidget *button; GtkAccelGroup *accel_group; GtkItemFactory *item_factory; + GtkTooltips *tooltips; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -3628,6 +3629,23 @@ create_item_factory (GtkWidget *widget) "/Preferences/Shape/Oval")), TRUE); + /* Test how tooltips (ugh) work on menu items + */ + tooltips = gtk_tooltips_new (); + g_object_ref (tooltips); + gtk_object_sink (GTK_OBJECT (tooltips)); + g_object_set_data_full (G_OBJECT (window), "testgtk-tooltips", + tooltips, (GDestroyNotify)g_object_unref); + + gtk_tooltips_set_tip (tooltips, gtk_item_factory_get_item (item_factory, "/File/New"), + "Create a new file", NULL); + gtk_tooltips_set_tip (tooltips, gtk_item_factory_get_item (item_factory, "/File/Open"), + "Open a file", NULL); + gtk_tooltips_set_tip (tooltips, gtk_item_factory_get_item (item_factory, "/File/Save"), + "Safe file", NULL); + gtk_tooltips_set_tip (tooltips, gtk_item_factory_get_item (item_factory, "/File/Save As..."), + "Save under a new name", NULL); + box1 = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (window), box1); |