Diffstat (limited to 'noncore/settings/networksettings/ppp/devices.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/devices.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp index 9da090d..350ff32 100644 --- a/noncore/settings/networksettings/ppp/devices.cpp +++ b/noncore/settings/networksettings/ppp/devices.cpp | |||
@@ -51,53 +51,53 @@ | |||
51 | 51 | ||
52 | 52 | ||
53 | void parseargs(char* buf, char** args); | 53 | void parseargs(char* buf, char** args); |
54 | 54 | ||
55 | DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *name, WFlags f ) | 55 | DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *name, WFlags f ) |
56 | : ChooserWidget(ip->data(), parent, name, f) | 56 | : ChooserWidget(ip->data(), parent, name, f) |
57 | { | 57 | { |
58 | _ifaceppp = ip; | 58 | _ifaceppp = ip; |
59 | QWhatsThis::add(edit_b, tr("Allows you to modify the selected device")); | 59 | QWhatsThis::add(edit_b, tr("Allows you to modify the selected device")); |
60 | QWhatsThis::add(new_b, tr("Create a new device") ); | 60 | QWhatsThis::add(new_b, tr("Create a new device") ); |
61 | 61 | ||
62 | QWhatsThis::add(copy_b, | 62 | QWhatsThis::add(copy_b, |
63 | tr("Makes a copy of the selected device. All\n" | 63 | tr("Makes a copy of the selected device. All\n" |
64 | "settings of the selected device are copied\n" | 64 | "settings of the selected device are copied\n" |
65 | "to a new device, that you can modify to fit your\n" | 65 | "to a new device, that you can modify to fit your\n" |
66 | "needs")); | 66 | "needs")); |
67 | QWhatsThis::add(delete_b, | 67 | QWhatsThis::add(delete_b, |
68 | tr("<p>Deletes the selected device\n\n" | 68 | tr("<p>Deletes the selected device\n\n" |
69 | "<font color=\"red\"><b>Use with care!</b></font>")); | 69 | "<font color=\"red\"><b>Use with care!</b></font>")); |
70 | 70 | ||
71 | copy_b->setEnabled( false ); //FIXME | 71 | copy_b->setEnabled( false ); //FIXME |
72 | // delete_b->setEnabled( false ); //FIXME | 72 | // delete_b->setEnabled( false ); //FIXME |
73 | 73 | ||
74 | QStringList tmp = _pppdata->getDevicesNamesList(); | 74 | QStringList tmp = _pppdata->getDevicesNamesList(); |
75 | qDebug("DevicesWidget::DevicesWidget got devices %s",tmp.join("--").latin1()); | 75 | odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl; |
76 | listListbox->insertStringList(tmp); | 76 | listListbox->insertStringList(tmp); |
77 | 77 | ||
78 | for (uint i = 0; i < listListbox->count(); i++){ | 78 | for (uint i = 0; i < listListbox->count(); i++){ |
79 | qDebug("listListbox->text(i) %s == _pppdata->devname() %s",listListbox->text(i).latin1(), _pppdata->devname().latin1()); | 79 | odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl; |
80 | if ( listListbox->text(i) == _pppdata->devname() ) | 80 | if ( listListbox->text(i) == _pppdata->devname() ) |
81 | listListbox->setCurrentItem( i ); | 81 | listListbox->setCurrentItem( i ); |
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
86 | 86 | ||
87 | void DevicesWidget::slotListBoxSelect(int idx) { | 87 | void DevicesWidget::slotListBoxSelect(int idx) { |
88 | bool ok = _pppdata->setDevice( listListbox->text(idx) ); | 88 | bool ok = _pppdata->setDevice( listListbox->text(idx) ); |
89 | delete_b->setEnabled((bool)(idx != -1)); | 89 | delete_b->setEnabled((bool)(idx != -1)); |
90 | edit_b->setEnabled((bool)(idx != -1)); | 90 | edit_b->setEnabled((bool)(idx != -1)); |
91 | //FIXME copy_b->setEnabled((bool)(idx != -1)); | 91 | //FIXME copy_b->setEnabled((bool)(idx != -1)); |
92 | } | 92 | } |
93 | 93 | ||
94 | void DevicesWidget::edit() { | 94 | void DevicesWidget::edit() { |
95 | _pppdata->setDevice(listListbox->text(listListbox->currentItem())); | 95 | _pppdata->setDevice(listListbox->text(listListbox->currentItem())); |
96 | 96 | ||
97 | int result = doTab(); | 97 | int result = doTab(); |
98 | 98 | ||
99 | if(result == QDialog::Accepted) { | 99 | if(result == QDialog::Accepted) { |
100 | listListbox->changeItem(_pppdata->devname(),listListbox->currentItem()); | 100 | listListbox->changeItem(_pppdata->devname(),listListbox->currentItem()); |
101 | _pppdata->save(); | 101 | _pppdata->save(); |
102 | } | 102 | } |
103 | } | 103 | } |