aboutsummaryrefslogtreecommitdiff
path: root/src/ui/send_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/send_file.c')
-rw-r--r--src/ui/send_file.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/send_file.c b/src/ui/send_file.c
index d998e24..42c5584 100644
--- a/src/ui/send_file.c
+++ b/src/ui/send_file.c
@@ -85,17 +85,16 @@ handle_send_button_click(GtkButton *button,
85 UI_CHAT_ENTRY_Handle *entry = GNUNET_CHAT_context_get_user_pointer(context); 85 UI_CHAT_ENTRY_Handle *entry = GNUNET_CHAT_context_get_user_pointer(context);
86 UI_CHAT_Handle *handle = entry? entry->chat : NULL; 86 UI_CHAT_Handle *handle = entry? entry->chat : NULL;
87 87
88 UI_FILE_LOAD_ENTRY_Handle *file_load = NULL;
88 struct GNUNET_CHAT_File *file = NULL; 89 struct GNUNET_CHAT_File *file = NULL;
89 90
90 if ((context) && (handle)) 91 if ((context) && (handle))
91 { 92 {
92 UI_FILE_LOAD_ENTRY_Handle *file_load = ui_file_load_entry_new(app); 93 file_load = ui_file_load_entry_new(app);
93 94
94 gtk_label_set_text(file_load->file_label, filename); 95 gtk_label_set_text(file_load->file_label, filename);
95 gtk_progress_bar_set_fraction(file_load->load_progress_bar, 0.0); 96 gtk_progress_bar_set_fraction(file_load->load_progress_bar, 0.0);
96 97
97 ui_chat_add_file_load(handle, file_load);
98
99 file = GNUNET_CHAT_context_send_file( 98 file = GNUNET_CHAT_context_send_file(
100 context, 99 context,
101 filename, 100 filename,
@@ -109,11 +108,16 @@ handle_send_button_click(GtkButton *button,
109 gtk_window_close(GTK_WINDOW(app->ui.send_file.dialog)); 108 gtk_window_close(GTK_WINDOW(app->ui.send_file.dialog));
110 109
111 if (!file) 110 if (!file)
111 {
112 if (file_load)
113 ui_file_load_entry_delete(file_load);
114
112 return; 115 return;
116 }
113 117
114 file_create_info(file); 118 file_create_info(file);
115 119
116 // TODO: create UI component? 120 ui_chat_add_file_load(handle, file_load);
117} 121}
118 122
119static void 123static void