diff options
author | Matthias Clasen <mclasen@redhat.com> | 2012-01-30 19:12:27 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2012-01-30 19:12:27 -0500 |
commit | 585a6652d5ca2123a15290ee3138fb8c36ad14cc (patch) | |
tree | da404859ae663f70bc2822383d386ff918c52409 /modules | |
parent | 7a080413add02b80c4217a9fbe81467017aae2a5 (diff) | |
download | gtk+-585a6652d5ca2123a15290ee3138fb8c36ad14cc.tar.gz |
Use G_SOURCE_CONTINUE/REMOVE
Now that GLib provides these macros, we should use them
to make the code more readable.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/input/gtkimcontextmultipress.c | 2 | ||||
-rw-r--r-- | modules/printbackends/cups/gtkprintbackendcups.c | 10 | ||||
-rw-r--r-- | modules/printbackends/papi/gtkprintbackendpapi.c | 4 | ||||
-rw-r--r-- | modules/printbackends/test/gtkprintbackendtest.c | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/modules/input/gtkimcontextmultipress.c b/modules/input/gtkimcontextmultipress.c index 23578e0f3c..2f2b7b122c 100644 --- a/modules/input/gtkimcontextmultipress.c +++ b/modules/input/gtkimcontextmultipress.c @@ -211,7 +211,7 @@ on_timeout (gpointer data) GDK_THREADS_LEAVE (); - return FALSE; /* don't call me again */ + return G_SOURCE_REMOVE; /* don't call me again */ } static gboolean diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c index d52cb4d744..c338ae577d 100644 --- a/modules/printbackends/cups/gtkprintbackendcups.c +++ b/modules/printbackends/cups/gtkprintbackendcups.c @@ -843,7 +843,7 @@ request_password (gpointer data) gint i; if (dispatch->backend->authentication_lock) - return FALSE; + return G_SOURCE_REMOVE; httpGetHostname (dispatch->request->http, hostname, sizeof (hostname)); if (is_address_local (hostname)) @@ -956,7 +956,7 @@ request_password (gpointer data) g_free (auth_info_visible); g_free (key); - return FALSE; + return G_SOURCE_REMOVE; } static void @@ -1040,10 +1040,10 @@ check_auth_info (gpointer user_data) dispatch->request->auth_info = NULL; } - return FALSE; + return G_SOURCE_REMOVE; } - return TRUE; + return G_SOURCE_CONTINUE; } static gboolean @@ -1612,7 +1612,7 @@ cups_job_info_poll_timeout (gpointer user_data) else cups_request_job_info (data); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/modules/printbackends/papi/gtkprintbackendpapi.c b/modules/printbackends/papi/gtkprintbackendpapi.c index c10b207d91..4ce3fb6b74 100644 --- a/modules/printbackends/papi/gtkprintbackendpapi.c +++ b/modules/printbackends/papi/gtkprintbackendpapi.c @@ -802,7 +802,7 @@ papi_display_printer_status (gpointer user_data) papi_printer = GTK_PRINTER_PAPI (printer); if (papiServiceCreate (&service, NULL, NULL, NULL, NULL, PAPI_ENCRYPT_NEVER, NULL) != PAPI_OK) - return FALSE; + return G_SOURCE_REMOVE; if (papiPrinterQuery (service, papi_printer->printer_name, NULL, NULL, ¤t_printer) != PAPI_OK) @@ -845,7 +845,7 @@ papi_display_printer_status (gpointer user_data) papiServiceDestroy (service); gtk_printer_set_has_details (printer, TRUE); - return FALSE; + return G_SOURCE_REMOVE; } static void diff --git a/modules/printbackends/test/gtkprintbackendtest.c b/modules/printbackends/test/gtkprintbackendtest.c index 14c8e52db4..b10432bc92 100644 --- a/modules/printbackends/test/gtkprintbackendtest.c +++ b/modules/printbackends/test/gtkprintbackendtest.c @@ -549,7 +549,7 @@ test_printer_prepare_for_print (GtkPrinter *printer, } static gboolean -test_printer_details_aquired_cb (GtkPrinter *printer) +test_printer_details_acquired_cb (GtkPrinter *printer) { gboolean success; gint weight; @@ -565,7 +565,7 @@ test_printer_details_aquired_cb (GtkPrinter *printer) gtk_printer_set_has_details (printer, success); g_signal_emit_by_name (printer, "details-acquired", success); - return FALSE; + return G_SOURCE_REMOVE; } static void @@ -590,7 +590,7 @@ test_printer_request_details (GtkPrinter *printer) else time *= 1000; - g_timeout_add (time, (GSourceFunc) test_printer_details_aquired_cb, printer); + g_timeout_add (time, (GSourceFunc) test_printer_details_acquired_cb, printer); } |