summaryrefslogtreecommitdiffstats
path: root/src/extension/output.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-09-01 19:49:18 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-09-01 19:50:16 +0000
commit5e8e0a6bdd15427faa16d6432b9fbd7bbe0d6335 (patch)
tree37dfb161397255903dd32fe27302fb308e5b9d4a /src/extension/output.cpp
parentAdd 'vector-effect' to CSS and attribute lists. (diff)
parentUpdate internal extensions for latest .inx format changes (diff)
downloadinkscape-5e8e0a6bdd15427faa16d6432b9fbd7bbe0d6335.tar.gz
inkscape-5e8e0a6bdd15427faa16d6432b9fbd7bbe0d6335.zip
Extension updates for 1.0 (!808)
Diffstat (limited to 'src/extension/output.cpp')
-rw-r--r--src/extension/output.cpp43
1 files changed, 31 insertions, 12 deletions
diff --git a/src/extension/output.cpp b/src/extension/output.cpp
index c6cf399b8..07c1120e7 100644
--- a/src/extension/output.cpp
+++ b/src/extension/output.cpp
@@ -9,10 +9,15 @@
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
-#include "prefdialog.h"
+#include "output.h"
+
#include "document.h"
+
#include "implementation/implementation.h"
-#include "output.h"
+
+#include "prefdialog/prefdialog.h"
+
+#include "xml/repr.h"
/* Inkscape::Extension::Output */
@@ -36,7 +41,8 @@ namespace Extension {
Overall, there are many levels of indentation, just to handle the
levels of indentation in the XML file.
*/
-Output::Output (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) : Extension(in_repr, in_imp)
+Output::Output (Inkscape::XML::Node *in_repr, Implementation::Implementation *in_imp, std::string *base_directory)
+ : Extension(in_repr, in_imp, base_directory)
{
mimetype = nullptr;
extension = nullptr;
@@ -148,23 +154,35 @@ Output::get_extension()
\return The name of the filetype supported
\brief Get the name of the filetype supported
*/
-gchar *
-Output::get_filetypename()
+const char *
+Output::get_filetypename(bool translated)
{
- if (filetypename != nullptr)
- return filetypename;
+ const char *name;
+
+ if (filetypename)
+ name = filetypename;
else
- return get_name();
+ name = get_name();
+
+ if (name && translated) {
+ return get_translation(name);
+ } else {
+ return name;
+ }
}
/**
\return Tooltip giving more information on the filetype
\brief Get the tooltip for more information on the filetype
*/
-gchar *
-Output::get_filetypetooltip()
+const char *
+Output::get_filetypetooltip(bool translated)
{
- return filetypetooltip;
+ if (filetypetooltip && translated) {
+ return get_translation(filetypetooltip);
+ } else {
+ return filetypetooltip;
+ }
}
/**
@@ -187,7 +205,8 @@ Output::prefs ()
return true;
}
- PrefDialog * dialog = new PrefDialog(this->get_name(), this->get_help(), controls);
+ Glib::ustring title = get_translation(this->get_name());
+ PrefDialog *dialog = new PrefDialog(title, controls);
int response = dialog->run();
dialog->hide();