From 69ae98cb453849c6d32a1c7ea8bc057fb13deea3 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Jun 2014 11:32:51 -0400 Subject: 1. make it compile (bzr r13341.5.1) --- src/extension/effect.cpp | 6 +++--- src/extension/error-file.cpp | 2 +- src/extension/extension.cpp | 2 +- src/extension/implementation/script.cpp | 2 +- src/extension/init.cpp | 2 +- src/extension/internal/cdr-input.cpp | 2 +- src/extension/internal/filter/filter-file.cpp | 2 +- src/extension/internal/pdfinput/pdf-input.cpp | 2 +- src/extension/internal/vsd-input.cpp | 2 +- src/extension/system.cpp | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/extension') diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 3c8ee5844..2ebf8964d 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -89,11 +89,11 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * } // children of "inkscape-extension" } // if we have an XML file - if (INKSCAPE != NULL && inkscape_use_gui()) { + if (INKSCAPE != NULL && INKSCAPE->use_gui()) { if (_effects_list == NULL) - _effects_list = find_menu(inkscape_get_menus(INKSCAPE), EFFECTS_LIST); + _effects_list = find_menu(INKSCAPE->get_menus(), EFFECTS_LIST); if (_filters_list == NULL) - _filters_list = find_menu(inkscape_get_menus(INKSCAPE), FILTERS_LIST); + _filters_list = find_menu(INKSCAPE->get_menus(), FILTERS_LIST); } if ((_effects_list != NULL || _filters_list != NULL)) { diff --git a/src/extension/error-file.cpp b/src/extension/error-file.cpp index f60af870f..2970bf8d9 100644 --- a/src/extension/error-file.cpp +++ b/src/extension/error-file.cpp @@ -50,7 +50,7 @@ ErrorFileNotice::ErrorFileNotice (void) : { /* This is some filler text, needs to change before relase */ Glib::ustring dialog_text(_("One or more extensions failed to load\n\nThe failed extensions have been skipped. Inkscape will continue to run normally but those extensions will be unavailable. For details to troubleshoot this problem, please refer to the error log located at: ")); - gchar * ext_error_file = profile_path(EXTENSION_ERROR_LOG_FILENAME); + gchar * ext_error_file = INKSCAPE->profile_path(EXTENSION_ERROR_LOG_FILENAME); dialog_text += ext_error_file; g_free(ext_error_file); set_message(dialog_text, true); diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index 06e35ff3e..b62cfd8af 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -662,7 +662,7 @@ Extension::set_param_color (const gchar * name, guint32 color, SPDocument * doc, void Extension::error_file_open (void) { - gchar * ext_error_file = profile_path(EXTENSION_ERROR_LOG_FILENAME); + gchar * ext_error_file = INKSCAPE->profile_path(EXTENSION_ERROR_LOG_FILENAME); gchar * filename = g_filename_from_utf8( ext_error_file, -1, NULL, NULL, NULL ); error_file.open(filename); if (!error_file.is_open()) { diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index f0fd3711b..bacb126ef 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -1031,7 +1031,7 @@ int Script::execute (const std::list &in_command, Glib::ustring stderr_data = fileerr.string(); if (stderr_data.length() != 0 && - inkscape_use_gui() + INKSCAPE->use_gui() ) { checkStderr(stderr_data, Gtk::MESSAGE_INFO, _("Inkscape has received additional data from the script executed. " diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 912d58a13..57d7f9e33 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -243,7 +243,7 @@ init() /* Load search path for extensions */ if (Inkscape::Extension::Extension::search_path.size() == 0) { - Inkscape::Extension::Extension::search_path.push_back(profile_path("extensions")); + Inkscape::Extension::Extension::search_path.push_back(INKSCAPE->profile_path("extensions")); Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR)); diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp index 0111ed626..6048c232c 100644 --- a/src/extension/internal/cdr-input.cpp +++ b/src/extension/internal/cdr-input.cpp @@ -237,7 +237,7 @@ SPDocument *CdrInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // If only one page is present, import that one without bothering user if (tmpSVGOutput.size() > 1) { CdrImportDialog *dlg = 0; - if (inkscape_use_gui()) { + if (INKSCAPE->use_gui()) { dlg = new CdrImportDialog(tmpSVGOutput); if (!dlg->showDialog()) { delete dlg; diff --git a/src/extension/internal/filter/filter-file.cpp b/src/extension/internal/filter/filter-file.cpp index 48e64f089..04d3f27e1 100644 --- a/src/extension/internal/filter/filter-file.cpp +++ b/src/extension/internal/filter/filter-file.cpp @@ -29,7 +29,7 @@ namespace Filter { void Filter::filters_all_files(void) { - gchar *filtersProfilePath = profile_path("filters"); + gchar *filtersProfilePath = INKSCAPE->profile_path("filters"); filters_load_dir(INKSCAPE_FILTERDIR, _("Bundled")); filters_load_dir(filtersProfilePath, _("Personal")); diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index 63581bd8a..fbb8b0793 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -696,7 +696,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { } PdfImportDialog *dlg = NULL; - if (inkscape_use_gui()) { + if (INKSCAPE->use_gui()) { dlg = new PdfImportDialog(pdf_doc, uri); if (!dlg->showDialog()) { _cancelled = true; diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index 6fc79237b..6b435746b 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -236,7 +236,7 @@ SPDocument *VsdInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // If only one page is present, import that one without bothering user if (tmpSVGOutput.size() > 1) { VsdImportDialog *dlg = 0; - if (inkscape_use_gui()) { + if (INKSCAPE->use_gui()) { dlg = new VsdImportDialog(tmpSVGOutput); if (!dlg->showDialog()) { delete dlg; diff --git a/src/extension/system.cpp b/src/extension/system.cpp index c244d9c16..e81ec0e42 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -121,7 +121,7 @@ SPDocument *open(Extension *key, gchar const *filename) } if (last_chance_svg) { - if ( inkscape_use_gui() ) { + if ( INKSCAPE->use_gui() ) { sp_ui_error_dialog(_("Format autodetect failed. The file is being opened as SVG.")); } else { g_warning("%s", _("Format autodetect failed. The file is being opened as SVG.")); -- cgit v1.2.3 From cdc7587062b42c39a23451e5c9ec7da06dd6fdb3 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 25 Jun 2014 21:45:01 -0400 Subject: 3. remove dead code, refactor existing code. Connect overlooked signals. (bzr r13341.5.3) --- src/extension/effect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension') diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 2ebf8964d..c68845d8a 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -9,7 +9,7 @@ */ #include "prefdialog.h" -#include "inkscape-private.h" +#include "inkscape.h" #include "helper/action.h" #include "ui/view/view.h" #include "desktop-handles.h" -- cgit v1.2.3 From 1ed5e67c01975040a78765a1cf97b942d736c14b Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Thu, 26 Jun 2014 15:40:39 -0400 Subject: Convert accidental member accesses into static function accesses (bzr r13341.5.7) --- src/extension/error-file.cpp | 3 ++- src/extension/extension.cpp | 2 +- src/extension/init.cpp | 2 +- src/extension/internal/filter/filter-file.cpp | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/extension') diff --git a/src/extension/error-file.cpp b/src/extension/error-file.cpp index 2970bf8d9..db354c0ce 100644 --- a/src/extension/error-file.cpp +++ b/src/extension/error-file.cpp @@ -48,9 +48,10 @@ ErrorFileNotice::ErrorFileNotice (void) : ) { + // \FIXME change this /* This is some filler text, needs to change before relase */ Glib::ustring dialog_text(_("One or more extensions failed to load\n\nThe failed extensions have been skipped. Inkscape will continue to run normally but those extensions will be unavailable. For details to troubleshoot this problem, please refer to the error log located at: ")); - gchar * ext_error_file = INKSCAPE->profile_path(EXTENSION_ERROR_LOG_FILENAME); + gchar * ext_error_file = Inkscape::Application::profile_path(EXTENSION_ERROR_LOG_FILENAME); dialog_text += ext_error_file; g_free(ext_error_file); set_message(dialog_text, true); diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index b62cfd8af..a5f0e6467 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -662,7 +662,7 @@ Extension::set_param_color (const gchar * name, guint32 color, SPDocument * doc, void Extension::error_file_open (void) { - gchar * ext_error_file = INKSCAPE->profile_path(EXTENSION_ERROR_LOG_FILENAME); + gchar * ext_error_file = Inkscape::Application::profile_path(EXTENSION_ERROR_LOG_FILENAME); gchar * filename = g_filename_from_utf8( ext_error_file, -1, NULL, NULL, NULL ); error_file.open(filename); if (!error_file.is_open()) { diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 57d7f9e33..c16a5a899 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -243,7 +243,7 @@ init() /* Load search path for extensions */ if (Inkscape::Extension::Extension::search_path.size() == 0) { - Inkscape::Extension::Extension::search_path.push_back(INKSCAPE->profile_path("extensions")); + Inkscape::Extension::Extension::search_path.push_back(Inkscape::Application::profile_path("extensions")); Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR)); diff --git a/src/extension/internal/filter/filter-file.cpp b/src/extension/internal/filter/filter-file.cpp index 04d3f27e1..b1993057d 100644 --- a/src/extension/internal/filter/filter-file.cpp +++ b/src/extension/internal/filter/filter-file.cpp @@ -29,7 +29,7 @@ namespace Filter { void Filter::filters_all_files(void) { - gchar *filtersProfilePath = INKSCAPE->profile_path("filters"); + gchar *filtersProfilePath = Inkscape::Application::profile_path("filters"); filters_load_dir(INKSCAPE_FILTERDIR, _("Bundled")); filters_load_dir(filtersProfilePath, _("Personal")); -- cgit v1.2.3 From 45f373f3319b598d8e0222fb48e9d3a4760b2044 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Fri, 27 Jun 2014 15:23:06 -0400 Subject: 5. Refactoring of Application class: make copy/assignment operators private, disallow pointers to Application (bzr r13341.5.9) --- src/extension/effect.cpp | 8 +++++--- src/extension/implementation/script.cpp | 2 +- src/extension/internal/cdr-input.cpp | 2 +- src/extension/internal/pdfinput/pdf-input.cpp | 2 +- src/extension/internal/vsd-input.cpp | 2 +- src/extension/system.cpp | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src/extension') diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index c68845d8a..c8f3b2ff9 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -89,11 +89,13 @@ Effect::Effect (Inkscape::XML::Node * in_repr, Implementation::Implementation * } // children of "inkscape-extension" } // if we have an XML file - if (INKSCAPE != NULL && INKSCAPE->use_gui()) { + // \TODO this gets called from the Inkscape::Application constructor, where it initializes the menus. + // But in the constructor, our object isn't quite there yet! + if (Inkscape::Application::exists() && INKSCAPE.use_gui()) { if (_effects_list == NULL) - _effects_list = find_menu(INKSCAPE->get_menus(), EFFECTS_LIST); + _effects_list = find_menu(INKSCAPE.get_menus(), EFFECTS_LIST); if (_filters_list == NULL) - _filters_list = find_menu(INKSCAPE->get_menus(), FILTERS_LIST); + _filters_list = find_menu(INKSCAPE.get_menus(), FILTERS_LIST); } if ((_effects_list != NULL || _filters_list != NULL)) { diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index bacb126ef..976cf42fc 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -1031,7 +1031,7 @@ int Script::execute (const std::list &in_command, Glib::ustring stderr_data = fileerr.string(); if (stderr_data.length() != 0 && - INKSCAPE->use_gui() + INKSCAPE.use_gui() ) { checkStderr(stderr_data, Gtk::MESSAGE_INFO, _("Inkscape has received additional data from the script executed. " diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp index 6048c232c..ffbfcc5e5 100644 --- a/src/extension/internal/cdr-input.cpp +++ b/src/extension/internal/cdr-input.cpp @@ -237,7 +237,7 @@ SPDocument *CdrInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // If only one page is present, import that one without bothering user if (tmpSVGOutput.size() > 1) { CdrImportDialog *dlg = 0; - if (INKSCAPE->use_gui()) { + if (INKSCAPE.use_gui()) { dlg = new CdrImportDialog(tmpSVGOutput); if (!dlg->showDialog()) { delete dlg; diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index fbb8b0793..bcaa8712f 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -696,7 +696,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { } PdfImportDialog *dlg = NULL; - if (INKSCAPE->use_gui()) { + if (INKSCAPE.use_gui()) { dlg = new PdfImportDialog(pdf_doc, uri); if (!dlg->showDialog()) { _cancelled = true; diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index 6b435746b..ab51bbd73 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -236,7 +236,7 @@ SPDocument *VsdInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // If only one page is present, import that one without bothering user if (tmpSVGOutput.size() > 1) { VsdImportDialog *dlg = 0; - if (INKSCAPE->use_gui()) { + if (INKSCAPE.use_gui()) { dlg = new VsdImportDialog(tmpSVGOutput); if (!dlg->showDialog()) { delete dlg; diff --git a/src/extension/system.cpp b/src/extension/system.cpp index e81ec0e42..651964912 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -121,7 +121,7 @@ SPDocument *open(Extension *key, gchar const *filename) } if (last_chance_svg) { - if ( INKSCAPE->use_gui() ) { + if ( INKSCAPE.use_gui() ) { sp_ui_error_dialog(_("Format autodetect failed. The file is being opened as SVG.")); } else { g_warning("%s", _("Format autodetect failed. The file is being opened as SVG.")); -- cgit v1.2.3 From c985ea62dbebc06070613326acb01b623b00699e Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 1 Jul 2014 11:55:03 -0400 Subject: Fix build with DBUS (thanks ~suv) (bzr r13341.5.10) --- src/extension/dbus/application-interface.cpp | 4 ++-- src/extension/dbus/dbus-init.cpp | 10 +++++----- src/extension/dbus/document-interface.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/extension') diff --git a/src/extension/dbus/application-interface.cpp b/src/extension/dbus/application-interface.cpp index c0bc19d90..292832a4b 100644 --- a/src/extension/dbus/application-interface.cpp +++ b/src/extension/dbus/application-interface.cpp @@ -49,7 +49,7 @@ application_interface_init (ApplicationInterface *app_interface) static bool ensure_desktop_valid(GError **error) { - if (!inkscape_use_gui()) { + if (!INKSCAPE.use_gui()) { g_set_error(error, INKSCAPE_ERROR, INKSCAPE_ERROR_OTHER, "Application interface action requires a GUI"); return false; } @@ -59,7 +59,7 @@ ensure_desktop_valid(GError **error) static bool ensure_desktop_not_present(GError **error) { - if (inkscape_use_gui()) { + if (INKSCAPE.use_gui()) { g_set_error(error, INKSCAPE_ERROR, INKSCAPE_ERROR_OTHER, "Application interface action requires non-GUI (command line) mode"); return false; } diff --git a/src/extension/dbus/dbus-init.cpp b/src/extension/dbus/dbus-init.cpp index 19b48e10d..21a1c6847 100644 --- a/src/extension/dbus/dbus-init.cpp +++ b/src/extension/dbus/dbus-init.cpp @@ -153,23 +153,23 @@ gchar * init_document (void) { // This is for command-line use only - g_assert(!inkscape_use_gui()); + g_assert(!INKSCAPE.use_gui()); // Create a blank document and get its selection model etc in an ActionContext SPDocument *doc = SPDocument::createNewDoc(NULL, 1, TRUE); - inkscape_add_document(doc); - return dbus_register_document(inkscape_action_context_for_document(doc)); + INKSCAPE.add_document(doc); + return dbus_register_document(INKSCAPE.action_context_for_document(doc)); } gchar * init_active_document() { - SPDocument *doc = inkscape_active_document(); + SPDocument *doc = INKSCAPE.active_document(); if (!doc) { return NULL; } - return dbus_register_document(inkscape_active_action_context()); + return dbus_register_document(INKSCAPEactive_action_context()); } gchar * diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp index e3452f4ce..bd5f826d3 100644 --- a/src/extension/dbus/document-interface.cpp +++ b/src/extension/dbus/document-interface.cpp @@ -156,7 +156,7 @@ get_name_from_object (SPObject * obj) void desktop_ensure_active (SPDesktop* desk) { if (desk != SP_ACTIVE_DESKTOP) - inkscape_activate_desktop (desk); + INKSCAPE.activate_desktop (desk); return; } -- cgit v1.2.3 From 02601ddcf2e84ddd6330f1aaa63025f50b23e2d5 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Thu, 24 Jul 2014 15:13:19 -0400 Subject: Fix typo in dbus api files (bzr r13341.5.11) --- src/extension/dbus/dbus-init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/extension') diff --git a/src/extension/dbus/dbus-init.cpp b/src/extension/dbus/dbus-init.cpp index 21a1c6847..43830762c 100644 --- a/src/extension/dbus/dbus-init.cpp +++ b/src/extension/dbus/dbus-init.cpp @@ -169,7 +169,7 @@ init_active_document() return NULL; } - return dbus_register_document(INKSCAPEactive_action_context()); + return dbus_register_document(INKSCAPE.active_action_context()); } gchar * -- cgit v1.2.3 From fa9bd6393f316dab9303569b28f6b5d179fedd61 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sat, 27 Sep 2014 10:17:45 -0400 Subject: Update to experimental r13565 (bzr r13341.5.16) --- src/extension/implementation/script.cpp | 2 +- src/extension/internal/bitmap/crop.cpp | 2 +- src/extension/internal/bitmap/opacity.cpp | 2 +- src/extension/internal/cairo-render-context.h | 3 +++ src/extension/internal/cdr-input.cpp | 2 +- src/extension/internal/gdkpixbuf-input.cpp | 13 ++++++------- src/extension/internal/gdkpixbuf-input.h | 2 +- src/extension/internal/pdfinput/pdf-input.cpp | 2 +- src/extension/internal/vsd-input.cpp | 2 +- src/extension/prefdialog.cpp | 2 +- 10 files changed, 17 insertions(+), 15 deletions(-) (limited to 'src/extension') diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 1c13c27f1..5ee226ccf 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -26,7 +26,7 @@ #include "desktop-handles.h" #include "desktop.h" -#include "dialogs/dialog-events.h" +#include "ui/dialog-events.h" #include "extension/effect.h" #include "extension/output.h" #include "extension/input.h" diff --git a/src/extension/internal/bitmap/crop.cpp b/src/extension/internal/bitmap/crop.cpp index 0e633afd6..02d92668b 100644 --- a/src/extension/internal/bitmap/crop.cpp +++ b/src/extension/internal/bitmap/crop.cpp @@ -74,7 +74,7 @@ Crop::init(void) "\n" "\n" "\n" - "" N_("Crop selected bitmap(s).") "\n" + "" N_("Crop selected bitmap(s)") "\n" "\n" "\n", new Crop()); } diff --git a/src/extension/internal/bitmap/opacity.cpp b/src/extension/internal/bitmap/opacity.cpp index 742cb7019..f9b4bbc27 100644 --- a/src/extension/internal/bitmap/opacity.cpp +++ b/src/extension/internal/bitmap/opacity.cpp @@ -43,7 +43,7 @@ Opacity::init(void) "\n" "\n" "\n" - "" N_("Modify opacity channel(s) of selected bitmap(s).") "\n" + "" N_("Modify opacity channel(s) of selected bitmap(s)") "\n" "\n" "\n", new Opacity()); } diff --git a/src/extension/internal/cairo-render-context.h b/src/extension/internal/cairo-render-context.h index 8d3e63775..8071cae36 100644 --- a/src/extension/internal/cairo-render-context.h +++ b/src/extension/internal/cairo-render-context.h @@ -31,6 +31,9 @@ class SPClipPath; class SPMask; +typedef struct _PangoFont PangoFont; +typedef struct _PangoLayout PangoLayout; + namespace Inkscape { class Pixbuf; diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp index fa5cb70f9..1de3f304b 100644 --- a/src/extension/internal/cdr-input.cpp +++ b/src/extension/internal/cdr-input.cpp @@ -40,7 +40,7 @@ #include "document-undo.h" #include "inkscape.h" -#include "dialogs/dialog-events.h" +#include "ui/dialog-events.h" #include #include "ui/widget/spinbutton.h" #include "ui/widget/frame.h" diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index da179bee0..28e44c461 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -1,21 +1,20 @@ -#ifdef HAVE_CONFIG_H -# include -#endif +#include + #include #include #include +#include "dir-util.h" +#include "display/cairo-utils.h" #include "document-private.h" -#include +#include "document-undo.h" #include "extension/input.h" #include "extension/system.h" +#include "image-resolution.h" #include "gdkpixbuf-input.h" #include "preferences.h" #include "selection-chemistry.h" #include "sp-image.h" -#include "document-undo.h" #include "util/units.h" -#include "image-resolution.h" -#include "display/cairo-utils.h" #include namespace Inkscape { diff --git a/src/extension/internal/gdkpixbuf-input.h b/src/extension/internal/gdkpixbuf-input.h index 597e7246b..2e03a96db 100644 --- a/src/extension/internal/gdkpixbuf-input.h +++ b/src/extension/internal/gdkpixbuf-input.h @@ -10,7 +10,7 @@ namespace Internal { class GdkpixbufInput : Inkscape::Extension::Implementation::Implementation { public: SPDocument *open(Inkscape::Extension::Input *mod, - gchar const *uri); + char const *uri); static void init(); }; diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index bcaa8712f..e18d898f5 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -48,7 +48,7 @@ #include "inkscape.h" #include "util/units.h" -#include "dialogs/dialog-events.h" +#include "ui/dialog-events.h" #include #include "ui/widget/spinbutton.h" #include "ui/widget/frame.h" diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index 0830ae2dd..2623d1ca7 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -41,7 +41,7 @@ #include "inkscape.h" #include "util/units.h" -#include "dialogs/dialog-events.h" +#include "ui/dialog-events.h" #include #include "ui/widget/spinbutton.h" #include "ui/widget/frame.h" diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index d1f83701f..af31f32b6 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -13,7 +13,7 @@ #include #include -#include "../dialogs/dialog-events.h" +#include "ui/dialog-events.h" #include "xml/repr.h" // Used to get SP_ACTIVE_DESKTOP -- cgit v1.2.3 From bad0504958a10f1b99db3ae2557305541f388a52 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Mon, 24 Nov 2014 20:56:53 +0100 Subject: Units: make it absolutely clear that Document properties unit dropdown is for UI Display Units. Upon document load, calculate the units used for SVG values, if a viewbox is available. If not, default to "px" SVG units. Change all code to use either Display units OR svg units. (bzr r13751) --- src/extension/internal/emf-print.cpp | 2 +- src/extension/internal/grid.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/extension') diff --git a/src/extension/internal/emf-print.cpp b/src/extension/internal/emf-print.cpp index 0f43fbca1..f7b6626c4 100644 --- a/src/extension/internal/emf-print.cpp +++ b/src/extension/internal/emf-print.cpp @@ -144,7 +144,7 @@ unsigned int PrintEmf::begin(Inkscape::Extension::Print *mod, SPDocument *doc) // width and height in px _width = doc->getWidth().value("px"); _height = doc->getHeight().value("px"); - _doc_unit_scale = Inkscape::Util::Quantity::convert(1, (doc->getDefaultUnit()), "px"); + _doc_unit_scale = Inkscape::Util::Quantity::convert(1, &doc->getSVGUnit(), "px"); // initialize a few global variables hbrush = hbrushOld = hpen = 0; diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index 0059bbec2..f4e0e5843 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -113,7 +113,7 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc bounding_area = temprec; } - gdouble scale = Inkscape::Util::Quantity::convert(1, "px", (document->doc())->getDefaultUnit()); + gdouble scale = Inkscape::Util::Quantity::convert(1, "px", &document->doc()->getSVGUnit()); bounding_area *= Geom::Scale(scale); Geom::Point spacings( scale * module->get_param_float("xspacing"), scale * module->get_param_float("yspacing") ); -- cgit v1.2.3 From 3d5f0a3d4615973d6bd28884085a5653178cb6dd Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Tue, 25 Nov 2014 15:00:58 +0100 Subject: Allow marker orientation to have units ('deg', 'rad', 'grad', 'turn'). (bzr r13757) --- src/extension/internal/cairo-renderer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/extension') diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp index 5a9a28ef9..1f48d2097 100644 --- a/src/extension/internal/cairo-renderer.cpp +++ b/src/extension/internal/cairo-renderer.cpp @@ -206,7 +206,7 @@ static void sp_shape_render(SPShape *shape, CairoRenderContext *ctx) } else if (marker->orient_mode == MARKER_ORIENT_AUTO_START_REVERSE) { tr = Geom::Rotate::from_degrees( 180.0 ) * sp_shape_marker_get_transform_at_start(pathv.begin()->front()); } else { - tr = Geom::Rotate::from_degrees(marker->orient) * Geom::Translate(pathv.begin()->front().pointAt(0)); + tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(pathv.begin()->front().pointAt(0)); } sp_shape_render_invoke_marker_rendering(marker, tr, style, ctx); } @@ -224,7 +224,7 @@ static void sp_shape_render(SPShape *shape, CairoRenderContext *ctx) if (marker->orient_mode != MARKER_ORIENT_ANGLE) { tr = sp_shape_marker_get_transform_at_start(path_it->front()); } else { - tr = Geom::Rotate::from_degrees(marker->orient) * Geom::Translate(path_it->front().pointAt(0)); + tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(path_it->front().pointAt(0)); } sp_shape_render_invoke_marker_rendering(marker, tr, style, ctx); } @@ -241,7 +241,7 @@ static void sp_shape_render(SPShape *shape, CairoRenderContext *ctx) if (marker->orient_mode != MARKER_ORIENT_ANGLE) { tr = sp_shape_marker_get_transform(*curve_it1, *curve_it2); } else { - tr = Geom::Rotate::from_degrees(marker->orient) * Geom::Translate(curve_it1->pointAt(1)); + tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(curve_it1->pointAt(1)); } sp_shape_render_invoke_marker_rendering(marker, tr, style, ctx); @@ -257,7 +257,7 @@ static void sp_shape_render(SPShape *shape, CairoRenderContext *ctx) if (marker->orient_mode != MARKER_ORIENT_ANGLE) { tr = sp_shape_marker_get_transform_at_end(lastcurve); } else { - tr = Geom::Rotate::from_degrees(marker->orient) * Geom::Translate(lastcurve.pointAt(1)); + tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(lastcurve.pointAt(1)); } sp_shape_render_invoke_marker_rendering(marker, tr, style, ctx); } @@ -281,7 +281,7 @@ static void sp_shape_render(SPShape *shape, CairoRenderContext *ctx) if (marker->orient_mode != MARKER_ORIENT_ANGLE) { tr = sp_shape_marker_get_transform_at_end(lastcurve); } else { - tr = Geom::Rotate::from_degrees(marker->orient) * Geom::Translate(lastcurve.pointAt(1)); + tr = Geom::Rotate::from_degrees(marker->orient.computed) * Geom::Translate(lastcurve.pointAt(1)); } sp_shape_render_invoke_marker_rendering(marker, tr, style, ctx); -- cgit v1.2.3 From c94cbdb38d7ac2f70a669035b090140eae3cc05b Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 26 Nov 2014 20:45:29 +0100 Subject: Change getDefaultUnit() to getDisplayUnit() to better reflect value returned by function. (bzr r13774) --- src/extension/internal/cdr-input.cpp | 2 +- src/extension/internal/gdkpixbuf-input.cpp | 2 +- src/extension/internal/pdfinput/pdf-input.cpp | 2 +- src/extension/internal/vsd-input.cpp | 2 +- src/extension/internal/wpg-input.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/extension') diff --git a/src/extension/internal/cdr-input.cpp b/src/extension/internal/cdr-input.cpp index fb58887c9..f4789a08f 100644 --- a/src/extension/internal/cdr-input.cpp +++ b/src/extension/internal/cdr-input.cpp @@ -285,7 +285,7 @@ SPDocument *CdrInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // Set viewBox if it doesn't exist if (doc && !doc->getRoot()->viewBox_set) { - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit()))); } return doc; } diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 28e44c461..04a446d1c 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -136,7 +136,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) // Set viewBox if it doesn't exist if (!doc->getRoot()->viewBox_set) { std::cout << "Viewbox not set, setting" << std::endl; - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit()))); } // restore undo, as now this document may be shown to the user if a bitmap was opened diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp index defb15754..148d2dcba 100644 --- a/src/extension/internal/pdfinput/pdf-input.cpp +++ b/src/extension/internal/pdfinput/pdf-input.cpp @@ -883,7 +883,7 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { // Set viewBox if it doesn't exist if (!doc->getRoot()->viewBox_set) { - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit()))); } // Restore undo diff --git a/src/extension/internal/vsd-input.cpp b/src/extension/internal/vsd-input.cpp index 25815e64f..7fd0d363b 100644 --- a/src/extension/internal/vsd-input.cpp +++ b/src/extension/internal/vsd-input.cpp @@ -285,7 +285,7 @@ SPDocument *VsdInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // Set viewBox if it doesn't exist if (!doc->getRoot()->viewBox_set) { - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit()))); } return doc; diff --git a/src/extension/internal/wpg-input.cpp b/src/extension/internal/wpg-input.cpp index 12d86a99a..54a14fc72 100644 --- a/src/extension/internal/wpg-input.cpp +++ b/src/extension/internal/wpg-input.cpp @@ -129,7 +129,7 @@ SPDocument *WpgInput::open(Inkscape::Extension::Input * /*mod*/, const gchar * u // Set viewBox if it doesn't exist if (doc && !doc->getRoot()->viewBox_set) { - doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); + doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDisplayUnit()), doc->getHeight().value(doc->getDisplayUnit()))); } delete input; -- cgit v1.2.3 From 03a05a9b929e1f9ccb6786ab609046d2709ac275 Mon Sep 17 00:00:00 2001 From: su_v Date: Thu, 11 Dec 2014 01:34:46 +0100 Subject: Fix build with poppler 0.29.0 (Bug #1399811) Fixed bugs: - https://launchpad.net/bugs/1399811 (bzr r13794) --- src/extension/internal/pdfinput/pdf-parser.cpp | 32 +++++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'src/extension') diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 0b7dc7905..812fa373f 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -923,7 +923,9 @@ void PdfParser::opSetExtGState(Object args[], int /*numArgs*/) GBool isolated = gFalse; GBool knockout = gFalse; if (!obj4.dictLookup(const_cast("CS"), &obj5)->isNull()) { -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL); +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL); #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) blendingColorSpace = GfxColorSpace::parse(&obj5, NULL); @@ -1159,7 +1161,13 @@ void PdfParser::opSetFillColorSpace(Object args[], int /*numArgs*/) res->lookupColorSpace(args[0].getName(), &obj); GfxColorSpace *colorSpace = 0; -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL); + } else { + colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL); + } +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) if (obj.isNull()) { colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); } else { @@ -1202,7 +1210,13 @@ void PdfParser::opSetStrokeColorSpace(Object args[], int /*numArgs*/) state->setStrokePattern(NULL); res->lookupColorSpace(args[0].getName(), &obj); -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + if (obj.isNull()) { + colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL); + } else { + colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL); + } +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) if (obj.isNull()) { colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL); } else { @@ -2910,7 +2924,9 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) } } if (!obj1.isNull()) { -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + colorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL); +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) colorSpace = GfxColorSpace::parse(&obj1, NULL); @@ -3004,7 +3020,9 @@ void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg) obj2.free(); } } -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + GfxColorSpace *maskColorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL); +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL); #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL); @@ -3196,7 +3214,9 @@ void PdfParser::doForm(Object *str) { if (obj1.dictLookup(const_cast("S"), &obj2)->isName(const_cast("Transparency"))) { transpGroup = gTrue; if (!obj1.dictLookup(const_cast("CS"), &obj3)->isNull()) { -#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) +#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API) + blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL); +#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API) blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL); #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI) blendingColorSpace = GfxColorSpace::parse(&obj3, NULL); -- cgit v1.2.3 From 30b6a43219b66aba1a9ebade8aca50910f2c25cc Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 10:39:39 -0500 Subject: Deprecate and remove sp_desktop_selection in favor of SPDesktop::getSelection (bzr r13809) --- src/extension/execution-env.cpp | 4 ++-- src/extension/implementation/implementation.cpp | 4 ++-- src/extension/implementation/script.cpp | 2 +- src/extension/internal/bitmap/imagemagick.cpp | 4 +++- src/extension/internal/grid.cpp | 4 +++- 5 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src/extension') diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index d4b5fd187..1495b7603 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -65,7 +65,7 @@ ExecutionEnv::ExecutionEnv (Effect * effect, Inkscape::UI::View::View * doc, Imp if (desktop != NULL) { Inkscape::Util::GSListConstIterator selected = - sp_desktop_selection(desktop)->itemList(); + desktop->getSelection()->itemList(); while ( selected != NULL ) { Glib::ustring selected_id; selected_id = (*selected)->getId(); @@ -200,7 +200,7 @@ ExecutionEnv::reselect (void) { if (desktop == NULL) { return; } - Inkscape::Selection * selection = sp_desktop_selection(desktop); + Inkscape::Selection * selection = desktop->getSelection(); for (std::list::iterator i = _selected.begin(); i != _selected.end(); ++i) { SPObject * obj = doc->getObjectById(i->c_str()); diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp index 6f6bddb93..e29aed308 100644 --- a/src/extension/implementation/implementation.cpp +++ b/src/extension/implementation/implementation.cpp @@ -48,8 +48,8 @@ Gtk::Widget *Implementation::prefs_effect(Inkscape::Extension::Effect *module, I SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; - GSListConstIterator selected = - sp_desktop_selection((SPDesktop *)view)->itemList(); + // FIXME very unsafe cast + GSListConstIterator selected = ((SPDesktop *)view)->getSelection()->itemList(); Inkscape::XML::Node const* first_select = NULL; if (selected != NULL) { const SPItem * item = *selected; diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index e6ac13cdc..6b1abe04c 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -690,7 +690,7 @@ void Script::effect(Inkscape::Extension::Effect *module, } Inkscape::Util::GSListConstIterator selected = - sp_desktop_selection(desktop)->itemList(); //desktop should not be NULL since doc was checked and desktop is a casted pointer + desktop->getSelection()->itemList(); //desktop should not be NULL since doc was checked and desktop is a casted pointer while ( selected != NULL ) { Glib::ustring selected_id; selected_id += "--id="; diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp index 0d47240d4..c92264858 100644 --- a/src/extension/internal/bitmap/imagemagick.cpp +++ b/src/extension/internal/bitmap/imagemagick.cpp @@ -242,7 +242,9 @@ ImageMagick::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::Vie SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; - GSListConstIterator selected = sp_desktop_selection((SPDesktop *)view)->itemList(); + + // FIXME very unsafe cast + GSListConstIterator selected = ((SPDesktop *)view)->getSelection()->itemList(); Inkscape::XML::Node * first_select = NULL; if (selected != NULL) { first_select = (*selected)->getRepr(); diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index f4e0e5843..2ce86c245 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -191,7 +191,9 @@ Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View SPDocument * current_document = view->doc(); using Inkscape::Util::GSListConstIterator; - GSListConstIterator selected = sp_desktop_selection((SPDesktop *)view)->itemList(); + + // FIXME very unsafe cast + GSListConstIterator selected = ((SPDesktop *)view)->getSelection()->itemList(); Inkscape::XML::Node * first_select = NULL; if (selected != NULL) { first_select = (*selected)->getRepr(); -- cgit v1.2.3 From 3dbf9a08680c6d7252c79397dbf12082ead61bd7 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Sun, 21 Dec 2014 16:58:32 -0500 Subject: Remove sp_desktop_document and finish cleanup of desktop-handles.h (bzr r13820) --- src/extension/dbus/application-interface.cpp | 2 +- src/extension/dbus/document-interface.cpp | 2 +- src/extension/effect.cpp | 2 +- src/extension/execution-env.cpp | 2 +- src/extension/implementation/implementation.cpp | 2 +- src/extension/implementation/script.cpp | 2 +- src/extension/internal/bitmap/imagemagick.cpp | 2 +- src/extension/internal/grid.cpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/extension') diff --git a/src/extension/dbus/application-interface.cpp b/src/extension/dbus/application-interface.cpp index 292832a4b..afaf9aedf 100644 --- a/src/extension/dbus/application-interface.cpp +++ b/src/extension/dbus/application-interface.cpp @@ -196,7 +196,7 @@ application_interface_document_close_all (ApplicationInterface *app_interface, SPDesktop *desktop = SP_ACTIVE_DESKTOP; g_assert(desktop != NULL); - SPDocument *doc = sp_desktop_document(desktop); + SPDocument *doc = desktop->getDocument(); g_assert(doc != NULL); Inkscape::XML::Node *repr = doc->getReprRoot(); diff --git a/src/extension/dbus/document-interface.cpp b/src/extension/dbus/document-interface.cpp index bd5f826d3..4fde6885f 100644 --- a/src/extension/dbus/document-interface.cpp +++ b/src/extension/dbus/document-interface.cpp @@ -21,7 +21,7 @@ #include #include #include "desktop.h" -#include "desktop-handles.h" //sp_desktop_document() + //sp_desktop_document() #include "desktop-style.h" //sp_desktop_get_style #include "display/canvas-text.h" //text #include "display/sp-canvas.h" //text diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index c8f3b2ff9..e7299ba51 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -12,7 +12,7 @@ #include "inkscape.h" #include "helper/action.h" #include "ui/view/view.h" -#include "desktop-handles.h" + #include "selection.h" #include "sp-namedview.h" #include "desktop.h" diff --git a/src/extension/execution-env.cpp b/src/extension/execution-env.cpp index 1495b7603..13b8d60c4 100644 --- a/src/extension/execution-env.cpp +++ b/src/extension/execution-env.cpp @@ -31,7 +31,7 @@ #include "desktop.h" #include "ui/view/view.h" #include "sp-namedview.h" -#include "desktop-handles.h" + #include "display/sp-canvas.h" #include "util/glib-list-iterators.h" diff --git a/src/extension/implementation/implementation.cpp b/src/extension/implementation/implementation.cpp index e29aed308..52f63499a 100644 --- a/src/extension/implementation/implementation.cpp +++ b/src/extension/implementation/implementation.cpp @@ -21,7 +21,7 @@ #include "selection.h" #include "desktop.h" -#include "desktop-handles.h" + #include "ui/view/view.h" #include "util/glib-list-iterators.h" diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index 6b1abe04c..bbc567f75 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -24,7 +24,7 @@ #include #include -#include "desktop-handles.h" + #include "desktop.h" #include "ui/dialog-events.h" #include "extension/effect.h" diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp index c92264858..76f35415e 100644 --- a/src/extension/internal/bitmap/imagemagick.cpp +++ b/src/extension/internal/bitmap/imagemagick.cpp @@ -25,7 +25,7 @@ #include #include "desktop.h" -#include "desktop-handles.h" + #include "selection.h" #include "sp-object.h" #include "util/glib-list-iterators.h" diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index 2ce86c245..270edfe44 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -24,7 +24,7 @@ #include #include "desktop.h" -#include "desktop-handles.h" + #include "document.h" #include "selection.h" #include "sp-object.h" -- cgit v1.2.3