app, libgimp, libgimpbase, libgimpwidgets, plug-ins: Add macro to unused code
This fixes Apple Clang warnings about: - xdiff - ydiff - gimp_ui_get_foreign_window - locale_parser_parse - use_app_menu - gimp_unique_dbus* - transient_set - gimp_get_foreign_window - support
This commit is contained in:
parent
f99fbdca8a
commit
f4f1baf5ef
7 changed files with 18 additions and 8 deletions
|
|
@ -371,7 +371,9 @@ gimp_image_window_constructed (GObject *object)
|
|||
GimpGuiConfig *config;
|
||||
GimpDeviceManager *device_manager;
|
||||
gboolean use_gtk_menubar = TRUE;
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
gboolean use_app_menu = TRUE;
|
||||
#endif
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@
|
|||
|
||||
#include "unique.h"
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
static gboolean gimp_unique_dbus_open (const gchar **filenames,
|
||||
gboolean as_new);
|
||||
static gboolean gimp_unique_dbus_batch_run (const gchar *batch_interpreter,
|
||||
const gchar **batch_commands);
|
||||
#else
|
||||
#elif defined(G_OS_WIN32)
|
||||
static gboolean gimp_unique_win32_open (const gchar **filenames,
|
||||
gboolean as_new);
|
||||
#endif
|
||||
|
|
@ -147,7 +147,7 @@ gimp_unique_win32_open (const gchar **filenames,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#else
|
||||
#elif !defined(PLATFORM_OSX)
|
||||
|
||||
static gboolean
|
||||
gimp_unique_dbus_open (const gchar **filenames,
|
||||
|
|
|
|||
|
|
@ -923,7 +923,7 @@ gimp_window_set_hint (GtkWindow *window,
|
|||
|
||||
/* similar to what we have in libgimp/gimpui.c */
|
||||
/* TODO: Restore when we use it on Windows */
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
static GdkWindow *
|
||||
gimp_get_foreign_window (gpointer window)
|
||||
{
|
||||
|
|
@ -2595,7 +2595,7 @@ gimp_window_set_transient_cb (GtkWidget *window,
|
|||
GdkEventAny *event G_GNUC_UNUSED,
|
||||
GBytes *handle)
|
||||
{
|
||||
#ifndef G_OS_WIN32
|
||||
#if !defined(G_OS_WIN32) && !defined(PLATFORM_OSX)
|
||||
gboolean transient_set = FALSE;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static void gimp_ensure_modules (void);
|
|||
static gboolean gimp_osx_focus_window (gpointer);
|
||||
#endif
|
||||
|
||||
#ifndef GDK_WINDOWING_WIN32
|
||||
#if !defined(GDK_WINDOWING_WIN32) && !defined(GDK_WINDOWING_QUARTZ)
|
||||
static GdkWindow * gimp_ui_get_foreign_window (gpointer window);
|
||||
#endif
|
||||
static gboolean gimp_window_transient_on_mapped (GtkWidget *window,
|
||||
|
|
@ -404,7 +404,7 @@ gimp_osx_focus_window (gpointer user_data)
|
|||
/* Currently broken on Win32 so avoiding a "defined but not used"
|
||||
* warning when building on Windows.
|
||||
*/
|
||||
#ifndef GDK_WINDOWING_WIN32
|
||||
#if !defined(GDK_WINDOWING_WIN32) && !defined(GDK_WINDOWING_QUARTZ)
|
||||
static GdkWindow *
|
||||
gimp_ui_get_foreign_window (gpointer window)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,11 +12,13 @@
|
|||
static void
|
||||
cpu_accel_print_results (void)
|
||||
{
|
||||
#if defined(ARCH_X86) || defined(ARCH_PPC)
|
||||
GimpCpuAccelFlags support;
|
||||
|
||||
g_printerr ("Testing CPU features...\n");
|
||||
|
||||
support = gimp_cpu_accel_get_support ();
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_X86
|
||||
g_printerr (" mmx : %s\n",
|
||||
|
|
|
|||
|
|
@ -614,18 +614,20 @@ gimp_ruler_set_position (GimpRuler *ruler,
|
|||
|
||||
if (ruler->position != position)
|
||||
{
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
GdkRectangle rect;
|
||||
gint xdiff, ydiff;
|
||||
#endif
|
||||
|
||||
ruler->position = position;
|
||||
g_object_notify_by_pspec (G_OBJECT (ruler), object_props[PROP_POSITION]);
|
||||
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
rect = gimp_ruler_get_pos_rect (ruler, ruler->position);
|
||||
|
||||
xdiff = rect.x - ruler->last_pos_rect.x;
|
||||
ydiff = rect.y - ruler->last_pos_rect.y;
|
||||
|
||||
#ifndef GDK_WINDOWING_QUARTZ
|
||||
/*
|
||||
* If the position has changed far enough, queue a redraw immediately.
|
||||
* Otherwise, we only queue a redraw in a low priority idle handler, to
|
||||
|
|
|
|||
|
|
@ -124,12 +124,14 @@ typedef struct
|
|||
gchar *id_attr_name;
|
||||
} LocaleParser;
|
||||
|
||||
#ifndef PLATFORM_OSX
|
||||
static gboolean locale_parser_parse (GMarkupParseContext *context,
|
||||
GimpHelpProgress *progress,
|
||||
GInputStream *stream,
|
||||
goffset size,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
#endif
|
||||
static void locale_parser_start_element (GMarkupParseContext *context,
|
||||
const gchar *element_name,
|
||||
const gchar **attribute_names,
|
||||
|
|
@ -315,6 +317,7 @@ gimp_help_locale_parse (GimpHelpLocale *locale,
|
|||
return success;
|
||||
}
|
||||
|
||||
#ifndef PLATFORM_OSX
|
||||
static gboolean
|
||||
locale_parser_parse (GMarkupParseContext *context,
|
||||
GimpHelpProgress *progress,
|
||||
|
|
@ -353,6 +356,7 @@ locale_parser_parse (GMarkupParseContext *context,
|
|||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
locale_parser_start_element (GMarkupParseContext *context,
|
||||
|
|
|
|||
Loading…
Reference in a new issue