summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-06-27 19:23:06 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-06-27 19:23:06 +0000
commit45f373f3319b598d8e0222fb48e9d3a4760b2044 (patch)
tree846a9ec382567267b09e63c3dde2e1f20cbbffb5 /src/extension
parentMove constructor/destructor into private section, remove protected section. R... (diff)
downloadinkscape-45f373f3319b598d8e0222fb48e9d3a4760b2044.tar.gz
inkscape-45f373f3319b598d8e0222fb48e9d3a4760b2044.zip
5. Refactoring of Application class: make copy/assignment operators private, disallow pointers to Application
(bzr r13341.5.9)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/effect.cpp8
-rw-r--r--src/extension/implementation/script.cpp2
-rw-r--r--src/extension/internal/cdr-input.cpp2
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp2
-rw-r--r--src/extension/internal/vsd-input.cpp2
-rw-r--r--src/extension/system.cpp2
6 files changed, 10 insertions, 8 deletions
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<std::string> &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."));