|
|
|
@ -24,7 +24,6 @@ from tdeui import *
|
|
|
|
|
from tdecore import *
|
|
|
|
|
from tdefile import *
|
|
|
|
|
from tdeio import *
|
|
|
|
|
from types import StringType,UnicodeType
|
|
|
|
|
import pwd
|
|
|
|
|
import grp
|
|
|
|
|
import math
|
|
|
|
@ -123,7 +122,7 @@ class UserComboBox(KComboBox):
|
|
|
|
|
uid = int(user[2])
|
|
|
|
|
username = user[4]
|
|
|
|
|
tmplist.append( (int(uid),"%s (%s)" % (username,uid)) )
|
|
|
|
|
tmplist.sort(lambda a,b: cmp(a[1],b[1]))
|
|
|
|
|
tmplist.sort(key=lambda a: a[1])
|
|
|
|
|
self.userlist = []
|
|
|
|
|
for user in tmplist:
|
|
|
|
|
self.insertItem(user[1])
|
|
|
|
@ -152,7 +151,7 @@ class GroupComboBox(KComboBox):
|
|
|
|
|
gid = group[2]
|
|
|
|
|
groupname = group[0]
|
|
|
|
|
tmplist.append( (int(gid),"%s (%s)" % (groupname,gid)) )
|
|
|
|
|
tmplist.sort(lambda a,b: cmp(a[1],b[1]))
|
|
|
|
|
tmplist.sort(key=lambda a: a[1])
|
|
|
|
|
self.grouplist = []
|
|
|
|
|
for group in tmplist:
|
|
|
|
|
self.insertItem(group[1])
|
|
|
|
@ -195,7 +194,7 @@ class MountEntryExt(object):
|
|
|
|
|
self.managed = False
|
|
|
|
|
self.device_string = ""
|
|
|
|
|
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
parts = base.split()
|
|
|
|
|
|
|
|
|
|
device_ref = MountEntry.decodeMountEntryString(parts[0])
|
|
|
|
@ -495,7 +494,7 @@ class MountEntryExtCommonUnix(MountEntryExt):
|
|
|
|
|
self.allowsuid = base.allowsuid
|
|
|
|
|
self.allowusermount = base.allowusermount
|
|
|
|
|
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
options = self.extraoptions.split(",")
|
|
|
|
|
|
|
|
|
|
self.atime = True
|
|
|
|
@ -652,7 +651,7 @@ class MountEntryExtAlien(MountEntryExt):
|
|
|
|
|
self.auto = base.auto
|
|
|
|
|
self.allowusermount = base.allowusermount
|
|
|
|
|
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
self.uid = 0
|
|
|
|
|
self.gid = 0
|
|
|
|
|
options = self.extraoptions.split(",")
|
|
|
|
@ -753,7 +752,7 @@ class MountEntryExtVFAT(MountEntryExtAlien):
|
|
|
|
|
|
|
|
|
|
if isinstance(base,MountEntryExtVFAT):
|
|
|
|
|
self.suppresspermissionerrors = base.suppresspermissionerrors
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
options = self.extraoptions.split(",")
|
|
|
|
|
self.suppresspermissionerrors = "quiet" in options
|
|
|
|
|
try:
|
|
|
|
@ -798,7 +797,7 @@ class MountEntryExtSMB(MountEntryExtAlien):
|
|
|
|
|
self.password = base.password
|
|
|
|
|
self.credentialsfile = base.credentialsfile
|
|
|
|
|
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
self.username = None
|
|
|
|
|
self.password = ""
|
|
|
|
|
self.credentialsfile = None
|
|
|
|
@ -932,7 +931,7 @@ class MountEntryExtSwap(MountEntryExt):
|
|
|
|
|
def __init__(self,base=None):
|
|
|
|
|
super(MountEntryExtSwap,self).__init__(base)
|
|
|
|
|
|
|
|
|
|
if isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
if isinstance(base, str):
|
|
|
|
|
options = self.extraoptions.split(",")
|
|
|
|
|
try:
|
|
|
|
|
options.remove('defaults')
|
|
|
|
@ -1072,7 +1071,7 @@ class MountEntry(object):
|
|
|
|
|
self.extensionObjects = {}
|
|
|
|
|
if base==None:
|
|
|
|
|
self.mounttype = 'auto'
|
|
|
|
|
elif isinstance(base,StringType) or isinstance(base,UnicodeType):
|
|
|
|
|
elif isinstance(base, str):
|
|
|
|
|
parts = base.split()
|
|
|
|
|
self.mounttype = parts[2]
|
|
|
|
|
# 'udf,iso9660' seems default for some devices in fstab,
|
|
|
|
|