diff --git a/polari-chatView-switch-away-from-deprecated-API.patch b/polari-chatView-switch-away-from-deprecated-API.patch new file mode 100644 index 0000000..ab6c62b --- /dev/null +++ b/polari-chatView-switch-away-from-deprecated-API.patch @@ -0,0 +1,39 @@ +From 1ac95a6b087fd929b48a9f3a90eb81bb76abbf72 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bastian=20Ils=C3=B8?= +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 + diff --git a/polari.changes b/polari.changes index 5d2537f..b314031 100644 --- a/polari.changes +++ b/polari.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat May 2 11:52:52 UTC 2015 - zaitor@opensuse.org + +- Add polari-chatView-switch-away-from-deprecated-API.patch: No + longer use deprecated API, patch from upstream git, stable + branch (bgo#747942). + ------------------------------------------------------------------- Wed Apr 15 22:07:16 UTC 2015 - dimstar@opensuse.org diff --git a/polari.spec b/polari.spec index 0da5329..327368e 100644 --- a/polari.spec +++ b/polari.spec @@ -25,6 +25,8 @@ License: GPL-2.0+ and LGPL-2.1+ Group: Productivity/Networking/IRC Url: http://wiki.gnome.org/Apps/Polari Source0: http://download.gnome.org/sources/polari/3.16/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM polari-chatView-switch-away-from-deprecated-API.patch bgo#747942 zaitor@opensuse.org -- No longer use deprecated API, patch from upstream git, stable branch. +Patch0: polari-chatView-switch-away-from-deprecated-API.patch BuildRequires: gjs BuildRequires: hicolor-icon-theme BuildRequires: intltool >= 0.50.0 @@ -53,6 +55,7 @@ with GNOME 3. %lang_package %prep %setup -q +%patch0 -p1 %build %configure