Mercurial > gftp.yaz
comparison src/gtk/misc-gtk.c @ 31:d930e06af9ae
2002-10-03 Brian Masney <masneyb@gftp.org>
* src/gtk/gftp-gtk.c - call g_thread_init (NULL)
* src/gtk/delete_dialog.c, src/gtk/misc-gtk.c, src/gtk/transfer.c -
call gdk_threads_enter() and gdk_threads_leave()
author | masneyb |
---|---|
date | Thu, 03 Oct 2002 12:05:54 +0000 |
parents | 4b244bf9d84d |
children | c8ec7877432e |
comparison
equal
deleted
inserted
replaced
30:dfd68d1d3d13 | 31:d930e06af9ae |
---|---|
32 | 32 |
33 | 33 |
34 void | 34 void |
35 fix_display (void) | 35 fix_display (void) |
36 { | 36 { |
37 while (g_main_iteration (FALSE)); | 37 int ret; |
38 | |
39 ret = 1; | |
40 while (ret) | |
41 { | |
42 gdk_threads_leave (); | |
43 ret = g_main_iteration (FALSE); | |
44 gdk_threads_enter (); | |
45 } | |
38 } | 46 } |
39 | 47 |
40 | 48 |
41 void | 49 void |
42 remove_files_window (gftp_window_data * wdata) | 50 remove_files_window (gftp_window_data * wdata) |
1122 wdata->request->stopable = 1; | 1130 wdata->request->stopable = 1; |
1123 gtk_widget_set_sensitive (stop_btn, 1); | 1131 gtk_widget_set_sensitive (stop_btn, 1); |
1124 pthread_create (&wdata->tid, NULL, func, wdata); | 1132 pthread_create (&wdata->tid, NULL, func, wdata); |
1125 | 1133 |
1126 while (wdata->request->stopable) | 1134 while (wdata->request->stopable) |
1127 g_main_iteration (TRUE); | 1135 { |
1136 gdk_threads_leave (); | |
1137 g_main_iteration (TRUE); | |
1138 gdk_threads_enter (); | |
1139 } | |
1128 | 1140 |
1129 pthread_join (wdata->tid, &ret); | 1141 pthread_join (wdata->tid, &ret); |
1130 gtk_widget_set_sensitive (stop_btn, 0); | 1142 gtk_widget_set_sensitive (stop_btn, 0); |
1131 } | 1143 } |
1132 else | 1144 else |