summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/glyphs.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/ui/dialog/glyphs.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/ui/dialog/glyphs.cpp')
-rw-r--r--src/ui/dialog/glyphs.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp
index 2b9053da9..1ef97b996 100644
--- a/src/ui/dialog/glyphs.cpp
+++ b/src/ui/dialog/glyphs.cpp
@@ -578,9 +578,10 @@ void GlyphsPanel::setTargetDesktop(SPDesktop *desktop)
void GlyphsPanel::insertText()
{
SPItem *textItem = 0;
- for (const GSList *item = targetDesktop->selection->itemList(); item; item = item->next ) {
- if (SP_IS_TEXT(item->data) || SP_IS_FLOWTEXT(item->data)) {
- textItem = SP_ITEM(item->data);
+ SelContainer itemlist=targetDesktop->selection->itemList();
+ for(SelContainer::const_iterator i=itemlist.begin(); itemlist.end() != i; i++) {
+ if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) {
+ textItem = SP_ITEM(*i);
break;
}
}
@@ -687,8 +688,9 @@ void GlyphsPanel::selectionModifiedCB(guint flags)
void GlyphsPanel::calcCanInsert()
{
int items = 0;
- for (const GSList *item = targetDesktop->selection->itemList(); item; item = item->next ) {
- if (SP_IS_TEXT(item->data) || SP_IS_FLOWTEXT(item->data)) {
+ SelContainer itemlist=targetDesktop->selection->itemList();
+ for(SelContainer::const_iterator i=itemlist.begin(); itemlist.end() != i; i++) {
+ if (SP_IS_TEXT(*i) || SP_IS_FLOWTEXT(*i)) {
++items;
}
}