diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-02-11 20:54:53 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-02-11 20:54:53 +0000 |
| commit | 88751013c436beeb04e6f3d51cc6a8c3efdf55f3 (patch) | |
| tree | 57e714523079597e34d37bfacf83f27fcdd01447 /src/ui/widget/unit-menu.cpp | |
| parent | Get rid of deprecated gtk_marshal_* and some old GtkComboBox API (diff) | |
| download | inkscape-88751013c436beeb04e6f3d51cc6a8c3efdf55f3.tar.gz inkscape-88751013c436beeb04e6f3d51cc6a8c3efdf55f3.zip | |
Replace old ComboText with Gtk::ComboBoxText
(bzr r10960)
Diffstat (limited to 'src/ui/widget/unit-menu.cpp')
| -rw-r--r-- | src/ui/widget/unit-menu.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 085783481..86e8c9e58 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -34,7 +34,11 @@ bool UnitMenu::setUnitType(UnitType unit_type) UnitTable::UnitMap::iterator iter = m.begin(); while(iter != m.end()) { Glib::ustring text = (*iter).first; +#if WITH_GTKMM_2_24 + append(text); +#else append_text(text); +#endif ++iter; } _type = unit_type; @@ -45,7 +49,11 @@ bool UnitMenu::setUnitType(UnitType unit_type) bool UnitMenu::resetUnitType(UnitType unit_type) { - clear_text(); +#if WITH_GTKMM_2_24 + remove_all(); +#else + clear_items(); +#endif return setUnitType(unit_type); } @@ -53,7 +61,11 @@ bool UnitMenu::resetUnitType(UnitType unit_type) void UnitMenu::addUnit(Unit const& u) { _unit_table.addUnit(u, false); +#if WITH_GTKMM_2_24 + append(u.abbr); +#else append_text(u.abbr); +#endif } Unit UnitMenu::getUnit() const |
