[Galago-commits] r2571 - in trunk/gaim-galago: . src
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Wed Feb 8 18:31:23 PST 2006
Author: grim
Date: 2006-02-08 18:31:18 -0800 (Wed, 08 Feb 2006)
New Revision: 2571
Modified:
trunk/gaim-galago/ChangeLog
trunk/gaim-galago/src/gaim-galago.c
Log:
Updated to work against lastest libgalago, I think there are some more signal changes to deal with, but as of right now the feed _appears_ to be working correctly...
Modified: trunk/gaim-galago/ChangeLog
===================================================================
--- trunk/gaim-galago/ChangeLog 2006-02-08 09:46:40 UTC (rev 2570)
+++ trunk/gaim-galago/ChangeLog 2006-02-09 02:31:18 UTC (rev 2571)
@@ -1,3 +1,8 @@
+Wed Feb 8 20:30:20 CST 2006 Gary Kramlich <grim at reaperworld.com>
+
+ * src/gaim-galago.c:
+ - Update to new changes in libgalago.
+
Wed Jan 11 04:19:09 CST 2006 Gary Kramlich <grim at reaperworld.com>
* src/gaim-galago.c:
Modified: trunk/gaim-galago/src/gaim-galago.c
===================================================================
--- trunk/gaim-galago/src/gaim-galago.c 2006-02-08 09:46:40 UTC (rev 2570)
+++ trunk/gaim-galago/src/gaim-galago.c 2006-02-09 02:31:18 UTC (rev 2571)
@@ -37,6 +37,7 @@
#endif
#include <libgalago/galago.h>
+
#include <dbus/dbus-glib.h>
#include <ctype.h>
#include <string.h>
@@ -160,7 +161,11 @@
}
static void
+#if GAIM_VERSION_CHECK(2,0,0) /* more ugly preproc */
+buddy_idle_changed_cb(GaimBuddy *buddy, gboolean old_idle, gboolean new_idle)
+#else
buddy_idle_changed_cb(GaimBuddy *buddy)
+#endif /* end of more ugly preproc */
{
GalagoPresence *presence;
GalagoService *service;
@@ -206,7 +211,12 @@
}
static void
+#if GAIM_VERSION_CHECK(2,0,0) /* yes this is ugly... */
+buddy_status_changed_cb(GaimBuddy *buddy, GaimStatus *old_status,
+ GaimStatus *new_status)
+#else
buddy_status_changed_cb(GaimBuddy *buddy)
+#endif /* end of ugly preproc... */
{
GaimPlugin *prpl;
GaimPluginProtocolInfo *prpl_info = NULL;
@@ -250,7 +260,7 @@
else
{
if (gaccount != NULL)
- galago_account_set_presence(gaccount, NULL);
+ galago_account_set_connected(gaccount, FALSE);
return;
}
@@ -388,8 +398,17 @@
if (account == buddy->account)
{
+#if GAIM_VERSION_CHECK(2,0,0)
+ GaimPresence *presence;
+ GaimStatus *status;
+
+ presence = gaim_buddy_get_presence(buddy);
+ status = gaim_presence_get_active_status(presence);
+ buddy_status_changed_cb(buddy, status, status);
+#else
buddy_status_changed_cb(buddy);
buddy_idle_changed_cb(buddy);
+#endif
}
}
}
@@ -483,8 +502,18 @@
{
GaimBuddy *buddy = (GaimBuddy *)bnode;
- if (gaim_account_is_connected(buddy->account))
+ if (gaim_account_is_connected(buddy->account)) {
+#if GAIM_VERSION_CHECK(2,0,0)
+ GaimPresence *presence;
+ GaimStatus *status;
+
+ presence = gaim_buddy_get_presence(buddy);
+ status = gaim_presence_get_active_status(presence);
+ buddy_status_changed_cb(buddy, status, status);
+#else
buddy_status_changed_cb(buddy);
+#endif
+ }
}
}
}
@@ -543,6 +572,8 @@
static gboolean
plugin_load(GaimPlugin *plugin)
{
+ void *blist_handle = NULL;
+
g_log_set_handler("Galago",
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL |
G_LOG_FLAG_RECURSION,
@@ -570,23 +601,31 @@
person_table = g_hash_table_new(NULL, NULL);
/* Connect the signals */
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-away",
+ blist_handle = gaim_blist_get_handle();
+
+ gaim_signal_connect(blist_handle, "buddy-signed-on",
plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-back",
+ gaim_signal_connect(blist_handle, "buddy-signed-off",
plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-idle",
+
+#if !GAIM_VERSION_CHECK(2,0,0)
+ gaim_signal_connect(blist_handle, "buddy-away",
+ plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
+ gaim_signal_connect(blist_handle, "buddy-back",
+ plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
+ gaim_signal_connect(blist_handle, "buddy-idle",
plugin, GAIM_CALLBACK(buddy_idle_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-unidle",
+ gaim_signal_connect(blist_handle, "buddy-unidle",
plugin, GAIM_CALLBACK(buddy_idle_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-idle-updated",
+ gaim_signal_connect(blist_handle, "buddy-idle-updated",
plugin, GAIM_CALLBACK(buddy_idle_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-on",
+
+#else /* gaim 2.0.0 and above... */
+ gaim_signal_connect(blist_handle, "buddy-status-changed",
plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
- gaim_signal_connect(gaim_blist_get_handle(), "buddy-signed-off",
- plugin, GAIM_CALLBACK(buddy_status_changed_cb), NULL);
-
-#if GAIM_VERSION_CHECK(2,0,0)
- gaim_signal_connect(gaim_buddy_icons_get_handle(), "buddy-icon-chaced",
+ gaim_signal_connect(blist_handle, "buddy-idle-changed",
+ plugin, GAIM_CALLBACK(buddy_idle_changed_cb), NULL);
+ gaim_signal_connect(gaim_buddy_icons_get_handle(), "buddy-icon-changed",
plugin, GAIM_CALLBACK(buddy_icon_changed_cb), NULL);
#endif
More information about the galago-commits
mailing list