Revision c9fdf2f3b93c3b83a38391080a042c1c115eaabc

nwalp at pidgin.im nwalp at pidgin.im
Sun Mar 18 20:20:49 EDT 2007


o     -----------------------------------------------------------------
|\    Revision: c9fdf2f3b93c3b83a38391080a042c1c115eaabc
| |   Ancestor: 04fd9089e93e64f81bc6caafb8bd7805037cd3ad
| |   Ancestor: 50462290007872fbc71682021623547dfa477158
| |   Author: nwalp at pidgin.im
| |   Date: 2007-03-19T00:20:29
| |   Branch: im.pidgin.pidgin
| |   
| |   Modified files:
| |           libpurple/connection.c libpurple/dnsquery.c
| |           libpurple/dnssrv.c pidgin/gtkdebug.c pidgin/gtknotify.c
| |           pidgin/gtkplugin.c pidgin/gtkprefs.c pidgin/gtksound.c
| |           po/POTFILES.in
| |   
| |   ChangeLog: 
| |   
| |   merge of '04fd9089e93e64f81bc6caafb8bd7805037cd3ad'
| |        and '50462290007872fbc71682021623547dfa477158'
| |   
| |   ============================================================
| |   --- libpurple/connection.c	113fd5fc0c90e7f241cc864f86689aae6d695dab
| |   +++ libpurple/connection.c	a4bbab41b684b3c1bb2c36d3984509ae01e518b0
| |   @@ -435,7 +435,7 @@ gaim_connection_error(GaimConnection *gc
| |    
| |    	g_return_if_fail(gc   != NULL);
| |    
| |   -	if (text != NULL) {
| |   +	if (text == NULL) {
| |    		g_critical("gaim_connection_error: check `text != NULL' failed");
| |    		text = _("Unknown error");
| |    	}
| |   ============================================================
| |   --- libpurple/dnsquery.c	8407b073a205170e5140c1908471063d8603d6b2
| |   +++ libpurple/dnsquery.c	6a1e86091b13194c9bb591f9793801b23ad2c256
| |   @@ -758,7 +758,7 @@ resolve_host(gpointer data)
| |    		{
| |    			char message[1024];
| |    			g_snprintf(message, sizeof(message), _("Thread creation failure: %s"),
| |   -					err ? err->message : _("Unknown reason"));
| |   +					(err && err->message) ? err->message : _("Unknown reason"));
| |    			g_error_free(err);
| |    			gaim_dnsquery_failed(query_data, message);
| |    		}
| |   ============================================================
| |   --- libpurple/dnssrv.c	7278cff6e7a0c4991fc0199e472ca0fe8a03a801
| |   +++ libpurple/dnssrv.c	22b6fe225cb519f86de90d62d8017df534ae0295
| |   @@ -110,7 +110,7 @@ resolve(int in, int out)
| |    #ifdef HAVE_SIGNAL_H
| |    	gaim_restore_default_signal_handlers();
| |    #endif
| |   -	
| |   +
| |    	if (read(in, query, 256) <= 0)
| |    		_exit(0);
| |    
| |   @@ -222,9 +222,9 @@ res_main_thread_cb(gpointer data)
| |    		GaimSrvResponse *srvres_tmp = NULL;
| |    		GSList *lst = query_data->results;
| |    
| |   -		size = g_slist_length(query_data->results);
| |   +		size = g_slist_length(lst);
| |    
| |   -		if(query_data->cb)
| |   +		if(query_data->cb && size > 0)
| |    			srvres_tmp = srvres = g_new0(GaimSrvResponse, size);
| |    		while (lst) {
| |    			if(query_data->cb)
| |   @@ -234,9 +234,9 @@ res_main_thread_cb(gpointer data)
| |    		}
| |    
| |    		query_data->results = NULL;
| |   -	}
| |    
| |   -	gaim_debug_info("dnssrv", "found %d SRV entries\n", size);
| |   +		gaim_debug_info("dnssrv", "found %d SRV entries\n", size);
| |   +	}
| |    
| |    	if(query_data->cb)
| |    		query_data->cb(srvres, size, query_data->extradata);
| |   @@ -367,29 +367,22 @@ gaim_srv_resolve(const char *protocol, c
| |    	query_data->query = query;
| |    	query_data->extradata = extradata;
| |    
| |   -	if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree) {
| |   -		query_data->error_message = g_strdup_printf("System missing DNS API (Requires W2K+)\n");
| |   -
| |   -		/* Asynchronously call the callback since stuff may not expect
| |   -		 * the callback to be called before this returns */
| |   -		query_data->handle = g_idle_add(res_main_thread_cb, query_data);
| |   -
| |   -		return query_data;
| |   +	if (!MyDnsQuery_UTF8 || !MyDnsRecordListFree)
| |   +		query_data->error_message = g_strdup("System missing DNS API (Requires W2K+)\n");
| |   +	else {
| |   +		query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
| |   +		if (query_data->resolver == NULL) {
| |   +			query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", (err && err->message) ? err->message : "");
| |   +			g_error_free(err);
| |   +		}
| |    	}
| |    
| |   -	query_data->resolver = g_thread_create(res_thread, query_data, FALSE, &err);
| |   -	if (query_data->resolver == NULL)
| |   -	{
| |   -		query_data->error_message = g_strdup_printf("SRV thread create failure: %s\n", err ? err->message : "");
| |   -		g_error_free(err);
| |   -
| |   -		/* Asynchronously call the callback since stuff may not expect
| |   -		 * the callback to be called before this returns */
| |   +	/* The query isn't going to happen, so finish the SRV lookup now.
| |   +	 * Asynchronously call the callback since stuff may not expect
| |   +	 * the callback to be called before this returns */
| |   +	if (query_data->error_message != NULL)
| |    		query_data->handle = g_idle_add(res_main_thread_cb, query_data);
| |    
| |   -		return query_data;
| |   -	}
| |   -
| |    	return query_data;
| |    #endif
| |    }
| |   ============================================================
| |   --- pidgin/gtkdebug.c	42fcf8fbe50b1df4ec6bfec89248eab53c819ec1
| |   +++ pidgin/gtkdebug.c	bd2e4009284a26d1fadee0da11a164c2bf9f6574
| |   @@ -904,7 +904,7 @@ static void
| |    }
| |    
| |    static void
| |   -gaim_glib_log_handler(const gchar *domain, GLogLevelFlags flags,
| |   +pidgin_glib_log_handler(const gchar *domain, GLogLevelFlags flags,
| |    					  const gchar *msg, gpointer user_data)
| |    {
| |    	GaimDebugLevel level;
| |   @@ -950,7 +950,7 @@ static void
| |    
| |    #ifdef _WIN32
| |    static void
| |   -gaim_glib_dummy_print_handler(const gchar *string)
| |   +pidgin_glib_dummy_print_handler(const gchar *string)
| |    {
| |    }
| |    #endif
| |   @@ -991,7 +991,7 @@ pidgin_debug_init(void)
| |    #define REGISTER_G_LOG_HANDLER(name) \
| |    	g_log_set_handler((name), G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL \
| |    					  | G_LOG_FLAG_RECURSION, \
| |   -					  gaim_glib_log_handler, NULL)
| |   +					  pidgin_glib_log_handler, NULL)
| |    
| |    	/* Register the glib/gtk log handlers. */
| |    	REGISTER_G_LOG_HANDLER(NULL);
| |   @@ -1005,7 +1005,7 @@ pidgin_debug_init(void)
| |    
| |    #ifdef _WIN32
| |    	if (!gaim_debug_is_enabled())
| |   -		g_set_print_handler(gaim_glib_dummy_print_handler);
| |   +		g_set_print_handler(pidgin_glib_dummy_print_handler);
| |    #endif
| |    }
| |    
| |   ============================================================
| |   --- pidgin/gtknotify.c	544d288fa8a6c525882f5e7e3e83791a3c2d515f
| |   +++ pidgin/gtknotify.c	b67dd36f8be47b29b06cda599240e52df40aa94c
| |   @@ -67,15 +67,15 @@ enum
| |    
| |    enum
| |    {
| |   -	GAIM_MAIL_ICON,
| |   -	GAIM_MAIL_TEXT,
| |   -	GAIM_MAIL_DATA,
| |   -	COLUMNS_GAIM_MAIL
| |   +	PIDGIN_MAIL_ICON,
| |   +	PIDGIN_MAIL_TEXT,
| |   +	PIDGIN_MAIL_DATA,
| |   +	COLUMNS_PIDGIN_MAIL
| |    };
| |    
| |   -typedef struct _GaimMailDialog GaimMailDialog;
| |   +typedef struct _PidginMailDialog PidginMailDialog;
| |    
| |   -struct _GaimMailDialog
| |   +struct _PidginMailDialog
| |    {
| |    	GtkWidget *dialog;
| |    	GtkWidget *treeview;
| |   @@ -86,7 +86,7 @@ struct _GaimMailDialog
| |    	gboolean in_use;
| |    };
| |    
| |   -static GaimMailDialog *mail_dialog = NULL;
| |   +static PidginMailDialog *mail_dialog = NULL;
| |    
| |    static void *pidgin_notify_emails(GaimConnection *gc, size_t count, gboolean detailed,
| |    									const char **subjects,
| |   @@ -100,7 +100,7 @@ static void
| |    }
| |    
| |    static void
| |   -email_response_cb(GtkDialog *dlg, gint id, GaimMailDialog *dialog)
| |   +email_response_cb(GtkDialog *dlg, gint id, PidginMailDialog *dialog)
| |    {
| |    	GaimNotifyMailData *data = NULL;
| |    	GtkTreeIter iter;
| |   @@ -114,7 +114,7 @@ email_response_cb(GtkDialog *dlg, gint i
| |    		if (gtk_tree_selection_get_selected(selection, NULL, &iter))
| |    		{
| |    			gtk_tree_model_get(GTK_TREE_MODEL(dialog->treemodel), &iter,
| |   -								GAIM_MAIL_DATA, &data, -1);
| |   +								PIDGIN_MAIL_DATA, &data, -1);
| |    			gaim_notify_uri(NULL, data->url);
| |    
| |    			gtk_tree_store_remove(dialog->treemodel, &iter);
| |   @@ -131,7 +131,7 @@ email_response_cb(GtkDialog *dlg, gint i
| |    		while (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(mail_dialog->treemodel), &iter))
| |    		{
| |    			gtk_tree_model_get(GTK_TREE_MODEL(dialog->treemodel), &iter,
| |   -								GAIM_MAIL_DATA, &data, -1);
| |   +								PIDGIN_MAIL_DATA, &data, -1);
| |    
| |    			if (id == GTK_RESPONSE_ACCEPT)
| |    				gaim_notify_uri(NULL, data->url);
| |   @@ -277,7 +277,7 @@ static void
| |    }
| |    
| |    static void
| |   -selection_changed_cb(GtkTreeSelection *sel, GaimMailDialog *dialog)
| |   +selection_changed_cb(GtkTreeSelection *sel, PidginMailDialog *dialog)
| |    {
| |    	GtkTreeIter iter;
| |    	GtkTreeModel *model;
| |   @@ -288,7 +288,7 @@ selection_changed_cb(GtkTreeSelection *s
| |    		active = FALSE;
| |    	else
| |    	{
| |   -		gtk_tree_model_get(model, &iter, GAIM_MAIL_DATA, &data, -1);
| |   +		gtk_tree_model_get(model, &iter, PIDGIN_MAIL_DATA, &data, -1);
| |    		if (data->url == NULL)
| |    			active = FALSE;
| |    	}
| |   @@ -355,14 +355,14 @@ pidgin_get_mail_dialog()
| |    		gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(sw), GTK_SHADOW_IN);
| |    		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
| |    
| |   -		mail_dialog = g_new0(GaimMailDialog, 1);
| |   +		mail_dialog = g_new0(PidginMailDialog, 1);
| |    		mail_dialog->dialog = dialog;
| |    		mail_dialog->open_button = button;
| |    
| |   -		mail_dialog->treemodel = gtk_tree_store_new(COLUMNS_GAIM_MAIL,
| |   +		mail_dialog->treemodel = gtk_tree_store_new(COLUMNS_PIDGIN_MAIL,
| |    						GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_POINTER);
| |    		mail_dialog->treeview = gtk_tree_view_new_with_model(GTK_TREE_MODEL(mail_dialog->treemodel));
| |   -		gtk_tree_view_set_search_column(GTK_TREE_VIEW(mail_dialog->treeview), GAIM_MAIL_TEXT);
| |   +		gtk_tree_view_set_search_column(GTK_TREE_VIEW(mail_dialog->treeview), PIDGIN_MAIL_TEXT);
| |    		gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(mail_dialog->treeview),
| |    			             pidgin_tree_view_search_equal_func, NULL, NULL);
| |    
| |   @@ -379,10 +379,10 @@ pidgin_get_mail_dialog()
| |    		gtk_tree_view_column_set_resizable(column, TRUE);
| |    		rend = gtk_cell_renderer_pixbuf_new();
| |    		gtk_tree_view_column_pack_start(column, rend, FALSE);
| |   -		gtk_tree_view_column_set_attributes(column, rend, "pixbuf", GAIM_MAIL_ICON, NULL);
| |   +		gtk_tree_view_column_set_attributes(column, rend, "pixbuf", PIDGIN_MAIL_ICON, NULL);
| |    		rend = gtk_cell_renderer_text_new();
| |    		gtk_tree_view_column_pack_start(column, rend, TRUE);
| |   -		gtk_tree_view_column_set_attributes(column, rend, "markup", GAIM_MAIL_TEXT, NULL);
| |   +		gtk_tree_view_column_set_attributes(column, rend, "markup", PIDGIN_MAIL_TEXT, NULL);
| |    		gtk_tree_view_append_column(GTK_TREE_VIEW(mail_dialog->treeview), column);
| |    
| |    		label = gtk_label_new(NULL);
| |   @@ -414,7 +414,7 @@ pidgin_notify_add_mail(GtkTreeStore *tre
| |    		if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(treemodel), &iter)) {
| |    			do {
| |    				gtk_tree_model_get(GTK_TREE_MODEL(treemodel), &iter,
| |   -						GAIM_MAIL_DATA, &data, -1);
| |   +						PIDGIN_MAIL_DATA, &data, -1);
| |    				if (data->account == account && data->count > 0) {
| |    					new_n = FALSE;
| |    					g_free(data->url);
| |   @@ -435,15 +435,15 @@ pidgin_notify_add_mail(GtkTreeStore *tre
| |    		data->url = g_strdup(url);
| |    
| |    	gtk_tree_store_set(treemodel, &iter,
| |   -								GAIM_MAIL_ICON, icon,
| |   -								GAIM_MAIL_TEXT, notification,
| |   -								GAIM_MAIL_DATA, data,
| |   +								PIDGIN_MAIL_ICON, icon,
| |   +								PIDGIN_MAIL_TEXT, notification,
| |   +								PIDGIN_MAIL_DATA, data,
| |    								-1);
| |    	data->iter = iter;              /* XXX: Do we use this for something? */
| |    	data->account = account;
| |    	data->count = count;
| |    	gtk_tree_model_get(GTK_TREE_MODEL(treemodel), &iter,
| |   -						GAIM_MAIL_DATA, &data, -1);
| |   +						PIDGIN_MAIL_DATA, &data, -1);
| |    	if (icon)
| |    		g_object_unref(icon);
| |    	return data;
| |   ============================================================
| |   --- pidgin/gtkplugin.c	3af0ee745cdf1a6b8b36d36d4ae4989eb7645306
| |   +++ pidgin/gtkplugin.c	99f0bdc1dbcee5150a3196e4bc74b34a8143a259
| |   @@ -33,7 +33,7 @@
| |    
| |    #include <string.h>
| |    
| |   -#define GAIM_RESPONSE_CONFIGURE 98121
| |   +#define PIDGIN_RESPONSE_CONFIGURE 98121
| |    
| |    static void plugin_toggled_stage_two(GaimPlugin *plug, GtkTreeModel *model,
| |                                      GtkTreeIter *iter, gboolean unload);
| |   @@ -455,7 +455,7 @@ static void plugin_dialog_response_cb(Gt
| |    		}
| |    		plugin_dialog = NULL;
| |    		break;
| |   -	case GAIM_RESPONSE_CONFIGURE:
| |   +	case PIDGIN_RESPONSE_CONFIGURE:
| |    		if (! gtk_tree_selection_get_selected (sel, &model, &iter))
| |    			return;
| |    		val.g_type = 0;
| |   @@ -508,7 +508,7 @@ show_plugin_prefs_cb(GtkTreeView *view, 
| |    		return;
| |    
| |    	/* Now show the pref-dialog for the plugin */
| |   -	plugin_dialog_response_cb(dialog, GAIM_RESPONSE_CONFIGURE, sel);
| |   +	plugin_dialog_response_cb(dialog, PIDGIN_RESPONSE_CONFIGURE, sel);
| |    }
| |    
| |    void pidgin_plugin_dialog_show()
| |   @@ -530,7 +530,7 @@ void pidgin_plugin_dialog_show()
| |    						    GTK_DIALOG_NO_SEPARATOR,
| |    						    NULL);
| |    	pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
| |   -						_("Configure Pl_ugin"), GAIM_RESPONSE_CONFIGURE);
| |   +						_("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
| |    	gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
| |    						GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
| |    	gtk_widget_set_sensitive(pref_button, FALSE);
| |   ============================================================
| |   --- pidgin/gtkprefs.c	48e509e65945fb7a0c3abf6f7131fe51aeb95ad9
| |   +++ pidgin/gtkprefs.c	e08602bf577acc5e76282fce697fb6e411eb206d
| |   @@ -585,7 +585,7 @@ theme_dnd_recv(GtkWidget *widget, GdkDra
| |    }
| |    
| |    /* Does same as normal sort, except "none" is sorted first */
| |   -static gint gaim_sort_smileys (GtkTreeModel	*model,
| |   +static gint pidgin_sort_smileys (GtkTreeModel	*model,
| |    						GtkTreeIter		*a,
| |    						GtkTreeIter		*b,
| |    						gpointer		userdata)
| |   @@ -665,7 +665,7 @@ theme_page()
| |    
| |    	/* Custom sort so "none" theme is at top of list */
| |    	gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(smiley_theme_store),
| |   -									3, gaim_sort_smileys, NULL, NULL);
| |   +									3, pidgin_sort_smileys, NULL, NULL);
| |    
| |    	gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(smiley_theme_store),
| |    										 3, GTK_SORT_ASCENDING);
| |   ============================================================
| |   --- pidgin/gtksound.c	7b8584f952e72d7b30699766638dad2037da13f0
| |   +++ pidgin/gtksound.c	e83c6ab74098cf4c2d40555794c6bd715e6c304b
| |   @@ -44,7 +44,7 @@
| |    #include "gtkconv.h"
| |    #include "gtksound.h"
| |    
| |   -struct gaim_sound_event {
| |   +struct pidgin_sound_event {
| |    	char *label;
| |    	char *pref;
| |    	char *def;
| |   @@ -59,7 +59,7 @@ static gboolean gst_init_failed;
| |    static gboolean gst_init_failed;
| |    #endif /* USE_GSTREAMER */
| |    
| |   -static struct gaim_sound_event sounds[GAIM_NUM_SOUNDS] = {
| |   +static struct pidgin_sound_event sounds[GAIM_NUM_SOUNDS] = {
| |    	{N_("Buddy logs in"), "login", "login.wav"},
| |    	{N_("Buddy logs out"), "logout", "logout.wav"},
| |    	{N_("Message received"), "im_recv", "receive.wav"},
| |   ============================================================
| |   --- po/POTFILES.in	fc291765cf57b807a21a0088fcfb4c0af060f737
| |   +++ po/POTFILES.in	5e3c279a4a172c38f30bd0c87a49a0b2adfeadc4
| |   @@ -1,33 +1,33 @@ pidgin.desktop.in
| |    pidgin.desktop.in
| |   -console/gntaccount.c
| |   -console/gntblist.c
| |   -console/gntconn.c
| |   -console/gntconv.c
| |   -console/gntdebug.c
| |   -console/gntgaim.c
| |   -console/gntnotify.c
| |   -console/gntplugin.c
| |   -console/gntprefs.c
| |   -console/gntrequest.c
| |   -console/gntstatus.c
| |   -console/gntui.c
| |   -console/libgnt/gntbox.c
| |   -console/libgnt/gntbutton.c
| |   -console/libgnt/gntcheckbox.c
| |   -console/libgnt/gntcolors.c
| |   -console/libgnt/gntcombobox.c
| |   -console/libgnt/gntentry.c
| |   -console/libgnt/gntkeys.c
| |   -console/libgnt/gntlabel.c
| |   -console/libgnt/gntline.c
| |   -console/libgnt/gntstyle.c
| |   -console/libgnt/gnttextview.c
| |   -console/libgnt/gnttree.c
| |   -console/libgnt/gntutils.c
| |   -console/libgnt/gntwidget.c
| |   -console/plugins/gntgf.c
| |   -console/plugins/gnthistory.c
| |   -console/plugins/lastlog.c
| |   +finch/gntaccount.c
| |   +finch/gntblist.c
| |   +finch/gntconn.c
| |   +finch/gntconv.c
| |   +finch/gntdebug.c
| |   +finch/gntgaim.c
| |   +finch/gntnotify.c
| |   +finch/gntplugin.c
| |   +finch/gntprefs.c
| |   +finch/gntrequest.c
| |   +finch/gntstatus.c
| |   +finch/gntui.c
| |   +finch/libgnt/gntbox.c
| |   +finch/libgnt/gntbutton.c
| |   +finch/libgnt/gntcheckbox.c
| |   +finch/libgnt/gntcolors.c
| |   +finch/libgnt/gntcombobox.c
| |   +finch/libgnt/gntentry.c
| |   +finch/libgnt/gntkeys.c
| |   +finch/libgnt/gntlabel.c
| |   +finch/libgnt/gntline.c
| |   +finch/libgnt/gntstyle.c
| |   +finch/libgnt/gnttextview.c
| |   +finch/libgnt/gnttree.c
| |   +finch/libgnt/gntutils.c
| |   +finch/libgnt/gntwidget.c
| |   +finch/plugins/gntgf.c
| |   +finch/plugins/gnthistory.c
| |   +finch/plugins/lastlog.c
| |    pidgin/eggtrayicon.c
| |    pidgin/gaimcombobox.c
| |    pidgin/gaimstock.c

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from c9fdf2f3b93c3b83a38391080a042c1c115eaabc


More information about the Commits mailing list