File tree Expand file tree Collapse file tree
activity_browser/actions/project Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010from activity_browser .actions .base import ABAction , exception_dialogs
1111from activity_browser .ui .icons import qicons
1212
13+ from .project_switch import ProjectSwitch
14+
1315
1416class ProjectDelete (ABAction ):
1517 """
@@ -67,12 +69,10 @@ def run(project_names: [str] = None):
6769
6870 # try to delete the project, delete directory if user specified so
6971 if bd .projects .current in project_names :
70- bd . projects . set_current (settings .ab_settings .startup_project )
72+ ProjectSwitch . run (settings .ab_settings .startup_project )
7173
7274 for project in project_names :
73- bd .projects .delete_project (
74- project , delete_dialog .deletion_warning_checked ()
75- )
75+ ProjectDelete .delete_project (project , delete_dialog .deletion_warning_checked ())
7676
7777 # inform the user of successful deletion
7878 QtWidgets .QMessageBox .information (
@@ -89,7 +89,7 @@ def delete_project(name: str, delete_dir: bool):
8989 assert dir_path .is_dir (), "Can't find project directory"
9090 shutil .rmtree (dir_path )
9191
92- ds .delete ()
92+ ds .delete_instance ()
9393
9494
9595class ProjectDeletionDialog (QtWidgets .QDialog ):
You can’t perform that action at this time.
0 commit comments