From 6dc69c8efa9d0da0476827ad4c49ca070927c31e Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Thu, 24 Sep 2009 14:19:02 +0000
Subject: Present windows in non-active process #1423
---
extensions/deviceicon/volume.py | 2 +-
src/jarabe/journal/journalactivity.py | 10 +++-------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/extensions/deviceicon/volume.py b/extensions/deviceicon/volume.py
index 8955313..e7f62a2 100644
a
|
b
|
class DeviceView(TrayIcon): |
67 | 67 | def __button_release_event_cb(self, widget, event): |
68 | 68 | journal = journalactivity.get_journal() |
69 | 69 | journal.set_active_volume(self._mount) |
70 | | journal.present() |
| 70 | journal.reveal() |
71 | 71 | return True |
72 | 72 | |
73 | 73 | def setup(tray): |
diff --git a/src/jarabe/journal/journalactivity.py b/src/jarabe/journal/journalactivity.py
index 852d407..7dbef28 100644
a
|
b
|
class JournalActivityDBusService(dbus.service.Object): |
67 | 67 | logging.debug('Trying to show object %s', object_id) |
68 | 68 | |
69 | 69 | if self._parent.show_object(object_id): |
70 | | self._parent.present() |
71 | | if self._parent.window is not None: |
72 | | # have to use gdk level, looks like metacity |
73 | | # doesn't raise windows from non-icon state, see #1339 |
74 | | self._parent.window.focus() |
| 70 | self._parent.reveal() |
75 | 71 | |
76 | 72 | def _chooser_response_cb(self, chooser, response_id, chooser_id): |
77 | 73 | logging.debug('JournalActivityDBusService._chooser_response_cb') |
… |
… |
class JournalActivity(Window): |
330 | 326 | |
331 | 327 | def __alert_closed_cb(self, data): |
332 | 328 | self.show_main_view() |
333 | | self.present() |
| 329 | self.reveal() |
334 | 330 | self._critical_space_alert = None |
335 | 331 | |
336 | 332 | def set_active_volume(self, mount): |
… |
… |
class JournalActivity(Window): |
339 | 335 | def focus_search(self): |
340 | 336 | """Become visible and give focus to the search entry |
341 | 337 | """ |
342 | | self.present() |
| 338 | self.reveal() |
343 | 339 | self.show_main_view() |
344 | 340 | self.search_grab_focus() |
345 | 341 | |