changeset 506:4d3b74821345 trunk

[svn] Add a line between the time and the track name.
author nenolod
date Wed, 25 Jan 2006 22:22:45 -0800
parents 55ec56ecbfad
children b3dd43f37b81
files audacious/playlist_list.c
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/playlist_list.c	Wed Jan 25 22:15:52 2006 -0800
+++ b/audacious/playlist_list.c	Wed Jan 25 22:22:45 2006 -0800
@@ -356,6 +356,7 @@
     guint padding, padding_dwidth, padding_plength;
     guint max_time_len = 0;
     gint queue_tailpadding = 0;
+    gint tpadding, tpadding_dwidth = 0;
 
     gchar tail[100];
     gchar queuepos[255];         /* FIXME CRITICAL: Allows for a limited number of queue positions only */
@@ -457,8 +458,11 @@
             g_snprintf(queuepos, sizeof(queuepos), "%d", pos + 1);
 
         if (entry->length != -1)
+        {
             g_snprintf(length, sizeof(length), "%d:%-2.2d",
                        entry->length / 60000, (entry->length / 1000) % 60);
+	    tpadding_dwidth = MAX(tpadding_dwidth, strlen(length));
+        }
 
         if (pos != -1 || entry->length != -1) {
             gint x, y;
@@ -720,6 +724,21 @@
                       (pl->pl_widget.y + pl->pl_widget.height));
     }
 
+    if (tpadding_dwidth != 0)
+    {
+        tpadding = (tpadding_dwidth * width_approx_digits) + width_approx_digits;
+
+        if (has_slant)
+            tpadding += width_approx_digits_half;
+
+        gdk_draw_line(obj, gc,
+                      pl->pl_widget.x + pl->pl_widget.width - tpadding,
+                      pl->pl_widget.y,
+                      pl->pl_widget.x + pl->pl_widget.width - tpadding,
+                      (pl->pl_widget.y + pl->pl_widget.height));
+
+    }
+
     playlist_rect->x = 0;
     playlist_rect->y = 0;
     playlist_rect->width = plw_w;