From 1f7a462788b27a83ea7e0660273e6864ed71e17f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 14 Nov 2007 19:47:52 +0000 Subject: [James Newton] osx port for Gajim. a GREAT thanks!!! --- src/osx/.deps/idle_la-idle.Plo | 1 + src/osx/.deps/nsapp.Plo | 1 + src/osx/Makefile | 761 ++++++++++++++++++++++ src/osx/Makefile.am | 45 ++ src/osx/Makefile.in | 761 ++++++++++++++++++++++ src/osx/__init__.py | 45 ++ src/osx/__init__.pyo | Bin 0 -> 1367 bytes src/osx/dbus.py | 131 ++++ src/osx/growl/.deps/_growlImage.Plo | 1 + src/osx/growl/.deps/_growl_la-_growl.Plo | 1 + src/osx/growl/Growl.py | 247 +++++++ src/osx/growl/Makefile | 651 ++++++++++++++++++ src/osx/growl/Makefile.am | 41 ++ src/osx/growl/Makefile.in | 651 ++++++++++++++++++ src/osx/growl/_growl.c | 239 +++++++ src/osx/growl/_growlImage.m | 274 ++++++++ src/osx/growl/setup.py | 25 + src/osx/growler.py | 63 ++ src/osx/idle.c | 174 +++++ src/osx/nsapp.h | 19 + src/osx/nsapp.m | 239 +++++++ src/osx/setup.py | 20 + src/osx/syncmenu/.deps/syncmenu_la-pysyncmenu.Plo | 1 + src/osx/syncmenu/.deps/syncmenu_la-sync-menu.Plo | 1 + src/osx/syncmenu/Makefile | 575 ++++++++++++++++ src/osx/syncmenu/Makefile.am | 21 + src/osx/syncmenu/Makefile.in | 575 ++++++++++++++++ src/osx/syncmenu/pysyncmenu.c | 55 ++ src/osx/syncmenu/setup.py | 27 + src/osx/syncmenu/sync-menu.c | 722 ++++++++++++++++++++ src/osx/syncmenu/sync-menu.h | 27 + src/osx/syncmenu/test-menu.c | 107 +++ src/osx/syncmenu/test-menu.py | 78 +++ 33 files changed, 6579 insertions(+) create mode 100644 src/osx/.deps/idle_la-idle.Plo create mode 100644 src/osx/.deps/nsapp.Plo create mode 100644 src/osx/Makefile create mode 100644 src/osx/Makefile.am create mode 100644 src/osx/Makefile.in create mode 100644 src/osx/__init__.py create mode 100644 src/osx/__init__.pyo create mode 100644 src/osx/dbus.py create mode 100644 src/osx/growl/.deps/_growlImage.Plo create mode 100644 src/osx/growl/.deps/_growl_la-_growl.Plo create mode 100644 src/osx/growl/Growl.py create mode 100644 src/osx/growl/Makefile create mode 100644 src/osx/growl/Makefile.am create mode 100644 src/osx/growl/Makefile.in create mode 100644 src/osx/growl/_growl.c create mode 100644 src/osx/growl/_growlImage.m create mode 100644 src/osx/growl/setup.py create mode 100644 src/osx/growler.py create mode 100644 src/osx/idle.c create mode 100644 src/osx/nsapp.h create mode 100644 src/osx/nsapp.m create mode 100644 src/osx/setup.py create mode 100644 src/osx/syncmenu/.deps/syncmenu_la-pysyncmenu.Plo create mode 100644 src/osx/syncmenu/.deps/syncmenu_la-sync-menu.Plo create mode 100644 src/osx/syncmenu/Makefile create mode 100644 src/osx/syncmenu/Makefile.am create mode 100644 src/osx/syncmenu/Makefile.in create mode 100644 src/osx/syncmenu/pysyncmenu.c create mode 100644 src/osx/syncmenu/setup.py create mode 100644 src/osx/syncmenu/sync-menu.c create mode 100644 src/osx/syncmenu/sync-menu.h create mode 100644 src/osx/syncmenu/test-menu.c create mode 100644 src/osx/syncmenu/test-menu.py (limited to 'src/osx') diff --git a/src/osx/.deps/idle_la-idle.Plo b/src/osx/.deps/idle_la-idle.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/.deps/idle_la-idle.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/.deps/nsapp.Plo b/src/osx/.deps/nsapp.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/.deps/nsapp.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/Makefile b/src/osx/Makefile new file mode 100644 index 000000000..d92ee6843 --- /dev/null +++ b/src/osx/Makefile @@ -0,0 +1,761 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# src/osx/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +srcdir = . +top_srcdir = ../.. + +pkgdatadir = $(datadir)/gajim +pkglibdir = $(libdir)/gajim +pkgincludedir = $(includedir)/gajim +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = src/osx +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(idlelibdir)" "$(DESTDIR)$(nsapplibdir)" +idlelibLTLIBRARIES_INSTALL = $(INSTALL) +nsapplibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(idlelib_LTLIBRARIES) $(nsapplib_LTLIBRARIES) +am__DEPENDENCIES_1 = +#idle_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__idle_la_SOURCES_DIST = idle.c +#am_idle_la_OBJECTS = idle_la-idle.lo +idle_la_OBJECTS = $(am_idle_la_OBJECTS) +#am_idle_la_rpath = -rpath $(idlelibdir) +#nsapp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__nsapp_la_SOURCES_DIST = nsapp.m +#am_nsapp_la_OBJECTS = nsapp.lo +nsapp_la_OBJECTS = $(am_nsapp_la_OBJECTS) +#am_nsapp_la_rpath = -rpath $(nsapplibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) --mode=compile $(OBJC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +OBJCLINK = $(LIBTOOL) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ + $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(idle_la_SOURCES) $(nsapp_la_SOURCES) +DIST_SOURCES = $(am__idle_la_SOURCES_DIST) \ + $(am__nsapp_la_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/asterix/gajim/missing --run aclocal-1.9 +ACLOCAL_AMFLAGS = -I ../m4 +ALL_LINGUAS = +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /home/asterix/gajim/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/asterix/gajim/missing --run autoconf +AUTOHEADER = ${SHELL} /home/asterix/gajim/missing --run autoheader +AUTOMAKE = ${SHELL} /home/asterix/gajim/missing --run automake-1.9 +AWK = gawk +BUILD_CARBON_FALSE = +BUILD_CARBON_TRUE = # +BUILD_COCOA_FALSE = +BUILD_COCOA_TRUE = # +BUILD_GTKSPELL_FALSE = # +BUILD_GTKSPELL_TRUE = +BUILD_IDLE_FALSE = # +BUILD_IDLE_OSX_FALSE = +BUILD_IDLE_OSX_TRUE = # +BUILD_IDLE_TRUE = +BUILD_REMOTE_CONTROL_FALSE = # +BUILD_REMOTE_CONTROL_TRUE = +BUILD_TRAYICON_FALSE = # +BUILD_TRAYICON_TRUE = +CARBON_LIBS = +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +COCOA_LIBS = +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DATADIR = /usr/local/share +DATADIRNAME = share +DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include +DBUS_LIBS = -ldbus-1 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DOCDIR = /usr/local/share/doc/gajim +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +GETTEXT_PACKAGE = gajim +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GREP = /bin/grep +GTKSPELL_CFLAGS = -I/usr/include/gtkspell-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GTKSPELL_LIBS = -lgtkspell -laspell -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +INSTOBJEXT = .mo +INTLLIBS = +INTLTOOL_CAVES_RULE = %.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DESKTOP_RULE = %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract +INTLTOOL_KBD_RULE = %.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_KEYS_RULE = %.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_MERGE = $(top_builddir)/intltool-merge +INTLTOOL_OAF_RULE = %.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@ +INTLTOOL_PERL = /usr/bin/perl +INTLTOOL_POLICY_RULE = %.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PONG_RULE = %.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PROP_RULE = %.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SCHEMAS_RULE = %.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVER_RULE = %.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVICE_RULE = %.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SHEET_RULE = %.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_THEME_RULE = %.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UI_RULE = %.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UPDATE = $(top_builddir)/intltool-update +INTLTOOL_XAM_RULE = %.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_XML_NOMERGE_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@ +INTLTOOL_XML_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +LDFLAGS = +LIBDIR = /usr/local/lib +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAINTAINER_MODE_FALSE = +MAINTAINER_MODE_TRUE = # +MAKEINFO = ${SHELL} /home/asterix/gajim/missing --run makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +MSGFMT_OPTS = -c +OBJEXT = o +PACKAGE = gajim +PACKAGE_BUGREPORT = http://trac.gajim.org/ +PACKAGE_NAME = Gajim - A Jabber Instant Messager +PACKAGE_STRING = Gajim - A Jabber Instant Messager 0.11.2.2-svn +PACKAGE_TARNAME = gajim +PACKAGE_VERSION = 0.11.2.2-svn +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +POFILES = +POSUB = po +PO_IN_DATADIR_FALSE = +PO_IN_DATADIR_TRUE = +PYGTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pygtk-2.0 +PYGTK_DEFS = /usr/share/pygtk/2.0/defs +PYGTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgmodule-2.0 -ldl -lffi -lgobject-2.0 -lglib-2.0 +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_INCLUDES = -I/usr/include/python2.4 +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.4 +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +USE_NLS = yes +VERSION = 0.11.2.2-svn +XGETTEXT = /usr/bin/xgettext +XMKMF = +XSCRNSAVER_CFLAGS = +XSCRNSAVER_LIBS = -lXss +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__fastdepOBJC_FALSE = +am__fastdepOBJC_TRUE = # +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = /home/asterix/gajim/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/gajim +pkgpythondir = ${pythondir}/gajim +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.4/site-packages +pythondir = ${prefix}/lib/python2.4/site-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = +SUBDIRS = growl syncmenu +OBJC = gcc +INCLUDES = \ + $(PYTHON_INCLUDES) + +#idlelib_LTLIBRARIES = idle.la +#idlelibdir = $(libdir)/gajim +#idle_la_LIBADD = $(CARBON_LIBS) +#idle_la_SOURCES = idle.c +#idle_la_LDFLAGS = \ +# -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +#idle_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +#nsapplib_LTLIBRARIES = nsapp.la +#nsapplibdir = $(libdir)/gajim +#nsapp_la_LIBADD = $(COCOA_LIBS) +#nsapp_la_SOURCES = nsapp.m +#nsapp_la_LDFLAGS = \ +# -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +#nsapp_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +#AM_OBJCFLAGS = $(nsapp_la_CFLAGS) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-idlelibLTLIBRARIES: $(idlelib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idlelibdir)" || $(mkdir_p) "$(DESTDIR)$(idlelibdir)" + @list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(idlelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idlelibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(idlelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idlelibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idlelibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(idlelibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(idlelibdir)/$$p"; \ + done + +clean-idlelibLTLIBRARIES: + -test -z "$(idlelib_LTLIBRARIES)" || rm -f $(idlelib_LTLIBRARIES) + @list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-nsapplibLTLIBRARIES: $(nsapplib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(nsapplibdir)" || $(mkdir_p) "$(DESTDIR)$(nsapplibdir)" + @list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(nsapplibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(nsapplibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(nsapplibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(nsapplibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-nsapplibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(nsapplibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(nsapplibdir)/$$p"; \ + done + +clean-nsapplibLTLIBRARIES: + -test -z "$(nsapplib_LTLIBRARIES)" || rm -f $(nsapplib_LTLIBRARIES) + @list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +idle.la: $(idle_la_OBJECTS) $(idle_la_DEPENDENCIES) + $(LINK) $(am_idle_la_rpath) $(idle_la_LDFLAGS) $(idle_la_OBJECTS) $(idle_la_LIBADD) $(LIBS) +nsapp.la: $(nsapp_la_OBJECTS) $(nsapp_la_DEPENDENCIES) + $(OBJCLINK) $(am_nsapp_la_rpath) $(nsapp_la_LDFLAGS) $(nsapp_la_OBJECTS) $(nsapp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/idle_la-idle.Plo +include ./$(DEPDIR)/nsapp.Plo + +.c.o: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +idle_la-idle.lo: idle.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(idle_la_CFLAGS) $(CFLAGS) -MT idle_la-idle.lo -MD -MP -MF "$(DEPDIR)/idle_la-idle.Tpo" -c -o idle_la-idle.lo `test -f 'idle.c' || echo '$(srcdir)/'`idle.c; \ + then mv -f "$(DEPDIR)/idle_la-idle.Tpo" "$(DEPDIR)/idle_la-idle.Plo"; else rm -f "$(DEPDIR)/idle_la-idle.Tpo"; exit 1; fi +# source='idle.c' object='idle_la-idle.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(idle_la_CFLAGS) $(CFLAGS) -c -o idle_la-idle.lo `test -f 'idle.c' || echo '$(srcdir)/'`idle.c + +.m.o: +# if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +# if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +# if $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=yes \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(LTOBJCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(idlelibdir)" "$(DESTDIR)$(nsapplibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-idlelibLTLIBRARIES clean-libtool \ + clean-nsapplibLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-idlelibLTLIBRARIES \ + install-nsapplibLTLIBRARIES + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-idlelibLTLIBRARIES uninstall-info-am \ + uninstall-nsapplibLTLIBRARIES + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-idlelibLTLIBRARIES clean-libtool \ + clean-nsapplibLTLIBRARIES clean-recursive ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-idlelibLTLIBRARIES install-info install-info-am \ + install-man install-nsapplibLTLIBRARIES install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-idlelibLTLIBRARIES uninstall-info-am \ + uninstall-nsapplibLTLIBRARIES + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/Makefile.am b/src/osx/Makefile.am new file mode 100644 index 000000000..1ccc8309a --- /dev/null +++ b/src/osx/Makefile.am @@ -0,0 +1,45 @@ +SUBDIRS = growl syncmenu + +ACLOCAL_AMFLAGS = -I ../m4 + +OBJC = gcc + +export MACOSX_DEPLOYMENT_TARGET=10.4 +INCLUDES = \ + $(PYTHON_INCLUDES) + +if BUILD_IDLE_OSX +idlelib_LTLIBRARIES = idle.la +idlelibdir = $(libdir)/gajim + +idle_la_LIBADD = $(CARBON_LIBS) + +idle_la_SOURCES = idle.c + +idle_la_LDFLAGS = \ + -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +idle_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +endif + +if BUILD_COCOA +nsapplib_LTLIBRARIES = nsapp.la +nsapplibdir = $(libdir)/gajim + +nsapp_la_LIBADD = $(COCOA_LIBS) + +nsapp_la_SOURCES = nsapp.m + +nsapp_la_LDFLAGS = \ + -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +nsapp_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) + +AM_OBJCFLAGS = $(nsapp_la_CFLAGS) +endif + +DISTCLEANFILES = + +EXTRA_DIST = + +MAINTAINERCLEANFILES = Makefile.in diff --git a/src/osx/Makefile.in b/src/osx/Makefile.in new file mode 100644 index 000000000..93d4919d6 --- /dev/null +++ b/src/osx/Makefile.in @@ -0,0 +1,761 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/osx +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(idlelibdir)" "$(DESTDIR)$(nsapplibdir)" +idlelibLTLIBRARIES_INSTALL = $(INSTALL) +nsapplibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(idlelib_LTLIBRARIES) $(nsapplib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_IDLE_OSX_TRUE@idle_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__idle_la_SOURCES_DIST = idle.c +@BUILD_IDLE_OSX_TRUE@am_idle_la_OBJECTS = idle_la-idle.lo +idle_la_OBJECTS = $(am_idle_la_OBJECTS) +@BUILD_IDLE_OSX_TRUE@am_idle_la_rpath = -rpath $(idlelibdir) +@BUILD_COCOA_TRUE@nsapp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am__nsapp_la_SOURCES_DIST = nsapp.m +@BUILD_COCOA_TRUE@am_nsapp_la_OBJECTS = nsapp.lo +nsapp_la_OBJECTS = $(am_nsapp_la_OBJECTS) +@BUILD_COCOA_TRUE@am_nsapp_la_rpath = -rpath $(nsapplibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) --mode=compile $(OBJC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +OBJCLINK = $(LIBTOOL) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ + $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(idle_la_SOURCES) $(nsapp_la_SOURCES) +DIST_SOURCES = $(am__idle_la_SOURCES_DIST) \ + $(am__nsapp_la_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = -I ../m4 +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CARBON_FALSE = @BUILD_CARBON_FALSE@ +BUILD_CARBON_TRUE = @BUILD_CARBON_TRUE@ +BUILD_COCOA_FALSE = @BUILD_COCOA_FALSE@ +BUILD_COCOA_TRUE = @BUILD_COCOA_TRUE@ +BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@ +BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@ +BUILD_IDLE_FALSE = @BUILD_IDLE_FALSE@ +BUILD_IDLE_OSX_FALSE = @BUILD_IDLE_OSX_FALSE@ +BUILD_IDLE_OSX_TRUE = @BUILD_IDLE_OSX_TRUE@ +BUILD_IDLE_TRUE = @BUILD_IDLE_TRUE@ +BUILD_REMOTE_CONTROL_FALSE = @BUILD_REMOTE_CONTROL_FALSE@ +BUILD_REMOTE_CONTROL_TRUE = @BUILD_REMOTE_CONTROL_TRUE@ +BUILD_TRAYICON_FALSE = @BUILD_TRAYICON_FALSE@ +BUILD_TRAYICON_TRUE = @BUILD_TRAYICON_TRUE@ +CARBON_LIBS = @CARBON_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COCOA_LIBS = @COCOA_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOCDIR = @DOCDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@ +GTKSPELL_LIBS = @GTKSPELL_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_DEFS = @PYGTK_DEFS@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMKMF = @XMKMF@ +XSCRNSAVER_CFLAGS = @XSCRNSAVER_CFLAGS@ +XSCRNSAVER_LIBS = @XSCRNSAVER_LIBS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +SUBDIRS = growl syncmenu +OBJC = gcc +INCLUDES = \ + $(PYTHON_INCLUDES) + +@BUILD_IDLE_OSX_TRUE@idlelib_LTLIBRARIES = idle.la +@BUILD_IDLE_OSX_TRUE@idlelibdir = $(libdir)/gajim +@BUILD_IDLE_OSX_TRUE@idle_la_LIBADD = $(CARBON_LIBS) +@BUILD_IDLE_OSX_TRUE@idle_la_SOURCES = idle.c +@BUILD_IDLE_OSX_TRUE@idle_la_LDFLAGS = \ +@BUILD_IDLE_OSX_TRUE@ -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +@BUILD_IDLE_OSX_TRUE@idle_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +@BUILD_COCOA_TRUE@nsapplib_LTLIBRARIES = nsapp.la +@BUILD_COCOA_TRUE@nsapplibdir = $(libdir)/gajim +@BUILD_COCOA_TRUE@nsapp_la_LIBADD = $(COCOA_LIBS) +@BUILD_COCOA_TRUE@nsapp_la_SOURCES = nsapp.m +@BUILD_COCOA_TRUE@nsapp_la_LDFLAGS = \ +@BUILD_COCOA_TRUE@ -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +@BUILD_COCOA_TRUE@nsapp_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +@BUILD_COCOA_TRUE@AM_OBJCFLAGS = $(nsapp_la_CFLAGS) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-idlelibLTLIBRARIES: $(idlelib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idlelibdir)" || $(mkdir_p) "$(DESTDIR)$(idlelibdir)" + @list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(idlelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idlelibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(idlelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idlelibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idlelibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(idlelibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(idlelibdir)/$$p"; \ + done + +clean-idlelibLTLIBRARIES: + -test -z "$(idlelib_LTLIBRARIES)" || rm -f $(idlelib_LTLIBRARIES) + @list='$(idlelib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-nsapplibLTLIBRARIES: $(nsapplib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(nsapplibdir)" || $(mkdir_p) "$(DESTDIR)$(nsapplibdir)" + @list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(nsapplibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(nsapplibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(nsapplibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(nsapplibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-nsapplibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(nsapplibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(nsapplibdir)/$$p"; \ + done + +clean-nsapplibLTLIBRARIES: + -test -z "$(nsapplib_LTLIBRARIES)" || rm -f $(nsapplib_LTLIBRARIES) + @list='$(nsapplib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +idle.la: $(idle_la_OBJECTS) $(idle_la_DEPENDENCIES) + $(LINK) $(am_idle_la_rpath) $(idle_la_LDFLAGS) $(idle_la_OBJECTS) $(idle_la_LIBADD) $(LIBS) +nsapp.la: $(nsapp_la_OBJECTS) $(nsapp_la_DEPENDENCIES) + $(OBJCLINK) $(am_nsapp_la_rpath) $(nsapp_la_LDFLAGS) $(nsapp_la_OBJECTS) $(nsapp_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idle_la-idle.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsapp.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +idle_la-idle.lo: idle.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(idle_la_CFLAGS) $(CFLAGS) -MT idle_la-idle.lo -MD -MP -MF "$(DEPDIR)/idle_la-idle.Tpo" -c -o idle_la-idle.lo `test -f 'idle.c' || echo '$(srcdir)/'`idle.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/idle_la-idle.Tpo" "$(DEPDIR)/idle_la-idle.Plo"; else rm -f "$(DEPDIR)/idle_la-idle.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='idle.c' object='idle_la-idle.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(idle_la_CFLAGS) $(CFLAGS) -c -o idle_la-idle.lo `test -f 'idle.c' || echo '$(srcdir)/'`idle.c + +.m.o: +@am__fastdepOBJC_TRUE@ if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +@am__fastdepOBJC_TRUE@ if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +@am__fastdepOBJC_TRUE@ if $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LTOBJCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(LTLIBRARIES) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(idlelibdir)" "$(DESTDIR)$(nsapplibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic clean-idlelibLTLIBRARIES clean-libtool \ + clean-nsapplibLTLIBRARIES mostlyclean-am + +distclean: distclean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: install-idlelibLTLIBRARIES \ + install-nsapplibLTLIBRARIES + +install-exec-am: + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-idlelibLTLIBRARIES uninstall-info-am \ + uninstall-nsapplibLTLIBRARIES + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-idlelibLTLIBRARIES clean-libtool \ + clean-nsapplibLTLIBRARIES clean-recursive ctags \ + ctags-recursive distclean distclean-compile distclean-generic \ + distclean-libtool distclean-recursive distclean-tags distdir \ + dvi dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-idlelibLTLIBRARIES install-info install-info-am \ + install-man install-nsapplibLTLIBRARIES install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-idlelibLTLIBRARIES uninstall-info-am \ + uninstall-nsapplibLTLIBRARIES + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/__init__.py b/src/osx/__init__.py new file mode 100644 index 000000000..ee21386cb --- /dev/null +++ b/src/osx/__init__.py @@ -0,0 +1,45 @@ +import sys, commands +from network_manager_listener import device_now_active, device_no_longer_active +import nsapp + + +if sys.platform != "darwin": + raise ImportError("System platform is not OS/X") + + +net_device_active = True + + +### +### Utility functions +### + +def checkPID(pid, procname): + out = commands.getstatusoutput("ps -wwp %d" % pid) + arr = out[1].split("\n") + if ((len(arr) == 2) and (arr[1].find(procname) >= 0)): + return True + return False + + +def init(): + nsapp.init() + nsapp.setNetworkCB(netDeviceChanged) + return + + +def shutdown(): + import dbus + dbus.shutdown() + return + + +def netDeviceChanged(): + global net_device_active + if net_device_active: + net_device_active = False + device_no_longer_active(None) + else: + net_device_active = True + device_now_active(None) + return diff --git a/src/osx/__init__.pyo b/src/osx/__init__.pyo new file mode 100644 index 000000000..af16f9e9a Binary files /dev/null and b/src/osx/__init__.pyo differ diff --git a/src/osx/dbus.py b/src/osx/dbus.py new file mode 100644 index 000000000..41f1e83c5 --- /dev/null +++ b/src/osx/dbus.py @@ -0,0 +1,131 @@ +### +### Internal dbus management. This can go away once native gtk+ is in fink or +### macports and we can require their dbus. +### + + + +import os, sys, commands, signal + +if sys.platform != "darwin": + raise ImportError("System platform is not OS/X") + +import osx, osx.nsapp +from common.configpaths import gajimpaths + + +_GTK_BASE = "/Library/Frameworks/GTK+.framework/Versions/Current" + + +def readEnv(): + gajimpaths.add_from_root(u'dbus.env', u'dbus.env') + try: + dbus_env = file(gajimpaths[u'dbus.env'], "r") + except: + return False + try: + line1 = dbus_env.readline() + line2 = dbus_env.readline() + dbus_env.close() + except: + print "Invalid dbus.env file" + return False + return parseEnv(line1, line2) + + +def parseEnv(line1, line2): + try: + if not line1 or not line2: + return False + if (not line1.startswith("DBUS_SESSION_BUS_ADDRESS=") or + not line2.startswith("DBUS_SESSION_BUS_PID=")): + return False + arr = line2.split("=") + pid = arr[1].strip().strip('"') + if not osx.checkPID(int(pid), "dbus-daemon"): + return False + line1 = line1.strip() + loc = line1.find("=") + address = line1[loc + 1:] + address = address.strip().strip('"') + return [address, pid] + except Exception, e: + print "Invalid dbus.env file", e + return False + return None + + +def setEnv(env): + os.environ['DBUS_SESSION_BUS_ADDRESS'] = env[0] + os.environ['DBUS_SESSION_BUS_PID'] = env[1] + return + + +def writeEnv(env): + gajimpaths.add_from_root(u'dbus.env', u'dbus.env') + try: + dbus_env = file(gajimpaths[u'dbus.env'], "w+") + dbus_env.write("DBUS_SESSION_BUS_ADDRESS=\"" + env[0] + "\"\n") + dbus_env.write("DBUS_SESSION_BUS_PID=\"" + env[1] + "\"\n") + dbus_env.close() + except Exception, e: + print "Failed to write file: %s" % gajimpaths[u'dbus.env'] + print str(e) + return + + +def checkUUID(): + if os.path.exists(_GTK_BASE + "/var/lib/dbus/machine-id"): + return + ret = commands.getstatusoutput(_GTK_BASE + "/bin/dbus-uuidgen --ensure") + if ret[0] != 0: + print "Failed to initialize dbus machine UUID:", ret[1] + return + + +def load(start): + # Look for existing external session and just use it if it exists + if (('DBUS_SESSION_BUS_ADDRESS' in os.environ) and + ('DBUS_SESSION_BUS_PID' in os.environ) and + osx.checkPID(int(os.environ['DBUS_SESSION_BUS_PID']), 'dbus-daemon')): + return True + + # Look for our own internal session + env = readEnv() + if env: + # We have a valid existing dbus session, yay + setEnv(env) + return True + + # Initialize the machine's UUID if not done yet + checkUUID() + + if start: + # None found, start a new session + print "Starting new dbus session" + #cmd = os.path.join(osx.nsapp.getBundlePath(), + # "Contents/Resources/bin/dbus-launch --exit-with-session") + cmd = _GTK_BASE + "/bin/dbus-launch --exit-with-session" + ret = commands.getstatusoutput(cmd) + arr = ret[1].split("\n") + if len(arr) != 2: + print "Failed to start internal dbus session:" + print ret[1] + return + env = parseEnv(arr[0].strip(), arr[1].strip()) + if not env: + print "Failed to start internal dbus session:" + print ret[1] + return + setEnv(env) + writeEnv(env) + return True + return False + + +def shutdown(): + env = readEnv() + if not env: + return + os.kill(int(env[1]), signal.SIGINT) + return diff --git a/src/osx/growl/.deps/_growlImage.Plo b/src/osx/growl/.deps/_growlImage.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/growl/.deps/_growlImage.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/growl/.deps/_growl_la-_growl.Plo b/src/osx/growl/.deps/_growl_la-_growl.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/growl/.deps/_growl_la-_growl.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/growl/Growl.py b/src/osx/growl/Growl.py new file mode 100644 index 000000000..15e037673 --- /dev/null +++ b/src/osx/growl/Growl.py @@ -0,0 +1,247 @@ +""" +A Python module that enables posting notifications to the Growl daemon. +See for more information. +""" +__version__ = "0.7" +__author__ = "Mark Rowe " +__copyright__ = "(C) 2003 Mark Rowe . Released under the BSD license." +__contributors__ = ["Ingmar J Stein (Growl Team)", + "Rui Carmo (http://the.taoofmac.com)", + "Jeremy Rossi " + ] + +try: + import _growl +except: + _growl = False +import types +import struct +import md5 +import socket + +GROWL_UDP_PORT=9887 +GROWL_PROTOCOL_VERSION=1 +GROWL_TYPE_REGISTRATION=0 +GROWL_TYPE_NOTIFICATION=1 + +GROWL_APP_NAME="ApplicationName" +GROWL_APP_ICON="ApplicationIcon" +GROWL_NOTIFICATIONS_DEFAULT="DefaultNotifications" +GROWL_NOTIFICATIONS_ALL="AllNotifications" +GROWL_NOTIFICATIONS_USER_SET="AllowedUserNotifications" + +GROWL_NOTIFICATION_NAME="NotificationName" +GROWL_NOTIFICATION_TITLE="NotificationTitle" +GROWL_NOTIFICATION_DESCRIPTION="NotificationDescription" +GROWL_NOTIFICATION_ICON="NotificationIcon" +GROWL_NOTIFICATION_APP_ICON="NotificationAppIcon" +GROWL_NOTIFICATION_PRIORITY="NotificationPriority" + +GROWL_NOTIFICATION_STICKY="NotificationSticky" +GROWL_NOTIFICATION_CLICK_CONTEXT="NotificationClickContext" + +GROWL_APP_REGISTRATION="GrowlApplicationRegistrationNotification" +GROWL_APP_REGISTRATION_CONF="GrowlApplicationRegistrationConfirmationNotification" +GROWL_NOTIFICATION="GrowlNotification" +GROWL_SHUTDOWN="GrowlShutdown" +GROWL_PING="Honey, Mind Taking Out The Trash" +GROWL_PONG="What Do You Want From Me, Woman" +GROWL_IS_READY="Lend Me Some Sugar; I Am Your Neighbor!" + +GROWL_NOTIFICATION_CLICKED="GrowlClicked!" +GROWL_NOTIFICATION_TIMED_OUT="GrowlTimedOut!" +GROWL_KEY_CLICKED_CONTEXT="ClickedContext" + + +growlPriority = {"Very Low":-2,"Moderate":-1,"Normal":0,"High":1,"Emergency":2} + +class netgrowl: + """Builds a Growl Network Registration packet. + Defaults to emulating the command-line growlnotify utility.""" + + __notAllowed__ = [GROWL_APP_ICON, GROWL_NOTIFICATION_ICON, GROWL_NOTIFICATION_APP_ICON] + + def __init__(self, hostname, password ): + self.hostname = hostname + self.password = password + self.socket = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) + + def send(self, data): + self.socket.sendto(data, (self.hostname, GROWL_UDP_PORT)) + + def PostNotification(self, userInfo): + if userInfo.has_key(GROWL_NOTIFICATION_PRIORITY): + priority = userInfo[GROWL_NOTIFICATION_PRIORITY] + else: + priority = 0 + if userInfo.has_key(GROWL_NOTIFICATION_STICKY): + sticky = userInfo[GROWL_NOTIFICATION_STICKY] + else: + priority = False + data = self.encodeNotify(userInfo[GROWL_APP_NAME], + userInfo[GROWL_NOTIFICATION_NAME], + userInfo[GROWL_NOTIFICATION_TITLE], + userInfo[GROWL_NOTIFICATION_DESCRIPTION], + priority, + sticky) + return self.send(data) + + def PostRegistration(self, userInfo): + data = self.encodeRegistration(userInfo[GROWL_APP_NAME], + userInfo[GROWL_NOTIFICATIONS_ALL], + userInfo[GROWL_NOTIFICATIONS_DEFAULT]) + return self.send(data) + + def encodeRegistration(self, application, notifications, defaultNotifications): + data = struct.pack("!BBH", + GROWL_PROTOCOL_VERSION, + GROWL_TYPE_REGISTRATION, + len(application) ) + data += struct.pack("BB", + len(notifications), + len(defaultNotifications) ) + data += application + for i in notifications: + encoded = i.encode("utf-8") + data += struct.pack("!H", len(encoded)) + data += encoded + for i in defaultNotifications: + data += struct.pack("B", i) + return self.encodePassword(data) + + def encodeNotify(self, application, notification, title, description, + priority = 0, sticky = False): + + application = application.encode("utf-8") + notification = notification.encode("utf-8") + title = title.encode("utf-8") + description = description.encode("utf-8") + flags = (priority & 0x07) * 2 + if priority < 0: + flags |= 0x08 + if sticky: + flags = flags | 0x0001 + data = struct.pack("!BBHHHHH", + GROWL_PROTOCOL_VERSION, + GROWL_TYPE_NOTIFICATION, + flags, + len(notification), + len(title), + len(description), + len(application) ) + data += notification + data += title + data += description + data += application + return self.encodePassword(data) + + def encodePassword(self, data): + checksum = md5.new() + checksum.update(data) + if self.password: + checksum.update(self.password) + data += checksum.digest() + return data + +class _ImageHook(type): + def __getattribute__(self, attr): + global Image + if Image is self: + from _growlImage import Image + + return getattr(Image, attr) + +class Image(object): + __metaclass__ = _ImageHook + +class _RawImage(object): + def __init__(self, data): self.rawImageData = data + +class GrowlNotifier(object): + """ + A class that abstracts the process of registering and posting + notifications to the Growl daemon. + + You can either pass `applicationName', `notifications', + `defaultNotifications' and `applicationIcon' to the constructor + or you may define them as class-level variables in a sub-class. + + `defaultNotifications' is optional, and defaults to the value of + `notifications'. `applicationIcon' is also optional but defaults + to a pointless icon so is better to be specified. + """ + + applicationName = 'GrowlNotifier' + notifications = [] + defaultNotifications = [] + applicationIcon = None + _notifyMethod = _growl + _notify_cb = None + + def __init__(self, applicationName=None, notifications=None, defaultNotifications=None, applicationIcon=None, hostname=None, password=None, notify_cb=None): + assert(applicationName is not None, 'an application name is required') + self.applicationName = applicationName + + assert(notifications, 'a sequence of one or more notification names is required') + self.notifications = list(notifications) + if defaultNotifications is not None: + self.defaultNotifications = list(defaultNotifications) + else: + self.defaultNotifications = list(self.notifications) + + if applicationIcon is not None: + self.applicationIcon = self._checkIcon(applicationIcon) + + if hostname is not None and password is not None: + self._notifyMethod = netgrowl(hostname, password) + elif hostname is not None or password is not None: + raise KeyError, "Hostname and Password are both required for a network notification" + + if notify_cb is not None: + self._notify_cb = notify_cb + else: + self._notify_cb = self.notifyCB + + if hostname is None and password is None: + self._notifyMethod.Init(applicationName, self._notify_cb) + + def _checkIcon(self, data): + if isinstance(data, str): + return _RawImage(data) + else: + return data + + def register(self): + if self.applicationIcon is not None: + self.applicationIcon = self._checkIcon(self.applicationIcon) + + regInfo = {GROWL_APP_NAME: self.applicationName, + GROWL_NOTIFICATIONS_ALL: self.notifications, + GROWL_NOTIFICATIONS_DEFAULT: self.defaultNotifications, + GROWL_APP_ICON:self.applicationIcon, + } + self._notifyMethod.PostRegistration(regInfo) + + def notify(self, noteType, title, description, icon=None, sticky=False, priority=None, context=None): + assert noteType in self.notifications + notifyInfo = {GROWL_NOTIFICATION_NAME: noteType, + GROWL_APP_NAME: self.applicationName, + GROWL_NOTIFICATION_TITLE: title, + GROWL_NOTIFICATION_DESCRIPTION: description, + } + if sticky: + notifyInfo[GROWL_NOTIFICATION_STICKY] = 1 + + if priority is not None: + notifyInfo[GROWL_NOTIFICATION_PRIORITY] = priority + + if icon: + notifyInfo[GROWL_NOTIFICATION_ICON] = self._checkIcon(icon) + + if context: + notifyInfo[GROWL_NOTIFICATION_CLICK_CONTEXT] = context + + self._notifyMethod.PostNotification(notifyInfo) + + def notifyCB(self, userdata): + print "Got notify in pyland", userdata diff --git a/src/osx/growl/Makefile b/src/osx/growl/Makefile new file mode 100644 index 000000000..66866c8b4 --- /dev/null +++ b/src/osx/growl/Makefile @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# src/osx/growl/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +srcdir = . +top_srcdir = ../../.. + +pkgdatadir = $(datadir)/gajim +pkglibdir = $(libdir)/gajim +pkgincludedir = $(includedir)/gajim +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = src/osx/growl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(_growlImagelibdir)" \ + "$(DESTDIR)$(_growllibdir)" +_growlImagelibLTLIBRARIES_INSTALL = $(INSTALL) +_growllibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(_growlImagelib_LTLIBRARIES) $(_growllib_LTLIBRARIES) +am__DEPENDENCIES_1 = +#_growl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am___growl_la_SOURCES_DIST = _growl.c +#am__growl_la_OBJECTS = _growl_la-_growl.lo +_growl_la_OBJECTS = $(am__growl_la_OBJECTS) +#am__growl_la_rpath = -rpath $(_growllibdir) +#_growlImage_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am___growlImage_la_SOURCES_DIST = _growlImage.m +#am__growlImage_la_OBJECTS = _growlImage.lo +_growlImage_la_OBJECTS = $(am__growlImage_la_OBJECTS) +#am__growlImage_la_rpath = -rpath \ +# $(_growlImagelibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) --mode=compile $(OBJC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +OBJCLINK = $(LIBTOOL) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ + $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(_growl_la_SOURCES) $(_growlImage_la_SOURCES) +DIST_SOURCES = $(am___growl_la_SOURCES_DIST) \ + $(am___growlImage_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/asterix/gajim/missing --run aclocal-1.9 +ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} +ALL_LINGUAS = +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /home/asterix/gajim/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/asterix/gajim/missing --run autoconf +AUTOHEADER = ${SHELL} /home/asterix/gajim/missing --run autoheader +AUTOMAKE = ${SHELL} /home/asterix/gajim/missing --run automake-1.9 +AWK = gawk +BUILD_CARBON_FALSE = +BUILD_CARBON_TRUE = # +BUILD_COCOA_FALSE = +BUILD_COCOA_TRUE = # +BUILD_GTKSPELL_FALSE = # +BUILD_GTKSPELL_TRUE = +BUILD_IDLE_FALSE = # +BUILD_IDLE_OSX_FALSE = +BUILD_IDLE_OSX_TRUE = # +BUILD_IDLE_TRUE = +BUILD_REMOTE_CONTROL_FALSE = # +BUILD_REMOTE_CONTROL_TRUE = +BUILD_TRAYICON_FALSE = # +BUILD_TRAYICON_TRUE = +CARBON_LIBS = +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +COCOA_LIBS = +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DATADIR = /usr/local/share +DATADIRNAME = share +DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include +DBUS_LIBS = -ldbus-1 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DOCDIR = /usr/local/share/doc/gajim +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +GETTEXT_PACKAGE = gajim +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GREP = /bin/grep +GTKSPELL_CFLAGS = -I/usr/include/gtkspell-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GTKSPELL_LIBS = -lgtkspell -laspell -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +INSTOBJEXT = .mo +INTLLIBS = +INTLTOOL_CAVES_RULE = %.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DESKTOP_RULE = %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract +INTLTOOL_KBD_RULE = %.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_KEYS_RULE = %.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_MERGE = $(top_builddir)/intltool-merge +INTLTOOL_OAF_RULE = %.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@ +INTLTOOL_PERL = /usr/bin/perl +INTLTOOL_POLICY_RULE = %.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PONG_RULE = %.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PROP_RULE = %.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SCHEMAS_RULE = %.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVER_RULE = %.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVICE_RULE = %.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SHEET_RULE = %.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_THEME_RULE = %.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UI_RULE = %.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UPDATE = $(top_builddir)/intltool-update +INTLTOOL_XAM_RULE = %.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_XML_NOMERGE_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@ +INTLTOOL_XML_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +LDFLAGS = +LIBDIR = /usr/local/lib +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAINTAINER_MODE_FALSE = +MAINTAINER_MODE_TRUE = # +MAKEINFO = ${SHELL} /home/asterix/gajim/missing --run makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +MSGFMT_OPTS = -c +OBJEXT = o +PACKAGE = gajim +PACKAGE_BUGREPORT = http://trac.gajim.org/ +PACKAGE_NAME = Gajim - A Jabber Instant Messager +PACKAGE_STRING = Gajim - A Jabber Instant Messager 0.11.2.2-svn +PACKAGE_TARNAME = gajim +PACKAGE_VERSION = 0.11.2.2-svn +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +POFILES = +POSUB = po +PO_IN_DATADIR_FALSE = +PO_IN_DATADIR_TRUE = +PYGTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pygtk-2.0 +PYGTK_DEFS = /usr/share/pygtk/2.0/defs +PYGTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgmodule-2.0 -ldl -lffi -lgobject-2.0 -lglib-2.0 +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_INCLUDES = -I/usr/include/python2.4 +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.4 +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +USE_NLS = yes +VERSION = 0.11.2.2-svn +XGETTEXT = /usr/bin/xgettext +XMKMF = +XSCRNSAVER_CFLAGS = +XSCRNSAVER_LIBS = -lXss +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__fastdepOBJC_FALSE = +am__fastdepOBJC_TRUE = # +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = /home/asterix/gajim/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/gajim +pkgpythondir = ${pythondir}/gajim +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.4/site-packages +pythondir = ${prefix}/lib/python2.4/site-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = +OBJC = gcc +INCLUDES = \ + $(PYTHON_INCLUDES) + +#_growllib_LTLIBRARIES = _growl.la +#_growllibdir = $(libdir)/gajim +#_growl_la_LIBADD = $(CARBON_LIBS) +#_growl_la_SOURCES = _growl.c +#_growl_la_LDFLAGS = \ +# -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +#_growl_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +#_growlImagelib_LTLIBRARIES = _growlImage.la +#_growlImagelibdir = $(libdir)/gajim +#_growlImage_la_LIBADD = $(COCOA_LIBS) +#_growlImage_la_SOURCES = _growlImage.m +#_growlImage_la_LDFLAGS = \ +# -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +#_growlImage_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +#AM_OBJCFLAGS = $(_growlImage_la_CFLAGS) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/growl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/growl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-_growlImagelibLTLIBRARIES: $(_growlImagelib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(_growlImagelibdir)" || $(mkdir_p) "$(DESTDIR)$(_growlImagelibdir)" + @list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(_growlImagelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(_growlImagelibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(_growlImagelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(_growlImagelibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-_growlImagelibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(_growlImagelibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(_growlImagelibdir)/$$p"; \ + done + +clean-_growlImagelibLTLIBRARIES: + -test -z "$(_growlImagelib_LTLIBRARIES)" || rm -f $(_growlImagelib_LTLIBRARIES) + @list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-_growllibLTLIBRARIES: $(_growllib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(_growllibdir)" || $(mkdir_p) "$(DESTDIR)$(_growllibdir)" + @list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(_growllibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(_growllibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(_growllibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(_growllibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-_growllibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(_growllibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(_growllibdir)/$$p"; \ + done + +clean-_growllibLTLIBRARIES: + -test -z "$(_growllib_LTLIBRARIES)" || rm -f $(_growllib_LTLIBRARIES) + @list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +_growl.la: $(_growl_la_OBJECTS) $(_growl_la_DEPENDENCIES) + $(LINK) $(am__growl_la_rpath) $(_growl_la_LDFLAGS) $(_growl_la_OBJECTS) $(_growl_la_LIBADD) $(LIBS) +_growlImage.la: $(_growlImage_la_OBJECTS) $(_growlImage_la_DEPENDENCIES) + $(OBJCLINK) $(am__growlImage_la_rpath) $(_growlImage_la_LDFLAGS) $(_growlImage_la_OBJECTS) $(_growlImage_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/_growlImage.Plo +include ./$(DEPDIR)/_growl_la-_growl.Plo + +.c.o: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +_growl_la-_growl.lo: _growl.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_growl_la_CFLAGS) $(CFLAGS) -MT _growl_la-_growl.lo -MD -MP -MF "$(DEPDIR)/_growl_la-_growl.Tpo" -c -o _growl_la-_growl.lo `test -f '_growl.c' || echo '$(srcdir)/'`_growl.c; \ + then mv -f "$(DEPDIR)/_growl_la-_growl.Tpo" "$(DEPDIR)/_growl_la-_growl.Plo"; else rm -f "$(DEPDIR)/_growl_la-_growl.Tpo"; exit 1; fi +# source='_growl.c' object='_growl_la-_growl.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_growl_la_CFLAGS) $(CFLAGS) -c -o _growl_la-_growl.lo `test -f '_growl.c' || echo '$(srcdir)/'`_growl.c + +.m.o: +# if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +# if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +# if $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +# then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + source='$<' object='$@' libtool=yes \ + DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) \ + $(LTOBJCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(_growlImagelibdir)" "$(DESTDIR)$(_growllibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-_growlImagelibLTLIBRARIES clean-_growllibLTLIBRARIES \ + clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-_growlImagelibLTLIBRARIES \ + install-_growllibLTLIBRARIES + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-_growlImagelibLTLIBRARIES \ + uninstall-_growllibLTLIBRARIES uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-_growlImagelibLTLIBRARIES clean-_growllibLTLIBRARIES \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install \ + install-_growlImagelibLTLIBRARIES install-_growllibLTLIBRARIES \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall \ + uninstall-_growlImagelibLTLIBRARIES \ + uninstall-_growllibLTLIBRARIES uninstall-am uninstall-info-am + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/growl/Makefile.am b/src/osx/growl/Makefile.am new file mode 100644 index 000000000..df48b58d8 --- /dev/null +++ b/src/osx/growl/Makefile.am @@ -0,0 +1,41 @@ +OBJC = gcc + +export MACOSX_DEPLOYMENT_TARGET=10.4 +INCLUDES = \ + $(PYTHON_INCLUDES) + +if BUILD_CARBON +_growllib_LTLIBRARIES = _growl.la +_growllibdir = $(libdir)/gajim + +_growl_la_LIBADD = $(CARBON_LIBS) + +_growl_la_SOURCES = _growl.c + +_growl_la_LDFLAGS = \ + -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +_growl_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +endif + +if BUILD_COCOA +_growlImagelib_LTLIBRARIES = _growlImage.la +_growlImagelibdir = $(libdir)/gajim + +_growlImage_la_LIBADD = $(COCOA_LIBS) + +_growlImage_la_SOURCES = _growlImage.m + +_growlImage_la_LDFLAGS = \ + -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +_growlImage_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) + +AM_OBJCFLAGS = $(_growlImage_la_CFLAGS) +endif + +DISTCLEANFILES = + +EXTRA_DIST = + +MAINTAINERCLEANFILES = Makefile.in diff --git a/src/osx/growl/Makefile.in b/src/osx/growl/Makefile.in new file mode 100644 index 000000000..44222f33e --- /dev/null +++ b/src/osx/growl/Makefile.in @@ -0,0 +1,651 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/osx/growl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(_growlImagelibdir)" \ + "$(DESTDIR)$(_growllibdir)" +_growlImagelibLTLIBRARIES_INSTALL = $(INSTALL) +_growllibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(_growlImagelib_LTLIBRARIES) $(_growllib_LTLIBRARIES) +am__DEPENDENCIES_1 = +@BUILD_CARBON_TRUE@_growl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am___growl_la_SOURCES_DIST = _growl.c +@BUILD_CARBON_TRUE@am__growl_la_OBJECTS = _growl_la-_growl.lo +_growl_la_OBJECTS = $(am__growl_la_OBJECTS) +@BUILD_CARBON_TRUE@am__growl_la_rpath = -rpath $(_growllibdir) +@BUILD_COCOA_TRUE@_growlImage_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am___growlImage_la_SOURCES_DIST = _growlImage.m +@BUILD_COCOA_TRUE@am__growlImage_la_OBJECTS = _growlImage.lo +_growlImage_la_OBJECTS = $(am__growlImage_la_OBJECTS) +@BUILD_COCOA_TRUE@am__growlImage_la_rpath = -rpath \ +@BUILD_COCOA_TRUE@ $(_growlImagelibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) +LTOBJCCOMPILE = $(LIBTOOL) --mode=compile $(OBJC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_OBJCFLAGS) $(OBJCFLAGS) +OBJCLD = $(OBJC) +OBJCLINK = $(LIBTOOL) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ + $(OBJCFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(_growl_la_SOURCES) $(_growlImage_la_SOURCES) +DIST_SOURCES = $(am___growl_la_SOURCES_DIST) \ + $(am___growlImage_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CARBON_FALSE = @BUILD_CARBON_FALSE@ +BUILD_CARBON_TRUE = @BUILD_CARBON_TRUE@ +BUILD_COCOA_FALSE = @BUILD_COCOA_FALSE@ +BUILD_COCOA_TRUE = @BUILD_COCOA_TRUE@ +BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@ +BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@ +BUILD_IDLE_FALSE = @BUILD_IDLE_FALSE@ +BUILD_IDLE_OSX_FALSE = @BUILD_IDLE_OSX_FALSE@ +BUILD_IDLE_OSX_TRUE = @BUILD_IDLE_OSX_TRUE@ +BUILD_IDLE_TRUE = @BUILD_IDLE_TRUE@ +BUILD_REMOTE_CONTROL_FALSE = @BUILD_REMOTE_CONTROL_FALSE@ +BUILD_REMOTE_CONTROL_TRUE = @BUILD_REMOTE_CONTROL_TRUE@ +BUILD_TRAYICON_FALSE = @BUILD_TRAYICON_FALSE@ +BUILD_TRAYICON_TRUE = @BUILD_TRAYICON_TRUE@ +CARBON_LIBS = @CARBON_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COCOA_LIBS = @COCOA_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOCDIR = @DOCDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@ +GTKSPELL_LIBS = @GTKSPELL_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_DEFS = @PYGTK_DEFS@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMKMF = @XMKMF@ +XSCRNSAVER_CFLAGS = @XSCRNSAVER_CFLAGS@ +XSCRNSAVER_LIBS = @XSCRNSAVER_LIBS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +OBJC = gcc +INCLUDES = \ + $(PYTHON_INCLUDES) + +@BUILD_CARBON_TRUE@_growllib_LTLIBRARIES = _growl.la +@BUILD_CARBON_TRUE@_growllibdir = $(libdir)/gajim +@BUILD_CARBON_TRUE@_growl_la_LIBADD = $(CARBON_LIBS) +@BUILD_CARBON_TRUE@_growl_la_SOURCES = _growl.c +@BUILD_CARBON_TRUE@_growl_la_LDFLAGS = \ +@BUILD_CARBON_TRUE@ -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +@BUILD_CARBON_TRUE@_growl_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +@BUILD_COCOA_TRUE@_growlImagelib_LTLIBRARIES = _growlImage.la +@BUILD_COCOA_TRUE@_growlImagelibdir = $(libdir)/gajim +@BUILD_COCOA_TRUE@_growlImage_la_LIBADD = $(COCOA_LIBS) +@BUILD_COCOA_TRUE@_growlImage_la_SOURCES = _growlImage.m +@BUILD_COCOA_TRUE@_growlImage_la_LDFLAGS = \ +@BUILD_COCOA_TRUE@ -module -avoid-version -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 + +@BUILD_COCOA_TRUE@_growlImage_la_CFLAGS = -Xcompiler -isysroot -Xcompiler /Developer/SDKs/MacOSX10.4u.sdk -Xcompiler -arch -Xcompiler ppc -Xcompiler -arch -Xcompiler i386 $(PYTHON_INCLUDES) +@BUILD_COCOA_TRUE@AM_OBJCFLAGS = $(_growlImage_la_CFLAGS) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .m .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/growl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/growl/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-_growlImagelibLTLIBRARIES: $(_growlImagelib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(_growlImagelibdir)" || $(mkdir_p) "$(DESTDIR)$(_growlImagelibdir)" + @list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(_growlImagelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(_growlImagelibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(_growlImagelibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(_growlImagelibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-_growlImagelibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(_growlImagelibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(_growlImagelibdir)/$$p"; \ + done + +clean-_growlImagelibLTLIBRARIES: + -test -z "$(_growlImagelib_LTLIBRARIES)" || rm -f $(_growlImagelib_LTLIBRARIES) + @list='$(_growlImagelib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +install-_growllibLTLIBRARIES: $(_growllib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(_growllibdir)" || $(mkdir_p) "$(DESTDIR)$(_growllibdir)" + @list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(_growllibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(_growllibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(_growllibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(_growllibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-_growllibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(_growllibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(_growllibdir)/$$p"; \ + done + +clean-_growllibLTLIBRARIES: + -test -z "$(_growllib_LTLIBRARIES)" || rm -f $(_growllib_LTLIBRARIES) + @list='$(_growllib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +_growl.la: $(_growl_la_OBJECTS) $(_growl_la_DEPENDENCIES) + $(LINK) $(am__growl_la_rpath) $(_growl_la_LDFLAGS) $(_growl_la_OBJECTS) $(_growl_la_LIBADD) $(LIBS) +_growlImage.la: $(_growlImage_la_OBJECTS) $(_growlImage_la_DEPENDENCIES) + $(OBJCLINK) $(am__growlImage_la_rpath) $(_growlImage_la_LDFLAGS) $(_growlImage_la_OBJECTS) $(_growlImage_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_growlImage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_growl_la-_growl.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +_growl_la-_growl.lo: _growl.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_growl_la_CFLAGS) $(CFLAGS) -MT _growl_la-_growl.lo -MD -MP -MF "$(DEPDIR)/_growl_la-_growl.Tpo" -c -o _growl_la-_growl.lo `test -f '_growl.c' || echo '$(srcdir)/'`_growl.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/_growl_la-_growl.Tpo" "$(DEPDIR)/_growl_la-_growl.Plo"; else rm -f "$(DEPDIR)/_growl_la-_growl.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='_growl.c' object='_growl_la-_growl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_growl_la_CFLAGS) $(CFLAGS) -c -o _growl_la-_growl.lo `test -f '_growl.c' || echo '$(srcdir)/'`_growl.c + +.m.o: +@am__fastdepOBJC_TRUE@ if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ $< + +.m.obj: +@am__fastdepOBJC_TRUE@ if $(OBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.m.lo: +@am__fastdepOBJC_TRUE@ if $(LTOBJCCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepOBJC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(LTOBJCCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(_growlImagelibdir)" "$(DESTDIR)$(_growllibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-_growlImagelibLTLIBRARIES clean-_growllibLTLIBRARIES \ + clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-_growlImagelibLTLIBRARIES \ + install-_growllibLTLIBRARIES + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-_growlImagelibLTLIBRARIES \ + uninstall-_growllibLTLIBRARIES uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean \ + clean-_growlImagelibLTLIBRARIES clean-_growllibLTLIBRARIES \ + clean-generic clean-libtool ctags distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install \ + install-_growlImagelibLTLIBRARIES install-_growllibLTLIBRARIES \ + install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall \ + uninstall-_growlImagelibLTLIBRARIES \ + uninstall-_growllibLTLIBRARIES uninstall-am uninstall-info-am + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/growl/_growl.c b/src/osx/growl/_growl.c new file mode 100644 index 000000000..11ac07e93 --- /dev/null +++ b/src/osx/growl/_growl.c @@ -0,0 +1,239 @@ +/* + * Copyright 2004-2005 The Growl Project. + * Created by Jeremy Rossi + * Released under the BSD license. + */ + +#include +#include + +#define str(cfstr) CFStringGetCStringPtr(cfstr, kCFStringEncodingMacRoman) +#define cfstr(str) CFStringCreateWithCString(kCFAllocatorDefault, str, kCFStringEncodingMacRoman) + +static PyObject * _notify_cb = NULL; + + +static PyObject * growl_PostDictionary(CFStringRef name, PyObject *self, PyObject *args) { + int i, j; + + PyObject *inputDict; + PyObject *pKeys = NULL; + PyObject *pKey, *pValue; + + CFMutableDictionaryRef note = CFDictionaryCreateMutable(kCFAllocatorDefault, + /*capacity*/ 0, + &kCFTypeDictionaryKeyCallBacks, + &kCFTypeDictionaryValueCallBacks); + + if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &inputDict)) + goto error; + + pKeys = PyDict_Keys(inputDict); + for (i = 0; i < PyList_Size(pKeys); ++i) { + CFStringRef convertedKey; + + /* Converting the PyDict key to NSString and used for key in note */ + pKey = PyList_GetItem(pKeys, i); + if (!pKey) + // Exception already set + goto error; + pValue = PyDict_GetItem(inputDict, pKey); + if (!pValue) { + // XXX Neeed a real Error message here. + PyErr_SetString(PyExc_TypeError," "); + goto error; + } + if (PyUnicode_Check(pKey)) { + convertedKey = CFStringCreateWithBytes(kCFAllocatorDefault, + (const UInt8 *)PyUnicode_AS_DATA(pKey), + PyUnicode_GET_DATA_SIZE(pKey), + kCFStringEncodingUnicode, + false); + } else if (PyString_Check(pKey)) { + convertedKey = CFStringCreateWithCString(kCFAllocatorDefault, + PyString_AsString(pKey), + kCFStringEncodingUTF8); + } else { + PyErr_SetString(PyExc_TypeError,"The Dict keys must be strings/unicode"); + goto error; + } + + /* Converting the PyDict value to NSString or NSData based on class */ + if (PyString_Check(pValue)) { + CFStringRef convertedValue = CFStringCreateWithCString(kCFAllocatorDefault, + PyString_AS_STRING(pValue), + kCFStringEncodingUTF8); + CFDictionarySetValue(note, convertedKey, convertedValue); + CFRelease(convertedValue); + } else if (PyUnicode_Check(pValue)) { + CFStringRef convertedValue = CFStringCreateWithBytes(kCFAllocatorDefault, + (const UInt8 *)PyUnicode_AS_DATA(pValue), + PyUnicode_GET_DATA_SIZE(pValue), + kCFStringEncodingUnicode, + false); + CFDictionarySetValue(note, convertedKey, convertedValue); + CFRelease(convertedValue); + } else if (PyInt_Check(pValue)) { + long v = PyInt_AS_LONG(pValue); + CFNumberRef convertedValue = CFNumberCreate(kCFAllocatorDefault, + kCFNumberLongType, + &v); + CFDictionarySetValue(note, convertedKey, convertedValue); + CFRelease(convertedValue); + } else if (pValue == Py_None) { + CFDataRef convertedValue = CFDataCreate(kCFAllocatorDefault, NULL, 0); + CFDictionarySetValue(note, convertedKey, convertedValue); + CFRelease(convertedValue); + } else if (PyList_Check(pValue)) { + int size = PyList_Size(pValue); + CFMutableArrayRef listHolder = CFArrayCreateMutable(kCFAllocatorDefault, + size, + &kCFTypeArrayCallBacks); + for (j = 0; j < size; ++j) { + PyObject *lValue = PyList_GetItem(pValue, j); + if (PyString_Check(lValue)) { + CFStringRef convertedValue = CFStringCreateWithCString(kCFAllocatorDefault, + PyString_AS_STRING(lValue), + kCFStringEncodingUTF8); + CFArrayAppendValue(listHolder, convertedValue); + CFRelease(convertedValue); + } else if (PyUnicode_Check(lValue)) { + CFStringRef convertedValue = CFStringCreateWithBytes(kCFAllocatorDefault, + (const UInt8 *)PyUnicode_AS_DATA(lValue), + PyUnicode_GET_DATA_SIZE(lValue), + kCFStringEncodingUnicode, + false); + CFArrayAppendValue(listHolder, convertedValue); + CFRelease(convertedValue); + } else { + CFRelease(convertedKey); + PyErr_SetString(PyExc_TypeError,"The lists must only contain strings"); + goto error; + } + } + CFDictionarySetValue(note, convertedKey, listHolder); + CFRelease(listHolder); + } else if (PyObject_HasAttrString(pValue, "rawImageData")) { + PyObject *lValue = PyObject_GetAttrString(pValue, "rawImageData"); + if (!lValue) { + goto error; + } else if (PyString_Check(lValue)) { + CFDataRef convertedValue = CFDataCreate(kCFAllocatorDefault, + (const UInt8 *)PyString_AsString(lValue), + PyString_Size(lValue)); + CFDictionarySetValue(note, convertedKey, convertedValue); + CFRelease(convertedValue); + } else { + CFRelease(convertedKey); + PyErr_SetString(PyExc_TypeError, "Icon with rawImageData attribute present must ensure it is a string."); + goto error; + } + } else { + CFRelease(convertedKey); + PyErr_SetString(PyExc_TypeError, "Value is not of Str/List"); + goto error; + } + CFRelease(convertedKey); + } + + Py_BEGIN_ALLOW_THREADS + CFNotificationCenterPostNotification(CFNotificationCenterGetDistributedCenter(), + /*name*/ name, + /*object*/ NULL, + /*userInfo*/ note, + /*deliverImmediately*/ false); + CFRelease(note); + Py_END_ALLOW_THREADS + + Py_DECREF(pKeys); + + Py_INCREF(Py_None); + return Py_None; + +error: + CFRelease(note); + + Py_XDECREF(pKeys); + + return NULL; +} + +static void growl_NotifyCB(CFNotificationCenterRef center, void *observer, + CFStringRef name, const void *object, + CFDictionaryRef userInfo) +{ + CFIndex size, len; + const void * keys[1]; + const void * values[1]; + CFArrayRef arr; + CFStringRef cfstr; + CFRange cfrange; + UInt8 *buff; + int i; + PyObject * pylist; + + cfrange.location = 0; + CFDictionaryGetKeysAndValues(userInfo, keys, values); + arr = (CFArrayRef)values[0]; + size = CFArrayGetCount(arr); + pylist = PyList_New(size); + for (i=0; i < size; ++i) + { + cfstr = (CFStringRef)CFArrayGetValueAtIndex(arr, i); + cfrange.length = CFStringGetLength(cfstr); + CFStringGetBytes(cfstr, cfrange, kCFStringEncodingUnicode, 0, false, + NULL, 0, &len); + buff = (UInt8*)malloc(len); + CFStringGetBytes(cfstr, cfrange, kCFStringEncodingUnicode, 0, false, + buff, len, &len); + PyList_SetItem(pylist, i, + PyUnicode_DecodeUTF16((char*)buff, len, NULL, NULL)); + free(buff); + } + + PyObject_CallObject(_notify_cb, Py_BuildValue("(O)", pylist)); + Py_DECREF(pylist); +} + +static PyObject * growl_Init(PyObject *self, PyObject *args) +{ + char* name = NULL; + + if (!PyArg_ParseTuple(args, "sO", &name, &_notify_cb)) + return NULL; + + Py_INCREF(_notify_cb); + + char* buff = (char*)malloc(strlen(name) + 14); + strcpy(buff, name); + strcat(buff, "GrowlClicked!"); + CFStringRef cfbuff = cfstr(buff); + CFNotificationCenterAddObserver( + CFNotificationCenterGetDistributedCenter(), NULL, &growl_NotifyCB, + cfbuff, NULL, CFNotificationSuspensionBehaviorDeliverImmediately); + free(buff); + CFRelease(cfbuff); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * growl_PostRegistration(PyObject *self, PyObject *args) { + return growl_PostDictionary(CFSTR("GrowlApplicationRegistrationNotification"), self, args); +} + +static PyObject * growl_PostNotification(PyObject *self, PyObject *args) { + return growl_PostDictionary(CFSTR("GrowlNotification"), self, args); +} + +static PyMethodDef GrowlMethods[] = { + {"Init", growl_Init, METH_VARARGS, "Initialize notifications with GrowlHelperApp"}, + {"PostNotification", growl_PostNotification, METH_VARARGS, "Send a notification to GrowlHelperApp"}, + {"PostRegistration", growl_PostRegistration, METH_VARARGS, "Send a registration to GrowlHelperApp"}, + {NULL, NULL, 0, NULL} /* Sentinel */ +}; + + +PyMODINIT_FUNC init_growl(void) { + Py_InitModule("_growl", GrowlMethods); +} diff --git a/src/osx/growl/_growlImage.m b/src/osx/growl/_growlImage.m new file mode 100644 index 000000000..d4b2b72f9 --- /dev/null +++ b/src/osx/growl/_growlImage.m @@ -0,0 +1,274 @@ +/* + * Copyright 2004 Mark Rowe + * Released under the BSD license. + */ + +#include "Python.h" +#import + +typedef struct +{ + PyObject_HEAD + NSImage *theImage; +} ImageObject; + + +static PyTypeObject ImageObject_Type; + +#define ImageObject_Check(v) ((v)->ob_type == &ImageObject_Type) + +static ImageObject * +newImageObject(NSImage *img) +{ + ImageObject *self; + if (! img) + { + PyErr_SetString(PyExc_TypeError, "Invalid image."); + return NULL; + } + + self = PyObject_New(ImageObject, &ImageObject_Type); + if (! self) + return NULL; + + self->theImage = [img retain]; + return self; +} + +static void +ImageObject_dealloc(ImageObject *self) +{ + PyObject_Del(self); +} + +static PyObject * +ImageObject_getAttr(PyObject *self, PyObject *attr) +{ + char *theAttr = PyString_AsString(attr); + NSAutoreleasePool *pool = nil; + + if (strcmp(theAttr, "rawImageData") == 0) + { + pool = [[NSAutoreleasePool alloc] init]; + NSData *imageData = [((ImageObject *) self)->theImage TIFFRepresentation]; + PyObject *pyImageData = PyString_FromStringAndSize([imageData bytes], [imageData length]); + [pool release]; + return pyImageData; + } + else + return PyObject_GenericGetAttr(self, attr); +} + + +static PyObject * +ImageObject_imageFromPath(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + char *fileName_ = NULL; + NSString *fileName = nil; + NSImage *theImage = nil; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, "et:imageFromPath", + Py_FileSystemDefaultEncoding, &fileName_)) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + fileName = [NSString stringWithUTF8String:fileName_]; + theImage = [[[NSImage alloc] initWithContentsOfFile:fileName] autorelease]; + self = newImageObject(theImage); + + [pool release]; + return (PyObject *) self; +} + +static PyObject * +ImageObject_imageWithData(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + char *imageData = NULL; + int imageDataSize = 0; + NSImage *theImage = nil; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, "s#:imageWithData", + &imageData, &imageDataSize)) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + + theImage = [[[NSImage alloc] initWithData:[NSData dataWithBytes:imageData + length:imageDataSize]] autorelease]; + self = newImageObject(theImage); + + [pool release]; + return (PyObject *) self; +} + +static PyObject * +ImageObject_imageWithIconForFile(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + char *fileName_ = NULL; + NSString *fileName = nil; + NSImage *theImage = nil; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, "et:imageWithIconForFile", + Py_FileSystemDefaultEncoding, &fileName_)) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + fileName = [NSString stringWithUTF8String:fileName_]; + theImage = [[NSWorkspace sharedWorkspace] iconForFile:fileName]; + self = newImageObject(theImage); + + [pool release]; + return (PyObject *) self; +} + +static PyObject * +ImageObject_imageWithIconForFileType(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + char *fileType = NULL; + NSImage *theImage = nil; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, "s:imageWithIconForFileType", + &fileType)) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + theImage = [[NSWorkspace sharedWorkspace] iconForFileType:[NSString stringWithUTF8String:fileType]]; + self = newImageObject(theImage); + + [pool release]; + return (PyObject *) self; +} + +static PyObject * +ImageObject_imageWithIconForCurrentApplication(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, ":imageWithIconForCurrentApplication")) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + self = newImageObject([NSApp applicationIconImage]); + + [pool release]; + return (PyObject *) self; +} + +static PyObject * +ImageObject_imageWithIconForApplication(PyTypeObject *cls, PyObject *args) +{ + ImageObject *self; + char *appName_ = NULL; + NSString *appName = nil; + NSString *appPath = nil; + NSImage *theImage = nil; + NSAutoreleasePool *pool = nil; + + if (! PyArg_ParseTuple(args, "et:imageWithIconForApplication", + Py_FileSystemDefaultEncoding, &appName_)) + return NULL; + + pool = [[NSAutoreleasePool alloc] init]; + + appName = [NSString stringWithUTF8String:appName_]; + appPath = [[NSWorkspace sharedWorkspace] fullPathForApplication:appName]; + if (! appPath) + { + PyErr_Format(PyExc_RuntimeError, "Application named '%s' not found", appName_); + self = NULL; + goto done; + } + theImage = [[NSWorkspace sharedWorkspace] iconForFile:appPath]; + self = newImageObject(theImage); + +done: + [pool release]; + return (PyObject *) self; +} + + +static PyMethodDef ImageObject_methods[] = { + {"imageFromPath", (PyCFunction)ImageObject_imageFromPath, METH_VARARGS | METH_CLASS}, + {"imageWithData", (PyCFunction)ImageObject_imageWithData, METH_VARARGS | METH_CLASS}, + {"imageWithIconForFile", (PyCFunction)ImageObject_imageWithIconForFile, METH_VARARGS | METH_CLASS}, + {"imageWithIconForFileType", (PyCFunction)ImageObject_imageWithIconForFileType, METH_VARARGS | METH_CLASS}, + {"imageWithIconForCurrentApplication", (PyCFunction)ImageObject_imageWithIconForCurrentApplication, METH_VARARGS | METH_CLASS}, + {"imageWithIconForApplication", (PyCFunction)ImageObject_imageWithIconForApplication, METH_VARARGS | METH_CLASS}, + {NULL, NULL} /* sentinel */ +}; + +static PyTypeObject ImageObject_Type = { + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "_growlImage.Image", /*tp_name*/ + sizeof(ImageObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor)ImageObject_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + ImageObject_getAttr, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_CLASS, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + ImageObject_methods, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + PyType_GenericAlloc, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ +}; + +static PyMethodDef _growlImage_methods[] = { + {NULL, NULL} +}; + +PyMODINIT_FUNC +init_growlImage(void) +{ + PyObject *m; + + if (PyType_Ready(&ImageObject_Type) < 0) + return; + + m = Py_InitModule("_growlImage", _growlImage_methods); + + PyModule_AddObject(m, "Image", (PyObject *)&ImageObject_Type); +} diff --git a/src/osx/growl/setup.py b/src/osx/growl/setup.py new file mode 100644 index 000000000..5a7235dee --- /dev/null +++ b/src/osx/growl/setup.py @@ -0,0 +1,25 @@ +#!/usr/bin/python +from distutils.core import setup, Extension +import sys + +_growl = Extension('_growl', + extra_link_args = ["-framework","CoreFoundation"], + sources = ['libgrowl.c']) +_growlImage = Extension('_growlImage', + extra_link_args = ["-framework","Cocoa"], + sources = ['growlImage.m']) + +if sys.platform.startswith("darwin"): + modules = [_growl, _growlImage] +else: + modules = [] + +setup(name="py-Growl", + version="0.0.7", + description="Python bindings for posting notifications to the Growl daemon", + author="Mark Rowe", + author_email="bdash@users.sourceforge.net", + url="http://growl.info", + py_modules=["Growl"], + ext_modules = modules ) + diff --git a/src/osx/growler.py b/src/osx/growler.py new file mode 100644 index 000000000..c3ea320cf --- /dev/null +++ b/src/osx/growler.py @@ -0,0 +1,63 @@ +import sys, os +from growl.Growl import GrowlNotifier +from common import gajim, helpers + + +if sys.platform != "darwin": + raise ImportError("System platform is not OS/X") + + +GENERIC_NOTIF = _('Generic') +notifications = [ + _('Contact Signed In'), _('Contact Signed Out'), _('New Message'), + _('New Single Message'), _('New Private Message'), _('New E-mail'), + _('File Transfer Request'), _('File Transfer Error'), + _('File Transfer Completed'), _('File Transfer Stopped'), + _('Groupchat Invitation'), _('Contact Changed Status'), + _('Connection Failed'), GENERIC_NOTIF + ] + +growler = None + + + +def init(): + global growler, notifications + icon = file(os.path.join(gajim.DATA_DIR, "pixmaps", "gajim.icns"), "r") + growler = GrowlNotifier(applicationName = "Gajim", + notifications = notifications, + applicationIcon = icon.read(), + notify_cb = notifyCB) + growler.register() + return + + +def notify(event_type, jid, account, msg_type, path_to_image, title, text): + global notifications + if not event_type in notifications: + event_type = GENERIC_NOTIF + if not text: + text = gajim.get_name_from_jid(account, jid) # default value of text + text = filterString(text) + if not title: + title = event_type + title = filterString(title) + if not path_to_image: + path_to_image = os.path.abspath( + os.path.join(gajim.DATA_DIR, 'pixmaps', 'events', + 'chat_msg_recv.png')) # img to display + icon = file(path_to_image, "r") + context = [account, jid, msg_type] + growler.notify(event_type, title, text, icon.read(), False, None, + context) + return + + +def notifyCB(data): + gajim.interface.handle_event(data[0], data[1], data[2]) + + +def filterString(string): + string = string.replace(""", "'") + return string + diff --git a/src/osx/idle.c b/src/osx/idle.c new file mode 100644 index 000000000..c24c30438 --- /dev/null +++ b/src/osx/idle.c @@ -0,0 +1,174 @@ +/***** + This is a modified form of idler.c. The original copyright notice follows. + **/ + +/***************************************** + * idler.c + * + * Uses IOKit to figure out the idle time of the system. The idle time + * is stored as a property of the IOHIDSystem class; the name is + * HIDIdleTime. Stored as a 64-bit int, measured in ns. + * + * The program itself just prints to stdout the time that the computer +has + * been idle in seconds. + * + * Compile with gcc -Wall -framework IOKit -framework Carbon idler.c -o + * idler + * + * Copyright (c) 2003, Stanford University + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions +are + * met: + * Redistributions of source code must retain the above copyright +notice, + * this list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright +notice, + * this list of conditions and the following disclaimer in the +documentation + * and/or other materials provided with the distribution. + * + * Neither the name of Stanford University nor the names of its +contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include + +#include +#include +#include + +#include + +/* 10^9 -- number of ns in a second */ +#define NS_SECONDS 1000000000 + + +static mach_port_t __idle_osx_master_port; +io_registry_entry_t __idle_osx_service; + + +static PyObject * idle_init(PyObject *self, PyObject *args) +{ + io_iterator_t iter; + CFMutableDictionaryRef hid_match; + + IOMasterPort(MACH_PORT_NULL, &__idle_osx_master_port); + + /* Get IOHIDSystem */ + hid_match = IOServiceMatching("IOHIDSystem"); + IOServiceGetMatchingServices(__idle_osx_master_port, hid_match, &iter); + if (iter == 0) { + printf("Error accessing IOHIDSystem\n"); + } + + __idle_osx_service = IOIteratorNext(iter); + if (__idle_osx_service == 0) { + printf("Iterator's empty!\n"); + } + + IOObjectRelease(iter); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * idle_getIdleSec(PyObject *self, PyObject *args) +{ + CFMutableDictionaryRef properties = 0; + CFTypeRef obj = NULL; + uint64_t tHandle = 0; + + if (IORegistryEntryCreateCFProperties(__idle_osx_service, &properties, + kCFAllocatorDefault, 0) == + KERN_SUCCESS && properties != NULL) + { + obj = CFDictionaryGetValue(properties, CFSTR("HIDIdleTime")); + CFRetain(obj); + } + else + { + printf("Couldn't grab properties of system\n"); + } + + if (obj) + { + CFTypeID type = CFGetTypeID(obj); + + if (type == CFDataGetTypeID()) + { + CFDataGetBytes((CFDataRef) obj, + CFRangeMake(0, sizeof(tHandle)), + (UInt8*) &tHandle); + } + else if (type == CFNumberGetTypeID()) + { + CFNumberGetValue((CFNumberRef)obj, + kCFNumberSInt64Type, + &tHandle); + } + else + { + printf("%d: unsupported type\n", (int)type); + } + + CFRelease(obj); + + // essentially divides by 10^9 + tHandle >>= 30; + } + else + { + printf("Can't find idle time\n"); + } + + CFRelease((CFTypeRef)properties); + return Py_BuildValue("L", tHandle); +} + +static PyObject * idle_close(PyObject *self, PyObject *args) +{ + /* Release our resources */ + IOObjectRelease(__idle_osx_service); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef idleMethods[] = +{ + {"init", idle_init, METH_VARARGS, "init idle"}, + {"getIdleSec", idle_getIdleSec, METH_VARARGS, "Get idle time in seconds"}, + {"close", idle_close, METH_VARARGS, "close idle"}, + {NULL, NULL, 0, NULL} +}; + +PyMODINIT_FUNC initidle(void) +{ + (void) Py_InitModule("idle", idleMethods); +} diff --git a/src/osx/nsapp.h b/src/osx/nsapp.h new file mode 100644 index 000000000..dd86960c2 --- /dev/null +++ b/src/osx/nsapp.h @@ -0,0 +1,19 @@ +#import + + +@interface NSApplication (Gajim) + +- (void) initGajim; +- (void) initGUI; +- (BOOL) initNetNotify; +- (void) orderFrontStandardAboutPanel: (id)sender; +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +- (BOOL) application:(NSApplication *)theApplication + openFile:(NSString *)filename; +- (void) application:(NSApplication *)sender openFiles:(NSArray *)filenames; +- (BOOL) applicationOpenUntitledFile:(NSApplication *)theApplication; +- (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)sender; + ++ (void) netNotifyCB: (NSNotification*)notif; + +@end diff --git a/src/osx/nsapp.m b/src/osx/nsapp.m new file mode 100644 index 000000000..4e7b6bde4 --- /dev/null +++ b/src/osx/nsapp.m @@ -0,0 +1,239 @@ +#import "nsapp.h" +#include + +#include + +#include +#include +#include + +#include + + +#define GAJIM_POOL_ALLOC \ + NSAutoreleasePool *gajim_pool = [[NSAutoreleasePool alloc] init]; +#define GAJIM_POOL_FREE [gajim_pool release]; + + +static PyObject *netChangedCB = NULL; +static NSFileHandle* netNotifyFH = nil; +static int netNotifyToken = -1; + + +@implementation NSApplication (Gajim) + +- (void) initGUI +{ + [NSBundle loadNibNamed:@"Gajim" owner:NSApp]; +} + ++ (void) netNotifyCB: (NSNotification*) notif +{ + NSLog(@"Network changed notification"); + + if (netChangedCB) + { + PyObject_CallObject(netChangedCB, NULL); + } + + [[notif object] readInBackgroundAndNotify]; +} + +- (BOOL) initNetNotify +{ + int fd = 0; + + if (notify_register_file_descriptor( + "com.apple.system.config.network_change", &fd, 0, + &netNotifyToken) != NOTIFY_STATUS_OK) + { + return FALSE; + } + + netNotifyFH = [[NSFileHandle alloc] initWithFileDescriptor: fd]; + [[NSNotificationCenter defaultCenter] addObserver: [self class] + selector: @selector(netNotifyCB:) + name: NSFileHandleReadCompletionNotification + object: netNotifyFH]; + [netNotifyFH readInBackgroundAndNotify]; + + return TRUE; +} + +- (void) initGajim +{ + GAJIM_POOL_ALLOC + + [self initGUI]; + [self initNetNotify]; + + [NSApp setDelegate:self]; + [NSApp finishLaunching]; + + GAJIM_POOL_FREE +} + +- (void) orderFrontStandardAboutPanel: (id)sender +{ + PyRun_SimpleString("\n\ +import gobject\n\ +import dialogs\n\ +def doAbout():\n\ + dialogs.AboutDialog()\n\ + return None\n\ +gobject.idle_add(doAbout)\n\ +"); +} + +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender +{ +/* + PyRun_SimpleString("\n\ +import gajim\n\ +import gobject\n\ +def doQuit():\n\ + gajim.interface.roster.on_quit_menuitem_activate(None)\n\ + return None\n\ +gobject.idle_add(doQuit)\n\ +"); +*/ + return NSTerminateNow; +} + +- (BOOL) application:(NSApplication *)theApplication + openFile:(NSString *)filename +{ + NSLog(@"openFile"); + NSLog(filename); + return YES; +} + +- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames +{ + NSLog(@"openFiles"); + + NSEnumerator* iter = [filenames objectEnumerator]; + NSString* str; + while ((str = [iter nextObject])) + { + NSLog(str); + } + return; +} + +- (BOOL)applicationOpenUntitledFile:(NSApplication *)theApplication +{ + NSLog(@"openUntitledFile"); + return YES; +} + +- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender +{ + NSLog(@"shouldOpenUntitledFile"); + return YES; +} + +@end + + +static PyObject * nsapp_init(PyObject *self, PyObject *args) +{ + [NSApp initGajim]; + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * nsapp_setNetworkCB(PyObject *self, PyObject *args) +{ + PyArg_UnpackTuple(args, "netcb", 1, 1, &netChangedCB); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * nsapp_requestUserAttention(PyObject *self, PyObject *args) +{ + GAJIM_POOL_ALLOC + [NSApp requestUserAttention:NSInformationalRequest]; + GAJIM_POOL_FREE + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * nsapp_playFile(PyObject *self, PyObject *args) +{ + GAJIM_POOL_ALLOC + + const char* cstr = NULL; + + if (!PyArg_ParseTuple(args, "s", &cstr)) + { + return NULL; + } + + NSSound* snd = [[NSSound alloc] initWithContentsOfFile: + [[NSString alloc] initWithUTF8String: cstr] + byReference: YES]; + if (!snd) + { + Py_INCREF(Py_None); + return Py_None; + } + + if (![snd play]) + { + Py_INCREF(Py_None); + return Py_None; + } + + GAJIM_POOL_FREE + + return Py_BuildValue("b", 1); +} + +static PyObject * nsapp_getBundlePath(PyObject *self, PyObject *args) +{ + GAJIM_POOL_ALLOC + + NSBundle* bundle = [NSBundle mainBundle]; + if (!bundle) + { + Py_INCREF(Py_None); + return Py_None; + } + + NSString* nspath = [bundle bundlePath]; + if (!nspath) + { + Py_INCREF(Py_None); + return Py_None; + } + + const char* path = [nspath UTF8String]; + PyObject* pypath = Py_BuildValue("s", path); + + GAJIM_POOL_FREE + + return pypath; +} + +static PyMethodDef nsappMethods[] = +{ + {"init", nsapp_init, METH_VARARGS, "init nsapp"}, + {"setNetworkCB", nsapp_setNetworkCB, METH_VARARGS, + "Callback to call when the network state changes"}, + {"getBundlePath", nsapp_getBundlePath, METH_VARARGS, + "Get the path to the bundle we were run from"}, + {"playFile", nsapp_playFile, METH_VARARGS, + "Play a sound file"}, + {"requestUserAttention", nsapp_requestUserAttention, METH_VARARGS, + "Sends a request for the users attention to the window manager"}, + {NULL, NULL, 0, NULL} +}; + +PyMODINIT_FUNC initnsapp(void) +{ + (void) Py_InitModule("nsapp", nsappMethods); +} diff --git a/src/osx/setup.py b/src/osx/setup.py new file mode 100644 index 000000000..2eaeb1bb9 --- /dev/null +++ b/src/osx/setup.py @@ -0,0 +1,20 @@ +from distutils.core import setup, Extension + +setup( + name = 'Gajim', + version = '0.11', + description = 'A full featured Jabber client', + author = 'Gajim Development Team', + url = 'http://www.gajim.org/', + download_url = 'http://www.gajim.org/downloads.php', + license = 'GPL', + + ext_modules=[ + Extension('idle', ['idle.c'], + extra_compile_args=['-Wall'], + extra_link_args=['-framework', 'IOKit', '-framework', 'Carbon']), + Extension('nsapp', ['nsapp.m'], + extra_compile_args=['-Wall'], + extra_link_args=['-framework', 'AppKit', '-framework', 'Cocoa']), + ] +) diff --git a/src/osx/syncmenu/.deps/syncmenu_la-pysyncmenu.Plo b/src/osx/syncmenu/.deps/syncmenu_la-pysyncmenu.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/syncmenu/.deps/syncmenu_la-pysyncmenu.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/syncmenu/.deps/syncmenu_la-sync-menu.Plo b/src/osx/syncmenu/.deps/syncmenu_la-sync-menu.Plo new file mode 100644 index 000000000..9ce06a81e --- /dev/null +++ b/src/osx/syncmenu/.deps/syncmenu_la-sync-menu.Plo @@ -0,0 +1 @@ +# dummy diff --git a/src/osx/syncmenu/Makefile b/src/osx/syncmenu/Makefile new file mode 100644 index 000000000..82364336a --- /dev/null +++ b/src/osx/syncmenu/Makefile @@ -0,0 +1,575 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# src/osx/syncmenu/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +srcdir = . +top_srcdir = ../../.. + +pkgdatadir = $(datadir)/gajim +pkglibdir = $(libdir)/gajim +pkgincludedir = $(includedir)/gajim +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = i686-pc-linux-gnu +host_triplet = i686-pc-linux-gnu +subdir = src/osx/syncmenu +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(syncmenulibdir)" +syncmenulibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(syncmenulib_LTLIBRARIES) +syncmenu_la_LIBADD = +am__syncmenu_la_SOURCES_DIST = sync-menu.c pysyncmenu.c +#am_syncmenu_la_OBJECTS = syncmenu_la-sync-menu.lo \ +# syncmenu_la-pysyncmenu.lo +syncmenu_la_OBJECTS = $(am_syncmenu_la_OBJECTS) +#am_syncmenu_la_rpath = -rpath $(syncmenulibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(syncmenu_la_SOURCES) +DIST_SOURCES = $(am__syncmenu_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} /home/asterix/gajim/missing --run aclocal-1.9 +ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} +ALL_LINGUAS = +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /home/asterix/gajim/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/asterix/gajim/missing --run autoconf +AUTOHEADER = ${SHELL} /home/asterix/gajim/missing --run autoheader +AUTOMAKE = ${SHELL} /home/asterix/gajim/missing --run automake-1.9 +AWK = gawk +BUILD_CARBON_FALSE = +BUILD_CARBON_TRUE = # +BUILD_COCOA_FALSE = +BUILD_COCOA_TRUE = # +BUILD_GTKSPELL_FALSE = # +BUILD_GTKSPELL_TRUE = +BUILD_IDLE_FALSE = # +BUILD_IDLE_OSX_FALSE = +BUILD_IDLE_OSX_TRUE = # +BUILD_IDLE_TRUE = +BUILD_REMOTE_CONTROL_FALSE = # +BUILD_REMOTE_CONTROL_TRUE = +BUILD_TRAYICON_FALSE = # +BUILD_TRAYICON_TRUE = +CARBON_LIBS = +CATALOGS = +CATOBJEXT = .gmo +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +COCOA_LIBS = +CPP = gcc -E +CPPFLAGS = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DATADIR = /usr/local/share +DATADIRNAME = share +DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include +DBUS_LIBS = -ldbus-1 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DOCDIR = /usr/local/share/doc/gajim +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +F77 = +FFLAGS = +GETTEXT_PACKAGE = gajim +GMOFILES = +GMSGFMT = /usr/bin/msgfmt +GREP = /bin/grep +GTKSPELL_CFLAGS = -I/usr/include/gtkspell-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 +GTKSPELL_LIBS = -lgtkspell -laspell -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +INSTOBJEXT = .mo +INTLLIBS = +INTLTOOL_CAVES_RULE = %.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DESKTOP_RULE = %.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_DIRECTORY_RULE = %.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract +INTLTOOL_KBD_RULE = %.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_KEYS_RULE = %.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_MERGE = $(top_builddir)/intltool-merge +INTLTOOL_OAF_RULE = %.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@ +INTLTOOL_PERL = /usr/bin/perl +INTLTOOL_POLICY_RULE = %.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PONG_RULE = %.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_PROP_RULE = %.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SCHEMAS_RULE = %.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVER_RULE = %.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SERVICE_RULE = %.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SHEET_RULE = %.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_SOUNDLIST_RULE = %.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_THEME_RULE = %.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UI_RULE = %.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_UPDATE = $(top_builddir)/intltool-update +INTLTOOL_XAM_RULE = %.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +INTLTOOL_XML_NOMERGE_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@ +INTLTOOL_XML_RULE = %.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@ +LDFLAGS = +LIBDIR = /usr/local/lib +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAINTAINER_MODE_FALSE = +MAINTAINER_MODE_TRUE = # +MAKEINFO = ${SHELL} /home/asterix/gajim/missing --run makeinfo +MKINSTALLDIRS = ./mkinstalldirs +MSGFMT = /usr/bin/msgfmt +MSGFMT_OPTS = -c +OBJEXT = o +PACKAGE = gajim +PACKAGE_BUGREPORT = http://trac.gajim.org/ +PACKAGE_NAME = Gajim - A Jabber Instant Messager +PACKAGE_STRING = Gajim - A Jabber Instant Messager 0.11.2.2-svn +PACKAGE_TARNAME = gajim +PACKAGE_VERSION = 0.11.2.2-svn +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +POFILES = +POSUB = po +PO_IN_DATADIR_FALSE = +PO_IN_DATADIR_TRUE = +PYGTK_CFLAGS = -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pygtk-2.0 +PYGTK_DEFS = /usr/share/pygtk/2.0/defs +PYGTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0 -lcairo -lX11 -lXfixes -lgmodule-2.0 -ldl -lffi -lgobject-2.0 -lglib-2.0 +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_INCLUDES = -I/usr/include/python2.4 +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.4 +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +USE_NLS = yes +VERSION = 0.11.2.2-svn +XGETTEXT = /usr/bin/xgettext +XMKMF = +XSCRNSAVER_CFLAGS = +XSCRNSAVER_LIBS = -lXss +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_F77 = +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__fastdepOBJC_FALSE = +am__fastdepOBJC_TRUE = # +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = /home/asterix/gajim/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/gajim +pkgpythondir = ${pythondir}/gajim +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.4/site-packages +pythondir = ${prefix}/lib/python2.4/site-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = +GTKPATH = "/Library/Frameworks/GTK+.framework/Versions/Current/bin" +INCLUDES = $(PYTHON_INCLUDES) +GTKLDFLAGS = `$(GTKPATH)/pkg-config --libs gtk+-2.0 pygobject-2.0` +GTKCFLAGS = `$(GTKPATH)/pkg-config --cflags gtk+-2.0 pygobject-2.0` +#syncmenulib_LTLIBRARIES = syncmenu.la +#syncmenulibdir = $(libdir)/gajim +#syncmenu_la_SOURCES = sync-menu.c pysyncmenu.c +#syncmenu_la_LDFLAGS = -module -avoid-version $(GTKLDFLAGS) +#syncmenu_la_CFLAGS = $(GTKCFLAGS) -Wall -g $(INCLUDES) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/syncmenu/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/syncmenu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-syncmenulibLTLIBRARIES: $(syncmenulib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(syncmenulibdir)" || $(mkdir_p) "$(DESTDIR)$(syncmenulibdir)" + @list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(syncmenulibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(syncmenulibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(syncmenulibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(syncmenulibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-syncmenulibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(syncmenulibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(syncmenulibdir)/$$p"; \ + done + +clean-syncmenulibLTLIBRARIES: + -test -z "$(syncmenulib_LTLIBRARIES)" || rm -f $(syncmenulib_LTLIBRARIES) + @list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +syncmenu.la: $(syncmenu_la_OBJECTS) $(syncmenu_la_DEPENDENCIES) + $(LINK) $(am_syncmenu_la_rpath) $(syncmenu_la_LDFLAGS) $(syncmenu_la_OBJECTS) $(syncmenu_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/syncmenu_la-pysyncmenu.Plo +include ./$(DEPDIR)/syncmenu_la-sync-menu.Plo + +.c.o: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +syncmenu_la-sync-menu.lo: sync-menu.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -MT syncmenu_la-sync-menu.lo -MD -MP -MF "$(DEPDIR)/syncmenu_la-sync-menu.Tpo" -c -o syncmenu_la-sync-menu.lo `test -f 'sync-menu.c' || echo '$(srcdir)/'`sync-menu.c; \ + then mv -f "$(DEPDIR)/syncmenu_la-sync-menu.Tpo" "$(DEPDIR)/syncmenu_la-sync-menu.Plo"; else rm -f "$(DEPDIR)/syncmenu_la-sync-menu.Tpo"; exit 1; fi +# source='sync-menu.c' object='syncmenu_la-sync-menu.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -c -o syncmenu_la-sync-menu.lo `test -f 'sync-menu.c' || echo '$(srcdir)/'`sync-menu.c + +syncmenu_la-pysyncmenu.lo: pysyncmenu.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -MT syncmenu_la-pysyncmenu.lo -MD -MP -MF "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo" -c -o syncmenu_la-pysyncmenu.lo `test -f 'pysyncmenu.c' || echo '$(srcdir)/'`pysyncmenu.c; \ + then mv -f "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo" "$(DEPDIR)/syncmenu_la-pysyncmenu.Plo"; else rm -f "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo"; exit 1; fi +# source='pysyncmenu.c' object='syncmenu_la-pysyncmenu.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -c -o syncmenu_la-pysyncmenu.lo `test -f 'pysyncmenu.c' || echo '$(srcdir)/'`pysyncmenu.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(syncmenulibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-syncmenulibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-syncmenulibLTLIBRARIES + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-syncmenulibLTLIBRARIES + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-syncmenulibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip install-syncmenulibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-syncmenulibLTLIBRARIES + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/syncmenu/Makefile.am b/src/osx/syncmenu/Makefile.am new file mode 100644 index 000000000..797476559 --- /dev/null +++ b/src/osx/syncmenu/Makefile.am @@ -0,0 +1,21 @@ +GTKPATH="/Library/Frameworks/GTK+.framework/Versions/Current/bin" + +export MACOSX_DEPLOYMENT_TARGET=10.4 +INCLUDES = $(PYTHON_INCLUDES) + +GTKLDFLAGS=`$(GTKPATH)/pkg-config --libs gtk+-2.0 pygobject-2.0` +GTKCFLAGS=`$(GTKPATH)/pkg-config --cflags gtk+-2.0 pygobject-2.0` + +if BUILD_COCOA +syncmenulib_LTLIBRARIES = syncmenu.la +syncmenulibdir = $(libdir)/gajim +syncmenu_la_SOURCES = sync-menu.c pysyncmenu.c +syncmenu_la_LDFLAGS = -module -avoid-version $(GTKLDFLAGS) +syncmenu_la_CFLAGS = $(GTKCFLAGS) -Wall -g $(INCLUDES) +endif + +DISTCLEANFILES = + +EXTRA_DIST = + +MAINTAINERCLEANFILES = Makefile.in diff --git a/src/osx/syncmenu/Makefile.in b/src/osx/syncmenu/Makefile.in new file mode 100644 index 000000000..bae1c97d9 --- /dev/null +++ b/src/osx/syncmenu/Makefile.in @@ -0,0 +1,575 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = src/osx/syncmenu +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/intltool.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(syncmenulibdir)" +syncmenulibLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(syncmenulib_LTLIBRARIES) +syncmenu_la_LIBADD = +am__syncmenu_la_SOURCES_DIST = sync-menu.c pysyncmenu.c +@BUILD_COCOA_TRUE@am_syncmenu_la_OBJECTS = syncmenu_la-sync-menu.lo \ +@BUILD_COCOA_TRUE@ syncmenu_la-pysyncmenu.lo +syncmenu_la_OBJECTS = $(am_syncmenu_la_OBJECTS) +@BUILD_COCOA_TRUE@am_syncmenu_la_rpath = -rpath $(syncmenulibdir) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(syncmenu_la_SOURCES) +DIST_SOURCES = $(am__syncmenu_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@ +ALL_LINGUAS = @ALL_LINGUAS@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CARBON_FALSE = @BUILD_CARBON_FALSE@ +BUILD_CARBON_TRUE = @BUILD_CARBON_TRUE@ +BUILD_COCOA_FALSE = @BUILD_COCOA_FALSE@ +BUILD_COCOA_TRUE = @BUILD_COCOA_TRUE@ +BUILD_GTKSPELL_FALSE = @BUILD_GTKSPELL_FALSE@ +BUILD_GTKSPELL_TRUE = @BUILD_GTKSPELL_TRUE@ +BUILD_IDLE_FALSE = @BUILD_IDLE_FALSE@ +BUILD_IDLE_OSX_FALSE = @BUILD_IDLE_OSX_FALSE@ +BUILD_IDLE_OSX_TRUE = @BUILD_IDLE_OSX_TRUE@ +BUILD_IDLE_TRUE = @BUILD_IDLE_TRUE@ +BUILD_REMOTE_CONTROL_FALSE = @BUILD_REMOTE_CONTROL_FALSE@ +BUILD_REMOTE_CONTROL_TRUE = @BUILD_REMOTE_CONTROL_TRUE@ +BUILD_TRAYICON_FALSE = @BUILD_TRAYICON_FALSE@ +BUILD_TRAYICON_TRUE = @BUILD_TRAYICON_TRUE@ +CARBON_LIBS = @CARBON_LIBS@ +CATALOGS = @CATALOGS@ +CATOBJEXT = @CATOBJEXT@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +COCOA_LIBS = @COCOA_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DATADIRNAME = @DATADIRNAME@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOCDIR = @DOCDIR@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GMOFILES = @GMOFILES@ +GMSGFMT = @GMSGFMT@ +GREP = @GREP@ +GTKSPELL_CFLAGS = @GTKSPELL_CFLAGS@ +GTKSPELL_LIBS = @GTKSPELL_LIBS@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INSTOBJEXT = @INSTOBJEXT@ +INTLLIBS = @INTLLIBS@ +INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ +INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ +INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ +INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ +INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ +INTLTOOL_MERGE = @INTLTOOL_MERGE@ +INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ +INTLTOOL_PERL = @INTLTOOL_PERL@ +INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ +INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ +INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ +INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ +INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ +INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ +INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ +INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ +INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ +INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ +INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ +INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ +INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ +LDFLAGS = @LDFLAGS@ +LIBDIR = @LIBDIR@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MKINSTALLDIRS = @MKINSTALLDIRS@ +MSGFMT = @MSGFMT@ +MSGFMT_OPTS = @MSGFMT_OPTS@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +POFILES = @POFILES@ +POSUB = @POSUB@ +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ +PYGTK_CFLAGS = @PYGTK_CFLAGS@ +PYGTK_DEFS = @PYGTK_DEFS@ +PYGTK_LIBS = @PYGTK_LIBS@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XMKMF = @XMKMF@ +XSCRNSAVER_CFLAGS = @XSCRNSAVER_CFLAGS@ +XSCRNSAVER_LIBS = @XSCRNSAVER_LIBS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +GTKPATH = "/Library/Frameworks/GTK+.framework/Versions/Current/bin" +INCLUDES = $(PYTHON_INCLUDES) +GTKLDFLAGS = `$(GTKPATH)/pkg-config --libs gtk+-2.0 pygobject-2.0` +GTKCFLAGS = `$(GTKPATH)/pkg-config --cflags gtk+-2.0 pygobject-2.0` +@BUILD_COCOA_TRUE@syncmenulib_LTLIBRARIES = syncmenu.la +@BUILD_COCOA_TRUE@syncmenulibdir = $(libdir)/gajim +@BUILD_COCOA_TRUE@syncmenu_la_SOURCES = sync-menu.c pysyncmenu.c +@BUILD_COCOA_TRUE@syncmenu_la_LDFLAGS = -module -avoid-version $(GTKLDFLAGS) +@BUILD_COCOA_TRUE@syncmenu_la_CFLAGS = $(GTKCFLAGS) -Wall -g $(INCLUDES) +DISTCLEANFILES = +EXTRA_DIST = +MAINTAINERCLEANFILES = Makefile.in +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/osx/syncmenu/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/osx/syncmenu/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-syncmenulibLTLIBRARIES: $(syncmenulib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(syncmenulibdir)" || $(mkdir_p) "$(DESTDIR)$(syncmenulibdir)" + @list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(syncmenulibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(syncmenulibdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(syncmenulibLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(syncmenulibdir)/$$f"; \ + else :; fi; \ + done + +uninstall-syncmenulibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(syncmenulibdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(syncmenulibdir)/$$p"; \ + done + +clean-syncmenulibLTLIBRARIES: + -test -z "$(syncmenulib_LTLIBRARIES)" || rm -f $(syncmenulib_LTLIBRARIES) + @list='$(syncmenulib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +syncmenu.la: $(syncmenu_la_OBJECTS) $(syncmenu_la_DEPENDENCIES) + $(LINK) $(am_syncmenu_la_rpath) $(syncmenu_la_LDFLAGS) $(syncmenu_la_OBJECTS) $(syncmenu_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncmenu_la-pysyncmenu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syncmenu_la-sync-menu.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +syncmenu_la-sync-menu.lo: sync-menu.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -MT syncmenu_la-sync-menu.lo -MD -MP -MF "$(DEPDIR)/syncmenu_la-sync-menu.Tpo" -c -o syncmenu_la-sync-menu.lo `test -f 'sync-menu.c' || echo '$(srcdir)/'`sync-menu.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/syncmenu_la-sync-menu.Tpo" "$(DEPDIR)/syncmenu_la-sync-menu.Plo"; else rm -f "$(DEPDIR)/syncmenu_la-sync-menu.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sync-menu.c' object='syncmenu_la-sync-menu.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -c -o syncmenu_la-sync-menu.lo `test -f 'sync-menu.c' || echo '$(srcdir)/'`sync-menu.c + +syncmenu_la-pysyncmenu.lo: pysyncmenu.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -MT syncmenu_la-pysyncmenu.lo -MD -MP -MF "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo" -c -o syncmenu_la-pysyncmenu.lo `test -f 'pysyncmenu.c' || echo '$(srcdir)/'`pysyncmenu.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo" "$(DEPDIR)/syncmenu_la-pysyncmenu.Plo"; else rm -f "$(DEPDIR)/syncmenu_la-pysyncmenu.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pysyncmenu.c' object='syncmenu_la-pysyncmenu.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(syncmenu_la_CFLAGS) $(CFLAGS) -c -o syncmenu_la-pysyncmenu.lo `test -f 'pysyncmenu.c' || echo '$(srcdir)/'`pysyncmenu.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(syncmenulibdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-syncmenulibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-syncmenulibLTLIBRARIES + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-syncmenulibLTLIBRARIES + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-syncmenulibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip install-syncmenulibLTLIBRARIES installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-info-am \ + uninstall-syncmenulibLTLIBRARIES + + +export MACOSX_DEPLOYMENT_TARGET=10.4 +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/osx/syncmenu/pysyncmenu.c b/src/osx/syncmenu/pysyncmenu.c new file mode 100644 index 000000000..d2e304f9f --- /dev/null +++ b/src/osx/syncmenu/pysyncmenu.c @@ -0,0 +1,55 @@ +#include +#include +#include +#include +#include "sync-menu.h" + + +PyDoc_STRVAR(pysync_menu_takeover_menu__doc__, +"Receives: a GtkMenuShell\n" +"Returns:\n"); + +static PyObject *pysync_menu_takeover_menu(PyObject *s, PyObject *args) +{ + PyObject *obj = NULL; + + if (!PyArg_ParseTuple(args, "O:GtkMenuShell", &obj)) + { + PyErr_SetString(PyExc_TypeError, "Failed to process parameter1"); + return NULL; + } + + Py_INCREF(obj); + + GtkMenuShell* menu = pyg_boxed_get(obj, GtkMenuShell); + if (!menu) + { + PyErr_SetString(PyExc_TypeError, "Failed to process parameter2"); + return NULL; + } + + sync_menu_takeover_menu(menu); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyMethodDef syncmenuModuleMethods[] = +{ + {"takeover_menu", (PyCFunction)pysync_menu_takeover_menu, + METH_VARARGS, pysync_menu_takeover_menu__doc__}, + {NULL} +}; + +PyDoc_STRVAR(modsyncmenu__doc__, + "GTK+ Integration for the Mac OS X Menubar.\n"); + +void initsyncmenu(void) +{ + if (!Py_InitModule3("syncmenu", syncmenuModuleMethods, modsyncmenu__doc__)) + { + PyErr_SetString(PyExc_ImportError, + "Py_InitModule3(\"syncmenu\") failed"); + return; + } +} diff --git a/src/osx/syncmenu/setup.py b/src/osx/syncmenu/setup.py new file mode 100644 index 000000000..7b20709f9 --- /dev/null +++ b/src/osx/syncmenu/setup.py @@ -0,0 +1,27 @@ +from distutils.core import setup, Extension +import commands + + +retval, output = commands.getstatusoutput("pkg-config --cflags gtk+-2.0 pygtk-2.0") +if retval != 0: + print "Failed to find package details for gtk+-2.0" + print + print output + sys.exit(1) +cflags = output.strip().split() +retval, output = commands.getstatusoutput("pkg-config --libs gtk+-2.0 pygtk-2.0") +if retval != 0: + print "Failed to find package details for gtk+-2.0" + print + print output + sys.exit(1) +libs = output.strip().split() + + +setup(name='syncmenu', version='0.2', + author='James Newton', author_email='baron@codepunks.org', + ext_modules=[ + Extension('syncmenu', ['pysyncmenu.c', 'sync-menu.c'], + extra_link_args=libs + ['-framework', 'Carbon'], + extra_compile_args=['-Wall'] + cflags) + ]) diff --git a/src/osx/syncmenu/sync-menu.c b/src/osx/syncmenu/sync-menu.c new file mode 100644 index 000000000..dde97d7f1 --- /dev/null +++ b/src/osx/syncmenu/sync-menu.c @@ -0,0 +1,722 @@ +/* GTK+ Integration for the Mac OS X Menubar. + * + * Copyright (C) 2007 Pioneer Research Center USA, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include + +#include + +#include "sync-menu.h" + + +/* TODO + * + * - Setup shortcuts, possibly transforming ctrl->cmd + * - Sync menus + * - Create on demand? (can this be done with gtk+? ie fill in menu items when the menu is opened) + * - Figure out what to do per app/window... + * - Toggle/radio items + * + */ + +#define GTK_QUARTZ_MENU_CREATOR 'GTKC' +#define GTK_QUARTZ_ITEM_WIDGET 'GWID' + + +static void sync_menu_shell (GtkMenuShell *menu_shell, + MenuRef carbon_menu, + gboolean toplevel); + + +/* + * utility functions + */ + +static GtkWidget * +find_menu_label (GtkWidget *widget) +{ + GtkWidget *label = NULL; + + if (GTK_IS_LABEL (widget)) + return widget; + + if (GTK_IS_CONTAINER (widget)) + { + GList *children; + GList *l; + + children = gtk_container_get_children (GTK_CONTAINER (widget)); + + for (l = children; l; l = l->next) + { + label = find_menu_label (l->data); + if (label) + break; + } + + g_list_free (children); + } + + return label; +} + +static const gchar * +get_menu_label_text (GtkWidget *menu_item, + GtkWidget **label) +{ + *label = find_menu_label (menu_item); + if (!*label) + return NULL; + + return gtk_label_get_text (GTK_LABEL (*label)); +} + +static gboolean +accel_find_func (GtkAccelKey *key, + GClosure *closure, + gpointer data) +{ + return (GClosure *) data == closure; +} + + +/* + * CarbonMenu functions + */ + +typedef struct +{ + MenuRef menu; +} CarbonMenu; + +static GQuark carbon_menu_quark = 0; + +static CarbonMenu * +carbon_menu_new (void) +{ + return g_slice_new0 (CarbonMenu); +} + +static void +carbon_menu_free (CarbonMenu *menu) +{ + g_slice_free (CarbonMenu, menu); +} + +static CarbonMenu * +carbon_menu_get (GtkWidget *widget) +{ + return g_object_get_qdata (G_OBJECT (widget), carbon_menu_quark); +} + +static void +carbon_menu_connect (GtkWidget *menu, + MenuRef menuRef) +{ + CarbonMenu *carbon_menu = carbon_menu_get (menu); + + if (!carbon_menu) + { + carbon_menu = carbon_menu_new (); + + g_object_set_qdata_full (G_OBJECT (menu), carbon_menu_quark, + carbon_menu, + (GDestroyNotify) carbon_menu_free); + } + + carbon_menu->menu = menuRef; +} + + +/* + * CarbonMenuItem functions + */ + +typedef struct +{ + MenuRef menu; + MenuItemIndex index; + MenuRef submenu; + GClosure *accel_closure; +} CarbonMenuItem; + +static GQuark carbon_menu_item_quark = 0; + +static CarbonMenuItem * +carbon_menu_item_new (void) +{ + return g_slice_new0 (CarbonMenuItem); +} + +static void +carbon_menu_item_free (CarbonMenuItem *menu_item) +{ + if (menu_item->accel_closure) + g_closure_unref (menu_item->accel_closure); + + g_slice_free (CarbonMenuItem, menu_item); +} + +static CarbonMenuItem * +carbon_menu_item_get (GtkWidget *widget) +{ + return g_object_get_qdata (G_OBJECT (widget), carbon_menu_item_quark); +} + +static void +carbon_menu_item_update_state (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + gboolean sensitive; + gboolean visible; + UInt32 set_attrs = 0; + UInt32 clear_attrs = 0; + + g_object_get (widget, + "sensitive", &sensitive, + "visible", &visible, + NULL); + + if (!sensitive) + set_attrs |= kMenuItemAttrDisabled; + else + clear_attrs |= kMenuItemAttrDisabled; + + if (!visible) + set_attrs |= kMenuItemAttrHidden; + else + clear_attrs |= kMenuItemAttrHidden; + + ChangeMenuItemAttributes (carbon_item->menu, carbon_item->index, + set_attrs, clear_attrs); +} + +static void +carbon_menu_item_update_active (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + gboolean active; + + g_object_get (widget, + "active", &active, + NULL); + + CheckMenuItem (carbon_item->menu, carbon_item->index, + active); +} + +static void +carbon_menu_item_update_submenu (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + GtkWidget *submenu; + + submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (widget)); + + if (submenu) + { + GtkWidget *label = NULL; + + carbon_item->submenu = NULL; + GetMenuItemHierarchicalMenu(carbon_item->menu, carbon_item->index, + &carbon_item->submenu); + if (!carbon_item->submenu) + { + const gchar *label_text; + CFStringRef cfstr = NULL; + + label_text = get_menu_label_text (widget, &label); + if (label_text) + cfstr = CFStringCreateWithCString (NULL, label_text, + kCFStringEncodingUTF8); + CreateNewMenu (0, 0, &carbon_item->submenu); + SetMenuTitleWithCFString (carbon_item->submenu, cfstr); + SetMenuItemHierarchicalMenu (carbon_item->menu, carbon_item->index, + carbon_item->submenu); + if (cfstr) + CFRelease (cfstr); + } + + sync_menu_shell (GTK_MENU_SHELL (submenu), carbon_item->submenu, FALSE); + } + else + { + SetMenuItemHierarchicalMenu (carbon_item->menu, carbon_item->index, + NULL); + carbon_item->submenu = NULL; + } +} + +static void +carbon_menu_item_update_label (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + GtkWidget *label; + const gchar *label_text; + CFStringRef cfstr = NULL; + + label_text = get_menu_label_text (widget, &label); + if (label_text) + cfstr = CFStringCreateWithCString (NULL, label_text, + kCFStringEncodingUTF8); + + SetMenuItemTextWithCFString (carbon_item->menu, carbon_item->index, + cfstr); + + if (cfstr) + CFRelease (cfstr); +} + +static void +carbon_menu_item_update_accelerator (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + GtkWidget *label; + + get_menu_label_text (widget, &label); + + if (GTK_IS_ACCEL_LABEL (label) && + GTK_ACCEL_LABEL (label)->accel_closure) + { + GtkAccelKey *key; + + key = gtk_accel_group_find (GTK_ACCEL_LABEL (label)->accel_group, + accel_find_func, + GTK_ACCEL_LABEL (label)->accel_closure); + + if (key && + key->accel_key && + key->accel_flags & GTK_ACCEL_VISIBLE) + { + GdkDisplay *display = gtk_widget_get_display (widget); + GdkKeymap *keymap = gdk_keymap_get_for_display (display); + GdkKeymapKey *keys; + gint n_keys; + + if (gdk_keymap_get_entries_for_keyval (keymap, key->accel_key, + &keys, &n_keys)) + { + UInt8 modifiers = 0; + + SetMenuItemCommandKey (carbon_item->menu, carbon_item->index, + true, keys[0].keycode); + + g_free (keys); + + if (key->accel_mods) + { + if (key->accel_mods & GDK_SHIFT_MASK) + modifiers |= kMenuShiftModifier; + + if (key->accel_mods & GDK_MOD1_MASK) + modifiers |= kMenuOptionModifier; + } + + if (!(key->accel_mods & GDK_CONTROL_MASK)) + { + modifiers |= kMenuNoCommandModifier; + } + + SetMenuItemModifiers (carbon_item->menu, carbon_item->index, + modifiers); + + return; + } + } + } + + /* otherwise, clear the menu shortcut */ + SetMenuItemModifiers (carbon_item->menu, carbon_item->index, + kMenuNoModifiers | kMenuNoCommandModifier); + ChangeMenuItemAttributes (carbon_item->menu, carbon_item->index, + 0, kMenuItemAttrUseVirtualKey); + SetMenuItemCommandKey (carbon_item->menu, carbon_item->index, + false, 0); +} + +static void +carbon_menu_item_accel_changed (GtkAccelGroup *accel_group, + guint keyval, + GdkModifierType modifier, + GClosure *accel_closure, + GtkWidget *widget) +{ + CarbonMenuItem *carbon_item = carbon_menu_item_get (widget); + GtkWidget *label; + + get_menu_label_text (widget, &label); + + if (GTK_IS_ACCEL_LABEL (label) && + GTK_ACCEL_LABEL (label)->accel_closure == accel_closure) + carbon_menu_item_update_accelerator (carbon_item, widget); +} + +static void +carbon_menu_item_update_accel_closure (CarbonMenuItem *carbon_item, + GtkWidget *widget) +{ + GtkAccelGroup *group; + GtkWidget *label; + + get_menu_label_text (widget, &label); + + if (carbon_item->accel_closure) + { + group = gtk_accel_group_from_accel_closure (carbon_item->accel_closure); + if (group) + g_signal_handlers_disconnect_by_func (group, + carbon_menu_item_accel_changed, + widget); + + g_closure_unref (carbon_item->accel_closure); + carbon_item->accel_closure = NULL; + } + + if (GTK_IS_ACCEL_LABEL (label)) + carbon_item->accel_closure = GTK_ACCEL_LABEL (label)->accel_closure; + + if (carbon_item->accel_closure) + { + g_closure_ref (carbon_item->accel_closure); + + group = gtk_accel_group_from_accel_closure (carbon_item->accel_closure); + + g_signal_connect_object (group, "accel-changed", + G_CALLBACK (carbon_menu_item_accel_changed), + widget, 0); + } + + carbon_menu_item_update_accelerator (carbon_item, widget); +} + +static void +carbon_menu_item_notify (GObject *object, + GParamSpec *pspec, + CarbonMenuItem *carbon_item) +{ + if (!strcmp (pspec->name, "sensitive") || + !strcmp (pspec->name, "visible")) + { + carbon_menu_item_update_state (carbon_item, GTK_WIDGET (object)); + } + else if (!strcmp (pspec->name, "active")) + { + carbon_menu_item_update_active (carbon_item, GTK_WIDGET (object)); + } + else if (!strcmp (pspec->name, "submenu")) + { + carbon_menu_item_update_submenu (carbon_item, GTK_WIDGET (object)); + } +} + +static void +carbon_menu_item_notify_label (GObject *object, + GParamSpec *pspec, + gpointer data) +{ + CarbonMenuItem *carbon_item = carbon_menu_item_get (GTK_WIDGET (object)); + + if (!strcmp (pspec->name, "label")) + { + carbon_menu_item_update_label (carbon_item, + GTK_WIDGET (object)); + } + else if (!strcmp (pspec->name, "accel-closure")) + { + carbon_menu_item_update_accel_closure (carbon_item, + GTK_WIDGET (object)); + } +} + +static CarbonMenuItem * +carbon_menu_item_connect (GtkWidget *menu_item, + GtkWidget *label, + MenuRef menu, + MenuItemIndex index) +{ + CarbonMenuItem *carbon_item = carbon_menu_item_get (menu_item); + + if (!carbon_item) + { + carbon_item = carbon_menu_item_new (); + + g_object_set_qdata_full (G_OBJECT (menu_item), carbon_menu_item_quark, + carbon_item, + (GDestroyNotify) carbon_menu_item_free); + + g_signal_connect (menu_item, "notify", + G_CALLBACK (carbon_menu_item_notify), + carbon_item); + + if (label) + g_signal_connect_swapped (label, "notify::label", + G_CALLBACK (carbon_menu_item_notify_label), + menu_item); + } + + carbon_item->menu = menu; + carbon_item->index = index; + + return carbon_item; +} + + +/* + * carbon event handler + */ + +static OSStatus +menu_event_handler_func (EventHandlerCallRef event_handler_call_ref, + EventRef event_ref, + void *data) +{ + UInt32 event_class = GetEventClass (event_ref); + UInt32 event_kind = GetEventKind (event_ref); + MenuRef menu_ref; + + switch (event_class) + { + case kEventClassCommand: + /* This is called when activating (is that the right GTK+ term?) + * a menu item. + */ + if (event_kind == kEventCommandProcess) + { + HICommand command; + OSStatus err; + + //g_print ("Menu: kEventClassCommand/kEventCommandProcess\n"); + + err = GetEventParameter (event_ref, kEventParamDirectObject, + typeHICommand, 0, + sizeof (command), 0, &command); + + if (err == noErr) + { + GtkWidget *widget = NULL; + + if (command.commandID == kHICommandQuit) + { + gtk_main_quit (); /* Just testing... */ + return noErr; + } + + /* Get any GtkWidget associated with the item. */ + err = GetMenuItemProperty (command.menu.menuRef, + command.menu.menuItemIndex, + GTK_QUARTZ_MENU_CREATOR, + GTK_QUARTZ_ITEM_WIDGET, + sizeof (widget), 0, &widget); + if (err == noErr && widget) + { + gtk_menu_item_activate (GTK_MENU_ITEM (widget)); + return noErr; + } + } + } + break; + + case kEventClassMenu: + GetEventParameter (event_ref, + kEventParamDirectObject, + typeMenuRef, + NULL, + sizeof (menu_ref), + NULL, + &menu_ref); + + switch (event_kind) + { + case kEventMenuTargetItem: + /* This is called when an item is selected (what is the + * GTK+ term? prelight?) + */ + //g_print ("kEventClassMenu/kEventMenuTargetItem\n"); + break; + + case kEventMenuOpening: + /* Is it possible to dynamically build the menu here? We + * can at least set visibility/sensitivity. + */ + //g_print ("kEventClassMenu/kEventMenuOpening\n"); + break; + + case kEventMenuClosed: + //g_print ("kEventClassMenu/kEventMenuClosed\n"); + break; + + default: + break; + } + + break; + + default: + break; + } + + return CallNextEventHandler (event_handler_call_ref, event_ref); +} + +static void +setup_menu_event_handler (void) +{ + EventHandlerUPP menu_event_handler_upp; + EventHandlerRef menu_event_handler_ref; + const EventTypeSpec menu_events[] = { + { kEventClassCommand, kEventCommandProcess }, + { kEventClassMenu, kEventMenuTargetItem }, + { kEventClassMenu, kEventMenuOpening }, + { kEventClassMenu, kEventMenuClosed } + }; + + /* FIXME: We might have to install one per window? */ + + menu_event_handler_upp = NewEventHandlerUPP (menu_event_handler_func); + InstallEventHandler (GetApplicationEventTarget (), menu_event_handler_upp, + GetEventTypeCount (menu_events), menu_events, 0, + &menu_event_handler_ref); + +#if 0 + /* FIXME: Remove the handler with: */ + RemoveEventHandler(menu_event_handler_ref); + DisposeEventHandlerUPP(menu_event_handler_upp); +#endif +} + +static void +sync_menu_shell (GtkMenuShell *menu_shell, + MenuRef carbon_menu, + gboolean toplevel) +{ + GList *children; + GList *l; + MenuItemIndex carbon_index = 1; + + carbon_menu_connect (GTK_WIDGET (menu_shell), carbon_menu); + + children = gtk_container_get_children (GTK_CONTAINER (menu_shell)); + + UInt16 carbon_item_count = CountMenuItems(carbon_menu); + + for (l = children; l; l = l->next) + { + GtkWidget *menu_item = l->data; + CarbonMenuItem *carbon_item; + + if (GTK_IS_TEAROFF_MENU_ITEM (menu_item)) + continue; + + if (toplevel && g_object_get_data (G_OBJECT (menu_item), + "gtk-empty-menu-item")) + continue; + + GtkWidget *label = NULL; + const gchar *label_text = NULL; + + label_text = get_menu_label_text (menu_item, &label); + if (label_text && strcmp(label_text, "_SKIP_") == 0) + { + carbon_index++; + continue; + } + else if (!label_text) + label_text = ""; + + MenuItemAttributes attributes = 0; + if (GTK_IS_SEPARATOR_MENU_ITEM (menu_item)) + attributes |= kMenuItemAttrSeparator; + if (!GTK_WIDGET_IS_SENSITIVE (menu_item)) + attributes |= kMenuItemAttrDisabled; + if (!GTK_WIDGET_VISIBLE (menu_item)) + attributes |= kMenuItemAttrHidden; + + CFStringRef cfstr = CFStringCreateWithCString (NULL, label_text, + kCFStringEncodingUTF8); + if (carbon_index > carbon_item_count) + AppendMenuItemTextWithCFString(carbon_menu, cfstr, attributes, 0, + NULL); + else if (!toplevel && (carbon_index > carbon_item_count)) + InsertMenuItemTextWithCFString (carbon_menu, cfstr, + carbon_index, attributes, 0); + else + SetMenuItemTextWithCFString(carbon_menu, carbon_index, cfstr); + CFRelease (cfstr); + + MenuItemAttributes c_attributes = kMenuItemAttrSectionHeader | + kMenuItemAttrAutoDisable; + if (!(attributes & kMenuItemAttrDisabled)) + c_attributes |= kMenuItemAttrDisabled; + if (!(attributes & kMenuItemAttrSeparator)) + c_attributes |= kMenuItemAttrSeparator; + if (!(attributes & kMenuItemAttrHidden)) + c_attributes |= kMenuItemAttrHidden; + ChangeMenuItemAttributes(carbon_menu, carbon_index, + attributes, c_attributes); + SetMenuItemProperty (carbon_menu, carbon_index, + GTK_QUARTZ_MENU_CREATOR, + GTK_QUARTZ_ITEM_WIDGET, + sizeof (menu_item), &menu_item); + + carbon_item = carbon_menu_item_connect (menu_item, label, + carbon_menu, + carbon_index); + + if (GTK_IS_CHECK_MENU_ITEM (menu_item)) + carbon_menu_item_update_active (carbon_item, menu_item); + + carbon_menu_item_update_accel_closure (carbon_item, menu_item); + + if (gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu_item))) + carbon_menu_item_update_submenu (carbon_item, menu_item); + + carbon_index++; + } + + while (carbon_index <= carbon_item_count) + { + DeleteMenuItem (carbon_menu, carbon_index); + carbon_index++; + } + + g_list_free (children); +} + +void +sync_menu_takeover_menu (GtkMenuShell *menu_shell) +{ + static MenuRef carbon_menubar = NULL; + + g_return_if_fail (GTK_IS_MENU_SHELL (menu_shell)); + + if (carbon_menu_quark == 0) + carbon_menu_quark = g_quark_from_static_string ("CarbonMenu"); + + if (carbon_menu_item_quark == 0) + carbon_menu_item_quark = g_quark_from_static_string ("CarbonMenuItem"); + + if (!carbon_menubar) + { + carbon_menubar = AcquireRootMenu(); + setup_menu_event_handler (); + } + + sync_menu_shell (menu_shell, carbon_menubar, TRUE); +} diff --git a/src/osx/syncmenu/sync-menu.h b/src/osx/syncmenu/sync-menu.h new file mode 100644 index 000000000..0715a31e2 --- /dev/null +++ b/src/osx/syncmenu/sync-menu.h @@ -0,0 +1,27 @@ +/* GTK+ Integration for the Mac OS X Menubar. + * + * Copyright (C) 2007 Pioneer Research Center USA, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include + +G_BEGIN_DECLS + +void sync_menu_takeover_menu (GtkMenuShell *menu_shell); + +G_END_DECLS diff --git a/src/osx/syncmenu/test-menu.c b/src/osx/syncmenu/test-menu.c new file mode 100644 index 000000000..102ec5287 --- /dev/null +++ b/src/osx/syncmenu/test-menu.c @@ -0,0 +1,107 @@ +#include + +#include "sync-menu.h" + +GtkWidget *open_item; +GtkWidget *copy_item; + +static void +menu_item_activate_cb (GtkWidget *item, + gpointer user_data) +{ + gboolean visible; + gboolean sensitive; + + g_print ("Item activated: %s\n", (gchar *) user_data); + + g_object_get (G_OBJECT (copy_item), + "visible", &visible, + "sensitive", &sensitive, + NULL); + + if (item == open_item) { + gtk_widget_set_sensitive (copy_item, !sensitive); + /*g_object_set (G_OBJECT (copy_item), "visible", !visible, NULL);*/ + } +} + +static GtkWidget * +test_setup_menu (void) +{ + GtkWidget *menubar; + GtkWidget *menu; + GtkWidget *item; + + menubar = gtk_menu_bar_new (); + + item = gtk_menu_item_new_with_label ("File"); + gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); + menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); + item = gtk_menu_item_new_with_label ("Open"); + open_item = item; + g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_cb), "open"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + item = gtk_menu_item_new_with_label ("Quit"); + g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_cb), "quit"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + item = gtk_menu_item_new_with_label ("Edit"); + + gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); + menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); + item = gtk_menu_item_new_with_label ("Copy"); + copy_item = item; + g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_cb), "copy"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + item = gtk_menu_item_new_with_label ("Paste"); + g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_cb), "paste"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + item = gtk_menu_item_new_with_label ("Help"); + gtk_menu_shell_append (GTK_MENU_SHELL (menubar), item); + menu = gtk_menu_new (); + gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), menu); + item = gtk_menu_item_new_with_label ("About"); + g_signal_connect (item, "activate", G_CALLBACK (menu_item_activate_cb), "about"); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); + + return menubar; +} + +int +main (int argc, char **argv) +{ + GtkWidget *window; + GtkWidget *vbox; + GtkWidget *menubar; + + gtk_init (&argc, &argv); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_default_size (GTK_WINDOW (window), 400, 300); + g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); + + vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), vbox); + + menubar = test_setup_menu (); + gtk_box_pack_start (GTK_BOX (vbox), + menubar, + FALSE, TRUE, 0); + + gtk_box_pack_start (GTK_BOX (vbox), + gtk_label_new ("Some window content here"), + TRUE, TRUE, 0); + + gtk_widget_show_all (window); + + gtk_widget_hide (menubar); + + sync_menu_takeover_menu (GTK_MENU_SHELL (menubar)); + + gtk_main (); + + return 0; +} diff --git a/src/osx/syncmenu/test-menu.py b/src/osx/syncmenu/test-menu.py new file mode 100644 index 000000000..b9c4471c8 --- /dev/null +++ b/src/osx/syncmenu/test-menu.py @@ -0,0 +1,78 @@ +import gtk, syncmenu + + +open_item = None +copy_item = None + + +def menu_item_activate_cb(item, user_data): + global open_item, copy_item + print "Item activated: %s" % user_data + + #g_object_get (G_OBJECT (copy_item), + # "visible", &visible, + # "sensitive", &sensitive, + # NULL) + + #if (item == open_item) { + #gtk_widget_set_sensitive (copy_item, !sensitive) + #/*g_object_set (G_OBJECT (copy_item), "visible", !visible, NULL)*/ + + +def test_setup_menu(): + global open_item, copy_item + menubar = gtk.MenuBar() + + item = gtk.MenuItem("File") + menubar.append(item) + menu = gtk.Menu() + item.set_submenu(menu) + item = gtk.MenuItem("Open") + open_item = item + item.connect("activate", menu_item_activate_cb, "open") + menu.append(item) + item = gtk.MenuItem("Quit") + item.connect("activate", menu_item_activate_cb, "quit") + menu.append(item) + + item = gtk.MenuItem("Edit") + + menubar.append(item) + menu = gtk.Menu() + item.set_submenu(menu) + item = gtk.MenuItem("Copy") + copy_item = item + item.connect("activate", menu_item_activate_cb, "copy") + menu.append(item) + item = gtk.MenuItem("Paste") + item.connect("activate", menu_item_activate_cb, "paste") + menu.append(item) + + item = gtk.MenuItem("Help") + menubar.append(item) + menu = gtk.Menu() + item.set_submenu(menu) + item = gtk.MenuItem("About") + item.connect("activate", menu_item_activate_cb, "about") + menu.append(item) + + return menubar + + +window = gtk.Window(gtk.WINDOW_TOPLEVEL) +window.set_default_size(400, 300) +window.connect("destroy", gtk.main_quit, None) + +vbox = gtk.VBox(False, 0) +window.add(vbox) + +menubar = test_setup_menu() +vbox.pack_start(menubar, False, True, 0) +vbox.pack_start(gtk.Label("Some window content here"), True, True, 0) + +window.show_all() +menubar.hide() + +syncmenu.takeover_menu(menubar) + +gtk.main() -- cgit v1.2.3