diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-01 15:49:26 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2017-10-01 15:49:26 +0000 |
| commit | e0957537cd0938313803c290a2f3922a3889e6f1 (patch) | |
| tree | 7f158d00a7655ee91ac094f676f6b3bd624a78b7 /src/ui/widget/selected-style.cpp | |
| parent | Merge branch 'master' of gitlab.com:inkscape/inkscape (diff) | |
| download | inkscape-e0957537cd0938313803c290a2f3922a3889e6f1.tar.gz inkscape-e0957537cd0938313803c290a2f3922a3889e6f1.zip | |
Removed all GSList occurences in .h files
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
| -rw-r--r-- | src/ui/widget/selected-style.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 68acddfcc..5d911e9d2 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -139,7 +139,6 @@ SelectedStyle::SelectedStyle(bool /*layout*/) _opacity_blocked (false), - _unit_mis(NULL), _sw_unit(NULL) { set_name("SelectedStyle"); @@ -336,7 +335,7 @@ SelectedStyle::SelectedStyle(bool /*layout*/) while(iter != m.end()) { Gtk::RadioMenuItem *mi = Gtk::manage(new Gtk::RadioMenuItem(_sw_group)); mi->add(*(new Gtk::Label(iter->first, Gtk::ALIGN_START))); - _unit_mis = g_slist_append(_unit_mis, mi); + _unit_mis.push_back(mi); Inkscape::Util::Unit const *u = unit_table.getUnit(iter->first); mi->signal_activate().connect(sigc::bind<Inkscape::Util::Unit const *>(sigc::mem_fun(*this, &SelectedStyle::on_popup_units), u)); _popup_sw.attach(*mi, 0,1, row, row+1); @@ -449,6 +448,7 @@ SelectedStyle::~SelectedStyle() delete selection_modified_connection; subselection_changed_connection->disconnect(); delete subselection_changed_connection; + _unit_mis.clear(); for (int i = SS_FILL; i <= SS_STROKE; i++) { delete _color_preview[i]; @@ -488,9 +488,7 @@ SelectedStyle::setDesktop(SPDesktop *desktop) _sw_unit = desktop->getNamedView()->display_units; // Set the doc default unit active in the units list - gint length = g_slist_length(_unit_mis); - for (int i = 0; i < length; i++) { - Gtk::RadioMenuItem *mi = (Gtk::RadioMenuItem *) g_slist_nth_data(_unit_mis, i); + for ( auto mi:_unit_mis ) { if (mi && mi->get_label() == _sw_unit->abbr) { mi->set_active(); break; |
