aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-15 06:46:26 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:49:57 +0800
commit0a96c62150fe235167c291ead9a4f180fd80109e (patch)
tree3420dd852451992e710efa227beb5f63e4fe5cc6 /src/empathy.c
parent997c9dabb5fd8ea6631a37a80576d312b0da56d5 (diff)
downloadgsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.gz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.bz2
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.lz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.xz
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.tar.zst
gsoc2013-empathy-0a96c62150fe235167c291ead9a4f180fd80109e.zip
Handle construction errors
Handle errors that may arise when constructing the handler from the factory.
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/empathy.c b/src/empathy.c
index ffdb97949..3bed5ce7a 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -407,17 +407,27 @@ show_version_cb (const char *option_name,
static void
new_incoming_transfer_cb (EmpathyFTFactory *factory,
EmpathyFTHandler *handler,
+ GError *error,
gpointer user_data)
{
- empathy_receive_file_with_file_chooser (handler);
+ if (error) {
+ empathy_ft_manager_display_error (handler, error);
+ } else {
+ empathy_receive_file_with_file_chooser (handler);
+ }
}
static void
new_ft_handler_cb (EmpathyFTFactory *factory,
EmpathyFTHandler *handler,
+ GError *error,
gpointer user_data)
{
- empathy_ft_manager_add_handler (handler);
+ if (error) {
+ empathy_ft_manager_display_error (handler, error);
+ } else {
+ empathy_ft_manager_add_handler (handler);
+ }
g_object_unref (handler);
}