[gnome-builder/gnome-builder-3-32] projects: set directory property when possible



commit ba3773952ed34ed9679e49370f3da19a4f5686a0
Author: Christian Hergert <chergert redhat com>
Date:   Tue Mar 26 15:49:44 2019 -0700

    projects: set directory property when possible
    
    If we are opening a project based on inode/directory, then we
    can set the project directory of the IdeProjectInfo. This fixes
    an issue introduced by pre-determining symlinks where we would
    set the translated directory but non-translated file.

 src/libide/greeter/ide-greeter-workspace-actions.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/libide/greeter/ide-greeter-workspace-actions.c 
b/src/libide/greeter/ide-greeter-workspace-actions.c
index 9c9c66084..7afb6e22f 100644
--- a/src/libide/greeter/ide-greeter-workspace-actions.c
+++ b/src/libide/greeter/ide-greeter-workspace-actions.c
@@ -53,6 +53,13 @@ ide_greeter_workspace_dialog_response (IdeGreeterWorkspace  *self,
 
           if (module_name != NULL)
             ide_project_info_set_build_system_hint (project_info, module_name);
+
+          /* If this is a directory selection, then make sure we set the
+           * directory on the project-info too. That way we don't rely on
+           * it being set elsewhere (which could be a translated symlink path).
+           */
+          if (g_object_get_data (G_OBJECT (filter), "IS_DIRECTORY"))
+            ide_project_info_set_directory (project_info, project_file);
         }
 
       ide_greeter_workspace_open_project (self, project_info);


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