Re: [Muine] start as hidden?



On Thu, 2004-05-06 at 13:17 +0200, Jorn Baayen wrote:
> Patches for a command line option welcome ..
> > what about a command-line or a gconf switch?

ok, here it is...

this is my first patch to muine... the patch does what it has to do,
but i'm not sure about the design...

should rather visibility be an argument of the playlist-constructo? or a
param in playlist.run?

gabor
Index: Muine.cs
===================================================================
RCS file: /cvs/gnome/muine/src/Muine.cs,v
retrieving revision 1.26
diff -u -r1.26 Muine.cs
--- a/Muine.cs	8 May 2004 10:26:04 -0000	1.26
+++ b/Muine.cs	9 May 2004 19:35:24 -0000
@@ -94,11 +94,12 @@
 
 		/* Create playlist window */
 		playlist = new PlaylistWindow ();
+
+		ProcessCommandLine (args, false);
 		playlist.Run ();
 
 		/* Hook up connection callback */
 		conn.SetCallback (new MessageConnection.MessageReceivedHandler (HandleMessageReceived));
-		ProcessCommandLine (args, false);
 
 		/* Now we load the album covers, and after that start the changes thread */
 		CoverDB.DoneLoading += new CoverDatabase.DoneLoadingHandler (HandleCoversDoneLoading);
@@ -124,6 +125,13 @@
 			}
 		}
 
+		bool visible = true;
+		foreach(string arg in args){
+			if (arg == "--start-hidden")
+				visible = false;
+		}
+		playlist.WindowVisible = visible;
+
 		if (use_conn)
 			conn.Send ("ShowWindow");
 	}
Index: PlaylistWindow.cs
===================================================================
RCS file: /cvs/gnome/muine/src/PlaylistWindow.cs,v
retrieving revision 1.116
diff -u -r1.116 PlaylistWindow.cs
--- a/PlaylistWindow.cs	8 May 2004 12:24:45 -0000	1.116
+++ b/PlaylistWindow.cs	9 May 2004 19:35:28 -0000
@@ -136,12 +136,11 @@
 		NSongsChanged ();
 		SelectionChanged ();
 		StateChanged (false);
+
 	}
 
 	public void Run ()
 	{
-		WindowVisible = true;
-
 		icon.Run ();
 
 		/* put on the screen immediately please */


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