From 96b379cf5e56e399845eb3861cfaf1c637168662 Mon Sep 17 00:00:00 2001
From: Simon Schampijer <simon@laptop.org>
Date: Sun, 7 Oct 2012 19:07:13 +0200
Subject: [PATCH shell] Journal key: do only reveal Journal without focusing
the search entry, SL #3988
Follow up of 7d039ea4d3ec1af00e19d99c4517fbde90fc9d67
Signed-off-by: Simon Schampijer <simon@laptop.org>
---
src/jarabe/journal/journalactivity.py | 9 ++-------
src/jarabe/view/keyhandler.py | 2 +-
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index 89d33a3..4bb68fd 100644
a
|
b
|
class JournalActivity(JournalWindow): |
336 | 336 | metadata['bundle_id'] = bundle.get_bundle_id() |
337 | 337 | model.write(metadata) |
338 | 338 | |
339 | | def search_grab_focus(self): |
340 | | self._main_toolbox.search_entry.grab_focus() |
341 | | |
342 | 339 | def __window_state_event_cb(self, window, event): |
343 | 340 | logging.debug('window_state_event_cb %r', self) |
344 | 341 | if event.changed_mask & Gdk.WindowState.ICONIFIED: |
… |
… |
class JournalActivity(JournalWindow): |
376 | 373 | def set_active_volume(self, mount): |
377 | 374 | self._volumes_toolbar.set_active_volume(mount) |
378 | 375 | |
379 | | def focus_search(self): |
380 | | """Become visible and give focus to the search entry |
381 | | """ |
| 376 | def show_journal(self): |
| 377 | """Become visible and show main view""" |
382 | 378 | self.reveal() |
383 | 379 | self.show_main_view() |
384 | | self.search_grab_focus() |
385 | 380 | |
386 | 381 | |
387 | 382 | def get_journal(): |
diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index ef035fb..cb47d17 100644
a
|
b
|
class KeyHandler(object): |
160 | 160 | session.get_session_manager().shutdown() |
161 | 161 | |
162 | 162 | def handle_open_search(self, event_time): |
163 | | journalactivity.get_journal().focus_search() |
| 163 | journalactivity.get_journal().show_journal() |
164 | 164 | |
165 | 165 | def _key_pressed_cb(self, grabber, keycode, state, event_time): |
166 | 166 | key = grabber.get_key(keycode, state) |