From 120eb33de2682def56107f8e176d3f6587b75841 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 16 Feb 2020 20:16:52 +0900 Subject: Fixed handling of terminal application. Signed-off-by: Michele Calgaro (cherry picked from commit fc885d70c1c3c49f2179f27477c3f257e8a4c489) --- src/dolphin.cpp | 12 ++-- src/servicemenus/CMakeLists.txt | 3 +- src/servicemenus/Makefile.am.new | 4 +- src/servicemenus/konsolehere.desktop | 123 ---------------------------------- src/servicemenus/terminalhere.desktop | 90 +++++++++++++++++++++++++ 5 files changed, 102 insertions(+), 130 deletions(-) delete mode 100644 src/servicemenus/konsolehere.desktop create mode 100644 src/servicemenus/terminalhere.desktop (limited to 'src') diff --git a/src/dolphin.cpp b/src/dolphin.cpp index f9e984d..747eb93 100644 --- a/src/dolphin.cpp +++ b/src/dolphin.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -922,11 +923,14 @@ void Dolphin::goHome() void Dolphin::openTerminal() { - TQString command("konsole --workdir \""); - command.append(m_activeView->url().path()); - command.append('\"'); + TDEConfig * config = kapp->config(); + config->setGroup("General"); + TQString term = config->readPathEntry("TerminalApplication", "konsole"); - KRun::runCommand(command, "Konsole", "konsole"); + TDEProcess proc; + proc << term; + proc.setWorkingDirectory(m_activeView->url().path()); + proc.start(TDEProcess::DontCare); } void Dolphin::findFile() diff --git a/src/servicemenus/CMakeLists.txt b/src/servicemenus/CMakeLists.txt index 2137870..41af136 100644 --- a/src/servicemenus/CMakeLists.txt +++ b/src/servicemenus/CMakeLists.txt @@ -23,11 +23,12 @@ install( FILES k3b_handle_empty_cd.desktop k3b_handle_empty_dvd.desktop k3b_videodvd_rip.desktop k3b_write_bin_image.desktop k3b_write_iso_image.desktop kdesktopSetAsBackground.desktop - konqgwenview.desktop konsolehere.desktop + konqgwenview.desktop mail_as_attachment.desktop media_eject.desktop media_mount.desktop media_realfolder.desktop media_safelyremove.desktop media_unmount.desktop open_in_digikam.desktop run_as_root.desktop smb2rdc.desktop + terminalhere.desktop text-ada-print.desktop text-c++-print.desktop text-c++h-print.desktop text-ch-print.desktop text-css-print.desktop text-diff-print.desktop diff --git a/src/servicemenus/Makefile.am.new b/src/servicemenus/Makefile.am.new index 45d121f..e8c285c 100644 --- a/src/servicemenus/Makefile.am.new +++ b/src/servicemenus/Makefile.am.new @@ -7,9 +7,9 @@ servicemenus_DATA = compress.desktop amarok_addaspodcast.desktop amarok_append.d k3b_create_video_cd.desktop k3b_dvd_copy.desktop k3b_handle_empty_cd.desktop \ k3b_handle_empty_dvd.desktop k3b_videodvd_rip.desktop k3b_write_bin_image.desktop \ k3b_write_iso_image.desktop kdesktopSetAsBackground.desktop konqgwenview.desktop \ - konsolehere.desktop mail_as_attachment.desktop media_eject.desktop media_mount.desktop \ + mail_as_attachment.desktop media_eject.desktop media_mount.desktop \ media_realfolder.desktop media_safelyremove.desktop media_unmount.desktop \ - open_in_digikam.desktop run_as_root.desktop smb2rdc.desktop text-ada-print.desktop \ + open_in_digikam.desktop run_as_root.desktop smb2rdc.desktop terminalhere.desktop text-ada-print.desktop \ text-c++-print.desktop text-c++h-print.desktop text-ch-print.desktop text-css-print.desktop \ text-diff-print.desktop text-html-print.desktop text-java-print.desktop text-log-print.desktop \ text-makefile-print.desktop text-pas-print.desktop text-perl-print.desktop text-print.desktop \ diff --git a/src/servicemenus/konsolehere.desktop b/src/servicemenus/konsolehere.desktop deleted file mode 100644 index db7c5f6..0000000 --- a/src/servicemenus/konsolehere.desktop +++ /dev/null @@ -1,123 +0,0 @@ -[Desktop Entry] -X-TDE-ServiceTypes=inode/directory -Actions=openTerminalHere; -X-TDE-AuthorizeAction=shell_access -Encoding=UTF-8 -Type=Application - -Name=Konsole -Name[ar]=طرفية التحكم -Name[az]=Konsol -Name[be]=Кансоль -Name[bg]=Конзола -Name[bn]=কনসোল -Name[bs]=Konzola -Name[ca]=Consola -Name[csb]=Kònsola -Name[el]=Κονσόλα -Name[eo]=Konzolo -Name[et]=Konsool -Name[eu]=Kontsola -Name[he]=מסוף -Name[hi]=कंसोल -Name[hr]=Konzola -Name[is]=Skjáhermir -Name[ko]=TDE용 콘솔 -Name[lo]=ຄອນໂຊລ - K -Name[mk]=Конзола -Name[mn]=Консол -Name[nb]=Konsoll -Name[ne]=कन्सोल -Name[nn]=Konsoll -Name[pa]=ਕੰਨਸੋਲ -Name[pl]=Konsola -Name[ro]=Consolă -Name[ru]=Консоль -Name[se]=Konsolla -Name[sk]=Konzola -Name[sl]=Konzola -Name[ta]=கான்சோல் -Name[te]=కాన్సోల్ -Name[tg]=Консол -Name[th]=คอนโซล K -Name[zu]=Ikhonsoli - -[Desktop Action openTerminalHere] -Name=Open Terminal Here -Name[af]=Maak Terminaal Hier Oop -Name[ar]=إفتح مطراف سطر الأوامر هنا -Name[az]=Terminalı Burada Aç -Name[be]=Адкрыць тэрмінал тут -Name[bg]=Отваряне на конзола тук -Name[bn]=এখানে টার্মিনাল খোলো -Name[br]=Digeriñ un termenell amañ -Name[bs]=Otvori terminal ovdje -Name[ca]=Obre un terminal aquí -Name[cs]=Otevřít terminál zde -Name[csb]=Òtemknij tuwò terminal -Name[cy]=Agor Terfynell Yma -Name[da]=Åbn terminal her -Name[de]=Terminal öffnen -Name[el]=Άνοιγμα τερματικού εδώ -Name[eo]=Lanĉu terminalon ĉi tie -Name[es]=Abrir terminal aquí -Name[et]=Ava siin terminal -Name[eu]=Ireki terminala hemen -Name[fa]=باز کردن پایانه در اینجا -Name[fi]=Avaa komentoikkuna tähän -Name[fr]=Ouvrir un terminal ici -Name[fy]=Terminal iepenje -Name[ga]=Oscail Teirminéal Anseo -Name[gl]=Abrir Terminal Aqui -Name[he]=פתח מסוף כאן -Name[hi]=टर्मिनल यहाँ खोलें -Name[hr]=Ovdje otvori terminal -Name[hu]=Parancsértelmező megnyitása itt -Name[is]=Opna skjáhermi hér -Name[it]=Apri terminale qui -Name[ja]=ここでターミナルを開く -Name[kk]=Терминалды ашу -Name[km]=បើក​ស្ថានីយ​ទីនេះ -Name[lo]=ເທີມິເນລຂອງ X -Name[lt]=Atverti čia terminalą -Name[lv]=Atvērt termināli šeit -Name[mk]=Отвори терминал тука -Name[mn]=Терминал нээх -Name[ms]=Buka Terminal Di Sini -Name[mt]=Iftaħ terminal hawn -Name[nb]=Åpne terminal her -Name[nds]=Terminal hier opmaken -Name[ne]=यहाँ टर्मिनल खोल्नुहोस् -Name[nl]=Terminal openen -Name[nn]=Opna terminal her -Name[nso]=Bula mafelelo Mo -Name[pa]=ਟਰਮੀਨਲ ਇੱਥੇ ਖੋਲੋ -Name[pl]=Otwórz tutaj terminal -Name[pt]=Abrir um Terminal Aqui -Name[pt_BR]=Abrir Terminal Aqui -Name[ro]=Deschide un terminal aici -Name[ru]=Открыть терминал в этой папке -Name[rw]= Gufungura Igihera Hano -Name[se]=Raba terminála dáppe -Name[sk]=Tu otvoriť terminál -Name[sl]=Tu odpri terminal -Name[sr]=Отвори терминал овде -Name[sr@Latn]=Otvori terminal ovde -Name[ss]=Vula sikhungo lapha -Name[sv]=Öppna terminal här -Name[ta]=முனைய இங்கே திற -Name[tg]=Терминалро дар инҷо боз кунед -Name[th]=เปิดเทอร์มินัลที่นี่ -Name[tr]=Terminali Burada Aç -Name[tt]=Terminalnı Monda Açası -Name[uk]=Відкрити термінал -Name[uz]=Терминални шу ерда очиш -Name[ven]=Vulani theminala hafhano -Name[vi]=Mở một Thiết bị cuối ở Đây -Name[wa]=Drovi on terminå chal -Name[xh]=Vula Isiphelo Sendlela Apha -Name[zh_CN]=在此打开终端 -Name[zh_TW]=在這裡開啟終端機 -Name[zu]=Vula ithuluzi langaphandle lapha -Icon=konsole -Exec=konsole --workdir %f diff --git a/src/servicemenus/terminalhere.desktop b/src/servicemenus/terminalhere.desktop new file mode 100644 index 0000000..00657f7 --- /dev/null +++ b/src/servicemenus/terminalhere.desktop @@ -0,0 +1,90 @@ +[Desktop Entry] +X-TDE-ServiceTypes=inode/directory +Actions=openTerminalHere; +X-TDE-AuthorizeAction=shell_access +Type=Application +Name=Terminal + +[Desktop Action openTerminalHere] +Icon=konsole +Exec=terminalhere --wd %f +Name=Open Terminal Here +Name[af]=Maak Terminaal Hier Oop +Name[ar]=إفتح مطراف سطر الأوامر هنا +Name[az]=Terminalı Burada Aç +Name[be]=Адкрыць тэрмінал тут +Name[bg]=Отваряне на конзола тук +Name[bn]=এখানে টার্মিনাল খোলো +Name[br]=Digeriñ un termenell amañ +Name[bs]=Otvori terminal ovdje +Name[ca]=Obre un terminal aquí +Name[cs]=Otevřít terminál zde +Name[csb]=Òtemknij tuwò terminal +Name[cy]=Agor Terfynell Yma +Name[da]=Åbn terminal her +Name[de]=Terminal öffnen +Name[el]=Άνοιγμα τερματικού εδώ +Name[eo]=Lanĉu terminalon ĉi tie +Name[es]=Abrir terminal aquí +Name[et]=Ava siin terminal +Name[eu]=Ireki terminala hemen +Name[fa]=باز کردن پایانه در اینجا +Name[fi]=Avaa komentoikkuna tähän +Name[fr]=Ouvrir un terminal ici +Name[fy]=Terminal iepenje +Name[ga]=Oscail Teirminéal Anseo +Name[gl]=Abrir Terminal Aqui +Name[he]=פתח מסוף כאן +Name[hi]=टर्मिनल यहाँ खोलें +Name[hr]=Ovdje otvori terminal +Name[hu]=Parancsértelmező megnyitása itt +Name[is]=Opna skjáhermi hér +Name[it]=Apri terminale qui +Name[ja]=ここでターミナルを開く +Name[ka]=ტერმინალის აქ გახსნა +Name[kk]=Терминалды ашу +Name[km]=បើក​ស្ថានីយ​ទីនេះ +Name[ko]=여기에서 터미널 열기 +Name[lo]=ເທີມິເນລຂອງ X +Name[lt]=Atverti čia terminalą +Name[lv]=Atvērt termināli šeit +Name[mk]=Отвори терминал тука +Name[mn]=Терминал нээх +Name[ms]=Buka Terminal Di Sini +Name[mt]=Iftaħ terminal hawn +Name[nb]=Åpne terminal her +Name[nds]=Terminal hier opmaken +Name[ne]=यहाँ टर्मिनल खोल्नुहोस् +Name[nl]=Terminal openen +Name[nn]=Opna terminal her +Name[nso]=Bula mafelelo Mo +Name[pa]=ਟਰਮੀਨਲ ਇੱਥੇ ਖੋਲੋ +Name[pl]=Otwórz tutaj terminal +Name[pt]=Abrir um Terminal Aqui +Name[pt_BR]=Abrir Terminal Aqui +Name[ro]=Deschide un terminal aici +Name[ru]=Открыть терминал в этой папке +Name[rw]= Gufungura Igihera Hano +Name[se]=Raba terminála dáppe +Name[sk]=Tu otvoriť terminál +Name[sl]=Tu odpri terminal +Name[sr]=Отвори терминал овде +Name[sr@Latn]=Otvori terminal ovde +Name[ss]=Vula sikhungo lapha +Name[sv]=Öppna terminal här +Name[ta]=முனைய இங்கே திற +Name[te]=టెర్మినల్ ను ఇక్కడ తెరువు +Name[tg]=Терминалро дар инҷо боз кунед +Name[th]=เปิดเทอร์มินัลที่นี่ +Name[tr]=Terminali Burada Aç +Name[tt]=Terminalnı Monda Açası +Name[uk]=Відкрити термінал +Name[uz]=Terminalni shu yerda ochish +Name[uz@cyrillic]=Терминални шу ерда очиш +Name[ven]=Vulani theminala hafhano +Name[vi]=Mở một Thiết bị cuối ở Đây +Name[wa]=Drovi on terminå chal +Name[xh]=Vula Isiphelo Sendlela Apha +Name[zh_CN]=在此打开终端 +Name[zh_TW]=在這裡開啟終端機 +Name[zu]=Vula ithuluzi langaphandle lapha -- cgit v1.2.1