~danieljabailey/inkscape/arc_node_editor

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Jabiertxof
  • Date: 2015-05-09 17:31:55 UTC
  • Revision ID: jtx@jtx.marker.es-20150509173155-br934thscki7ur1u
Fix Doxyfile

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
#include <glib-object.h>
53
53
#include <gtk/gtk.h>
54
54
 
55
 
#if GTK_CHECK_VERSION(3,0,0)
56
 
#include <gtkmm/cssprovider.h>
57
 
#include <gdkmm/screen.h>
58
 
#endif
59
 
 
60
55
#include "inkgc/gc-core.h"
61
56
 
62
57
#ifdef AND
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;
265
260
        sp_export_svg = NULL;
266
261
        sp_export_ps = NULL;
267
262
        sp_export_eps = NULL;
268
 
        sp_export_ps_level = 3;
 
263
        sp_export_ps_level = 2;
269
264
        sp_export_pdf = NULL;
270
265
        sp_export_pdf_version = NULL;
271
266
        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"),
414
409
     N_("PS Level")},
415
410
 
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());
1056
 
#endif
1057
1048
    g_free(usericondir);
1058
1049
 
1059
 
 
1060
 
#if GTK_CHECK_VERSION(3,0,0)
1061
 
    // Add style sheet (GTK3)
1062
 
    Glib::RefPtr<Gdk::Screen> screen = Gdk::Screen::get_default();
1063
 
 
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();
1068
 
    try {
1069
 
        provider->load_from_path (inkscape_style);
1070
 
    }
1071
 
#if GTK_CHECK_VERSION(3,16,0)
1072
 
    catch (const Gtk::CssProviderError& ex)
1073
 
    {
1074
 
        std::cerr << "CSSProviderError::load_from_path(): failed to load: " << inkscape_style << "\n  (" << ex.what() << ")" << std::endl;
1075
 
    }
1076
 
#endif
1077
 
    Gtk::StyleContext::add_provider_for_screen (screen, provider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
1078
 
 
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();
1082
 
    try {
1083
 
        provider2->load_from_path (user_style);
1084
 
    }
1085
 
#if GTK_CHECK_VERSION(3,16,0)
1086
 
    catch (const Gtk::CssProviderError& ex)
1087
 
    {}
1088
 
#endif
1089
 
    Gtk::StyleContext::add_provider_for_screen (screen, provider2, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
1090
 
#endif
1091
 
 
1092
1050
    gdk_event_handler_set((GdkEventFunc)snooper, NULL, NULL);
1093
1051
    Inkscape::Debug::log_display_config();
1094
1052
 
1584
1542
    }
1585
1543
 
1586
1544
    if (sp_export_area_snap) {
1587
 
        area = area.roundOutwards();
 
1545
        round_rectangle_outwards(area);
1588
1546
    }
1589
1547
 
1590
1548
    // default dpi