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

List:       kde-commits
Subject:    kdereview/autostart
From:       Laurent Montel <montel () kde ! org>
Date:       2008-03-17 7:35:19
Message-ID: 1205739319.578825.6166.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 786493 by mlaurent:

Fix enable/disable


 M  +5 -5      autostart.cpp  
 M  +1 -1      autostart.h  


--- trunk/kdereview/autostart/autostart.cpp #786492:786493
@@ -100,7 +100,7 @@
             bool disable = ( item->checkState( col ) == Qt::Unchecked );
             KDesktopFile kc(entry->fileName().path());
             KConfigGroup grp = kc.desktopGroup();
-            grp.writeEntry("Hidden", !disable);
+            grp.writeEntry("Hidden", disable);
             kc.sync();
             if ( disable )
                 item->setText( COL_STATUS, i18n( "Disabled" ) );
@@ -116,8 +116,8 @@
     item->setText( COL_NAME, name );
     item->setText( COL_RUN, run );
     item->setText( COL_COMMAND, command );
-    item->setCheckState( COL_STATUS, status ? Qt::Checked : Qt::Unchecked );
-    item->setText( COL_STATUS, status ? i18n( "Enabled" ) : i18n( "Disabled" ) );
+    item->setCheckState( COL_STATUS, status ? Qt::Unchecked : Qt::Checked );
+    item->setText( COL_STATUS, status ? i18n( "Disabled" ) : i18n( "Enabled" ));
 }
 
 void Autostart::addItem(ScriptStartItem *item, const QString& name, const QString& \
command, ScriptStartItem::ENV type ) @@ -253,7 +253,7 @@
             return;
     }
     DesktopStartItem * item = new DesktopStartItem( KGlobalSettings::autostartPath() \
                + service->name() + ".desktop", m_programItem,this );
-    addItem( item, service->name(), \
m_pathName.value(m_paths.indexOf((item->fileName().directory()+'/') )),  \
service->exec() ); +    addItem( item, service->name(), \
m_pathName.value(m_paths.indexOf((item->fileName().directory()+'/') )),  \
service->exec() , false);  emit changed(true);
 }
 
@@ -306,7 +306,7 @@
         DesktopStartItem *desktopEntry = dynamic_cast<DesktopStartItem*>( entry );
         if (desktopEntry) {
             KService service(desktopEntry->fileName().path());
-            addItem( desktopEntry, service.name(), \
m_pathName.value(m_paths.indexOf((desktopEntry->fileName().directory()+'/') )), \
service.exec() ); +            addItem( desktopEntry, service.name(), \
m_pathName.value(m_paths.indexOf((desktopEntry->fileName().directory()+'/') )), \
service.exec(),false );  }
     }
 }
--- trunk/kdereview/autostart/autostart.h #786492:786493
@@ -52,7 +52,7 @@
     void slotChangeStartup( int index );
 
 protected:
-    void addItem(DesktopStartItem *item, const QString& name, const QString& run, \
const QString& command, bool status=true ); +    void addItem(DesktopStartItem *item, \
                const QString& name, const QString& run, const QString& command, bool \
                disable );
     void addItem(ScriptStartItem *item, const QString& name, const QString& command, \
ScriptStartItem::ENV type );  public slots:
     void slotAddProgram();


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

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