|
Lines 16-29
Link Here
|
| 16 |
# # |
16 |
# # |
| 17 |
########################################################################### |
17 |
########################################################################### |
| 18 |
|
18 |
|
|
|
19 |
import sys |
| 20 |
import os |
| 21 |
import os.path |
| 22 |
# Trinity-specific paths |
| 23 |
tqt_modules = [] |
| 24 |
for m_path in sys.path: |
| 25 |
if os.path.exists(os.path.join(m_path, 'sip4_tqt')): |
| 26 |
m_sip_dir = os.path.join(m_path, 'sip4_tqt') |
| 27 |
tqt_modules.insert(0, m_sip_dir) |
| 28 |
if os.path.exists(os.path.join(m_path, 'python_tqt')): |
| 29 |
m_pyqt_dir = os.path.join(m_path, 'python_tqt') |
| 30 |
tqt_modules.insert(0, m_pyqt_dir) |
| 31 |
for m_path in tqt_modules: |
| 32 |
sys.path.insert(0, m_path) |
| 33 |
|
| 19 |
from qt import * |
34 |
from qt import * |
| 20 |
from tdeui import * |
35 |
from tdeui import * |
| 21 |
from tdecore import * |
36 |
from tdecore import * |
| 22 |
from tdefile import * |
37 |
from tdefile import * |
| 23 |
from tdeio import * |
38 |
from tdeio import * |
| 24 |
import sys |
|
|
| 25 |
import os |
| 26 |
import os.path |
| 27 |
from types import StringType,UnicodeType |
39 |
from types import StringType,UnicodeType |
| 28 |
import pwd |
40 |
import pwd |
| 29 |
import grp |
41 |
import grp |
|
Lines 456-462
class MountEntryExt(object):
Link Here
|
| 456 |
def _setBusy(self,parentdialog,flag): |
468 |
def _setBusy(self,parentdialog,flag): |
| 457 |
global kapp |
469 |
global kapp |
| 458 |
if flag: |
470 |
if flag: |
| 459 |
kapp.setOverrideCursor( QCursor(Qt.WaitCursor) ) |
471 |
kapp.setOverrideCursor( TQCursor(TQt.WaitCursor) ) |
| 460 |
parentdialog.setEnabled(False) |
472 |
parentdialog.setEnabled(False) |
| 461 |
|
473 |
|
| 462 |
# It is necessary to process some of the events in the event queue. |
474 |
# It is necessary to process some of the events in the event queue. |
|
Lines 1352-1365
class MountTable(object):
Link Here
|
| 1352 |
raise NotImplementedError, "No __setitem__ on MountTable." |
1364 |
raise NotImplementedError, "No __setitem__ on MountTable." |
| 1353 |
|
1365 |
|
| 1354 |
############################################################################ |
1366 |
############################################################################ |
| 1355 |
class MountEntryDialogOptions(QWidget): |
1367 |
class MountEntryDialogOptions(TQWidget): |
| 1356 |
|
1368 |
|
| 1357 |
deviceexample = i18n("(for example /dev/hdb3)") |
1369 |
deviceexample = i18n("(for example /dev/hdb3)") |
| 1358 |
|
1370 |
|
| 1359 |
######################################################################## |
1371 |
######################################################################## |
| 1360 |
def __init__(self,parent,showmountpoint=True,showdevice=True, |
1372 |
def __init__(self,parent,showmountpoint=True,showdevice=True, |
| 1361 |
showfs_freq=True,showfs_passno=True,showuuid=True,showlabel=True): |
1373 |
showfs_freq=True,showfs_passno=True,showuuid=True,showlabel=True): |
| 1362 |
QWidget.__init__(self,parent) |
1374 |
TQWidget.__init__(self,parent) |
| 1363 |
self.showmountpoint = showmountpoint |
1375 |
self.showmountpoint = showmountpoint |
| 1364 |
self.showdevice = showdevice |
1376 |
self.showdevice = showdevice |
| 1365 |
self.showfs_freq = showfs_freq |
1377 |
self.showfs_freq = showfs_freq |
|
Lines 1373-1393
class MountEntryDialogOptions(QWidget):
Link Here
|
| 1373 |
######################################################################## |
1385 |
######################################################################## |
| 1374 |
def _fillPage(self): |
1386 |
def _fillPage(self): |
| 1375 |
row = 0 |
1387 |
row = 0 |
| 1376 |
grid = QGridLayout(self,1,2) |
1388 |
grid = TQGridLayout(self,1,2) |
| 1377 |
grid.setSpacing(KDialog.spacingHint()) |
1389 |
grid.setSpacing(KDialog.spacingHint()) |
| 1378 |
grid.setColStretch(0,0) |
1390 |
grid.setColStretch(0,0) |
| 1379 |
grid.setColStretch(2,0) |
1391 |
grid.setColStretch(2,0) |
| 1380 |
|
1392 |
|
| 1381 |
if self.showmountpoint: |
1393 |
if self.showmountpoint: |
| 1382 |
|
1394 |
|
| 1383 |
label = QLabel(i18n("Mount Point:"),self) |
1395 |
label = TQLabel(i18n("Mount Point:"),self) |
| 1384 |
grid.addWidget(label,row,0) |
1396 |
grid.addWidget(label,row,0) |
| 1385 |
|
1397 |
|
| 1386 |
hbox = QHBox(self) |
1398 |
hbox = TQHBox(self) |
| 1387 |
hbox.setSpacing(KDialog.spacingHint()) |
1399 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1388 |
self.mountpointlineedit = KLineEdit(hbox) |
1400 |
self.mountpointlineedit = KLineEdit(hbox) |
| 1389 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
1401 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
| 1390 |
#self.connect(self.homediredit, SIGNAL("textChanged(const QString &)"), self.slotHomeDirChanged) |
1402 |
#self.connect(self.homediredit, SIGNAL("textChanged(const TQString &)"), self.slotHomeDirChanged) |
| 1391 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
1403 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
| 1392 |
hbox.setStretchFactor(self.mountpointbutton,0) |
1404 |
hbox.setStretchFactor(self.mountpointbutton,0) |
| 1393 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
1405 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
|
Lines 1395-1420
class MountEntryDialogOptions(QWidget):
Link Here
|
| 1395 |
row += 1 |
1407 |
row += 1 |
| 1396 |
|
1408 |
|
| 1397 |
if self.showdevice: |
1409 |
if self.showdevice: |
| 1398 |
hbox = QHBox(self) |
1410 |
hbox = TQHBox(self) |
| 1399 |
hbox.setSpacing(KDialog.spacingHint()) |
1411 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1400 |
|
1412 |
|
| 1401 |
label = QLabel(i18n("Device:"),self) |
1413 |
label = TQLabel(i18n("Device:"),self) |
| 1402 |
grid.addWidget(label,row,0) |
1414 |
grid.addWidget(label,row,0) |
| 1403 |
|
1415 |
|
| 1404 |
self.devicecheckbox = QRadioButton(i18n("by name"),hbox) |
1416 |
self.devicecheckbox = TQRadioButton(i18n("by name"),hbox) |
| 1405 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
1417 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
| 1406 |
self.slotDeviceCheckboxClicked) |
1418 |
self.slotDeviceCheckboxClicked) |
| 1407 |
self.devicelineedit = KLineEdit(hbox) |
1419 |
self.devicelineedit = KLineEdit(hbox) |
| 1408 |
grid.addMultiCellWidget(hbox,row,row,1,3) |
1420 |
grid.addMultiCellWidget(hbox,row,row,1,3) |
| 1409 |
row += 1 |
1421 |
row += 1 |
| 1410 |
example = QLabel(self.deviceexample,self) |
1422 |
example = TQLabel(self.deviceexample,self) |
| 1411 |
grid.addMultiCellWidget(example,row,row,1,3) |
1423 |
grid.addMultiCellWidget(example,row,row,1,3) |
| 1412 |
row += 1 |
1424 |
row += 1 |
| 1413 |
|
1425 |
|
| 1414 |
if self.showuuid: |
1426 |
if self.showuuid: |
| 1415 |
hbox = QHBox(self) |
1427 |
hbox = TQHBox(self) |
| 1416 |
hbox.setSpacing(KDialog.spacingHint()) |
1428 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1417 |
self.uuidcheckbox = QRadioButton(i18n("by UUID"),hbox) |
1429 |
self.uuidcheckbox = TQRadioButton(i18n("by UUID"),hbox) |
| 1418 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
1430 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
| 1419 |
self.slotUUIDCheckboxClicked) |
1431 |
self.slotUUIDCheckboxClicked) |
| 1420 |
self.uuidlineedit = KLineEdit(hbox) |
1432 |
self.uuidlineedit = KLineEdit(hbox) |
|
Lines 1422-1430
class MountEntryDialogOptions(QWidget):
Link Here
|
| 1422 |
row += 1 |
1434 |
row += 1 |
| 1423 |
|
1435 |
|
| 1424 |
if self.showlabel: |
1436 |
if self.showlabel: |
| 1425 |
hbox = QHBox(self) |
1437 |
hbox = TQHBox(self) |
| 1426 |
hbox.setSpacing(KDialog.spacingHint()) |
1438 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1427 |
self.labelcheckbox = QRadioButton(i18n("by label"),hbox) |
1439 |
self.labelcheckbox = TQRadioButton(i18n("by label"),hbox) |
| 1428 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
1440 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
| 1429 |
self.slotLabelCheckboxClicked) |
1441 |
self.slotLabelCheckboxClicked) |
| 1430 |
self.labellineedit = KLineEdit(hbox) |
1442 |
self.labellineedit = KLineEdit(hbox) |
|
Lines 1432-1479
class MountEntryDialogOptions(QWidget):
Link Here
|
| 1432 |
row += 1 |
1444 |
row += 1 |
| 1433 |
else: |
1445 |
else: |
| 1434 |
if self.showdevice: |
1446 |
if self.showdevice: |
| 1435 |
label = QLabel(i18n("Device:"),self) |
1447 |
label = TQLabel(i18n("Device:"),self) |
| 1436 |
grid.addWidget(label,row,0) |
1448 |
grid.addWidget(label,row,0) |
| 1437 |
self.devicelineedit = KLineEdit(self) |
1449 |
self.devicelineedit = KLineEdit(self) |
| 1438 |
grid.addMultiCellWidget(self.devicelineedit,row,row,1,3) |
1450 |
grid.addMultiCellWidget(self.devicelineedit,row,row,1,3) |
| 1439 |
row += 1 |
1451 |
row += 1 |
| 1440 |
example = QLabel(self.deviceexample,self) |
1452 |
example = TQLabel(self.deviceexample,self) |
| 1441 |
grid.addWidget(example,row,1) |
1453 |
grid.addWidget(example,row,1) |
| 1442 |
|
1454 |
|
| 1443 |
if self.showuuid: |
1455 |
if self.showuuid: |
| 1444 |
label = QLabel(i18n("Device UUID:"),self) |
1456 |
label = TQLabel(i18n("Device UUID:"),self) |
| 1445 |
grid.addWidget(label,row,0) |
1457 |
grid.addWidget(label,row,0) |
| 1446 |
self.uuidlineedit = KLineEdit(self) |
1458 |
self.uuidlineedit = KLineEdit(self) |
| 1447 |
grid.addMultiCellWidget(self.uuidlineedit,row,row,1,3) |
1459 |
grid.addMultiCellWidget(self.uuidlineedit,row,row,1,3) |
| 1448 |
row += 1 |
1460 |
row += 1 |
| 1449 |
|
1461 |
|
| 1450 |
if self.showlabel: |
1462 |
if self.showlabel: |
| 1451 |
label = QLabel(i18n("Device Label:"),self) |
1463 |
label = TQLabel(i18n("Device Label:"),self) |
| 1452 |
grid.addWidget(label,row,0) |
1464 |
grid.addWidget(label,row,0) |
| 1453 |
self.labellineedit = KLineEdit(self) |
1465 |
self.labellineedit = KLineEdit(self) |
| 1454 |
grid.addMultiCellWidget(self.labellineedit,row,row,1,3) |
1466 |
grid.addMultiCellWidget(self.labellineedit,row,row,1,3) |
| 1455 |
row += 1 |
1467 |
row += 1 |
| 1456 |
|
1468 |
|
| 1457 |
label = QLabel(i18n("Options:"),self) |
1469 |
label = TQLabel(i18n("Options:"),self) |
| 1458 |
grid.addWidget(label,row,0) |
1470 |
grid.addWidget(label,row,0) |
| 1459 |
self.optionslineedit = KLineEdit(self) |
1471 |
self.optionslineedit = KLineEdit(self) |
| 1460 |
grid.addMultiCellWidget(self.optionslineedit,row,row,1,3) |
1472 |
grid.addMultiCellWidget(self.optionslineedit,row,row,1,3) |
| 1461 |
row += 1 |
1473 |
row += 1 |
| 1462 |
|
1474 |
|
| 1463 |
if self.showfs_freq: |
1475 |
if self.showfs_freq: |
| 1464 |
label = QLabel(i18n("fs_freq:"),self) |
1476 |
label = TQLabel(i18n("fs_freq:"),self) |
| 1465 |
grid.addWidget(label,row,0) |
1477 |
grid.addWidget(label,row,0) |
| 1466 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,self) |
1478 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,self) |
| 1467 |
grid.addWidget(self.fsfreqspinbox,row,1) |
1479 |
grid.addWidget(self.fsfreqspinbox,row,1) |
| 1468 |
|
1480 |
|
| 1469 |
if self.showfs_passno: |
1481 |
if self.showfs_passno: |
| 1470 |
label = QLabel(i18n("fs_passno:"),self) |
1482 |
label = TQLabel(i18n("fs_passno:"),self) |
| 1471 |
grid.addWidget(label,row,2) |
1483 |
grid.addWidget(label,row,2) |
| 1472 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,self) |
1484 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,self) |
| 1473 |
grid.addWidget(self.fspassnospinbox,row,3) |
1485 |
grid.addWidget(self.fspassnospinbox,row,3) |
| 1474 |
row += 1 |
1486 |
row += 1 |
| 1475 |
|
1487 |
|
| 1476 |
grid.addWidget(QWidget(self),row,0) |
1488 |
grid.addWidget(TQWidget(self),row,0) |
| 1477 |
|
1489 |
|
| 1478 |
for x in range(grid.numRows()): |
1490 |
for x in range(grid.numRows()): |
| 1479 |
grid.setRowStretch(x,0) |
1491 |
grid.setRowStretch(x,0) |
|
Lines 1583-1589
class MountEntryDialogOptions(QWidget):
Link Here
|
| 1583 |
fileurl = KURL() |
1595 |
fileurl = KURL() |
| 1584 |
fileurl.setPath(self.mountpointlineedit.text()) |
1596 |
fileurl.setPath(self.mountpointlineedit.text()) |
| 1585 |
self.mountpointdialog.setCurrentURL(fileurl) |
1597 |
self.mountpointdialog.setCurrentURL(fileurl) |
| 1586 |
if self.mountpointdialog.exec_loop()==QDialog.Accepted: |
1598 |
if self.mountpointdialog.exec_loop()==TQDialog.Accepted: |
| 1587 |
self.mountpointlineedit.setText(self.mountpointdialog.url().path()) |
1599 |
self.mountpointlineedit.setText(self.mountpointdialog.url().path()) |
| 1588 |
|
1600 |
|
| 1589 |
######################################################################## |
1601 |
######################################################################## |
|
Lines 1627-1644
class MountEntryDialogOptionsCommonUnix(MountEntryDialogOptions):
Link Here
|
| 1627 |
def _fillPage(self): |
1639 |
def _fillPage(self): |
| 1628 |
|
1640 |
|
| 1629 |
row = 0 |
1641 |
row = 0 |
| 1630 |
grid = QGridLayout(self,1,2) |
1642 |
grid = TQGridLayout(self,1,2) |
| 1631 |
grid.setSpacing(KDialog.spacingHint()) |
1643 |
grid.setSpacing(KDialog.spacingHint()) |
| 1632 |
grid.setColStretch(0,0) |
1644 |
grid.setColStretch(0,0) |
| 1633 |
grid.setRowStretch(6,1) |
1645 |
grid.setRowStretch(6,1) |
| 1634 |
|
1646 |
|
| 1635 |
label = QLabel(i18n("Mount Point:"),self) |
1647 |
label = TQLabel(i18n("Mount Point:"),self) |
| 1636 |
grid.addWidget(label,row,0) |
1648 |
grid.addWidget(label,row,0) |
| 1637 |
hbox = QHBox(self) |
1649 |
hbox = TQHBox(self) |
| 1638 |
hbox.setSpacing(KDialog.spacingHint()) |
1650 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1639 |
self.mountpointlineedit = KLineEdit(hbox) |
1651 |
self.mountpointlineedit = KLineEdit(hbox) |
| 1640 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
1652 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
| 1641 |
#self.connect(self.homediredit, SIGNAL("textChanged(const QString &)"), self.slotHomeDirChanged) |
1653 |
#self.connect(self.homediredit, SIGNAL("textChanged(const TQString &)"), self.slotHomeDirChanged) |
| 1642 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
1654 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
| 1643 |
hbox.setStretchFactor(self.mountpointbutton,0) |
1655 |
hbox.setStretchFactor(self.mountpointbutton,0) |
| 1644 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"), \ |
1656 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"), \ |
|
Lines 1648-1673
class MountEntryDialogOptionsCommonUnix(MountEntryDialogOptions):
Link Here
|
| 1648 |
|
1660 |
|
| 1649 |
if self.showuuid or self.showlabel: |
1661 |
if self.showuuid or self.showlabel: |
| 1650 |
|
1662 |
|
| 1651 |
hbox = QHBox(self) |
1663 |
hbox = TQHBox(self) |
| 1652 |
hbox.setSpacing(KDialog.spacingHint()) |
1664 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1653 |
|
1665 |
|
| 1654 |
label = QLabel(i18n("Device:"),self) |
1666 |
label = TQLabel(i18n("Device:"),self) |
| 1655 |
grid.addWidget(label,row,0) |
1667 |
grid.addWidget(label,row,0) |
| 1656 |
|
1668 |
|
| 1657 |
self.devicecheckbox = QRadioButton(i18n("by name"),hbox) |
1669 |
self.devicecheckbox = TQRadioButton(i18n("by name"),hbox) |
| 1658 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
1670 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
| 1659 |
self.slotDeviceCheckboxClicked) |
1671 |
self.slotDeviceCheckboxClicked) |
| 1660 |
self.devicelineedit = KLineEdit(hbox) |
1672 |
self.devicelineedit = KLineEdit(hbox) |
| 1661 |
grid.addWidget(hbox,row,1) |
1673 |
grid.addWidget(hbox,row,1) |
| 1662 |
row += 1 |
1674 |
row += 1 |
| 1663 |
example = QLabel(self.deviceexample,self) |
1675 |
example = TQLabel(self.deviceexample,self) |
| 1664 |
grid.addWidget(example,row,1) |
1676 |
grid.addWidget(example,row,1) |
| 1665 |
row += 1 |
1677 |
row += 1 |
| 1666 |
|
1678 |
|
| 1667 |
if self.showuuid: |
1679 |
if self.showuuid: |
| 1668 |
hbox = QHBox(self) |
1680 |
hbox = TQHBox(self) |
| 1669 |
hbox.setSpacing(KDialog.spacingHint()) |
1681 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1670 |
self.uuidcheckbox = QRadioButton(i18n("by UUID"),hbox) |
1682 |
self.uuidcheckbox = TQRadioButton(i18n("by UUID"),hbox) |
| 1671 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
1683 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
| 1672 |
self.slotUUIDCheckboxClicked) |
1684 |
self.slotUUIDCheckboxClicked) |
| 1673 |
self.uuidlineedit = KLineEdit(hbox) |
1685 |
self.uuidlineedit = KLineEdit(hbox) |
|
Lines 1675-1683
class MountEntryDialogOptionsCommonUnix(MountEntryDialogOptions):
Link Here
|
| 1675 |
row += 1 |
1687 |
row += 1 |
| 1676 |
|
1688 |
|
| 1677 |
if self.showlabel: |
1689 |
if self.showlabel: |
| 1678 |
hbox = QHBox(self) |
1690 |
hbox = TQHBox(self) |
| 1679 |
hbox.setSpacing(KDialog.spacingHint()) |
1691 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1680 |
self.labelcheckbox = QRadioButton(i18n("by label"),hbox) |
1692 |
self.labelcheckbox = TQRadioButton(i18n("by label"),hbox) |
| 1681 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
1693 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
| 1682 |
self.slotLabelCheckboxClicked) |
1694 |
self.slotLabelCheckboxClicked) |
| 1683 |
self.labellineedit = KLineEdit(hbox) |
1695 |
self.labellineedit = KLineEdit(hbox) |
|
Lines 1685-1708
class MountEntryDialogOptionsCommonUnix(MountEntryDialogOptions):
Link Here
|
| 1685 |
row += 1 |
1697 |
row += 1 |
| 1686 |
|
1698 |
|
| 1687 |
else: |
1699 |
else: |
| 1688 |
label = QLabel(i18n("Device:"),self) |
1700 |
label = TQLabel(i18n("Device:"),self) |
| 1689 |
grid.addWidget(label,row,0) |
1701 |
grid.addWidget(label,row,0) |
| 1690 |
self.devicelineedit = KLineEdit(self) |
1702 |
self.devicelineedit = KLineEdit(self) |
| 1691 |
grid.addWidget(self.devicelineedit,row,1) |
1703 |
grid.addWidget(self.devicelineedit,row,1) |
| 1692 |
row += 1 |
1704 |
row += 1 |
| 1693 |
example = QLabel(self.deviceexample,self) |
1705 |
example = TQLabel(self.deviceexample,self) |
| 1694 |
grid.addWidget(example,row,1) |
1706 |
grid.addWidget(example,row,1) |
| 1695 |
row += 1 |
1707 |
row += 1 |
| 1696 |
|
1708 |
|
| 1697 |
self.autocheckbox = QCheckBox(i18n("Enable at start up"),self) |
1709 |
self.autocheckbox = TQCheckBox(i18n("Enable at start up"),self) |
| 1698 |
grid.addWidget(self.autocheckbox,row,1) |
1710 |
grid.addWidget(self.autocheckbox,row,1) |
| 1699 |
row += 1 |
1711 |
row += 1 |
| 1700 |
|
1712 |
|
| 1701 |
self.writeablecheckbox = QCheckBox(i18n("Writeable"),self) |
1713 |
self.writeablecheckbox = TQCheckBox(i18n("Writeable"),self) |
| 1702 |
grid.addWidget(self.writeablecheckbox,row,1) |
1714 |
grid.addWidget(self.writeablecheckbox,row,1) |
| 1703 |
row += 1 |
1715 |
row += 1 |
| 1704 |
|
1716 |
|
| 1705 |
label = QLabel(i18n("Mount Permission:"),self) |
1717 |
label = TQLabel(i18n("Mount Permission:"),self) |
| 1706 |
grid.addWidget(label,row,0) |
1718 |
grid.addWidget(label,row,0) |
| 1707 |
self.usermountcombobox = KComboBox(self) |
1719 |
self.usermountcombobox = KComboBox(self) |
| 1708 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
1720 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
|
Lines 1714-1725
class MountEntryDialogOptionsCommonUnix(MountEntryDialogOptions):
Link Here
|
| 1714 |
|
1726 |
|
| 1715 |
#grid.addWidget(,9,0) |
1727 |
#grid.addWidget(,9,0) |
| 1716 |
button = KPushButton(i18n("Advanced..."),self) |
1728 |
button = KPushButton(i18n("Advanced..."),self) |
| 1717 |
button.setSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed) |
1729 |
button.setSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed) |
| 1718 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
1730 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
| 1719 |
grid.addWidget(button,row,1,Qt.AlignRight) |
1731 |
grid.addWidget(button,row,1,TQt.AlignRight) |
| 1720 |
row += 1 |
1732 |
row += 1 |
| 1721 |
|
1733 |
|
| 1722 |
grid.addWidget(QWidget(self),row,0) |
1734 |
grid.addWidget(TQWidget(self),row,0) |
| 1723 |
|
1735 |
|
| 1724 |
for x in range(grid.numRows()): |
1736 |
for x in range(grid.numRows()): |
| 1725 |
grid.setRowStretch(x,0) |
1737 |
grid.setRowStretch(x,0) |
|
Lines 1880-1898
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1880 |
global allowuuid, allowlabel |
1892 |
global allowuuid, allowlabel |
| 1881 |
|
1893 |
|
| 1882 |
row = 0 |
1894 |
row = 0 |
| 1883 |
grid = QGridLayout(self,11,2) |
1895 |
grid = TQGridLayout(self,11,2) |
| 1884 |
grid.setSpacing(KDialog.spacingHint()) |
1896 |
grid.setSpacing(KDialog.spacingHint()) |
| 1885 |
grid.setColStretch(0,0) |
1897 |
grid.setColStretch(0,0) |
| 1886 |
grid.setColStretch(2,0) |
1898 |
grid.setColStretch(2,0) |
| 1887 |
grid.setRowStretch(10,1) |
1899 |
grid.setRowStretch(10,1) |
| 1888 |
|
1900 |
|
| 1889 |
label = QLabel(i18n("Mount Point:"),self) |
1901 |
label = TQLabel(i18n("Mount Point:"),self) |
| 1890 |
grid.addWidget(label,row,0) |
1902 |
grid.addWidget(label,row,0) |
| 1891 |
hbox = QHBox(self) |
1903 |
hbox = TQHBox(self) |
| 1892 |
hbox.setSpacing(KDialog.spacingHint()) |
1904 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1893 |
self.mountpointlineedit = KLineEdit(hbox) |
1905 |
self.mountpointlineedit = KLineEdit(hbox) |
| 1894 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
1906 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
| 1895 |
#self.connect(self.homediredit, SIGNAL("textChanged(const QString &)"), self.slotHomeDirChanged) |
1907 |
#self.connect(self.homediredit, SIGNAL("textChanged(const TQString &)"), self.slotHomeDirChanged) |
| 1896 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
1908 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
| 1897 |
hbox.setStretchFactor(self.mountpointbutton,0) |
1909 |
hbox.setStretchFactor(self.mountpointbutton,0) |
| 1898 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
1910 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
|
Lines 1900-1925
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1900 |
row += 1 |
1912 |
row += 1 |
| 1901 |
|
1913 |
|
| 1902 |
if allowuuid or allowlabel: |
1914 |
if allowuuid or allowlabel: |
| 1903 |
hbox = QHBox(self) |
1915 |
hbox = TQHBox(self) |
| 1904 |
hbox.setSpacing(KDialog.spacingHint()) |
1916 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1905 |
|
1917 |
|
| 1906 |
label = QLabel(i18n("Device:"),self) |
1918 |
label = TQLabel(i18n("Device:"),self) |
| 1907 |
grid.addWidget(label,row,0) |
1919 |
grid.addWidget(label,row,0) |
| 1908 |
|
1920 |
|
| 1909 |
self.devicecheckbox = QRadioButton(i18n("by name"),hbox) |
1921 |
self.devicecheckbox = TQRadioButton(i18n("by name"),hbox) |
| 1910 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
1922 |
self.connect(self.devicecheckbox,SIGNAL("clicked()"), \ |
| 1911 |
self.slotDeviceCheckboxClicked) |
1923 |
self.slotDeviceCheckboxClicked) |
| 1912 |
self.devicelineedit = KLineEdit(hbox) |
1924 |
self.devicelineedit = KLineEdit(hbox) |
| 1913 |
grid.addWidget(hbox,row,1) |
1925 |
grid.addWidget(hbox,row,1) |
| 1914 |
row += 1 |
1926 |
row += 1 |
| 1915 |
example = QLabel(self.deviceexample,self) |
1927 |
example = TQLabel(self.deviceexample,self) |
| 1916 |
grid.addWidget(example,row,1) |
1928 |
grid.addWidget(example,row,1) |
| 1917 |
row += 1 |
1929 |
row += 1 |
| 1918 |
|
1930 |
|
| 1919 |
if allowuuid and self.showuuid: |
1931 |
if allowuuid and self.showuuid: |
| 1920 |
hbox = QHBox(self) |
1932 |
hbox = TQHBox(self) |
| 1921 |
hbox.setSpacing(KDialog.spacingHint()) |
1933 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1922 |
self.uuidcheckbox = QRadioButton(i18n("by UUID"),hbox) |
1934 |
self.uuidcheckbox = TQRadioButton(i18n("by UUID"),hbox) |
| 1923 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
1935 |
self.connect(self.uuidcheckbox,SIGNAL("clicked()"), \ |
| 1924 |
self.slotUUIDCheckboxClicked) |
1936 |
self.slotUUIDCheckboxClicked) |
| 1925 |
self.uuidlineedit = KLineEdit(hbox) |
1937 |
self.uuidlineedit = KLineEdit(hbox) |
|
Lines 1927-1935
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1927 |
row += 1 |
1939 |
row += 1 |
| 1928 |
|
1940 |
|
| 1929 |
if allowlabel and self.showlabel: |
1941 |
if allowlabel and self.showlabel: |
| 1930 |
hbox = QHBox(self) |
1942 |
hbox = TQHBox(self) |
| 1931 |
hbox.setSpacing(KDialog.spacingHint()) |
1943 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1932 |
self.labelcheckbox = QRadioButton(i18n("by label"),hbox) |
1944 |
self.labelcheckbox = TQRadioButton(i18n("by label"),hbox) |
| 1933 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
1945 |
self.connect(self.labelcheckbox,SIGNAL("clicked()"), \ |
| 1934 |
self.slotLabelCheckboxClicked) |
1946 |
self.slotLabelCheckboxClicked) |
| 1935 |
self.labellineedit = KLineEdit(hbox) |
1947 |
self.labellineedit = KLineEdit(hbox) |
|
Lines 1938-1964
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1938 |
|
1950 |
|
| 1939 |
else: |
1951 |
else: |
| 1940 |
|
1952 |
|
| 1941 |
label = QLabel(i18n("Device:"),self) |
1953 |
label = TQLabel(i18n("Device:"),self) |
| 1942 |
grid.addWidget(label,row,0) |
1954 |
grid.addWidget(label,row,0) |
| 1943 |
self.devicelineedit = KLineEdit(self) |
1955 |
self.devicelineedit = KLineEdit(self) |
| 1944 |
grid.addMultiCellWidget(self.devicelineedit,row,row,1,3) |
1956 |
grid.addMultiCellWidget(self.devicelineedit,row,row,1,3) |
| 1945 |
row += 1 |
1957 |
row += 1 |
| 1946 |
|
1958 |
|
| 1947 |
example = QLabel(self.deviceexample,self) |
1959 |
example = TQLabel(self.deviceexample,self) |
| 1948 |
grid.addWidget(example,row,1) |
1960 |
grid.addWidget(example,row,1) |
| 1949 |
row += 1 |
1961 |
row += 1 |
| 1950 |
|
1962 |
|
| 1951 |
self.autocheckbox = QCheckBox(i18n("Enable at start up"),self) |
1963 |
self.autocheckbox = TQCheckBox(i18n("Enable at start up"),self) |
| 1952 |
grid.addMultiCellWidget(self.autocheckbox,row,row,1,3) |
1964 |
grid.addMultiCellWidget(self.autocheckbox,row,row,1,3) |
| 1953 |
row += 1 |
1965 |
row += 1 |
| 1954 |
|
1966 |
|
| 1955 |
# Security & Safety line. |
1967 |
# Security & Safety line. |
| 1956 |
hbox = QHBox(self) |
1968 |
hbox = TQHBox(self) |
| 1957 |
hbox.setSpacing(KDialog.spacingHint()) |
1969 |
hbox.setSpacing(KDialog.spacingHint()) |
| 1958 |
tmplabel = QLabel(hbox) |
1970 |
tmplabel = TQLabel(hbox) |
| 1959 |
tmplabel.setPixmap(UserIcon("hi16-lock")) |
1971 |
tmplabel.setPixmap(UserIcon("hi16-lock")) |
| 1960 |
hbox.setStretchFactor(tmplabel,0) |
1972 |
hbox.setStretchFactor(tmplabel,0) |
| 1961 |
tmplabel = QLabel(hbox) |
1973 |
tmplabel = TQLabel(hbox) |
| 1962 |
tmplabel.setText(i18n("Security & Safety")) |
1974 |
tmplabel.setText(i18n("Security & Safety")) |
| 1963 |
hbox.setStretchFactor(tmplabel,0) |
1975 |
hbox.setStretchFactor(tmplabel,0) |
| 1964 |
sep = KSeparator(KSeparator.Horizontal,hbox) |
1976 |
sep = KSeparator(KSeparator.Horizontal,hbox) |
|
Lines 1966-1988
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1966 |
grid.addMultiCellWidget(hbox,row,row,0,3) |
1978 |
grid.addMultiCellWidget(hbox,row,row,0,3) |
| 1967 |
row += 1 |
1979 |
row += 1 |
| 1968 |
|
1980 |
|
| 1969 |
self.writeablecheckbox = QCheckBox(i18n("Writeable"),self) |
1981 |
self.writeablecheckbox = TQCheckBox(i18n("Writeable"),self) |
| 1970 |
grid.addMultiCellWidget(self.writeablecheckbox,row,row,1,3) |
1982 |
grid.addMultiCellWidget(self.writeablecheckbox,row,row,1,3) |
| 1971 |
row += 1 |
1983 |
row += 1 |
| 1972 |
|
1984 |
|
| 1973 |
label = QLabel(i18n("Files belong to user:"),self) |
1985 |
label = TQLabel(i18n("Files belong to user:"),self) |
| 1974 |
grid.addWidget(label,row,0) |
1986 |
grid.addWidget(label,row,0) |
| 1975 |
self.uidcombobox = UserComboBox(self) |
1987 |
self.uidcombobox = UserComboBox(self) |
| 1976 |
grid.addMultiCellWidget(self.uidcombobox,row,row,1,3) |
1988 |
grid.addMultiCellWidget(self.uidcombobox,row,row,1,3) |
| 1977 |
row += 1 |
1989 |
row += 1 |
| 1978 |
|
1990 |
|
| 1979 |
label = QLabel(i18n("Files belong to group:"),self) |
1991 |
label = TQLabel(i18n("Files belong to group:"),self) |
| 1980 |
grid.addWidget(label,row,0) |
1992 |
grid.addWidget(label,row,0) |
| 1981 |
self.gidcombobox = GroupComboBox(self) |
1993 |
self.gidcombobox = GroupComboBox(self) |
| 1982 |
grid.addMultiCellWidget(self.gidcombobox,row,row,1,3) |
1994 |
grid.addMultiCellWidget(self.gidcombobox,row,row,1,3) |
| 1983 |
row += 1 |
1995 |
row += 1 |
| 1984 |
|
1996 |
|
| 1985 |
label = QLabel(i18n("Mount Permission:"),self) |
1997 |
label = TQLabel(i18n("Mount Permission:"),self) |
| 1986 |
grid.addWidget(label,row,0) |
1998 |
grid.addWidget(label,row,0) |
| 1987 |
self.usermountcombobox = KComboBox(self) |
1999 |
self.usermountcombobox = KComboBox(self) |
| 1988 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
2000 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
|
Lines 1992-2006
class MountEntryDialogOptionsVFAT(MountEntryDialogOptions):
Link Here
|
| 1992 |
grid.addMultiCellWidget(self.usermountcombobox,row,row,1,3) |
2004 |
grid.addMultiCellWidget(self.usermountcombobox,row,row,1,3) |
| 1993 |
row += 1 |
2005 |
row += 1 |
| 1994 |
|
2006 |
|
| 1995 |
self.suppresspermissionerrorcheckbox = QCheckBox(i18n("Suppress permission errors"),self) |
2007 |
self.suppresspermissionerrorcheckbox = TQCheckBox(i18n("Suppress permission errors"),self) |
| 1996 |
grid.addMultiCellWidget(self.suppresspermissionerrorcheckbox,row,row,1,3) |
2008 |
grid.addMultiCellWidget(self.suppresspermissionerrorcheckbox,row,row,1,3) |
| 1997 |
row += 1 |
2009 |
row += 1 |
| 1998 |
|
2010 |
|
| 1999 |
row += 1 |
2011 |
row += 1 |
| 2000 |
button = KPushButton(i18n("Advanced..."),self) |
2012 |
button = KPushButton(i18n("Advanced..."),self) |
| 2001 |
button.setSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed) |
2013 |
button.setSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed) |
| 2002 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
2014 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
| 2003 |
grid.addMultiCellWidget(button,row,row,1,3,Qt.AlignRight) |
2015 |
grid.addMultiCellWidget(button,row,row,1,3,TQt.AlignRight) |
| 2004 |
|
2016 |
|
| 2005 |
######################################################################## |
2017 |
######################################################################## |
| 2006 |
def displayMountEntry(self,entry): |
2018 |
def displayMountEntry(self,entry): |
|
Lines 2135-2161
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2135 |
|
2147 |
|
| 2136 |
######################################################################## |
2148 |
######################################################################## |
| 2137 |
def _fillPage(self): |
2149 |
def _fillPage(self): |
| 2138 |
grid = QGridLayout(self,14,4) |
2150 |
grid = TQGridLayout(self,14,4) |
| 2139 |
grid.setSpacing(KDialog.spacingHint()) |
2151 |
grid.setSpacing(KDialog.spacingHint()) |
| 2140 |
grid.setColStretch(0,0) |
2152 |
grid.setColStretch(0,0) |
| 2141 |
grid.setColStretch(2,0) |
2153 |
grid.setColStretch(2,0) |
| 2142 |
grid.setRowStretch(12,1) |
2154 |
grid.setRowStretch(12,1) |
| 2143 |
|
2155 |
|
| 2144 |
label = QLabel(i18n("Mount Point:"),self) |
2156 |
label = TQLabel(i18n("Mount Point:"),self) |
| 2145 |
grid.addWidget(label,0,0) |
2157 |
grid.addWidget(label,0,0) |
| 2146 |
hbox = QHBox(self) |
2158 |
hbox = TQHBox(self) |
| 2147 |
hbox.setSpacing(KDialog.spacingHint()) |
2159 |
hbox.setSpacing(KDialog.spacingHint()) |
| 2148 |
self.mountpointlineedit = KLineEdit(hbox) |
2160 |
self.mountpointlineedit = KLineEdit(hbox) |
| 2149 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
2161 |
hbox.setStretchFactor(self.mountpointlineedit,1) |
| 2150 |
#self.connect(self.homediredit, SIGNAL("textChanged(const QString &)"), self.slotHomeDirChanged) |
2162 |
#self.connect(self.homediredit, SIGNAL("textChanged(const TQString &)"), self.slotHomeDirChanged) |
| 2151 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
2163 |
self.mountpointbutton = KPushButton(i18n("Browse..."),hbox) |
| 2152 |
hbox.setStretchFactor(self.mountpointbutton,0) |
2164 |
hbox.setStretchFactor(self.mountpointbutton,0) |
| 2153 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
2165 |
self.connect(self.mountpointbutton,SIGNAL("clicked()"),self.slotBrowseMountPointClicked) |
| 2154 |
grid.addMultiCellWidget(hbox,0,0,1,3) |
2166 |
grid.addMultiCellWidget(hbox,0,0,1,3) |
| 2155 |
|
2167 |
|
| 2156 |
label = QLabel(i18n("Network Share:"),self) |
2168 |
label = TQLabel(i18n("Network Share:"),self) |
| 2157 |
grid.addWidget(label,1,0) |
2169 |
grid.addWidget(label,1,0) |
| 2158 |
hbox = QHBox(self) |
2170 |
hbox = TQHBox(self) |
| 2159 |
hbox.setSpacing(KDialog.spacingHint()) |
2171 |
hbox.setSpacing(KDialog.spacingHint()) |
| 2160 |
self.devicelineedit = KLineEdit(hbox) |
2172 |
self.devicelineedit = KLineEdit(hbox) |
| 2161 |
hbox.setStretchFactor(self.devicelineedit,1) |
2173 |
hbox.setStretchFactor(self.devicelineedit,1) |
|
Lines 2165-2185
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2165 |
grid.addMultiCellWidget(hbox,1,1,1,3) |
2177 |
grid.addMultiCellWidget(hbox,1,1,1,3) |
| 2166 |
|
2178 |
|
| 2167 |
# Connect as: |
2179 |
# Connect as: |
| 2168 |
connectaslabel = QLabel(self) |
2180 |
connectaslabel = TQLabel(self) |
| 2169 |
connectaslabel.setText(i18n("Connect as:")) |
2181 |
connectaslabel.setText(i18n("Connect as:")) |
| 2170 |
grid.addWidget(connectaslabel,2,0) |
2182 |
grid.addWidget(connectaslabel,2,0) |
| 2171 |
|
2183 |
|
| 2172 |
self.guestradio = QRadioButton(self) |
2184 |
self.guestradio = TQRadioButton(self) |
| 2173 |
self.guestradio.setChecked(True) |
2185 |
self.guestradio.setChecked(True) |
| 2174 |
grid.addWidget(self.guestradio,2,1) |
2186 |
grid.addWidget(self.guestradio,2,1) |
| 2175 |
tmplabel = QLabel(self) |
2187 |
tmplabel = TQLabel(self) |
| 2176 |
tmplabel.setText(i18n("Guest")) |
2188 |
tmplabel.setText(i18n("Guest")) |
| 2177 |
grid.addMultiCellWidget(tmplabel,2,2,2,3) |
2189 |
grid.addMultiCellWidget(tmplabel,2,2,2,3) |
| 2178 |
self.connect(self.guestradio,SIGNAL("stateChanged(int)"),self.slotGuestRadioClicked) |
2190 |
self.connect(self.guestradio,SIGNAL("stateChanged(int)"),self.slotGuestRadioClicked) |
| 2179 |
|
2191 |
|
| 2180 |
self.userradio = QRadioButton(self) |
2192 |
self.userradio = TQRadioButton(self) |
| 2181 |
grid.addWidget(self.userradio,3,1) |
2193 |
grid.addWidget(self.userradio,3,1) |
| 2182 |
tmplabel = QLabel(self) |
2194 |
tmplabel = TQLabel(self) |
| 2183 |
tmplabel.setText(i18n("Username:")) |
2195 |
tmplabel.setText(i18n("Username:")) |
| 2184 |
grid.addWidget(tmplabel,3,2) |
2196 |
grid.addWidget(tmplabel,3,2) |
| 2185 |
self.connect(self.userradio,SIGNAL("stateChanged(int)"),self.slotUserRadioClicked) |
2197 |
self.connect(self.userradio,SIGNAL("stateChanged(int)"),self.slotUserRadioClicked) |
|
Lines 2187-2229
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2187 |
self.usernameedit = KLineEdit(self) |
2199 |
self.usernameedit = KLineEdit(self) |
| 2188 |
grid.addWidget(self.usernameedit,3,3) |
2200 |
grid.addWidget(self.usernameedit,3,3) |
| 2189 |
|
2201 |
|
| 2190 |
tmplabel = QLabel(self) |
2202 |
tmplabel = TQLabel(self) |
| 2191 |
tmplabel.setText(i18n("Password:")) |
2203 |
tmplabel.setText(i18n("Password:")) |
| 2192 |
grid.addWidget(tmplabel,4,2) |
2204 |
grid.addWidget(tmplabel,4,2) |
| 2193 |
|
2205 |
|
| 2194 |
self.passwordedit = KLineEdit(self) |
2206 |
self.passwordedit = KLineEdit(self) |
| 2195 |
grid.addWidget(self.passwordedit,4,3) |
2207 |
grid.addWidget(self.passwordedit,4,3) |
| 2196 |
|
2208 |
|
| 2197 |
self.autocheckbox = QCheckBox(i18n("Enable at start up"),self) |
2209 |
self.autocheckbox = TQCheckBox(i18n("Enable at start up"),self) |
| 2198 |
grid.addMultiCellWidget(self.autocheckbox,5,5,1,3) |
2210 |
grid.addMultiCellWidget(self.autocheckbox,5,5,1,3) |
| 2199 |
|
2211 |
|
| 2200 |
# Security & Safety line. |
2212 |
# Security & Safety line. |
| 2201 |
hbox = QHBox(self) |
2213 |
hbox = TQHBox(self) |
| 2202 |
hbox.setSpacing(KDialog.spacingHint()) |
2214 |
hbox.setSpacing(KDialog.spacingHint()) |
| 2203 |
tmplabel = QLabel(hbox) |
2215 |
tmplabel = TQLabel(hbox) |
| 2204 |
tmplabel.setPixmap(UserIcon("hi16-lock")) |
2216 |
tmplabel.setPixmap(UserIcon("hi16-lock")) |
| 2205 |
hbox.setStretchFactor(tmplabel,0) |
2217 |
hbox.setStretchFactor(tmplabel,0) |
| 2206 |
tmplabel = QLabel(hbox) |
2218 |
tmplabel = TQLabel(hbox) |
| 2207 |
tmplabel.setText(i18n("Security & Safety")) |
2219 |
tmplabel.setText(i18n("Security & Safety")) |
| 2208 |
hbox.setStretchFactor(tmplabel,0) |
2220 |
hbox.setStretchFactor(tmplabel,0) |
| 2209 |
sep = KSeparator(KSeparator.Horizontal,hbox) |
2221 |
sep = KSeparator(KSeparator.Horizontal,hbox) |
| 2210 |
hbox.setStretchFactor(sep,1) |
2222 |
hbox.setStretchFactor(sep,1) |
| 2211 |
grid.addMultiCellWidget(hbox,6,6,0,3) |
2223 |
grid.addMultiCellWidget(hbox,6,6,0,3) |
| 2212 |
|
2224 |
|
| 2213 |
self.writeablecheckbox = QCheckBox(i18n("Writeable"),self) |
2225 |
self.writeablecheckbox = TQCheckBox(i18n("Writeable"),self) |
| 2214 |
grid.addMultiCellWidget(self.writeablecheckbox,7,7,1,3) |
2226 |
grid.addMultiCellWidget(self.writeablecheckbox,7,7,1,3) |
| 2215 |
|
2227 |
|
| 2216 |
label = QLabel(i18n("Files belong to user:"),self) |
2228 |
label = TQLabel(i18n("Files belong to user:"),self) |
| 2217 |
grid.addWidget(label,8,0) |
2229 |
grid.addWidget(label,8,0) |
| 2218 |
self.uidcombobox = UserComboBox(self) |
2230 |
self.uidcombobox = UserComboBox(self) |
| 2219 |
grid.addMultiCellWidget(self.uidcombobox,8,8,1,3) |
2231 |
grid.addMultiCellWidget(self.uidcombobox,8,8,1,3) |
| 2220 |
|
2232 |
|
| 2221 |
label = QLabel(i18n("Files belong to group:"),self) |
2233 |
label = TQLabel(i18n("Files belong to group:"),self) |
| 2222 |
grid.addWidget(label,9,0) |
2234 |
grid.addWidget(label,9,0) |
| 2223 |
self.gidcombobox = GroupComboBox(self) |
2235 |
self.gidcombobox = GroupComboBox(self) |
| 2224 |
grid.addMultiCellWidget(self.gidcombobox,9,9,1,3) |
2236 |
grid.addMultiCellWidget(self.gidcombobox,9,9,1,3) |
| 2225 |
|
2237 |
|
| 2226 |
label = QLabel(i18n("Mount Permission:"),self) |
2238 |
label = TQLabel(i18n("Mount Permission:"),self) |
| 2227 |
grid.addWidget(label,10,0) |
2239 |
grid.addWidget(label,10,0) |
| 2228 |
self.usermountcombobox = KComboBox(self) |
2240 |
self.usermountcombobox = KComboBox(self) |
| 2229 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
2241 |
self.usermountcombobox.insertItem(i18n("Root user only may enable/disable")) |
|
Lines 2233-2241
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2233 |
grid.addMultiCellWidget(self.usermountcombobox,10,10,1,3) |
2245 |
grid.addMultiCellWidget(self.usermountcombobox,10,10,1,3) |
| 2234 |
|
2246 |
|
| 2235 |
button = KPushButton(i18n("Advanced..."),self) |
2247 |
button = KPushButton(i18n("Advanced..."),self) |
| 2236 |
button.setSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed) |
2248 |
button.setSizePolicy(TQSizePolicy.Fixed,TQSizePolicy.Fixed) |
| 2237 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
2249 |
self.connect(button,SIGNAL("clicked()"),self.slotAdvancedClicked) |
| 2238 |
grid.addMultiCellWidget(button,13,13,1,3,Qt.AlignRight) |
2250 |
grid.addMultiCellWidget(button,13,13,1,3,TQt.AlignRight) |
| 2239 |
|
2251 |
|
| 2240 |
self.selectsmbdialog = None |
2252 |
self.selectsmbdialog = None |
| 2241 |
|
2253 |
|
|
Lines 2260-2267
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2260 |
newurlobj = self.selectsmbdialog.choose(urlobj) |
2272 |
newurlobj = self.selectsmbdialog.choose(urlobj) |
| 2261 |
# This just converts smb:/zootv/data to \\zootv\data. |
2273 |
# This just converts smb:/zootv/data to \\zootv\data. |
| 2262 |
plainurl = KURL(newurlobj) |
2274 |
plainurl = KURL(newurlobj) |
| 2263 |
plainurl.setUser(QString.null) |
2275 |
plainurl.setUser(TQString.null) |
| 2264 |
plainurl.setPass(QString.null) |
2276 |
plainurl.setPass(TQString.null) |
| 2265 |
parts = [x.replace('\\',"/") for x in unicode(plainurl.url())[4:].split("/") if x !=""] |
2277 |
parts = [x.replace('\\',"/") for x in unicode(plainurl.url())[4:].split("/") if x !=""] |
| 2266 |
#convert the first part to an IP address |
2278 |
#convert the first part to an IP address |
| 2267 |
nmboutput = subprocess.Popen(["nmblookup",parts[0]], stdout=subprocess.PIPE).stdout |
2279 |
nmboutput = subprocess.Popen(["nmblookup",parts[0]], stdout=subprocess.PIPE).stdout |
|
Lines 2346-2352
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2346 |
return |
2358 |
return |
| 2347 |
self.updatinggui = True |
2359 |
self.updatinggui = True |
| 2348 |
|
2360 |
|
| 2349 |
if state==QButton.Off: |
2361 |
if state==TQButton.Off: |
| 2350 |
self.guestradio.setChecked(True) |
2362 |
self.guestradio.setChecked(True) |
| 2351 |
self.userradio.setChecked(False) |
2363 |
self.userradio.setChecked(False) |
| 2352 |
|
2364 |
|
|
Lines 2360-2366
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2360 |
if self.updatinggui: |
2372 |
if self.updatinggui: |
| 2361 |
return |
2373 |
return |
| 2362 |
self.updatinggui = True |
2374 |
self.updatinggui = True |
| 2363 |
if state==QButton.Off: |
2375 |
if state==TQButton.Off: |
| 2364 |
self.userradio.setChecked(True) |
2376 |
self.userradio.setChecked(True) |
| 2365 |
self.guestradio.setChecked(False) |
2377 |
self.guestradio.setChecked(False) |
| 2366 |
|
2378 |
|
|
Lines 2370-2389
class MountEntryDialogOptionsSMB(MountEntryDialogOptions):
Link Here
|
| 2370 |
self.updatinggui = False |
2382 |
self.updatinggui = False |
| 2371 |
|
2383 |
|
| 2372 |
############################################################################ |
2384 |
############################################################################ |
| 2373 |
class ROListBoxItem(QListBoxPixmap): |
2385 |
class ROListBoxItem(TQListBoxPixmap): |
| 2374 |
"""A read-only ListBox item that also uses the 'alternate' background colour |
2386 |
"""A read-only ListBox item that also uses the 'alternate' background colour |
| 2375 |
as background. |
2387 |
as background. |
| 2376 |
""" |
2388 |
""" |
| 2377 |
def __init__(self,listbox,pix,text): |
2389 |
def __init__(self,listbox,pix,text): |
| 2378 |
QListBoxPixmap.__init__(self,listbox,pix,text) |
2390 |
TQListBoxPixmap.__init__(self,listbox,pix,text) |
| 2379 |
self.setSelectable(False) |
2391 |
self.setSelectable(False) |
| 2380 |
def paint(self,p): |
2392 |
def paint(self,p): |
| 2381 |
boldfont = QFont(p.font()) |
2393 |
boldfont = TQFont(p.font()) |
| 2382 |
boldfont.setWeight(QFont.Bold) |
2394 |
boldfont.setWeight(TQFont.Bold) |
| 2383 |
p.setFont(boldfont) |
2395 |
p.setFont(boldfont) |
| 2384 |
p.setBackgroundColor(TDEGlobalSettings.alternateBackgroundColor()) |
2396 |
p.setBackgroundColor(TDEGlobalSettings.alternateBackgroundColor()) |
| 2385 |
p.eraseRect(0,0,self.listBox().width(),self.height(self.listBox())) |
2397 |
p.eraseRect(0,0,self.listBox().width(),self.height(self.listBox())) |
| 2386 |
QListBoxPixmap.paint(self,p) |
2398 |
TQListBoxPixmap.paint(self,p) |
| 2387 |
|
2399 |
|
| 2388 |
############################################################################ |
2400 |
############################################################################ |
| 2389 |
class MountEntryDialog(KDialogBase): |
2401 |
class MountEntryDialog(KDialogBase): |
|
Lines 2440-2454
class MountEntryDialog(KDialogBase):
Link Here
|
| 2440 |
self.comboIndexToMountType = [] |
2452 |
self.comboIndexToMountType = [] |
| 2441 |
self.currentOptionWidget = None |
2453 |
self.currentOptionWidget = None |
| 2442 |
|
2454 |
|
| 2443 |
self.topvbox = QVBox(self) |
2455 |
self.topvbox = TQVBox(self) |
| 2444 |
self.setMainWidget(self.topvbox) |
2456 |
self.setMainWidget(self.topvbox) |
| 2445 |
self.topvbox.setSpacing(self.spacingHint()) |
2457 |
self.topvbox.setSpacing(self.spacingHint()) |
| 2446 |
|
2458 |
|
| 2447 |
hb = QHBox(self.topvbox) |
2459 |
hb = TQHBox(self.topvbox) |
| 2448 |
hb.setSpacing(self.spacingHint()) |
2460 |
hb.setSpacing(self.spacingHint()) |
| 2449 |
self.topvbox.setStretchFactor(hb,0) |
2461 |
self.topvbox.setStretchFactor(hb,0) |
| 2450 |
|
2462 |
|
| 2451 |
label = QLabel(i18n("Type:"),hb) |
2463 |
label = TQLabel(i18n("Type:"),hb) |
| 2452 |
hb.setStretchFactor(label,0) |
2464 |
hb.setStretchFactor(label,0) |
| 2453 |
self.mounttypecombo = KComboBox(hb) |
2465 |
self.mounttypecombo = KComboBox(hb) |
| 2454 |
|
2466 |
|
|
Lines 2486-2510
class MountEntryDialog(KDialogBase):
Link Here
|
| 2486 |
#hb.setStretchFactor(self.runlevelcombo,0) |
2498 |
#hb.setStretchFactor(self.runlevelcombo,0) |
| 2487 |
self.connect(self.mounttypecombo, SIGNAL("activated(int)"), self.slotMountTypeChanged) |
2499 |
self.connect(self.mounttypecombo, SIGNAL("activated(int)"), self.slotMountTypeChanged) |
| 2488 |
|
2500 |
|
| 2489 |
widget = QWidget(hb) |
2501 |
widget = TQWidget(hb) |
| 2490 |
hb.setStretchFactor(widget,1) |
2502 |
hb.setStretchFactor(widget,1) |
| 2491 |
|
2503 |
|
| 2492 |
# Create the stack of option edit widgets. |
2504 |
# Create the stack of option edit widgets. |
| 2493 |
gb = QVGroupBox(self.topvbox) |
2505 |
gb = TQVGroupBox(self.topvbox) |
| 2494 |
self.topvbox.setStretchFactor(gb,1) |
2506 |
self.topvbox.setStretchFactor(gb,1) |
| 2495 |
self.optionsstack = QWidgetStack(gb) |
2507 |
self.optionsstack = TQWidgetStack(gb) |
| 2496 |
|
2508 |
|
| 2497 |
for mounttype in self.MountTypeEditors: |
2509 |
for mounttype in self.MountTypeEditors: |
| 2498 |
editpage = self.MountTypeEditors[mounttype](self.optionsstack) |
2510 |
editpage = self.MountTypeEditors[mounttype](self.optionsstack) |
| 2499 |
self.mountTypeToOptionWidget[mounttype] = editpage |
2511 |
self.mountTypeToOptionWidget[mounttype] = editpage |
| 2500 |
self.optionsstack.addWidget(editpage) |
2512 |
self.optionsstack.addWidget(editpage) |
| 2501 |
|
2513 |
|
| 2502 |
self.fsunavailablelabel = QHBox(gb) |
2514 |
self.fsunavailablelabel = TQHBox(gb) |
| 2503 |
self.fsunavailablelabel.setSpacing(KDialog.spacingHint()) |
2515 |
self.fsunavailablelabel.setSpacing(KDialog.spacingHint()) |
| 2504 |
tmplabel = QLabel(self.fsunavailablelabel) |
2516 |
tmplabel = TQLabel(self.fsunavailablelabel) |
| 2505 |
self.fsunavailablelabel.setStretchFactor(tmplabel,0) |
2517 |
self.fsunavailablelabel.setStretchFactor(tmplabel,0) |
| 2506 |
tmplabel.setPixmap(SmallIcon('info')) |
2518 |
tmplabel.setPixmap(SmallIcon('info')) |
| 2507 |
label = QLabel(i18n("This filesystem type is currently unavailable on the running kernel."), |
2519 |
label = TQLabel(i18n("This filesystem type is currently unavailable on the running kernel."), |
| 2508 |
self.fsunavailablelabel) |
2520 |
self.fsunavailablelabel) |
| 2509 |
self.fsunavailablelabel.setStretchFactor(label,1) |
2521 |
self.fsunavailablelabel.setStretchFactor(label,1) |
| 2510 |
self.fsunavailablelabel.hide() |
2522 |
self.fsunavailablelabel.hide() |
|
Lines 2521-2527
class MountEntryDialog(KDialogBase):
Link Here
|
| 2521 |
self.updatingGUI = True |
2533 |
self.updatingGUI = True |
| 2522 |
self.selectEntry(self.currentMountEntry.getMountType()) |
2534 |
self.selectEntry(self.currentMountEntry.getMountType()) |
| 2523 |
self.updatingGUI = False |
2535 |
self.updatingGUI = False |
| 2524 |
if self.exec_loop()==QDialog.Accepted: |
2536 |
if self.exec_loop()==TQDialog.Accepted: |
| 2525 |
# All of the update stuff is in slotOk() |
2537 |
# All of the update stuff is in slotOk() |
| 2526 |
return True |
2538 |
return True |
| 2527 |
return False |
2539 |
return False |
|
Lines 2537-2543
class MountEntryDialog(KDialogBase):
Link Here
|
| 2537 |
self.currentOptionWidget = None |
2549 |
self.currentOptionWidget = None |
| 2538 |
self.selectEntry(self.currentMountEntry.mounttype) |
2550 |
self.selectEntry(self.currentMountEntry.mounttype) |
| 2539 |
self.updatingGUI = False |
2551 |
self.updatingGUI = False |
| 2540 |
if self.exec_loop()==QDialog.Accepted: |
2552 |
if self.exec_loop()==TQDialog.Accepted: |
| 2541 |
self.mounttable.allentries.append(self.currentMountEntry) |
2553 |
self.mounttable.allentries.append(self.currentMountEntry) |
| 2542 |
self.mounttable.updateFstabOnDisk() |
2554 |
self.mounttable.updateFstabOnDisk() |
| 2543 |
return self.currentMountEntry |
2555 |
return self.currentMountEntry |
|
Lines 2657-2684
class MountEntryAdvancedCommonUnixDialog(KDialogBase):
Link Here
|
| 2657 |
def __init__(self,parent,name=None): |
2669 |
def __init__(self,parent,name=None): |
| 2658 |
KDialogBase.__init__(self,parent,name,1,"",KDialogBase.Ok|KDialogBase.Cancel) |
2670 |
KDialogBase.__init__(self,parent,name,1,"",KDialogBase.Ok|KDialogBase.Cancel) |
| 2659 |
|
2671 |
|
| 2660 |
grid = self.makeGridMainWidget(2,Qt.Horizontal) |
2672 |
grid = self.makeGridMainWidget(2,TQt.Horizontal) |
| 2661 |
grid.setSpacing(self.spacingHint()) |
2673 |
grid.setSpacing(self.spacingHint()) |
| 2662 |
|
2674 |
|
| 2663 |
QWidget(grid) |
2675 |
TQWidget(grid) |
| 2664 |
self.accesstimecheckbox = QCheckBox(i18n("Update file access timestamps"),grid) |
2676 |
self.accesstimecheckbox = TQCheckBox(i18n("Update file access timestamps"),grid) |
| 2665 |
|
2677 |
|
| 2666 |
QWidget(grid) |
2678 |
TQWidget(grid) |
| 2667 |
self.allowexecutablecheckbox = QCheckBox(i18n("Allow Executables"),grid) |
2679 |
self.allowexecutablecheckbox = TQCheckBox(i18n("Allow Executables"),grid) |
| 2668 |
|
2680 |
|
| 2669 |
QWidget(grid) |
2681 |
TQWidget(grid) |
| 2670 |
self.allowsuidcheckbox = QCheckBox(i18n("Allow the SUID and SGID attributes"),grid) |
2682 |
self.allowsuidcheckbox = TQCheckBox(i18n("Allow the SUID and SGID attributes"),grid) |
| 2671 |
|
2683 |
|
| 2672 |
QWidget(grid) |
2684 |
TQWidget(grid) |
| 2673 |
self.usedevpointscheckbox = QCheckBox(i18n("Allow device points"),grid) |
2685 |
self.usedevpointscheckbox = TQCheckBox(i18n("Allow device points"),grid) |
| 2674 |
|
2686 |
|
| 2675 |
label = QLabel(i18n("Options:"),grid) |
2687 |
label = TQLabel(i18n("Options:"),grid) |
| 2676 |
self.optionslineedit = KLineEdit(grid) |
2688 |
self.optionslineedit = KLineEdit(grid) |
| 2677 |
|
2689 |
|
| 2678 |
label = QLabel(i18n("fs_freq:"),grid) |
2690 |
label = TQLabel(i18n("fs_freq:"),grid) |
| 2679 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,grid) |
2691 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,grid) |
| 2680 |
|
2692 |
|
| 2681 |
label = QLabel(i18n("fs_passno:"),grid) |
2693 |
label = TQLabel(i18n("fs_passno:"),grid) |
| 2682 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,grid) |
2694 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,grid) |
| 2683 |
|
2695 |
|
| 2684 |
######################################################################## |
2696 |
######################################################################## |
|
Lines 2706-2721
class MountEntryAdvancedPlainDialog(KDialogBase):
Link Here
|
| 2706 |
def __init__(self,parent,name=None): |
2718 |
def __init__(self,parent,name=None): |
| 2707 |
KDialogBase.__init__(self,parent,name,1,"",KDialogBase.Ok|KDialogBase.Cancel) |
2719 |
KDialogBase.__init__(self,parent,name,1,"",KDialogBase.Ok|KDialogBase.Cancel) |
| 2708 |
|
2720 |
|
| 2709 |
grid = self.makeGridMainWidget(2,Qt.Horizontal) |
2721 |
grid = self.makeGridMainWidget(2,TQt.Horizontal) |
| 2710 |
grid.setSpacing(self.spacingHint()) |
2722 |
grid.setSpacing(self.spacingHint()) |
| 2711 |
|
2723 |
|
| 2712 |
label = QLabel(i18n("Options:"),grid) |
2724 |
label = TQLabel(i18n("Options:"),grid) |
| 2713 |
self.optionslineedit = KLineEdit(grid) |
2725 |
self.optionslineedit = KLineEdit(grid) |
| 2714 |
|
2726 |
|
| 2715 |
label = QLabel(i18n("fs_freq:"),grid) |
2727 |
label = TQLabel(i18n("fs_freq:"),grid) |
| 2716 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,grid) |
2728 |
self.fsfreqspinbox = KIntSpinBox (0,1000,1,0,10,grid) |
| 2717 |
|
2729 |
|
| 2718 |
label = QLabel(i18n("fs_passno:"),grid) |
2730 |
label = TQLabel(i18n("fs_passno:"),grid) |
| 2719 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,grid) |
2731 |
self.fspassnospinbox = KIntSpinBox (0,1000,1,0,10,grid) |
| 2720 |
|
2732 |
|
| 2721 |
######################################################################## |
2733 |
######################################################################## |
|
Lines 2802-2808
class MountListViewItem(TDEListViewItem):
Link Here
|
| 2802 |
self.setText(2,"") |
2814 |
self.setText(2,"") |
| 2803 |
self.setText(3,self.haldevice.getDev()) |
2815 |
self.setText(3,self.haldevice.getDev()) |
| 2804 |
self.setText(4,"") |
2816 |
self.setText(4,"") |
| 2805 |
self.setPixmap(4,QPixmap()) |
2817 |
self.setPixmap(4,TQPixmap()) |
| 2806 |
self.__updateIcon() |
2818 |
self.__updateIcon() |
| 2807 |
|
2819 |
|
| 2808 |
######################################################################## |
2820 |
######################################################################## |
|
Lines 2882-2902
class MountConfigApp(programbase):
Link Here
|
| 2882 |
self.selectedentry = None |
2894 |
self.selectedentry = None |
| 2883 |
self.aboutus = TDEAboutApplication(self) |
2895 |
self.aboutus = TDEAboutApplication(self) |
| 2884 |
self.sizeviewdialogs = {} |
2896 |
self.sizeviewdialogs = {} |
| 2885 |
toplayout = QVBoxLayout(topwidget, 0, KDialog.spacingHint()) |
2897 |
toplayout = TQVBoxLayout(topwidget, 0, KDialog.spacingHint()) |
| 2886 |
#topwidget.setEnabled(isroot) |
2898 |
#topwidget.setEnabled(isroot) |
| 2887 |
|
2899 |
|
| 2888 |
hb = QHBox(topwidget) |
2900 |
hb = TQHBox(topwidget) |
| 2889 |
hb.setSpacing(KDialog.spacingHint()) |
2901 |
hb.setSpacing(KDialog.spacingHint()) |
| 2890 |
#if standalone: |
2902 |
#if standalone: |
| 2891 |
# hb.setMargin(KDialog.marginHint()) |
2903 |
# hb.setMargin(KDialog.marginHint()) |
| 2892 |
|
2904 |
|
| 2893 |
toplayout.addWidget(hb) |
2905 |
toplayout.addWidget(hb) |
| 2894 |
|
2906 |
|
| 2895 |
label = QLabel(hb) |
2907 |
label = TQLabel(hb) |
| 2896 |
label.setPixmap(UserIcon("kcmpartitions")) |
2908 |
label.setPixmap(UserIcon("kcmpartitions")) |
| 2897 |
hb.setStretchFactor(label,0) |
2909 |
hb.setStretchFactor(label,0) |
| 2898 |
|
2910 |
|
| 2899 |
label = QLabel(i18n("Available Disks and Filesystems:"),hb) |
2911 |
label = TQLabel(i18n("Available Disks and Filesystems:"),hb) |
| 2900 |
hb.setStretchFactor(label,1) |
2912 |
hb.setStretchFactor(label,1) |
| 2901 |
|
2913 |
|
| 2902 |
self.mountlist = TDEListView(topwidget,"Mount list") |
2914 |
self.mountlist = TDEListView(topwidget,"Mount list") |
|
Lines 2907-2923
class MountConfigApp(programbase):
Link Here
|
| 2907 |
self.mountlist.addColumn(i18n("Device")) |
2919 |
self.mountlist.addColumn(i18n("Device")) |
| 2908 |
self.mountlist.addColumn(i18n("Enabled")) |
2920 |
self.mountlist.addColumn(i18n("Enabled")) |
| 2909 |
self.mountlist.setAllColumnsShowFocus(True) |
2921 |
self.mountlist.setAllColumnsShowFocus(True) |
| 2910 |
self.mountlist.setSelectionMode(QListView.Single) |
2922 |
self.mountlist.setSelectionMode(TQListView.Single) |
| 2911 |
self.mountlist.setRootIsDecorated(True) |
2923 |
self.mountlist.setRootIsDecorated(True) |
| 2912 |
self.mountlist.setSorting(-1) |
2924 |
self.mountlist.setSorting(-1) |
| 2913 |
self.connect(self.mountlist, SIGNAL("selectionChanged(QListViewItem *)"), self.slotListClicked) |
2925 |
self.connect(self.mountlist, SIGNAL("selectionChanged(TQListViewItem *)"), self.slotListClicked) |
| 2914 |
# Doubleclick in item opens modify dialogue. |
2926 |
# Doubleclick in item opens modify dialogue. |
| 2915 |
self.connect(self.mountlist, SIGNAL("doubleClicked(QListViewItem *)"), self.slotModifyClicked) |
2927 |
self.connect(self.mountlist, SIGNAL("doubleClicked(TQListViewItem *)"), self.slotModifyClicked) |
| 2916 |
# Rightclick: Open ContextMenu |
2928 |
# Rightclick: Open ContextMenu |
| 2917 |
self.connect(self.mountlist, SIGNAL("contextMenu(TDEListView*,QListViewItem*,const QPoint&)"), |
2929 |
self.connect(self.mountlist, SIGNAL("contextMenu(TDEListView*,TQListViewItem*,const TQPoint&)"), |
| 2918 |
self.slotContextMenu) |
2930 |
self.slotContextMenu) |
| 2919 |
|
2931 |
|
| 2920 |
hbox = QHBox(topwidget) |
2932 |
hbox = TQHBox(topwidget) |
| 2921 |
toplayout.addWidget(hbox) |
2933 |
toplayout.addWidget(hbox) |
| 2922 |
hbox.setSpacing(KDialog.spacingHint()) |
2934 |
hbox.setSpacing(KDialog.spacingHint()) |
| 2923 |
|
2935 |
|