[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    PATCH: KSysV Bug #12361 and #6265
From:       Peter Putzer <pputzer () edu ! uni-klu ! ac ! at>
Date:       2000-10-08 9:12:31
[Download RAW message or body]

The attached patch fixes bugs #12361 and #6265 (related to editing
services).

May I apply and move the tag?

regards,
Peter

["bug-12361-and-6265.diff" (TEXT/PLAIN)]

Index: OldView.cpp
===================================================================
RCS file: /home/kde/kdeadmin/ksysv/OldView.cpp,v
retrieving revision 1.93
diff -u -3 -p -r1.93 OldView.cpp
--- OldView.cpp	2000/08/16 17:42:01	1.93
+++ OldView.cpp	2000/10/08 09:10:09
@@ -141,10 +141,7 @@ void KSVContent::updateServicesAfterChan
     return;
 
   const bool enabled = scripts->isEnabled ();
-  scripts->setEnabled (false);
-  scripts->clear();
   initScripts();
-  scripts->setEnabled (enabled);
 }
 
 void KSVContent::updateRunlevelsAfterChange ()
@@ -388,6 +385,10 @@ void KSVContent::initScripts() {
 
   KCompletion* comp = ksv::serviceCompletion();
   comp->clear ();
+  
+  // clear the listview
+  scripts->setEnabled(false);
+  scripts->clear();
 
   QFileInfo* fi; QString name;
   while ((fi = it.current()))
@@ -405,6 +406,7 @@ void KSVContent::initScripts() {
       qApp->processEvents();
     }
 
+  scripts->setEnabled(true);
   scripts->setToolTip (i18n("The services available on your computer"));
 }
 
@@ -412,6 +414,10 @@ void KSVContent::initRunlevels()
 {
   for (int i = 0; i < ksv::runlevelNumber; ++i)
     {
+      // clear the listviews
+      startRL[i]->clear();
+      stopRL[i]->clear();
+
       const QString _path = conf->runlevelPath() + QString("/rc%1.d").arg(i);
 
       if (!QDir(_path).exists())
@@ -634,7 +640,7 @@ void KSVContent::editService (const QStr
 
   QFileInfo fi (path);
 
-  if (fi.isReadable() && fi.isWritable())
+  if (fi.isReadable())
     {
       KProcess proc;
       proc << "kwrite" << path;
Index: ServiceDlg.cpp
===================================================================
RCS file: /home/kde/kdeadmin/ksysv/ServiceDlg.cpp,v
retrieving revision 1.8
diff -u -3 -p -r1.8 ServiceDlg.cpp
--- ServiceDlg.cpp	2000/08/16 17:42:01	1.8
+++ ServiceDlg.cpp	2000/10/08 09:10:10
@@ -86,7 +86,7 @@ void ServiceDlg::resetChooser(KSVDragLis
       
       if (edit)
 		{
-		  if (info.isReadable() && info.isWritable())
+		  if (info.isReadable())
 			mServices->insertItem(item->label());
 		  
 		  mMapServices[item->label()] = item;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic