[Goodies-commits] r2349 - xfce4-mpc-plugin/trunk/panel-plugin

Landry Breuil landry at xfce.org
Fri Jan 12 23:46:08 CET 2007


Author: landry
Date: 2007-01-12 22:46:08 +0000 (Fri, 12 Jan 2007)
New Revision: 2349

Modified:
   xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c
Log:
- oops, fix for correctly setting current song icon


Modified: xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c
===================================================================
--- xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c	2007-01-12 21:55:56 UTC (rev 2348)
+++ xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c	2007-01-12 22:46:08 UTC (rev 2349)
@@ -373,7 +373,7 @@
    GtkTreePath *path_to_cur;
    GtkCellRenderer *renderer;
    gchar str[512];
-   int current, i;
+   int current;
    MpdData *mpd_data;
 
    mpc->playlist = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -404,12 +404,12 @@
    DBG ("Current song pos in the list: %d", current);
    mpd_data = mpd_playlist_get_changes (mpc->mo, -1);
    DBG ("Got playlist, creating window");
-   for (i=0 ; (mpd_data = mpd_data_get_next (mpd_data)) ; i++)
+   for (;(mpd_data = mpd_data_get_next (mpd_data));)
    {
       g_sprintf(str,"%s - %s", mpd_data->song->artist, mpd_data->song->title);
 
       gtk_list_store_append (liststore, &iter);
-      if (current == i)
+      if (current == mpd_data->song->pos)
       {
          gtk_list_store_set (liststore, &iter, 0, "gtk-media-play", 1, str, 2, mpd_data->song->pos, 3, mpd_data->song->id, -1);
          path_to_cur = gtk_tree_model_get_path(GTK_TREE_MODEL(liststore), &iter);




More information about the Goodies-commits mailing list