aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Harvey <chris@basementcode.com>2010-06-14 19:15:54 -0400
committerChristopher Harvey <chris@basementcode.com>2010-06-14 19:15:54 -0400
commit185fdaf910fb816b958bdce780518dfdf40029b4 (patch)
tree350759e9f66709cab9ee51c7b2b0fa4b33c755ad
parentfixed bugs in ventoo exectuable. (diff)
downloadventoo-185fdaf910fb816b958bdce780518dfdf40029b4.tar.gz
ventoo-185fdaf910fb816b958bdce780518dfdf40029b4.tar.bz2
ventoo-185fdaf910fb816b958bdce780518dfdf40029b4.zip
Fixed adding optional entries when duplicate nodes don't start at 1
-rw-r--r--src/ventoo/main.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ventoo/main.py b/src/ventoo/main.py
index af22595..e3ee2c8 100644
--- a/src/ventoo/main.py
+++ b/src/ventoo/main.py
@@ -295,12 +295,14 @@ class MainWindow(gtk.Window):
numNeeded = augeas_utils.matchDiff(thisMult, have)
#add the required ones.
for i in range(numNeeded):
- created = model.append(modelPathIter, [True, osp.join(augeasFileRoot, str(have+i+1)), '-------'])
+ created = model.append(modelPathIter, [True, osp.join(augeasFileRoot, str(maxIndex+i+1)), '-------'])
self.__buildEditModel(model, match, created, xmlRoot)
have += 1
+ maxIndex += 1
needOption = not augeas_utils.matchExact(thisMult, have)
if needOption:
- created = model.append(modelPathIter, [False, str(have+1), '-------'])
+ created = model.append(modelPathIter, [False, str(maxIndex+1), '-------'])
+ maxIndex += 1
else:
listedNodes = [] #a list of nodes that we already found and know about.
for child in xChildren: