Author: js Date: 2008-10-04 13:06:53 +0200 (Sat, 04 Oct 2008) New Revision: 10475
Modified: branches/osx_newbuildsys/configure.ac branches/osx_newbuildsys/src/dock.py branches/osx_newbuildsys/src/notify.py Log: Move bounce code.
Modified: branches/osx_newbuildsys/configure.ac =================================================================== --- branches/osx_newbuildsys/configure.ac 2008-10-04 10:20:14 UTC (rev 10474) +++ branches/osx_newbuildsys/configure.ac 2008-10-04 11:06:53 UTC (rev 10475) @@ -12,6 +12,7 @@ AC_ISC_POSIX AC_PROG_CC AC_PROG_OBJC +AC_PROG_LN_S AC_C_CONST AC_CHECK_HEADERS([libintl.h])
Modified: branches/osx_newbuildsys/src/dock.py =================================================================== --- branches/osx_newbuildsys/src/dock.py 2008-10-04 10:20:14 UTC (rev 10474) +++ branches/osx_newbuildsys/src/dock.py 2008-10-04 11:06:53 UTC (rev 10475) @@ -20,6 +20,7 @@
from common import gajim from common import helpers +import osx
HAS_SYSTRAY_CAPABILITIES = True DOCK_IMAGES = {} @@ -73,5 +74,11 @@ if global_status is not None and self.status != global_status: self.status = global_status self.set_img() + + def bounce(self): + try: + osx.nsapp.requestUserAttention() + except NameError: + pass
# vim: se ts=3:
Modified: branches/osx_newbuildsys/src/notify.py =================================================================== --- branches/osx_newbuildsys/src/notify.py 2008-10-04 10:20:14 UTC (rev 10474) +++ branches/osx_newbuildsys/src/notify.py 2008-10-04 11:06:53 UTC (rev 10475) @@ -58,11 +58,6 @@ except: USER_HAS_GROWL = False
-try: - from AppKit import * -except ImportError: - pass - def get_show_in_roster(event, account, contact, session=None): '''Return True if this event must be shown in roster, else False''' if event == 'gc_message_received': @@ -319,10 +314,7 @@ if do_bounce: if sys.platform == 'darwin': - try: - NSApp.requestUserAttention_(NSInformationalRequest) - except NameError: - pass + gajim.interface.dock.bounce()
if do_cmd: command = gajim.config.get_per('notifications', str(advanced_notif_num),