X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Feffect.h;h=c02ce542b09e7d4de1c3366ad1a6edb3a52bedb6;hb=c44173a5bb8a1c0ae9b89fed53701deb246e2d03;hp=44d18146af28c533629dcedebe8f1c4df68b9637;hpb=18f0fe2a37a130c6eff70868d574ee476f2b84cc;p=inkscape.git diff --git a/src/extension/effect.h b/src/extension/effect.h index 44d18146a..c02ce542b 100644 --- a/src/extension/effect.h +++ b/src/extension/effect.h @@ -40,11 +40,12 @@ class Effect : public Extension { /** \brief This is the last effect that was used. This is used in a menu item to rapidly recall the same effect. */ static Effect * _last_effect; - /** \brief The location of the effects menu on the menu structure + /** \brief The location of the Extensions and Filters menus on the menu structure XML file. This is saved so it only has to be discovered once. */ static Inkscape::XML::Node * _effects_list; - bool find_effects_list (Inkscape::XML::Node * menustruct); + static Inkscape::XML::Node * _filters_list; + Inkscape::XML::Node *find_menu (Inkscape::XML::Node * menustruct, const gchar *name); void merge_menu (Inkscape::XML::Node * base, Inkscape::XML::Node * start, Inkscape::XML::Node * patern, Inkscape::XML::Node * mergee); /** \brief This is the verb type that is used for all effect's verbs. @@ -60,6 +61,8 @@ class Effect : public Extension { Effect * _effect; /** \brief Whether or not to show preferences on display */ bool _showPrefs; + /** \brief Name with elipses if that makes sense */ + gchar * _elip_name; protected: virtual SPAction * make_action (Inkscape::UI::View::View * view); public: @@ -70,9 +73,23 @@ class Effect : public Extension { gchar const * image, Effect * effect, bool showPrefs) : - Verb(id, _(name), _(tip), image), _effect(effect), _showPrefs(showPrefs) { + Verb(id, _(name), _(tip), image), + _effect(effect), + _showPrefs(showPrefs), + _elip_name(NULL) { /* No clue why, but this is required */ this->set_default_sensitive(true); + if (_showPrefs && effect != NULL && effect->param_visible_count() != 0) { + _elip_name = g_strdup_printf("%s...", _(name)); + set_name(_elip_name); + } + } + + /** \brief Destructor */ + ~EffectVerb() { + if (_elip_name != NULL) { + g_free(_elip_name); + } } }; @@ -112,6 +129,7 @@ public: Gtk::VBox * get_info_widget(void); bool no_doc; // if true, the effect does not process SVG document at all, so no need to save, read, and watch for errors + bool no_live_preview; // if true, the effect does not need "live preview" checkbox in its dialog void set_pref_dialog (PrefDialog * prefdialog); private: