Commit 99d8fa90 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

allow to unset the tooltip by passing NULL.

2005-12-29  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimphelpui.c (gimp_help_set_help_data): allow to
	unset the tooltip by passing NULL.

	* app/widgets/gimpdockseparator.c: unset the tooltip while the same
	text is being shown as a label.
parent a0d231b3
2005-12-29 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimphelpui.c (gimp_help_set_help_data): allow to
unset the tooltip by passing NULL.
* app/widgets/gimpdockseparator.c: unset the tooltip while the same
text is being shown as a label.
2005-12-29 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpbaseenums.[ch] (enum GimpPDBArgType): renamed
......
......@@ -41,6 +41,8 @@
#define DEFAULT_HEIGHT 6
#define LABEL_PADDING 4
#define HELP_TEXT _("You can drop dockable dialogs here.")
static void gimp_dock_separator_style_set (GtkWidget *widget,
GtkStyle *prev_style);
......@@ -99,8 +101,7 @@ gimp_dock_separator_init (GimpDockSeparator *separator)
gtk_widget_show (separator->frame);
gimp_help_set_help_data (GTK_WIDGET (separator),
_("You can drop dockable dialogs here."),
GIMP_HELP_DOCK_SEPARATOR);
HELP_TEXT, GIMP_HELP_DOCK_SEPARATOR);
gtk_drag_dest_set (GTK_WIDGET (separator),
GTK_DEST_DEFAULT_ALL,
......@@ -273,8 +274,7 @@ gimp_dock_separator_set_show_label (GimpDockSeparator *separator,
if (show && ! separator->label)
{
separator->label =
gtk_label_new (_("You can drop dockable dialogs here."));
separator->label = gtk_label_new (HELP_TEXT);
gtk_misc_set_padding (GTK_MISC (separator->label),
LABEL_PADDING, LABEL_PADDING);
gtk_label_set_line_wrap (GTK_LABEL (separator->label), TRUE);
......@@ -284,10 +284,16 @@ gimp_dock_separator_set_show_label (GimpDockSeparator *separator,
-1);
gtk_container_add (GTK_CONTAINER (separator->frame), separator->label);
gtk_widget_show (separator->label);
gimp_help_set_help_data (GTK_WIDGET (separator),
NULL, GIMP_HELP_DOCK_SEPARATOR);
}
else if (! show && separator->label)
{
gtk_container_remove (GTK_CONTAINER (separator->frame), separator->label);
separator->label = NULL;
gimp_help_set_help_data (GTK_WIDGET (separator),
HELP_TEXT, GIMP_HELP_DOCK_SEPARATOR);
}
}
......@@ -210,9 +210,9 @@ gimp_help_set_help_data (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
if (tooltip)
gtk_tooltips_set_tip (tool_tips, widget, tooltip, help_id);
else
gtk_tooltips_set_tip (tool_tips, widget, tooltip, help_id);
if (! tooltip)
g_object_set_qdata (G_OBJECT (widget), GIMP_HELP_ID, (gpointer) help_id);
}
......
Markdown is supported
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