Commits

Shlomi Fish committed 7b1ae29

Add a command line configuration.

Currently giving me a:

set_kde4_virtual_desktop_names: Unexpected argument 'Foo'.
set_kde4_virtual_desktop_names: Use --help to get a list of available command line options.

  • Participants
  • Parent commits dd07665

Comments (0)

Files changed (1)

File set-kde-virtual-desktops-names/set_names.cpp

     KCmdLineArgs::init( argc, argv, &aboutData );
     KApplication app;
 
+    KCmdLineArgs * parsedArgs = KCmdLineArgs::parsedArgs();
+
     QStringList desktopNames;
 
-    desktopNames << "Main";
-    desktopNames << "Devel";
-    desktopNames << "Chat";
-    desktopNames << "Donkey";
-    desktopNames << "Music";
-    desktopNames << "Config";
-    desktopNames << "Desktop 7";
-    desktopNames << "Games";
+    for (int i = 0; i < parsedArgs->count() ; i++)
+    {
+        desktopNames << parsedArgs->arg(i);
+    }
 
     int numDesktops = desktopNames.count();