changed wm_name to app_name in the GimpConfig struct; increased
2004-02-17 Sven Neumann <sven@gimp.org> * libgimpbase/gimpprotocol.[ch]: changed wm_name to app_name in the GimpConfig struct; increased GIMP_PROTOCOL_VERSION. * app/plug-in/plug-in-run.c (plug_in_run): pass the return value of g_get_application_name() to the plug-ins. * libgimp/gimp.[ch]: removed function gimp_wm_name(). Set the plug-in's application name if an app_name is passed in the config message. * libgimp/gimpui.c: removed usage of gimp_wm_name(); it was wrong to do it this way and caused all plug-ins claim to be the gimp-1.3 executable in their error messages. * libgimp/gimp.def: removed symbol gimp_wm_name. * configure.in: reset gimp_binary_age and gimp_interface_age. * app/core/gimpimage.c (gimp_image_name_changed): removed unused variable.
This commit is contained in:

committed by
Sven Neumann

parent
d928919200
commit
3fb6adbcfb
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2004-02-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpbase/gimpprotocol.[ch]: changed wm_name to app_name in
|
||||
the GimpConfig struct; increased GIMP_PROTOCOL_VERSION.
|
||||
|
||||
* app/plug-in/plug-in-run.c (plug_in_run): pass the return value
|
||||
of g_get_application_name() to the plug-ins.
|
||||
|
||||
* libgimp/gimp.[ch]: removed function gimp_wm_name(). Set the
|
||||
plug-in's application name if an app_name is passed in the config
|
||||
message.
|
||||
|
||||
* libgimp/gimpui.c: removed usage of gimp_wm_name(); it was wrong
|
||||
to do it this way and caused all plug-ins claim to be the gimp-1.3
|
||||
executable in their error messages.
|
||||
|
||||
* libgimp/gimp.def: removed symbol gimp_wm_name.
|
||||
|
||||
* configure.in: reset gimp_binary_age and gimp_interface_age.
|
||||
|
||||
* app/core/gimpimage.c (gimp_image_name_changed): removed unused
|
||||
variable.
|
||||
|
||||
2004-02-17 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
Make sure each GimpItem emits "removed" when it is removed from
|
||||
|
@ -699,7 +699,6 @@ gimp_image_finalize (GObject *object)
|
||||
static void
|
||||
gimp_image_name_changed (GimpObject *object)
|
||||
{
|
||||
GimpImage *gimage = GIMP_IMAGE (object);
|
||||
const gchar *name;
|
||||
|
||||
if (GIMP_OBJECT_CLASS (parent_class)->name_changed)
|
||||
|
@ -103,7 +103,7 @@ plug_in_run (Gimp *gimp,
|
||||
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;
|
||||
config.wm_name = g_get_prgname ();
|
||||
config.app_name = (gchar *) g_get_application_name ();
|
||||
config.wm_class = (gchar *) gimp_get_program_class (gimp);
|
||||
config.display_name = gimp_get_display_name (gimp, gdisp_ID, &monitor);
|
||||
config.monitor_number = monitor;
|
||||
|
@ -103,7 +103,7 @@ plug_in_run (Gimp *gimp,
|
||||
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;
|
||||
config.wm_name = g_get_prgname ();
|
||||
config.app_name = (gchar *) g_get_application_name ();
|
||||
config.wm_class = (gchar *) gimp_get_program_class (gimp);
|
||||
config.display_name = gimp_get_display_name (gimp, gdisp_ID, &monitor);
|
||||
config.monitor_number = monitor;
|
||||
|
@ -103,7 +103,7 @@ plug_in_run (Gimp *gimp,
|
||||
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;
|
||||
config.wm_name = g_get_prgname ();
|
||||
config.app_name = (gchar *) g_get_application_name ();
|
||||
config.wm_class = (gchar *) gimp_get_program_class (gimp);
|
||||
config.display_name = gimp_get_display_name (gimp, gdisp_ID, &monitor);
|
||||
config.monitor_number = monitor;
|
||||
|
@ -16,8 +16,8 @@ m4_define([gimp_micro_version], [27])
|
||||
m4_define([gimp_real_version],
|
||||
[gimp_major_version.gimp_minor_version.gimp_micro_version])
|
||||
m4_define([gimp_version], [gimp_real_version])
|
||||
m4_define([gimp_interface_age], [1])
|
||||
m4_define([gimp_binary_age], [1])
|
||||
m4_define([gimp_interface_age], [0])
|
||||
m4_define([gimp_binary_age], [0])
|
||||
|
||||
# For overriding the version string. Comment out if not needed.
|
||||
m4_define([gimp_version], [2.0pre4])
|
||||
|
@ -1,3 +1,10 @@
|
||||
2004-02-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimp/libgimp-sections.txt
|
||||
* libgimp/tmpl/gimp.sgml: removed gimp_wm_name.
|
||||
|
||||
* devel-docs/libgimpbase/tmpl/gimpprotocol.sgml: updated.
|
||||
|
||||
2004-02-14 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/app-sections.txt: updated.
|
||||
|
@ -38,7 +38,6 @@ gimp_min_colors
|
||||
gimp_show_tool_tips
|
||||
gimp_default_display
|
||||
gimp_wm_class
|
||||
gimp_wm_name
|
||||
gimp_display_name
|
||||
gimp_monitor_number
|
||||
gimp_get_progname
|
||||
|
@ -349,14 +349,6 @@ all other GIMP Library headers.
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_wm_name ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gimp_display_name ##### -->
|
||||
<para>
|
||||
|
||||
|
@ -36,7 +36,7 @@ The communication protocol between GIMP and it's plug-ins.
|
||||
@show_tool_tips:
|
||||
@min_colors:
|
||||
@gdisp_ID:
|
||||
@wm_name:
|
||||
@app_name:
|
||||
@wm_class:
|
||||
@display_name:
|
||||
@monitor_number:
|
||||
|
@ -178,7 +178,6 @@ static gboolean _install_cmap = FALSE;
|
||||
static gboolean _show_tool_tips = TRUE;
|
||||
static gint _min_colors = 144;
|
||||
static gint _gdisp_ID = -1;
|
||||
static gchar *_wm_name = NULL;
|
||||
static gchar *_wm_class = NULL;
|
||||
static gchar *_display_name = NULL;
|
||||
static gint _monitor_number = 0;
|
||||
@ -421,7 +420,8 @@ gimp_main (const GimpPlugInInfo *info,
|
||||
(* PLUG_IN_INFO.query_proc) ();
|
||||
|
||||
gimp_close ();
|
||||
return 0;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (strcmp (argv[4], "-init") == 0)
|
||||
@ -433,7 +433,8 @@ gimp_main (const GimpPlugInInfo *info,
|
||||
(* PLUG_IN_INFO.init_proc) ();
|
||||
|
||||
gimp_close ();
|
||||
return 0;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (gimp_debug_flags & GIMP_DEBUG_RUN)
|
||||
@ -449,7 +450,8 @@ gimp_main (const GimpPlugInInfo *info,
|
||||
NULL);
|
||||
|
||||
gimp_loop ();
|
||||
return 0;
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -462,7 +464,8 @@ void
|
||||
gimp_quit (void)
|
||||
{
|
||||
gimp_close ();
|
||||
exit (0);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1123,20 +1126,6 @@ gimp_default_display (void)
|
||||
return _gdisp_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_wm_name:
|
||||
*
|
||||
* Returns the window manager name to be used for plug-in windows.
|
||||
* This is a constant value given at Plug-In config time.
|
||||
*
|
||||
* Return value: the window manager name
|
||||
**/
|
||||
const gchar *
|
||||
gimp_wm_name (void)
|
||||
{
|
||||
return (const gchar *) _wm_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_wm_class:
|
||||
*
|
||||
@ -1619,11 +1608,13 @@ gimp_config (GPConfig *config)
|
||||
_show_tool_tips = config->show_tool_tips;
|
||||
_min_colors = config->min_colors;
|
||||
_gdisp_ID = config->gdisp_ID;
|
||||
_wm_name = g_strdup (config->wm_name);
|
||||
_wm_class = g_strdup (config->wm_class);
|
||||
_display_name = g_strdup (config->display_name);
|
||||
_monitor_number = config->monitor_number;
|
||||
|
||||
if (config->app_name)
|
||||
g_set_application_name (config->app_name);
|
||||
|
||||
if (_shm_ID != -1)
|
||||
{
|
||||
#if defined(USE_SYSV_SHM)
|
||||
|
@ -400,4 +400,3 @@ EXPORTS
|
||||
gimp_uninstall_temp_proc
|
||||
gimp_version
|
||||
gimp_wm_class
|
||||
gimp_wm_name
|
||||
|
@ -308,7 +308,6 @@ gboolean gimp_install_cmap (void) G_GNUC_CONST;
|
||||
gint gimp_min_colors (void) G_GNUC_CONST;
|
||||
gboolean gimp_show_tool_tips (void) G_GNUC_CONST;
|
||||
gint32 gimp_default_display (void) G_GNUC_CONST;
|
||||
const gchar * gimp_wm_name (void) G_GNUC_CONST;
|
||||
const gchar * gimp_wm_class (void) G_GNUC_CONST;
|
||||
const gchar * gimp_display_name (void) G_GNUC_CONST;
|
||||
gint gimp_monitor_number (void) G_GNUC_CONST;
|
||||
|
@ -89,11 +89,10 @@ gimp_ui_init (const gchar *prog_name,
|
||||
putenv (g_strdup_printf ("%s=%s", var_name, display_name));
|
||||
}
|
||||
|
||||
argc = 3;
|
||||
argv = g_new (gchar *, 3);
|
||||
argc = 2;
|
||||
argv = g_new (gchar *, 2);
|
||||
argv[0] = g_strdup (prog_name);
|
||||
argv[1] = g_strdup_printf ("--name=%s", gimp_wm_name ());
|
||||
argv[2] = g_strdup_printf ("--class=%s", gimp_wm_class ());
|
||||
argv[1] = g_strdup_printf ("--class=%s", gimp_wm_class ());
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
|
@ -453,39 +453,52 @@ _gp_config_read (GIOChannel *channel,
|
||||
|
||||
config = g_new0 (GPConfig, 1);
|
||||
|
||||
if (! wire_read_int32 (channel, &config->version, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
&config->version, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int32 (channel, &config->tile_width, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
&config->tile_width, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int32 (channel, &config->tile_height, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
&config->tile_height, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int32 (channel, (guint32*) &config->shm_ID, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
(guint32 *) &config->shm_ID, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_double (channel, &config->gamma, 1, user_data))
|
||||
if (! wire_read_double (channel,
|
||||
&config->gamma, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int8 (channel, (guint8*) &config->install_cmap, 1, user_data))
|
||||
if (! wire_read_int8 (channel,
|
||||
(guint8 *) &config->install_cmap, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int8 (channel, (guint8*) &config->show_tool_tips, 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))
|
||||
if (! wire_read_int32 (channel,
|
||||
(guint32 *) &config->min_colors, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int32 (channel, (guint32*) &config->gdisp_ID, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
(guint32 *) &config->gdisp_ID, 1, user_data))
|
||||
goto cleanup;
|
||||
|
||||
if (! wire_read_string (channel, &config->wm_name, 1, user_data))
|
||||
if (! wire_read_string (channel,
|
||||
&config->app_name, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_string (channel, &config->wm_class, 1, user_data))
|
||||
if (! wire_read_string (channel,
|
||||
&config->wm_class, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_string (channel, &config->display_name, 1, user_data))
|
||||
if (! wire_read_string (channel,
|
||||
&config->display_name, 1, user_data))
|
||||
goto cleanup;
|
||||
if (! wire_read_int32 (channel, (guint32*) &config->monitor_number, 1, user_data))
|
||||
if (! wire_read_int32 (channel,
|
||||
(guint32 *) &config->monitor_number, 1, user_data))
|
||||
goto cleanup;
|
||||
|
||||
msg->data = config;
|
||||
return;
|
||||
|
||||
cleanup:
|
||||
g_free (config->wm_name);
|
||||
g_free (config->app_name);
|
||||
g_free (config->wm_class);
|
||||
g_free (config->display_name);
|
||||
g_free (config);
|
||||
@ -517,7 +530,7 @@ _gp_config_write (GIOChannel *channel,
|
||||
return;
|
||||
if (! wire_write_int32 (channel, (guint32*) &config->gdisp_ID, 1, user_data))
|
||||
return;
|
||||
if (! wire_write_string (channel, &config->wm_name, 1, user_data))
|
||||
if (! wire_write_string (channel, &config->app_name, 1, user_data))
|
||||
return;
|
||||
if (! wire_write_string (channel, &config->wm_class, 1, user_data))
|
||||
return;
|
||||
@ -534,7 +547,7 @@ _gp_config_destroy (WireMessage *msg)
|
||||
|
||||
config = msg->data;
|
||||
|
||||
g_free (config->wm_name);
|
||||
g_free (config->app_name);
|
||||
g_free (config->wm_class);
|
||||
g_free (config->display_name);
|
||||
g_free (config);
|
||||
|
@ -27,7 +27,7 @@ G_BEGIN_DECLS
|
||||
|
||||
/* Increment every time the protocol changes
|
||||
*/
|
||||
#define GIMP_PROTOCOL_VERSION 0x000F
|
||||
#define GIMP_PROTOCOL_VERSION 0x0010
|
||||
|
||||
|
||||
enum
|
||||
@ -71,7 +71,7 @@ struct _GPConfig
|
||||
gint8 show_tool_tips;
|
||||
gint32 min_colors;
|
||||
gint32 gdisp_ID;
|
||||
gchar *wm_name;
|
||||
gchar *app_name;
|
||||
gchar *wm_class;
|
||||
gchar *display_name;
|
||||
gint32 monitor_number;
|
||||
|
Reference in New Issue
Block a user