summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-23 00:35:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-23 00:35:03 +0000
commit608d620c37af696840bed60ffa9d7d5098a8b3d4 (patch)
tree6331639945b3574ad796b738d9e8640760b421f4
parent038192db168d9708aacfce2b30af3680587dc5b4 (diff)
downloadtdebase-608d620c37af696840bed60ffa9d7d5098a8b3d4.tar.gz
tdebase-608d620c37af696840bed60ffa9d7d5098a8b3d4.zip
Fix broken Documents shortcut in KMenu
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1178412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kdesktop/kxdglauncher.cpp34
-rw-r--r--kioslave/system/entries/documents.desktop83
2 files changed, 91 insertions, 26 deletions
diff --git a/kdesktop/kxdglauncher.cpp b/kdesktop/kxdglauncher.cpp
index b22a2a5d7..da650aeee 100644
--- a/kdesktop/kxdglauncher.cpp
+++ b/kdesktop/kxdglauncher.cpp
@@ -83,6 +83,7 @@ TQString getDocumentPath()
static KCmdLineOptions options[] =
{
{ "xdgname <argument>", I18N_NOOP("XDG variable name to open"), 0 },
+ { "getpath", I18N_NOOP("Do not launch Konqueror; instead print path to directory if it exists)"), 0 },
KCmdLineLastOption
};
@@ -100,16 +101,21 @@ int main( int argc, char **argv)
if (desiredFolder == "DOCUMENTS") {
TQDir myqdir;
if (myqdir.exists(getDocumentPath(), TRUE) == true) {
- KRun * run = new KRun( KURL(getDocumentPath()), 0, false, false );
- TQObject::connect( run, TQT_SIGNAL( finished() ), &app, TQT_SLOT( quit() ));
- TQObject::connect( run, TQT_SIGNAL( error() ), &app, TQT_SLOT( quit() ));
- app.exec();
- return 0;
+ if (args->isSet( "getpath" ) == true) {
+ printf("%s\n\r", getDocumentPath().ascii());
+ return 0;
+ }
+ else {
+ KRun * run = new KRun( KURL(getDocumentPath()), 0, false, false );
+ TQObject::connect( run, TQT_SIGNAL( finished() ), &app, TQT_SLOT( quit() ));
+ TQObject::connect( run, TQT_SIGNAL( error() ), &app, TQT_SLOT( quit() ));
+ app.exec();
+ return 0;
+ }
}
else {
TQString newDirectory = KInputDialog::text("Create Documents directory", "Please confirm your Documents directory location<br>Upon confimation a new directory will be created", getDocumentPath());
if (newDirectory == TQString::null) {
- printf("User cancelled directory creation\n\r");
return 1;
}
else {
@@ -118,10 +124,16 @@ int main( int argc, char **argv)
char systemcommand[8192];
sprintf(systemcommand, "xdg-user-dirs-update --set DOCUMENTS \"%s\"", newDirectory.ascii());
system(systemcommand);
- KRun * run = new KRun( getDocumentPath(), 0, false, false );
- TQObject::connect( run, TQT_SIGNAL( finished() ), &app, TQT_SLOT( quit() ));
- TQObject::connect( run, TQT_SIGNAL( error() ), &app, TQT_SLOT( quit() ));
- app.exec();
+ if (args->isSet( "getpath" ) == true) {
+ printf("%s\n\r", getDocumentPath().ascii());
+ return 0;
+ }
+ else {
+ KRun * run = new KRun( getDocumentPath(), 0, false, false );
+ TQObject::connect( run, TQT_SIGNAL( finished() ), &app, TQT_SLOT( quit() ));
+ TQObject::connect( run, TQT_SIGNAL( error() ), &app, TQT_SLOT( quit() ));
+ app.exec();
+ }
return 0;
}
else {
@@ -145,4 +157,4 @@ int main( int argc, char **argv)
printf("Please specify the desired XDG variable name with --xdgname\n\r");
return 1;
}
-} \ No newline at end of file
+}
diff --git a/kioslave/system/entries/documents.desktop b/kioslave/system/entries/documents.desktop
index ca461a586..225149c25 100644
--- a/kioslave/system/entries/documents.desktop
+++ b/kioslave/system/entries/documents.desktop
@@ -1,16 +1,69 @@
[Desktop Entry]
-Encoding=UTF-8
-Comment=
-Comment[en_US]=
-Exec=kxdglauncher --xdgname DOCUMENTS
-Icon=folder_wordprocessing
-MimeType=
-Name=My Documents
-Name[en_US]=My Documents
-StartupNotify=true
-Terminal=false
-TerminalOptions=
-Type=Application
-X-DCOP-ServiceType=
-X-KDE-SubstituteUID=false
-X-KDE-Username=
+Type=Link
+Path[$e]=$( kxdglauncher --getpath --xdgname DOCUMENTS )
+Icon=folder_man
+Name=Documents Folder
+Name[af]=Dokument Gids
+Name[ar]=مستنداتي
+Name[be]=Тэчка для дакументаў
+Name[bg]=Директория с документи
+Name[bn]=ডকুমেন্ট ফোল্ডার
+Name[br]=Renkell an teulioù
+Name[bs]=Direktorij dokumenata
+Name[ca]=Carpeta de documents
+Name[cs]=Složka s dokumenty
+Name[csb]=Katalog dokùmentów
+Name[da]=Dokumentmappe
+Name[de]=Dokumente
+Name[el]=Φάκελος εγγράφων
+Name[eo]=Dokumenta dosierujo
+Name[es]=Carpeta de documentos
+Name[et]=Dokumentide kataloog
+Name[eu]=Dokumentuen karpeta
+Name[fa]=پوشۀ مستندات
+Name[fi]=Asiakirjakansio
+Name[fr]=Dossier des documents
+Name[fy]=Ofkeppele kamera
+Name[ga]=Fillteán na gCáipéisí
+Name[gl]=Cartafol de Documentos
+Name[he]=תיקיית מסמכים
+Name[hr]=Mapa dokumenata
+Name[hu]=Dokumentumok könyvtár
+Name[is]=Skjalamappa
+Name[it]=Cartella documenti
+Name[ja]=ドキュメントフォルダ
+Name[ka]=დოკუმენტების დასტა
+Name[kk]=Құжаттар қапшығы
+Name[km]=ថត​ឯកសារ
+Name[ko]=문서 탐색기
+Name[lt]=Dokumentų aplankai
+Name[mk]=Папка со документи
+Name[nb]=Dokumentmappe
+Name[nds]=Dokmenten-Orner
+Name[ne]=कागजात फोल्डर
+Name[nl]=Documenten
+Name[nn]=Dokumentmappe
+Name[pa]=ਦਸਤਾਵੇਜ਼ ਫੋਲਡਰ
+Name[pl]=Katalog dokumentów
+Name[pt]=Pasta de Documentos
+Name[pt_BR]=Pasta de Documentos
+Name[ro]=Folder documente
+Name[ru]=Документы
+Name[se]=Dokumeantamáhppa
+Name[sk]=Priečinok dokumentov
+Name[sl]=Mapa z dokumenti
+Name[sr]=Фасцикла са документима
+Name[sr@Latn]=Fascikla sa dokumentima
+Name[sv]=Dokumentkatalog
+Name[te]=పత్రాల ఫొల్డర్
+Name[tg]=Ҳуҷҷатҳо
+Name[th]=โฟลเดอร์เอกสาร
+Name[tr]=Belgeler Dizini
+Name[uk]=Тека документів
+Name[uz]=Hujjatlar jildi
+Name[uz@cyrillic]=Ҳужжатлар жилди
+Name[vi]=Thư mục Tà i liệu
+Name[wa]=Ridant documints
+Name[zh_CN]=文档文件夹
+Name[zh_TW]=文件目錄
+