From 01c80f1505393988ebafabc9fb1742ca4147f438 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 9 Jun 2012 17:39:34 +0100 Subject: Gtkmm 3 fixes for glyphs dialog (bzr r11478) --- src/ui/dialog/glyphs.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') 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 >(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 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 itemArray = iconView->get_selected_items(); +#else Gtk::IconView::ArrayHandle_TreePaths itemArray = iconView->get_selected_items(); +#endif + if (itemArray.empty()) { label->set_text(" "); } else { -- cgit v1.2.3