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