aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ft-manager.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2008-11-22 00:15:25 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:15:25 +0800
commit93085e517cbf81134ecba835db3fd2b7821e262e (patch)
tree7d0a7a4f2be977ab23425b64f701141e7b28cbad /libempathy-gtk/empathy-ft-manager.c
parented1625139eab107417d964573bdc5cd1243964d9 (diff)
downloadgsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar.gz
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar.bz2
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar.lz
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar.xz
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.tar.zst
gsoc2013-empathy-93085e517cbf81134ecba835db3fd2b7821e262e.zip
Display cancel reasons in the file transfer manager. (Jonny Lamb)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk> svn path=/trunk/; revision=1762
Diffstat (limited to 'libempathy-gtk/empathy-ft-manager.c')
-rw-r--r--libempathy-gtk/empathy-ft-manager.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c
index daf38fc88..886a4a1dc 100644
--- a/libempathy-gtk/empathy-ft-manager.c
+++ b/libempathy-gtk/empathy-ft-manager.c
@@ -298,7 +298,7 @@ update_buttons (EmpathyFTManager *ft_manager)
gtk_widget_set_sensitive (priv->abort_button, abort_enabled);
}
-/*static const gchar *
+static const gchar *
get_state_change_reason_description (EmpFileTransferStateChangeReason reason)
{
switch (reason) {
@@ -315,7 +315,7 @@ get_state_change_reason_description (EmpFileTransferStateChangeReason reason)
default:
g_return_val_if_reached ("");
}
-}*/
+}
static void
update_ft_row (EmpathyFTManager *ft_manager,
@@ -337,6 +337,7 @@ update_ft_row (EmpathyFTManager *ft_manager,
gint remaining = -1;
gint percent;
EmpFileTransferState state;
+ EmpFileTransferStateChangeReason reason;
priv = GET_PRIV (ft_manager);
@@ -348,6 +349,7 @@ update_ft_row (EmpathyFTManager *ft_manager,
transferred_bytes = empathy_file_get_transferred_bytes (file);
total_size = empathy_file_get_size (file);
state = empathy_file_get_state (file);
+ reason = empathy_file_get_state_change_reason (file);
/* The state is changed asynchronously, so we can get local pending
* transfers just before their state is changed to open.
@@ -426,7 +428,8 @@ update_ft_row (EmpathyFTManager *ft_manager,
first_line = g_strdup_printf (
_("\"%s\" sending to %s"), filename,
contact_name);
- second_line = g_strdup ("File transfer cancelled");
+ second_line = g_strdup_printf (_("File transfer canceled: %s"),
+ get_state_change_reason_description (reason));
break;
default: