diff options
author | fiaxh <git@mx.ax.lt> | 2017-09-19 22:41:33 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-09-19 23:39:17 +0200 |
commit | 8fdb38b99be9c588148d576c23212af765ff7302 (patch) | |
tree | 2971a06390d8499a19487c3832df994f1769f6ea /main/src/ui/util/label_hybrid.vala | |
parent | 1f0df864453f4fd9c3d8ba2d90f3def26cbdf862 (diff) | |
download | dino-8fdb38b99be9c588148d576c23212af765ff7302.tar.gz dino-8fdb38b99be9c588148d576c23212af765ff7302.zip |
Use GNotification instead of libnotify
Diffstat (limited to 'main/src/ui/util/label_hybrid.vala')
-rw-r--r-- | main/src/ui/util/label_hybrid.vala | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/main/src/ui/util/label_hybrid.vala b/main/src/ui/util/label_hybrid.vala index ab765dd1..8ca56316 100644 --- a/main/src/ui/util/label_hybrid.vala +++ b/main/src/ui/util/label_hybrid.vala @@ -34,13 +34,7 @@ public class EntryLabelHybrid : LabelHybrid { get { return entry.text; } set { entry.text = value; - if (visibility) { - label.label = value; - } else { - string filler = ""; - for (int i = 0; i < value.length; i++) filler += entry.get_invisible_char().to_string(); - label.label = filler; - } + set_label_label(value); } } @@ -83,7 +77,7 @@ public class EntryLabelHybrid : LabelHybrid { if (event.keyval == Gdk.Key.Return) { show_label(); } else { - label.label = entry.text; + set_label_label(entry.text); } return false; }); @@ -93,6 +87,16 @@ public class EntryLabelHybrid : LabelHybrid { }); } + private void set_label_label(string value) { + if (visibility) { + label.label = value; + } else { + string filler = ""; + for (int i = 0; i < value.length; i++) filler += entry.get_invisible_char().to_string(); + label.label = filler; + } + } + private void update_label() { text = text; } |