# HG changeset patch # User Sadrul Habib Chowdhury # Date 1202325085 0 # Node ID def0d893e7377dba05778be8198ffee698966834 # Parent d5d3efbfcf3034c4f81e1a11eb2e932ddf613e94# Parent 1fefd8340821534a19d43bff776e131383fc18e3 merge of 'c121cde51cc5bd48a26b46df14b86756465ef4a4' and 'ec0f88109090f08d9777f563253782d05cef4624' diff -r d5d3efbfcf30 -r def0d893e737 finch/plugins/Makefile.am --- a/finch/plugins/Makefile.am Sat Dec 29 17:45:47 2007 +0000 +++ b/finch/plugins/Makefile.am Wed Feb 06 19:11:25 2008 +0000 @@ -37,7 +37,7 @@ -I$(top_srcdir) \ -I$(top_srcdir)/finch \ -I$(top_srcdir)/finch/libgnt \ - $(DEBUG_CFLAGS) \ + $(DEBUG_CFLAGS) \ $(FARSIGHT_CFLAGS) \ $(GLIB_CFLAGS) \ $(GNT_CFLAGS) \ diff -r d5d3efbfcf30 -r def0d893e737 libpurple/example/Makefile.am --- a/libpurple/example/Makefile.am Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/example/Makefile.am Wed Feb 06 19:11:25 2008 +0000 @@ -7,7 +7,7 @@ $(DBUS_LIBS) \ $(INTLLIBS) \ $(GLIB_LIBS) \ - $(LIBXML_LIBS) \ + $(LIBXML_LIBS) \ $(FARSIGHT_LIBS) \ $(top_builddir)/libpurple/libpurple.la diff -r d5d3efbfcf30 -r def0d893e737 libpurple/media.c --- a/libpurple/media.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/media.c Wed Feb 06 19:11:25 2008 +0000 @@ -99,7 +99,8 @@ NULL, sizeof(PurpleMedia), 0, - (GInstanceInitFunc) purple_media_init + (GInstanceInitFunc) purple_media_init, + NULL }; type = g_type_register_static(G_TYPE_OBJECT, "PurpleMedia", &info, 0); } diff -r d5d3efbfcf30 -r def0d893e737 libpurple/media.h --- a/libpurple/media.h Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/media.h Wed Feb 06 19:11:25 2008 +0000 @@ -26,10 +26,6 @@ #ifndef __MEDIA_H_ #define __MEDIA_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef USE_FARSIGHT #include @@ -69,7 +65,7 @@ PurpleMediaPrivate *priv; }; -GType purple_media_get_type(); +GType purple_media_get_type(void); void purple_media_get_elements(PurpleMedia *media, GstElement **audio_src, GstElement **audio_sink, GstElement **video_src, GstElement **video_sink); diff -r d5d3efbfcf30 -r def0d893e737 libpurple/mediamanager.c --- a/libpurple/mediamanager.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/mediamanager.c Wed Feb 06 19:11:25 2008 +0000 @@ -78,7 +78,8 @@ NULL, sizeof(PurpleMediaManager), 0, - (GInstanceInitFunc) purple_media_manager_init + (GInstanceInitFunc) purple_media_manager_init, + NULL }; type = g_type_register_static(G_TYPE_OBJECT, "PurpleMediaManager", &info, 0); } diff -r d5d3efbfcf30 -r def0d893e737 libpurple/mediamanager.h --- a/libpurple/mediamanager.h Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/mediamanager.h Wed Feb 06 19:11:25 2008 +0000 @@ -26,10 +26,6 @@ #ifndef __MEDIA_MANAGER_H_ #define __MEDIA_MANAGER_H_ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #ifdef USE_FARSIGHT #include diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/bonjour/Makefile.am --- a/libpurple/protocols/bonjour/Makefile.am Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/bonjour/Makefile.am Wed Feb 06 19:11:25 2008 +0000 @@ -52,6 +52,7 @@ $(DEBUG_CFLAGS) \ $(LIBXML_CFLAGS) \ $(FARSIGHT_CFLAGS) + if MDNS_AVAHI AM_CPPFLAGS += $(AVAHI_CFLAGS) else diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/bonjour/bonjour.c --- a/libpurple/protocols/bonjour/bonjour.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/bonjour/bonjour.c Wed Feb 06 19:11:25 2008 +0000 @@ -482,12 +482,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/gg/gg.c --- a/libpurple/protocols/gg/gg.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/gg/gg.c Wed Feb 06 19:11:25 2008 +0000 @@ -2147,12 +2147,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; /* }}} */ diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/irc/irc.c --- a/libpurple/protocols/irc/irc.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/irc/irc.c Wed Feb 06 19:11:25 2008 +0000 @@ -899,12 +899,11 @@ NULL, /* whiteboard_prpl_ops */ irc_send_raw, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - NULL + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static gboolean load_plugin (PurplePlugin *plugin) { @@ -953,7 +952,7 @@ NULL, NULL, NULL, - sizeof(PurplePluginProtocolInfo) + NULL }; static void _init_plugin(PurplePlugin *plugin) diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/jabber/libxmpp.c --- a/libpurple/protocols/jabber/libxmpp.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Wed Feb 06 19:11:25 2008 +0000 @@ -115,11 +115,8 @@ jabber_unregister_account, /* unregister_user */ jabber_send_attention, /* send_attention */ jabber_attention_types, /* attention_types */ -#ifdef USE_FARSIGHT - jabber_media_initiate /* initiate_media */ -#else - NULL /* initiate_media */ -#endif + sizeof(PurplePluginProtocolInfo), /* struct_size */ + jabber_media_initiate /* initiate_media */ }; static gboolean load_plugin(PurplePlugin *plugin) diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Wed Feb 06 19:11:25 2008 +0000 @@ -2283,10 +2283,9 @@ NULL, /* roomlist_room_serialize */ NULL, /* unregister_user */ msn_send_attention, /* send_attention */ - msn_attention_types, /* attention_types */ - - /* padding */ - sizeof(PurplePluginProtocolInfo) + msn_attention_types, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/msnp9/Makefile.am --- a/libpurple/protocols/msnp9/Makefile.am Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/msnp9/Makefile.am Wed Feb 06 19:11:25 2008 +0000 @@ -87,4 +87,6 @@ -I$(top_srcdir)/libpurple \ -I$(top_builddir)/libpurple \ $(GLIB_CFLAGS) \ - $(DEBUG_CFLAGS) + $(DEBUG_CFLAGS) \ + $(FARSIGHT_CFLAGS) + diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/msnp9/msn.c --- a/libpurple/protocols/msnp9/msn.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/msnp9/msn.c Wed Feb 06 19:11:25 2008 +0000 @@ -2136,9 +2136,8 @@ NULL, /* unregister_user */ msn_send_attention, /* send_attention */ msn_attention_types, /* attention_types */ - - /* padding */ - NULL + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/myspace/myspace.c --- a/libpurple/protocols/myspace/myspace.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/myspace/myspace.c Wed Feb 06 19:11:25 2008 +0000 @@ -2990,7 +2990,8 @@ NULL, /* unregister_user */ msim_send_attention, /* send_attention */ msim_attention_types, /* attention_types */ - sizeof(PurplePluginProtocolInfo) + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/novell/novell.c --- a/libpurple/protocols/novell/novell.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/novell/novell.c Wed Feb 06 19:11:25 2008 +0000 @@ -3511,12 +3511,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = { diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/null/nullprpl.c --- a/libpurple/protocols/null/nullprpl.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/null/nullprpl.c Wed Feb 06 19:11:25 2008 +0000 @@ -1122,10 +1122,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - NULL, /* padding... */ - NULL, - NULL, - sizeof(PurpleProtocolPluginInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static void nullprpl_init(PurplePlugin *plugin) diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/oscar/libaim.c --- a/libpurple/protocols/oscar/libaim.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/oscar/libaim.c Wed Feb 06 19:11:25 2008 +0000 @@ -92,12 +92,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/oscar/libicq.c --- a/libpurple/protocols/oscar/libicq.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/oscar/libicq.c Wed Feb 06 19:11:25 2008 +0000 @@ -92,12 +92,11 @@ NULL, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/qq/qq.c --- a/libpurple/protocols/qq/qq.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/qq/qq.c Wed Feb 06 19:11:25 2008 +0000 @@ -701,12 +701,11 @@ NULL, /* PurpleWhiteboardPrplOps */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - NULL + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = { @@ -742,7 +741,7 @@ NULL, NULL, NULL, - sizeof(PurplePluginProtocolInfo) + NULL }; diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/silc/silc.c --- a/libpurple/protocols/silc/silc.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/silc/silc.c Wed Feb 06 19:11:25 2008 +0000 @@ -1993,12 +1993,11 @@ &silcpurple_wb_ops, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - NULL + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = @@ -2035,7 +2034,7 @@ NULL, NULL, NULL, - sizeof(PurplePluginProtocolInfo) + NULL }; static void diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/silc10/silc.c --- a/libpurple/protocols/silc10/silc.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/silc10/silc.c Wed Feb 06 19:11:25 2008 +0000 @@ -1793,12 +1793,11 @@ &silcpurple_wb_ops, /* whiteboard_prpl_ops */ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - NULL + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; static PurplePluginInfo info = @@ -1835,7 +1834,7 @@ NULL, NULL, NULL, - sizeof(PurpleProtocolPluginInfo) + NULL }; static void diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/simple/simple.c --- a/libpurple/protocols/simple/simple.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/simple/simple.c Wed Feb 06 19:11:25 2008 +0000 @@ -2031,12 +2031,11 @@ NULL, /* whiteboard_prpl_ops */ simple_send_raw, /* send_raw */ NULL, /* roomlist_room_serialize */ - - /* padding */ - NULL, - NULL, - NULL, - sizeof(PurplePluginProtocolInfo) + NULL, /* unregister_user */ + NULL, /* send_attention */ + NULL, /* get_attention_types */ + sizeof(PurplePluginProtocolInfo), /* struct_size */ + NULL /* initiate_media */ }; diff -r d5d3efbfcf30 -r def0d893e737 libpurple/protocols/yahoo/yahoo.c --- a/libpurple/protocols/yahoo/yahoo.c Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo.c Wed Feb 06 19:11:25 2008 +0000 @@ -4345,12 +4345,10 @@ NULL, /* send_raw */ NULL, /* roomlist_room_serialize */ NULL, /* unregister_user */ - yahoo_send_attention, yahoo_attention_types, - - /* padding */ - sizeof(PurplePluginProtocolInfo) + sizeof(PurplePluginProtocolInfo), + NULL }; static PurplePluginInfo info = diff -r d5d3efbfcf30 -r def0d893e737 libpurple/prpl.h --- a/libpurple/prpl.h Sat Dec 29 17:45:47 2007 +0000 +++ b/libpurple/prpl.h Wed Feb 06 19:11:25 2008 +0000 @@ -394,24 +394,23 @@ * reasons. */ void (*unregister_user)(PurpleAccount *, PurpleAccountUnregistrationCb cb, void *user_data); - + /* Attention API for sending & receiving zaps/nudges/buzzes etc. */ gboolean (*send_attention)(PurpleConnection *gc, const char *username, guint type); GList *(*get_attention_types)(PurpleAccount *acct); - void (*_purple_reserved4)(void); - GList *(*attention_types)(PurpleAccount *acct); + /* Make sure you do not try to dereference anything past struct_size! */ + int struct_size; + #ifdef USE_FARSIGHT PurpleMedia *(*initiate_media)(PurpleConnection *conn, const char *who, PurpleMediaStreamType type); #else void (*initiate_media)(void); #endif - /* Make sure you do not try to dereference anything past struct_size! */ - int struct_size; }; #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \ - ((G_STRUCT_OFFSET(PurpleProtocolPluginInfo, member) < prpl->struct_size) && \ + ((G_STRUCT_OFFSET(PurplePluginProtocolInfo, member) < prpl->struct_size) && \ prpl->member != NULL) #define PURPLE_IS_PROTOCOL_PLUGIN(plugin) \ @@ -559,3 +558,4 @@ #endif #endif /* _PRPL_H_ */ + diff -r d5d3efbfcf30 -r def0d893e737 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Dec 29 17:45:47 2007 +0000 +++ b/pidgin/gtkconv.c Wed Feb 06 19:11:25 2008 +0000 @@ -4601,7 +4601,6 @@ /* Setup the top part of the pane */ gtkconv->topvbox = vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); - gtk_paned_pack1(GTK_PANED(paned), vbox, TRUE, TRUE); gtk_widget_show(vbox); /* Setup the info pane */ diff -r d5d3efbfcf30 -r def0d893e737 pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Sat Dec 29 17:45:47 2007 +0000 +++ b/pidgin/gtkmedia.c Wed Feb 06 19:11:25 2008 +0000 @@ -88,7 +88,8 @@ NULL, sizeof(PidginMedia), 0, - (GInstanceInitFunc) pidgin_media_init + (GInstanceInitFunc) pidgin_media_init, + NULL }; type = g_type_register_static(GTK_TYPE_HBOX, "PidginMedia", &info, 0); } @@ -202,9 +203,9 @@ rms_db = g_value_get_double(value); if (!strcmp(gst_element_get_name(src), "sendlevel")) - gtk_progress_bar_set_fraction(gtkmedia->priv->send_progress, pow(10, rms_db / 20) * 5); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtkmedia->priv->send_progress), pow(10, rms_db / 20) * 5); else - gtk_progress_bar_set_fraction(gtkmedia->priv->recv_progress, pow(10, rms_db / 20) * 5); + gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(gtkmedia->priv->recv_progress), pow(10, rms_db / 20) * 5); return TRUE; } @@ -213,9 +214,9 @@ pidgin_media_ready_cb(PurpleMedia *media, PidginMedia *gtkmedia) { GstElement *element = purple_media_get_audio_pipeline(media); - gst_bus_add_signal_watch(gst_pipeline_get_bus(element)); - g_signal_connect(G_OBJECT(gst_pipeline_get_bus(GST_PIPELINE(element))), "message", level_message_cb, gtkmedia); - printf("\n\nbus: %d\n", gst_pipeline_get_bus(GST_PIPELINE(element))); + gst_bus_add_signal_watch(GST_BUS(gst_pipeline_get_bus(GST_PIPELINE(element)))); + g_signal_connect(G_OBJECT(gst_pipeline_get_bus(GST_PIPELINE(element))), "message", G_CALLBACK(level_message_cb), gtkmedia); + printf("\n\nbus: %p\n", gst_pipeline_get_bus(GST_PIPELINE(element))); } static void @@ -231,14 +232,14 @@ pidgin_media_hangup_cb(PurpleMedia *media, PidginMedia *gtkmedia) { pidgin_media_emit_message(gtkmedia, _("You have ended the call.")); - gtk_widget_destroy(gtkmedia); + gtk_widget_destroy(GTK_WIDGET(gtkmedia)); } static void pidgin_media_reject_cb(PurpleMedia *media, PidginMedia *gtkmedia) { pidgin_media_emit_message(gtkmedia, _("You have rejected the call.")); - gtk_widget_destroy(gtkmedia); + gtk_widget_destroy(GTK_WIDGET(gtkmedia)); } static void diff -r d5d3efbfcf30 -r def0d893e737 pidgin/plugins/musicmessaging/Makefile.am --- a/pidgin/plugins/musicmessaging/Makefile.am Sat Dec 29 17:45:47 2007 +0000 +++ b/pidgin/plugins/musicmessaging/Makefile.am Wed Feb 06 19:11:25 2008 +0000 @@ -39,7 +39,7 @@ -I$(top_builddir)/libpurple \ -I$(top_srcdir)/libpurple \ -I$(top_srcdir)/pidgin \ - $(DEBUG_CFLAGS) \ + $(DEBUG_CFLAGS) \ $(FARSIGHT_CFLAGS) \ $(GTK_CFLAGS) \ $(DBUS_CFLAGS)