fix exec commands and avatar in popups

This commit is contained in:
Denis Fomin 2013-01-05 20:08:07 +04:00
parent 533e6b356e
commit 98abd4f4d2
2 changed files with 4 additions and 2 deletions

View File

@ -398,7 +398,7 @@ def exec_command(command, use_shell=False):
if use_shell:
subprocess.Popen('%s &' % command, shell=True).wait()
else:
args = shlex.split(command.encode('utf-8'))
args = shlex.split(command)
p = subprocess.Popen(args)
gajim.thread_interface(p.wait)

View File

@ -157,8 +157,10 @@ class Notification:
def _nec_notification(self, obj):
if obj.do_popup:
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)
if icon_path:
obj.popup_image = icon_path
popup(obj.popup_event_type, obj.jid, obj.conn.name,
obj.popup_msg_type, path_to_image=obj.popup_image,
title=obj.popup_title, text=obj.popup_text,