Profile-bound custom commands now execute
Rather than starting ksession right away, PreprocessedTerminal now waits for ApplicationSettings to finish loading custom command settings from storage. If a custom command is specified, PreprocessedTerminal will tokenize it and pass it onto ksession as a shell program similar to the -e option. If both a -e command and a custom command is specified, the -e version overrides the custom command.
This commit is contained in:
@@ -129,13 +129,17 @@ Item{
|
||||
|
||||
kterminal.lineSpacing = lineSpacing;
|
||||
}
|
||||
Component.onCompleted: {
|
||||
appSettings.terminalFontChanged.connect(handleFontChange);
|
||||
function startSession() {
|
||||
appSettings.initializedSettings.disconnect(startSession);
|
||||
|
||||
// Retrieve the variable set in main.cpp if arguments are passed.
|
||||
if (defaultCmd) {
|
||||
ksession.setShellProgram(defaultCmd);
|
||||
ksession.setArgs(defaultCmdArgs);
|
||||
} else if (appSettings.useCustomCommand) {
|
||||
var args = Utils.tokenizeCommandLine(appSettings.customCommand);
|
||||
ksession.setShellProgram(args[0]);
|
||||
ksession.setArgs(args.slice(1));
|
||||
} else if (!defaultCmd && Qt.platform.os === "osx") {
|
||||
// OSX Requires the following default parameters for auto login.
|
||||
ksession.setArgs(["-i", "-l"]);
|
||||
@@ -147,6 +151,10 @@ Item{
|
||||
ksession.startShellProgram();
|
||||
forceActiveFocus();
|
||||
}
|
||||
Component.onCompleted: {
|
||||
appSettings.terminalFontChanged.connect(handleFontChange);
|
||||
appSettings.initializedSettings.connect(startSession);
|
||||
}
|
||||
}
|
||||
Component {
|
||||
id: linuxContextMenu
|
||||
|
||||
Reference in New Issue
Block a user