ne need to duplicate code, show_next_unread in remote_control now does the same thing as click on systray when there is one or more pending event
This commit is contained in:
parent
4f53f2f769
commit
734e7ecb21
1 changed files with 3 additions and 22 deletions
|
@ -23,6 +23,8 @@ import gtk
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import systray
|
||||||
|
|
||||||
from common import exceptions
|
from common import exceptions
|
||||||
from common import gajim
|
from common import gajim
|
||||||
from time import time
|
from time import time
|
||||||
|
@ -274,29 +276,8 @@ class SignalObject(DbusPrototype):
|
||||||
def show_next_unread(self, *args):
|
def show_next_unread(self, *args):
|
||||||
''' Show the window(s) with next waiting messages in tabbed/group chats. '''
|
''' Show the window(s) with next waiting messages in tabbed/group chats. '''
|
||||||
#FIXME: when systray is disabled this method does nothing.
|
#FIXME: when systray is disabled this method does nothing.
|
||||||
#FIXME: show message from GC that refer to us (like systray does)
|
|
||||||
if len(gajim.interface.systray.jids) != 0:
|
if len(gajim.interface.systray.jids) != 0:
|
||||||
account = gajim.interface.systray.jids[0][0]
|
gajim.interface.systray.handle_first_event()
|
||||||
jid = gajim.interface.systray.jids[0][1]
|
|
||||||
acc = gajim.interface.instances[account]
|
|
||||||
jid_tab = None
|
|
||||||
if acc['gc'].has_key(jid):
|
|
||||||
jid_tab = acc['gc'][jid]
|
|
||||||
elif acc['chats'].has_key(jid):
|
|
||||||
jid_tab = acc['chats'][jid]
|
|
||||||
else:
|
|
||||||
gajim.interface.roster.new_chat(
|
|
||||||
gajim.contacts[account][jid][0], account)
|
|
||||||
jid_tab = acc['chats'][jid]
|
|
||||||
if jid_tab:
|
|
||||||
jid_tab.set_active_tab(jid)
|
|
||||||
jid_tab.window.present()
|
|
||||||
# preserve the 'steal focus preservation'
|
|
||||||
if self._is_first():
|
|
||||||
jid_tab.window.window.focus()
|
|
||||||
else:
|
|
||||||
jid_tab.window.window.focus(long(time()))
|
|
||||||
|
|
||||||
|
|
||||||
def contact_info(self, *args):
|
def contact_info(self, *args):
|
||||||
''' get vcard info for a contact. This method returns nothing.
|
''' get vcard info for a contact. This method returns nothing.
|
||||||
|
|
Loading…
Add table
Reference in a new issue