Rename a number of classes to enhance compatibility with KDE4

pull/2/head
Timothy Pearson 12 years ago
parent 671df16087
commit 2a081fc8bf

@ -61,18 +61,18 @@ class GfxCardDialog(KDialogBase):
self.setMainWidget(topbox) self.setMainWidget(topbox)
label = QLabel(topbox) label = QLabel(topbox)
label.setText(i18n("Select Graphics Card:")) label.setText(i18n("Select Graphics Card:"))
self.listview = KListView(topbox) self.listview = TDEListView(topbox)
self.listview.addColumn("") self.listview.addColumn("")
self.listview.header().hide() self.listview.header().hide()
self.listview.setRootIsDecorated(True) self.listview.setRootIsDecorated(True)
self.connect(self.listview,SIGNAL("selectionChanged(QListViewItem *)"),self.slotListClicked) self.connect(self.listview,SIGNAL("selectionChanged(QListViewItem *)"),self.slotListClicked)
topbox.setStretchFactor(self.listview,1) topbox.setStretchFactor(self.listview,1)
self.driver = KListViewItem(self.listview) self.driver = TDEListViewItem(self.listview)
self.driver.setText(0,i18n("Drivers")) self.driver.setText(0,i18n("Drivers"))
self.driver.setSelectable(False) self.driver.setSelectable(False)
self.manufacturer = KListViewItem(self.listview) self.manufacturer = TDEListViewItem(self.listview)
self.manufacturer.setText(0,i18n("Manufacturers")) self.manufacturer.setText(0,i18n("Manufacturers"))
self.manufacturer.setSelectable(False) self.manufacturer.setSelectable(False)
@ -128,11 +128,11 @@ class GfxCardDialog(KDialogBase):
keys.sort() keys.sort()
for key in keys: for key in keys:
cardkeys = self.gfxcarddb.vendordb[key].keys() cardkeys = self.gfxcarddb.vendordb[key].keys()
vendoritem = KListViewItem(self.manufacturer) vendoritem = TDEListViewItem(self.manufacturer)
vendoritem.setText(0,key) vendoritem.setText(0,key)
vendoritem.setSelectable(False) vendoritem.setSelectable(False)
for cardkey in cardkeys: for cardkey in cardkeys:
item = KListViewItem(vendoritem) item = TDEListViewItem(vendoritem)
item.setText(0,cardkey) item.setText(0,cardkey)
self.card2listitem[self.gfxcarddb.vendordb[key][cardkey]] = item self.card2listitem[self.gfxcarddb.vendordb[key][cardkey]] = item
@ -140,7 +140,7 @@ class GfxCardDialog(KDialogBase):
drivers = gfxcarddb.driverdb.keys() drivers = gfxcarddb.driverdb.keys()
drivers.sort() drivers.sort()
for driver in drivers: for driver in drivers:
driveritem = KListViewItem(self.driver) driveritem = TDEListViewItem(self.driver)
driveritem.setText(0,driver) driveritem.setText(0,driver)
self.card2listitem[gfxcarddb.driverdb[driver]] = driveritem self.card2listitem[gfxcarddb.driverdb[driver]] = driveritem
@ -233,17 +233,17 @@ class MonitorDialog(KDialogBase):
self.setMainWidget(topbox) self.setMainWidget(topbox)
label = QLabel(topbox) label = QLabel(topbox)
label.setText(i18n("Select Monitor:")) label.setText(i18n("Select Monitor:"))
self.listview = KListView(topbox) self.listview = TDEListView(topbox)
self.listview.addColumn("") self.listview.addColumn("")
self.listview.header().hide() self.listview.header().hide()
self.listview.setRootIsDecorated(True) self.listview.setRootIsDecorated(True)
self.connect(self.listview,SIGNAL("selectionChanged(QListViewItem *)"),self.slotListClicked) self.connect(self.listview,SIGNAL("selectionChanged(QListViewItem *)"),self.slotListClicked)
self.generic = KListViewItem(self.listview) self.generic = TDEListViewItem(self.listview)
self.generic.setText(0,i18n("Generic")) self.generic.setText(0,i18n("Generic"))
self.generic.setSelectable(False) self.generic.setSelectable(False)
self.manufacturer = KListViewItem(self.listview) self.manufacturer = TDEListViewItem(self.listview)
self.manufacturer.setText(0,i18n("Manufacturers")) self.manufacturer.setText(0,i18n("Manufacturers"))
self.manufacturer.setSelectable(False) self.manufacturer.setSelectable(False)
@ -291,25 +291,25 @@ class MonitorDialog(KDialogBase):
vendors.sort() vendors.sort()
for vendor in vendors: for vendor in vendors:
monitorkeys = self.monitordb.vendordb[vendor].keys() monitorkeys = self.monitordb.vendordb[vendor].keys()
vendoritem = KListViewItem(self.manufacturer) vendoritem = TDEListViewItem(self.manufacturer)
vendoritem.setText(0,vendor) vendoritem.setText(0,vendor)
vendoritem.setSelectable(False) vendoritem.setSelectable(False)
for monitorkey in monitorkeys: for monitorkey in monitorkeys:
item = KListViewItem(vendoritem) item = TDEListViewItem(vendoritem)
item.setText(0,monitorkey) item.setText(0,monitorkey)
self.monitor2listitem[self.monitordb.vendordb[vendor][monitorkey]] = item self.monitor2listitem[self.monitordb.vendordb[vendor][monitorkey]] = item
generics = monitordb.genericdb.keys() generics = monitordb.genericdb.keys()
generics.sort() generics.sort()
for generic in generics: for generic in generics:
genericitem = KListViewItem(self.generic) genericitem = TDEListViewItem(self.generic)
genericitem.setText(0,generic) genericitem.setText(0,generic)
self.monitor2listitem[monitordb.genericdb[generic]] = genericitem self.monitor2listitem[monitordb.genericdb[generic]] = genericitem
customs = monitordb.getCustomMonitors().keys() customs = monitordb.getCustomMonitors().keys()
customs.sort() customs.sort()
for custom in customs: for custom in customs:
customitem = KListViewItem(self.listview) customitem = TDEListViewItem(self.listview)
customitem.setText(0,custom) customitem.setText(0,custom)
self.monitor2listitem[monitordb.getCustomMonitors()[custom]] = customitem self.monitor2listitem[monitordb.getCustomMonitors()[custom]] = customitem

@ -45,20 +45,20 @@ cat2 = ["savedefault","makeactive","chainloader"]
cat3 = ["kernel"] cat3 = ["kernel"]
class GreyListViewItem(KListViewItem): class GreyListViewItem(TDEListViewItem):
def paintCell(self, p, cg, column, width, align ): def paintCell(self, p, cg, column, width, align ):
cgGrey = cg cgGrey = cg
cgGrey.setColor(QColorGroup.Text,QColor("grey")) cgGrey.setColor(QColorGroup.Text,QColor("grey"))
KListViewItem.paintCell(self, p, cgGrey, column, width, align) TDEListViewItem.paintCell(self, p, cgGrey, column, width, align)
cg.restore() cg.restore()
class BoldListViewItem(KListViewItem): class BoldListViewItem(TDEListViewItem):
def paintCell(self, p, cg, column, width, align ): def paintCell(self, p, cg, column, width, align ):
p.save() p.save()
f = p.font() f = p.font()
f.setBold(True) f.setBold(True)
KListViewItem.paintCell(self, p, cg, column, width, align) TDEListViewItem.paintCell(self, p, cg, column, width, align)
p.restore() p.restore()
@ -88,7 +88,7 @@ class GrubConfigAppClass(programbase):
# -- Operating Systems List & MakeDefault Button -- # -- Operating Systems List & MakeDefault Button --
horizontalbox = QHBox(vbox) horizontalbox = QHBox(vbox)
self.itemslistview = KListView(horizontalbox) self.itemslistview = TDEListView(horizontalbox)
self.itemslistview.addColumn("") self.itemslistview.addColumn("")
self.itemslistview.setSorting(-1) self.itemslistview.setSorting(-1)
self.itemslistview.header().hide() self.itemslistview.header().hide()
@ -187,7 +187,7 @@ class GrubConfigAppClass(programbase):
# -- Operating Systems List -- # -- Operating Systems List --
horizontalbox = QHBox(vb) horizontalbox = QHBox(vb)
self.oslistview = KListView(horizontalbox) self.oslistview = TDEListView(horizontalbox)
self.oslistview.addColumn("") self.oslistview.addColumn("")
self.oslistview.addColumn("") self.oslistview.addColumn("")
self.oslistview.setSorting(-1) self.oslistview.setSorting(-1)
@ -288,9 +288,9 @@ class GrubConfigAppClass(programbase):
if self.itemslist.index(item) == int(self.globalvars['default'][0]): if self.itemslist.index(item) == int(self.globalvars['default'][0]):
self.oslistviewitems.append(BoldListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0])) self.oslistviewitems.append(BoldListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0]))
else: else:
self.oslistviewitems.append(KListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0])) self.oslistviewitems.append(TDEListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0]))
except ValueError: except ValueError:
self.oslistviewitems.append(KListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0])) self.oslistviewitems.append(TDEListViewItem(self.oslistview,self.oslistview.lastItem(),item['title'][0]))
# if it has a root option (other than 1 which means only root by itself), it is an OS # if it has a root option (other than 1 which means only root by itself), it is an OS
else: else:
self.itemslistview.clear() self.itemslistview.clear()
@ -301,9 +301,9 @@ class GrubConfigAppClass(programbase):
print "bam!" print "bam!"
self.itemslistviewitems.append(BoldListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0])) self.itemslistviewitems.append(BoldListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0]))
else: else:
self.itemslistviewitems.append(KListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0])) self.itemslistviewitems.append(TDEListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0]))
except ValueError: except ValueError:
self.itemslistviewitems.append(KListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0])) self.itemslistviewitems.append(TDEListViewItem(self.itemslistview,self.itemslistview.lastItem(),item['title'][0]))
####################################################################### #######################################################################
def slotUser1(self): def slotUser1(self):
@ -394,7 +394,7 @@ class GrubConfigAppClass(programbase):
pass pass
else: else:
container = self.itemslistviewitems[defaultn] container = self.itemslistviewitems[defaultn]
self.itemslistviewitems[defaultn] = KListViewItem(self.itemslistview,container,self.itemslist[defaultn]['title'][0]) self.itemslistviewitems[defaultn] = TDEListViewItem(self.itemslistview,container,self.itemslist[defaultn]['title'][0])
self.itemslistview.takeItem(container) self.itemslistview.takeItem(container)

@ -50,7 +50,7 @@ class SMBShareSelectDialog(KDialogBase):
hbox2 = QHBox(vbox) hbox2 = QHBox(vbox)
# The main treeview where the action happens. # The main treeview where the action happens.
self.treeview = KListView(hbox2) self.treeview = TDEListView(hbox2)
self.treeview.addColumn("(hidden)") self.treeview.addColumn("(hidden)")
self.treeview.header().hide() self.treeview.header().hide()
self.treeview.setRootIsDecorated(True) self.treeview.setRootIsDecorated(True)
@ -168,7 +168,7 @@ class SMBShareSelectDialog(KDialogBase):
######################################################################## ########################################################################
def setOpen(self,item,open): def setOpen(self,item,open):
if item.isResolved(): if item.isResolved():
KListView.setOpen(self.treeview,item,open) TDEListView.setOpen(self.treeview,item,open)
else: else:
item.startResolve(True) item.startResolve(True)
@ -379,7 +379,7 @@ class SMBShareSelectDialog(KDialogBase):
self.reconnectbutton.setEnabled(False) self.reconnectbutton.setEnabled(False)
############################################################################ ############################################################################
class SMBShareListViewItem(KListViewItem): class SMBShareListViewItem(TDEListViewItem):
# Return codes for selectURL() # Return codes for selectURL()
OPEN_SUCCESS = 1 OPEN_SUCCESS = 1
OPEN_SUCCESS_INVALID = 2 OPEN_SUCCESS_INVALID = 2
@ -394,7 +394,7 @@ class SMBShareListViewItem(KListViewItem):
######################################################################## ########################################################################
def __init__(self,parentitem,name,url,smbdialog): def __init__(self,parentitem,name,url,smbdialog):
KListViewItem.__init__(self,parentitem,name) TDEListViewItem.__init__(self,parentitem,name)
if not isinstance(parentitem,SMBShareListViewItem): if not isinstance(parentitem,SMBShareListViewItem):
self._setIcon(0) self._setIcon(0)
self.setSelectable(False) self.setSelectable(False)

@ -2724,7 +2724,7 @@ class MountEntryAdvancedPlainDialog(KDialogBase):
return (unicode(self.optionslineedit.text()), self.fsfreqspinbox.value(), self.fspassnospinbox.value()) return (unicode(self.optionslineedit.text()), self.fsfreqspinbox.value(), self.fspassnospinbox.value())
############################################################################ ############################################################################
class MountListViewItem(KListViewItem): class MountListViewItem(TDEListViewItem):
######################################################################## ########################################################################
def __init__(self,parentitem,mountentry,haldevice=None): def __init__(self,parentitem,mountentry,haldevice=None):
self.haldevice = haldevice self.haldevice = haldevice
@ -2732,7 +2732,7 @@ class MountListViewItem(KListViewItem):
if self.mountentry is None: if self.mountentry is None:
# There is no mount entry right now. This acts as a place holder # There is no mount entry right now. This acts as a place holder
# for now. # for now.
KListViewItem.__init__(self,parentitem,self.haldevice.getName(),"","",self.haldevice.getDev(),"") TDEListViewItem.__init__(self,parentitem,self.haldevice.getName(),"","",self.haldevice.getDev(),"")
else: else:
if mountentry.isEnabled(): if mountentry.isEnabled():
enabled = i18n("Enabled") enabled = i18n("Enabled")
@ -2742,7 +2742,7 @@ class MountListViewItem(KListViewItem):
name = self.haldevice.getName() name = self.haldevice.getName()
else: else:
name = self.mountentry.getName() name = self.mountentry.getName()
KListViewItem.__init__(self, parentitem, \ TDEListViewItem.__init__(self, parentitem, \
name, name,
self.mountentry.getMountPoint(), \ self.mountentry.getMountPoint(), \
self.mountentry.mounttype, \ self.mountentry.mounttype, \
@ -2823,11 +2823,11 @@ class MountListViewItem(KListViewItem):
self.setPixmap(0,UserIcon(self.mountentry.getIconName())) self.setPixmap(0,UserIcon(self.mountentry.getIconName()))
############################################################################ ############################################################################
class MountGroupListViewItem(KListViewItem): class MountGroupListViewItem(TDEListViewItem):
######################################################################## ########################################################################
def __init__(self,parentitem,haldevice): def __init__(self,parentitem,haldevice):
self.haldevice = haldevice self.haldevice = haldevice
KListViewItem.__init__(self,parentitem,self.haldevice.getName(),"","","","") TDEListViewItem.__init__(self,parentitem,self.haldevice.getName(),"","","","")
if self.haldevice is not None: if self.haldevice is not None:
iconname = self.haldevice.iconname iconname = self.haldevice.iconname
@ -2896,7 +2896,7 @@ class MountConfigApp(programbase):
label = QLabel(i18n("Available Disks and Filesystems:"),hb) label = QLabel(i18n("Available Disks and Filesystems:"),hb)
hb.setStretchFactor(label,1) hb.setStretchFactor(label,1)
self.mountlist = KListView(topwidget,"Mount list") self.mountlist = TDEListView(topwidget,"Mount list")
toplayout.addWidget(self.mountlist) toplayout.addWidget(self.mountlist)
self.mountlist.addColumn(i18n("Name")) self.mountlist.addColumn(i18n("Name"))
self.mountlist.addColumn(i18n("Mount Point")) self.mountlist.addColumn(i18n("Mount Point"))
@ -2911,7 +2911,7 @@ class MountConfigApp(programbase):
# Doubleclick in item opens modify dialogue. # Doubleclick in item opens modify dialogue.
self.connect(self.mountlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked) self.connect(self.mountlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked)
# Rightclick: Open ContextMenu # Rightclick: Open ContextMenu
self.connect(self.mountlist, SIGNAL("contextMenu(KListView*,QListViewItem*,const QPoint&)"), self.connect(self.mountlist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"),
self.slotContextMenu) self.slotContextMenu)
hbox = QHBox(topwidget) hbox = QHBox(topwidget)
@ -2965,7 +2965,7 @@ class MountConfigApp(programbase):
hal_device = lv_item.haldevice hal_device = lv_item.haldevice
if hal_device is not None and not isinstance(hal_device,MicroHAL.FakeSystemDevice): if hal_device is not None and not isinstance(hal_device,MicroHAL.FakeSystemDevice):
self.cmenu = KPopupMenu(self,"MyActions") self.cmenu = TDEPopupMenu(self,"MyActions")
if isinstance(hal_device,MicroHAL.RemovableDisk) or isinstance(lv_item,MountListViewItem): if isinstance(hal_device,MicroHAL.RemovableDisk) or isinstance(lv_item,MountListViewItem):
self.cmenu.insertItem(i18n("Modify..."), self.slotModifyClicked, 0, 0) self.cmenu.insertItem(i18n("Modify..."), self.slotModifyClicked, 0, 0)
self.cmenu.insertItem(i18n("Delete..."), self.slotDeleteClicked, 0, 1) self.cmenu.insertItem(i18n("Delete..."), self.slotDeleteClicked, 0, 1)

@ -310,21 +310,21 @@ class PowerManager(PowerManagerUI):
# add suspend/hibernate to tray's context menu # add suspend/hibernate to tray's context menu
menu = self.systray.contextMenu() menu = self.systray.contextMenu()
if self.canSuspend: if self.canSuspend:
action = KAction( i18n("Suspend"), KShortcut(), self.suspend, action = TDEAction( i18n("Suspend"), TDEShortcut(), self.suspend,
self.systray.actionCollection(), "suspend") self.systray.actionCollection(), "suspend")
action.setIcon("suspend") action.setIcon("suspend")
action.plug(menu) action.plug(menu)
if self.canHibernate: if self.canHibernate:
action = KAction( i18n("Hibernate"), KShortcut(), self.hibernate, action = TDEAction( i18n("Hibernate"), TDEShortcut(), self.hibernate,
self.systray.actionCollection(), "hibernate") self.systray.actionCollection(), "hibernate")
action.setIcon("hibernate") action.setIcon("hibernate")
action.plug(menu) action.plug(menu)
# add list of governators # add list of governators
if self.powermanager.hasCpuFreqGovernors and len(self.cb_freq) > 0: if self.powermanager.hasCpuFreqGovernors and len(self.cb_freq) > 0:
submenu = KPopupMenu(menu) submenu = TDEPopupMenu(menu)
for policy in self.cb_freq: for policy in self.cb_freq:
action = KRadioAction(self.freq_name[policy], KShortcut(), action = TDERadioAction(self.freq_name[policy], TDEShortcut(),
self.freq_call[policy], self.freq_call[policy],
self.systray.actionCollection(), policy) self.systray.actionCollection(), policy)
action.setExclusiveGroup("freqs") action.setExclusiveGroup("freqs")
@ -339,9 +339,9 @@ class PowerManager(PowerManagerUI):
# TDEGlobalAccel crashes the application in pytde # TDEGlobalAccel crashes the application in pytde
# see http://mats.gmd.de/pipermail/pytde/2006-May/013224.html # see http://mats.gmd.de/pipermail/pytde/2006-May/013224.html
#self.globalActions = TDEGlobalAccel(self) #self.globalActions = TDEGlobalAccel(self)
#self.suspendShortcut = KShortcut("XF86Sleep") #self.suspendShortcut = TDEShortcut("XF86Sleep")
#self.hibernateShortcut = KShortcut("XF86Standby") #self.hibernateShortcut = TDEShortcut("XF86Standby")
#self.hshutdownShortcut = KShortcut("XF86PowerOff") #self.hshutdownShortcut = TDEShortcut("XF86PowerOff")
#self.globalActions.insert("suspend", i18n("Suspend"), i18n("what's this?"), self.suspendShortcut, #self.suspendShortcut, self.suspend) #self.globalActions.insert("suspend", i18n("Suspend"), i18n("what's this?"), self.suspendShortcut, #self.suspendShortcut, self.suspend)
#self.globalActions.updateConnections() #self.globalActions.updateConnections()

@ -1006,7 +1006,7 @@ class SysVInitApp(programbase):
widget = QWidget(hb) widget = QWidget(hb)
hb.setStretchFactor(widget,1) hb.setStretchFactor(widget,1)
self.servicelistview = KListView(vb) self.servicelistview = TDEListView(vb)
self.servicelistview.addColumn(i18n("Service")) self.servicelistview.addColumn(i18n("Service"))
self.servicelistview.addColumn(i18n("Start at Boot")) self.servicelistview.addColumn(i18n("Start at Boot"))
self.servicelistview.addColumn(i18n("Status")) self.servicelistview.addColumn(i18n("Status"))
@ -1060,7 +1060,7 @@ class SysVInitApp(programbase):
if not isroot: if not isroot:
self.disableStuff() self.disableStuff()
else: else:
self.connect(self.servicelistview, SIGNAL("contextMenu(KListView*,QListViewItem*,const QPoint&)"), self.connect(self.servicelistview, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"),
self.slotServiceContextMenu) self.slotServiceContextMenu)
self.__fillListView(self.currentrunlevel) self.__fillListView(self.currentrunlevel)
@ -1083,7 +1083,7 @@ class SysVInitApp(programbase):
self.zapbutton.setDisabled(True) self.zapbutton.setDisabled(True)
def slotServiceContextMenu(self,l,v,p): def slotServiceContextMenu(self,l,v,p):
self.cmenu = KPopupMenu(self,"MyActions") self.cmenu = TDEPopupMenu(self,"MyActions")
self.cmenu.insertItem(i18n("Start..."), self.slotStartButton) self.cmenu.insertItem(i18n("Start..."), self.slotStartButton)
self.cmenu.insertItem(i18n("Stop..."), self.slotStopButton) self.cmenu.insertItem(i18n("Stop..."), self.slotStopButton)
self.cmenu.insertItem(i18n("Restart..."), self.slotRestartButton) self.cmenu.insertItem(i18n("Restart..."), self.slotRestartButton)

@ -110,7 +110,7 @@ class UserConfigApp(programbase):
label = QLabel(i18n("User Accounts:"),hb) label = QLabel(i18n("User Accounts:"),hb)
hb.setStretchFactor(label,1) hb.setStretchFactor(label,1)
self.userlist = KListView(vbox) self.userlist = TDEListView(vbox)
self.userlist.addColumn(i18n("Login Name")) self.userlist.addColumn(i18n("Login Name"))
self.userlist.addColumn(i18n("Real Name")) self.userlist.addColumn(i18n("Real Name"))
self.userlist.addColumn(i18n("UID")) self.userlist.addColumn(i18n("UID"))
@ -120,7 +120,7 @@ class UserConfigApp(programbase):
self.connect(self.userlist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked) self.connect(self.userlist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked)
if isroot: if isroot:
self.connect(self.userlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked) self.connect(self.userlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked)
self.connect(self.userlist, SIGNAL("contextMenu(KListView*,QListViewItem*,const QPoint&)"), self.slotUserContext) self.connect(self.userlist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"), self.slotUserContext)
self.showspecialcheckbox = QCheckBox(i18n("Show system accounts"),vbox) self.showspecialcheckbox = QCheckBox(i18n("Show system accounts"),vbox)
vbox.setStretchFactor(self.showspecialcheckbox,0) vbox.setStretchFactor(self.showspecialcheckbox,0)
@ -211,7 +211,7 @@ class UserConfigApp(programbase):
groupsplitter = QSplitter(Qt.Vertical,groupsvbox) groupsplitter = QSplitter(Qt.Vertical,groupsvbox)
self.grouplist = KListView(groupsplitter) self.grouplist = TDEListView(groupsplitter)
self.grouplist.addColumn(i18n("Group Name")) self.grouplist.addColumn(i18n("Group Name"))
self.grouplist.addColumn(i18n("GID")) self.grouplist.addColumn(i18n("GID"))
self.grouplist.setAllColumnsShowFocus(True) self.grouplist.setAllColumnsShowFocus(True)
@ -219,7 +219,7 @@ class UserConfigApp(programbase):
if isroot: if isroot:
self.connect(self.grouplist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyGroupClicked) self.connect(self.grouplist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyGroupClicked)
self.connect(self.grouplist, SIGNAL("contextMenu(KListView*,QListViewItem*,const QPoint&)"), self.connect(self.grouplist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"),
self.slotGroupContext) self.slotGroupContext)
groupbottomvbox = QVBox(groupsplitter) groupbottomvbox = QVBox(groupsplitter)
@ -255,7 +255,7 @@ class UserConfigApp(programbase):
label = QLabel(i18n("Group Members:"),groupbottomvbox) label = QLabel(i18n("Group Members:"),groupbottomvbox)
groupsvbox.setStretchFactor(label,0) groupsvbox.setStretchFactor(label,0)
self.groupmemberlist = KListView(groupbottomvbox) self.groupmemberlist = TDEListView(groupbottomvbox)
self.groupmemberlist.addColumn(i18n("Login Name")) self.groupmemberlist.addColumn(i18n("Login Name"))
self.groupmemberlist.addColumn(i18n("Real Name")) self.groupmemberlist.addColumn(i18n("Real Name"))
self.groupmemberlist.addColumn(i18n("UID")) self.groupmemberlist.addColumn(i18n("UID"))
@ -296,7 +296,7 @@ class UserConfigApp(programbase):
####################################################################### #######################################################################
def slotUserContext(self,l,v,p): def slotUserContext(self,l,v,p):
cmenu = KPopupMenu(self,"MyActions") cmenu = TDEPopupMenu(self,"MyActions")
cmenu.insertItem(i18n("Modify..."), self.slotModifyClicked, 0, 0) cmenu.insertItem(i18n("Modify..."), self.slotModifyClicked, 0, 0)
cmenu.insertItem(i18n("Delete..."), self.slotDeleteClicked, 0, 1) cmenu.insertItem(i18n("Delete..."), self.slotDeleteClicked, 0, 1)
if not isroot: if not isroot:
@ -307,7 +307,7 @@ class UserConfigApp(programbase):
####################################################################### #######################################################################
def slotGroupContext(self,l,v,p): def slotGroupContext(self,l,v,p):
cmenu = KPopupMenu(self,"MyActions") cmenu = TDEPopupMenu(self,"MyActions")
cmenu.insertItem(i18n("Modify..."), self.slotModifyGroupClicked, 0, 0) cmenu.insertItem(i18n("Modify..."), self.slotModifyGroupClicked, 0, 0)
cmenu.insertItem(i18n("Delete..."), self.slotDeleteGroupClicked, 0, 1) cmenu.insertItem(i18n("Delete..."), self.slotDeleteGroupClicked, 0, 1)
if not isroot: if not isroot:
@ -439,7 +439,7 @@ class UserConfigApp(programbase):
for userobj in users: for userobj in users:
uid = userobj.getUID() uid = userobj.getUID()
if self.showsystemaccounts or not userobj.isSystemUser(): if self.showsystemaccounts or not userobj.isSystemUser():
lvi = KListViewItem(self.userlist,userobj.getUsername(),userobj.getRealName(),unicode(uid)) lvi = TDEListViewItem(self.userlist,userobj.getUsername(),userobj.getRealName(),unicode(uid))
if userobj.isLocked(): if userobj.isLocked():
lvi.setPixmap(0,UserIcon("hi16-encrypted")) lvi.setPixmap(0,UserIcon("hi16-encrypted"))
self.useridsToListItems[uid] = lvi self.useridsToListItems[uid] = lvi
@ -1267,7 +1267,7 @@ class ListPickerDialog(KDialogBase):
self.tophbox.setStretchFactor(vbox,1) self.tophbox.setStretchFactor(vbox,1)
label = QLabel(leftlabel,vbox) label = QLabel(leftlabel,vbox)
vbox.setStretchFactor(label,0) vbox.setStretchFactor(label,0)
self.availablelist = KListBox(vbox) self.availablelist = TDEListBox(vbox)
vbox.setStretchFactor(self.availablelist,1) vbox.setStretchFactor(self.availablelist,1)
# ->, <- Buttons # ->, <- Buttons
@ -1289,7 +1289,7 @@ class ListPickerDialog(KDialogBase):
self.tophbox.setStretchFactor(vbox,1) self.tophbox.setStretchFactor(vbox,1)
label = QLabel(rightlabel,vbox) label = QLabel(rightlabel,vbox)
vbox.setStretchFactor(label,0) vbox.setStretchFactor(label,0)
self.selectedlist = KListBox(vbox) self.selectedlist = TDEListBox(vbox)
vbox.setStretchFactor(self.selectedlist,1) vbox.setStretchFactor(self.selectedlist,1)
####################################################################### #######################################################################
@ -1567,7 +1567,7 @@ class GroupEditDialog(KDialogBase):
hbox.setStretchFactor(vbox,1) hbox.setStretchFactor(vbox,1)
label = QLabel(i18n("Available Accounts"),vbox) label = QLabel(i18n("Available Accounts"),vbox)
vbox.setStretchFactor(label,0) vbox.setStretchFactor(label,0)
self.availablelist = KListBox(vbox) self.availablelist = TDEListBox(vbox)
vbox.setStretchFactor(self.availablelist,1) vbox.setStretchFactor(self.availablelist,1)
# ->, <- Buttons # ->, <- Buttons
@ -1591,7 +1591,7 @@ class GroupEditDialog(KDialogBase):
hbox.setStretchFactor(vbox,1) hbox.setStretchFactor(vbox,1)
label = QLabel(i18n("Selected Accounts"),vbox) label = QLabel(i18n("Selected Accounts"),vbox)
vbox.setStretchFactor(label,0) vbox.setStretchFactor(label,0)
self.selectedlist = KListBox(vbox) self.selectedlist = TDEListBox(vbox)
vbox.setStretchFactor(self.selectedlist,1) vbox.setStretchFactor(self.selectedlist,1)
####################################################################### #######################################################################

@ -533,7 +533,7 @@ class DrivesPage(QWidget):
spacer = QWidget(vbox2) spacer = QWidget(vbox2)
vbox2.setStretchFactor(spacer,1) vbox2.setStretchFactor(spacer,1)
self.driveslist = KListView(vbox2) self.driveslist = TDEListView(vbox2)
self.driveslist.addColumn(i18n("Directory")) self.driveslist.addColumn(i18n("Directory"))
self.driveslist.addColumn(i18n("Links to")) self.driveslist.addColumn(i18n("Links to"))
self.driveslist.setAllColumnsShowFocus(True) self.driveslist.setAllColumnsShowFocus(True)
@ -2976,7 +2976,7 @@ class ApplicationsPage(QWidget):
applicationstext = QLabel(vbox2,"applicationstext") applicationstext = QLabel(vbox2,"applicationstext")
applicationstext.setText(i18n("Change application specific settings for:")) applicationstext.setText(i18n("Change application specific settings for:"))
self.appslist = KListBox(vbox2) self.appslist = TDEListBox(vbox2)
self.connect(self.appslist, SIGNAL("selectionChanged(QListBoxItem *)"), self.slotListClicked) self.connect(self.appslist, SIGNAL("selectionChanged(QListBoxItem *)"), self.slotListClicked)
hbox = QHBox(vbox2) hbox = QHBox(vbox2)
@ -3381,7 +3381,7 @@ class LibrariesPage(QWidget):
hbox = QHBox(vbox2) hbox = QHBox(vbox2)
hbox.setSpacing(KDialog.spacingHint()) hbox.setSpacing(KDialog.spacingHint())
self.dllslist = KListView(hbox) self.dllslist = TDEListView(hbox)
self.dllslist.addColumn(i18n("Library")) self.dllslist.addColumn(i18n("Library"))
self.dllslist.addColumn(i18n("Load Order")) self.dllslist.addColumn(i18n("Load Order"))
self.dllslist.setAllColumnsShowFocus(True) self.dllslist.setAllColumnsShowFocus(True)

Loading…
Cancel
Save