Ticket #3988: 0001-Journal-key-do-only-reveal-Journal-without-focusing-.patch

File 0001-Journal-key-do-only-reveal-Journal-without-focusing-.patch, 2.1 KB (added by erikos, 12 years ago)

Journal key: do only reveal Journal without focusing the search entry

  • src/jarabe/journal/journalactivity.py

    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): 
    336336        metadata['bundle_id'] = bundle.get_bundle_id()
    337337        model.write(metadata)
    338338
    339     def search_grab_focus(self):
    340         self._main_toolbox.search_entry.grab_focus()
    341 
    342339    def __window_state_event_cb(self, window, event):
    343340        logging.debug('window_state_event_cb %r', self)
    344341        if event.changed_mask & Gdk.WindowState.ICONIFIED:
    class JournalActivity(JournalWindow): 
    376373    def set_active_volume(self, mount):
    377374        self._volumes_toolbar.set_active_volume(mount)
    378375
    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"""
    382378        self.reveal()
    383379        self.show_main_view()
    384         self.search_grab_focus()
    385380
    386381
    387382def get_journal():
  • src/jarabe/view/keyhandler.py

    diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
    index ef035fb..cb47d17 100644
    a b class KeyHandler(object): 
    160160        session.get_session_manager().shutdown()
    161161
    162162    def handle_open_search(self, event_time):
    163         journalactivity.get_journal().focus_search()
     163        journalactivity.get_journal().show_journal()
    164164
    165165    def _key_pressed_cb(self, grabber, keycode, state, event_time):
    166166        key = grabber.get_key(keycode, state)