aboutsummaryrefslogtreecommitdiff
path: root/src/ui/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/chat.c')
-rw-r--r--src/ui/chat.c85
1 files changed, 77 insertions, 8 deletions
diff --git a/src/ui/chat.c b/src/ui/chat.c
index a7eddeb..97a30ab 100644
--- a/src/ui/chat.c
+++ b/src/ui/chat.c
@@ -38,13 +38,14 @@
38#include "delete_messages.h" 38#include "delete_messages.h"
39 39
40#include "../application.h" 40#include "../application.h"
41#include "../contact.h"
42#include "../file.h" 41#include "../file.h"
43#include "../ui.h" 42#include "../ui.h"
44 43
45static gboolean 44static gboolean
46_flap_chat_details_reveal_switch(gpointer user_data) 45_flap_chat_details_reveal_switch(gpointer user_data)
47{ 46{
47 g_assert(user_data);
48
48 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 49 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
49 HdyFlap* flap = handle->flap_chat_details; 50 HdyFlap* flap = handle->flap_chat_details;
50 51
@@ -62,6 +63,8 @@ static void
62handle_chat_details_via_button_click(UNUSED GtkButton* button, 63handle_chat_details_via_button_click(UNUSED GtkButton* button,
63 gpointer user_data) 64 gpointer user_data)
64{ 65{
66 g_assert(user_data);
67
65 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 68 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
66 69
67 gtk_widget_set_sensitive(GTK_WIDGET(handle->messages_listbox), FALSE); 70 gtk_widget_set_sensitive(GTK_WIDGET(handle->messages_listbox), FALSE);
@@ -75,6 +78,8 @@ static void
75handle_popover_via_button_click(UNUSED GtkButton *button, 78handle_popover_via_button_click(UNUSED GtkButton *button,
76 gpointer user_data) 79 gpointer user_data)
77{ 80{
81 g_assert(user_data);
82
78 GtkPopover *popover = GTK_POPOVER(user_data); 83 GtkPopover *popover = GTK_POPOVER(user_data);
79 84
80 if (gtk_widget_is_visible(GTK_WIDGET(popover))) 85 if (gtk_widget_is_visible(GTK_WIDGET(popover)))
@@ -88,6 +93,8 @@ handle_chat_contacts_listbox_row_activated(GtkListBox *listbox,
88 GtkListBoxRow *row, 93 GtkListBoxRow *row,
89 gpointer user_data) 94 gpointer user_data)
90{ 95{
96 g_assert((listbox) && (row) && (user_data));
97
91 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 98 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
92 MESSENGER_Application *app = handle->app; 99 MESSENGER_Application *app = handle->app;
93 100
@@ -132,6 +139,8 @@ handle_chat_messages_listbox_size_allocate(UNUSED GtkWidget *widget,
132 UNUSED GdkRectangle *allocation, 139 UNUSED GdkRectangle *allocation,
133 gpointer user_data) 140 gpointer user_data)
134{ 141{
142 g_assert(user_data);
143
135 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 144 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
136 145
137 GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment( 146 GtkAdjustment *adjustment = gtk_scrolled_window_get_vadjustment(
@@ -154,6 +163,8 @@ static void
154handle_back_button_click(UNUSED GtkButton *button, 163handle_back_button_click(UNUSED GtkButton *button,
155 gpointer user_data) 164 gpointer user_data)
156{ 165{
166 g_assert(user_data);
167
157 HdyLeaflet *leaflet = HDY_LEAFLET(user_data); 168 HdyLeaflet *leaflet = HDY_LEAFLET(user_data);
158 169
159 GList *children = gtk_container_get_children(GTK_CONTAINER(leaflet)); 170 GList *children = gtk_container_get_children(GTK_CONTAINER(leaflet));
@@ -168,6 +179,8 @@ static void
168handle_reveal_identity_button_click(GtkButton *button, 179handle_reveal_identity_button_click(GtkButton *button,
169 gpointer user_data) 180 gpointer user_data)
170{ 181{
182 g_assert((button) && (user_data));
183
171 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 184 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
172 MESSENGER_Application *app = handle->app; 185 MESSENGER_Application *app = handle->app;
173 186
@@ -190,6 +203,8 @@ static void
190handle_block_button_click(UNUSED GtkButton *button, 203handle_block_button_click(UNUSED GtkButton *button,
191 gpointer user_data) 204 gpointer user_data)
192{ 205{
206 g_assert(user_data);
207
193 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 208 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
194 209
195 struct GNUNET_CHAT_Contact *contact = (struct GNUNET_CHAT_Contact*) ( 210 struct GNUNET_CHAT_Contact *contact = (struct GNUNET_CHAT_Contact*) (
@@ -208,6 +223,8 @@ static void
208handle_unblock_button_click(UNUSED GtkButton *button, 223handle_unblock_button_click(UNUSED GtkButton *button,
209 gpointer user_data) 224 gpointer user_data)
210{ 225{
226 g_assert(user_data);
227
211 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 228 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
212 229
213 struct GNUNET_CHAT_Contact *contact = (struct GNUNET_CHAT_Contact*) ( 230 struct GNUNET_CHAT_Contact *contact = (struct GNUNET_CHAT_Contact*) (
@@ -226,6 +243,8 @@ static void
226handle_leave_chat_button_click(UNUSED GtkButton *button, 243handle_leave_chat_button_click(UNUSED GtkButton *button,
227 gpointer user_data) 244 gpointer user_data)
228{ 245{
246 g_assert(user_data);
247
229 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 248 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
230 249
231 if ((!handle) || (!(handle->send_text_view))) 250 if ((!handle) || (!(handle->send_text_view)))
@@ -267,6 +286,8 @@ handle_chat_messages_sort(GtkListBoxRow* row0,
267 GtkListBoxRow* row1, 286 GtkListBoxRow* row1,
268 gpointer user_data) 287 gpointer user_data)
269{ 288{
289 g_assert((row0) && (row1) && (user_data));
290
270 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 291 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
271 292
272 UI_MESSAGE_Handle *message0 = (UI_MESSAGE_Handle*) ( 293 UI_MESSAGE_Handle *message0 = (UI_MESSAGE_Handle*) (
@@ -295,6 +316,8 @@ static void
295handle_chat_messages_selected_rows_changed(GtkListBox *listbox, 316handle_chat_messages_selected_rows_changed(GtkListBox *listbox,
296 gpointer user_data) 317 gpointer user_data)
297{ 318{
319 g_assert((listbox) && (user_data));
320
298 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 321 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
299 322
300 GList *selected = gtk_list_box_get_selected_rows(listbox); 323 GList *selected = gtk_list_box_get_selected_rows(listbox);
@@ -325,6 +348,8 @@ static void
325handle_chat_selection_close_button_click(UNUSED GtkButton *button, 348handle_chat_selection_close_button_click(UNUSED GtkButton *button,
326 gpointer user_data) 349 gpointer user_data)
327{ 350{
351 g_assert(user_data);
352
328 GtkListBox *listbox = GTK_LIST_BOX(user_data); 353 GtkListBox *listbox = GTK_LIST_BOX(user_data);
329 354
330 gtk_list_box_unselect_all(listbox); 355 gtk_list_box_unselect_all(listbox);
@@ -335,6 +360,8 @@ _delete_messages_callback(MESSENGER_Application *app,
335 GList *selected, 360 GList *selected,
336 gulong delay) 361 gulong delay)
337{ 362{
363 g_assert(app);
364
338 UI_MESSAGE_Handle *message; 365 UI_MESSAGE_Handle *message;
339 366
340 while (selected) 367 while (selected)
@@ -369,6 +396,8 @@ static void
369handle_chat_selection_delete_button_click(UNUSED GtkButton *button, 396handle_chat_selection_delete_button_click(UNUSED GtkButton *button,
370 gpointer user_data) 397 gpointer user_data)
371{ 398{
399 g_assert(user_data);
400
372 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 401 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
373 402
374 MESSENGER_Application *app = handle->app; 403 MESSENGER_Application *app = handle->app;
@@ -400,6 +429,8 @@ static void
400handle_attach_file_button_click(GtkButton *button, 429handle_attach_file_button_click(GtkButton *button,
401 gpointer user_data) 430 gpointer user_data)
402{ 431{
432 g_assert((button) && (user_data));
433
403 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 434 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
404 435
405 GtkTextView *text_view = GTK_TEXT_VIEW( 436 GtkTextView *text_view = GTK_TEXT_VIEW(
@@ -452,6 +483,8 @@ _update_send_record_symbol(GtkTextBuffer *buffer,
452 GtkImage *symbol, 483 GtkImage *symbol,
453 gboolean picker_revealed) 484 gboolean picker_revealed)
454{ 485{
486 g_assert((buffer) && (symbol));
487
455 GtkTextIter start, end; 488 GtkTextIter start, end;
456 gtk_text_buffer_get_start_iter(buffer, &start); 489 gtk_text_buffer_get_start_iter(buffer, &start);
457 gtk_text_buffer_get_end_iter(buffer, &end); 490 gtk_text_buffer_get_end_iter(buffer, &end);
@@ -473,6 +506,8 @@ static void
473handle_send_text_buffer_changed(GtkTextBuffer *buffer, 506handle_send_text_buffer_changed(GtkTextBuffer *buffer,
474 gpointer user_data) 507 gpointer user_data)
475{ 508{
509 g_assert((buffer) && (user_data));
510
476 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 511 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
477 512
478 _update_send_record_symbol( 513 _update_send_record_symbol(
@@ -488,6 +523,8 @@ _send_text_from_view(MESSENGER_Application *app,
488 GtkTextView *text_view, 523 GtkTextView *text_view,
489 gint64 action_time) 524 gint64 action_time)
490{ 525{
526 g_assert((app) && (handle) && (text_view));
527
491 GtkTextBuffer *buffer = gtk_text_view_get_buffer(text_view); 528 GtkTextBuffer *buffer = gtk_text_view_get_buffer(text_view);
492 529
493 GtkTextIter start, end; 530 GtkTextIter start, end;
@@ -523,6 +560,8 @@ _send_text_from_view(MESSENGER_Application *app,
523static void 560static void
524_drop_any_recording(UI_CHAT_Handle *handle) 561_drop_any_recording(UI_CHAT_Handle *handle)
525{ 562{
563 g_assert(handle);
564
526 if ((handle->play_pipeline) && (handle->playing)) 565 if ((handle->play_pipeline) && (handle->playing))
527 { 566 {
528 gst_element_set_state(handle->play_pipeline, GST_STATE_NULL); 567 gst_element_set_state(handle->play_pipeline, GST_STATE_NULL);
@@ -550,6 +589,8 @@ handle_sending_recording_upload_file(UNUSED void *cls,
550 uint64_t completed, 589 uint64_t completed,
551 uint64_t size) 590 uint64_t size)
552{ 591{
592 g_assert(file);
593
553 UI_FILE_LOAD_ENTRY_Handle *file_load = cls; 594 UI_FILE_LOAD_ENTRY_Handle *file_load = cls;
554 595
555 gtk_progress_bar_set_fraction( 596 gtk_progress_bar_set_fraction(
@@ -567,6 +608,8 @@ static void
567handle_send_record_button_click(GtkButton *button, 608handle_send_record_button_click(GtkButton *button,
568 gpointer user_data) 609 gpointer user_data)
569{ 610{
611 g_assert((button) && (user_data));
612
570 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 613 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
571 614
572 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) ( 615 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) (
@@ -620,6 +663,8 @@ static void
620handle_send_later_button_click(GtkButton *button, 663handle_send_later_button_click(GtkButton *button,
621 gpointer user_data) 664 gpointer user_data)
622{ 665{
666 g_assert((button) && (user_data));
667
623 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 668 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
624 669
625 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) ( 670 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) (
@@ -641,6 +686,8 @@ static void
641handle_send_now_button_click(GtkButton *button, 686handle_send_now_button_click(GtkButton *button,
642 gpointer user_data) 687 gpointer user_data)
643{ 688{
689 g_assert((button) && (user_data));
690
644 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 691 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
645 692
646 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) ( 693 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) (
@@ -665,6 +712,8 @@ handle_send_record_button_pressed(GtkWidget *widget,
665 UNUSED GdkEvent *event, 712 UNUSED GdkEvent *event,
666 gpointer user_data) 713 gpointer user_data)
667{ 714{
715 g_assert((widget) && (user_data));
716
668 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 717 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
669 718
670 GtkTextView *text_view = GTK_TEXT_VIEW( 719 GtkTextView *text_view = GTK_TEXT_VIEW(
@@ -747,6 +796,8 @@ handle_send_record_button_released(GtkWidget *widget,
747 UNUSED GdkEvent *event, 796 UNUSED GdkEvent *event,
748 gpointer user_data) 797 gpointer user_data)
749{ 798{
799 g_assert((widget) && (user_data));
800
750 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 801 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
751 802
752 GtkTextView *text_view = GTK_TEXT_VIEW( 803 GtkTextView *text_view = GTK_TEXT_VIEW(
@@ -799,6 +850,8 @@ handle_send_text_key_press (GtkWidget *widget,
799 GdkEventKey *event, 850 GdkEventKey *event,
800 gpointer user_data) 851 gpointer user_data)
801{ 852{
853 g_assert((widget) && (event) && (user_data));
854
802 MESSENGER_Application *app = (MESSENGER_Application*) user_data; 855 MESSENGER_Application *app = (MESSENGER_Application*) user_data;
803 856
804 if ((app->settings.mobile_design) || 857 if ((app->settings.mobile_design) ||
@@ -818,6 +871,8 @@ static void
818handle_recording_close_button_click(UNUSED GtkButton *button, 871handle_recording_close_button_click(UNUSED GtkButton *button,
819 gpointer user_data) 872 gpointer user_data)
820{ 873{
874 g_assert(user_data);
875
821 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 876 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
822 877
823 _drop_any_recording(handle); 878 _drop_any_recording(handle);
@@ -827,6 +882,8 @@ static void
827_stop_playing_recording(UI_CHAT_Handle *handle, 882_stop_playing_recording(UI_CHAT_Handle *handle,
828 gboolean reset_bar) 883 gboolean reset_bar)
829{ 884{
885 g_assert(handle);
886
830 gst_element_set_state(handle->play_pipeline, GST_STATE_NULL); 887 gst_element_set_state(handle->play_pipeline, GST_STATE_NULL);
831 handle->playing = FALSE; 888 handle->playing = FALSE;
832 889
@@ -852,6 +909,8 @@ static void
852handle_recording_play_button_click(UNUSED GtkButton *button, 909handle_recording_play_button_click(UNUSED GtkButton *button,
853 gpointer user_data) 910 gpointer user_data)
854{ 911{
912 g_assert(user_data);
913
855 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 914 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
856 915
857 if ((!(handle->recorded)) || (!(handle->play_pipeline))) 916 if ((!(handle->recorded)) || (!(handle->play_pipeline)))
@@ -883,6 +942,8 @@ static void
883handle_picker_button_click(UNUSED GtkButton *button, 942handle_picker_button_click(UNUSED GtkButton *button,
884 gpointer user_data) 943 gpointer user_data)
885{ 944{
945 g_assert(user_data);
946
886 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 947 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
887 948
888 gboolean reveal = !gtk_revealer_get_child_revealed(handle->picker_revealer); 949 gboolean reveal = !gtk_revealer_get_child_revealed(handle->picker_revealer);
@@ -899,6 +960,8 @@ handle_picker_button_click(UNUSED GtkButton *button,
899static gboolean 960static gboolean
900_record_timer_func(gpointer user_data) 961_record_timer_func(gpointer user_data)
901{ 962{
963 g_assert(user_data);
964
902 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 965 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
903 966
904 GString *time_string = g_string_new(NULL); 967 GString *time_string = g_string_new(NULL);
@@ -932,6 +995,8 @@ _record_timer_func(gpointer user_data)
932static gboolean 995static gboolean
933_play_timer_func(gpointer user_data) 996_play_timer_func(gpointer user_data)
934{ 997{
998 g_assert(user_data);
999
935 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data; 1000 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) user_data;
936 1001
937 if (handle->play_time < handle->record_time * 100) 1002 if (handle->play_time < handle->record_time * 100)
@@ -965,6 +1030,8 @@ handle_record_bus_watch(UNUSED GstBus *bus,
965 GstMessage *msg, 1030 GstMessage *msg,
966 gpointer data) 1031 gpointer data)
967{ 1032{
1033 g_assert((msg) && (data));
1034
968 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) data; 1035 UI_CHAT_Handle *handle = (UI_CHAT_Handle*) data;
969 GstMessageType type = GST_MESSAGE_TYPE(msg); 1036 GstMessageType type = GST_MESSAGE_TYPE(msg);
970 1037
@@ -1019,6 +1086,8 @@ handle_play_bus_watch(UNUSED GstBus *bus,
1019static void 1086static void
1020_setup_gst_pipelines(UI_CHAT_Handle *handle) 1087_setup_gst_pipelines(UI_CHAT_Handle *handle)
1021{ 1088{
1089 g_assert(handle);
1090
1022 handle->record_pipeline = gst_parse_launch( 1091 handle->record_pipeline = gst_parse_launch(
1023 "autoaudiosrc ! audioconvert ! vorbisenc ! oggmux ! filesink name=sink", 1092 "autoaudiosrc ! audioconvert ! vorbisenc ! oggmux ! filesink name=sink",
1024 NULL 1093 NULL
@@ -1065,7 +1134,7 @@ _setup_gst_pipelines(UI_CHAT_Handle *handle)
1065UI_CHAT_Handle* 1134UI_CHAT_Handle*
1066ui_chat_new(MESSENGER_Application *app) 1135ui_chat_new(MESSENGER_Application *app)
1067{ 1136{
1068 GNUNET_assert(app); 1137 g_assert(app);
1069 1138
1070 UI_CHAT_Handle *handle = g_malloc(sizeof(UI_CHAT_Handle)); 1139 UI_CHAT_Handle *handle = g_malloc(sizeof(UI_CHAT_Handle));
1071 UI_MESSENGER_Handle *messenger = &(app->ui.messenger); 1140 UI_MESSENGER_Handle *messenger = &(app->ui.messenger);
@@ -1554,7 +1623,7 @@ ui_chat_update(UI_CHAT_Handle *handle,
1554 MESSENGER_Application *app, 1623 MESSENGER_Application *app,
1555 struct GNUNET_CHAT_Context* context) 1624 struct GNUNET_CHAT_Context* context)
1556{ 1625{
1557 GNUNET_assert((handle) && (app) && (context)); 1626 g_assert((handle) && (app) && (context));
1558 1627
1559 struct GNUNET_CHAT_Contact* contact; 1628 struct GNUNET_CHAT_Contact* contact;
1560 struct GNUNET_CHAT_Group* group; 1629 struct GNUNET_CHAT_Group* group;
@@ -1715,7 +1784,7 @@ ui_chat_update(UI_CHAT_Handle *handle,
1715void 1784void
1716ui_chat_delete(UI_CHAT_Handle *handle) 1785ui_chat_delete(UI_CHAT_Handle *handle)
1717{ 1786{
1718 GNUNET_assert(handle); 1787 g_assert(handle);
1719 1788
1720 ui_picker_delete(handle->picker); 1789 ui_picker_delete(handle->picker);
1721 1790
@@ -1753,7 +1822,7 @@ ui_chat_add_message(UI_CHAT_Handle *handle,
1753 MESSENGER_Application *app, 1822 MESSENGER_Application *app,
1754 UI_MESSAGE_Handle *message) 1823 UI_MESSAGE_Handle *message)
1755{ 1824{
1756 GNUNET_assert((handle) && (message) && (message->message_box)); 1825 g_assert((handle) && (message) && (message->message_box));
1757 1826
1758 gtk_container_add( 1827 gtk_container_add(
1759 GTK_CONTAINER(handle->messages_listbox), 1828 GTK_CONTAINER(handle->messages_listbox),
@@ -1771,7 +1840,7 @@ ui_chat_remove_message(UI_CHAT_Handle *handle,
1771 UNUSED MESSENGER_Application *app, 1840 UNUSED MESSENGER_Application *app,
1772 UI_MESSAGE_Handle *message) 1841 UI_MESSAGE_Handle *message)
1773{ 1842{
1774 GNUNET_assert((handle) && (message) && (message->message_box)); 1843 g_assert((handle) && (message) && (message->message_box));
1775 1844
1776 GtkWidget *row = gtk_widget_get_parent(message->message_box); 1845 GtkWidget *row = gtk_widget_get_parent(message->message_box);
1777 g_object_set_qdata(G_OBJECT(row), app->quarks.ui, NULL); 1846 g_object_set_qdata(G_OBJECT(row), app->quarks.ui, NULL);
@@ -1788,7 +1857,7 @@ void
1788ui_chat_add_file_load(UI_CHAT_Handle *handle, 1857ui_chat_add_file_load(UI_CHAT_Handle *handle,
1789 UI_FILE_LOAD_ENTRY_Handle *file_load) 1858 UI_FILE_LOAD_ENTRY_Handle *file_load)
1790{ 1859{
1791 GNUNET_assert((handle) && (file_load)); 1860 g_assert((handle) && (file_load));
1792 1861
1793 gtk_container_add( 1862 gtk_container_add(
1794 GTK_CONTAINER(handle->chat_load_listbox), 1863 GTK_CONTAINER(handle->chat_load_listbox),
@@ -1806,7 +1875,7 @@ void
1806ui_chat_remove_file_load(UI_CHAT_Handle *handle, 1875ui_chat_remove_file_load(UI_CHAT_Handle *handle,
1807 UI_FILE_LOAD_ENTRY_Handle *file_load) 1876 UI_FILE_LOAD_ENTRY_Handle *file_load)
1808{ 1877{
1809 GNUNET_assert((handle) && (file_load) && (handle == file_load->chat) && 1878 g_assert((handle) && (file_load) && (handle == file_load->chat) &&
1810 (file_load->entry_box)); 1879 (file_load->entry_box));
1811 1880
1812 handle->loads = g_list_remove(handle->loads, file_load); 1881 handle->loads = g_list_remove(handle->loads, file_load);