Mercurial > pidgin
diff plugins/ticker/ticker.c @ 3630:9682c0e022c6
[gaim-migrate @ 3753]
Yeah this will probably break a lot of shit knowing my luck. But hey, I really don't care what people thnk.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Fri, 11 Oct 2002 03:14:01 +0000 |
parents | cd938f18f3f8 |
children | 195049ac6bf3 |
line wrap: on
line diff
--- a/plugins/ticker/ticker.c Fri Oct 11 02:10:08 2002 +0000 +++ b/plugins/ticker/ticker.c Fri Oct 11 03:14:01 2002 +0000 @@ -31,6 +31,9 @@ #include "gaim.h" #include "prpl.h" #include "pixmaps/no_icon.xpm" +#ifdef _WIN32 +#include "win32dep.h" +#endif static GtkWidget *tickerwindow = NULL; static GtkWidget *ticker; @@ -49,6 +52,10 @@ gboolean userclose = FALSE; GtkWidget *msgw; +/* for win32 compatability */ +G_MODULE_IMPORT GSList *connections; +G_MODULE_IMPORT GtkWidget *blist; + void BuddyTickerDestroyWindow( GtkWidget *window ); void BuddyTickerCreateWindow( void ); void BuddyTickerAddUser( char *name, char *alias, GdkPixmap *pm, GdkBitmap *bm ); @@ -372,7 +379,7 @@ } void signoff_cb(struct gaim_connection *gc) { - if (!connections->next) { + if (connections && !connections->next) { gtk_widget_destroy(tickerwindow); tickerwindow = NULL; ticker = NULL; @@ -401,7 +408,19 @@ gdk_bitmap_unref(bm); } -char *gaim_plugin_init(GModule *h) { +/* + * EXPORTED FUNCTIONS + */ + +G_MODULE_EXPORT char *name() { + return "Buddy Ticker"; +} + +G_MODULE_EXPORT char *description() { + return "Scrolls online buddies from your buddy list."; +} + +G_MODULE_EXPORT char *gaim_plugin_init(GModule *h) { handle = h; gaim_signal_connect(h, event_buddy_signon, signon_cb, NULL); @@ -414,11 +433,11 @@ return NULL; } -void gaim_plugin_remove() { - gtk_widget_destroy(tickerwindow); +G_MODULE_EXPORT void gaim_plugin_remove() { + BuddyTickerDestroyWindow(tickerwindow); } struct gaim_plugin_description desc; -struct gaim_plugin_description *gaim_plugin_desc() { +G_MODULE_EXPORT struct gaim_plugin_description *gaim_plugin_desc() { desc.api_version = PLUGIN_API_VERSION; desc.name = g_strdup("Ticker"); desc.version = g_strdup(VERSION);