app: remove all deprecated threads_enter/leave code

This commit is contained in:
Michael Natterer 2018-05-02 15:10:01 +02:00
parent ebe528aca8
commit 579cf4c428
6 changed files with 3 additions and 54 deletions

View File

@ -392,6 +392,7 @@ app_run (const gchar *full_prog_name,
g_object_unref (file); g_object_unref (file);
} }
} }
/* Delete backup XCF images. */ /* Delete backup XCF images. */
for (iter = recovered_files; iter; iter = iter->next) for (iter = recovered_files; iter; iter = iter->next)
{ {
@ -419,6 +420,7 @@ app_run (const gchar *full_prog_name,
} }
} }
} }
if (font_error) if (font_error)
{ {
gimp_message_literal (gimp, NULL, gimp_message_literal (gimp, NULL,
@ -431,11 +433,7 @@ app_run (const gchar *full_prog_name,
gimp_batch_run (gimp, batch_interpreter, batch_commands); gimp_batch_run (gimp, batch_interpreter, batch_commands);
if (run_loop) if (run_loop)
{ g_main_loop_run (loop);
gimp_threads_leave (gimp);
g_main_loop_run (loop);
gimp_threads_enter (gimp);
}
if (gimp->be_verbose) if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC); g_print ("EXIT: %s\n", G_STRFUNC);

View File

@ -42,8 +42,6 @@ gimp_gui_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp)); g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp->gui.ungrab = NULL; gimp->gui.ungrab = NULL;
gimp->gui.threads_enter = NULL;
gimp->gui.threads_leave = NULL;
gimp->gui.set_busy = NULL; gimp->gui.set_busy = NULL;
gimp->gui.unset_busy = NULL; gimp->gui.unset_busy = NULL;
gimp->gui.show_message = NULL; gimp->gui.show_message = NULL;
@ -78,24 +76,6 @@ gimp_gui_ungrab (Gimp *gimp)
gimp->gui.ungrab (gimp); gimp->gui.ungrab (gimp);
} }
void
gimp_threads_enter (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (gimp->gui.threads_enter)
gimp->gui.threads_enter (gimp);
}
void
gimp_threads_leave (Gimp *gimp)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
if (gimp->gui.threads_leave)
gimp->gui.threads_leave (gimp);
}
void void
gimp_set_busy (Gimp *gimp) gimp_set_busy (Gimp *gimp)
{ {

View File

@ -25,9 +25,6 @@ struct _GimpGui
{ {
void (* ungrab) (Gimp *gimp); void (* ungrab) (Gimp *gimp);
void (* threads_enter) (Gimp *gimp);
void (* threads_leave) (Gimp *gimp);
void (* set_busy) (Gimp *gimp); void (* set_busy) (Gimp *gimp);
void (* unset_busy) (Gimp *gimp); void (* unset_busy) (Gimp *gimp);
@ -112,9 +109,6 @@ void gimp_gui_init (Gimp *gimp);
void gimp_gui_ungrab (Gimp *gimp); void gimp_gui_ungrab (Gimp *gimp);
void gimp_threads_enter (Gimp *gimp);
void gimp_threads_leave (Gimp *gimp);
GimpObject * gimp_get_window_strategy (Gimp *gimp); GimpObject * gimp_get_window_strategy (Gimp *gimp);
GimpObject * gimp_get_empty_display (Gimp *gimp); GimpObject * gimp_get_empty_display (Gimp *gimp);
GimpObject * gimp_get_display_by_ID (Gimp *gimp, GimpObject * gimp_get_display_by_ID (Gimp *gimp,

View File

@ -87,9 +87,6 @@
static void gui_ungrab (Gimp *gimp); static void gui_ungrab (Gimp *gimp);
static void gui_threads_enter (Gimp *gimp);
static void gui_threads_leave (Gimp *gimp);
static void gui_set_busy (Gimp *gimp); static void gui_set_busy (Gimp *gimp);
static void gui_unset_busy (Gimp *gimp); static void gui_unset_busy (Gimp *gimp);
@ -167,8 +164,6 @@ gui_vtable_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp)); g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp->gui.ungrab = gui_ungrab; gimp->gui.ungrab = gui_ungrab;
gimp->gui.threads_enter = gui_threads_enter;
gimp->gui.threads_leave = gui_threads_leave;
gimp->gui.set_busy = gui_set_busy; gimp->gui.set_busy = gui_set_busy;
gimp->gui.unset_busy = gui_unset_busy; gimp->gui.unset_busy = gui_unset_busy;
gimp->gui.show_message = gui_message; gimp->gui.show_message = gui_message;
@ -212,18 +207,6 @@ gui_ungrab (Gimp *gimp)
} }
} }
static void
gui_threads_enter (Gimp *gimp)
{
GDK_THREADS_ENTER ();
}
static void
gui_threads_leave (Gimp *gimp)
{
GDK_THREADS_LEAVE ();
}
static void static void
gui_set_busy (Gimp *gimp) gui_set_busy (Gimp *gimp)
{ {

View File

@ -784,9 +784,7 @@ gimp_plug_in_main_loop (GimpPlugIn *plug_in)
proc_frame->main_loop = g_main_loop_new (NULL, FALSE); proc_frame->main_loop = g_main_loop_new (NULL, FALSE);
gimp_threads_leave (plug_in->manager->gimp);
g_main_loop_run (proc_frame->main_loop); g_main_loop_run (proc_frame->main_loop);
gimp_threads_enter (plug_in->manager->gimp);
g_clear_pointer (&proc_frame->main_loop, g_main_loop_unref); g_clear_pointer (&proc_frame->main_loop, g_main_loop_unref);
} }

View File

@ -256,9 +256,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
{ {
plug_in->ext_main_loop = g_main_loop_new (NULL, FALSE); plug_in->ext_main_loop = g_main_loop_new (NULL, FALSE);
gimp_threads_leave (manager->gimp);
g_main_loop_run (plug_in->ext_main_loop); g_main_loop_run (plug_in->ext_main_loop);
gimp_threads_enter (manager->gimp);
/* main_loop is quit in gimp_plug_in_handle_extension_ack() */ /* main_loop is quit in gimp_plug_in_handle_extension_ack() */
@ -274,9 +272,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
proc_frame->main_loop = g_main_loop_new (NULL, FALSE); proc_frame->main_loop = g_main_loop_new (NULL, FALSE);
gimp_threads_leave (manager->gimp);
g_main_loop_run (proc_frame->main_loop); g_main_loop_run (proc_frame->main_loop);
gimp_threads_enter (manager->gimp);
/* main_loop is quit in gimp_plug_in_handle_proc_return() */ /* main_loop is quit in gimp_plug_in_handle_proc_return() */