diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-07-01 15:31:47 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2010-07-15 16:19:56 +0100 |
commit | 6ce7c7ac7ecbdf8360da4a8ee512678f4fd42fdc (patch) | |
tree | 7cbc717b07f3b95f264586daeb51279e3d71b510 | |
parent | 84c402d247765dbd754a9255878d162e868d1201 (diff) |
Require libpurple 2.6 or later, and get rid of backwards compatibility glue
Most distributions have 2.6, notably Maemo 5 and Ubuntu >= 9.10.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/connection.c | 18 | ||||
-rw-r--r-- | src/main.c | 6 |
3 files changed, 4 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index 7693a79..77e2c4f 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,7 @@ AC_ARG_ENABLE(leaky-request-stubs, AC_DEFINE(ENABLE_LEAKY_REQUEST_STUBS, [], [Enable the leaky stub implementation of the request API for debugging purposes])) AC_SUBST(ENABLE_LEAKY_REQUEST_STUBS) -PKG_CHECK_MODULES(PURPLE,[purple >= 2.1.1]) +PKG_CHECK_MODULES(PURPLE,[purple >= 2.6]) PKG_CHECK_MODULES(TP_GLIB,[telepathy-glib >= 0.9.2]) PKG_CHECK_MODULES(GLIB,[glib-2.0 >= 2.22, gobject-2.0]) PKG_CHECK_MODULES(DBUS_GLIB,[dbus-glib-1 >= 0.73]) diff --git a/src/connection.c b/src/connection.c index 7bcb2a2..747ab18 100644 --- a/src/connection.c +++ b/src/connection.c @@ -121,7 +121,6 @@ connected_cb (PurpleConnection *pc) TP_CONNECTION_STATUS_REASON_REQUESTED); } -#if PURPLE_VERSION_CHECK(2,3,0) static void haze_report_disconnect_reason (PurpleConnection *gc, PurpleConnectionError reason, @@ -198,7 +197,6 @@ haze_report_disconnect_reason (PurpleConnection *gc, tp_base_connection_change_status (base_conn, TP_CONNECTION_STATUS_DISCONNECTED, tp_reason); } -#endif static gboolean idle_finish_shutdown (gpointer data) @@ -219,17 +217,11 @@ disconnected_cb (PurpleConnection *pc) if(base_conn->status != TP_CONNECTION_STATUS_DISCONNECTED) { + /* Because we have report_disconnect_reason, if status is not already + * DISCONNECTED, we know that it was requested. */ tp_base_connection_change_status (base_conn, TP_CONNECTION_STATUS_DISCONNECTED, -/* If we have report_disconnect_reason, then if status is not already - * DISCONNECTED we know that it was requested. If not, we have no idea. - */ -#if PURPLE_VERSION_CHECK(2,3,0) - TP_CONNECTION_STATUS_REASON_REQUESTED -#else - TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED -#endif - ); + TP_CONNECTION_STATUS_REASON_REQUESTED); } @@ -750,11 +742,7 @@ connection_ui_ops = NULL, /* report_disconnect */ NULL, /* network_connected */ NULL, /* network_disconnected */ -#if PURPLE_VERSION_CHECK(2,3,0) haze_report_disconnect_reason, /* report_disconnect_reason */ -#else - NULL, /* _purple_reserved0 */ -#endif NULL, /* _purple_reserved1 */ NULL, /* _purple_reserved2 */ @@ -46,12 +46,6 @@ #include <libpurple/dbus-server.h> #endif -#if !PURPLE_VERSION_CHECK (2, 4, 0) -extern const guint purple_major_version; -extern const guint purple_minor_version; -extern const guint purple_micro_version; -#endif - #include <telepathy-glib/run.h> #include "defines.h" |