summaryrefslogtreecommitdiffstats
path: root/src/extension/prefdialog/parameter-description.cpp
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-08-04 20:40:14 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-08-31 14:50:38 +0000
commit9185b26e396867391d92e4ab6edf933eec77db3a (patch)
treeae557ad7fd6bc9a0ec1293a7d85fb0765b9707ba /src/extension/prefdialog/parameter-description.cpp
parentRename Parameter -> InxParameter for consistency (diff)
downloadinkscape-9185b26e396867391d92e4ab6edf933eec77db3a.tar.gz
inkscape-9185b26e396867391d92e4ab6edf933eec77db3a.zip
Add WidgetLabel replacing the former ParamDescription
This improves consistency, as "description" parameter were not actually parameters with a value that could be modified or saved. The old syntax is deprecated but still supported for now.
Diffstat (limited to '')
-rw-r--r--src/extension/prefdialog/widget-label.cpp (renamed from src/extension/prefdialog/parameter-description.cpp)22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/extension/prefdialog/parameter-description.cpp b/src/extension/prefdialog/widget-label.cpp
index ca8825615..64de11463 100644
--- a/src/extension/prefdialog/parameter-description.cpp
+++ b/src/extension/prefdialog/widget-label.cpp
@@ -1,12 +1,18 @@
// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright (C) 2005-2007 Authors:
+/** @file
+ * Description widget for extensions
+ *//*
+ * Authors:
* Ted Gould <ted@gould.cx>
* Johan Engelen <johan@shouraizou.nl> *
+ * Patrick Storz <eduard.braun2@gmx.de>
+ *
+ * Copyright (C) 2005-2019 Authors
+ *
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
-#include "parameter-description.h"
+#include "widget-label.h"
#include <gtkmm/box.h>
#include <gtkmm/label.h>
@@ -20,8 +26,8 @@ namespace Inkscape {
namespace Extension {
-ParamDescription::ParamDescription(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext)
- : InxParameter(xml, ext)
+WidgetLabel::WidgetLabel(Inkscape::XML::Node *xml, Inkscape::Extension::Extension *ext)
+ : InxWidget(xml, ext)
{
// construct the text content by concatenating all (non-empty) text nodes,
// removing all other nodes (e.g. comment nodes) and replacing <extension:br> elements with "<br/>"
@@ -62,14 +68,14 @@ ParamDescription::ParamDescription(Inkscape::XML::Node *xml, Inkscape::Extension
} else if (!strcmp(_appearance, "url")) {
_mode = URL;
} else {
- g_warning("Invalid value ('%s') for appearance of parameter '%s' in extension '%s'",
- _appearance, _name, _extension->get_id());
+ g_warning("Invalid value ('%s') for appearance of label widget in extension '%s'",
+ _appearance, _extension->get_id());
}
}
}
/** \brief Create a label for the description */
-Gtk::Widget *ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
+Gtk::Widget *WidgetLabel::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * /*changeSignal*/)
{
if (_hidden) {
return nullptr;