[kupfer: 3/11] plugin.templates: Don't display template extension



commit 391f084a82e0218b7faf9843c7f83dc92c376ae0
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Sat Oct 31 22:51:39 2009 +0100

    plugin.templates: Don't display template extension

 kupfer/plugin/templates.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/plugin/templates.py b/kupfer/plugin/templates.py
index ee49ab5..13b0037 100644
--- a/kupfer/plugin/templates.py
+++ b/kupfer/plugin/templates.py
@@ -47,7 +47,8 @@ def _reversed_action(action, name=None, rank=0):
 class Template (FileLeaf):
 	def __init__(self, path):
 		basename = glib.filename_display_basename(path)
-		FileLeaf.__init__(self, path, _("%s template") % basename)
+		nameroot, ext = os.path.splitext(basename)
+		FileLeaf.__init__(self, path, _("%s template") % nameroot)
 
 	def get_actions(self):
 		yield CreateDocumentIn()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]