summaryrefslogtreecommitdiffstats
path: root/mountconfig/SMBShareSelectDialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'mountconfig/SMBShareSelectDialog.py')
-rw-r--r--mountconfig/SMBShareSelectDialog.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/mountconfig/SMBShareSelectDialog.py b/mountconfig/SMBShareSelectDialog.py
index e97a577..617ee04 100644
--- a/mountconfig/SMBShareSelectDialog.py
+++ b/mountconfig/SMBShareSelectDialog.py
@@ -204,8 +204,8 @@ class SMBShareSelectDialog(KDialogBase):
########################################################################
def slotNewItems(self,items):
for entry in items:
- newitem = SMBShareListViewItem(self.lookupqueue[0], unicode(entry.name()), KURL(entry.url()), self)
- self.url_to_list_item_map[unicode(entry.url().prettyURL())] = newitem
+ newitem = SMBShareListViewItem(self.lookupqueue[0], str(entry.name()), KURL(entry.url()), self)
+ self.url_to_list_item_map[str(entry.url().prettyURL())] = newitem
# Notice how I copied the KURL object and TQString (to a python string)
########################################################################
@@ -225,7 +225,7 @@ class SMBShareSelectDialog(KDialogBase):
########################################################################
def slotDirListRedirection(self,oldUrl,newUrl):
- list_item = self.url_to_list_item_map[unicode(oldUrl.prettyURL())]
+ list_item = self.url_to_list_item_map[str(oldUrl.prettyURL())]
list_item.setURL(KURL(newUrl)) # The copy is important.
# Reselect the selected node. (This will force a refresh).
@@ -317,7 +317,7 @@ class SMBShareSelectDialog(KDialogBase):
self.usernameedit.setEnabled(False)
selectedurl = self.selecteditem.getURL()
- self.reconnectbutton.setEnabled(unicode(selectedurl.user())!="")
+ self.reconnectbutton.setEnabled(str(selectedurl.user())!="")
self.updatinggui = False
@@ -333,11 +333,11 @@ class SMBShareSelectDialog(KDialogBase):
self.passwordedit.setEnabled(True)
self.usernameedit.setEnabled(True)
- username = unicode(self.usernameedit.text())
- password = unicode(self.passwordedit.text())
+ username = str(self.usernameedit.text())
+ password = str(self.passwordedit.text())
selectedurl = self.selecteditem.getURL()
if username!="" and password!="" and \
- ((unicode(selectedurl.user())!=username) or (unicode(selectedurl.pass_())!=password)):
+ ((str(selectedurl.user())!=username) or (str(selectedurl.pass_())!=password)):
self.reconnectbutton.setEnabled(True)
else:
self.reconnectbutton.setEnabled(False)
@@ -404,10 +404,10 @@ class SMBShareListViewItem(TDEListViewItem):
self.setExpandable(True)
if url.hasPath() and url.path(-1)!="/":
- parts = [x for x in unicode(url.path(-1)).split("/") if x!=""]
+ parts = [x for x in str(url.path(-1)).split("/") if x!=""]
self.component = parts[-1].lower()
elif url.hasHost():
- self.component = unicode(url.host()).lower()
+ self.component = str(url.host()).lower()
else:
self.component = None
@@ -502,7 +502,7 @@ class SMBShareListViewItem(TDEListViewItem):
# Another wrinkle is that the treeview contains a level of workgroups while
# a given URL omits the workgroup a jumps directly to the machine name.
def selectURL(self,targeturl):
- path = unicode(targeturl.path(-1))
+ path = str(targeturl.path(-1))
parts = [x for x in path.split("/") if x!=""]
if targeturl.hasHost():
tmp = [targeturl.host()]