Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28523 - suggestion xmms_osd plugin
Summary: suggestion xmms_osd plugin
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-12 06:55 UTC by CBke -Left- bye
Modified: 2003-09-15 02:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gives the user the choice if he wants the playlistposition displayed (xmms_xosd-2.2.4_trackpos.patch,4.22 KB, patch)
2003-09-12 06:57 UTC, CBke -Left- bye
Details | Diff
gives the user the choice if he wants the position in the playlist displayed (xmms_xosd-2.2.4_trackpos.patch,4.22 KB, patch)
2003-09-12 06:59 UTC, CBke -Left- bye
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description CBke -Left- bye 2003-09-12 06:55:48 UTC
First of all i hope this is the right place to commit this.
The playlist position is displayd by default, i think this be choice.
So i wrote a little patch ;)


diff -u -r xosd-2.2.4/src/xmms_plugin/dlg_config.c xosd-2.2.4.
org/src/xmms_plugin/dlg_config.c
--- xosd-2.2.4/src/xmms_plugin/dlg_config.c	2003-09-12 15:31:17.802118056 
+0200
+++ xosd-2.2.4.org/src/xmms_plugin/dlg_config.c	2003-09-12 15:31:58.
468935760 +0200
@@ -28,7 +28,7 @@
 	*vol_on, *bal_on,
 	*pause_on,  *trackname_on,
 	*stop_on,  *repeat_on,
-	*shuffle_on;
+	*shuffle_on,  *listpos_on;
 static GtkWidget *configure_win;
 static GtkObject *timeout_obj, *offset_obj, *h_offset_obj, *shadow_obj, 
*outline_obj;
 static GtkWidget *timeout_spin,*offset_spin, *h_offset_spin, *shadow_spin, 
*outline_spin;
@@ -58,7 +58,7 @@
 	show.stop = isactive (stop_on);
 	show.repeat = isactive (repeat_on);
 	show.shuffle = isactive (shuffle_on);
-
+	show.listpos = isactive (listpos_on);
 
 	if (colour)
 		g_free (colour);
@@ -530,11 +530,12 @@
 	show_item (vbox2, "Balance", show.balance, &bal_on);
 	show_item (vbox2, "Pause", show.pause, &pause_on);
 	show_item (vbox2, "Track Name", show.trackname, &trackname_on);
-	vbox2 = gtk_vbox_new (FALSE, 5);
+	vbox2 = gtk_vbox_new (FALSE, 4);
 	gtk_box_pack_start (GTK_BOX (hbox2), vbox2, FALSE, FALSE, 0);
 	show_item (vbox2, "Stop", show.stop, &stop_on);
 	show_item (vbox2, "Repeat", show.repeat, &repeat_on);
 	show_item (vbox2, "Shuffle", show.shuffle, &shuffle_on);
+	show_item (vbox2, "Playlist Position", show.listpos, &listpos_on);
 
 	sep = gtk_hseparator_new ();
 	gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0);
diff -u -r xosd-2.2.4/src/xmms_plugin/xmms_osd.c xosd-2.2.4.
org/src/xmms_plugin/xmms_osd.c
--- xosd-2.2.4/src/xmms_plugin/xmms_osd.c	2003-09-12 15:31:17.802118056 
+0200
+++ xosd-2.2.4.org/src/xmms_plugin/xmms_osd.c	2003-09-12 15:30:37.301275120 
+0200
@@ -175,6 +175,7 @@
 	show.stop = 1;
 	show.repeat = 1;
 	show.shuffle = 1;
+	show.listpos = 1;
 
 	g_free (colour);
 	g_free (font);
@@ -206,6 +207,7 @@
 		xmms_cfg_read_int (cfgfile, "osd", "show_stop", &show.stop );
 		xmms_cfg_read_int (cfgfile, "osd", "show_repeat", &show.repeat );
 		xmms_cfg_read_int (cfgfile, "osd", "show_shuffle", &show.shuffle );
+		xmms_cfg_read_int (cfgfile, "osd", "show_listpos", &show.listpos );
 		xmms_cfg_free (cfgfile);
 	}
 
@@ -247,6 +249,7 @@
 		xmms_cfg_write_int (cfgfile, "osd", "show_stop", show.stop );
 		xmms_cfg_write_int (cfgfile, "osd", "show_repeat", show.repeat );
 		xmms_cfg_write_int (cfgfile, "osd", "show_shuffle", show.shuffle );
+		xmms_cfg_write_int (cfgfile, "osd", "show_listpos", show.listpos );
 
 		xmms_cfg_write_default_file (cfgfile);
 		xmms_cfg_free (cfgfile);
@@ -373,7 +376,10 @@
 		 if (title!=NULL)
 		 {
        	          title2=malloc(strlen(current.title)+26);
-		  sprintf(title2,"%i/%i: %s",xmms_remote_get_playlist_pos (gp.
xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title)
;
+		  if (show.listpos)
+		   sprintf(title2,"%i/%i: %s",xmms_remote_get_playlist_pos (gp.
xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title)
;
+		  else
+		   sprintf(title2,"%s",current.title);
 		 }
  		}
 	}
@@ -394,7 +400,10 @@
 			    if (current.title!=NULL)
 			    {
 	    	             title2=malloc(strlen(current.title)+52);
-			     sprintf(title2,"%i/%i: %s (%.2i:%.2i)",
xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length 
(gp.xmms_session),current.title,xmms_remote_get_output_time(gp.xmms_session)
/1000/60,xmms_remote_get_output_time(gp.xmms_session)/1000%60);
+			     if (show.listpos)
+			      sprintf(title2,"%i/%i: %s (%.2i:%.2i)",
xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length 
(gp.xmms_session),current.title,xmms_remote_get_output_time(gp.xmms_session)
/1000/60,xmms_remote_get_output_time(gp.xmms_session)/1000%60);
+			     else
+			      sprintf(title2,"%s (%.2i:%.2i)",current.title,
xmms_remote_get_output_time(gp.xmms_session)/1000/60,
xmms_remote_get_output_time(gp.xmms_session)/1000%60);
 			    }
 			}
 		}
diff -u -r xosd-2.2.4/src/xmms_plugin/xmms_osd.h xosd-2.2.4.
Comment 1 CBke -Left- bye 2003-09-12 06:57:58 UTC
Created attachment 17566 [details, diff]
gives the user the choice if he wants the playlistposition displayed
Comment 2 CBke -Left- bye 2003-09-12 06:59:19 UTC
Created attachment 17567 [details, diff]
gives the user the choice if he wants the position in the playlist displayed
Comment 3 CBke -Left- bye 2003-09-12 07:03:35 UTC
i have troubles uploading a patch with opera 7.11 and didn't paste the full patch, sorry
there it is:


diff -u -r xosd-2.2.4/src/xmms_plugin/dlg_config.c xosd-2.2.4.org/src/xmms_plugin/dlg_config.c
--- xosd-2.2.4/src/xmms_plugin/dlg_config.c2003-09-12 15:31:17.802118056 +0200
+++ xosd-2.2.4.org/src/xmms_plugin/dlg_config.c2003-09-12 15:31:58.468935760 +0200
@@ -28,7 +28,7 @@
 *vol_on, *bal_on,
 *pause_on,  *trackname_on,
 *stop_on,  *repeat_on,
-*shuffle_on;
+*shuffle_on,  *listpos_on;
 static GtkWidget *configure_win;
 static GtkObject *timeout_obj, *offset_obj, *h_offset_obj, *shadow_obj, *outline_obj;
 static GtkWidget *timeout_spin,*offset_spin, *h_offset_spin, *shadow_spin, *outline_spin;
@@ -58,7 +58,7 @@
 show.stop = isactive (stop_on);
 show.repeat = isactive (repeat_on);
 show.shuffle = isactive (shuffle_on);
-
+show.listpos = isactive (listpos_on);
 
 if (colour)
 g_free (colour);
@@ -530,11 +530,12 @@
 show_item (vbox2, "Balance", show.balance, &bal_on);
 show_item (vbox2, "Pause", show.pause, &pause_on);
 show_item (vbox2, "Track Name", show.trackname, &trackname_on);
-vbox2 = gtk_vbox_new (FALSE, 5);
+vbox2 = gtk_vbox_new (FALSE, 4);
 gtk_box_pack_start (GTK_BOX (hbox2), vbox2, FALSE, FALSE, 0);
 show_item (vbox2, "Stop", show.stop, &stop_on);
 show_item (vbox2, "Repeat", show.repeat, &repeat_on);
 show_item (vbox2, "Shuffle", show.shuffle, &shuffle_on);
+show_item (vbox2, "Playlist Position", show.listpos, &listpos_on);
 
 sep = gtk_hseparator_new ();
 gtk_box_pack_start (GTK_BOX (vbox), sep, FALSE, FALSE, 0);
diff -u -r xosd-2.2.4/src/xmms_plugin/xmms_osd.c xosd-2.2.4.org/src/xmms_plugin/xmms_osd.c
--- xosd-2.2.4/src/xmms_plugin/xmms_osd.c2003-09-12 15:31:17.802118056 +0200
+++ xosd-2.2.4.org/src/xmms_plugin/xmms_osd.c2003-09-12 15:30:37.301275120 +0200
@@ -175,6 +175,7 @@
 show.stop = 1;
 show.repeat = 1;
 show.shuffle = 1;
+show.listpos = 1;
 
 g_free (colour);
 g_free (font);
@@ -206,6 +207,7 @@
 xmms_cfg_read_int (cfgfile, "osd", "show_stop", &show.stop );
 xmms_cfg_read_int (cfgfile, "osd", "show_repeat", &show.repeat );
 xmms_cfg_read_int (cfgfile, "osd", "show_shuffle", &show.shuffle );
+xmms_cfg_read_int (cfgfile, "osd", "show_listpos", &show.listpos );
 xmms_cfg_free (cfgfile);
 }
 
@@ -247,6 +249,7 @@
 xmms_cfg_write_int (cfgfile, "osd", "show_stop", show.stop );
 xmms_cfg_write_int (cfgfile, "osd", "show_repeat", show.repeat );
 xmms_cfg_write_int (cfgfile, "osd", "show_shuffle", show.shuffle );
+xmms_cfg_write_int (cfgfile, "osd", "show_listpos", show.listpos );
 
 xmms_cfg_write_default_file (cfgfile);
 xmms_cfg_free (cfgfile);
@@ -373,7 +376,10 @@
  if (title!=NULL)
  {
                  title2=malloc(strlen(current.title)+26);
-  sprintf(title2,"%i/%i: %s",xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title);
+  if (show.listpos)
+   sprintf(title2,"%i/%i: %s",xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title);
+  else
+   sprintf(title2,"%s",current.title);
  }
  }
 }
@@ -394,7 +400,10 @@
     if (current.title!=NULL)
     {
                  title2=malloc(strlen(current.title)+52);
-     sprintf(title2,"%i/%i: %s (%.2i:%.2i)",xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title,xmms_remote_get_output_time(gp.xmms_session)/1000/60,xmms_remote_get_output_time(gp.xmms_session)/1000%60);
+     if (show.listpos)
+      sprintf(title2,"%i/%i: %s (%.2i:%.2i)",xmms_remote_get_playlist_pos (gp.xmms_session)+1,xmms_remote_get_playlist_length (gp.xmms_session),current.title,xmms_remote_get_output_time(gp.xmms_session)/1000/60,xmms_remote_get_output_time(gp.xmms_session)/1000%60);
+     else
+      sprintf(title2,"%s (%.2i:%.2i)",current.title,xmms_remote_get_output_time(gp.xmms_session)/1000/60,xmms_remote_get_output_time(gp.xmms_session)/1000%60);
     }
 }
 }
diff -u -r xosd-2.2.4/src/xmms_plugin/xmms_osd.h xosd-2.2.4.org/src/xmms_plugin/xmms_osd.h
--- xosd-2.2.4/src/xmms_plugin/xmms_osd.h2003-09-12 15:31:17.802118056 +0200
+++ xosd-2.2.4.org/src/xmms_plugin/xmms_osd.h2003-09-12 15:30:37.301275120 +0200
@@ -20,6 +20,7 @@
 gboolean stop;
 gboolean repeat;
 gboolean shuffle;
+gboolean listpos;
 };
 extern struct show show;
 
Comment 4 Jon Portnoy (RETIRED) gentoo-dev 2003-09-12 08:13:24 UTC
Wrong product - reassgining
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2003-09-15 02:17:05 UTC
thanks, added to portage.