[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_3_BRANCH: kdebase/kate/app
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2004-09-16 19:06:37
Message-ID: 20040916190637.F24CE9962 () office ! kde ! org
[Download RAW message or body]
CVS commit by dhaumann:
Backport: Greptool: remember filter history, thanks to Andrej Kostrov for the patch.
M +17 -0 kategrepdialog.cpp 1.46.2.1
M +1 -0 kategrepdialog.h 1.15.2.1
--- kdebase/kate/app/kategrepdialog.cpp #1.46:1.46.2.1
@@ -76,4 +76,5 @@ GrepTool::GrepTool(KateMainWindow *paren
lastSearchItems = config->readListEntry("LastSearchItems");
lastSearchPaths = config->readListEntry("LastSearchPaths");
+ lastSearchFiles = config->readListEntry("LastSearchFiles");
QGridLayout *layout = new QGridLayout(this, 6, 3, 4, 4);
@@ -98,4 +99,5 @@ GrepTool::GrepTool(KateMainWindow *paren
loInput->addLayout( loPattern, 0, 1 );
cmbPattern = new QComboBox(true, this);
+ cmbPattern->setDuplicatesEnabled(false);
cmbPattern->insertStringList(lastSearchItems);
cmbPattern->setEditText(QString::null);
@@ -143,4 +145,6 @@ GrepTool::GrepTool(KateMainWindow *paren
lFiles->setBuddy(cmbFiles->focusProxy());
cmbFiles->setMinimumSize(cmbFiles->sizeHint());
+ cmbFiles->setDuplicatesEnabled(false);
+ cmbFiles->insertStringList(lastSearchFiles);
cmbFiles->insertItem("*.h,*.hxx,*.cpp,*.cc,*.C,*.cxx,*.idl,*.c");
cmbFiles->insertItem("*.cpp,*.cc,*.C,*.cxx,*.c");
@@ -158,4 +162,5 @@ GrepTool::GrepTool(KateMainWindow *paren
KComboBox* cmbUrl = new KComboBox(true, this);
cmbUrl->setMinimumWidth(80); // make sure that 800x600 res works
+ cmbUrl->setDuplicatesEnabled(false);
cmbDir = new KURLRequester( cmbUrl, this, "dir combo" );
cmbDir->completionObject()->setMode(KURLCompletion::DirCompletion);
@@ -413,4 +418,16 @@ void GrepTool::finish()
config->writeEntry("LastSearchPaths", lastSearchPaths);
}
+
+ if (lastSearchFiles.contains(cmbFiles->currentText()) == 0)
+ {
+ cmbFiles->insertItem(cmbFiles->currentText(), 0);
+ lastSearchFiles.prepend(cmbFiles->currentText());
+ if (lastSearchItems.count() > 10) {
+ lastSearchFiles.remove(lastSearchFiles.fromLast());
+ cmbFiles->removeItem(cmbFiles->count() - 1);
+ }
+ config->writeEntry("LastSearchFiles", lastSearchFiles);
+ }
+
config->writeEntry("Recursive", cbRecursive->isChecked());
config->writeEntry("CaseSensitive", cbCasesensitive->isChecked());
--- kdebase/kate/app/kategrepdialog.h #1.15:1.15.2.1
@@ -86,4 +86,5 @@ private:
QStringList lastSearchItems;
QStringList lastSearchPaths;
+ QStringList lastSearchFiles;
QString m_lastUpdatedDir;
QString m_workingDir;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic