Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2009-01-05 10:44:39 (GMT)
committer Simon Schampijer <simon@schampijer.de>2009-01-05 10:44:39 (GMT)
commitff3a2f17d3890963d1719eedd0d81698551402a5 (patch)
tree967f525e971090dd849470a94fcece3fa085b9b4 /src
parent7aa2e148538518a611f8c375899355f5869edcfa (diff)
Focus Search is not exposed via dbus anymore #89
instead it is a method of journalactivity
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/journal/journalactivity.py16
-rw-r--r--src/jarabe/view/keyhandler.py14
2 files changed, 9 insertions, 21 deletions
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index ff73d16..a4cbdb8 100644
--- a/src/jarabe/journal/journalactivity.py
+++ b/src/jarabe/journal/journalactivity.py
@@ -60,15 +60,6 @@ class JournalActivityDBusService(dbus.service.Object):
dbus.service.Object.__init__(self, bus_name, J_DBUS_PATH)
@dbus.service.method(J_DBUS_INTERFACE,
- in_signature='', out_signature='')
- def FocusSearch(self):
- """Become visible and give focus to the search entry
- """
- self._parent.present()
- self._parent.show_main_view()
- self._parent.search_grab_focus()
-
- @dbus.service.method(J_DBUS_INTERFACE,
in_signature='s', out_signature='')
def ShowObject(self, object_id):
"""Pop-up journal and show object with object_id"""
@@ -332,6 +323,13 @@ class JournalActivity(Window):
def set_active_volume(self, mount):
self._volumes_toolbar.set_active_volume(mount)
+ def focus_search(self):
+ """Become visible and give focus to the search entry
+ """
+ self.present()
+ self.show_main_view()
+ self.search_grab_focus()
+
_journal = None
def get_journal():
diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index 4a50e70..5321905 100644
--- a/src/jarabe/view/keyhandler.py
+++ b/src/jarabe/view/keyhandler.py
@@ -33,6 +33,7 @@ from jarabe.model import shell
from jarabe.view.tabbinghandler import TabbingHandler
from jarabe.model.shell import ShellModel
from jarabe import config
+from jarabe.journal.journalactivity import get_journal
_BRIGHTNESS_STEP = 2
_VOLUME_STEP = sound.VOLUME_STEP
@@ -67,10 +68,6 @@ _actions_table = {
'<alt><shift>s' : 'say_text',
}
-J_DBUS_SERVICE = 'org.laptop.Journal'
-J_DBUS_PATH = '/org/laptop/Journal'
-J_DBUS_INTERFACE = 'org.laptop.Journal'
-
SPEECH_DBUS_SERVICE = 'org.laptop.Speech'
SPEECH_DBUS_PATH = '/org/laptop/Speech'
SPEECH_DBUS_INTERFACE = 'org.laptop.Speech'
@@ -248,20 +245,13 @@ class KeyHandler(object):
if e.errno != errno.EINTR:
raise
-
def handle_quit_emulator(self):
if os.environ.has_key('SUGAR_EMULATOR_PID'):
pid = int(os.environ['SUGAR_EMULATOR_PID'])
os.kill(pid, signal.SIGTERM)
- def focus_journal_search(self):
- bus = dbus.SessionBus()
- obj = bus.get_object(J_DBUS_SERVICE, J_DBUS_PATH)
- journal = dbus.Interface(obj, J_DBUS_INTERFACE)
- journal.FocusSearch()
-
def handle_open_search(self):
- self.focus_journal_search()
+ get_journal().focus_search()
def _key_pressed_cb(self, grabber, keycode, state):
key = grabber.get_key(keycode, state)