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/static-template-load-tab.cpp | |
| 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/static-template-load-tab.cpp')
| -rw-r--r-- | src/ui/dialog/static-template-load-tab.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/ui/dialog/static-template-load-tab.cpp b/src/ui/dialog/static-template-load-tab.cpp index 94298bf1d..47c7c00b9 100644 --- a/src/ui/dialog/static-template-load-tab.cpp +++ b/src/ui/dialog/static-template-load-tab.cpp @@ -5,18 +5,25 @@ #include <gtkmm/label.h> #include <iostream> +#include "src/file.h" + namespace Inkscape { namespace UI { StaticTemplateLoadTab::StaticTemplateLoadTab() - : _more_info_button("More info") + : TemplateLoadTab() + , _more_info_button("More info") , _preview_image("preview.png") , _short_description_label("Short description - I like trains. ad asda asd asdweqe gdfg") , _template_name_label("Template_name") , _template_author_label("by template_author") { + _loading_path = "/static"; + _loadTemplates(); + _initLists(); + _template_info_column.pack_start(_template_name_label, Gtk::PACK_SHRINK, 4); _template_info_column.pack_start(_template_author_label, Gtk::PACK_SHRINK, 0); _template_info_column.pack_start(_preview_image, Gtk::PACK_SHRINK, 15); @@ -34,7 +41,14 @@ StaticTemplateLoadTab::StaticTemplateLoadTab() void StaticTemplateLoadTab::createTemplate() { - std::cout << "Static template\n"; + Glib::ustring path; + if (_templates.find(_current_template) != _templates.end()){ + path = _templates[_current_template].path; + } + else + path = ""; + + sp_file_new(path); } @@ -42,6 +56,8 @@ void StaticTemplateLoadTab::_displayTemplateInfo() { TemplateLoadTab::_displayTemplateInfo(); _template_name_label.set_text(_current_template); + _template_author_label.set_text(_templates[_current_template].author); + _short_description_label.set_text(_templates[_current_template].short_description); } } |
