45 lines
1.1 KiB
Diff
45 lines
1.1 KiB
Diff
--- trunk/gtk/gtktooltips.c 2007/07/21 13:19:11 18520
|
|
+++ trunk/gtk/gtktooltips.c 2007/08/07 13:32:19 18587
|
|
@@ -103,6 +103,8 @@
|
|
private->tips_data_table =
|
|
g_hash_table_new_full (NULL, NULL, NULL,
|
|
(GDestroyNotify) gtk_tooltips_destroy_data);
|
|
+
|
|
+ gtk_tooltips_force_window (tooltips);
|
|
}
|
|
|
|
static void
|
|
@@ -144,6 +146,12 @@
|
|
|
|
g_return_if_fail (tooltips != NULL);
|
|
|
|
+ if (tooltips->tip_window)
|
|
+ {
|
|
+ gtk_widget_destroy (tooltips->tip_window);
|
|
+ tooltips->tip_window = NULL;
|
|
+ }
|
|
+
|
|
g_hash_table_remove_all (private->tips_data_table);
|
|
|
|
GTK_OBJECT_CLASS (gtk_tooltips_parent_class)->destroy (object);
|
|
@@ -154,7 +162,18 @@
|
|
{
|
|
g_return_if_fail (GTK_IS_TOOLTIPS (tooltips));
|
|
|
|
- /* nop */
|
|
+ if (!tooltips->tip_window)
|
|
+ {
|
|
+ tooltips->tip_window = gtk_window_new (GTK_WINDOW_POPUP);
|
|
+ g_signal_connect (tooltips->tip_window,
|
|
+ "destroy",
|
|
+ G_CALLBACK (gtk_widget_destroyed),
|
|
+ &tooltips->tip_window);
|
|
+
|
|
+ tooltips->tip_label = gtk_label_new (NULL);
|
|
+ gtk_container_add (GTK_CONTAINER (tooltips->tip_window),
|
|
+ tooltips->tip_label);
|
|
+ }
|
|
}
|
|
|
|
void
|