Move print preview command to gtksettings.c

Having this in the source seems more appropriate.
This commit is contained in:
Matthias Clasen 2014-11-30 23:43:07 -05:00
parent 9e1187135e
commit 32e8c39ffd
3 changed files with 8 additions and 10 deletions

View File

@ -399,7 +399,6 @@ if test "x$enable_quartz_backend" = xyes; then
# Pull in gio-unix for GDesktopAppInfo usage, see at least # Pull in gio-unix for GDesktopAppInfo usage, see at least
# gdkapplaunchcontext-x11.c # gdkapplaunchcontext-x11.c
have_gio_unix=yes have_gio_unix=yes
else else
AM_CONDITIONAL(USE_QUARTZ, false) AM_CONDITIONAL(USE_QUARTZ, false)
fi fi

View File

@ -2,12 +2,6 @@ AUTOMAKE_OPTIONS = subdir-objects
include $(top_srcdir)/Makefile.decl include $(top_srcdir)/Makefile.decl
if USE_QUARTZ
GTK_PRINT_PREVIEW_COMMAND="open -a /Applications/Preview.app %f"
else
GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview --print-settings %s %f"
endif
AM_CPPFLAGS = \ AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gtk\" \ -DG_LOG_DOMAIN=\"Gtk\" \
-DGTK_LIBDIR=\"$(libdir)\" \ -DGTK_LIBDIR=\"$(libdir)\" \
@ -19,12 +13,11 @@ AM_CPPFLAGS = \
-DGTK_HOST=\"$(host)\" \ -DGTK_HOST=\"$(host)\" \
-DGTK_COMPILATION \ -DGTK_COMPILATION \
-DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\" \ -DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\" \
-DGTK_PRINT_PREVIEW_COMMAND=\"$(GTK_PRINT_PREVIEW_COMMAND)\" \ -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
-I$(top_builddir) \ -I$(top_builddir) \
-I$(top_builddir)/gtk \ -I$(top_builddir)/gtk \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/gdk \ -I$(top_srcdir)/gdk \
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
$(GMODULE_CFLAGS) \ $(GMODULE_CFLAGS) \
$(GTK_DEBUG_FLAGS) \ $(GTK_DEBUG_FLAGS) \
$(GDK_HIDDEN_VISIBILITY_CFLAGS) \ $(GDK_HIDDEN_VISIBILITY_CFLAGS) \

View File

@ -59,6 +59,12 @@
#include "deprecated/gtkrc.h" #include "deprecated/gtkrc.h"
#ifdef GDK_WINDOWING_QUARTZ
#define PRINT_PREVIEW_COMMAND "open -a /Applications/Preview.app %f"
#else
#define PRINT_PREVIEW_COMMAND "evince --unlink-tempfile --preview --print-settings %s %f"
#endif
/** /**
* SECTION:gtksettings * SECTION:gtksettings
* @Short_description: Sharing settings between applications * @Short_description: Sharing settings between applications
@ -987,7 +993,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
g_param_spec_string ("gtk-print-preview-command", g_param_spec_string ("gtk-print-preview-command",
P_("Default command to run when displaying a print preview"), P_("Default command to run when displaying a print preview"),
P_("Command to run when displaying a print preview"), P_("Command to run when displaying a print preview"),
GTK_PRINT_PREVIEW_COMMAND, PRINT_PREVIEW_COMMAND,
GTK_PARAM_READWRITE), GTK_PARAM_READWRITE),
NULL); NULL);
g_assert (result == PROP_PRINT_PREVIEW_COMMAND); g_assert (result == PROP_PRINT_PREVIEW_COMMAND);