[polari/gnome-3-16] chatView: switch away from deprecated API



commit 1ac95a6b087fd929b48a9f3a90eb81bb76abbf72
Author: Bastian Ilsø <bastianilso src gnome org>
Date:   Wed Apr 15 20:55:09 2015 +0200

    chatView: switch away from deprecated API
    
    The chat view is currently using the selection background color for
    nick names. However as gtk_style_context_get_background_color() has been
    deprecated in GTK+ 3.16, use the foreground color for the LINK state
    instead, which should be identical for the default theme.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747942

 src/chatView.js |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index a915620..04e1a07 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -187,18 +187,13 @@ const ChatView = new Lang.Class({
         let dimColor = context.get_color(Gtk.StateFlags.NORMAL);
         context.restore();
 
-        context.save();
-        context.add_class('view');
-        let selectedColor = context.get_background_color(Gtk.StateFlags.SELECTED);
-        context.restore();
-
         let linkColor = context.get_color(Gtk.StateFlags.LINK);
 
         let buffer = this._view.get_buffer();
         let tagTable = buffer.get_tag_table();
         let tags = [
           { name: 'nick',
-            foreground_rgba: selectedColor },
+            foreground_rgba: linkColor },
           { name: 'status',
             foreground_rgba: dimColor },
           { name: 'timestamp',


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