[gnome-shell/wip/fmuellner/notification-redux+sass: 185/207] calendar: Allow to turn on markup



commit d35533767612c0a4feaaca1ec31c5c426990eee7
Author: Florian Müllner <fmuellner gnome org>
Date:   Mon Feb 16 20:14:28 2015 +0100

    calendar: Allow to turn on markup
    
    Notifications may make use of markup, so

 js/ui/calendar.js |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 6beb5f0..339fe16 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1054,7 +1054,7 @@ const Message = new Lang.Class({
         this._closeButton = new St.Button({ child: closeIcon, visible: false });
         titleBox.add_actor(this._closeButton);
 
-        this.bodyLabel = new URLHighlighter(body, false, false);
+        this.bodyLabel = new URLHighlighter(body, false, this._useBodyMarkup);
         this.bodyLabel.actor.add_style_class_name('message-body');
         contentBox.add_actor(this.bodyLabel.actor);
 
@@ -1076,6 +1076,14 @@ const Message = new Lang.Class({
         this._secondaryBin.child = actor;
     },
 
+    setUseBodyMarkup: function(enable) {
+        if (this._useBodyMarkup === enable)
+            return;
+        this._useBodyMarkup = enable;
+        if (this.bodyLabel)
+            this.bodyLabel.setMarkup(this.bodyLabel.actor.text, enable);
+    },
+
     canClear: function() {
         return true;
     },


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