[mythtv] [PATCH] MythMusic StripWhiteSpace and change Visual on key 6

Dan M dan at milkcarton.com
Sat Apr 26 23:41:51 EDT 2003


Attached are two different patches.  stripwhitespace.diff strips the 
whitespace from the visualizer name.  Such as that if you have a list of 
visuals specified like "StereoScope, Goom, Gears, etc" it will currently 
not work, with the patch things will work.

The second patch came from a suggestion I got, if you press key 6 while 
a visualizer is active, it will call ChangeVisualizer and change the 
visualizer for the current song.

These are simple one liners, but if anything is needed to get them 
committed, let me know.

-dan
-------------- next part --------------
Index: mythmusic/playbackbox.cpp
===================================================================
RCS file: /var/lib/cvs/mythmusic/mythmusic/playbackbox.cpp,v
retrieving revision 1.41
diff -u -d -r1.41 playbackbox.cpp
--- mythmusic/playbackbox.cpp	26 Apr 2003 02:49:00 -0000	1.41
+++ mythmusic/playbackbox.cpp	27 Apr 2003 06:33:25 -0000
@@ -602,7 +602,11 @@
 
             case Key_2:
                 toggleShuffle();
-                break; 
+                break;
+
+            case Key_6:
+                CycleVisualizer();
+                break;
 
         }
     }
-------------- next part --------------
Index: mythmusic/mainvisual.cpp
===================================================================
RCS file: /var/lib/cvs/mythmusic/mythmusic/mainvisual.cpp,v
retrieving revision 1.18
diff -u -d -r1.18 mainvisual.cpp
--- mythmusic/mainvisual.cpp	26 Apr 2003 02:49:00 -0000	1.18
+++ mythmusic/mainvisual.cpp	27 Apr 2003 06:31:29 -0000
@@ -96,7 +96,7 @@
         if (allowed_modes.size() > 1)
             vis_mode_index = rand() % allowed_modes.size();
 
-        current_visual_name = allowed_modes[vis_mode_index];
+        current_visual_name = allowed_modes[vis_mode_index].stripWhiteSpace();
         newvis = createVis(current_visual_name, this, winId());
     }
     	
@@ -300,7 +300,6 @@
                                   long int winid)
 {
     checkVisFactories();
-
     VisualBase *vis = 0;
 
     VisFactory *fact = visfactories->first();


More information about the mythtv-dev mailing list