diff options
| author | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-07-04 14:19:38 +0000 |
|---|---|---|
| committer | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-07-04 14:19:38 +0000 |
| commit | 46211dc227f62c2e71b3edfa1ffb508c9fe8e0ac (patch) | |
| tree | 2941c3895a0663437a0b580608bca5ad7ef2deb1 /src/ui/dialog/template-load-tab.h | |
| parent | Templates menu item fixed (diff) | |
| download | inkscape-46211dc227f62c2e71b3edfa1ffb508c9fe8e0ac.tar.gz inkscape-46211dc227f62c2e71b3edfa1ffb508c9fe8e0ac.zip | |
Added loading templates into NewFromTemplate dialog.
(bzr r12379.2.7)
Diffstat (limited to 'src/ui/dialog/template-load-tab.h')
| -rw-r--r-- | src/ui/dialog/template-load-tab.h | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/src/ui/dialog/template-load-tab.h b/src/ui/dialog/template-load-tab.h index a9fa7c313..3edcf15eb 100644 --- a/src/ui/dialog/template-load-tab.h +++ b/src/ui/dialog/template-load-tab.h @@ -6,6 +6,9 @@ #include <gtkmm/frame.h> #include <gtkmm/liststore.h> #include <gtkmm/treeview.h> +#include <map> +#include <set> + namespace Inkscape { namespace UI { @@ -20,6 +23,15 @@ public: virtual void createTemplate(); protected: + struct TemplateData + { + Glib::ustring path; + Glib::ustring display_name; + Glib::ustring author; + Glib::ustring short_description; + std::set<Glib::ustring> keywords; + }; + class StringModelColumns : public Gtk::TreeModelColumnRecord { public: @@ -33,14 +45,16 @@ protected: Glib::ustring _current_keyword; Glib::ustring _current_template; + Glib::ustring _loading_path; + std::map<Glib::ustring, TemplateData> _templates; + virtual void _displayTemplateInfo(); virtual void _initKeywordsList(); virtual void _refreshTemplatesList(); - + void _loadTemplates(); void _initLists(); - void _keywordSelected(); - + Gtk::HBox _main_box; Gtk::VBox _templates_column; Gtk::VBox _template_info_column; @@ -50,6 +64,11 @@ protected: Gtk::TreeView _templates_view; Glib::RefPtr<Gtk::ListStore> _templates_ref; StringModelColumns _templates_columns; + +private: + void _getTemplatesFromDir(Glib::ustring); + void _keywordSelected(); + TemplateData _processTemplateFile(Glib::ustring); }; |
