diff options
author | Fritz Elfert <felfert@to.com> | 2003-02-03 00:29:36 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2003-02-03 00:29:36 +0000 |
commit | 16f3f8103b3e8bc8c6c795814b49d9abe9049fb6 (patch) | |
tree | ab095bae56838e5a60dfa3bfdbc6f0c6d0ceade4 /kde2/kpsion | |
parent | 20fd9533247b920411029c6692c8dfbfad37e38b (diff) | |
download | plptools-16f3f8103b3e8bc8c6c795814b49d9abe9049fb6.tar.gz plptools-16f3f8103b3e8bc8c6c795814b49d9abe9049fb6.tar.bz2 plptools-16f3f8103b3e8bc8c6c795814b49d9abe9049fb6.zip |
- Fixed behavior of kpsion when called with URL from konquerors
context-popup.
Diffstat (limited to 'kde2/kpsion')
-rw-r--r-- | kde2/kpsion/kpsion.cpp | 80 | ||||
-rw-r--r-- | kde2/kpsion/main.cpp | 2 |
2 files changed, 60 insertions, 22 deletions
diff --git a/kde2/kpsion/kpsion.cpp b/kde2/kpsion/kpsion.cpp index 18e9374..d00f1af 100644 --- a/kde2/kpsion/kpsion.cpp +++ b/kde2/kpsion/kpsion.cpp @@ -519,14 +519,24 @@ slotAutoAction() { QCStringList::Iterator it; for (it = argl.begin(); it != argl.end(); ++it) { - QString drv((*it).upper()); - - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) { - i->setSelected(true); - any = true; + i = 0L; + if ((*it).left(7) == "psion:/") { + QString volname((*it).mid(7)); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->text().startsWith(volname + " ")) + break; + } + } else { + QString drv((*it).upper()); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->key() == drv) + break; } } + if (i) { + i->setSelected(true); + any = true; + } } if (any) { fullBackup = true; @@ -543,18 +553,29 @@ slotAutoAction() { QCStringList::Iterator it; for (it = argl.begin(); it != argl.end(); ++it) { - QString drv((*it).upper()); - if (drv == "Z") { - KMessageBox::sorry(this, i18n( - "<QT>The selected drive <B>Z:</B> is " - "a <B>ROM</B> drive and therefore cannot be restored.</QT>")); - continue; + i = 0L; + if ((*it).left(7) == "psion:/") { + QString volname((*it).mid(7)); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->text().startsWith(volname + " ")) + break; + } + } else { + QString drv((*it).upper()); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->key() == drv) + break; + } } - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) { - i->setSelected(true); - any = true; + if (i) { + if (i->key() == "Z") { + KMessageBox::sorry(this, i18n( + "<QT>The selected drive <B>Z:</B> is " + "a <B>ROM</B> drive and therefore cannot be restored.</QT>")); + continue; } + i->setSelected(true); + any = true; } } if (any) @@ -569,12 +590,29 @@ slotAutoAction() { QCStringList::Iterator it; for (it = argl.begin(); it != argl.end(); ++it) { - QString drv((*it).upper()); - for (i = view->firstItem(); i; i = i->nextItem()) { - if (i->key() == drv) { - i->setSelected(true); - any = true; + i = 0L; + if ((*it).left(7) == "psion:/") { + QString volname((*it).mid(7)); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->text().startsWith(volname + " ")) + break; + } + } else { + QString drv((*it).upper()); + for (i = view->firstItem(); i; i = i->nextItem()) { + if (i->key() == drv) + break; + } + } + if (i) { + if (i->key() == "Z") { + KMessageBox::sorry(this, i18n( + "<QT>The selected drive <B>Z:</B> is " + "a <B>ROM</B> drive and therefore cannot be formatted.</QT>")); + continue; } + i->setSelected(true); + any = true; } } if (any) diff --git a/kde2/kpsion/main.cpp b/kde2/kpsion/main.cpp index 5a7ac20..8947101 100644 --- a/kde2/kpsion/main.cpp +++ b/kde2/kpsion/main.cpp @@ -102,7 +102,7 @@ int main(int argc, char **argv) { if (acnt > 1) KCmdLineArgs::usage(i18n( - "The options are mutually exclusive. " + "The actions are mutually exclusive. " "I.e. You cannot specify more than one action at once.")); KPsionMainWindow *w = new KPsionMainWindow(); |