[banshee/stable-1.6] [GtkBaseClient] Added --debug-gtkrc support



commit 27ad140aadc3d660012759d290393f994f44a729
Author: Aaron Bockover <abockover novell com>
Date:   Mon May 3 18:14:02 2010 -0400

    [GtkBaseClient] Added --debug-gtkrc support
    
    If this option is passed, gtkrc files will be reloaded if modified since
    the last load, and all styles will be reparsed. This is quite useful
    when hacking on gtkrc files that affect Banshee.

 .../Banshee.Gui/GtkBaseClient.cs                   |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
index 84ea1cb..59f0906 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs
@@ -103,6 +103,17 @@ namespace Banshee.Gui
                 GLib.Thread.Init ();
             }
             Gtk.Application.Init ();
+
+            if (ApplicationContext.CommandLine.Contains ("debug-gtkrc")) {
+                Log.Information ("Note: gtkrc files will be checked for reload every 5 seconds!");
+                GLib.Timeout.Add (5000, delegate {
+                    if (Gtk.Rc.ReparseAll ()) {
+                        Gtk.Rc.ResetStyles (Gtk.Settings.Default);
+                        Log.Information ("gtkrc has been reloaded");
+                    }
+                    return true;
+                });
+            }
         }
 
         protected virtual void PostInitializeGtk ()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]