wizards/com/sun/star/wizards/web/BackgroundsDialog.py | 20 +++++++++--------- 1 file changed, 10 insertions(+), 10 deletions(-)
New commits: commit 6ec8387bea9015c4487f76cebd045a1a6e291bc4 Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jan 19 15:56:12 2017 +0000 unbreak this wizard enough to run it Change-Id: Ia957080165a060164317a5f7c9a46d065169314a diff --git a/wizards/com/sun/star/wizards/web/BackgroundsDialog.py b/wizards/com/sun/star/wizards/web/BackgroundsDialog.py index 19f377e..c6c2fa8 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.
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits