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

List:       kde-commits
Subject:    kdebase/konsole/konsole [POSSIBLY UNSAFE]
From:       Kurt Hindenburg <khindenburg () cherrynebula ! net>
Date:       2004-09-30 15:43:57
Message-ID: 20040930154357.00DD4126C6 () office ! kde ! org
[Download RAW message or body]

CVS commit by hindenburg: 

Add --keytabs cmd line option (partial BR80226)


  M +16 -1     main.cpp   1.271 [POSSIBLY UNSAFE: printf]


--- kdebase/konsole/konsole/main.cpp  #1.270:1.271
@@ -76,4 +76,5 @@ static KCmdLineOptions options[] =
    { "types",           I18N_NOOP("List available session types"), 0 },
    { "keytab <name>",   I18N_NOOP("Use given .keytab file"), 0 },
+   { "keytabs",         I18N_NOOP("List available keytabs"), 0 },
    { "profile <name>",  I18N_NOOP("Start with given sessions profile"), 0 },
    { "profiles",        I18N_NOOP("List available profiles"), 0 },
@@ -353,9 +354,23 @@ extern "C" int kdemain(int argc, char* a
   }
 
+  if(args->isSet("keytabs")) {
+    QStringList lst = KGlobal::dirs()->findAllResources("data", "konsole/*.keytab");
+
+    printf("default\n");   // 'buildin' keytab
+    lst.sort();
+    for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+    {
+      QFileInfo fi(*it);
+      QString file = fi.baseName();
+      printf("%s\n", QFile::encodeName(file).data());
+    }
+    return 0;
+  }
+
   QString workDir = QFile::decodeName( args->getOption("workdir") );
 
   QString keytab = "";
   if (args->isSet("keytab"))
-    keytab = args->getOption("keytab");
+    keytab = QFile::decodeName(args->getOption("keytab"));
 
   QString schema = "";


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

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