diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-19 15:56:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-19 15:56:12 +0000 |
commit | 6ec8387bea9015c4487f76cebd045a1a6e291bc4 (patch) | |
tree | 45ac70b039158469d8468fbc857eb11d9b359c0f | |
parent | d0293ed2421e2d7d0290c24d89959c84d1060623 (diff) |
unbreak this wizard enough to run it
Change-Id: Ia957080165a060164317a5f7c9a46d065169314a
-rw-r--r-- | wizards/com/sun/star/wizards/web/BackgroundsDialog.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py index 19f377e0a4ce..c6c2fa8567e3 100644 --- a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py +++ b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py @@ -64,12 +64,12 @@ class BackgroundsDialog(ImageListDialog): def other(self): filename = self.sd.callOpenDialog( False, self.settings.cp_DefaultSession.cp_InDirectory) - if filename is not None and filename.length > 0 and filename[0] is not None: + if filename is not None and len(filename) > 0 and filename[0] is not None: self.settings.cp_DefaultSession.cp_InDirectory = \ FileAccess.getParentDir(filename[0]) i = self.add(filename[0]) - il.setSelected(i) - il.display(i) + self.il.setSelected(i) + self.il.display(i) ''' adds the given image to the image list (to the model) @@ -81,24 +81,24 @@ class BackgroundsDialog(ImageListDialog): def add(self, s): #first i check the item does not already exists in the list... i = 0 - while i < il.getListModel().getSize(): - if il.getListModel().getElementAt(i) == s: + while i < self.il.listModel.getSize(): + if self.il.listModel.getElementAt(i) == s: return i - i += 1 - il.getListModel().addElement(s) + i += 1 + self.il.listModel.add1(s) try: configView = Configuration.getConfigurationRoot( self.xMSF, FileAccess.connectURLs( CONFIG_PATH, "BackgroundImages"), True) - i = Configuration.getChildrenNames(configView).length + 1 - o = Configuration.addConfigNode(configView, "" + i) + i = len(Configuration.getChildrenNames(configView)) + 1 + o = Configuration.addConfigNode(configView, "" + str(i)) Configuration.set(s, "Href", o) Configuration.commit(configView) except Exception: traceback.print_exc() - return il.getListModel().getSize() - 1 + return self.il.listModel.getSize() - 1 ''' an ImageList Imagerenderer implemtation. |