[polari] chatView: Shut up some GTK+ warnings
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Shut up some GTK+ warnings
- Date: Fri, 20 Nov 2015 11:13:58 +0000 (UTC)
commit 7ce5658a385e7874429d654a329b83958fd088e7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Nov 20 12:12:06 2015 +0100
chatView: Shut up some GTK+ warnings
src/chatView.js | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index b3b027c..2a96c68 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -48,7 +48,8 @@ const TextView = new Lang.Class({
let context = this.get_style_context();
context.save();
context.add_class('dim-label');
- this._dimColor = context.get_color(Gtk.StateFlags.NORMAL);
+ context.set_state(Gtk.StateFlags.NORMAL);
+ this._dimColor = context.get_color(context.get_state());
context.restore();
this.parent();
@@ -232,12 +233,14 @@ const ChatView = new Lang.Class({
let context = this.widget.get_style_context();
context.save();
context.add_class('dim-label');
- let dimColor = context.get_color(Gtk.StateFlags.NORMAL);
+ context.set_state(Gtk.StateFlags.NORMAL);
+ let dimColor = context.get_color(context.get_state());
context.restore();
context.save();
- let linkColor = context.get_color(Gtk.StateFlags.LINK);
- this._activeNickColor = context.get_color(Gtk.StateFlags.LINK);
+ context.set_state(Gtk.StateFlags.LINK);
+ let linkColor = context.get_color(context.get_state());
+ this._activeNickColor = context.get_color(context.get_state());
context.restore();
let desaturatedNickColor = (this._activeNickColor.red +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]