fix exec commands and avatar in popups
This commit is contained in:
parent
533e6b356e
commit
98abd4f4d2
|
@ -398,7 +398,7 @@ def exec_command(command, use_shell=False):
|
||||||
if use_shell:
|
if use_shell:
|
||||||
subprocess.Popen('%s &' % command, shell=True).wait()
|
subprocess.Popen('%s &' % command, shell=True).wait()
|
||||||
else:
|
else:
|
||||||
args = shlex.split(command.encode('utf-8'))
|
args = shlex.split(command)
|
||||||
p = subprocess.Popen(args)
|
p = subprocess.Popen(args)
|
||||||
gajim.thread_interface(p.wait)
|
gajim.thread_interface(p.wait)
|
||||||
|
|
||||||
|
|
|
@ -157,8 +157,10 @@ class Notification:
|
||||||
def _nec_notification(self, obj):
|
def _nec_notification(self, obj):
|
||||||
if obj.do_popup:
|
if obj.do_popup:
|
||||||
if isinstance(obj.popup_image, str):
|
if isinstance(obj.popup_image, str):
|
||||||
obj.popup_image = gtkgui_helpers.get_icon_path(obj.popup_image,
|
icon_path = gtkgui_helpers.get_icon_path(obj.popup_image,
|
||||||
48)
|
48)
|
||||||
|
if icon_path:
|
||||||
|
obj.popup_image = icon_path
|
||||||
popup(obj.popup_event_type, obj.jid, obj.conn.name,
|
popup(obj.popup_event_type, obj.jid, obj.conn.name,
|
||||||
obj.popup_msg_type, path_to_image=obj.popup_image,
|
obj.popup_msg_type, path_to_image=obj.popup_image,
|
||||||
title=obj.popup_title, text=obj.popup_text,
|
title=obj.popup_title, text=obj.popup_text,
|
||||||
|
|
Loading…
Reference in New Issue