[banshee/stable] Revert "Instantiate Hyena.Gui themes from the ThemeEngine, not GtkTheme directly"
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee/stable] Revert "Instantiate Hyena.Gui themes from the ThemeEngine, not GtkTheme directly"
- Date: Fri, 15 May 2009 22:57:30 -0400 (EDT)
commit 79a9aea66fb3d6c9a0b7bda8fdf7dec885806ce4
Author: Aaron Bockover <abockover novell com>
Date: Fri May 15 22:54:34 2009 -0400
Revert "Instantiate Hyena.Gui themes from the ThemeEngine, not GtkTheme directly"
This reverts commit 9e61e6a91230d75ab6c77d270c62fa5c6f6930f0.
---
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 2 +-
.../Hyena.Gui/Hyena.Gui.Theming/ThemeEngine.cs | 67 --------------------
src/Libraries/Hyena.Gui/Hyena.Gui.csproj | 4 +-
.../Hyena.Gui/Hyena.Widgets/MessageBar.cs | 2 +-
.../Hyena.Gui/Hyena.Widgets/RoundedFrame.cs | 2 +-
src/Libraries/Hyena.Gui/Makefile.am | 1 -
6 files changed, 5 insertions(+), 73 deletions(-)
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 13ef716..359e815 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -67,7 +67,7 @@ namespace Hyena.Data.Gui
base.OnStyleSet (old_style);
RecomputeRowHeight = true;
- theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
+ theme = new GtkTheme (this);
// Save the drawable so we can reuse it
Gdk.Drawable drawable = cell_context != null ? cell_context.Drawable : null;
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/ThemeEngine.cs b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/ThemeEngine.cs
deleted file mode 100644
index 983b530..0000000
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/ThemeEngine.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// ThemeEngine.cs
-//
-// Author:
-// Aaron Bockover <abockover novell com>
-//
-// Copyright 2009 Aaron Bockover
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-using System;
-
-namespace Hyena.Gui.Theming
-{
- internal class SuperHackThemeEngineProviderArgs : EventArgs
- {
- private Gtk.Widget widget;
- public Gtk.Widget Widget {
- get { return widget; }
- set { widget = value; }
- }
-
- private Theme theme;
- public Theme Theme {
- set { theme = value; }
- get { return theme; }
- }
- }
-
- public static class ThemeEngine
- {
- private static EventHandler provider;
-
- public static void SetProvider (EventHandler provider)
- {
- ThemeEngine.provider = provider;
- }
-
- public static Theme CreateTheme (Gtk.Widget widget)
- {
- if (provider == null) {
- return new GtkTheme (widget);
- }
-
- SuperHackThemeEngineProviderArgs args = new SuperHackThemeEngineProviderArgs ();
- args.Widget = widget;
- provider (null, args);
- return args.Theme ?? new GtkTheme (widget);
- }
- }
-}
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.csproj b/src/Libraries/Hyena.Gui/Hyena.Gui.csproj
index b86e566..170d7de 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.csproj
+++ b/src/Libraries/Hyena.Gui/Hyena.Gui.csproj
@@ -29,7 +29,7 @@
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
- <Reference Include="Mono.Cairo" />
+ <Reference Include="Mono.Cairo, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<Reference Include="System.Xml" />
@@ -127,13 +127,13 @@
<Compile Include="Hyena.Gui.Theatrics\Pulsator.cs" />
<Compile Include="Hyena.Gui\PixbufImageSurface.cs" />
<Compile Include="Hyena.Widgets\TextViewEditable.cs" />
- <Compile Include="Hyena.Gui.Theming\ThemeEngine.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Deployment.LinuxDeployData generateScript="false" />
+ <GtkDesignInfo />
<MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="true" RelativeMakefileName="Makefile.am">
<BuildFilesVar Sync="true" Name="SOURCES" />
<DeployFilesVar />
diff --git a/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs b/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
index 8e7e7b4..4a0a320 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Widgets/MessageBar.cs
@@ -111,7 +111,7 @@ namespace Hyena.Widgets
protected override void OnRealized ()
{
base.OnRealized ();
- theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
+ theme = new GtkTheme (this);
}
protected override void OnSizeAllocated (Gdk.Rectangle allocation)
diff --git a/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs b/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
index ddee186..da7d93e 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
@@ -92,7 +92,7 @@ namespace Hyena.Widgets
protected override void OnRealized ()
{
base.OnRealized ();
- theme = Hyena.Gui.Theming.ThemeEngine.CreateTheme (this);
+ theme = new GtkTheme (this);
}
protected override void OnSizeRequested (ref Requisition requisition)
diff --git a/src/Libraries/Hyena.Gui/Makefile.am b/src/Libraries/Hyena.Gui/Makefile.am
index 86a5731..91736bc 100644
--- a/src/Libraries/Hyena.Gui/Makefile.am
+++ b/src/Libraries/Hyena.Gui/Makefile.am
@@ -40,7 +40,6 @@ SOURCES = \
Hyena.Gui.Theming/GtkTheme.cs \
Hyena.Gui.Theming/Theme.cs \
Hyena.Gui.Theming/ThemeContext.cs \
- Hyena.Gui.Theming/ThemeEngine.cs \
Hyena.Gui/CairoExtensions.cs \
Hyena.Gui/CleanRoomStartup.cs \
Hyena.Gui/CompositeUtils.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]