[gnote] Set focus chain for Search All Notes
- From: Aurimas Äernius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Set focus chain for Search All Notes
- Date: Sat, 1 Oct 2011 20:48:11 +0000 (UTC)
commit b553e5c75cfc8869b4524482273eba525870ffb5
Author: Aurimas Äernius <aurisc4 gmail com>
Date: Sat Oct 1 23:41:03 2011 +0300
Set focus chain for Search All Notes
A more convenient behaviour of tab in Search All Notes.
src/recentchanges.cpp | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/recentchanges.cpp b/src/recentchanges.cpp
index c51374e..6eeb948 100644
--- a/src/recentchanges.cpp
+++ b/src/recentchanges.cpp
@@ -205,6 +205,29 @@ namespace gnote {
.connect(sigc::mem_fun(*this, &NoteRecentChanges::on_note_added_to_notebook));
notebooks::NotebookManager::instance().signal_note_removed_from_notebook()
.connect(sigc::mem_fun(*this, &NoteRecentChanges::on_note_removed_from_notebook));
+
+ // Set the focus chain for the top-most containers
+ std::vector<Gtk::Widget*> focus_chain;
+ focus_chain.push_back(hbox);
+ focus_chain.push_back(&m_hpaned);
+ vbox->set_focus_chain(focus_chain);
+
+ // Set focus chain for sub widgets of first top-most container
+ focus_chain.clear();
+ focus_chain.push_back(&m_find_combo);
+ focus_chain.push_back(&m_matches_window);
+ hbox->set_focus_chain(focus_chain);
+
+ // set focus chain for sub widgets of second top-most container
+ focus_chain.clear();
+ focus_chain.push_back(&m_matches_window);
+ focus_chain.push_back(notebooksPane);
+ m_hpaned.set_focus_chain(focus_chain);
+
+ // get back to the beginning of the focus chain
+ focus_chain.clear();
+ focus_chain.push_back(m_tree);
+ m_matches_window.set_focus_chain(focus_chain);
Gnote::obj().signal_quit.connect(sigc::mem_fun(*this, &NoteRecentChanges::on_exiting_event));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]