[kupfer] Show empty TextLeaf as (Empty Text)
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] Show empty TextLeaf as (Empty Text)
- Date: Tue, 1 Mar 2011 21:37:38 +0000 (UTC)
commit b764e034e506962c25ac271bf515b7bf10e87d1f
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Tue Mar 1 21:03:19 2011 +0100
Show empty TextLeaf as (Empty Text)
kupfer/obj/objects.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/obj/objects.py b/kupfer/obj/objects.py
index 1c83c2f..2cb1d90 100644
--- a/kupfer/obj/objects.py
+++ b/kupfer/obj/objects.py
@@ -383,6 +383,8 @@ class TextLeaf (Leaf, TextRepresentation):
if not name:
lines = [l for l in text.splitlines() if l.strip()]
name = lines[0] if lines else text
+ if len(text) == 0:
+ name = _("(Empty Text)")
Leaf.__init__(self, text, name)
def get_actions(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]