[banshee] [GtkBaseClient] Virtualize GTK initialization
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] [GtkBaseClient] Virtualize GTK initialization
- Date: Mon, 25 May 2009 23:00:27 -0400 (EDT)
commit 64fcee096f27615de4e526aed8796023e0711205
Author: Aaron Bockover <abockover novell com>
Date: Mon May 25 23:02:01 2009 -0400
[GtkBaseClient] Virtualize GTK initialization
Moved the Gtk.Application.Initialize call into a virtual
InitializeGtk method that can be overridden by clients
that may need to do various other initialization at or
around GTK init time (e.g. Clutter).
---
.../Banshee.Gui/GtkBaseClient.cs | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
index da00ea5..dccbade 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
@@ -87,9 +87,11 @@ namespace Banshee.Gui
Initialize (true);
}
}
-
- [System.Runtime.InteropServices.DllImport ("clutter-gtk")]
- private static extern int gtk_clutter_init (IntPtr argc, IntPtr argv);
+
+ protected virtual void InitializeGtk ()
+ {
+ Gtk.Application.Init ();
+ }
protected void Initialize (bool registerCommonServices)
{
@@ -98,14 +100,7 @@ namespace Banshee.Gui
Application.Initialize ();
- // Initialize Clutter/GTK
- try {
- if (gtk_clutter_init (IntPtr.Zero, IntPtr.Zero) != 1) {
- Gtk.Application.Init ();
- }
- } catch {
- Gtk.Application.Init ();
- }
+ InitializeGtk ();
Gtk.Window.DefaultIconName = default_icon_name;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]