summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-07-30 10:37:32 +0200
committerMatthias Clasen <mclasen@redhat.com>2012-07-30 18:01:47 +0200
commit3e78324501c38e992b1748e79f5defc4d283e43a (patch)
tree31653787b123e92b54ab702447a24288485ad8e2
parent8d0e88bac77c81bbe3e9ae62639bbc9629c195dd (diff)
downloadgtk+-3e78324501c38e992b1748e79f5defc4d283e43a.tar.gz
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.
-rw-r--r--modules/input/Makefile.am1
-rw-r--r--modules/input/gtkimcontextmultipress.c4
-rw-r--r--modules/printbackends/cups/Makefile.am1
-rw-r--r--modules/printbackends/cups/gtkprintbackendcups.c20
-rw-r--r--modules/printbackends/file/Makefile.am1
-rw-r--r--modules/printbackends/file/gtkprintbackendfile.c4
6 files changed, 17 insertions, 14 deletions
diff --git a/modules/input/Makefile.am b/modules/input/Makefile.am
index 46e00fb43e..317f4e24f3 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 57406cf355..7fb484a07c 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 f90a28f73b..e9d4c2fdd1 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 cddb6b76c4..d9110be158 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 9b25bc974f..c0189f10a7 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 fdb36b6dbc..e9b75feda9 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