[gnome-builder] ls: Explain the different modes of a page



commit 3f0a51801e4a89866ad799079c2446856ce435b7
Author: vanadiae <vanadiae35 gmail com>
Date:   Sun Dec 27 19:32:25 2020 +0100

    ls: Explain the different modes of a page
    
    Those modes being the vim-like directory listing and a persistent and
    pane-able folder browser.

 src/plugins/ls/gbp-ls-editor-page-addin.c | 3 +++
 src/plugins/ls/gbp-ls-workbench-addin.c   | 3 +++
 2 files changed, 6 insertions(+)
---
diff --git a/src/plugins/ls/gbp-ls-editor-page-addin.c b/src/plugins/ls/gbp-ls-editor-page-addin.c
index 60cb4d4f3..8073d54a9 100644
--- a/src/plugins/ls/gbp-ls-editor-page-addin.c
+++ b/src/plugins/ls/gbp-ls-editor-page-addin.c
@@ -51,6 +51,9 @@ open_directory_cb (GSimpleAction *action,
   directory = g_file_get_parent (file);
 
   stack = gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_STACK);
+  /* When used from an editor view right click menu, the folder browser acts like vim's directory
+   * listing, where it closes once a file is choosen.
+   */
   page = g_object_new (GBP_TYPE_LS_PAGE,
                        "close-on-activate", TRUE,
                        "visible", TRUE,
diff --git a/src/plugins/ls/gbp-ls-workbench-addin.c b/src/plugins/ls/gbp-ls-workbench-addin.c
index 77d86b2f8..1188cdfda 100644
--- a/src/plugins/ls/gbp-ls-workbench-addin.c
+++ b/src/plugins/ls/gbp-ls-workbench-addin.c
@@ -135,6 +135,9 @@ gbp_ls_workbench_addin_open_async (IdeWorkbenchAddin     *addin,
   current_page = ide_workspace_get_most_recent_page (workspace);
   current_frame = gtk_widget_get_ancestor (GTK_WIDGET (current_page), IDE_TYPE_FRAME);
 
+  /* When opening from the project tree, it acts like a persistent folder browser, which doesn't
+   * disappear when opening one of the files.
+   */
   view = g_object_new (GBP_TYPE_LS_PAGE,
                        "close-on-activate", FALSE,
                        "visible", TRUE,


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