[gnome-builder] plugins/recent: update recent projects after loading project



commit eff1496a91d69988a2c7ce67d761b204b3e75c87
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 20 15:43:38 2022 -0700

    plugins/recent: update recent projects after loading project
    
    This ensures the project is available in the recent projects at the greeter
    if you return to it without exiting Builder.
    
    Fixes #1667

 src/plugins/recent/gbp-recent-workbench-addin.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/recent/gbp-recent-workbench-addin.c b/src/plugins/recent/gbp-recent-workbench-addin.c
index 84a57f7f5..8477fb207 100644
--- a/src/plugins/recent/gbp-recent-workbench-addin.c
+++ b/src/plugins/recent/gbp-recent-workbench-addin.c
@@ -208,6 +208,9 @@ gbp_recent_workbench_addin_add_recent (GbpRecentWorkbenchAddin *self,
       g_clear_error (&error);
     }
 
+  /* Request that the recent projects be reloaded */
+  ide_recent_projects_invalidate (ide_recent_projects_get_default ());
+
   IDE_EXIT;
 }
 
@@ -248,7 +251,7 @@ workbench_addin_iface_init (IdeWorkbenchAddinInterface *iface)
 }
 
 G_DEFINE_FINAL_TYPE_WITH_CODE (GbpRecentWorkbenchAddin, gbp_recent_workbench_addin, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (IDE_TYPE_WORKBENCH_ADDIN, workbench_addin_iface_init))
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_WORKBENCH_ADDIN, workbench_addin_iface_init))
 
 static void
 gbp_recent_workbench_addin_class_init (GbpRecentWorkbenchAddinClass *klass)


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