[PATCH] xconfig: Search text should have focus after search and reopen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Kümmel <syntheticpp@xxxxxxx>
---
 scripts/kconfig/qconf.cc | 7 +++++++
 scripts/kconfig/qconf.h  | 1 +
 2 files changed, 8 insertions(+)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index 9d3b04b..014df76c 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -1198,6 +1198,7 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	layout2->addWidget(editField);
 	searchButton = new QPushButton(_("Search"), this);
 	searchButton->setAutoDefault(FALSE);
+	searchButton->setFocusPolicy(Qt::NoFocus);
 	connect(searchButton, SIGNAL(clicked()), SLOT(search()));
 	layout2->addWidget(searchButton);
 	layout1->addLayout(layout2);
@@ -1235,6 +1236,11 @@ ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *nam
 	}
 }
 
+void ConfigSearchWindow::setFocusOnLineEdit()
+{
+	editField->setFocus(Qt::OtherFocusReason);
+}
+
 void ConfigSearchWindow::saveSettings(void)
 {
 	if (name()) {
@@ -1506,6 +1512,7 @@ void ConfigMainWindow::searchConfig(void)
 	if (!searchWindow)
 		searchWindow = new ConfigSearchWindow(this, "search");
 	searchWindow->show();
+	searchWindow->setFocusOnLineEdit();
 }
 
 void ConfigMainWindow::changeMenu(struct menu *menu)
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index bde0c6b..6f2c4d6 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -288,6 +288,7 @@ public:
 public slots:
 	void saveSettings(void);
 	void search(void);
+	void setFocusOnLineEdit(void);
 
 protected:
 	QLineEdit* editField;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux