[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-devel
Subject:    [xine-devel] gxine patch: persistent playlist settings
From:       Guenter Bartsch <bartscgr () t-online ! de>
Date:       2005-03-08 19:04:36
Message-ID: 1110308676.24342.18.camel () localhost
[Download RAW message or body]

hallo xine-developers,

attached to this mail is a small patch for gxine to make playlist
settings (random and repeat) persistent when loading saving playlist
files.

greetings and keep up the good work,

   guenter

["playlist_persistent_settings.patch" (playlist_persistent_settings.patch)]

Index: src/playlist.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/playlist.c,v
retrieving revision 1.111
diff -u -r1.111 playlist.c
--- src/playlist.c	13 Feb 2005 01:28:21 -0000	1.111
+++ src/playlist.c	8 Mar 2005 18:57:52 -0000
@@ -289,6 +289,10 @@
 
 	    gtk_list_store_set (pl_store, &iter, 0, play_item->title, 1, 
 				play_item->mrl, 2, play_item, 3, "", -1);
+	  } else if (!strcasecmp (node->name, "settings")) {
+
+	    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (random_button), \
xml_parser_get_property_bool (node, "RANDOM", 0)); +	    gtk_toggle_button_set_active \
(GTK_TOGGLE_BUTTON (repeat_button), xml_parser_get_property_bool (node, "REPEAT", \
0));  }
 
 	  node = node->next;
@@ -327,9 +331,21 @@
   if (f) {
 
     GtkTreeIter iter;
+    char *random_str, *repeat_str;
 
     fprintf (f, "<ASX VERSION=\"3.0\">\n");
 
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (random_button)))
+      random_str = "true";
+    else
+      random_str = "false";
+    if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (repeat_button)))
+      repeat_str = "true";
+    else
+      repeat_str = "false";
+
+    fprintf (f, "  <SETTINGS REPEAT=\"%s\" RANDOM=\"%s\"/>\n", repeat_str, \
random_str); +    
     if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (pl_store), &iter)) {
 
       do {


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xine-devel mailing list
xine-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic