removed gimp_help_init() and gimp_help_free(). Added _gimp_help_init()

2003-01-07  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimphelpui.[ch]: removed gimp_help_init() and
	gimp_help_free(). Added _gimp_help_init() instead.

	* libgimpwidgets/gimpwidgets.def: changed accordingly.

	* libgimpwidgets/gimpwidgets.c (gimp_widgets_init): call
	_gimp_help_init() so it doesn't need to be done in all plug-ins
	manually.

	* libgimp/gimpcompat.h: added gimp_help_init() and gimp_help_free()
	here as COMPAT_CRUFT.

	* app/gui/gui.c
	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/Lighting/lighting_ui.c
	* plug-ins/MapObject/mapobject_ui.c
	* plug-ins/common/AlienMap.c
	* plug-ins/common/AlienMap2.c
	* plug-ins/common/CML_explorer.c
	* plug-ins/common/blur.c
	* plug-ins/common/curve_bend.c
	* plug-ins/common/gtm.c
	* plug-ins/common/illusion.c
	* plug-ins/common/jigsaw.c
	* plug-ins/common/plasma.c
	* plug-ins/common/polar.c
	* plug-ins/common/ps.c
	* plug-ins/common/randomize.c
	* plug-ins/common/sinus.c
	* plug-ins/common/snoise.c
	* plug-ins/common/sparkle.c
	* plug-ins/common/uniteditor.c
	* plug-ins/common/warp.c
	* plug-ins/common/wind.c
	* plug-ins/gap/gap_arr_dialog.c
	* plug-ins/gap/gap_mov_dialog.c
	* plug-ins/gap/gap_navigator_dialog.c
	* plug-ins/gdyntext/gdyntext_ui.c
	* plug-ins/gfig/gfig.c
	* plug-ins/gflare/gflare.c
	* plug-ins/gimpressionist/gimpressionist.c
	* plug-ins/maze/maze_face.c
	* plug-ins/print/gimp_main_window.c
	* plug-ins/sel2path/sel2path.c: removed the calls to
	gimp_help_init() and gimp_help_free().

	Fixed bug #81017:

	* libgimpbase/gimpprotocol.[ch]: added "guint8 show_tool_tips"
	to the GPConfig message. Increased the protocol version number.

	* app/plug-in/plug-in.c: pass the value of gui_config->show_tool_tips.

	* libgimp/gimp.[ch]: added gimp_show_tool_tips() to get the value
	which was passed in the GPConfig message.

	* libgimp/gimpui.c (gimp_ui_init): disable the tooltips
	if show_tool_tips is FALSE.

	* plug-ins/MapObject/mapobject_main.[ch]
	* plug-ins/MapObject/mapobject_ui.c
	* plug-ins/common/jigsaw.c
	* plug-ins/gap/gap_navigator_dialog.c
	* plug-ins/gfig/gfig.c: removed all plug-in specific GUI for
	enabling/disabling tooltips.
This commit is contained in:
Michael Natterer 2003-01-07 17:00:49 +00:00 committed by Michael Natterer
parent 3a36d127ff
commit bbc13c5199
55 changed files with 184 additions and 360 deletions

View File

@ -1,3 +1,71 @@
2003-01-07 Michael Natterer <mitch@gimp.org>
* libgimpwidgets/gimphelpui.[ch]: removed gimp_help_init() and
gimp_help_free(). Added _gimp_help_init() instead.
* libgimpwidgets/gimpwidgets.def: changed accordingly.
* libgimpwidgets/gimpwidgets.c (gimp_widgets_init): call
_gimp_help_init() so it doesn't need to be done in all plug-ins
manually.
* libgimp/gimpcompat.h: added gimp_help_init() and gimp_help_free()
here as COMPAT_CRUFT.
* app/gui/gui.c
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/Lighting/lighting_ui.c
* plug-ins/MapObject/mapobject_ui.c
* plug-ins/common/AlienMap.c
* plug-ins/common/AlienMap2.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/blur.c
* plug-ins/common/curve_bend.c
* plug-ins/common/gtm.c
* plug-ins/common/illusion.c
* plug-ins/common/jigsaw.c
* plug-ins/common/plasma.c
* plug-ins/common/polar.c
* plug-ins/common/ps.c
* plug-ins/common/randomize.c
* plug-ins/common/sinus.c
* plug-ins/common/snoise.c
* plug-ins/common/sparkle.c
* plug-ins/common/uniteditor.c
* plug-ins/common/warp.c
* plug-ins/common/wind.c
* plug-ins/gap/gap_arr_dialog.c
* plug-ins/gap/gap_mov_dialog.c
* plug-ins/gap/gap_navigator_dialog.c
* plug-ins/gdyntext/gdyntext_ui.c
* plug-ins/gfig/gfig.c
* plug-ins/gflare/gflare.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/maze/maze_face.c
* plug-ins/print/gimp_main_window.c
* plug-ins/sel2path/sel2path.c: removed the calls to
gimp_help_init() and gimp_help_free().
Fixed bug #81017:
* libgimpbase/gimpprotocol.[ch]: added "guint8 show_tool_tips"
to the GPConfig message. Increased the protocol version number.
* app/plug-in/plug-in.c: pass the value of gui_config->show_tool_tips.
* libgimp/gimp.[ch]: added gimp_show_tool_tips() to get the value
which was passed in the GPConfig message.
* libgimp/gimpui.c (gimp_ui_init): disable the tooltips
if show_tool_tips is FALSE.
* plug-ins/MapObject/mapobject_main.[ch]
* plug-ins/MapObject/mapobject_ui.c
* plug-ins/common/jigsaw.c
* plug-ins/gap/gap_navigator_dialog.c
* plug-ins/gfig/gfig.c: removed all plug-in specific GUI for
enabling/disabling tooltips.
2003-01-07 Sven Neumann <sven@gimp.org>
* plug_ins/common/Makefile.am

View File

@ -198,9 +198,6 @@ gui_themes_init (Gimp *gimp)
g_free (gtkrc);
/* tooltips */
gimp_help_init ();
if (! config->show_tool_tips)
gimp_help_disable_tooltips ();
@ -559,8 +556,6 @@ gui_exit_finish_callback (Gimp *gimp,
dialogs_exit (gimp);
gimp_devices_exit (gimp);
gimp_help_free ();
g_signal_handlers_disconnect_by_func (gimp->config,
gui_show_tooltips_notify,
gimp);

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -84,6 +84,7 @@
#include "config/gimpcoreconfig.h"
#include "config/gimpconfig-path.h"
#include "config/gimpguiconfig.h"
#include "core/gimp.h"
#include "core/gimpcontext.h"
@ -820,15 +821,15 @@ plug_in_run (Gimp *gimp,
plug_in_push (plug_in);
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.unused = 0;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
config.version = GP_VERSION;
config.tile_width = TILE_WIDTH;
config.tile_height = TILE_HEIGHT;
config.shm_ID = shm_ID;
config.gamma = gimp->config->gamma_val;
config.install_cmap = gimp->config->install_cmap;
config.show_tool_tips = GIMP_GUI_CONFIG (gimp->config)->show_tool_tips;
config.min_colors = CLAMP (gimp->config->min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
proc_run.name = proc_rec->name;
proc_run.nparams = argc;

View File

@ -139,6 +139,7 @@ static HANDLE shm_handle;
static gdouble _gamma_val;
static gboolean _install_cmap;
static gboolean _show_tool_tips;
static gint _min_colors;
static gint _gdisp_ID = -1;
@ -755,6 +756,12 @@ gimp_min_colors (void)
return _min_colors;
}
gboolean
gimp_show_tool_tips (void)
{
return _show_tool_tips;
}
static void
gimp_process_message (WireMessage *msg)
{
@ -1126,6 +1133,7 @@ gimp_config (GPConfig *config)
_shm_ID = config->shm_ID;
_gamma_val = config->gamma;
_install_cmap = config->install_cmap;
_show_tool_tips = config->show_tool_tips;
_min_colors = config->min_colors;
_gdisp_ID = config->gdisp_ID;

View File

@ -305,6 +305,7 @@ void gimp_destroy_paramdefs (GimpParamDef *paramdefs,
gdouble gimp_gamma (void);
gboolean gimp_install_cmap (void);
gint gimp_min_colors (void);
gboolean gimp_show_tool_tips (void);
gchar * gimp_get_progname (void);

View File

@ -43,6 +43,9 @@ G_BEGIN_DECLS
#define gimp_gradients_get_active gimp_gradients_get_gradient
#define gimp_gradients_set_active gimp_gradients_set_gradient
#define gimp_help_init() ((void) 0)
#define gimp_help_free() ((void) 0)
enum
{

View File

@ -80,5 +80,8 @@ gimp_ui_init (const gchar *prog_name,
gimp_widgets_init ();
if (! gimp_show_tool_tips ())
gimp_help_disable_tooltips ();
initialized = TRUE;
}

View File

@ -465,7 +465,7 @@ _gp_config_read (GIOChannel *channel,
goto cleanup;
if (! wire_read_int8 (channel, (guint8*) &config->install_cmap, 1, user_data))
goto cleanup;
if (! wire_read_int8 (channel, (guint8*) &config->unused, 1, user_data))
if (! wire_read_int8 (channel, (guint8*) &config->show_tool_tips, 1, user_data))
goto cleanup;
if (! wire_read_int32 (channel, (guint32*) &config->min_colors, 1, user_data))
goto cleanup;
@ -499,7 +499,7 @@ _gp_config_write (GIOChannel *channel,
return;
if (! wire_write_int8 (channel, (guint8*) &config->install_cmap, 1, user_data))
return;
if (! wire_write_int8 (channel, (guint8*) &config->unused, 1, user_data))
if (! wire_write_int8 (channel, (guint8*) &config->show_tool_tips, 1, user_data))
return;
if (! wire_write_int32 (channel, (guint32*) &config->min_colors, 1, user_data))
return;

View File

@ -27,7 +27,7 @@ G_BEGIN_DECLS
/* Increment every time the protocol changes
*/
#define GP_VERSION 0x000C
#define GP_VERSION 0x000D
enum
@ -68,7 +68,7 @@ struct _GPConfig
gint32 shm_ID;
gdouble gamma;
gint8 install_cmap;
gint8 unused; /* used to be use_xshm */
gint8 show_tool_tips;
gint32 min_colors;
gint32 gdisp_ID;
};

View File

@ -73,15 +73,17 @@ static GtkWidget *tips_query = NULL;
/* public functions */
/**
* gimp_help_init:
* _gimp_help_init:
*
* This function initializes GIMP's help system.
*
* Currently it only creates a #GtkTooltips object with gtk_tooltips_new()
* which will be used by gimp_help_set_help_data().
*
* Nota that this function is called automatically by gimp_widgets_init().
**/
void
gimp_help_init (void)
_gimp_help_init (void)
{
tool_tips = gtk_tooltips_new ();
@ -90,23 +92,6 @@ gimp_help_init (void)
gtk_object_sink (GTK_OBJECT (tool_tips));
}
/**
* gimp_help_free:
*
* This function frees the memory used by the #GtkTooltips created by
* gimp_help_init().
**/
void
gimp_help_free (void)
{
g_object_unref (tool_tips);
tool_tips = NULL;
tips_query->parent = NULL;
gtk_widget_destroy (tips_query);
tips_query = NULL;
}
/**
* gimp_help_enable_tooltips:
*

View File

@ -28,8 +28,7 @@ G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
void gimp_help_init (void);
void gimp_help_free (void);
void _gimp_help_init (void);
void gimp_help_enable_tooltips (void);
void gimp_help_disable_tooltips (void);

View File

@ -71,6 +71,8 @@ gimp_widgets_init (void)
g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
g_list_free (icon_list);
_gimp_help_init ();
}

View File

@ -61,8 +61,6 @@ EXPORTS
gimp_help_connect
gimp_help_disable_tooltips
gimp_help_enable_tooltips
gimp_help_free
gimp_help_init
gimp_help_set_help_data
gimp_int_adjustment_update
gimp_memsize_entry_new

View File

@ -298,8 +298,6 @@ explorer_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
top_hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (top_hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), top_hbox,
@ -951,7 +949,6 @@ explorer_dialog (void)
dialog_update_preview ();
gtk_main ();
gimp_help_free ();
gdk_flush ();
if (the_tile != NULL)

View File

@ -1138,8 +1138,6 @@ main_dialog (GimpDrawable *drawable)
NULL);
gimp_help_init ();
main_hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (appwin)->vbox), main_hbox,
@ -1246,8 +1244,6 @@ main_dialog (GimpDrawable *drawable)
gck_visualinfo_destroy (visinfo);
gtk_widget_destroy (appwin);
gimp_help_free ();
gdk_flush ();
return run;

View File

@ -86,7 +86,6 @@ set_default_settings (void)
mapvals.transparent_background = FALSE;
mapvals.tiled = FALSE;
mapvals.showgrid = FALSE;
mapvals.tooltips_enabled = TRUE;
mapvals.lightsource.intensity = 1.0;
gimp_rgba_set (&mapvals.lightsource.color, 1.0, 1.0, 1.0, 1.0);

View File

@ -61,7 +61,6 @@ typedef struct
gint transparent_background;
gint tiled;
gint showgrid;
gint tooltips_enabled;
gint showcaps;
glong preview_zoom_factor;

View File

@ -66,8 +66,6 @@ static void toggle_update (GtkWidget *widget,
static void togglegrid_update (GtkWidget *widget,
gpointer data);
static void toggletips_update (GtkWidget *widget,
gpointer data);
static void lightmenu_callback (GtkWidget *widget,
gpointer data);
@ -182,22 +180,6 @@ togglegrid_update (GtkWidget *widget,
}
}
/**************************/
/* Tooltips toggle update */
/**************************/
static void
toggletips_update (GtkWidget *widget,
gpointer data)
{
gimp_toggle_button_update (widget, data);
if (mapvals.tooltips_enabled)
gimp_help_enable_tooltips ();
else
gimp_help_disable_tooltips ();
}
/*****************************************/
/* Main window light type menu callback. */
/*****************************************/
@ -619,18 +601,6 @@ create_options_page (void)
gimp_help_set_help_data (toggle,
_("Create a new image when applying filter"), NULL);
toggle = gtk_check_button_new_with_label (_("Enable Tooltips"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
mapvals.tooltips_enabled);
gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
gtk_widget_show (toggle);
g_signal_connect (toggle, "toggled",
G_CALLBACK (toggletips_update),
&mapvals.tooltips_enabled);
gimp_help_set_help_data (toggle, _("Enable/disable tooltip messages"), NULL);
/* Antialiasing options */
frame = gtk_frame_new (NULL);
@ -1421,8 +1391,6 @@ main_dialog (GimpDrawable *drawable)
NULL);
gimp_help_init ();
main_hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (appwin)->vbox), main_hbox,
@ -1532,9 +1500,6 @@ main_dialog (GimpDrawable *drawable)
gdk_flush ();
}
if (!mapvals.tooltips_enabled)
gimp_help_disable_tooltips ();
image_setup (drawable, TRUE);
gtk_main ();
@ -1543,8 +1508,6 @@ main_dialog (GimpDrawable *drawable)
g_free (preview_rgb_data);
gck_visualinfo_destroy (visinfo);
gimp_help_free ();
gdk_flush ();
return run;

View File

@ -1281,8 +1281,6 @@ alienmap_dialog (void)
FALSE, FALSE, 0);
gtk_widget_show (top_table);
gimp_help_init ();
/* Preview */
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
@ -1402,7 +1400,6 @@ alienmap_dialog (void)
dialog_update_preview ();
gtk_main ();
gimp_help_free ();
gdk_flush ();
g_free (wint.image);

View File

@ -1271,8 +1271,6 @@ alienmap2_dialog (void)
FALSE, FALSE, 0);
gtk_widget_show (top_table);
gimp_help_init ();
/* Preview */
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
@ -1415,7 +1413,6 @@ alienmap2_dialog (void)
dialog_update_preview ();
gtk_main ();
gimp_help_free ();
gdk_flush ();
g_free (wint.image);

View File

@ -1182,8 +1182,6 @@ CML_explorer_dialog (void)
CML_preview_defer = TRUE;
gimp_help_init ();
hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, FALSE, FALSE, 0);
@ -1548,7 +1546,6 @@ CML_explorer_dialog (void)
preview_update ();
gtk_main ();
gimp_help_free ();
gdk_flush ();
return INTERFACE.run;

View File

@ -601,8 +601,6 @@ blur_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
/*
* Parameter settings
*
@ -657,7 +655,6 @@ blur_dialog (void)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return blur_int.run;

View File

@ -1307,8 +1307,6 @@ bender_new_dialog (GimpDrawable *drawable)
GtkObject *data;
int i, j;
gimp_help_init ();
cd = g_new (BenderDialog, 1);
cd->preview = FALSE;

View File

@ -381,9 +381,6 @@ save_dialog (image_ID)
G_CALLBACK (gtk_main_quit),
NULL);
/* Initialize Tooltips */
gimp_help_init ();
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox,
@ -622,7 +619,6 @@ save_dialog (image_ID)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return bint.run;

View File

@ -407,9 +407,6 @@ dialog (GimpDrawable *mangle)
G_CALLBACK (gtk_main_quit),
NULL);
/* Initialize Tooltips */
gimp_help_init ();
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox,
@ -478,7 +475,6 @@ dialog (GimpDrawable *mangle)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return dialog_status;

View File

@ -73,7 +73,6 @@ static gint jigsaw (gboolean preview_mode);
static void jigsaw_radio_button_update (GtkWidget *widget, gpointer data);
static void dialog_box (void);
static void run_callback (GtkWidget *widget, gpointer data);
static void check_button_callback (GtkWidget *widget, gpointer data);
static void draw_jigsaw (guchar *buffer,
gint width,
@ -189,7 +188,6 @@ static void check_config (gint width, gint height);
#define PLUG_IN_NAME "jigsaw"
#define PLUG_IN_STORAGE "jigsaw-storage"
#define XFACTOR2 0.0833
#define XFACTOR3 0.2083
@ -327,7 +325,6 @@ struct globals_tag
gint **blend_inner_cachey1[4];
gint **blend_inner_cachey2[4];
gint dialog_result;
gint tooltips;
};
typedef struct globals_tag globals_t;
@ -351,7 +348,6 @@ static globals_t globals =
{0, 0, 0, 0},
{0, 0, 0, 0},
-1,
1
};
/* preview globals */
@ -429,7 +425,6 @@ run (gchar *name,
case GIMP_RUN_INTERACTIVE:
INIT_I18N_UI();
gimp_get_data("plug_in_jigsaw", &config);
gimp_get_data(PLUG_IN_STORAGE, &globals.tooltips);
dialog_box();
if (globals.dialog_result == -1)
{
@ -443,8 +438,6 @@ run (gchar *name,
break;
}
gimp_set_data("plug_in_jigsaw", &config, sizeof(config_t));
gimp_set_data(PLUG_IN_STORAGE, &globals.tooltips,
sizeof(globals.tooltips));
gimp_displays_flush();
break;
@ -2455,7 +2448,6 @@ dialog_box (void)
GtkWidget *frame;
GtkWidget *rbutton1;
GtkWidget *rbutton2;
GtkWidget *cbutton;
GtkWidget *hbox;
GtkWidget *table;
GtkObject *adj;
@ -2478,14 +2470,6 @@ dialog_box (void)
G_CALLBACK (gtk_main_quit),
NULL);
/* init tooltips */
gimp_help_init ();
if (globals.tooltips == 0)
{
gimp_help_disable_tooltips ();
}
main_hbox = gtk_hbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_hbox, TRUE, TRUE, 0);
@ -2603,30 +2587,10 @@ dialog_box (void)
gimp_help_set_help_data (rbutton1, _("Each piece has straight sides"), NULL);
gimp_help_set_help_data (rbutton2, _("Each piece has curved sides"), NULL);
gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0);
gtk_widget_show (frame);
table = gtk_table_new (1, 2, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), table, TRUE, TRUE, 0);
cbutton = gtk_check_button_new_with_mnemonic (_("_Disable Tooltips"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cbutton),
globals.tooltips ? FALSE : TRUE);
gtk_table_attach (GTK_TABLE (table), cbutton, 0, 1, 1, 2, 0, 0, 0, 20);
gtk_widget_show (cbutton);
gimp_help_set_help_data (cbutton, _("Toggle Tooltips on/off"), NULL);
g_signal_connect (cbutton, "toggled",
G_CALLBACK (check_button_callback),
NULL);
gtk_widget_show (table);
gtk_widget_show (hbox);
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
}
@ -2643,22 +2607,6 @@ run_callback (GtkWidget *widget,
gtk_widget_destroy (GTK_WIDGET (data));
}
static void
check_button_callback (GtkWidget *widget,
gpointer data)
{
if (GTK_TOGGLE_BUTTON (widget)->active)
{
gimp_help_disable_tooltips ();
globals.tooltips = 0;
}
else
{
gimp_help_enable_tooltips ();
globals.tooltips = 1;
}
}
static void
jigsaw_radio_button_update (GtkWidget *widget,
gpointer data)

View File

@ -323,8 +323,6 @@ plasma_dialog (GimpDrawable *drawable, GimpImageType drawable_type)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_vbox, TRUE, TRUE, 0);
@ -392,7 +390,6 @@ plasma_dialog (GimpDrawable *drawable, GimpImageType drawable_type)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return pint.run;

View File

@ -789,9 +789,6 @@ polarize_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
/* Initialize Tooltips */
gimp_help_init ();
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG(dialog)->vbox), main_vbox,
@ -908,7 +905,6 @@ polarize_dialog (void)
dialog_update_preview ();
gtk_main ();
gimp_help_free ();
gdk_flush ();
g_free (pcint.check_row_0);

View File

@ -2805,8 +2805,6 @@ save_dialog (void)
GtkObject *adj;
gint j;
gimp_help_init ();
vals = g_new (SaveDialogVals, 1);
vals->level = (psvals.level > 1);
@ -3007,7 +3005,6 @@ save_dialog (void)
gtk_widget_show (dialog);
gtk_main ();
gimp_help_free ();
gdk_flush ();
psvals.level = (vals->level) ? 2 : 1;

View File

@ -2805,8 +2805,6 @@ save_dialog (void)
GtkObject *adj;
gint j;
gimp_help_init ();
vals = g_new (SaveDialogVals, 1);
vals->level = (psvals.level > 1);
@ -3007,7 +3005,6 @@ save_dialog (void)
gtk_widget_show (dialog);
gtk_main ();
gimp_help_free ();
gdk_flush ();
psvals.level = (vals->level) ? 2 : 1;

View File

@ -712,8 +712,6 @@ randomize_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
/*
* Parameter settings
*
@ -768,7 +766,6 @@ randomize_dialog (void)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return rndm_int.run;

View File

@ -1708,8 +1708,6 @@ sinus_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
main_hbox = gtk_hbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), main_hbox,
@ -2014,7 +2012,6 @@ sinus_dialog (void)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return run_flag;

View File

@ -516,8 +516,6 @@ solid_noise_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
frame = gtk_frame_new (_("Parameter Settings"));
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), frame, FALSE, FALSE, 0);
@ -594,7 +592,6 @@ solid_noise_dialog (void)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return snint.run;

View File

@ -360,8 +360,6 @@ sparkle_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
/* parameter settings */
frame = gtk_frame_new (_("Parameter Settings"));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
@ -554,7 +552,6 @@ sparkle_dialog (void)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return sint.run;

View File

@ -550,8 +550,6 @@ unit_editor_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
/* the main vbox */
main_vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 6);
@ -675,5 +673,4 @@ unit_editor_dialog (void)
gtk_widget_show (main_dialog);
gtk_main ();
gimp_help_free ();
}

View File

@ -426,8 +426,6 @@ warp_dialog (GimpDrawable *drawable)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
vbox = gtk_vbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
@ -708,7 +706,6 @@ warp_dialog (GimpDrawable *drawable)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return dint.run;

View File

@ -899,9 +899,6 @@ dialog_box (GimpDrawable *drawable)
G_CALLBACK (gtk_main_quit),
NULL);
/* init tooltips */
gimp_help_init ();
vbox = gtk_vbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 0);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
@ -1061,6 +1058,5 @@ dialog_box (GimpDrawable *drawable)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
}

View File

@ -745,9 +745,6 @@ gint p_array_std_dialog(char *title_txt,
g_first_call = FALSE;
}
/* Initialize Tooltips */
gimp_help_init ();
/* dialog */
g_arrint.dlg = gtk_dialog_new ();
gtk_window_set_title (GTK_WINDOW (g_arrint.dlg), title_txt);

View File

@ -471,9 +471,6 @@ mov_dialog ( GimpDrawable *drawable, t_mov_path_preview *path_ptr,
(GtkSignalFunc) mov_close_callback,
NULL);
/* Initialize Tooltips */
gimp_help_init ();
/* Action area */
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->action_area), 2);
gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dlg)->action_area), FALSE);

View File

@ -205,7 +205,6 @@ struct _OpenFrameImages{
struct _NaviDialog
{
gint tooltip_on;
GtkWidget *shell;
GtkWidget *vbox;
GtkWidget *mode_option_menu;
@ -331,7 +330,6 @@ static void frame_widget_delete (FrameWidget *fw);
static gint32 navi_get_preview_size(void);
static void frames_timing_update (void);
static void frame_widget_time_label_update(FrameWidget *fw);
static void navi_dialog_tooltips(void);
static void navi_set_waiting_cursor(void);
static void navi_set_active_cursor(void);
@ -1036,41 +1034,6 @@ navi_scroll_to_current_frame_nr(void)
}
}
static void
navi_dialog_tooltips(void)
{
char *value_string;
gint tooltip_on;
if(naviD == NULL) return;
tooltip_on = TRUE;
value_string = p_gimp_gimprc_query("show-tool-tips");
if(value_string != NULL)
{
if (strcmp(value_string, "no") == 0)
{
tooltip_on = FALSE;
}
}
if(naviD->tooltip_on != tooltip_on)
{
naviD->tooltip_on = tooltip_on;
if(tooltip_on)
{
gimp_help_enable_tooltips ();
}
else
{
gimp_help_disable_tooltips ();
}
}
}
static gint
navi_find_OpenFrameList(OpenFrameImages *search_item)
{
@ -2479,9 +2442,6 @@ navi_dialog_poll(GtkWidget *w, gpointer data)
update_flag = NUPD_ALL;
}
/* check and enable/disable tooltips */
navi_dialog_tooltips ();
frame_nr = p_get_frame_nr(naviD->active_imageid);
if(frame_nr < 0 )
{
@ -2900,9 +2860,6 @@ navi_dialog_create (GtkWidget* shell, gint32 image_id)
navi_preview_extents ();
}
/* creates tooltips */
gimp_help_init ();
/* The main vbox */
naviD->vbox = gtk_event_box_new ();

View File

@ -299,7 +299,6 @@ create_main_window (GdtMainWindow **main_window,
gtk_widget_realize(mw->window);
gimp_help_connect_help_accel (mw->window, gimp_standard_help_func, "filters/gdyntext.html");
gimp_help_init ();
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(mw->window), vbox);
@ -680,7 +679,6 @@ gdt_create_ui (GdtVals *data)
gtk_widget_show(message_window);
gtk_main ();
gimp_help_free ();
if (main_window->ok_pressed)
set_gdt_vals(data);

View File

@ -188,8 +188,6 @@ static void dialog_update_preview (void);
static void draw_grid (void);
static void draw_grid_clear (void);
static void toggle_show_image (void);
static void toggle_tooltips (GtkWidget *widget,
gpointer data);
static void toggle_obj_type (GtkWidget *widget,
gpointer data);
@ -329,7 +327,6 @@ typedef struct
gdouble brushfade;
gdouble brushgradient;
gdouble airbrushpressure;
gint showtooltips;
DrawonLayers onlayers;
LayersBGType onlayerbg;
PaintType painttype;
@ -3360,16 +3357,6 @@ options_page (void)
gtk_widget_show (toggle);
gfig_opt_widget.showcontrol = toggle;
toggle = gtk_check_button_new_with_label (_("Show Tooltips"));
gtk_table_attach (GTK_TABLE (table), toggle, 0, 1, 5, 6,
GTK_FILL, GTK_FILL, 0, 0);
g_signal_connect (toggle, "toggled",
G_CALLBACK (toggle_tooltips),
&selvals.showtooltips);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
selvals.showtooltips);
gtk_widget_show (toggle);
button = gtk_button_new_with_label (_("About"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 8, 0);
gtk_table_attach (GTK_TABLE (table), button, 1, 3, 5, 6,
@ -3945,9 +3932,6 @@ gfig_dialog (void)
G_CALLBACK (gtk_main_quit),
NULL);
/* Tooltips bis */
gimp_help_init ();
main_hbox = gtk_hbox_new (FALSE, 4);
gtk_container_set_border_width (GTK_CONTAINER (main_hbox), 4);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (top_level_dlg)->vbox), main_hbox,
@ -4035,8 +4019,6 @@ gfig_dialog (void)
gimp_image_delete (brush_image_ID);
brush_image_ID = -1;
gimp_help_free ();
gdk_flush ();
return gfig_run;
@ -5823,18 +5805,6 @@ draw_grid_clear ()
gdk_flush ();
}
static void
toggle_tooltips (GtkWidget *widget,
gpointer data)
{
gimp_toggle_button_update (widget, data);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
gimp_help_enable_tooltips ();
else
gimp_help_disable_tooltips ();
}
static void
toggle_show_image (void)
{

View File

@ -2536,8 +2536,6 @@ dlg_run (void)
G_CALLBACK (gtk_main_quit),
NULL);
gimp_help_init ();
/*
* main hbox
*/
@ -2624,7 +2622,6 @@ dlg_run (void)
DEBUG_PRINT (("dlg init done\n"));
gtk_main ();
gimp_help_free ();
gdk_flush ();
return pint.run;

View File

@ -484,8 +484,6 @@ static int create_dialog(void)
g_signal_connect (dlg, "destroy",
G_CALLBACK (dialog_close_callback), NULL);
gimp_help_init ();
box1 = gtk_hbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox), box1);
gtk_widget_show (box1);
@ -530,7 +528,6 @@ int create_gimpressionist(void)
}
gtk_main ();
gimp_help_free ();
g_rand_free (gr);
gdk_flush ();

View File

@ -181,7 +181,6 @@ maze_dialog (void)
gchar *message;
gimp_ui_init ("maze", FALSE);
gimp_help_init();
dlg = gimp_dialog_new (MAZE_TITLE, "maze",
gimp_standard_help_func, "filters/maze.html",
@ -337,7 +336,6 @@ maze_dialog (void)
gtk_widget_show_all (dlg);
gtk_main ();
gimp_help_free ();
gdk_flush ();
return maze_run;

View File

@ -1477,7 +1477,6 @@ gimp_create_main_window (void)
* actually initializing the values at this point; that will be done after
* the UI is fully created.
*/
gimp_help_init ();
create_top_level_structure ();

View File

@ -322,7 +322,6 @@ sel2path_dialog (SELVALS *sels)
retVal = FALSE;
gimp_ui_init ("sel2path", FALSE);
gimp_help_init ();
dlg = gimp_dialog_new (_("Selection To Path Advanced Settings"), "sel2path",
gimp_standard_help_func, "filters/sel2path.html",
@ -352,7 +351,6 @@ sel2path_dialog (SELVALS *sels)
gtk_widget_show (dlg);
gtk_main ();
gimp_help_free ();
return retVal;
}