[gnome-builder] build-manager: Remove extraneous calls to propagate_action_enabled()



commit c3bdcaefa89ea52306576bd55a943707449d8cc1
Author: Matthew Leeds <mleeds redhat com>
Date:   Tue Apr 18 17:44:08 2017 -0500

    build-manager: Remove extraneous calls to propagate_action_enabled()
    
    ide_build_manager_propagate_action_enabled() needs to be called whenever
    the enabled/disabled state of any of the actions in that class changes,
    but it's already called in update_action_enabled() so there's no need to
    call it in other places.

 libide/buildsystem/ide-build-manager.c |   24 +++---------------------
 1 files changed, 3 insertions(+), 21 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-manager.c b/libide/buildsystem/ide-build-manager.c
index 93cdc11..74c641a 100644
--- a/libide/buildsystem/ide-build-manager.c
+++ b/libide/buildsystem/ide-build-manager.c
@@ -316,8 +316,6 @@ failure:
       egg_signal_group_set_target (self->pipeline_signals, NULL);
     }
 
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 
@@ -401,8 +399,6 @@ ide_build_manager_invalidate_pipeline (IdeBuildManager *self)
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_MESSAGE]);
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RUNNING_TIME]);
 
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 
@@ -994,8 +990,6 @@ ide_build_manager_execute_cb (GObject      *object,
   g_task_return_boolean (task, TRUE);
 
 failure:
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 
@@ -1036,8 +1030,6 @@ ide_build_manager_save_all_cb (GObject      *object,
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_LAST_BUILD_TIME]);
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RUNNING_TIME]);
 
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 
@@ -1134,8 +1126,6 @@ ide_build_manager_execute_async (IdeBuildManager     *self,
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_LAST_BUILD_TIME]);
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_RUNNING_TIME]);
 
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 
@@ -1186,15 +1176,9 @@ ide_build_manager_clean_cb (GObject      *object,
   g_assert (IDE_IS_BUILD_MANAGER (self));
 
   if (!ide_build_pipeline_clean_finish (pipeline, result, &error))
-    {
-      g_task_return_error (task, g_steal_pointer (&error));
-      IDE_GOTO (failure);
-    }
-
-  g_task_return_boolean (task, TRUE);
-
-failure:
-  ide_build_manager_propagate_action_enabled (self);
+    g_task_return_error (task, g_steal_pointer (&error));
+  else
+    g_task_return_boolean (task, TRUE);
 }
 
 void
@@ -1239,8 +1223,6 @@ ide_build_manager_clean_async (IdeBuildManager     *self,
 
   g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_HAS_DIAGNOSTICS]);
 
-  ide_build_manager_propagate_action_enabled (self);
-
   IDE_EXIT;
 }
 


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