app, libgimp*: remove the config option to disable tooltips

Also remove all traces of it from the plug-in protocol and raise the
protocol version to 0x0100 (we now allow features and therefore
version bumps in stable, and the master protocol version should always
be higher). Fix the code that aborts plug-in startup on protocol
version mismatch, we can't use gimp_message() because we have no
protocol.
This commit is contained in:
Michael Natterer
2018-06-06 19:20:32 +02:00
parent 95a74d68c0
commit b36205176e
14 changed files with 20 additions and 148 deletions

View File

@ -50,12 +50,6 @@ typedef enum
} GimpWidgetHelpType;
/* local variables */
static gboolean tooltips_enabled = TRUE;
static gboolean tooltips_enable_called = FALSE;
/* local function prototypes */
static const gchar * gimp_help_get_help_data (GtkWidget *widget,
@ -85,46 +79,6 @@ static gboolean gimp_context_help_idle_show_help (gpointer data);
/* public functions */
/**
* gimp_help_enable_tooltips:
*
* Enable tooltips to be shown in the GIMP user interface.
*
* As a plug-in author, you don't need to care about this as this
* function is called for you from gimp_ui_init(). This ensures that
* the user setting from the GIMP preferences dialog is respected in
* all plug-in dialogs.
**/
void
gimp_help_enable_tooltips (void)
{
if (! tooltips_enable_called)
{
tooltips_enable_called = TRUE;
tooltips_enabled = TRUE;
}
}
/**
* gimp_help_disable_tooltips:
*
* Disable tooltips to be shown in the GIMP user interface.
*
* As a plug-in author, you don't need to care about this as this
* function is called for you from gimp_ui_init(). This ensures that
* the user setting from the GIMP preferences dialog is respected in
* all plug-in dialogs.
**/
void
gimp_help_disable_tooltips (void)
{
if (! tooltips_enable_called)
{
tooltips_enable_called = TRUE;
tooltips_enabled = FALSE;
}
}
/**
* gimp_standard_help_func:
* @help_id: A unique help identifier.
@ -223,13 +177,10 @@ gimp_help_set_help_data (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
if (tooltips_enabled)
{
gtk_widget_set_tooltip_text (widget, tooltip);
gtk_widget_set_tooltip_text (widget, tooltip);
if (GTK_IS_MENU_ITEM (widget))
gimp_help_menu_item_set_tooltip (widget, tooltip, help_id);
}
if (GTK_IS_MENU_ITEM (widget))
gimp_help_menu_item_set_tooltip (widget, tooltip, help_id);
g_object_set_qdata (G_OBJECT (widget), GIMP_HELP_ID, (gpointer) help_id);
}
@ -253,13 +204,10 @@ gimp_help_set_help_data_with_markup (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
if (tooltips_enabled)
{
gtk_widget_set_tooltip_markup (widget, tooltip);
gtk_widget_set_tooltip_markup (widget, tooltip);
if (GTK_IS_MENU_ITEM (widget))
gimp_help_menu_item_set_tooltip (widget, tooltip, help_id);
}
if (GTK_IS_MENU_ITEM (widget))
gimp_help_menu_item_set_tooltip (widget, tooltip, help_id);
g_object_set_qdata (G_OBJECT (widget), GIMP_HELP_ID, (gpointer) help_id);
}