[sabayon] Changes window now distinguishes between files, dirs, and links
- From: Scott Balneaves <sbalneav src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sabayon] Changes window now distinguishes between files, dirs, and links
- Date: Thu, 28 Jan 2010 21:52:27 +0000 (UTC)
commit 8c9b22802dec377a89829c3925e01f3455473f2c
Author: Scott Balneaves <sbalneav ltsp org>
Date: Thu Jan 28 15:52:22 2010 -0600
Changes window now distinguishes between files, dirs, and links
lib/sources/filessource.py | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/lib/sources/filessource.py b/lib/sources/filessource.py
index 719d263..a5cd672 100755
--- a/lib/sources/filessource.py
+++ b/lib/sources/filessource.py
@@ -65,12 +65,19 @@ class FilesChange (userprofile.ProfileChange):
def get_short_description (self):
utf8_rel_path = gobject.filename_display_name (self.rel_path)
+ if os.path.isdir(self.rel_path):
+ filetype = _("Directory")
+ elif os.path.islink(self.rel_path):
+ filetype = _("Link")
+ else
+ filetype = _("File")
if self.event == dirmonitor.CREATED:
- return _("File '%s' created") % utf8_rel_path
+ return _("%s '%s' created") % (filetype, utf8_rel_path)
elif self.event == dirmonitor.DELETED:
- return _("File '%s' deleted") % utf8_rel_path
+ return _("%s '%s' deleted") % (filetype, utf8_rel_path)
elif self.event == dirmonitor.CHANGED:
- return _("File '%s' changed") % utf8_rel_path
+ return _("%s '%s' changed") % (filetype, utf8_rel_path)
+
gobject.type_register (FilesChange)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]