[gtk+/composite-templates] modules: Don't use GDK_THREADS_ENTER/LEAVE macros internally
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates] modules: Don't use GDK_THREADS_ENTER/LEAVE macros internally
- Date: Tue, 31 Jul 2012 10:56:54 +0000 (UTC)
commit 1900aebb78db7234eb12fe3462901a29776ac2a4
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jul 30 10:37:32 2012 +0200
modules: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step. Also define GTK_COMPILATION so we can keep using
gdk_threads_enter/leave without causing deprecation warnings.
modules/input/Makefile.am | 1 +
modules/input/gtkimcontextmultipress.c | 4 ++--
modules/printbackends/cups/Makefile.am | 1 +
modules/printbackends/cups/gtkprintbackendcups.c | 20 ++++++++++----------
modules/printbackends/file/Makefile.am | 1 +
modules/printbackends/file/gtkprintbackendfile.c | 4 ++--
6 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/modules/input/Makefile.am b/modules/input/Makefile.am
index 46e00fb..317f4e2 100644
--- a/modules/input/Makefile.am
+++ b/modules/input/Makefile.am
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
$(GTK_DEBUG_FLAGS) \
$(GTK_XIM_FLAGS) \
$(GTK_DEP_CFLAGS) \
+ -DGTK_COMPILATION \
$(INCLUDED_IMMODULE_DEFINE)
DEPS = \
diff --git a/modules/input/gtkimcontextmultipress.c b/modules/input/gtkimcontextmultipress.c
index 57406cf..7fb484a 100644
--- a/modules/input/gtkimcontextmultipress.c
+++ b/modules/input/gtkimcontextmultipress.c
@@ -197,7 +197,7 @@ on_timeout (gpointer data)
{
GtkImContextMultipress *multipress_context;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
multipress_context = GTK_IM_CONTEXT_MULTIPRESS (data);
@@ -207,7 +207,7 @@ on_timeout (gpointer data)
multipress_context->timeout_id = 0;
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
return G_SOURCE_REMOVE; /* don't call me again */
}
diff --git a/modules/printbackends/cups/Makefile.am b/modules/printbackends/cups/Makefile.am
index f90a28f..e9d4c2f 100644
--- a/modules/printbackends/cups/Makefile.am
+++ b/modules/printbackends/cups/Makefile.am
@@ -12,6 +12,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/gdk \
$(CUPS_CFLAGS) \
$(COLORD_CFLAGS) \
+ -DGTK_COMPILATION \
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
$(GTK_DEP_CFLAGS) \
$(GTK_DEBUG_FLAGS)
diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c
index cddb6b7..d9110be 100644
--- a/modules/printbackends/cups/gtkprintbackendcups.c
+++ b/modules/printbackends/cups/gtkprintbackendcups.c
@@ -469,7 +469,7 @@ cups_print_cb (GtkPrintBackendCups *print_backend,
GError *error = NULL;
CupsPrintStreamData *ps = user_data;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
GTK_NOTE (PRINTING,
g_print ("CUPS Backend: %s\n", G_STRFUNC));
@@ -506,7 +506,7 @@ cups_print_cb (GtkPrintBackendCups *print_backend,
if (error)
g_error_free (error);
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
typedef struct {
@@ -1494,7 +1494,7 @@ cups_request_job_info_cb (GtkPrintBackendCups *print_backend,
int state;
gboolean done;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
if (data->job == NULL)
{
@@ -1566,7 +1566,7 @@ cups_request_job_info_cb (GtkPrintBackendCups *print_backend,
cups_job_poll_data_free (data);
done:
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
static void
@@ -1953,7 +1953,7 @@ cups_request_printer_list_cb (GtkPrintBackendCups *cups_backend,
GList *removed_printer_checklist;
gchar *remote_default_printer = NULL;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
list_has_changed = FALSE;
@@ -2235,7 +2235,7 @@ done:
}
}
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
static void
@@ -2368,7 +2368,7 @@ cups_request_ppd_cb (GtkPrintBackendCups *print_backend,
{
GtkPrinter *printer;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
GTK_NOTE (PRINTING,
g_print ("CUPS Backend: %s\n", G_STRFUNC));
@@ -2404,7 +2404,7 @@ cups_request_ppd_cb (GtkPrintBackendCups *print_backend,
g_signal_emit_by_name (printer, "details-acquired", TRUE);
done:
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
static gboolean
@@ -2750,7 +2750,7 @@ cups_request_default_printer_cb (GtkPrintBackendCups *print_backend,
ipp_attribute_t *attr;
GtkPrinter *printer;
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
if (gtk_cups_result_is_error (result))
{
@@ -2789,7 +2789,7 @@ cups_request_default_printer_cb (GtkPrintBackendCups *print_backend,
if (print_backend->list_printers_poll != 0)
cups_request_printer_list (print_backend);
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
static gboolean
diff --git a/modules/printbackends/file/Makefile.am b/modules/printbackends/file/Makefile.am
index 9b25bc9..c0189f1 100644
--- a/modules/printbackends/file/Makefile.am
+++ b/modules/printbackends/file/Makefile.am
@@ -17,6 +17,7 @@ libprintbackend_file_la_CPPFLAGS = \
-I$(top_builddir)/gtk \
-I$(top_srcdir)/gdk \
-I$(top_builddir)/gdk \
+ -DGTK_COMPILATION \
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
$(AM_CPPFLAGS)
diff --git a/modules/printbackends/file/gtkprintbackendfile.c b/modules/printbackends/file/gtkprintbackendfile.c
index fdb36b6..e9b75fe 100644
--- a/modules/printbackends/file/gtkprintbackendfile.c
+++ b/modules/printbackends/file/gtkprintbackendfile.c
@@ -401,11 +401,11 @@ file_print_cb (GtkPrintBackendFile *print_backend,
GError *error,
gpointer user_data)
{
- GDK_THREADS_ENTER ();
+ gdk_threads_enter ();
file_print_cb_locked (print_backend, error, user_data);
- GDK_THREADS_LEAVE ();
+ gdk_threads_leave ();
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]