diff options
| author | Patrick Storz <eduard.braun2@gmx.de> | 2019-07-21 16:41:47 +0000 |
|---|---|---|
| committer | Patrick Storz <eduard.braun2@gmx.de> | 2019-08-31 14:50:38 +0000 |
| commit | 3c2c2921ae44841306da6ff357865481ad1fc674 (patch) | |
| tree | fdc214683ca4e54231d84776c1ef1548fbff68d0 /src | |
| parent | Remove unused define ESCAPE_DOLLAR_COMMANDLINE (diff) | |
| download | inkscape-3c2c2921ae44841306da6ff357865481ad1fc674.tar.gz inkscape-3c2c2921ae44841306da6ff357865481ad1fc674.zip | |
Remove unused and disabled "help" feature for extensions
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/dependency.h | 1 | ||||
| -rw-r--r-- | src/extension/effect.cpp | 2 | ||||
| -rw-r--r-- | src/extension/extension.cpp | 29 | ||||
| -rw-r--r-- | src/extension/extension.h | 6 | ||||
| -rw-r--r-- | src/extension/input.cpp | 2 | ||||
| -rw-r--r-- | src/extension/output.cpp | 2 | ||||
| -rw-r--r-- | src/extension/prefdialog/prefdialog.cpp | 36 | ||||
| -rw-r--r-- | src/extension/prefdialog/prefdialog.h | 3 | ||||
| -rw-r--r-- | src/ui/dialog/extension-editor.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/extension-editor.h | 8 |
10 files changed, 8 insertions, 89 deletions
diff --git a/src/extension/dependency.h b/src/extension/dependency.h index 6c360785b..3532eefcb 100644 --- a/src/extension/dependency.h +++ b/src/extension/dependency.h @@ -60,7 +60,6 @@ public: virtual ~Dependency (); bool check () const; const gchar* get_name(); - Glib::ustring &get_help () const; Glib::ustring &get_link () const; friend std::ostream & operator<< (std::ostream &out_file, const Dependency & in_dep); diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index c10ad10bd..ae06ff073 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -250,7 +250,7 @@ Effect::prefs (Inkscape::UI::View::View * doc) set_state(Extension::STATE_LOADED); if (!loaded()) return false; - _prefDialog = new PrefDialog(this->get_name(), this->get_help(), nullptr, this); + _prefDialog = new PrefDialog(this->get_name(), nullptr, this); _prefDialog->show(); return true; diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index bd593ea15..62d6f4590 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -51,8 +51,7 @@ std::ofstream Extension::error_file; a name and an ID the module will be left in an errored state. */ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementation * in_imp) - : _help(nullptr) - , silent(false) + : silent(false) , _gui(true) , execution_env(nullptr) { @@ -87,9 +86,6 @@ Extension::Extension (Inkscape::XML::Node * in_repr, Implementation::Implementat if (!strcmp(chname, "name")) { name = g_strdup (child_repr->firstChild()->content()); } /* name */ - if (!strcmp(chname, "help")) { - _help = g_strdup (child_repr->firstChild()->content()); - } /* name */ if (!strcmp(chname, "param") || !strcmp(chname, "_param")) { Parameter * param; param = Parameter::make(child_repr, this); @@ -789,29 +785,6 @@ void Extension::add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Gri } Gtk::VBox * -Extension::get_help_widget() -{ - Gtk::VBox * retval = Gtk::manage(new Gtk::VBox()); - retval->set_border_width(4); - - if (_help == nullptr) { - Gtk::Label * content = Gtk::manage(new Gtk::Label(_("Currently there is no help available for this Extension. Please look on the Inkscape website or ask on the mailing lists if you have questions regarding this extension."))); - content->set_xalign(0); - content->set_yalign(0); - retval->pack_start(*content, true, true, 4); - content->set_line_wrap(true); - content->show(); - } else { - - - - } - - retval->show(); - return retval; -} - -Gtk::VBox * Extension::get_params_widget() { Gtk::VBox * retval = Gtk::manage(new Gtk::VBox()); diff --git a/src/extension/extension.h b/src/extension/extension.h index 619cb588e..dd93da6c2 100644 --- a/src/extension/extension.h +++ b/src/extension/extension.h @@ -101,7 +101,6 @@ public: private: gchar *id; /**< The unique identifier for the Extension */ gchar *name; /**< A user friendly name for the Extension */ - gchar *_help; /**< A string that contains a help text for the user */ state_t _state; /**< Which state the Extension is currently in */ std::vector<Dependency *> _deps; /**< Dependencies for this extension */ static std::ofstream error_file; /**< This is the place where errors get reported */ @@ -126,9 +125,7 @@ public: Inkscape::XML::Node * get_repr (); gchar * get_id (); gchar * get_name (); - /** \brief Gets the help string for this extension */ - gchar const * get_help () { return _help; } - bool is_silent (); + bool is_silent (); void deactivate (); bool deactivated (); void printFailure (Glib::ustring reason); @@ -296,7 +293,6 @@ public: /* Extension editor dialog stuff */ public: Gtk::VBox * get_info_widget(); - Gtk::VBox * get_help_widget(); Gtk::VBox * get_params_widget(); protected: inline static void add_val(Glib::ustring labelstr, Glib::ustring valuestr, Gtk::Grid * table, int * row); diff --git a/src/extension/input.cpp b/src/extension/input.cpp index 792b794c8..dd9485202 100644 --- a/src/extension/input.cpp +++ b/src/extension/input.cpp @@ -224,7 +224,7 @@ Input::prefs (const gchar *uri) return true; } - PrefDialog * dialog = new PrefDialog(this->get_name(), this->get_help(), controls); + PrefDialog * dialog = new PrefDialog(this->get_name(), controls); int response = dialog->run(); dialog->hide(); diff --git a/src/extension/output.cpp b/src/extension/output.cpp index 51d58bc89..b4f483a91 100644 --- a/src/extension/output.cpp +++ b/src/extension/output.cpp @@ -187,7 +187,7 @@ Output::prefs () return true; } - PrefDialog * dialog = new PrefDialog(this->get_name(), this->get_help(), controls); + PrefDialog * dialog = new PrefDialog(this->get_name(), controls); int response = dialog->run(); dialog->hide(); diff --git a/src/extension/prefdialog/prefdialog.cpp b/src/extension/prefdialog/prefdialog.cpp index 90a156abe..e0fea98c8 100644 --- a/src/extension/prefdialog/prefdialog.cpp +++ b/src/extension/prefdialog/prefdialog.cpp @@ -36,16 +36,14 @@ namespace Extension { /** \brief Creates a new preference dialog for extension preferences \param name Name of the Extension whose dialog this is - \param help The help string for the extension (NULL if none) \param controls The extension specific widgets in the dialog This function initializes the dialog with the name of the extension in the title. It adds a few buttons and sets up handlers for them. It also places the passed-in widgets into the dialog. */ -PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * controls, Effect * effect) : +PrefDialog::PrefDialog (Glib::ustring name, Gtk::Widget * controls, Effect * effect) : Gtk::Dialog(_(name.c_str()), true), - _help(help), _name(name), _button_ok(nullptr), _button_cancel(nullptr), @@ -71,11 +69,6 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co this->get_content_area()->pack_start(*hbox, true, true, 0); - /* - Gtk::Button * help_button = add_button(Gtk::Stock::HELP, Gtk::RESPONSE_HELP); - if (_help == NULL) - help_button->set_sensitive(false); - */ _button_cancel = add_button(_effect == nullptr ? _("_Cancel") : _("_Close"), Gtk::RESPONSE_CANCEL); _button_ok = add_button(_effect == nullptr ? _("_OK") : _("_Apply"), Gtk::RESPONSE_OK); set_default_response(Gtk::RESPONSE_OK); @@ -146,33 +139,6 @@ PrefDialog::~PrefDialog ( ) return; } -#if 0 -/** \brief Runs the dialog - \return The response to the dialog - - This function overrides the run function in the GTKmm dialog - class, but basically it only calls it. This function only - handles the \c Gtk::RESPONSE_HELP return, and in that case it - brings up the help window. All other return values are returned - to the calling function. -*/ -int -PrefDialog::run (void) { - int resp = Gtk::RESPONSE_HELP; - while (resp == Gtk::RESPONSE_HELP) { - resp = Gtk::Dialog::run(); - if (resp == Gtk::RESPONSE_HELP) { - /* - if (_helpDialog == NULL) { - _helpDialog = new HelpDialog(_help); - } - */ - } - } - return resp; -} -#endif - void PrefDialog::preview_toggle () { SPDesktop *desktop = SP_ACTIVE_DESKTOP; diff --git a/src/extension/prefdialog/prefdialog.h b/src/extension/prefdialog/prefdialog.h index 087900fbe..295b4a445 100644 --- a/src/extension/prefdialog/prefdialog.h +++ b/src/extension/prefdialog/prefdialog.h @@ -27,8 +27,6 @@ class Parameter; /** \brief A class to represent the preferences for an extension */ class PrefDialog : public Gtk::Dialog { - /** \brief Help string if it exists */ - gchar const * _help; /** \brief Name of the extension */ Glib::ustring _name; @@ -71,7 +69,6 @@ class PrefDialog : public Gtk::Dialog { public: PrefDialog (Glib::ustring name, - gchar const * help, Gtk::Widget * controls = nullptr, Effect * effect = nullptr); ~PrefDialog () override; diff --git a/src/ui/dialog/extension-editor.cpp b/src/ui/dialog/extension-editor.cpp index e324afcc7..1852010a0 100644 --- a/src/ui/dialog/extension-editor.cpp +++ b/src/ui/dialog/extension-editor.cpp @@ -41,7 +41,6 @@ ExtensionEditor::ExtensionEditor() : UI::Widget::Panel("/dialogs/extensioneditor", SP_VERB_DIALOG_EXTENSIONEDITOR) { _notebook_info.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - _notebook_help.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); _notebook_params.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); //Main HBox @@ -73,7 +72,6 @@ ExtensionEditor::ExtensionEditor() hbox_list_page->pack_start(*vbox_page, true, true, 0); Gtk::Notebook * notebook = Gtk::manage(new Gtk::Notebook()); notebook->append_page(_notebook_info, *Gtk::manage(new Gtk::Label(_("Information")))); - notebook->append_page(_notebook_help, *Gtk::manage(new Gtk::Label(_("Help")))); notebook->append_page(_notebook_params, *Gtk::manage(new Gtk::Label(_("Parameters")))); vbox_page->pack_start(*notebook, true, true, 0); @@ -140,19 +138,16 @@ void ExtensionEditor::on_pagelist_selection_changed() /* Clear the notbook pages */ _notebook_info.remove(); - _notebook_help.remove(); _notebook_params.remove(); Inkscape::Extension::Extension * ext = Inkscape::Extension::db.get(id.c_str()); /* Make sure we have all the widgets */ Gtk::Widget * info = nullptr; - Gtk::Widget * help = nullptr; Gtk::Widget * params = nullptr; if (ext != nullptr) { info = ext->get_info_widget(); - help = ext->get_help_widget(); params = ext->get_params_widget(); } @@ -160,9 +155,6 @@ void ExtensionEditor::on_pagelist_selection_changed() if (info != nullptr) { _notebook_info.add(*info); } - if (help != nullptr) { - _notebook_help.add(*help); - } if (params != nullptr) { _notebook_params.add(*params); } diff --git a/src/ui/dialog/extension-editor.h b/src/ui/dialog/extension-editor.h index e9c45e209..403ee1fb5 100644 --- a/src/ui/dialog/extension-editor.h +++ b/src/ui/dialog/extension-editor.h @@ -33,8 +33,6 @@ public: static ExtensionEditor &getInstance() { return *new ExtensionEditor(); } - static void show_help (gchar const * extension_id); - protected: /** \brief The view of the list of extensions on the left of the dialog */ Gtk::TreeView _page_list; @@ -42,8 +40,6 @@ protected: Glib::RefPtr<Gtk::TreeStore> _page_list_model; /** \brief The notebook page that contains information */ Gtk::ScrolledWindow _notebook_info; - /** \brief The notebook page that contains help info */ - Gtk::ScrolledWindow _notebook_help; /** \brief The notebook page that holds all the parameters */ Gtk::ScrolledWindow _notebook_params; @@ -68,8 +64,8 @@ private: an item in the extension list */ Glib::ustring _selection_search; - ExtensionEditor(ExtensionEditor const &d); - ExtensionEditor& operator=(ExtensionEditor const &d); + ExtensionEditor(ExtensionEditor const &d) = delete; + ExtensionEditor& operator=(ExtensionEditor const &d) = delete; void on_pagelist_selection_changed(); static void dbfunc (Inkscape::Extension::Extension * in_plug, gpointer in_data); |
