┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/terminal/terminalpanel.cpp
AgeCommit message (Collapse)Author
2020-10-23Compile with QT_NO_KEYWORDSAlexander Lohnau
2020-10-23If include is define in .h remove it if it's defined in .cpp too (scripted)Laurent Montel
2020-09-13Fix style, not space between method name and (; improve wordingAhmad Samir
GIT_SILENT
2020-09-13TerminalPanel: StatJob::mostLocalUrl only works with ":local" protocolsAhmad Samir
StatJob::mostLocalUrl was changed to cancel the job automatically if the protocol Class isn't ":local", mostLocalUrl only makes sense with ioslaves that actually set UDS_LOCAL_PATH (which should have calss ":local"). I tested that kio-fuse still works, when having the terminal panel open and changing direcotries in Dolphin, with an sftp:// server.
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2020-05-04Fixes Dolphin crash on "Defocus Terminal Panel" menu click if no Konsole is ↵Nikolai Krasheninnikov
installed. Summary: Dolphin crashes if no Konsole is installed and user clicks menu action "Defocus Terminal Panel". This fix is pretty straight forward. Steps to reproduce: 1. Run Dolphin without Konsole available. 2. Press F4 to open console window. 3. Click in service menu "Focus Terminal Panel". 4. Click in service menu "Defocus Terminal Panel". Observe the crash. Test Plan: 1. Run Dolphin without Konsole available. 2. Press F4 to open console window. 3. Click in service menu "Focus Teminal Panel". 4. Click in service menu "Defocus Terminal Panel". 5. Click in service menu "Focus Terminal Panel". 6. Press F4 to close console window. Reviewers: #dolphin, meven, elvisangelaccio, ngraham Reviewed By: #dolphin, meven, elvisangelaccio, ngraham Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D29345
2020-04-07Sync terminal with KIOFuse mount when browing remote directoriesAlexander Saoutkin
Summary: Adds the capability to sync the terminal with a KIOFuse mount if the URL is remote. Partly based on the existence of another DBus currenly in review: https://invent.kde.org/kde/kio-fuse/-/merge_requests/21 Syncing works in both "directions". Changing the URL to a remote URLin the DolphinView will change the URL in the terminal to the KIOFuse local path equivalent. Conversely changing the URL in the terminal to one that happens to be in a KIOFuse mount will change the URL in the DolphinView to the remote URL equivalent. Test Plan: Manual testing (see video in comments). 1. Checking that changing directory in DolphinView from remote/local to local doesn't cause any regressions. 2. Checking that changing directory in terminal from local to local (but not in KIOFUse mount) doesn't cause any regressions. 3. Checking that changing directory in DolphinView from remote/local to remote correctly changes URL in terminal to KIOFuse equivalent. 4. Checking that changing directory in terminal from local to KIOFuse path correctly changes the URL in the DolphinView to the remote equivalent. 5. Checking the KIOFuse not being installed doesn't cause any regressions. 6. Changing directories very quickly does not cause any slowdown. Reviewers: #dolphin, fvogt, elvisangelaccio Reviewed By: #dolphin, fvogt, elvisangelaccio Subscribers: elvisangelaccio, fvogt, kfm-devel, ngraham Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28290
2019-12-05Add action for focusing Terminal PanelNate Graham
Summary: Add an action for focusing and de-focusing the Terminal Panel. FEATURE: 185096 FIXED-IN 20.04.0 Test Plan: - Hit {key Ctrl Shift F4} or click {nav Tools > Focus Terminal Panel} or {nav Control > Tools > Focus Terminal Panel} - If the Terminal Panel was closed, it opens and gains focus - If the Terminal Panel was open but unfocused, it gains focus - If the Terminal Panel was open and focused, focus returns to the view {F6630289, size=full} Reviewers: #dolphin, elvisangelaccio, rominf Reviewed By: #dolphin, elvisangelaccio, rominf Subscribers: kfm-devel, elvisangelaccio, rkflx, ngraham, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D10959
2019-08-11Fix an issue with focus lost after closing terminal panelAndrey Yashkin
Summary: After leaving terminal with Ctrl-D or exit commands the input focus isn't set back to the folder view. The problem appears, because `TerminalPanel::isHiddenInVisibleWindow` returns not what it supposed to return, since when the terminal process exits, `m_terminal` is set to nullptr. I moved unwanted checks from it inside `TerminalPanel::dockVisibilityChanged` This change also exposes a crash in `DolphinMainWindow::slotTerminalPanelVisibilityChanged()`, which was previously working only by luck. Now we check whether `m_activeViewContainer` is not null before using it. BUG: 407979 FIXED-IN: 19.11.80 Test Plan: 1. Open Dolphin 2. Press F4 to open the terminal panel 3. Type exit<Enter> or press Ctrl-D 4. Check current focus widget Reviewers: #dolphin Subscribers: ngraham, elvisangelaccio, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22420
2019-07-28Fix dir change when show hidden terminal panel with running program in itAndrey Yashkin
Summary: Terminal panel doesn't change its working directory, while any procces is running in it. However, if you hide it and show again the program will get a string with a //cd path// command. Test Plan: 1. Open dolphin 2. Press F4 3. Start any process like gnu nano 4. Press F4 two more times Reviewers: #dolphin Subscribers: anthonyfieroni, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D22422
2019-02-27remove deprecated methodsLaurent Montel
2019-01-19Ask for confirmation when Closing Dolphin windows with a terminal panel ↵Nate Graham
running a program Summary: Ask for confirmation when Closing Dolphin windows with a terminal panel running a program. FEATURE: 304816 FIXED-IN: 19.04.0 Test Plan: # Open terminal panel # Run `watch ls` # Close Dolphin # Observe confirmation # Disable confirmation # Repeat, observe no confirmation # Enable confirmation in the settings # Repeat, observe a confirmation Reviewers: #dolphin, markg, elvisangelaccio, rominf Reviewed By: #dolphin, elvisangelaccio Subscribers: kfm-devel, elvisangelaccio, markg, ngraham, rkflx, broulik, #dolphin Tags: #dolphin Differential Revision: https://phabricator.kde.org/D10960
2018-04-03Initialize m_konsolePartMissingMessageAntonio Rojas
Otherwise it just crashes when trying to open the terminal panel BUG: 392660 Differential Revision: https://phabricator.kde.org/D11904
2018-03-11Show a message if Konsole part is not installedRoman Inflianskas
Summary: Show a message if Konsole part is not installed BUG: 371822 FIXED-IN: 18.04.0 {F5749731} Reviewers: ngraham, progwolff, elvisangelaccio Reviewed By: ngraham, progwolff, elvisangelaccio Subscribers: rkflx, ngraham, elvisangelaccio, broulik, progwolff, #dolphin Differential Revision: https://phabricator.kde.org/D11118
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2018-02-11Fix Windows buildElvis Angelaccio
kill() is not available on Windows. Now that we build TerminalPanel everywhere (see 87e8d0ba), we need to #ifdef this call.
2018-02-11Fix typoElvis Angelaccio
GIT_SILENT
2018-01-18Set the focus to the active view, after leaving the terminal panelAdrián Chaves Fernández (Gallaecio)
Summary: BUG: 298467 Set the focus to the active view, after leaving the terminal panel. This is a fork of the patch at https://git.reviewboard.kde.org/r/116118/ by @emmanuelp which should fix the issue with the original patch reported by Frank Reininghaus. Test Plan: Works for me. Reviewers: #dolphin, emmanuelp, ngraham Reviewed By: #dolphin, ngraham Subscribers: ngraham, emmanuelp Differential Revision: https://phabricator.kde.org/D9955
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-10-12Don't block unmounting when terminal panel's cwd is the mountpointMiklos Marton
When unmounting a removable media Dolphin checks if there are some files open on the device before performing the unmount. If the terminal window in dolphin is open and the to be unmounted path is open, the unmount process will be blocked. This patch sets the terminal window current path to the home directory upon unmount request if the terminal directory is set to the mount path. The unmount request could came from two sources: The user could hit right click on the media in the dolphin's places panel and hit unmount. The user could request an unmount from the indicator applet This patch was originally written by Arjun AK for the kdelibs4 version of Dolphin: https://git.reviewboard.kde.org/r/121613/ BUG: 158264 FIXED-IN: 17.11.80 Differential Revision: https://phabricator.kde.org/D7847
2017-01-18Port away from deprecated KIO::Job::ui()Elvis Angelaccio
It's equivalent to KJob::uiDelegate() from kcoreaddons.
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2014-12-10Fix Terminal-View navigation sync issueArjun AK
The URL needs to be constructed from 'QUrl::fromLocalFile()' instead of a QString so that the scheme is set properly. REVIEW: 121409 BUG: 341678
2014-10-24Merge remote-tracking branch 'origin/master' into frameworksFrank Reininghaus
Conflicts: dolphin/src/panels/terminal/terminalpanel.cpp dolphin/src/panels/terminal/terminalpanel.h
2014-10-24Make the view/Terminal Panel synchronization less error-proneFrank Reininghaus
The previous solution could cause problems if the user navigates to a different URL in one view, and then activates another split view very quickly: the new active view might be switched to the same URL as the first view, which is unwanted. To fix this problem, we record a history of "cd" commands that Dolphin sends to the Terminal Panel in a queue. If a currentDirectoryChanged signal is received, and the new terminal directory is "dir", this patch does the following: 1. If the queue is empty, change the view URL to "dir". 2. Otherwise, take the queue's head, and check if it is equal to "dir". If that is the case, ignore the signal and return. 3. Go back to step 1. This ensures that every currentDirectoryChange signal that is caused by a "cd" that was sent from Dolphin to the terminal is ignored. BUG: 339009 BUG: 314038 REVIEW: 120768
2014-10-23Connect to the currentDirectoryChanged signal after the shell setupFrank Reininghaus
This fixes the problem that the view URL may be reset to the Home URL when opening the Terminal Panel while browsing a remote URL. Moreover, it fixes crashes that can occur when the signal is received during the shell setup if the DolphinMainWindow does not have a valid m_activeViewContainer yet. BUG: 339502 BUG: 340233 REVIEW: 120726 FIXED-IN: 4.14.3
2014-10-21port Dolphin from KUrl to QUrlLukáš Tinkl
REVIEW: 120688
2014-10-18Fix includesMontel Laurent
2014-10-07kdelibs4support--Montel Laurent
2014-08-24cleanupsDavid Faure
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-05-05dolphin: convert panels/ and filterbar to qt signal/slot syntaxAlex Richardson
TerminalPanel connections to konsole part were not converted since there is no header available that defines these function, we have to keep the old syntax here. Additionally the new syntax no longer accepts QPointer arguments, we have to explicitly call .data() there.
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395
2013-05-02Do not change the view URL if it is a symlink to the current directoryFrank Reininghaus
BUG: 302037 FIXED-IN: 4.10.3 REVIEW: 110233
2013-03-15Prevent accidental deletion of home directory in Terminal PanelFrank Reininghaus
The protection against unwanted execution of "rm -rf" when changing the directory while entering the command did not work if there was never any automatic "cd" command sent to the terminal before. This patch ensures that Terminal Panel's member m_clearTerminal is false after the initialization of the panel, such that the protection is effective after that. BUG: 316300 FIXED-IN: 4.10.2 REVIEW: 109431
2012-09-19Prevent unwanted URL changes when using the Terminal PanelFrank Reininghaus
The root cause of the problem was that TerminalPanel's member m_konsolePartCurrentDirectory, which is used to determine in TerminalPanel::sendCdToTerminal(QString& dir) if the Konsole part's directory is aleady 'dir', such that issuing the 'cd' command is not needed, was updated too late, namely when the part's currentDirectoryChanged(QString) signal was received, which may be up to one second after the 'cd' command. When changing the directory from "dir1" to "dir2" and going back to the "dir1" in less than one second (either by using the 'Back' action or by activating a tab which still had "dir1" open), the 'cd dir1' command was therefore suppressed because the Terminal Panel still thought that "dir1" was the current directory in the part. However, the directory of the part was actually "dir2", and when the currentDirectoryChanged(QString) signal was received from the part, the view's URL was set to "dir2" as well. BUG: 306349 BUG: 304838 FIXED-IN: 4.9.2
2012-06-08Krazy fixesPeter Penz
2012-06-03Prepend "cd" and "clear" commands with a space in the Terminal PanelFrank Reininghaus
This prevents that these commands, which have not been enetered by the user, but generated automatically, appear in the shell history, provided that the shell is configured appropriately. BUG: 204039 FIXED-IN: 4.9.0
2012-05-26Minor coding style fixesPeter Penz
2012-05-25Use KService to lookup the library name of konsolepartJekyll Wu
See https://git.reviewboard.kde.org/r/105028/
2012-04-26Update the view when changing the directory using 'cd' in the terminalFrank Reininghaus
Thanks to Jekyll Wu for helping to implement this feature! FEATURE: 156732 FIXED-IN: 4.9.0
2012-04-17Ensure authentication data is cached properlyPeter Penz
The attached patch sets the main window on the main directory lister in DolphinView and KIO jobs in DolphinMainWindow to ensure that login data for remote protocols such as sftp, ftp are cached properly for the duration of the application. Otherwise, the end user is going to end up being unnecessarily re-prompted to enter password login information. Thanks to Dawit Alemayehu for the patch! REVIEW: 104614 FIXED-IN: 4.9.0
2012-01-25Terminal: only consider process IDs > 0Peter Penz
Thanks to Jekyll Wu for the analyses. CCBUG: 286367
2011-06-01Fix problems with commit 8d789f2626243dSebastian Dörner
- fix crash when Ctrl-D-ing in the terminal - don't respond to window manager actions, only when the dock itself is hidden Refers to commit 8d789f2626243ddc6c763c84e582e8e20afe7689
2011-05-25Don't let hidden terminals prevent unmountingSebastian Dörner
Previous state: When the terminal is hidden, the cwd is not updated anymore. If it was on a removable device when hiding, the hidden terminal might prevent unmounting this device. This patch fixes that bug by changing the cwd to "/" when hiding the panel. REVIEW: 101387 BUG: 158264 FIXED-IN: 4.7.0
2011-04-12Fix directory navigation in Dolphin::Terminal.Raphael Kubo da Costa
When navigating in Dolphin it attempts to keep any open Terminal (F4) in sync by changing the directory in the shell. It does this by sending a "^C; cd $DIRECTORY" however shells under FreeBSD treat "^C" as a literal string and not SIGINT. Fix this by sending SIGINT to the shell instead of "^C". It appears Linux does not exhibit this behaviour. Patch originally written by David Naylor, from the KDE-FreeBSD team. CCMAIL: [email protected] (cherry picked from commit 5f78219e18073e475ed1f1865a1a2be1fafd60cf)
2011-02-09Coding style update for pointer comparisonPeter Penz
Most developers seem to prefer if (ptr) ... if (!ptr) ... in comparison to if (ptr != 0) ... if (ptr == 0) ... Adjusted the Dolphin-code to use the "most-prefered style" to make contributors happy.
2011-02-09Use capitalized includes of recently committed kdelibs headersPeter Penz
2011-02-04Update e-mail address from [email protected] to [email protected]Peter Penz
2011-02-04Use capitalized KDE includesPeter Penz