diff options
author | James Simmons <jim@sugarlabs.simmons> | 2011-08-07 13:29:45 (GMT) |
---|---|---|
committer | James Simmons <jim@sugarlabs.simmons> | 2011-08-07 13:29:45 (GMT) |
commit | bef750d2bb2831b9903b413c93f49b95210359ac (patch) | |
tree | 4d565578c60e8b626f5bce4e0b67ca2737abdb0a | |
parent | 0f87c937972e496d000d2f8ef2ba04d73827b920 (diff) |
Save Journal log on focus shift
-rwxr-xr-x | sugarcommander.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sugarcommander.py b/sugarcommander.py index 9552f06..daf46f3 100755 --- a/sugarcommander.py +++ b/sugarcommander.py @@ -457,16 +457,17 @@ class SugarCommander(activity.Activity): def write_file(self, filename): "Save meta data for the file." - if self.close_requested: - old_description = self.metadata.get('description', 'Sugar Commander log:') - new_description = old_description + self.update_log_entries - self.metadata['description'] = new_description - self.metadata['mime_type'] = 'text/plain' - f = open(filename, 'w') - try: - f.write(new_description) - finally: - f.close() + # if self.close_requested: + old_description = self.metadata.get('description', 'Sugar Commander log:') + new_description = old_description + self.update_log_entries + self.metadata['description'] = new_description + self.metadata['mime_type'] = 'text/plain' + f = open(filename, 'w') + try: + f.write(new_description) + finally: + f.close() + self.update_log_entries = '' def can_close(self): self.close_requested = True |