[gnome-software/gnome-3-12] plugin loader: Remove gs_app_set_state_in_idle



commit 1885f2c6654af60b9c874d606bee2e749dbab942
Author: Kalev Lember <kalevlember gmail com>
Date:   Tue Apr 8 13:54:59 2014 +0200

    plugin loader: Remove gs_app_set_state_in_idle
    
    This is no longer needed now that GsApp marshalls all notify:: signals
    to the main thread itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727823

 src/gs-plugin-loader.c |   35 ++---------------------------------
 1 files changed, 2 insertions(+), 33 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index a5934a6..a825354 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -647,37 +647,6 @@ out:
        return ret;
 }
 
-typedef struct {
-       GsApp *app;
-       GsAppState state;
-} AppStateData;
-
-static gboolean
-set_state_idle_cb (gpointer data)
-{
-       AppStateData *app_data = data;
-
-       gs_app_set_state (app_data->app, app_data->state);
-       g_object_unref (app_data->app);
-       g_free (app_data);
-
-       return G_SOURCE_REMOVE;
-}
-
-static void
-gs_app_set_state_in_idle (GsApp *app, GsAppState state)
-{
-       AppStateData *app_data;
-       guint id;
-
-       app_data = g_new (AppStateData, 1);
-       app_data->app = g_object_ref (app);
-       app_data->state = state;
-
-       id = g_idle_add (set_state_idle_cb, app_data);
-       g_source_set_name_by_id (id, "[gnome-software] set_state_idle_cb");
-}
-
 /******************************************************************************/
 
 /* async state */
@@ -2193,7 +2162,7 @@ gs_plugin_loader_app_action_thread_cb (GSimpleAsyncResult *res,
                                                  state->cancellable,
                                                  &error);
        if (!state->ret) {
-               gs_app_set_state_in_idle (state->app, state->state_failure);
+               gs_app_set_state (state->app, state->state_failure);
                gs_plugin_loader_app_action_state_finish (state, error);
                g_error_free (error);
                return;
@@ -2208,7 +2177,7 @@ gs_plugin_loader_app_action_thread_cb (GSimpleAsyncResult *res,
 
        /* success */
        if (state->state_success != GS_APP_STATE_UNKNOWN)
-               gs_app_set_state_in_idle (state->app, state->state_success);
+               gs_app_set_state (state->app, state->state_success);
        gs_plugin_loader_app_action_state_finish (state, NULL);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]