[meld] meldbuffer: New-style property declaration
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] meldbuffer: New-style property declaration
- Date: Mon, 4 Nov 2013 20:08:25 +0000 (UTC)
commit d8ea4e921d42f49100af6c182b7c86feb5d76dca
Author: Kai Willadsen <kai willadsen gmail com>
Date: Mon Nov 4 06:43:42 2013 +1000
meldbuffer: New-style property declaration
meld/meldbuffer.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/meld/meldbuffer.py b/meld/meldbuffer.py
index d23d917..d9050aa 100644
--- a/meld/meldbuffer.py
+++ b/meld/meldbuffer.py
@@ -98,15 +98,15 @@ class MeldBufferData(GObject.GObject):
def __del__(self):
self._disconnect_monitor()
- def get_label(self):
+ @property
+ def label(self):
#TRANSLATORS: This is the label of a new, currently-unnamed file.
return self._label or _("<unnamed>")
- def set_label(self, value):
+ @label.setter
+ def label(self, value):
self._label = value
- label = property(get_label, set_label)
-
def _connect_monitor(self):
if self._filename:
monitor = Gio.File.new_for_path(self._filename).monitor_file(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]