diff options
-rw-r--r-- | graphics/gthumb/patches/patch-aa | 42 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-ab | 45 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-ac | 154 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-ad | 40 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-ae | 243 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-af | 58 | ||||
-rw-r--r-- | graphics/gthumb/patches/patch-ag | 68 |
7 files changed, 650 insertions, 0 deletions
diff --git a/graphics/gthumb/patches/patch-aa b/graphics/gthumb/patches/patch-aa new file mode 100644 index 00000000000..b73bfaebd19 --- /dev/null +++ b/graphics/gthumb/patches/patch-aa @@ -0,0 +1,42 @@ +$NetBSD: patch-aa,v 1.9 2010/12/04 21:15:00 adam Exp $ + +--- extensions/exiv2_tools/exiv2-utils.cpp.orig 2010-09-15 19:07:15.000000000 +0000 ++++ extensions/exiv2_tools/exiv2-utils.cpp +@@ -497,6 +497,17 @@ set_attributes_from_tagsets (GFileInfo * + static const char * + get_exif_default_category (const Exiv2::Exifdatum &md) + { ++#if (EXIV2_TEST_VERSION(0,21,0)) ++ const char *ifdName = md.ifdName(); ++ if (strcmp(ifdName, "Makernote") == 0) ++ return "Exif::MakerNotes"; ++ if (strcmp(ifdName, "IFD1") == 0) ++ return "Exif::Thumbnail"; ++ if (strcmp(ifdName, "GPSInfo") == 0) ++ return "Exif::GPS"; ++ if (strcmp(ifdName, "Iop") == 0) ++ return "Exif::Versions"; ++#else + if (Exiv2::ExifTags::isMakerIfd(md.ifdId())) + return "Exif::MakerNotes"; + +@@ -510,6 +521,7 @@ get_exif_default_category (const Exiv2:: + default: + break; + } ++#endif + + return "Exif::Other"; + } +@@ -531,7 +543,11 @@ exiv2_read_metadata (Exiv2::Image::AutoP + stringstream description; + if (! md->tagLabel().empty()) + description << md->tagLabel(); ++#if (EXIV2_TEST_VERSION(0,21,0)) ++ else if (strcmp(md->ifdName(), "Makernote") == 0) ++#else + else if (md->ifdId () > Exiv2::ifd1Id) ++#endif + // Must be a MakerNote - include group name + description << md->groupName() << "." << md->tagName(); + else diff --git a/graphics/gthumb/patches/patch-ab b/graphics/gthumb/patches/patch-ab new file mode 100644 index 00000000000..f63d4800dca --- /dev/null +++ b/graphics/gthumb/patches/patch-ab @@ -0,0 +1,45 @@ +$NetBSD: patch-ab,v 1.5 2010/12/04 21:15:00 adam Exp $ + +Build eggsmclient-osx.c (required on Mac OS X). + +--- copy-n-paste/Makefile.in.orig 2010-12-04 09:03:37.000000000 +0000 ++++ copy-n-paste/Makefile.in +@@ -53,6 +53,7 @@ am__DEPENDENCIES_1 = + libeggsmclient_la_DEPENDENCIES = $(am__DEPENDENCIES_1) + am_libeggsmclient_la_OBJECTS = libeggsmclient_la-eggdesktopfile.lo \ + libeggsmclient_la-eggsmclient.lo \ ++ libeggsmclient_la-eggsmclient-osx.lo \ + libeggsmclient_la-eggsmclient-xsmp.lo + libeggsmclient_la_OBJECTS = $(am_libeggsmclient_la_OBJECTS) + AM_V_lt = $(am__v_lt_$(V)) +@@ -288,6 +289,7 @@ libeggsmclient_la_SOURCES = eggdesktopfi + eggdesktopfile.c \ + eggsmclient.h \ + eggsmclient.c \ ++ eggsmclient-osx.c \ + eggsmclient-private.h \ + eggsmclient-xsmp.c + +@@ -344,6 +346,7 @@ distclean-compile: + -rm -f *.tab.c + + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeggsmclient_la-eggdesktopfile.Plo@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeggsmclient_la-eggsmclient-osx.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeggsmclient_la-eggsmclient-xsmp.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libeggsmclient_la-eggsmclient.Plo@am__quote@ + +@@ -387,6 +390,14 @@ libeggsmclient_la-eggsmclient.lo: eggsmc + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeggsmclient_la_CFLAGS) $(CFLAGS) -c -o libeggsmclient_la-eggsmclient.lo `test -f 'eggsmclient.c' || echo '$(srcdir)/'`eggsmclient.c + ++libeggsmclient_la-eggsmclient-osx.lo: eggsmclient-osx.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeggsmclient_la_CFLAGS) $(CFLAGS) -MT libeggsmclient_la-eggsmclient-osx.lo -MD -MP -MF $(DEPDIR)/libeggsmclient_la-eggsmclient-osx.Tpo -c -o libeggsmclient_la-eggsmclient-osx.lo `test -f 'eggsmclient-osx.c' || echo '$(srcdir)/'`eggsmclient-osx.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeggsmclient_la-eggsmclient-osx.Tpo $(DEPDIR)/libeggsmclient_la-eggsmclient-osx.Plo ++@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eggsmclient-osx.c' object='libeggsmclient_la-eggsmclient-osx.lo' libtool=yes @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeggsmclient_la_CFLAGS) $(CFLAGS) -c -o libeggsmclient_la-eggsmclient-osx.lo `test -f 'eggsmclient-osx.c' || echo '$(srcdir)/'`eggsmclient-osx.c ++ + libeggsmclient_la-eggsmclient-xsmp.lo: eggsmclient-xsmp.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libeggsmclient_la_CFLAGS) $(CFLAGS) -MT libeggsmclient_la-eggsmclient-xsmp.lo -MD -MP -MF $(DEPDIR)/libeggsmclient_la-eggsmclient-xsmp.Tpo -c -o libeggsmclient_la-eggsmclient-xsmp.lo `test -f 'eggsmclient-xsmp.c' || echo '$(srcdir)/'`eggsmclient-xsmp.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libeggsmclient_la-eggsmclient-xsmp.Tpo $(DEPDIR)/libeggsmclient_la-eggsmclient-xsmp.Plo diff --git a/graphics/gthumb/patches/patch-ac b/graphics/gthumb/patches/patch-ac new file mode 100644 index 00000000000..95ae5d495df --- /dev/null +++ b/graphics/gthumb/patches/patch-ac @@ -0,0 +1,154 @@ +$NetBSD: patch-ac,v 1.3 2010/12/04 21:15:00 adam Exp $ + +Updated from http://git.gnome.org/browse/libegg/tree/libegg/smclient + +--- copy-n-paste/eggdesktopfile.c.orig 2010-12-04 08:22:19.000000000 +0000 ++++ copy-n-paste/eggdesktopfile.c +@@ -16,8 +16,9 @@ + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public +- * License along with this library; see the file COPYING.LIB. +- * If not, see <http://www.gnu.org/licenses/>. ++ * License along with this library; see the file COPYING.LIB. If not, ++ * write to the Free Software Foundation, Inc., 59 Temple Place - ++ * Suite 330, Boston, MA 02111-1307, USA. + */ + + #ifdef HAVE_CONFIG_H +@@ -30,7 +31,10 @@ + #include <unistd.h> + + #include <glib/gi18n.h> ++#include <gdkconfig.h> ++#if !defined(GDK_WINDOWING_QUARTZ) + #include <gdk/gdkx.h> ++#endif + #include <gtk/gtk.h> + + struct EggDesktopFile { +@@ -430,6 +431,16 @@ egg_desktop_file_get_numeric (EggDesktop + error); + } + ++int ++egg_desktop_file_get_integer (EggDesktopFile *desktop_file, ++ const char *key, ++ GError **error) ++{ ++ return g_key_file_get_integer (desktop_file->key_file, ++ EGG_DESKTOP_FILE_GROUP, key, ++ error); ++} ++ + char ** + egg_desktop_file_get_string_list (EggDesktopFile *desktop_file, + const char *key, +@@ -1273,8 +1284,8 @@ egg_desktop_file_launchv (EggDesktopFile + out: + if (env) + { +- g_strfreev ((char **)env->pdata); +- g_ptr_array_free (env, FALSE); ++ g_ptr_array_foreach (env, (GFunc)g_free, NULL); ++ g_ptr_array_free (env, TRUE); + } + free_document_list (translated_documents); + +@@ -1385,6 +1396,8 @@ egg_desktop_file_launch (EggDesktopFile + free_document_list (documents); + break; + ++ case EGG_DESKTOP_FILE_TYPE_UNRECOGNIZED: ++ case EGG_DESKTOP_FILE_TYPE_DIRECTORY: + default: + g_set_error (error, EGG_DESKTOP_FILE_ERROR, + EGG_DESKTOP_FILE_ERROR_NOT_LAUNCHABLE, +@@ -1407,23 +1420,9 @@ egg_desktop_file_error_quark (void) + G_LOCK_DEFINE_STATIC (egg_desktop_file); + static EggDesktopFile *egg_desktop_file; + +-/** +- * egg_set_desktop_file: +- * @desktop_file_path: path to the application's desktop file +- * +- * Creates an #EggDesktopFile for the application from the data at +- * @desktop_file_path. This will also call g_set_application_name() +- * with the localized application name from the desktop file, and +- * gtk_window_set_default_icon_name() or +- * gtk_window_set_default_icon_from_file() with the application's +- * icon. Other code may use additional information from the desktop +- * file. +- * +- * Note that for thread safety reasons, this function can only +- * be called once. +- **/ +-void +-egg_set_desktop_file (const char *desktop_file_path) ++static void ++egg_set_desktop_file_internal (const char *desktop_file_path, ++ gboolean set_defaults) + { + GError *error = NULL; + +@@ -1439,7 +1438,7 @@ egg_set_desktop_file (const char *deskto + g_error_free (error); + } + +- if (egg_desktop_file) { ++ if (set_defaults && egg_desktop_file != NULL) { + /* Set localized application name and default window icon */ + if (egg_desktop_file->name) + g_set_application_name (egg_desktop_file->name); +@@ -1456,6 +1455,51 @@ egg_set_desktop_file (const char *deskto + } + + /** ++ * egg_set_desktop_file: ++ * @desktop_file_path: path to the application's desktop file ++ * ++ * Creates an #EggDesktopFile for the application from the data at ++ * @desktop_file_path. This will also call g_set_application_name() ++ * with the localized application name from the desktop file, and ++ * gtk_window_set_default_icon_name() or ++ * gtk_window_set_default_icon_from_file() with the application's ++ * icon. Other code may use additional information from the desktop ++ * file. ++ * See egg_set_desktop_file_without_defaults() for a variant of this ++ * function that does not set the application name and default window ++ * icon. ++ * ++ * Note that for thread safety reasons, this function can only ++ * be called once, and is mutually exclusive with calling ++ * egg_set_desktop_file_without_defaults(). ++ **/ ++void ++egg_set_desktop_file (const char *desktop_file_path) ++{ ++ egg_set_desktop_file_internal (desktop_file_path, TRUE); ++} ++ ++/** ++ * egg_set_desktop_file_without_defaults: ++ * @desktop_file_path: path to the application's desktop file ++ * ++ * Creates an #EggDesktopFile for the application from the data at ++ * @desktop_file_path. ++ * See egg_set_desktop_file() for a variant of this function that ++ * sets the application name and default window icon from the information ++ * in the desktop file. ++ * ++ * Note that for thread safety reasons, this function can only ++ * be called once, and is mutually exclusive with calling ++ * egg_set_desktop_file(). ++ **/ ++void ++egg_set_desktop_file_without_defaults (const char *desktop_file_path) ++{ ++ egg_set_desktop_file_internal (desktop_file_path, FALSE); ++} ++ ++/** + * egg_get_desktop_file: + * + * Gets the application's #EggDesktopFile, as set by diff --git a/graphics/gthumb/patches/patch-ad b/graphics/gthumb/patches/patch-ad new file mode 100644 index 00000000000..4eafe74dafc --- /dev/null +++ b/graphics/gthumb/patches/patch-ad @@ -0,0 +1,40 @@ +$NetBSD: patch-ad,v 1.3 2010/12/04 21:15:00 adam Exp $ + +Updated from http://git.gnome.org/browse/libegg/tree/libegg/smclient + +--- copy-n-paste/eggdesktopfile.h.orig 2010-08-12 19:37:18.000000000 +0000 ++++ copy-n-paste/eggdesktopfile.h +@@ -12,8 +12,9 @@ + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public +- * License along with this library; see the file COPYING.LIB. +- * If not, see <http://www.gnu.org/licenses/>. ++ * License along with this library; see the file COPYING.LIB. If not, ++ * write to the Free Software Foundation, Inc., 59 Temple Place - ++ * Suite 330, Boston, MA 02111-1307, USA. + */ + + #ifndef __EGG_DESKTOP_FILE_H__ +@@ -126,6 +127,9 @@ gboolean egg_desktop_file_get_boolean + double egg_desktop_file_get_numeric (EggDesktopFile *desktop_file, + const char *key, + GError **error); ++int egg_desktop_file_get_integer (EggDesktopFile *desktop_file, ++ const char *key, ++ GError **error); + char **egg_desktop_file_get_string_list (EggDesktopFile *desktop_file, + const char *key, + gsize *length, +@@ -149,8 +153,9 @@ typedef enum { + } EggDesktopFileError; + + /* Global application desktop file */ +-void egg_set_desktop_file (const char *desktop_file_path); +-EggDesktopFile *egg_get_desktop_file (void); ++void egg_set_desktop_file (const char *desktop_file_path); ++void egg_set_desktop_file_without_defaults (const char *desktop_file_path); ++EggDesktopFile *egg_get_desktop_file (void); + + + G_END_DECLS diff --git a/graphics/gthumb/patches/patch-ae b/graphics/gthumb/patches/patch-ae new file mode 100644 index 00000000000..d542c4caa4b --- /dev/null +++ b/graphics/gthumb/patches/patch-ae @@ -0,0 +1,243 @@ +$NetBSD: patch-ae,v 1.1 2010/12/04 21:15:00 adam Exp $ + +Updated from http://git.gnome.org/browse/libegg/tree/libegg/smclient + +--- /dev/null 2010-12-04 08:54:08.000000000 +0000 ++++ copy-n-paste/eggsmclient-osx.c +@@ -0,0 +1,236 @@ ++/* ++ * Copyright (C) 2007 Novell, Inc. ++ * Copyright (C) 2008 Red Hat, Inc. ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++/* EggSMClientOSX ++ * ++ * For details on the OS X logout process, see: ++ * http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/BootProcess.html#//apple_ref/doc/uid/20002130-114618 ++ * ++ * EggSMClientOSX registers for the kAEQuitApplication AppleEvent; the ++ * handler we register (quit_requested()) will be invoked from inside ++ * the quartz event-handling code (specifically, from inside ++ * [NSApplication nextEventMatchingMask]) when an AppleEvent arrives. ++ * We use AESuspendTheCurrentEvent() and AEResumeTheCurrentEvent() to ++ * allow asynchronous / non-main-loop-reentering processing of the ++ * quit request. (These are part of the Carbon framework; it doesn't ++ * seem to be possible to handle AppleEvents asynchronously from ++ * Cocoa.) ++ */ ++#ifdef __APPLE__ ++#include "config.h" ++ ++#include "eggsmclient-private.h" ++#include <glib.h> ++#include <Carbon/Carbon.h> ++#include <CoreServices/CoreServices.h> ++ ++#define EGG_TYPE_SM_CLIENT_OSX (egg_sm_client_osx_get_type ()) ++#define EGG_SM_CLIENT_OSX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_OSX, EggSMClientOSX)) ++#define EGG_SM_CLIENT_OSX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT_OSX, EggSMClientOSXClass)) ++#define EGG_IS_SM_CLIENT_OSX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_SM_CLIENT_OSX)) ++#define EGG_IS_SM_CLIENT_OSX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_SM_CLIENT_OSX)) ++#define EGG_SM_CLIENT_OSX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_SM_CLIENT_OSX, EggSMClientOSXClass)) ++ ++typedef struct _EggSMClientOSX EggSMClientOSX; ++typedef struct _EggSMClientOSXClass EggSMClientOSXClass; ++ ++struct _EggSMClientOSX { ++ EggSMClient parent; ++ ++ AppleEvent quit_event, quit_reply; ++ gboolean quit_requested, quitting; ++}; ++ ++struct _EggSMClientOSXClass ++{ ++ EggSMClientClass parent_class; ++ ++}; ++ ++static void sm_client_osx_startup (EggSMClient *client, ++ const char *client_id); ++static void sm_client_osx_will_quit (EggSMClient *client, ++ gboolean will_quit); ++static gboolean sm_client_osx_end_session (EggSMClient *client, ++ EggSMClientEndStyle style, ++ gboolean request_confirmation); ++ ++static pascal OSErr quit_requested (const AppleEvent *, AppleEvent *, long); ++ ++G_DEFINE_TYPE (EggSMClientOSX, egg_sm_client_osx, EGG_TYPE_SM_CLIENT) ++ ++static void ++egg_sm_client_osx_init (EggSMClientOSX *osx) ++{ ++ ; ++} ++ ++static void ++egg_sm_client_osx_class_init (EggSMClientOSXClass *klass) ++{ ++ EggSMClientClass *sm_client_class = EGG_SM_CLIENT_CLASS (klass); ++ ++ sm_client_class->startup = sm_client_osx_startup; ++ sm_client_class->will_quit = sm_client_osx_will_quit; ++ sm_client_class->end_session = sm_client_osx_end_session; ++} ++ ++EggSMClient * ++egg_sm_client_osx_new (void) ++{ ++ return g_object_new (EGG_TYPE_SM_CLIENT_OSX, NULL); ++} ++ ++static void ++sm_client_osx_startup (EggSMClient *client, ++ const char *client_id) ++{ ++ AEInstallEventHandler (kCoreEventClass, kAEQuitApplication, ++ NewAEEventHandlerUPP (quit_requested), ++ (long)GPOINTER_TO_SIZE (client), false); ++} ++ ++static gboolean ++idle_quit_requested (gpointer client) ++{ ++ egg_sm_client_quit_requested (client); ++ return FALSE; ++} ++ ++static pascal OSErr ++quit_requested (const AppleEvent *aevt, AppleEvent *reply, long refcon) ++{ ++ EggSMClient *client = GSIZE_TO_POINTER ((gsize)refcon); ++ EggSMClientOSX *osx = GSIZE_TO_POINTER ((gsize)refcon); ++ ++ g_return_val_if_fail (!osx->quit_requested, userCanceledErr); ++ ++ /* FIXME AEInteractWithUser? */ ++ ++ osx->quit_requested = TRUE; ++ AEDuplicateDesc (aevt, &osx->quit_event); ++ AEDuplicateDesc (reply, &osx->quit_reply); ++ AESuspendTheCurrentEvent (aevt); ++ ++ /* Don't emit the "quit_requested" signal immediately, since we're ++ * called from a weird point in the guts of gdkeventloop-quartz.c ++ */ ++ g_idle_add (idle_quit_requested, client); ++ return noErr; ++} ++ ++static pascal OSErr ++quit_requested_resumed (const AppleEvent *aevt, AppleEvent *reply, long refcon) ++{ ++ EggSMClientOSX *osx = GSIZE_TO_POINTER ((gsize)refcon); ++ ++ osx->quit_requested = FALSE; ++ return osx->quitting ? noErr : userCanceledErr; ++} ++ ++static gboolean ++idle_will_quit (gpointer client) ++{ ++ EggSMClientOSX *osx = (EggSMClientOSX *)client; ++ ++ /* Resume the event with a new handler that will return a value to ++ * the system. ++ */ ++ AEResumeTheCurrentEvent (&osx->quit_event, &osx->quit_reply, ++ NewAEEventHandlerUPP (quit_requested_resumed), ++ (long)GPOINTER_TO_SIZE (client)); ++ AEDisposeDesc (&osx->quit_event); ++ AEDisposeDesc (&osx->quit_reply); ++ ++ if (osx->quitting) ++ egg_sm_client_quit (client); ++ return FALSE; ++} ++ ++static void ++sm_client_osx_will_quit (EggSMClient *client, ++ gboolean will_quit) ++{ ++ EggSMClientOSX *osx = (EggSMClientOSX *)client; ++ ++ g_return_if_fail (osx->quit_requested); ++ ++ osx->quitting = will_quit; ++ ++ /* Finish in an idle handler since the caller might have called ++ * egg_sm_client_will_quit() from inside the "quit_requested" signal ++ * handler, but may not expect the "quit" signal to arrive during ++ * the _will_quit() call. ++ */ ++ g_idle_add (idle_will_quit, client); ++} ++ ++static gboolean ++sm_client_osx_end_session (EggSMClient *client, ++ EggSMClientEndStyle style, ++ gboolean request_confirmation) ++{ ++ static const ProcessSerialNumber loginwindow_psn = { 0, kSystemProcess }; ++ AppleEvent event = { typeNull, NULL }, reply = { typeNull, NULL }; ++ AEAddressDesc target; ++ AEEventID id; ++ OSErr err; ++ ++ switch (style) ++ { ++ case EGG_SM_CLIENT_END_SESSION_DEFAULT: ++ case EGG_SM_CLIENT_LOGOUT: ++ id = request_confirmation ? kAELogOut : kAEReallyLogOut; ++ break; ++ case EGG_SM_CLIENT_REBOOT: ++ id = request_confirmation ? kAEShowRestartDialog : kAERestart; ++ break; ++ case EGG_SM_CLIENT_SHUTDOWN: ++ id = request_confirmation ? kAEShowShutdownDialog : kAEShutDown; ++ break; ++ } ++ ++ err = AECreateDesc (typeProcessSerialNumber, &loginwindow_psn, ++ sizeof (loginwindow_psn), &target); ++ if (err != noErr) ++ { ++ g_warning ("Could not create descriptor for loginwindow: %d", err); ++ return FALSE; ++ } ++ ++ err = AECreateAppleEvent (kCoreEventClass, id, &target, ++ kAutoGenerateReturnID, kAnyTransactionID, ++ &event); ++ AEDisposeDesc (&target); ++ if (err != noErr) ++ { ++ g_warning ("Could not create logout AppleEvent: %d", err); ++ return FALSE; ++ } ++ ++ err = AESend (&event, &reply, kAENoReply, kAENormalPriority, ++ kAEDefaultTimeout, NULL, NULL); ++ AEDisposeDesc (&event); ++ if (err == noErr) ++ AEDisposeDesc (&reply); ++ ++ return err == noErr; ++} ++#endif /* __APPLE__ */ diff --git a/graphics/gthumb/patches/patch-af b/graphics/gthumb/patches/patch-af new file mode 100644 index 00000000000..48b830b08b6 --- /dev/null +++ b/graphics/gthumb/patches/patch-af @@ -0,0 +1,58 @@ +$NetBSD: patch-af,v 1.1 2010/12/04 21:15:00 adam Exp $ + +Updated from http://git.gnome.org/browse/libegg/tree/libegg/smclient + +--- copy-n-paste/eggsmclient-xsmp.c.orig 2010-07-15 18:45:38.000000000 +0000 ++++ copy-n-paste/eggsmclient-xsmp.c +@@ -1052,13 +1052,13 @@ generate_command (char **restart_command + + if (client_id) + { +- g_ptr_array_add (cmd, "--sm-client-id"); ++ g_ptr_array_add (cmd, (char *)"--sm-client-id"); + g_ptr_array_add (cmd, (char *)client_id); + } + + if (state_file) + { +- g_ptr_array_add (cmd, "--sm-client-state-file"); ++ g_ptr_array_add (cmd, (char *)"--sm-client-state-file"); + g_ptr_array_add (cmd, (char *)state_file); + } + +@@ -1141,7 +1141,7 @@ array_prop (const char *name, ...) + + prop = g_new (SmProp, 1); + prop->name = (char *)name; +- prop->type = SmLISTofARRAY8; ++ prop->type = (char *)SmLISTofARRAY8; + + vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); + +@@ -1175,7 +1175,7 @@ ptrarray_prop (const char *name, GPtrArr + + prop = g_new (SmProp, 1); + prop->name = (char *)name; +- prop->type = SmLISTofARRAY8; ++ prop->type = (char *)SmLISTofARRAY8; + + vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); + +@@ -1205,7 +1205,7 @@ string_prop (const char *name, const cha + + prop = g_new (SmProp, 1); + prop->name = (char *)name; +- prop->type = SmARRAY8; ++ prop->type = (char *)SmARRAY8; + + prop->num_vals = 1; + prop->vals = g_new (SmPropValue, 1); +@@ -1230,7 +1230,7 @@ card8_prop (const char *name, unsigned c + + prop = g_new (SmProp, 1); + prop->name = (char *)name; +- prop->type = SmCARD8; ++ prop->type = (char *)SmCARD8; + + prop->num_vals = 1; + prop->vals = g_new (SmPropValue, 2); diff --git a/graphics/gthumb/patches/patch-ag b/graphics/gthumb/patches/patch-ag new file mode 100644 index 00000000000..dd9615b4d1c --- /dev/null +++ b/graphics/gthumb/patches/patch-ag @@ -0,0 +1,68 @@ +$NetBSD: patch-ag,v 1.1 2010/12/04 21:15:00 adam Exp $ + +Updated from http://git.gnome.org/browse/libegg/tree/libegg/smclient + +--- copy-n-paste/eggsmclient.c.orig 2010-07-15 18:45:38.000000000 +0000 ++++ copy-n-paste/eggsmclient.c +@@ -202,7 +202,8 @@ sm_client_post_parse_func (GOptionContex + * use the same client id. */ + g_unsetenv ("DESKTOP_AUTOSTART_ID"); + +- if (EGG_SM_CLIENT_GET_CLASS (client)->startup) ++ if (global_client_mode != EGG_SM_CLIENT_MODE_DISABLED && ++ EGG_SM_CLIENT_GET_CLASS (client)->startup) + EGG_SM_CLIENT_GET_CLASS (client)->startup (client, sm_client_id); + return TRUE; + } +@@ -265,9 +266,9 @@ egg_sm_client_get_option_group (void) + * Sets the "mode" of #EggSMClient as follows: + * + * %EGG_SM_CLIENT_MODE_DISABLED: Session management is completely +- * disabled. The application will not even connect to the session +- * manager. (egg_sm_client_get() will still return an #EggSMClient, +- * but it will just be a dummy object.) ++ * disabled, until the mode is changed again. The application will ++ * not even connect to the session manager. (egg_sm_client_get() ++ * will still return an #EggSMClient object.) + * + * %EGG_SM_CLIENT_MODE_NO_RESTART: The application will connect to + * the session manager (and thus will receive notification when the +@@ -277,12 +278,27 @@ egg_sm_client_get_option_group (void) + * %EGG_SM_CLIENT_MODE_NORMAL: The default. #EggSMCLient will + * function normally. + * +- * This must be called before the application's main loop begins. ++ * This must be called before the application's main loop begins and ++ * before any call to egg_sm_client_get(), unless the mode was set ++ * earlier to %EGG_SM_CLIENT_MODE_DISABLED and this call enables ++ * session management. Note that option parsing will call ++ * egg_sm_client_get(). + **/ + void + egg_sm_client_set_mode (EggSMClientMode mode) + { ++ EggSMClientMode old_mode = global_client_mode; ++ ++ g_return_if_fail (global_client == NULL || global_client_mode == EGG_SM_CLIENT_MODE_DISABLED); ++ g_return_if_fail (!(global_client != NULL && mode == EGG_SM_CLIENT_MODE_DISABLED)); ++ + global_client_mode = mode; ++ ++ if (global_client != NULL && old_mode == EGG_SM_CLIENT_MODE_DISABLED) ++ { ++ if (EGG_SM_CLIENT_GET_CLASS (global_client)->startup) ++ EGG_SM_CLIENT_GET_CLASS (global_client)->startup (global_client, sm_client_id); ++ } + } + + /** +@@ -317,8 +333,7 @@ egg_sm_client_get (void) + { + if (!global_client) + { +- if (global_client_mode != EGG_SM_CLIENT_MODE_DISABLED && +- !sm_client_disable) ++ if (!sm_client_disable) + { + #if defined (GDK_WINDOWING_WIN32) + global_client = egg_sm_client_win32_new (); |