[gimp] plug-ins: fix #ifdefs to fix build error and warnings in screenshot.c
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: fix #ifdefs to fix build error and warnings in screenshot.c
- Date: Wed, 17 Oct 2012 09:55:09 +0000 (UTC)
commit bc87bf5fe9223733253253b1364efe1cb614d6d7
Author: Michael Natterer <mitch gimp org>
Date: Wed Oct 17 11:53:45 2012 +0200
plug-ins: fix #ifdefs to fix build error and warnings in screenshot.c
plug-ins/common/screenshot.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/plug-ins/common/screenshot.c b/plug-ins/common/screenshot.c
index d47f720..e1d77ff 100644
--- a/plug-ins/common/screenshot.c
+++ b/plug-ins/common/screenshot.c
@@ -27,12 +27,9 @@
#include "config.h"
+#include <stdlib.h> /* for system() on OSX */
#include <string.h>
-#ifdef PLATFORM_OSX
-#include <stdlib.h>
-#endif
-
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
@@ -207,7 +204,9 @@ static gint32 create_image (cairo_surface_t *surface,
static gint32 shoot (GdkScreen *screen);
static gint32 shoot_main (GdkScreen *screen);
+#ifdef PLATFORM_OSX
static gint32 shoot_osx (GdkScreen *screen);
+#endif
static gboolean shoot_dialog (GdkScreen **screen);
static void shoot_delay (gint32 delay);
static gboolean shoot_delay_callback (gpointer data);
@@ -966,14 +965,14 @@ static gint32
shoot (GdkScreen *screen)
{
#ifdef PLATFORM_OSX
- /* on Mac OS X, either with X11 (which is a rootless X server) or
- * as a native quartz build, we have to implement it differently,
- * without using X and just use the standard OS X screenshot
- * utility.
- */
- return shoot_osx (screen);
+ /* on Mac OS X, either with X11 (which is a rootless X server) or
+ * as a native quartz build, we have to implement it differently,
+ * without using X and just use the standard OS X screenshot
+ * utility.
+ */
+ return shoot_osx (screen);
#else
- return shoot_main (screen);
+ return shoot_main (screen);
#endif
}
@@ -1084,6 +1083,7 @@ shoot_main (GdkScreen *screen)
return image;
}
+#ifdef PLATFORM_OSX
/*
* Mac OS X uses a rootless X server. This won't let us use
* gdk_pixbuf_get_from_drawable() and similar function on the root
@@ -1155,6 +1155,8 @@ shoot_osx (GdkScreen *screen)
return image;
}
+#endif /* PLATFORM_OSX */
+
/* Screenshot dialog */
@@ -1200,7 +1202,7 @@ shoot_dialog (GdkScreen **screen)
GtkWidget *hbox;
GtkWidget *label;
GtkWidget *button;
-#if (defined (HAVE_X11_XMU_WINUTIL_H) || defined (PLATFORM_OSX))
+#if (defined (HAVE_XFIXES) || defined (HAVE_X11_XMU_WINUTIL_H) || defined (PLATFORM_OSX))
GtkWidget *toggle;
#endif
GtkWidget *spinner;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]