diff --git a/src/classes/app.py b/src/classes/app.py index 2c6d0154bf..2884858609 100644 --- a/src/classes/app.py +++ b/src/classes/app.py @@ -128,6 +128,9 @@ def __init__(self, *args, mode=None): # Stop launching and exit sys.exit() + # Set location of OpenShot program (for libopenshot) + openshot.Settings.Instance().PATH_OPENSHOT_INSTALL = info.PATH + # Tests of project data loading/saving self.project = project_data.ProjectDataStore() diff --git a/src/windows/main_window.py b/src/windows/main_window.py index d3535960da..a3b46db194 100644 --- a/src/windows/main_window.py +++ b/src/windows/main_window.py @@ -447,6 +447,8 @@ def actionImportImageSequence_trigger(self, event): def actionClearHistory_trigger(self, event): """Clear history for current project""" + project = get_app().project + project.has_unsaved_changes = True get_app().updates.reset() log.info('History cleared') diff --git a/src/windows/views/files_listview.py b/src/windows/views/files_listview.py index a56eda6371..65df788872 100644 --- a/src/windows/views/files_listview.py +++ b/src/windows/views/files_listview.py @@ -1,27 +1,27 @@ -""" +""" @file @brief This file contains the project file listview, used by the main window @author Noah Figg @author Jonathan Thomas - + @section LICENSE - + Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project dedicated to delivering high quality video editing and animation solutions to the world. - + OpenShot Video Editor is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + OpenShot Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with OpenShot Library. If not, see . """ @@ -151,6 +151,9 @@ def add_file(self, filepath): file_data["media_type"] = "image" elif file_data["has_audio"] and not file_data["has_video"]: file_data["media_type"] = "audio" + else: + # If neither set, just assume video + file_data["media_type"] = "video" # Save new file to the project data file = File() diff --git a/src/windows/views/files_treeview.py b/src/windows/views/files_treeview.py index 82a5bf637f..a6137c768d 100644 --- a/src/windows/views/files_treeview.py +++ b/src/windows/views/files_treeview.py @@ -1,28 +1,28 @@ -""" +""" @file @brief This file contains the project file treeview, used by the main window @author Noah Figg @author Jonathan Thomas @author Olivier Girard - + @section LICENSE - + Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project dedicated to delivering high quality video editing and animation solutions to the world. - + OpenShot Video Editor is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + OpenShot Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with OpenShot Library. If not, see . """ @@ -150,6 +150,9 @@ def add_file(self, filepath): file_data["media_type"] = "image" elif file_data["has_audio"] and not file_data["has_video"]: file_data["media_type"] = "audio" + else: + # If neither set, just assume video + file_data["media_type"] = "video" # Save new file to the project data file = File()