[banshee/gtk3] Lastfm: Update to the new GTK theming API
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/gtk3] Lastfm: Update to the new GTK theming API
- Date: Wed, 27 Jul 2011 17:54:11 +0000 (UTC)
commit a51d186070f8abf5268ddd2aefe0b14f74b67e1e
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Wed Jul 27 19:32:36 2011 +0200
Lastfm: Update to the new GTK theming API
.../RecommendationPane.cs | 7 ++++---
.../Banshee.Lastfm/LastfmSourceContents.cs | 12 ++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Recommendations/RecommendationPane.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Recommendations/RecommendationPane.cs
index 8c78ba2..883d894 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Recommendations/RecommendationPane.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Recommendations/RecommendationPane.cs
@@ -229,7 +229,8 @@ namespace Banshee.Lastfm.Recommendations
protected override void OnStyleSet (Style previous_style)
{
base.OnStyleSet (previous_style);
- similar_artists_view.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
+ similar_artists_view.OverrideBackgroundColor (StateFlags.Normal,
+ StyleContext.GetBackgroundColor (StateFlags.Normal));
}
private class RefreshRecommendationsJob : Banshee.Kernel.Job
@@ -304,7 +305,7 @@ namespace Banshee.Lastfm.Recommendations
album_button.Relief = ReliefStyle.None;
Label label = new Label ();
- label.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
+ label.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
label.Ellipsize = Pango.EllipsizeMode.End;
label.Xalign = 0;
label.Markup = String.Format ("{0}. {1}", i+1, GLib.Markup.EscapeText (album.Name));
@@ -325,7 +326,7 @@ namespace Banshee.Lastfm.Recommendations
HBox box = new HBox ();
Label label = new Label ();
- label.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
+ label.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
label.Ellipsize = Pango.EllipsizeMode.End;
label.Xalign = 0;
label.Markup = String.Format ("{0}. {1}", i+1, GLib.Markup.EscapeText (track.Name));
diff --git a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/LastfmSourceContents.cs b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/LastfmSourceContents.cs
index a6819e3..07620be 100644
--- a/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/LastfmSourceContents.cs
+++ b/src/Extensions/Banshee.Lastfm/Banshee.Lastfm/LastfmSourceContents.cs
@@ -55,9 +55,9 @@ namespace Banshee.Lastfm
viewport.Add (main_box);
- StyleSet += delegate {
- viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
- viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
+ StyleUpdated += delegate {
+ viewport.OverrideBackgroundColor (StateFlags.Normal, StyleContext.GetBackgroundColor (StateFlags.Normal));
+ viewport.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
};
AddWithFrame (viewport);
@@ -194,9 +194,9 @@ namespace Banshee.Lastfm
PackStart (tile_view, true, true, 0);
tile_view.Show ();
- StyleSet += delegate {
- tile_view.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
- tile_view.ModifyFg (StateType.Normal, Style.Text (StateType.Normal));
+ StyleUpdated += delegate {
+ tile_view.OverrideBackgroundColor (StateFlags.Normal, StyleContext.GetBackgroundColor (StateFlags.Normal));
+ tile_view.OverrideColor (StateFlags.Normal, StyleContext.GetColor (StateFlags.Normal));
};
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]