Skip to content

Commit f01dfde

Browse files
Jeremy WoottenJeremy Wootten
authored andcommitted
On close other folders make remaining active
1 parent 24da045 commit f01dfde

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/FolderManager/FileView.vala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ public class Scratch.FolderManager.FileView : Code.Widgets.SourceList, Code.Pane
118118
}
119119
}
120120

121+
//Make remaining project the active one
122+
git_manager.active_project_path = path;
123+
121124
write_settings ();
122125
}
123126

src/Widgets/ChooseProjectButton.vala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,17 @@ public class Code.ChooseProjectButton : Gtk.MenuButton {
114114

115115
project_listbox.row_activated.connect ((row) => {
116116
var project_entry = ((ProjectRow) row);
117-
Scratch.Services.GitManager.get_instance ().active_project_path = project_entry.project_path;
117+
git_manager.active_project_path = project_entry.project_path;
118118
project_chosen ();
119119
});
120120

121121
realize.connect (() => {
122122
set_active_path (git_manager.active_project_path);
123123
git_manager.notify["active-project-path"].connect (() => {
124+
// Sync menubutton states
124125
set_active_path (git_manager.active_project_path);
126+
// Signal window to update as required (e.g. terminal)
127+
project_chosen ();
125128
});
126129
});
127130
}

0 commit comments

Comments
 (0)