Index: .cvsignore =================================================================== RCS file: /cvsroot/meanwhile/meanwhile-gaim/.cvsignore,v retrieving revision 1.1 diff -u -p -u -r1.1 .cvsignore --- .cvsignore 2 Jun 2004 22:26:44 -0000 1.1 +++ .cvsignore 16 Jun 2004 16:21:16 -0000 @@ -1,4 +1,3 @@ - aclocal.m4 autom4te.cache compile @@ -14,3 +13,4 @@ missing *.spec *.tar.gz tmp +mkinstalldirs Index: configure.ac =================================================================== RCS file: /cvsroot/meanwhile/meanwhile-gaim/configure.ac,v retrieving revision 1.1 diff -u -p -u -r1.1 configure.ac --- configure.ac 1 Jun 2004 23:32:25 -0000 1.1 +++ configure.ac 16 Jun 2004 16:21:16 -0000 @@ -43,6 +43,32 @@ AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR([ *** GLib 2.0 is required.])) AC_SUBST(GLIB_CFLAGS) +AC_SUBST(GLIB_LIBS) + +dnl Check for Meanwhile includes +AC_ARG_WITH(meanwhile-includes, [ --with-meanwhile-includes=DIR + Compile the Gaim plugin against Meanwhile includes in DIR ], [ac_meanwhile_includes="$withval"], [ac_meanwhile_includes="no"]) +MEANWHILE_INCLUDES="-I$prefix/include" +if test "$ac_meanwhile_includes" != "no"; then + MEANWHILE_INCLUDES="-I$ac_meanwhile_includes" +fi +CPPFLAGS_save="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $MEANWHILE_INCLUDES $GLIB_CFLAGS" +AC_CHECK_HEADER(meanwhile/meanwhile.h, [meanwhileincludes=yes]) +CPPFLAGS="$CPPFLAGS_save" +AC_SUBST(MEANWHILE_INCLUDES) + + +dnl check for Meanwhile library +AC_ARG_WITH(meanwhile-libs, [ --with-meanwhile-libs=DIR + Compile the Gaim plugin against the Meanwhile libs in DIR], [ac_meanwhile_libs="$withval"], [ac_meanwhile_libs="no"]) +MEANWHILE_LIBS="-L$prefix/lib" +if test "$ac_meanwhile_libs" != "no"; then + MEANWHILE_LIBS="-L$ac_meanwhile_libs" +fi +MEANWHILE_LIBS="$MEANWHILE_LIBS -lmeanwhile" +AC_CHECK_LIB(meanwhile, mwSession_new, [meanwhile=yes], , $MEANWHILE_LIBS $GLIB_LIBS) +AC_SUBST(MEANWHILE_LIBS) AC_OUTPUT([Makefile src/Makefile pixmaps/Makefile meanwhile-gaim.spec]) Index: pixmaps/.cvsignore =================================================================== RCS file: pixmaps/.cvsignore diff -N pixmaps/.cvsignore --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pixmaps/.cvsignore 16 Jun 2004 16:21:16 -0000 @@ -0,0 +1,2 @@ +Makefile +Makefile.in Index: src/.cvsignore =================================================================== RCS file: src/.cvsignore diff -N src/.cvsignore --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/.cvsignore 16 Jun 2004 16:21:16 -0000 @@ -0,0 +1,6 @@ +.deps +.libs +Makefile +Makefile.in +*.la +*.lo Index: src/Makefile.am =================================================================== RCS file: /cvsroot/meanwhile/meanwhile-gaim/src/Makefile.am,v retrieving revision 1.1 diff -u -p -u -r1.1 Makefile.am --- src/Makefile.am 1 Jun 2004 23:32:26 -0000 1.1 +++ src/Makefile.am 16 Jun 2004 16:21:16 -0000 @@ -11,7 +11,7 @@ libmwgaim_la_CFLAGS = \ libmwgaim_la_LDFLAGS = -module -avoid-version -libmwgaim_la_LIBADD = -lmeanwhile +libmwgaim_la_LIBADD = $(MEANWHILE_LIBS) -INCLUDES = $(GLIB_CFLAGS) $(GAIM_INCLUDES) -I$(includedir) +INCLUDES = $(GLIB_CFLAGS) $(GAIM_INCLUDES) $(MEANWHILE_INCLUDES) Index: src/mwgaim.c =================================================================== RCS file: /cvsroot/meanwhile/meanwhile-gaim/src/mwgaim.c,v retrieving revision 1.1 diff -u -p -u -r1.1 mwgaim.c --- src/mwgaim.c 1 Jun 2004 23:32:26 -0000 1.1 +++ src/mwgaim.c 16 Jun 2004 16:21:16 -0000 @@ -723,12 +723,13 @@ static char *mw_status_text(GaimBuddy *b static char *mw_list_status_text(GaimBuddy *b) { - g_return_val_if_fail(b, NULL); + GaimConnection *gc = b->account->gc; + struct mw_plugin_data *pd = PLUGIN_DATA(gc); + struct mwIdBlock i = { b->name, NULL}; + const char *t; - struct mw_plugin_data *pd = PLUGIN_DATA(b->account->gc); - struct mwIdBlock i = { b->name, NULL }; - const char *t = mwServiceAware_getText(pd->srvc_aware, &i); - return t? g_strdup(t): NULL; + t = mwServiceAware_getText(pd->srvc_aware, &i); + return t ? g_strdup(t) : NULL; } @@ -877,19 +878,21 @@ static void mw_convo_closed(GaimConnecti } -static void mw_add_buddy(GaimConnection *gc, const char *name, +static void mw_add_buddy(GaimConnection *gc, GaimBuddy *buddy, GaimGroup *group) { struct mw_plugin_data *pd = PLUGIN_DATA(gc); /* later support name@community splits */ - struct mwIdBlock t = { (char *) name, NULL }; + struct mwIdBlock t = { (char *) buddy->name, NULL }; mwServiceAware_add(pd->srvc_aware, &t, 1); } -static void mw_add_buddies(GaimConnection *gc, GList *buddies) { +static void mw_add_buddies(GaimConnection *gc, GList *buddies, + GList *groups) { + GaimBuddy *buddy; struct mw_plugin_data *pd = PLUGIN_DATA(gc); unsigned int count, c; struct mwIdBlock *t; @@ -897,8 +900,10 @@ static void mw_add_buddies(GaimConnectio count = g_list_length(buddies); t = g_new0(struct mwIdBlock, count); - for(c = count; c--; buddies = buddies->next) - (t + c)->user = (char *) buddies->data; + for(c = count; c--; buddies = buddies->next) { + buddy = buddies->data; + (t + c)->user = buddy->name; + } mwServiceAware_add(pd->srvc_aware, t, count); g_free(t); @@ -906,20 +911,20 @@ static void mw_add_buddies(GaimConnectio static void mw_remove_buddy(GaimConnection *gc, - const char *name, const char *group) { + GaimBuddy *buddy, GaimGroup *group) { struct mw_plugin_data *pd = PLUGIN_DATA(gc); /* later support name@community splits */ - struct mwIdBlock t = { (char *) name, NULL }; + struct mwIdBlock t = { (char *) buddy->name, NULL }; mwServiceAware_remove(pd->srvc_aware, &t, 1); } static void mw_remove_buddies(GaimConnection *gc, GList *buddies, - const char *group) { - + GList *groups) { + GaimBuddy *buddy; struct mw_plugin_data *pd = PLUGIN_DATA(gc); unsigned int count, c; struct mwIdBlock *t; @@ -927,8 +932,10 @@ static void mw_remove_buddies(GaimConnec count = g_list_length(buddies); t = g_new0(struct mwIdBlock, count); - for(c = count; c--; buddies = buddies->next) - (t + c)->user = (char *) buddies->data; + for(c = count; c--; buddies = buddies->next) { + buddy = buddies->data; + (t + c)->user = (char *) buddy->name; + } mwServiceAware_remove(pd->srvc_aware, t, count); g_free(t);