diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index ff73d16..a4cbdb8 100644
a
|
b
|
class JournalActivityDBusService(dbus.service.Object): |
60 | 60 | dbus.service.Object.__init__(self, bus_name, J_DBUS_PATH) |
61 | 61 | |
62 | 62 | @dbus.service.method(J_DBUS_INTERFACE, |
63 | | in_signature='', out_signature='') |
64 | | def FocusSearch(self): |
65 | | """Become visible and give focus to the search entry |
66 | | """ |
67 | | self._parent.present() |
68 | | self._parent.show_main_view() |
69 | | self._parent.search_grab_focus() |
70 | | |
71 | | @dbus.service.method(J_DBUS_INTERFACE, |
72 | 63 | in_signature='s', out_signature='') |
73 | 64 | def ShowObject(self, object_id): |
74 | 65 | """Pop-up journal and show object with object_id""" |
… |
… |
class JournalActivity(Window): |
332 | 323 | def set_active_volume(self, mount): |
333 | 324 | self._volumes_toolbar.set_active_volume(mount) |
334 | 325 | |
| 326 | def focus_search(self): |
| 327 | """Become visible and give focus to the search entry |
| 328 | """ |
| 329 | self.present() |
| 330 | self.show_main_view() |
| 331 | self.search_grab_focus() |
| 332 | |
335 | 333 | _journal = None |
336 | 334 | |
337 | 335 | def get_journal(): |
diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index 4a50e70..5321905 100644
a
|
b
|
from jarabe.model import shell |
33 | 33 | from jarabe.view.tabbinghandler import TabbingHandler |
34 | 34 | from jarabe.model.shell import ShellModel |
35 | 35 | from jarabe import config |
| 36 | from jarabe.journal.journalactivity import get_journal |
36 | 37 | |
37 | 38 | _BRIGHTNESS_STEP = 2 |
38 | 39 | _VOLUME_STEP = sound.VOLUME_STEP |
… |
… |
_actions_table = { |
67 | 68 | '<alt><shift>s' : 'say_text', |
68 | 69 | } |
69 | 70 | |
70 | | J_DBUS_SERVICE = 'org.laptop.Journal' |
71 | | J_DBUS_PATH = '/org/laptop/Journal' |
72 | | J_DBUS_INTERFACE = 'org.laptop.Journal' |
73 | | |
74 | 71 | SPEECH_DBUS_SERVICE = 'org.laptop.Speech' |
75 | 72 | SPEECH_DBUS_PATH = '/org/laptop/Speech' |
76 | 73 | SPEECH_DBUS_INTERFACE = 'org.laptop.Speech' |
… |
… |
class KeyHandler(object): |
248 | 245 | if e.errno != errno.EINTR: |
249 | 246 | raise |
250 | 247 | |
251 | | |
252 | 248 | def handle_quit_emulator(self): |
253 | 249 | if os.environ.has_key('SUGAR_EMULATOR_PID'): |
254 | 250 | pid = int(os.environ['SUGAR_EMULATOR_PID']) |
255 | 251 | os.kill(pid, signal.SIGTERM) |
256 | 252 | |
257 | | def focus_journal_search(self): |
258 | | bus = dbus.SessionBus() |
259 | | obj = bus.get_object(J_DBUS_SERVICE, J_DBUS_PATH) |
260 | | journal = dbus.Interface(obj, J_DBUS_INTERFACE) |
261 | | journal.FocusSearch() |
262 | | |
263 | 253 | def handle_open_search(self): |
264 | | self.focus_journal_search() |
| 254 | get_journal().focus_search() |
265 | 255 | |
266 | 256 | def _key_pressed_cb(self, grabber, keycode, state): |
267 | 257 | key = grabber.get_key(keycode, state) |