[devel] kdenonbeta/kdedebian/kalternatives/src
Mario Bensi <[email protected]> Wed, 3 Nov 2004 22:35:51 +0100 (CET)
| Newsgroups | gmane.comp.kde.devel.debian |
|---|---|
| Message-ID | <20041103213551.83F0F16CA8__24453.3583675095$1099517803$gmane$org@office.kde.org> |
CVS commit by bensi:
disable buttons add ans remove, combobox state and qcheckbox in user mode
M +9 -2 kalternatives.cpp 1.24
--- kdenonbeta/kdedebian/kalternatives/src/kalternatives.cpp #1.23:1.24
@@ -62,5 +62,4 @@ Kalternatives::Kalternatives(QWidget *pa
int user = getuid();
- //FIXME: This won't be needed as kcm
if (user == 0)
@@ -120,4 +119,11 @@ m_mgr = new AltFilesManager("/var/lib/rp
mainwindow->m_bProperties->setGuiItem(KGuiItem( i18n( "&Properties" ), "configure"));
+ if(!m_bisRoot)
+ {
+ mainwindow->m_bDelete->setEnabled(false);
+ mainwindow->m_bAdd->setEnabled(false);
+ m_statusCombo->setEnabled(false);
+ }
+
myAboutData = new KAboutData("KalternativesKCM", "Kalternatives", KALT_VERSION, i18n("KDE Mandrake/Debian alternatives-system manager"),
KAboutData::License_GPL, "(c) 2004 Juanjo Alvarez Martinez and Mario Bensi", 0, 0 );
@@ -170,4 +176,5 @@ void Kalternatives::load()
{
ael = new AltItemElement(m_optionsList, a);
+ if(!m_bisRoot) ael->setEnabled(false);
treeit->getAltController()->addAltItem(ael);
}
@@ -266,5 +273,5 @@ void Kalternatives::slotOptionClicked(QL
if((altItem = dynamic_cast<AltItemElement *>(option)))
{
- if( !altItem->isOn() )
+ if( !altItem->isOn())
return;
TreeItemElement *treeItem;