Re: patch to append files to playlist

Chris Hellberg <[email protected]>
Newsgroups gmane.comp.multimedia.xmms.devel
Message-ID <[email protected]>
--- Morten Nilsen <[email protected]> wrote:

> Chris Hellberg wrote:
> > Fair enough. Attached is the rehash without the
> whitespace.
> > 
> > --- xmms-1.2.10-orig/xmms/main.c	Thu Dec  2
> 09:39:24 2004
> > +++ xmms-1.2.10/xmms/main.c	Fri Dec  3 08:31:11
> 2004
> > @@ -2415,9 +2420,14 @@
> >  		break;
> >  	case MAINWIN_OPT_NPA:
> >  		cfg.no_playlist_advance =
>
GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget(mainwin_options_menu,
> "/No Playlist Advance"))->active;
> > +		break;
> > +	case MAINWIN_OPT_ATP:
> > +		cfg.append_to_playlist =
>
GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget(mainwin_options_menu,
> "/Append to playlist"))->active;
> > +		cfg.append_to_playlist = TRUE;
> 
> I don't know the xmms source, but this seems weird
> to me..
> won't setting cfg.append_to_playlist to TRUE
> explicitly force this
> option on?
> you said the option won't work until reloading
> config, could this be the
> reason?
> 

Yes, you're right, it would. However I figured that it
would be the least-intrusive as a default option to
leave it set to FALSE. I don't think this is the
reason it's failing, since even after selecting the
option when XMMS is running, it doesn't append files
to the playlist. It's not because in read_config() the
value is set to false, since cfg.append_to_playlist is
zero when the function is called.

I don't mind setting it to true though, if people
would be happy changing the default behavior. 

Another problem would be though that the config is
reread even when an exec of a new xmms connects to an
existing session, it rereads the config. Is this
necessary to reread the config again, if there is a
session already running? 

> >  	}
> >  }
> >  
> > +
> 
> missed one ;)
> 

Nah, I noticed it and checked it out in my changed
main.c and there's only one line between the static
declaration on the previous line and the function def.
Dunno why the patch showed the extra line though :) 

> >  void mainwin_vis_menu_callback(gpointer cb_data,
> guint action, GtkWidget * w)
> >  {
> >  	switch (action)
> 
> Cheers,
> -- 
> Morten

Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.