[meld] ui.cellrenderers: Make getter defaults consistent with our empty state
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] ui.cellrenderers: Make getter defaults consistent with our empty state
- Date: Wed, 12 Sep 2018 11:55:59 +0000 (UTC)
commit 37451c02c3f2e3ebb8baf9843246d020591042d0
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Sep 2 10:28:00 2018 +1000
ui.cellrenderers: Make getter defaults consistent with our empty state
Defaulting these getters to None isn't really what we want, because we
actually consider -1 to be our "empty" state now that we're not using
pygobjects for the columns.
meld/ui/cellrenderers.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/meld/ui/cellrenderers.py b/meld/ui/cellrenderers.py
index 807e5bb3..11a85d9e 100644
--- a/meld/ui/cellrenderers.py
+++ b/meld/ui/cellrenderers.py
@@ -26,7 +26,7 @@ class CellRendererDate(Gtk.CellRendererText):
DATETIME_FORMAT = "%a %d %b %Y %H:%M:%S"
def get_timestamp(self):
- return getattr(self, '_datetime', None)
+ return getattr(self, '_datetime', -1.0)
def set_timestamp(self, value):
if value == self.get_timestamp():
@@ -52,7 +52,7 @@ class CellRendererByteSize(Gtk.CellRendererText):
__gtype_name__ = "CellRendererByteSize"
def get_bytesize(self):
- return getattr(self, '_bytesize', None)
+ return getattr(self, '_bytesize', -1)
def set_bytesize(self, value):
if value == self.get_bytesize():
@@ -86,7 +86,7 @@ class CellRendererFileMode(Gtk.CellRendererText):
__gtype_name__ = "CellRendererFileMode"
def get_file_mode(self):
- return getattr(self, '_file_mode', None)
+ return getattr(self, '_file_mode', -1)
def set_file_mode(self, value):
if value == self.get_file_mode():
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]