[gnome-builder/gnome-builder-3-30] git: update status message when checkout directory changes



commit 0dbafebf62ae165ef017698dcbe547a5abff2ab8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Oct 11 11:35:00 2018 -0700

    git: update status message when checkout directory changes
    
    Fixes #667

 src/plugins/git/ide-git-clone-widget.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/src/plugins/git/ide-git-clone-widget.c b/src/plugins/git/ide-git-clone-widget.c
index 19adfda6f..d4c085be3 100644
--- a/src/plugins/git/ide-git-clone-widget.c
+++ b/src/plugins/git/ide-git-clone-widget.c
@@ -182,6 +182,18 @@ ide_git_clone_widget_uri_changed (IdeGitCloneWidget *self,
     }
 }
 
+static void
+ide_git_clone_widget_location_changed (IdeGitCloneWidget   *self,
+                                       GParamSpec          *pspec,
+                                       DzlFileChooserEntry *chooser)
+{
+  g_assert (IDE_IS_GIT_CLONE_WIDGET (self));
+  g_assert (pspec != NULL);
+  g_assert (DZL_IS_FILE_CHOOSER_ENTRY (chooser));
+
+  ide_git_clone_widget_uri_changed (self, self->clone_uri_entry);
+}
+
 static void
 branch_popover_activate_cb (IdeGitCloneWidget *self,
                             const gchar       *text,
@@ -305,6 +317,12 @@ ide_git_clone_widget_init (IdeGitCloneWidget *self)
 
   dzl_file_chooser_entry_set_file (self->clone_location_entry, projects_dir);
 
+  g_signal_connect_object (self->clone_location_entry,
+                           "notify::file",
+                           G_CALLBACK (ide_git_clone_widget_location_changed),
+                           self,
+                           G_CONNECT_SWAPPED);
+
   g_signal_connect_object (self->clone_uri_entry,
                            "changed",
                            G_CALLBACK (ide_git_clone_widget_uri_changed),


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