* Output the account username instead of the display name in an error message
that causes the tests to fail because the account has no connection.
* Move all `g_assert_no_error` checks **BEFORE** we check the any other results
that we're checking. If we're not supposed to get an error and we have one,
that error helps us find the issue which therefore makes unit test failures
actionable instead of a message to debug.
Testing Done:
Compiled and made sure the tests pass.
Reviewed at https://reviews.imfreedom.org/r/326/
/* pidgin
*
* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*
*/
#ifdef HAVE_CONFIG_H
#include<config.h>
#endif
#include<glib/gi18n-lib.h>
#include<glib/gstdio.h>
#define BUF_LONG (4096)
#ifdef HAVE_X11
#include<X11/Xlib.h>
#endif
#include<gdk/gdkkeysyms.h>
#include<talkatu.h>
#include<purple.h>
#include<math.h>
#include"gtkdnd-hints.h"
#include"gtkblist.h"
#include"gtkconv.h"
#include"gtkconvwin.h"
#include"gtkdialogs.h"
#include"gtkprefs.h"
#include"gtkprivacy.h"
#include"gtkutils.h"
#include"pidginclosebutton.h"
#include"pidginconversationwindow.h"
#include"pidgincore.h"
#include"pidgingdkpixbuf.h"
#include"pidgininvitedialog.h"
#include"pidginlog.h"
#include"pidginmenutray.h"
#include"pidginmessage.h"
#include"pidginpresenceicon.h"
#include"pidginstock.h"
#include"pidginstyle.h"
#include"pidgintooltip.h"
#include"pidginwindow.h"
#include"gtknickcolors.h"
#define GTK_TOOLTIPS_VAR gtkconv->tooltips
#define ADD_MESSAGE_HISTORY_AT_ONCE 100
/*
* A GTK+ Instant Message pane.
*/
struct_PidginImPane
{
GtkWidget*block;
GtkWidget*send_file;
GtkWidget*sep1;
GtkWidget*sep2;
GtkWidget*check;
GtkWidget*progress;
guint32typing_timer;
/* Buddy icon stuff */
GtkWidget*icon_container;
GtkWidget*icon;
gbooleanshow_icon;
gbooleananimate;
GdkPixbufAnimation*anim;
GdkPixbufAnimationIter*iter;
guint32icon_timer;
};
/*
* GTK+ Chat panes.
*/
struct_PidginChatPane
{
GtkWidget*count;
GtkWidget*list;
GtkWidget*topic_text;
};
#define CLOSE_CONV_TIMEOUT_SECS (10 * 60)
#define AUTO_RESPONSE "<AUTO-REPLY> : "
typedefenum
{
PIDGIN_CONV_SET_TITLE=1<<0,
PIDGIN_CONV_BUDDY_ICON=1<<1,
PIDGIN_CONV_MENU=1<<2,
PIDGIN_CONV_TAB_ICON=1<<3,
PIDGIN_CONV_TOPIC=1<<4,
PIDGIN_CONV_SMILEY_THEME=1<<5,
PIDGIN_CONV_COLORIZE_TITLE=1<<6,
}PidginConvFields;
enum{
CONV_ICON_COLUMN,
CONV_TEXT_COLUMN,
CONV_EMBLEM_COLUMN,
CONV_PROTOCOL_ICON_COLUMN,
CONV_NUM_COLUMNS
}PidginInfopaneColumns;
#define PIDGIN_CONV_ALL ((1 << 7) - 1)
/* XXX: These color defines shouldn't really be here. But the nick-color
* generation algorithm uses them, so keeping these around until we fix that. */
#define DEFAULT_SEND_COLOR "#204a87"
#define DEFAULT_HIGHLIGHT_COLOR "#AF7F00"
#define BUDDYICON_SIZE_MIN 32
#define BUDDYICON_SIZE_MAX 96
#define MIN_LUMINANCE_CONTRAST_RATIO 4.5
#define NICK_COLOR_GENERATE_COUNT 220
staticGArray*generated_nick_colors=NULL;
/* These probably won't conflict with any WebKit values. */
#define PIDGIN_DRAG_BLIST_NODE (1337)
#define PIDGIN_DRAG_IM_CONTACT (31337)
staticGtkWidget*invite_dialog=NULL;
staticGtkWidget*warn_close_dialog=NULL;
staticPidginConvWindow*hidden_convwin=NULL;
staticGList*window_list=NULL;
/* Lists of status icons at all available sizes for use as window icons */