libgimpwidgets: tooltips no longer require an event box around no-window widgets

This commit is contained in:
Michael Natterer 2010-10-31 16:30:03 +01:00
parent 1f398549e2
commit be3ebbb65c
1 changed files with 4 additions and 25 deletions

View File

@ -137,7 +137,6 @@ gimp_scale_entry_new_internal (gboolean color_scale,
const gchar *help_id)
{
GtkWidget *label;
GtkWidget *ebox;
GtkWidget *scale;
GtkWidget *spinbutton;
GtkObject *adjustment;
@ -145,27 +144,9 @@ gimp_scale_entry_new_internal (gboolean color_scale,
label = gtk_label_new_with_mnemonic (text);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
if (tooltip)
{
ebox = g_object_new (GTK_TYPE_EVENT_BOX,
"visible-window", FALSE,
NULL);
gtk_table_attach (GTK_TABLE (table), ebox,
column, column + 1, row, row + 1,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (ebox);
gtk_container_add (GTK_CONTAINER (ebox), label);
}
else
{
ebox = NULL;
gtk_table_attach (GTK_TABLE (table), label,
column, column + 1, row, row + 1,
GTK_FILL, GTK_FILL, 0, 0);
}
gtk_table_attach (GTK_TABLE (table), label,
column, column + 1, row, row + 1,
GTK_FILL, GTK_FILL, 0, 0);
gtk_widget_show (label);
if (! constrain &&
@ -246,9 +227,7 @@ gimp_scale_entry_new_internal (gboolean color_scale,
if (tooltip || help_id)
{
if (ebox)
gimp_help_set_help_data (ebox, tooltip, help_id);
gimp_help_set_help_data (label, tooltip, help_id);
gimp_help_set_help_data (scale, tooltip, help_id);
gimp_help_set_help_data (spinbutton, tooltip, help_id);
}