mirror of https://github.com/GNOME/gimp.git
define GIMP_APP_VERSION
2004-03-07 Sven Neumann <sven@gimp.org> * tools/Makefile.am (AM_CPPFLAGS): define GIMP_APP_VERSION * tools/gimp-remote.c: when starting a new gimp, make sure the desktop-startup-id gets passed to it. Makes startup notification work correctly again.
This commit is contained in:
parent
c0ef88c206
commit
d2fb36e60a
|
@ -1,3 +1,11 @@
|
||||||
|
2004-03-07 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* tools/Makefile.am (AM_CPPFLAGS): define GIMP_APP_VERSION
|
||||||
|
|
||||||
|
* tools/gimp-remote.c: when starting a new gimp, make sure the
|
||||||
|
desktop-startup-id gets passed to it. Makes startup notification
|
||||||
|
work correctly again.
|
||||||
|
|
||||||
2004-03-06 Sven Neumann <sven@gimp.org>
|
2004-03-06 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/tiff.c (run): corrected check for number of PDB
|
* plug-ins/common/tiff.c (run): corrected check for number of PDB
|
||||||
|
|
|
@ -28,6 +28,8 @@ gimp_remote_1_3_LDADD = \
|
||||||
|
|
||||||
kernelgen_SOURCES = kernelgen.c
|
kernelgen_SOURCES = kernelgen.c
|
||||||
|
|
||||||
|
AM_CPPFLAGS = -DGIMP_APP_VERSION=\"@GIMP_APP_VERSION@\"
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I$(top_srcdir) \
|
-I$(top_srcdir) \
|
||||||
$(GTK_CFLAGS) \
|
$(GTK_CFLAGS) \
|
||||||
|
|
|
@ -53,7 +53,8 @@
|
||||||
#include "libgimpbase/gimpversion.h"
|
#include "libgimpbase/gimpversion.h"
|
||||||
|
|
||||||
|
|
||||||
#define GIMP_BINARY "gimp-1.3"
|
#define GIMP_BINARY "gimp-" GIMP_APP_VERSION
|
||||||
|
|
||||||
|
|
||||||
static gboolean existing = FALSE;
|
static gboolean existing = FALSE;
|
||||||
static gboolean query = FALSE;
|
static gboolean query = FALSE;
|
||||||
|
@ -177,6 +178,7 @@ usage (const gchar *name)
|
||||||
static void
|
static void
|
||||||
start_new_gimp (GdkScreen *screen,
|
start_new_gimp (GdkScreen *screen,
|
||||||
const gchar *argv0,
|
const gchar *argv0,
|
||||||
|
const gchar *startup_id,
|
||||||
GString *file_list)
|
GString *file_list)
|
||||||
{
|
{
|
||||||
gchar *display_name;
|
gchar *display_name;
|
||||||
|
@ -185,6 +187,9 @@ start_new_gimp (GdkScreen *screen,
|
||||||
const gchar *spath;
|
const gchar *spath;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
if (startup_id)
|
||||||
|
setenv ("DESKTOP_STARTUP_ID", startup_id, TRUE);
|
||||||
|
|
||||||
if (file_list->len > 0)
|
if (file_list->len > 0)
|
||||||
file_list = g_string_prepend (file_list, "\n");
|
file_list = g_string_prepend (file_list, "\n");
|
||||||
|
|
||||||
|
@ -302,12 +307,23 @@ gint
|
||||||
main (gint argc,
|
main (gint argc,
|
||||||
gchar **argv)
|
gchar **argv)
|
||||||
{
|
{
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkScreen *screen;
|
GdkScreen *screen;
|
||||||
GdkWindow *gimp_window;
|
GdkWindow *gimp_window;
|
||||||
GString *file_list = g_string_new (NULL);
|
const gchar *startup_id;
|
||||||
gchar *cwd = g_get_current_dir ();
|
gchar *desktop_startup_id = NULL;
|
||||||
gint i;
|
GString *file_list = g_string_new (NULL);
|
||||||
|
gchar *cwd = g_get_current_dir ();
|
||||||
|
gint i;
|
||||||
|
|
||||||
|
/* we save the startup_id before calling gtk_init()
|
||||||
|
because GTK+ will unset it */
|
||||||
|
|
||||||
|
startup_id = g_getenv ("DESKTOP_STARTUP_ID");
|
||||||
|
if (startup_id && *startup_id)
|
||||||
|
desktop_startup_id = g_strdup (startup_id);
|
||||||
|
|
||||||
|
g_print ("%s\n", desktop_startup_id);
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
gtk_init (&argc, &argv);
|
||||||
|
|
||||||
|
@ -371,7 +387,7 @@ main (gint argc,
|
||||||
/* if called without any filenames, always start a new GIMP */
|
/* if called without any filenames, always start a new GIMP */
|
||||||
if (file_list->len == 0 && !query && !existing)
|
if (file_list->len == 0 && !query && !existing)
|
||||||
{
|
{
|
||||||
start_new_gimp (screen, argv[0], file_list);
|
start_new_gimp (screen, argv[0], desktop_startup_id, file_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
gimp_window = gimp_remote_find_window (display, screen);
|
gimp_window = gimp_remote_find_window (display, screen);
|
||||||
|
@ -447,10 +463,13 @@ main (gint argc,
|
||||||
if (existing)
|
if (existing)
|
||||||
exit (EXIT_FAILURE);
|
exit (EXIT_FAILURE);
|
||||||
|
|
||||||
start_new_gimp (screen, argv[0], file_list);
|
start_new_gimp (screen, argv[0], desktop_startup_id, file_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_string_free (file_list, TRUE);
|
g_string_free (file_list, TRUE);
|
||||||
|
g_free (desktop_startup_id);
|
||||||
|
|
||||||
|
gdk_notify_startup_complete ();
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue