52
52
#include <glib-object.h>
53
53
#include <gtk/gtk.h>
55
#if GTK_CHECK_VERSION(3,0,0)
56
#include <gtkmm/cssprovider.h>
57
#include <gdkmm/screen.h>
60
55
#include "inkgc/gc-core.h"
217
212
static gchar *sp_export_svg = NULL;
218
213
static gchar *sp_export_ps = NULL;
219
214
static gchar *sp_export_eps = NULL;
220
static gint sp_export_ps_level = 3;
215
static gint sp_export_ps_level = 2;
221
216
static gchar *sp_export_pdf = NULL;
222
217
static gchar *sp_export_pdf_version = NULL;
223
218
static gchar *sp_export_emf = NULL;
410
405
{"export-ps-level", 0,
411
406
POPT_ARG_INT, &sp_export_ps_level, SP_ARG_EXPORT_PS_LEVEL,
412
407
N_("Choose the PostScript Level used to export. Possible choices are"
413
" 2 and 3 (the default)"),
408
" 2 (the default) and 3"),
416
411
{"export-pdf", 'A',
1050
1045
gchar *usericondir = Inkscape::Application::profile_path("icons");
1051
1046
gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), usericondir);
1052
1047
gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INKSCAPE_PIXMAPDIR);
1053
#ifdef INKSCAPE_THEMEDIR
1054
gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(), INKSCAPE_THEMEDIR);
1055
gtk_icon_theme_rescan_if_needed (gtk_icon_theme_get_default());
1057
1048
g_free(usericondir);
1060
#if GTK_CHECK_VERSION(3,0,0)
1061
// Add style sheet (GTK3)
1062
Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
1064
Glib::ustring inkscape_style = INKSCAPE_UIDIR;
1065
inkscape_style += "/style.css";
1066
// std::cout << "CSS Stylesheet Inkscape: " << inkscape_style << std::endl;
1067
Glib::RefPtr<Gtk::CssProvider> provider = Gtk::CssProvider::create();
1069
provider->load_from_path (inkscape_style);
1071
#if GTK_CHECK_VERSION(3,16,0)
1072
catch (const Gtk::CssProviderError& ex)
1074
std::cerr << "CSSProviderError::load_from_path(): failed to load: " << inkscape_style << "\n (" << ex.what() << ")" << std::endl;
1077
Gtk::StyleContext::add_provider_for_screen (screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
1079
Glib::ustring user_style = Inkscape::Application::profile_path("ui/style.css");
1080
// std::cout << "CSS Stylesheet User: " << user_style << std::endl;
1081
Glib::RefPtr<Gtk::CssProvider> provider2 = Gtk::CssProvider::create();
1083
provider2->load_from_path (user_style);
1085
#if GTK_CHECK_VERSION(3,16,0)
1086
catch (const Gtk::CssProviderError& ex)
1089
Gtk::StyleContext::add_provider_for_screen (screen, provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
1092
1050
gdk_event_handler_set((GdkEventFunc)snooper, NULL, NULL);
1093
1051
Inkscape::Debug::log_display_config();