Version: 0.9.5 (from svn) (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 4.2.3 20071123 (prerelease) (Debian 4.2.2-4) OS: Linux the embedded terminal doesnt always start in the correct directory (which ofcourse should be the current one).
after some checking, i have found a way to reproduce this every time: 1) start dolphin 2) enter a directory e.g. ~/kde/src 3) press f4 (terminal now opens and shows ~/kde/src) 4) f4 again (it is now gone) 5) enter ~/kde/bin 6) press f4 (current directory will now be ~/kde/src) it seems that url().path() is correct, so maybe theres something wrong with showShellInDir() ? sendInput("cd " + url().path() + "; clear\n") on line 77 of terminalsidebarpage.cpp seems to work. but its not really a good fix!
Created attachment 22464 [details] patches bug Enclosed is a patch that should fix the problem. showShellInDir only changes directory when the shell-process is created (so when it is first, created it wont do anything on successive calls). I moved the showShellInDir-call to right after the terminal is created, and added a sendInput instead.
Thanks a lot for the detailed analyzes + the patch. Even if sendInput("cd" + ...) might not be the nicest approach, the time until KDE 4.0 is quite short and I applied your patch :-)
SVN commit 749039 by ppenz: fixes for the terminal panel: * assure that the correct directory is entered when reopening the terminal * let the terminal be focused also when reopening it BUG: 153785 BUG: 153756 M +7 -3 terminalsidebarpage.cpp M +2 -0 terminalsidebarpage.h WebSVN link: http://websvn.kde.org/?view=rev&revision=749039
Yeah, sendInput isnt very clean.. (you can see the cd commands being sent to the console). But not sure if there is another way. Btw, there is also a patch in bug #153697 :-)
> Btw, there is also a patch in bug #153697 :-) Wow, great! I just had a look and I'll apply it. I'm also not sure for 153697 whether there might be nicer approaches (I think in Qt4.4 there are easier ways for disabling global shortcuts), but like said: 4.0 is approaching... Thanks a lot!