banshee r3591 - in trunk/banshee: . src/Core/Banshee.Widgets/Banshee.Widgets
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3591 - in trunk/banshee: . src/Core/Banshee.Widgets/Banshee.Widgets
- Date: Sat, 29 Mar 2008 23:24:11 +0000 (GMT)
Author: abock
Date: Sat Mar 29 23:24:11 2008
New Revision: 3591
URL: http://svn.gnome.org/viewvc/banshee?rev=3591&view=rev
Log:
2008-03-29 Aaron Bockover <abock gnome org>
* src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs: Properly fix
the style/color issue with the search entry (BGO #504633) by doing a style
update when the entry style changes and when the entry state changes
* src/Core/Banshee.Widgets/Banshee.Widgets/HoverImageButton.cs: Call the
base expose event, which was preventing the style changes from being
reflected (BGO #504633)
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/HoverImageButton.cs
trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
Modified: trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/HoverImageButton.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/HoverImageButton.cs (original)
+++ trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/HoverImageButton.cs Sat Mar 29 23:24:11 2008
@@ -155,6 +155,8 @@
protected override bool OnExposeEvent(Gdk.EventExpose evnt)
{
+ base.OnExposeEvent(evnt);
+
PropagateExpose(Child, evnt);
if(HasFocus && draw_focus) {
Modified: trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs (original)
+++ trunk/banshee/src/Core/Banshee.Widgets/Banshee.Widgets/SearchEntry.cs Sat Mar 29 23:24:11 2008
@@ -46,7 +46,6 @@
private string empty_message;
private bool ready = false;
- private StateType current_state = StateType.Normal;
private event EventHandler filter_changed;
private event EventHandler entry_changed;
@@ -95,6 +94,7 @@
box.ShowAll();
entry.StyleSet += OnInnerEntryStyleSet;
+ entry.StateChanged += OnInnerEntryStateChanged;
entry.FocusInEvent += OnInnerEntryFocusEvent;
entry.FocusOutEvent += OnInnerEntryFocusEvent;
entry.Changed += OnInnerEntryChanged;
@@ -194,26 +194,25 @@
return false;
}
- private void OnInnerEntryStyleSet(object o, StyleSetArgs args)
+ private void UpdateStyle ()
{
- Gdk.Color color = entry.Style.Base (current_state);
- filter_button.ModifyBg (current_state, color);
- clear_button.ModifyBg (current_state, color);
-
+ Gdk.Color color = entry.Style.Base (entry.State);
+ filter_button.ModifyBg (entry.State, color);
+ clear_button.ModifyBg (entry.State, color);
+
box.BorderWidth = (uint)entry.Style.XThickness;
}
- public new bool Sensitive {
- get { return current_state == StateType.Normal; }
- set {
- current_state = value ? StateType.Normal : StateType.Insensitive;
- box.Sensitive = value;
-
- // Now, redraw the background and text colors.
- OnInnerEntryStyleSet (null, null);
- }
- }
-
+ private void OnInnerEntryStyleSet (object o, StyleSetArgs args)
+ {
+ UpdateStyle ();
+ }
+
+ private void OnInnerEntryStateChanged (object o, EventArgs args)
+ {
+ UpdateStyle ();
+ }
+
private void OnInnerEntryFocusEvent(object o, EventArgs args)
{
QueueDraw();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]