diff options
| author | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-07-08 16:02:38 +0000 |
|---|---|---|
| committer | Slagvi Public <JandotDarowskiattgmaildottcom> | 2013-07-08 16:02:38 +0000 |
| commit | cbdafaae927348aa8ef5396474535571fe989bf8 (patch) | |
| tree | f6043cb991d9b848e8c073d8c9f9704d6de33df1 /src/ui/dialog/static-template-load-tab.cpp | |
| parent | Added loading templates into NewFromTemplate dialog. (diff) | |
| download | inkscape-cbdafaae927348aa8ef5396474535571fe989bf8.tar.gz inkscape-cbdafaae927348aa8ef5396474535571fe989bf8.zip | |
Coding style improvements and display bug fixes
(bzr r12379.2.8)
Diffstat (limited to 'src/ui/dialog/static-template-load-tab.cpp')
| -rw-r--r-- | src/ui/dialog/static-template-load-tab.cpp | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/ui/dialog/static-template-load-tab.cpp b/src/ui/dialog/static-template-load-tab.cpp index 47c7c00b9..26b999aec 100644 --- a/src/ui/dialog/static-template-load-tab.cpp +++ b/src/ui/dialog/static-template-load-tab.cpp @@ -1,3 +1,13 @@ +/** @file + * @brief New From Template static templates tab - implementation + */ +/* Authors: + * Jan Darowski <jan.darowski@gmail.com>, supervised by Krzysztof KosiĆski + * + * Copyright (C) 2013 Authors + * Released under GNU GPL, read the file 'COPYING' for more information + */ + #include "static-template-load-tab.h" #include <gtkmm/alignment.h> @@ -5,7 +15,7 @@ #include <gtkmm/label.h> #include <iostream> -#include "src/file.h" +#include "file.h" namespace Inkscape { @@ -15,26 +25,26 @@ namespace UI { StaticTemplateLoadTab::StaticTemplateLoadTab() : 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") + , _template_name_label("Template_name") + , _preview_image("preview.png") { - _loading_path = "/static"; + _loading_path = ""; _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); - _template_info_column.pack_start(_short_description_label, Gtk::PACK_SHRINK, 4); + _info_box.pack_start(_template_name_label, Gtk::PACK_SHRINK, 4); + _info_box.pack_start(_template_author_label, Gtk::PACK_SHRINK, 0); + _info_box.pack_start(_preview_image, Gtk::PACK_SHRINK, 15); + _info_box.pack_start(_short_description_label, Gtk::PACK_SHRINK, 4); _short_description_label.set_line_wrap(true); _short_description_label.set_size_request(200); Gtk::Alignment *align; align = manage(new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER, 0.0, 0.0)); - _template_info_column.pack_start(*align, Gtk::PACK_SHRINK, 5); + _info_box.pack_start(*align, Gtk::PACK_SHRINK, 5); align->add(_more_info_button); } @@ -42,8 +52,8 @@ StaticTemplateLoadTab::StaticTemplateLoadTab() void StaticTemplateLoadTab::createTemplate() { Glib::ustring path; - if (_templates.find(_current_template) != _templates.end()){ - path = _templates[_current_template].path; + if (_tdata.find(_current_template) != _tdata.end()){ + path = _tdata[_current_template].path; } else path = ""; @@ -56,8 +66,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); + _template_author_label.set_text(_tdata[_current_template].author); + _short_description_label.set_text(_tdata[_current_template].short_description); } } |
