r7063 - in online-desktop/trunk: . pidgin
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r7063 - in online-desktop/trunk: . pidgin
- Date: Fri, 14 Dec 2007 16:26:33 -0600 (CST)
Author: hp
Date: 2007-12-14 16:26:30 -0600 (Fri, 14 Dec 2007)
New Revision: 7063
Modified:
online-desktop/trunk/Makefile-pidgin.am
online-desktop/trunk/pidgin/dbus-plugin.c
Log:
export IM status message from the pidgin plugin
Modified: online-desktop/trunk/Makefile-pidgin.am
===================================================================
--- online-desktop/trunk/Makefile-pidgin.am 2007-12-14 22:26:04 UTC (rev 7062)
+++ online-desktop/trunk/Makefile-pidgin.am 2007-12-14 22:26:30 UTC (rev 7063)
@@ -1,7 +1,9 @@
libdbus_api_plugin_la_LDFLAGS = -avoid-version -module
libdbus_api_plugin_la_LIBADD = $(PIDGIN_PLUGIN_LIBS)
-plugindir=$(libdir)/pidgin
+## pidgin installs its plugins to prefix/lib even if libdir is prefix/lib64, so we
+## have to be broken in the same way to match.
+plugindir=$(prefix)/lib/pidgin
plugin_LTLIBRARIES = libdbus-api-plugin.la
libdbus_api_plugin_la_CPPFLAGS = \
Modified: online-desktop/trunk/pidgin/dbus-plugin.c
===================================================================
--- online-desktop/trunk/pidgin/dbus-plugin.c 2007-12-14 22:26:04 UTC (rev 7062)
+++ online-desktop/trunk/pidgin/dbus-plugin.c 2007-12-14 22:26:30 UTC (rev 7063)
@@ -187,6 +187,28 @@
status = purple_status_get_name(pstatus);
if (status)
append_basic_entry(&dict_iter, "status", DBUS_TYPE_STRING, &status);
+
+ if (pstatus) {
+ const char *message;
+ message = purple_status_get_attr_string(pstatus, "message");
+ if (message) {
+ if (purple_status_is_available(pstatus) && strcmp(protocol, "aim") == 0) {
+ /* according to oscar/oscar.c, the available message is plain text
+ * instead of markup, while the away message is html.
+ */
+ append_basic_entry(&dict_iter, "status-message", DBUS_TYPE_STRING, &message);
+ } else {
+ /* It looks like the aim away message and all xmpp messages are html (?)
+ * For other protocols, who knows.
+ */
+ char *unescaped_message;
+ unescaped_message = purple_markup_strip_html(message);
+ if (unescaped_message)
+ append_basic_entry(&dict_iter, "status-message", DBUS_TYPE_STRING, &unescaped_message);
+ g_free(unescaped_message);
+ }
+ }
+ }
}
dbus_message_iter_close_container(append_iter, &dict_iter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]