183 } |
183 } |
184 |
184 |
185 static void* ui_jobthread(void *data) { |
185 static void* ui_jobthread(void *data) { |
186 UiJob *job = data; |
186 UiJob *job = data; |
187 int result = job->job_func(job->job_data); |
187 int result = job->job_func(job->job_data); |
188 if(!result) { |
188 if(!result && job->finish_callback) { |
189 g_idle_add(ui_job_finished, job); |
189 g_idle_add(ui_job_finished, job); |
|
190 } else { |
|
191 free(job); |
190 } |
192 } |
191 return NULL; |
193 return NULL; |
192 } |
194 } |
193 |
195 |
194 static gboolean ui_idle_func(void *data) { |
196 static gboolean ui_idle_func(void *data) { |