Commit eb162408 authored by Vincent Untz's avatar Vincent Untz Committed by Vincent Untz
Browse files

migrate to GtkTooltip (destroy_tooltip): kill (fish_applet_destroy):

2007-06-14  Vincent Untz  <vuntz@gnome.org>

	* fish.c: (set_tooltip): migrate to GtkTooltip
	(destroy_tooltip): kill
	(fish_applet_destroy): updated

svn path=/trunk/; revision=10461
parent 4df1c653
2007-06-14 Vincent Untz <vuntz@gnome.org>
* fish.c: (set_tooltip): migrate to GtkTooltip
(destroy_tooltip): kill
(fish_applet_destroy): updated
==================== 2.19.3 ====================
==================== 2.19.2 ====================
......
......@@ -1703,36 +1703,14 @@ handle_button_release (FishApplet *fish,
static void
set_tooltip (FishApplet *fish)
{
GtkTooltips *tooltips;
const char *desc_format = _("%s the Fish, the fortune teller");
char *desc;
const char *desc_format = _("%s the Fish, the fortune teller");
char *desc;
tooltips = g_object_get_data (G_OBJECT (fish), "tooltips");
if (!tooltips) {
tooltips = gtk_tooltips_new ();
g_object_ref (tooltips);
gtk_object_sink (GTK_OBJECT (tooltips));
g_object_set_data (G_OBJECT (fish), "tooltips", tooltips);
}
desc = g_strdup_printf (desc_format, fish->name);
gtk_tooltips_set_tip (tooltips, GTK_WIDGET (fish), desc, NULL);
desc = g_markup_printf_escaped (desc_format, fish->name);
g_object_set (fish, "tooltip-markup", desc, NULL);
g_free (desc);
}
static void
destroy_tooltip (FishApplet *fish)
{
GtkTooltips *tooltips;
tooltips = g_object_get_data (G_OBJECT (fish), "tooltips");
if (tooltips) {
g_object_unref (tooltips);
g_object_set_data (G_OBJECT (fish), "tooltips", NULL);
}
}
static void
setup_fish_widget (FishApplet *fish)
{
......@@ -1971,8 +1949,6 @@ fish_applet_destroy (GtkObject *object)
fish_close_channel (fish);
destroy_tooltip (fish);
GTK_OBJECT_CLASS (parent_class)->destroy (object);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment