From 9e1f287e32a9cddd5e34edbf2aecaf0d685bc171 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 26 Oct 2011 18:00:36 +0000 Subject: Provide option to enable application autocompletion in the run dialog This fixes regression bug 557 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1260897 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/minicli.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'kdesktop/minicli.cpp') diff --git a/kdesktop/minicli.cpp b/kdesktop/minicli.cpp index af79c93af..f60eff4a5 100644 --- a/kdesktop/minicli.cpp +++ b/kdesktop/minicli.cpp @@ -127,7 +127,7 @@ Minicli::Minicli( TQWidget *parent, const char *name) // Autocomplete system m_filesystemAutocomplete = 0; m_histfilesystemAutocomplete = 0; - m_systempathAutocomplete = 1; + m_systempathAutocomplete = 0; m_pURLCompletion = new KURLCompletion(KURLCompletion::FileCompletion); m_pEXECompletion = new KURLCompletion(KURLCompletion::SystemExeCompletion); //m_pURLCompletion->setCompletionMode( KGlobalSettings::completionMode() ); @@ -153,6 +153,7 @@ Minicli::Minicli( TQWidget *parent, const char *name) connect(m_dlg->cbPriority, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChangeScheduler(bool))); connect(m_dlg->slPriority, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotPriority(int))); connect(m_dlg->cbRealtime, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotRealtime(bool))); + connect(m_dlg->cbAppcomplete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAppcompleteToggled(bool))); connect(m_dlg->cbAutocomplete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutocompleteToggled(bool))); connect(m_dlg->cbAutohistory, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotAutohistoryToggled(bool))); connect(m_dlg->cbRunAsOther, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChangeUid(bool))); @@ -219,6 +220,7 @@ void Minicli::loadConfig() m_dlg->cbCommand->blockSignals( block ); m_dlg->cbAutocomplete->setChecked( KDesktopSettings::miniCLIFilesystemAutoComplete() ); + m_dlg->cbAppcomplete->setChecked( KDesktopSettings::miniCLISystempathAutoComplete() ); m_dlg->cbAutohistory->setChecked( KDesktopSettings::miniCLIHistoryAndFilesystemAutoComplete() ); m_filesystemAutocomplete = KDesktopSettings::miniCLIFilesystemAutoComplete(); @@ -1013,6 +1015,14 @@ void Minicli::slotAutocompleteToggled(bool enabled) m_dlg->cbCommand->setCurrentText( current_text ); // Force an update of the autocompletion list } +void Minicli::slotAppcompleteToggled(bool enabled) +{ + m_systempathAutocomplete = enabled; + + TQString current_text = m_dlg->cbCommand->currentText(); + m_dlg->cbCommand->setCurrentText( current_text ); // Force an update of the autocompletion list +} + void Minicli::slotAutohistoryToggled(bool enabled) { if (enabled) -- cgit v1.2.1