summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2011-05-20 05:01:27 +0000
committerJon A. Cruz <jon@joncruz.org>2011-05-20 05:01:27 +0000
commit9865291b790f185d7ec2271c58e8653c9d4bb295 (patch)
treed2599d2788944bc2e811b204bfb4e6d304571c10 /src/ui
parentExtension that generates an SVGFont from a set of layers with id="GlyphLayer-... (diff)
downloadinkscape-9865291b790f185d7ec2271c58e8653c9d4bb295.tar.gz
inkscape-9865291b790f185d7ec2271c58e8653c9d4bb295.zip
Reinstating version bump.
(bzr r10215)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/glyphs.cpp20
-rw-r--r--src/ui/dialog/glyphs.h2
2 files changed, 0 insertions, 22 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index f3d7ed971..8eef5d89b 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -48,7 +48,6 @@ GlyphsPanel &GlyphsPanel::getInstance()
}
-#if GLIB_CHECK_VERSION(2,14,0)
static std::map<GUnicodeScript, Glib::ustring> & getScriptToName()
{
static bool init = false;
@@ -123,8 +122,6 @@ static std::map<GUnicodeScript, Glib::ustring> & getScriptToName()
mappings[G_UNICODE_SCRIPT_PHOENICIAN] = _("Phoenician");
mappings[G_UNICODE_SCRIPT_PHAGS_PA] = _("Phags-pa");
mappings[G_UNICODE_SCRIPT_NKO] = _("N'Ko");
-
-#if GLIB_CHECK_VERSION(2,14,0)
mappings[G_UNICODE_SCRIPT_KAYAH_LI] = _("Kayah Li");
mappings[G_UNICODE_SCRIPT_LEPCHA] = _("Lepcha");
mappings[G_UNICODE_SCRIPT_REJANG] = _("Rejang");
@@ -136,11 +133,9 @@ static std::map<GUnicodeScript, Glib::ustring> & getScriptToName()
mappings[G_UNICODE_SCRIPT_CARIAN] = _("Carian");
mappings[G_UNICODE_SCRIPT_LYCIAN] = _("Lycian");
mappings[G_UNICODE_SCRIPT_LYDIAN] = _("Lydian");
-#endif // GLIB_CHECK_VERSION(2,14,0)
}
return mappings;
}
-#endif // GLIB_CHECK_VERSION(2,14,0)
typedef std::pair<gunichar, gunichar> Range;
typedef std::pair<Range, Glib::ustring> NamedRange;
@@ -337,9 +332,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
entry(0),
label(0),
insertBtn(0),
-#if GLIB_CHECK_VERSION(2,14,0)
scriptCombo(0),
-#endif // GLIB_CHECK_VERSION(2,14,0)
fsel(0),
targetDesktop(0),
deskTrack(),
@@ -366,7 +359,6 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
// -------------------------------
-#if GLIB_CHECK_VERSION(2,14,0)
{
Gtk::Label *label = new Gtk::Label(_("Script: "));
table->attach( *Gtk::manage(label),
@@ -391,7 +383,6 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
}
row++;
-#endif // GLIB_CHECK_VERSION(2,14,0)
// -------------------------------
@@ -464,10 +455,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) :
insertBtn = new Gtk::Button(_("Append"));
conn = insertBtn->signal_clicked().connect(sigc::mem_fun(*this, &GlyphsPanel::insertText));
instanceConns.push_back(conn);
-#if GTK_CHECK_VERSION(2,18,0)
- //gtkmm 2.18
insertBtn->set_can_default();
-#endif
insertBtn->set_sensitive(false);
box->pack_end(*Gtk::manage(insertBtn), Gtk::PACK_SHRINK);
@@ -607,13 +595,11 @@ void GlyphsPanel::glyphSelectionChanged()
Glib::ustring scriptName;
-#if GLIB_CHECK_VERSION(2,14,0)
GUnicodeScript script = g_unichar_get_script(ch);
std::map<GUnicodeScript, Glib::ustring> mappings = getScriptToName();
if (mappings.find(script) != mappings.end()) {
scriptName = mappings[script];
}
-#endif
gchar * tmp = g_strdup_printf("U+%04X %s", ch, scriptName.c_str());
label->set_text(tmp);
}
@@ -680,7 +666,6 @@ void GlyphsPanel::rebuild()
if (font) {
//double sp_font_selector_get_size (SPFontSelector *fsel);
-#if GLIB_CHECK_VERSION(2,14,0)
GUnicodeScript script = G_UNICODE_SCRIPT_INVALID_CODE;
Glib::ustring scriptName = scriptCombo->get_active_text();
std::map<GUnicodeScript, Glib::ustring> items = getScriptToName();
@@ -690,7 +675,6 @@ void GlyphsPanel::rebuild()
break;
}
}
-#endif // GLIB_CHECK_VERSION(2,14,0)
// Disconnect the model while we update it. Simple work-around for 5x+ performance boost.
Glib::RefPtr<Gtk::ListStore> tmp = Gtk::ListStore::create(*getColumns());
@@ -707,13 +691,9 @@ void GlyphsPanel::rebuild()
for (gunichar ch = lower; ch <= upper; ch++) {
int glyphId = font->MapUnicodeChar(ch);
if (glyphId > 0) {
-#if GLIB_CHECK_VERSION(2,14,0)
if ((script == G_UNICODE_SCRIPT_INVALID_CODE) || (script == g_unichar_get_script(ch))) {
present.push_back(ch);
}
-#else
- present.push_back(ch);
-#endif
}
}
diff --git a/src/ui/dialog/glyphs.h b/src/ui/dialog/glyphs.h
index d6c731dda..1440a693f 100644
--- a/src/ui/dialog/glyphs.h
+++ b/src/ui/dialog/glyphs.h
@@ -77,9 +77,7 @@ private:
Gtk::Entry *entry;
Gtk::Label *label;
Gtk::Button *insertBtn;
-#if GLIB_CHECK_VERSION(2,14,0)
Gtk::ComboBoxText *scriptCombo;
-#endif //GLIB_CHECK_VERSION(2,14,0)
Gtk::ComboBoxText *rangeCombo;
SPFontSelector *fsel;
SPDesktop *targetDesktop;