diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:20:57 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-11-22 00:20:57 +0800 |
commit | dc95d64cc9cc83a2e499d667bad90e99c33dcf5e (patch) | |
tree | 3f90d87aaf6da6aad49211d0b4c388db8e5316a8 /libempathy-gtk/empathy-ft-manager.c | |
parent | c4acf2126b82dc13002c33989ed39b5f0065ec1a (diff) | |
download | gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.gz gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.bz2 gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.lz gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.xz gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.zst gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.zip |
Implement latest ft draft
svn path=/trunk/; revision=1849
Diffstat (limited to 'libempathy-gtk/empathy-ft-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-ft-manager.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-ft-manager.c b/libempathy-gtk/empathy-ft-manager.c index 9064a518d..e9b8bd510 100644 --- a/libempathy-gtk/empathy-ft-manager.c +++ b/libempathy-gtk/empathy-ft-manager.c @@ -245,6 +245,7 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, gint percent; EmpFileTransferState state; EmpFileTransferStateChangeReason reason; + gboolean incoming; row_ref = ft_manager_get_row_from_tp_file (ft_manager, tp_file); g_return_if_fail (row_ref != NULL); @@ -255,15 +256,14 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, total_size = empathy_tp_file_get_size (tp_file); state = empathy_tp_file_get_state (tp_file); reason = empathy_tp_file_get_state_change_reason (tp_file); + incoming = empathy_tp_file_get_incoming (tp_file); switch (state) { - case EMP_FILE_TRANSFER_STATE_LOCAL_PENDING: - case EMP_FILE_TRANSFER_STATE_REMOTE_PENDING: + case EMP_FILE_TRANSFER_STATE_PENDING: case EMP_FILE_TRANSFER_STATE_OPEN: case EMP_FILE_TRANSFER_STATE_ACCEPTED: - case EMP_FILE_TRANSFER_STATE_NOT_OFFERED: - if (empathy_tp_file_get_incoming (tp_file)) + if (incoming) /* translators: first %s is filename, second %s is the contact name */ first_line_format = _("Receiving \"%s\" from %s"); else @@ -273,8 +273,8 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, first_line = g_strdup_printf (first_line_format, filename, contact_name); if (state == EMP_FILE_TRANSFER_STATE_OPEN - || state == EMP_FILE_TRANSFER_STATE_ACCEPTED - || state == EMP_FILE_TRANSFER_STATE_LOCAL_PENDING) + || (incoming && state == EMP_FILE_TRANSFER_STATE_ACCEPTED) + || (incoming && state == EMP_FILE_TRANSFER_STATE_PENDING)) { gchar *total_size_str; gchar *transferred_bytes_str; @@ -297,8 +297,6 @@ ft_manager_update_ft_row (EmpathyFTManager *ft_manager, g_free (total_size_str); } - else if (state == EMP_FILE_TRANSFER_STATE_NOT_OFFERED) - second_line = g_strdup (_("File not yet offered")); else second_line = g_strdup (_("Waiting the other participant's response")); @@ -952,7 +950,8 @@ empathy_ft_manager_add_tp_file (EmpathyFTManager *ft_manager, state = empathy_tp_file_get_state (tp_file); - if (state == EMP_FILE_TRANSFER_STATE_LOCAL_PENDING) + if (state == EMP_FILE_TRANSFER_STATE_PENDING && + empathy_tp_file_get_incoming (tp_file)) ft_manager_display_accept_dialog (ft_manager, tp_file); else ft_manager_add_tp_file_to_list (ft_manager, tp_file); |