From 6949aae9ce625d009008872fe4297638f12fe1ce Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 12 Feb 2020 15:08:58 +0900 Subject: Added GUI option to show/hide "Open in Terminal" inside QuickBrowser menus. Minor fixup for other GUI options in "Configure Panel... -> Menus". Signed-off-by: Michele Calgaro --- kcontrol/kicker/menutab.ui | 23 +++++++++++++++++++---- kicker/kicker/ui/browser_mnu.cpp | 7 ++----- kicker/libkicker/kickerSettings.kcfg | 5 +++++ konqueror/konqueror.kcfg | 4 ++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index 2614a278a..fa3868004 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -425,7 +425,7 @@ unnamed - + Layout3 @@ -480,7 +480,21 @@ If this option is enabled, hidden files (i.e. files beginning with a dot) will be shown in the QuickBrowser menus. - + + + kcfg_ShowOpenInTerminal + + + Sho&w open in terminal fi&les + + + true + + + If this option is enabled, an Open in Terminal entry will be shown in the QuickBrowser menus. + + + Spacer7 @@ -523,10 +537,10 @@ m_maxRecentDocumentsItemsLabel - Ma&ximum number of entries: + &Maximum number of entries: - kcfg_MaxEntries2 + maxrecentdocs This sets the maximum number of recently accessed documents stored for fast retrieval. @@ -723,6 +737,7 @@ m_editKMenuButton m_subMenus kcfg_ShowHiddenFiles + kcfg_ShowOpenInTerminal kcfg_MaxEntries2 kcfg_RecentVsOften m_showFrequent diff --git a/kicker/kicker/ui/browser_mnu.cpp b/kicker/kicker/ui/browser_mnu.cpp index b4d1b11ed..9b629e165 100644 --- a/kicker/kicker/ui/browser_mnu.cpp +++ b/kicker/kicker/ui/browser_mnu.cpp @@ -152,7 +152,7 @@ void PanelBrowserMenu::initialize() TDEConfig *c = TDEGlobal::config(); c->setGroup("menus"); insertItem(CICON("kfm"), i18n("Open in File Manager"), this, TQT_SLOT(slotOpenFileManager())); - if (kapp->authorize("shell_access") && c->readBoolEntry("kickerOpenInTerminalIsVisible",false)) + if (kapp->authorize("shell_access") && KickerSettings::showOpenInTerminal()) insertItem(CICON("terminal"), i18n("Open in Terminal"), this, TQT_SLOT(slotOpenTerminal())); insertSeparator(); } @@ -455,10 +455,7 @@ void PanelBrowserMenu::slotOpenTerminal() TDEProcess proc; proc << term; - if (term == "konsole") - proc << "--workdir" << path(); - else - proc.setWorkingDirectory(path()); + proc.setWorkingDirectory(path()); proc.start(TDEProcess::DontCare); } diff --git a/kicker/libkicker/kickerSettings.kcfg b/kicker/libkicker/kickerSettings.kcfg index 0abc51bf0..5ab6880aa 100644 --- a/kicker/libkicker/kickerSettings.kcfg +++ b/kicker/libkicker/kickerSettings.kcfg @@ -227,6 +227,11 @@ false + + + true + + 30 diff --git a/konqueror/konqueror.kcfg b/konqueror/konqueror.kcfg index 9dfc91983..ec4728e03 100644 --- a/konqueror/konqueror.kcfg +++ b/konqueror/konqueror.kcfg @@ -602,7 +602,7 @@ PATH_JAVA true - + This option tells Konqueror whether to ask for a confirmation when you simply delete the file. @@ -618,7 +618,7 @@ PATH_JAVA konsole - This option tells Konqueror whether to ask for a confirmation when you simply delete the file. + Terminal application to use. -- cgit v1.2.1