summaryrefslogtreecommitdiffstats
path: root/src/widgets/rect-toolbar.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <mc@localhost.localdomain>2015-02-17 02:00:37 +0000
committerMarc Jeanmougin <mc@localhost.localdomain>2015-02-17 02:00:37 +0000
commita7f2b2ba3f13ceb60376802f4a31e104153839e8 (patch)
tree6db393e9e5a0a9ab7916a0e7ed29d875efa39ea1 /src/widgets/rect-toolbar.cpp
parentdevice-manager: Get rid of GLists (diff)
downloadinkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.tar.gz
inkscape-a7f2b2ba3f13ceb60376802f4a31e104153839e8.zip
At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems"
So, i tried that. And I will continue tomorrow, and the days after, on and on. (bzr r13922.1.1)
Diffstat (limited to 'src/widgets/rect-toolbar.cpp')
-rw-r--r--src/widgets/rect-toolbar.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp
index 016aa4987..1f19867ee 100644
--- a/src/widgets/rect-toolbar.cpp
+++ b/src/widgets/rect-toolbar.cpp
@@ -106,12 +106,13 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *
bool modmade = false;
Inkscape::Selection *selection = desktop->getSelection();
- for (GSList const *items = selection->itemList(); items != NULL; items = items->next) {
- if (SP_IS_RECT(items->data)) {
+ SelContainer itemlist=selection->itemList();
+ for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){
+ if (SP_IS_RECT(*i)) {
if (gtk_adjustment_get_value(adj) != 0) {
- (SP_RECT(items->data)->*setter)(Quantity::convert(gtk_adjustment_get_value(adj), unit, desktop->getNamedView()->svg_units));
+ (SP_RECT(*i)->*setter)(Quantity::convert(gtk_adjustment_get_value(adj), unit, desktop->getNamedView()->svg_units));
} else {
- SP_OBJECT(items->data)->getRepr()->setAttribute(value_name, NULL);
+ SP_OBJECT(*i)->getRepr()->setAttribute(value_name, NULL);
}
modmade = true;
}
@@ -243,12 +244,11 @@ static void sp_rect_toolbox_selection_changed(Inkscape::Selection *selection, GO
}
purge_repr_listener( tbl, tbl );
- for (GSList const *items = selection->itemList();
- items != NULL;
- items = items->next) {
- if (SP_IS_RECT(reinterpret_cast<SPItem *>(items->data))) {
+ SelContainer itemlist=selection->itemList();
+ for(SelContainer::const_iterator i=itemlist.begin();i!=itemlist.end();i++){
+ if (SP_IS_RECT(reinterpret_cast<SPItem *>(*i))) {
n_selected++;
- item = reinterpret_cast<SPItem *>(items->data);
+ item = reinterpret_cast<SPItem *>(*i);
repr = item->getRepr();
}
}