app: gdk_threads_(enter|leave)() deprecated since GDK 3.6.

There are no replacements. Just we must make sure that all GTK+/GDK
calls are run from the main thread, which is already what we were doing.

Actually I don't even think these were doing anything as we were not
calling gdk_threads_init() so the default lock functions were not set
anyway. These were just bogus calls.
This commit is contained in:
Jehan 2019-07-22 11:17:49 +02:00
parent b9b8879ba0
commit 5d2dbfe2e8
7 changed files with 1 additions and 56 deletions

View File

@ -431,11 +431,7 @@ app_run (const gchar *full_prog_name,
gimp_batch_run (gimp, batch_interpreter, batch_commands);
if (run_loop)
{
gimp_threads_leave (gimp);
g_main_loop_run (loop);
gimp_threads_enter (gimp);
}
if (gimp->be_verbose)
g_print ("EXIT: %s\n", G_STRFUNC);

View File

@ -43,8 +43,6 @@ gimp_gui_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp->gui.ungrab = NULL;
gimp->gui.threads_enter = NULL;
gimp->gui.threads_leave = NULL;
gimp->gui.set_busy = NULL;
gimp->gui.unset_busy = NULL;
gimp->gui.show_message = NULL;
@ -79,24 +77,6 @@ gimp_gui_ungrab (Gimp *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
gimp_set_busy (Gimp *gimp)
{

View File

@ -25,9 +25,6 @@ struct _GimpGui
{
void (* ungrab) (Gimp *gimp);
void (* threads_enter) (Gimp *gimp);
void (* threads_leave) (Gimp *gimp);
void (* set_busy) (Gimp *gimp);
void (* unset_busy) (Gimp *gimp);
@ -116,9 +113,6 @@ void gimp_gui_init (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_empty_display (Gimp *gimp);
GimpObject * gimp_get_display_by_ID (Gimp *gimp,

View File

@ -560,8 +560,6 @@ EXPORTS
gimp_text_layer_set
gimp_text_undo_get_type
gimp_text_vectors_new
gimp_threads_enter
gimp_threads_leave
gimp_tool_info_get_standard
gimp_tool_info_get_type
gimp_tool_info_new

View File

@ -112,9 +112,6 @@
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_unset_busy (Gimp *gimp);
@ -195,8 +192,6 @@ gui_vtable_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp));
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.unset_busy = gui_unset_busy;
gimp->gui.show_message = gui_message;
@ -238,18 +233,6 @@ gui_ungrab (Gimp *gimp)
gdk_seat_ungrab (gdk_display_get_default_seat (display));
}
static void
gui_threads_enter (Gimp *gimp)
{
GDK_THREADS_ENTER ();
}
static void
gui_threads_leave (Gimp *gimp)
{
GDK_THREADS_LEAVE ();
}
static void
gui_set_busy (Gimp *gimp)
{

View File

@ -839,9 +839,7 @@ gimp_plug_in_main_loop (GimpPlugIn *plug_in)
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);
gimp_threads_enter (plug_in->manager->gimp);
g_clear_pointer (&proc_frame->main_loop, g_main_loop_unref);
}

View File

@ -264,9 +264,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
{
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);
gimp_threads_enter (manager->gimp);
/* main_loop is quit in gimp_plug_in_handle_extension_ack() */
@ -282,9 +280,7 @@ gimp_plug_in_manager_call_run (GimpPlugInManager *manager,
proc_frame->main_loop = g_main_loop_new (NULL, FALSE);
gimp_threads_leave (manager->gimp);
g_main_loop_run (proc_frame->main_loop);
gimp_threads_enter (manager->gimp);
/* main_loop is quit in gimp_plug_in_handle_proc_return() */