[goobox] removed use of gdk_threads_* functions
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goobox] removed use of gdk_threads_* functions
- Date: Wed, 5 Dec 2012 16:22:13 +0000 (UTC)
commit 5b47aa9c7c45ea01a6d6cf4eca844f4b71cb44fc
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Dec 4 15:45:14 2012 +0100
removed use of gdk_threads_* functions
copy-n-paste/eggsmclient-xsmp.c | 17 ++++++-----------
src/main.c | 8 +-------
2 files changed, 7 insertions(+), 18 deletions(-)
---
diff --git a/copy-n-paste/eggsmclient-xsmp.c b/copy-n-paste/eggsmclient-xsmp.c
index ec1b594..78f1c6b 100644
--- a/copy-n-paste/eggsmclient-xsmp.c
+++ b/copy-n-paste/eggsmclient-xsmp.c
@@ -227,7 +227,7 @@ sm_client_xsmp_set_initial_properties (gpointer user_data)
if (xsmp->restart_style == SmRestartIfRunning)
{
- if (egg_desktop_file_get_boolean (desktop_file,
+ if (egg_desktop_file_get_boolean (desktop_file,
"X-GNOME-AutoRestart", NULL))
xsmp->restart_style = SmRestartImmediately;
}
@@ -367,13 +367,11 @@ sm_client_xsmp_startup (EggSMClient *client,
xsmp->client_id = g_strdup (ret_client_id);
free (ret_client_id);
- gdk_threads_enter ();
#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
gdk_set_sm_client_id (xsmp->client_id);
#else
gdk_x11_set_sm_client_id (xsmp->client_id);
#endif
- gdk_threads_leave ();
g_debug ("Got client ID \"%s\"", xsmp->client_id);
}
@@ -541,8 +539,6 @@ idle_do_pending_events (gpointer data)
EggSMClientXSMP *xsmp = data;
EggSMClient *client = data;
- gdk_threads_enter ();
-
xsmp->idle = 0;
if (xsmp->waiting_to_emit_quit)
@@ -566,7 +562,6 @@ idle_do_pending_events (gpointer data)
}
out:
- gdk_threads_leave ();
return FALSE;
}
@@ -1136,7 +1131,7 @@ delete_properties (EggSMClientXSMP *xsmp, ...)
* until you're done with the SmProp.
*/
static SmProp *
-array_prop (const char *name, ...)
+array_prop (const char *name, ...)
{
SmProp *prop;
SmPropValue pv;
@@ -1287,9 +1282,7 @@ process_ice_messages (IceConn ice_conn)
{
IceProcessMessagesStatus status;
- gdk_threads_enter ();
status = IceProcessMessages (ice_conn, NULL, NULL);
- gdk_threads_leave ();
switch (status)
{
@@ -1306,6 +1299,8 @@ process_ice_messages (IceConn ice_conn)
default:
g_assert_not_reached ();
}
+
+ return FALSE;
}
static gboolean
@@ -1354,13 +1349,13 @@ ice_error_handler (IceConn ice_conn,
IcePointer values)
{
/* Do nothing */
-}
+}
static void
ice_io_error_handler (IceConn ice_conn)
{
/* Do nothing */
-}
+}
static void
smc_error_handler (SmcConn smc_conn,
diff --git a/src/main.c b/src/main.c
index 81208e1..5392aa6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -736,11 +736,6 @@ main (int argc, char *argv[])
program_argv0 = argv[0];
- if (! g_thread_supported ()) {
- g_thread_init (NULL);
- gdk_threads_init ();
- }
-
/* text domain */
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
@@ -750,9 +745,8 @@ main (int argc, char *argv[])
/* run the main application */
application = goo_application_new ();
- gdk_threads_enter ();
status = g_application_run (G_APPLICATION (application), argc, argv);
- gdk_threads_leave ();
+
g_object_unref (application);
return status;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]