banshee r4852 - in trunk/banshee: . src/Clients/Booter src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor src/Libraries/Hyena.Gui/Hyena.Gui



Author: abock
Date: Mon Nov 24 17:39:36 2008
New Revision: 4852
URL: http://svn.gnome.org/viewvc/banshee?rev=4852&view=rev

Log:
2008-11-24  Aaron Bockover  <abock gnome org>

    * src/Clients/Booter/banshee-1.in: Fixed quoting in wrapper script so
    filenames with spaces work; especially important since Dolphin/Konqueror do     not use URIs for local file paths even though %U is specified in the 
    .desktop file (BNC #440883)
    
    * src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs:
    * src/Libraries/Hyena.Gui/Hyena.Gui/GtkUtilities.cs: Moved ForeachWidget
    method into GtkUtilities so it can be reused by third party extensions,
    which is particularly useful (BGO #562151)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Clients/Booter/banshee-1.in
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/GtkUtilities.cs

Modified: trunk/banshee/src/Clients/Booter/banshee-1.in
==============================================================================
--- trunk/banshee/src/Clients/Booter/banshee-1.in	(original)
+++ trunk/banshee/src/Clients/Booter/banshee-1.in	Mon Nov 24 17:39:36 2008
@@ -37,13 +37,13 @@
 fi
 
 # Finally - environment is set up, time to run our beloved
-exec_args="-a banshee-1 mono $MONO_OPTIONS $MONO_EXE $@"
+exec_args="-a banshee-1 mono $MONO_OPTIONS $MONO_EXE"
 
 if [ -z "$BANSHEE_REDIRECT_LOG" ]; then
-	exec $exec_args
+	exec $exec_args "$@"
 else
 	mkdir -p `dirname "$BANSHEE_REDIRECT_LOG"`
-	exec $exec_args &> $BANSHEE_REDIRECT_LOG
+	exec $exec_args "$@" &> $BANSHEE_REDIRECT_LOG
 fi
 
 

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs	Mon Nov 24 17:39:36 2008
@@ -283,34 +283,13 @@
             button_box.ShowAll ();
         }
         
-        private delegate void WidgetAction<T> (T widget) where T : class;
-        
-        private void ForeachWidget<T> (WidgetAction<T> action) where T : class
+        public void ForeachWidget<T> (WidgetAction<T> action) where T : class
         {
             for (int i = 0; i < notebook.NPages; i++) {
-                ForeachWidget (notebook.GetNthPage (i) as Container, action);
+                GtkUtilities.ForeachWidget (notebook.GetNthPage (i) as Container, action);
             }     
         }
-        
-        private void ForeachWidget<T> (Container container, WidgetAction<T> action) where T : class
-        {
-            if (container == null) {
-                return;
-            }
-            
-            foreach (Widget child in container.Children) {
-                T widget = child as T;
-                if (widget != null) {
-                    action (widget);
-                } else {
-                    Container child_container = child as Container;
-                    if (child_container != null) {
-                        ForeachWidget<T> (child_container, action);
-                    }
-                }
-            }
-        }
-        
+
         private void InvokeFieldSync ()
         {
             ForeachWidget<SyncButton> (delegate (SyncButton button) {

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/GtkUtilities.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/GtkUtilities.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/GtkUtilities.cs	Mon Nov 24 17:39:36 2008
@@ -31,6 +31,8 @@
 
 namespace Hyena.Gui
 {
+    public delegate void WidgetAction<T> (T widget) where T : class;
+    
     public static class GtkUtilities
     {
         private static Gdk.ModifierType [] important_modifiers = new Gdk.ModifierType [] {
@@ -142,5 +144,24 @@
             object result = widget.StyleGetProperty (property);
             return result != null && result.GetType () == typeof (T) ? (T)result : default_value;
         }
+        
+        public static void ForeachWidget<T> (Container container, WidgetAction<T> action) where T : class
+        {
+            if (container == null) {
+                return;
+            }
+            
+            foreach (Widget child in container.Children) {
+                T widget = child as T;
+                if (widget != null) {
+                    action (widget);
+                } else {
+                    Container child_container = child as Container;
+                    if (child_container != null) {
+                        ForeachWidget<T> (child_container, action);
+                    }
+                }
+            }
+        }
     }
 }



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