banshee r3280 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- From: abock svn gnome org
- To: svn-commits-list gnome org
- Subject: banshee r3280 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Wed, 20 Feb 2008 03:50:33 +0000 (GMT)
Author: abock
Date: Wed Feb 20 03:50:33 2008
New Revision: 3280
URL: http://svn.gnome.org/viewvc/banshee?rev=3280&view=rev
Log:
2008-02-19 Aaron Bockover <abock gnome org>
* src/Clients/Nereid/Nereid/PlayerInterface.cs: Apply the window default
background to override the toolbar background instead of just a flat
colored rectangle; should play nicer with some themes
* src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs:
Apply a default background and override OnUnrealized and OnUnmapped
* src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs:
Remove WidgetFlags.Realized in OnUnrealized
Modified:
trunk/banshee/ChangeLog
trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
Modified: trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
==============================================================================
--- trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs (original)
+++ trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs Wed Feb 20 03:50:33 2008
@@ -126,6 +126,8 @@
BuildHeader ();
BuildViews ();
BuildFooter ();
+
+ this.Colormap = Gdk.Screen.Default.RgbaColormap;
primary_vbox.Show ();
Add (primary_vbox);
@@ -348,11 +350,12 @@
private void OnHeaderToolbarExposeEvent (object o, ExposeEventArgs args)
{
- // This forces the toolbar to look like it's just a regular plain container
- // since the stock toolbar look makes Banshee look ugly.
- header_toolbar.GdkWindow.DrawRectangle (Style.BackgroundGC (header_toolbar.State),
- true, header_toolbar.Allocation);
-
+ // This forces the toolbar to look like it's just a regular part
+ // of the window since the stock toolbar look makes Banshee look ugly.
+ Style.ApplyDefaultBackground (header_toolbar.GdkWindow, true, State,
+ args.Event.Area, header_toolbar.Allocation.X, header_toolbar.Allocation.Y,
+ header_toolbar.Allocation.Width, header_toolbar.Allocation.Height);
+
// Manually expose all the toolbar's children
foreach (Widget child in header_toolbar.Children) {
header_toolbar.PropagateExpose (child, args.Event);
Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs (original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs Wed Feb 20 03:50:33 2008
@@ -106,13 +106,10 @@
attributes.Visual = Visual;
attributes.Wclass = Gdk.WindowClass.InputOutput;
attributes.Colormap = Colormap;
- attributes.EventMask = (int)(Gdk.EventMask.VisibilityNotifyMask |
+ attributes.EventMask = (int)(
+ Gdk.EventMask.VisibilityNotifyMask |
Gdk.EventMask.ExposureMask |
Gdk.EventMask.PointerMotionMask |
- Gdk.EventMask.EnterNotifyMask |
- Gdk.EventMask.LeaveNotifyMask |
- Gdk.EventMask.ButtonPressMask |
- Gdk.EventMask.ButtonReleaseMask |
Events);
Gdk.WindowAttributesType attributes_mask =
@@ -129,11 +126,26 @@
Style = Style.Attach (GdkWindow);
}
+ protected override void OnUnrealized ()
+ {
+ WidgetFlags ^= WidgetFlags.Realized;
+ GdkWindow.UserData = IntPtr.Zero;
+ GdkWindow.Destroy ();
+ GdkWindow = null;
+ }
+
protected override void OnMapped ()
{
+ WidgetFlags |= WidgetFlags.Mapped;
GdkWindow.Show ();
}
+ protected override void OnUnmapped ()
+ {
+ WidgetFlags ^= WidgetFlags.Mapped;
+ GdkWindow.Hide ();
+ }
+
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
{
base.OnSizeAllocated (allocation);
@@ -233,10 +245,13 @@
protected override bool OnExposeEvent (Gdk.EventExpose evnt)
{
- if (!Visible) {
+ if (!Visible || !IsMapped) {
return true;
}
+ Style.ApplyDefaultBackground (GdkWindow, true, StateType.Normal, evnt.Area,
+ 0, 0, Allocation.Width, Allocation.Height);
+
Cairo.Context cr = Gdk.CairoHelper.Create (evnt.Window);
foreach (Gdk.Rectangle rect in evnt.Region.GetRectangles ()) {
Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs (original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs Wed Feb 20 03:50:33 2008
@@ -164,6 +164,8 @@
protected override void OnUnrealized ()
{
+ WidgetFlags ^= WidgetFlags.Realized;
+
left_border_window.UserData = IntPtr.Zero;
left_border_window.Destroy ();
left_border_window = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]