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.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/ui/send_file.c b/src/ui/send_file.c
index 2d3f4a6..0d0c04b 100644
--- a/src/ui/send_file.c
+++ b/src/ui/send_file.c
@@ -35,6 +35,15 @@ handle_cancel_button_click(UNUSED GtkButton *button,
35} 35}
36 36
37static void 37static void
38handle_sending_upload_file(UNUSED void *cls,
39 UNUSED const struct GNUNET_CHAT_File *file,
40 uint64_t completed,
41 uint64_t size)
42{
43 printf("UPLOAD: %lu / %lu\n", completed, size);
44}
45
46static void
38handle_send_button_click(GtkButton *button, 47handle_send_button_click(GtkButton *button,
39 gpointer user_data) 48 gpointer user_data)
40{ 49{
@@ -59,9 +68,16 @@ handle_send_button_click(GtkButton *button,
59 ); 68 );
60 69
61 if (context) 70 if (context)
62 GNUNET_CHAT_context_send_file(context, filename, NULL, NULL); // TODO: callbacks! 71 GNUNET_CHAT_context_send_file(
72 context,
73 filename,
74 handle_sending_upload_file,
75 NULL
76 );
63 77
64 g_free(filename); 78 g_free(filename);
79
80 gtk_window_close(GTK_WINDOW(app->ui.send_file.dialog));
65} 81}
66 82
67static void 83static void