summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/glyphs.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-06-09 16:39:34 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-06-09 16:39:34 +0000
commit01c80f1505393988ebafabc9fb1742ca4147f438 (patch)
tree5cc36d69c14f64b54af81c274b80ef79048bf6ff /src/ui/dialog/glyphs.cpp
parentUse Cairo::Region in sp-canvas (diff)
downloadinkscape-01c80f1505393988ebafabc9fb1742ca4147f438.tar.gz
inkscape-01c80f1505393988ebafabc9fb1742ca4147f438.zip
Gtkmm 3 fixes for glyphs dialog
(bzr r11478)
Diffstat (limited to 'src/ui/dialog/glyphs.cpp')
-rw-r--r--src/ui/dialog/glyphs.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index b2ded6495..e220fe92c 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -426,7 +426,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
GlyphColumns *columns = getColumns();
- iconView = new Gtk::IconView(store);
+ iconView = new Gtk::IconView(static_cast<Glib::RefPtr<Gtk::TreeModel> >(store));
iconView->set_text_column(columns->name);
//iconView->set_columns(16);
@@ -553,7 +553,13 @@ void GlyphsPanel::insertText()
if (entry->get_text_length() > 0) {
glyphs = entry->get_text();
} else {
+
+#if WITH_GTKMM_3_0
+ std::vector<Gtk::TreePath> itemArray = iconView->get_selected_items();
+#else
Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items();
+#endif
+
if (!itemArray.empty()) {
Gtk::TreeModel::Path const & path = *itemArray.begin();
Gtk::ListStore::iterator row = store->get_iter(path);
@@ -597,7 +603,12 @@ void GlyphsPanel::glyphActivated(Gtk::TreeModel::Path const & path)
void GlyphsPanel::glyphSelectionChanged()
{
+#if WITH_GTKMM_3_0
+ std::vector<Gtk::TreePath> itemArray = iconView->get_selected_items();
+#else
Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items();
+#endif
+
if (itemArray.empty()) {
label->set_text(" ");
} else {