changeset 1077:e3fbf8df3773 trunk

[svn] - if cfg.show_separator_in_pl is not true, then make it look nicer (and add a dot after the playlist number, maybe galisus will be happy)
author nenolod
date Fri, 19 May 2006 12:09:49 -0700
parents bc3caffbc66f
children 069d4503ce54
files audacious/playlist_list.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/playlist_list.c	Fri May 19 11:57:39 2006 -0700
+++ b/audacious/playlist_list.c	Fri May 19 12:09:49 2006 -0700
@@ -395,9 +395,9 @@
     REQUIRE_STATIC_LOCK(playlist);
 
     if (cfg.show_numbers_in_pl) {
-        gchar *pos_string = g_strdup_printf("%d", ppos);
+        gchar *pos_string = g_strdup_printf(cfg.show_separator_in_pl == TRUE ? "%d" : "%d.", ppos);
         plist_length_int =
-            gint_count_digits(playlist_get_length_nolock()) + 1;
+            gint_count_digits(playlist_get_length_nolock()) + !cfg.show_separator_in_pl + 1; /* cf.show_separator_in_pl will be 0 if false */
 
         padding = plist_length_int;
         padding = ((padding + 1) * width_approx_digits);
@@ -416,6 +416,9 @@
                         ascent + abs(descent), layout);
         g_free(pos_string);
         g_object_unref(layout);
+
+        if (!cfg.show_separator_in_pl)
+            padding -= (width_approx_digits * 1.5);
     }
     else {
         padding = 3;