From: JucaBlues Date: Thu, 26 Jun 2008 01:01:02 +0000 (+0000) Subject: * remove g_warnings X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2e31a3635ccfcf18291da8c6a24189e0964f5148;p=inkscape.git * remove g_warnings * add 2 experimental entry fields in SVGFonts dialog --- diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 284003c92..fb51da7de 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -26,40 +26,41 @@ namespace Dialog { /* Add all fonts in the document to the combobox. */ void SvgFontsDialog::update_fonts() { -g_warning("update_fonts"); SPDesktop* desktop = this->getDesktop(); SPDocument* document = sp_desktop_document(desktop); const GSList* fonts = sp_document_get_resource_list(document, "font"); _model->clear(); -g_warning("after _model->clear()"); for(const GSList *l = fonts; l; l = l->next) { Gtk::TreeModel::Row row = *_model->append(); SPFont* f = (SPFont*)l->data; row[_columns.font] = f; const gchar* lbl = f->label(); -g_warning("label: %s", lbl); const gchar* id = SP_OBJECT_ID(f); row[_columns.label] = lbl ? lbl : (id ? id : "font"); } - -// update_selection(desktop->selection); -// _dialog.update_filter_general_settings_view(); } SvgFontsDialog::SvgFontsDialog() : UI::Widget::Panel("", "dialogs.svgfonts", SP_VERB_DIALOG_SVG_FONTS) { - //Gtk::Label* label = Gtk::manage(new Gtk::Label("Here we will have settings for the SVGFonts used in the document.")); - _getContents()->add(_list); -g_warning("a"); + Gtk::HBox* hbox = Gtk::manage(new Gtk::HBox()); + hbox->add(_font_list); + hbox->add(_font_settings); + _getContents()->add(*hbox); + +//List of SVGFonts declared in a document: _model = Gtk::ListStore::create(_columns); -g_warning("b"); - _list.set_model(_model); - _list.append_column_editable("_Font", _columns.label); -g_warning("c"); + _font_list.set_model(_model); + _font_list.append_column_editable("_Font", _columns.label); this->update_fonts(); -g_warning("d"); + +//Settings for the selected SVGFont: + _font_family.set_label("font-family"); + _font_variant.set_label("font-variant"); + + _font_settings.add(_font_family); + _font_settings.add(_font_variant); } SvgFontsDialog::~SvgFontsDialog(){} diff --git a/src/ui/dialog/svg-fonts-dialog.h b/src/ui/dialog/svg-fonts-dialog.h index d12e9481c..5b5f5c02f 100644 --- a/src/ui/dialog/svg-fonts-dialog.h +++ b/src/ui/dialog/svg-fonts-dialog.h @@ -21,6 +21,8 @@ #include #include +#include +#include using namespace Inkscape::UI::Widget; @@ -55,7 +57,24 @@ private: }; Glib::RefPtr _model; Columns _columns; - Gtk::TreeView _list; + Gtk::TreeView _font_list; + Gtk::VBox _font_settings; + class EntryWidget : public Gtk::HBox + { + public: + EntryWidget() + { + this->add(this->_label); + this->add(this->_entry); + } + void set_label(const gchar* l){ + this->_label.set_text(l); + } + private: + Gtk::Label _label; + Gtk::Entry _entry; + }; + EntryWidget _font_family, _font_variant; }; } // namespace Dialog