Mercurial > pidgin
changeset 15987:7adb832667fd
merge of 'a9451570b92d0f29b2e120ce02c4301e9ed3ced6'
and 'de18d679886cc754f6e5eb54eea8f21cfe64284f'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Wed, 04 Apr 2007 03:50:15 +0000 |
parents | 0315b014741b (diff) 2c81ebc7bf0b (current diff) |
children | e05e5b148723 |
files | |
diffstat | 9 files changed, 55 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Wed Apr 04 03:47:13 2007 +0000 +++ b/COPYRIGHT Wed Apr 04 03:50:15 2007 +0000 @@ -97,6 +97,7 @@ Andrew Echols John Eckerdal Sean Egan <seanegan@gmail.com> +William Ehlhardt Markus Elfring Nelson Elhage Ignacio J. Elia
--- a/finch/gntdebug.c Wed Apr 04 03:47:13 2007 +0000 +++ b/finch/gntdebug.c Wed Apr 04 03:50:15 2007 +0000 @@ -106,9 +106,16 @@ } } +static gboolean +finch_debug_is_enabled(PurpleDebugLevel level, const char *category) +{ + return debug.window && !debug.paused; +} + static PurpleDebugUiOps uiops = { finch_debug_print, + finch_debug_is_enabled }; PurpleDebugUiOps *finch_debug_get_ui_ops()
--- a/finch/libgnt/gntwm.h Wed Apr 04 03:47:13 2007 +0000 +++ b/finch/libgnt/gntwm.h Wed Apr 04 03:50:15 2007 +0000 @@ -3,6 +3,7 @@ #include "gntmenu.h" #include <panel.h> +#include <time.h> #define GNT_TYPE_WM (gnt_wm_get_gtype()) #define GNT_WM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WM, GntWM))
--- a/libpurple/debug.c Wed Apr 04 03:47:13 2007 +0000 +++ b/libpurple/debug.c Wed Apr 04 03:50:15 2007 +0000 @@ -53,7 +53,8 @@ ops = purple_debug_get_ui_ops(); - if (!debug_enabled && ((ops == NULL) || (ops->print == NULL))) + if (!debug_enabled && ((ops == NULL) || (ops->print == NULL) || + (ops->is_enabled && !ops->is_enabled(level, category)))) return; arg_s = g_strdup_vprintf(format, args);
--- a/libpurple/debug.h Wed Apr 04 03:47:13 2007 +0000 +++ b/libpurple/debug.h Wed Apr 04 03:50:15 2007 +0000 @@ -49,6 +49,8 @@ { void (*print)(PurpleDebugLevel level, const char *category, const char *arg_s); + gboolean (*is_enabled)(PurpleDebugLevel level, + const char *category); } PurpleDebugUiOps; #ifdef __cplusplus
--- a/libpurple/protocols/oscar/oscar.c Wed Apr 04 03:47:13 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Wed Apr 04 03:50:15 2007 +0000 @@ -3667,6 +3667,8 @@ PurpleConnection *gc; PurpleAccount *account; PurpleBuddy *buddy; + PurplePresence *presence; + PurpleStatus *status; struct buddyinfo *bi; gchar who[16]; PurpleNotifyUserInfo *user_info; @@ -3760,7 +3762,26 @@ g_free(buf); g_free(utf8); } - + + if (buddy != NULL) { + const gchar *message; + gchar *utf8, *tmp; + + presence = purple_buddy_get_presence(buddy); + status = purple_presence_get_active_status(presence); + message = purple_status_get_attr_string(status, "message"); + + utf8 = message && message[0] ? oscar_utf8_try_convert(account, message) : NULL; + tmp = g_strdup_printf("%s%s%s", + purple_status_get_name(status), + utf8 && *utf8 ? ": " : "", + utf8 && *utf8 ? utf8 : ""); + g_free(utf8); + + oscar_user_info_convert_and_add(account, + user_info, _("Status"), tmp); + } + oscar_user_info_convert_and_add(account, user_info, _("Additional Information"), info->info); purple_notify_user_info_add_section_break(user_info);
--- a/libpurple/win32/giowin32.c Wed Apr 04 03:47:13 2007 +0000 +++ b/libpurple/win32/giowin32.c Wed Apr 04 03:50:15 2007 +0000 @@ -398,8 +398,8 @@ g_print ("select_thread %#x: got error, setting data_avail\n", channel->thread_id); SetEvent (channel->data_avail_event); + UNLOCK (channel->mutex); g_io_channel_unref ((GIOChannel *)channel); - UNLOCK (channel->mutex); /* No need to call _endthreadex(), the actual thread starter routine * in MSVCRT (see crt/src/threadex.c:_threadstartex) calls
--- a/pidgin/gtkblist.c Wed Apr 04 03:47:13 2007 +0000 +++ b/pidgin/gtkblist.c Wed Apr 04 03:50:15 2007 +0000 @@ -6264,13 +6264,14 @@ } static void -build_plugin_actions(GtkWidget *menu, PurplePlugin *plugin) +build_plugin_actions(GtkWidget *menu, PurplePlugin *plugin, + gpointer context) { GtkWidget *menuitem; PurplePluginAction *action = NULL; GList *actions, *l; - actions = PURPLE_PLUGIN_ACTIONS(plugin, NULL); + actions = PURPLE_PLUGIN_ACTIONS(plugin, context); for (l = actions; l != NULL; l = l->next) { @@ -6278,7 +6279,7 @@ { action = (PurplePluginAction *) l->data; action->plugin = plugin; - action->context = NULL; + action->context = context; menuitem = gtk_menu_item_new_with_label(action->label); gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); @@ -6349,6 +6350,7 @@ PurpleConnection *gc = NULL; PurpleAccount *account = NULL; GdkPixbuf *pixbuf = NULL; + PurplePlugin *plugin = NULL; account = accounts->data; accel_group = gtk_menu_get_accel_group(GTK_MENU(accountmenu)); @@ -6390,35 +6392,9 @@ pidgin_separator(submenu); gc = purple_account_get_connection(account); - if (gc && PURPLE_CONNECTION_IS_CONNECTED(gc)) { - PurplePlugin *plugin = NULL; - - plugin = gc->prpl; - if (PURPLE_PLUGIN_HAS_ACTIONS(plugin)) { - GList *l, *ll = NULL; - PurplePluginAction *action = NULL; - - for (l = ll = PURPLE_PLUGIN_ACTIONS(plugin, gc); l; l = l->next) { - if (l->data) { - action = (PurplePluginAction *)l->data; - action->plugin = plugin; - action->context = gc; - - menuitem = gtk_menu_item_new_with_label(action->label); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - g_signal_connect(G_OBJECT(menuitem), "activate", - G_CALLBACK(plugin_act), action); - g_object_set_data_full(G_OBJECT(menuitem), "plugin_action", action, (GDestroyNotify)purple_plugin_action_free); - gtk_widget_show(menuitem); - } else - pidgin_separator(submenu); - } - } else { - menuitem = gtk_menu_item_new_with_label(_("No actions available")); - gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); - gtk_widget_set_sensitive(menuitem, FALSE); - gtk_widget_show(menuitem); - } + plugin = gc && PURPLE_CONNECTION_IS_CONNECTED(gc) ? gc->prpl : NULL; + if (plugin && PURPLE_PLUGIN_HAS_ACTIONS(plugin)) { + build_plugin_actions(submenu, plugin, gc); } else { menuitem = gtk_menu_item_new_with_label(_("No actions available")); gtk_menu_shell_append(GTK_MENU_SHELL(submenu), menuitem); @@ -6534,7 +6510,7 @@ gtk_menu_set_accel_path(GTK_MENU(submenu), path); g_free(path); - build_plugin_actions(submenu, plugin); + build_plugin_actions(submenu, plugin, NULL); } }
--- a/pidgin/gtkdebug.c Wed Apr 04 03:47:13 2007 +0000 +++ b/pidgin/gtkdebug.c Wed Apr 04 03:50:15 2007 +0000 @@ -1046,8 +1046,8 @@ gchar *ts_s; gchar *esc_s, *cat_s, *tmp, *s; - if (!purple_prefs_get_bool("/purple/gtk/debug/enabled") || - (debug_win == NULL)) + if (debug_win == NULL || + !purple_prefs_get_bool("/purple/gtk/debug/enabled")) { return; } @@ -1104,9 +1104,17 @@ g_free(s); } +static gboolean +pidgin_debug_is_enabled(PurpleDebugLevel level, const char *category) +{ + return (debug_win != NULL && + purple_prefs_get_bool("/purple/gtk/debug/enabled")); +} + static PurpleDebugUiOps ops = { pidgin_debug_print, + pidgin_debug_is_enabled }; PurpleDebugUiOps *