]> granicus.if.org Git - python/commitdiff
Rename parameters to match the documentation (which
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 1 May 2006 16:14:16 +0000 (16:14 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 1 May 2006 16:14:16 +0000 (16:14 +0000)
in turn matches Microsoft's documentation).
Drop unused parameter in CAB.append.

Lib/distutils/command/bdist_msi.py
Lib/msilib/__init__.py

index f05d66cb5d56c122df32d8aa25cc997cfbb37dd5..75db8773f1e36f990d7fdc6098812c4eb9207810 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2005 Martin v. Löwis
+# Copyright (C) 2005, 2006 Martin v. Löwis
 # Licensed to PSF under a Contributor Agreement.
 # The bdist_wininst command proper
 # based on bdist_wininst
@@ -16,7 +16,7 @@ from distutils.version import StrictVersion
 from distutils.errors import DistutilsOptionError
 from distutils import log
 import msilib
-from msilib import schema, sequence, uisample
+from msilib import schema, sequence, text
 from msilib import Directory, Feature, Dialog, add_data
 
 class PyDialog(Dialog):
@@ -374,8 +374,8 @@ class bdist_msi (Command):
                   ("MaintenanceTypeDlg", "Installed AND NOT RESUME AND NOT Preselected", 1250),
                   ("ProgressDlg", None, 1280)])
 
-        add_data(db, 'ActionText', uisample.ActionText)
-        add_data(db, 'UIText', uisample.UIText)
+        add_data(db, 'ActionText', text.ActionText)
+        add_data(db, 'UIText', text.UIText)
         #####################################################################
         # Standard dialogs: FatalError, UserExit, ExitDialog
         fatal=PyDialog(db, "FatalError", x, y, w, h, modal, title,
@@ -502,9 +502,9 @@ class bdist_msi (Command):
 
         seldlg.back("< Back", None, active=0)
         c = seldlg.next("Next >", "Cancel")
-        c.event("SetTargetPath", "TARGETDIR", order=1)
-        c.event("SpawnWaitDialog", "WaitForCostingDlg", order=2)
-        c.event("EndDialog", "Return", order=3)
+        c.event("SetTargetPath", "TARGETDIR", ordering=1)
+        c.event("SpawnWaitDialog", "WaitForCostingDlg", ordering=2)
+        c.event("EndDialog", "Return", ordering=3)
 
         c = seldlg.cancel("Cancel", "DirectoryCombo")
         c.event("SpawnDialog", "CancelDlg")
@@ -561,7 +561,7 @@ class bdist_msi (Command):
 
         c = whichusers.next("Next >", "Cancel")
         c.event("[ALLUSERS]", "1", 'WhichUsers="ALL"', 1)
-        c.event("EndDialog", "Return", order = 2)
+        c.event("EndDialog", "Return", ordering = 2)
 
         c = whichusers.cancel("Cancel", "AdminInstall")
         c.event("SpawnDialog", "CancelDlg")
index d84725966f83d061abe0953d83221c25b3d5c658..0881409e1d80b91b203bd9de4b0ff7dd948a7ffa 100644 (file)
@@ -196,11 +196,9 @@ class CAB:
         self.filenames.add(logical)
         return logical
 
-    def append(self, full, file, logical = None):
+    def append(self, full, logical):
         if os.path.isdir(full):
             return
-        if not logical:
-            logical = self.gen_id(dir, file)
         self.index += 1
         self.files.append((full, logical))
         return self.index, logical
@@ -330,7 +328,7 @@ class Directory:
             logical = self.keyfiles[file]
         else:
             logical = None
-        sequence, logical = self.cab.append(absolute, file, logical)
+        sequence, logical = self.cab.append(absolute, logical)
         assert logical not in self.ids
         self.ids.add(logical)
         short = self.make_short(file)
@@ -400,13 +398,14 @@ class Control:
         self.dlg = dlg
         self.name = name
 
-    def event(self, ev, arg, cond = "1", order = None):
+    def event(self, event, argument, condition = "1", ordering = None):
         add_data(self.dlg.db, "ControlEvent",
-                 [(self.dlg.name, self.name, ev, arg, cond, order)])
+                 [(self.dlg.name, self.name, event, argument,
+                   condition, ordering)])
 
-    def mapping(self, ev, attr):
+    def mapping(self, mapping, attribute):
         add_data(self.dlg.db, "EventMapping",
-                 [(self.dlg.name, self.name, ev, attr)])
+                 [(self.dlg.name, self.name, event, attribute)])
 
     def condition(self, action, condition):
         add_data(self.dlg.db, "ControlCondition",