File polari-chatView-switch-away-from-deprecated-API.patch of Package polari

From 1ac95a6b087fd929b48a9f3a90eb81bb76abbf72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bastian=20Ils=C3=B8?= <bastianilso@src.gnome.org>
Date: Wed, 15 Apr 2015 20:55:09 +0200
Subject: 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

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',
-- 
cgit v0.10.2

openSUSE Build Service is sponsored by