diff options
author | Tim Janik <timj@gtk.org> | 1998-04-11 03:54:34 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-04-11 03:54:34 +0000 |
commit | 9c585e92100817c9d0ab6434b600b086eba71f06 (patch) | |
tree | aab808ff55bd254bd7dbf86094b0cddec43f8e76 /tests/testgtk.c | |
parent | 0e3d507006ab9a02ff40456481d5c6138f3af4f7 (diff) | |
download | gtk+-9c585e92100817c9d0ab6434b600b086eba71f06.tar.gz |
don't shut down the tooltip on expose events.
Sat Apr 11 05:51:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtktooltips.c (gtk_tooltips_event_handler): don't shut down the
tooltip on expose events.
* gtk/testgtk.c (create_progress_bar): add an example tooltip.
Diffstat (limited to 'tests/testgtk.c')
-rw-r--r-- | tests/testgtk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c index 873784185e..b71d813ad9 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -4768,7 +4768,8 @@ create_progress_bar () GtkWidget *vbox; GtkWidget *pbar; GtkWidget *label; - + GtkTooltips *tooltips; + if (!window) { window = gtk_dialog_new (); @@ -4780,6 +4781,7 @@ create_progress_bar () gtk_window_set_title (GTK_WINDOW (window), "dialog"); gtk_container_border_width (GTK_CONTAINER (window), 0); + tooltips = gtk_tooltips_new(); vbox = gtk_vbox_new (FALSE, 5); gtk_container_border_width (GTK_CONTAINER (vbox), 10); @@ -4793,9 +4795,12 @@ create_progress_bar () gtk_widget_show (label); pbar = gtk_progress_bar_new (); + gtk_widget_set_events (pbar, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK); gtk_widget_set_usize (pbar, 200, 20); gtk_box_pack_start (GTK_BOX (vbox), pbar, TRUE, TRUE, 0); gtk_widget_show (pbar); + gtk_tooltips_set_tip (tooltips, pbar, "Countdown is progressing yet!", "Secret!"); + gtk_tooltips_set_delay (tooltips, 0); progress_timer = gtk_timeout_add (100, progress_timeout, pbar); |