summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ae5f81d)
raw | patch | inline | side by side (parent: ae5f81d)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Thu, 26 Jun 2008 01:01:02 +0000 (01:01 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Thu, 26 Jun 2008 01:01:02 +0000 (01:01 +0000) |
* add 2 experimental entry fields in SVGFonts dialog
src/ui/dialog/svg-fonts-dialog.cpp | patch | blob | history | |
src/ui/dialog/svg-fonts-dialog.h | patch | blob | history |
index 284003c927a2ebbacdfa88a6bcdd9ca2480d93a3..fb51da7deb239c9f812c6a6c7684f9923fcb7aa8 100644 (file)
/* 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(){}
index d12e9481c187076f0dc76bce8102561ecce87d17..5b5f5c02fe3986c7e0c29e5a141a40059593313b 100644 (file)
#include <gtkmm/liststore.h>
#include <gtkmm/treeview.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/box.h>
using namespace Inkscape::UI::Widget;
};
Glib::RefPtr<Gtk::ListStore> _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