import indicate in file where it's used. Fixes #4942
This commit is contained in:
parent
752a6e72cb
commit
72d3c578d4
1 changed files with 15 additions and 12 deletions
|
@ -57,19 +57,22 @@ try:
|
||||||
except Exception:
|
except Exception:
|
||||||
USER_HAS_GROWL = False
|
USER_HAS_GROWL = False
|
||||||
|
|
||||||
def setup_indicator_server():
|
if gajim.HAVE_INDICATOR:
|
||||||
server = indicate.indicate_server_ref_default()
|
import indicate
|
||||||
server.set_type('message.im')
|
|
||||||
server.set_desktop_file('/usr/share/applications/gajim.desktop')
|
|
||||||
server.connect('server-display', server_display)
|
|
||||||
server.show()
|
|
||||||
|
|
||||||
def display(indicator, account, jid, msg_type):
|
def setup_indicator_server():
|
||||||
gajim.interface.handle_event(account, jid, msg_type)
|
server = indicate.indicate_server_ref_default()
|
||||||
indicator.hide()
|
server.set_type('message.im')
|
||||||
|
server.set_desktop_file('/usr/share/applications/gajim.desktop')
|
||||||
|
server.connect('server-display', server_display)
|
||||||
|
server.show()
|
||||||
|
|
||||||
def server_display(server):
|
def display(indicator, account, jid, msg_type):
|
||||||
win = gajim.interface.roster.window
|
gajim.interface.handle_event(account, jid, msg_type)
|
||||||
|
indicator.hide()
|
||||||
|
|
||||||
|
def server_display(server):
|
||||||
|
win = gajim.interface.roster.window
|
||||||
win.present()
|
win.present()
|
||||||
|
|
||||||
def get_show_in_roster(event, account, contact, session=None):
|
def get_show_in_roster(event, account, contact, session=None):
|
||||||
|
@ -604,7 +607,7 @@ class DesktopNotification:
|
||||||
if version >= [0, 3, 2]:
|
if version >= [0, 3, 2]:
|
||||||
hints['urgency'] = dbus.Byte(0) # Low Urgency
|
hints['urgency'] = dbus.Byte(0) # Low Urgency
|
||||||
hints['category'] = dbus.String(ntype)
|
hints['category'] = dbus.String(ntype)
|
||||||
# it seems notification-daemon doesn't like empty text
|
# it seems notification-daemon doesn't like empty text
|
||||||
if self.text:
|
if self.text:
|
||||||
text = self.text
|
text = self.text
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Reference in a new issue