changeset 1040:f866da587845 trunk

[svn] mainwin.c: - always on top fix - playlistwin_time fix skin.c: - set default text colors in case of missing pledit.txt ui_playlist.c - playlistwin_info width fix
author nhjm449
date Sun, 14 May 2006 01:20:40 -0700
parents fa999c7066e2
children a8e4435f65f2
files audacious/mainwin.c audacious/skin.c audacious/ui_playlist.c
diffstat 3 files changed, 23 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/mainwin.c	Sat May 13 23:28:57 2006 -0700
+++ b/audacious/mainwin.c	Sun May 14 01:20:40 2006 -0700
@@ -2681,7 +2681,7 @@
         mainwin_lock_info_text(_("OPTIONS MENU"));
         break;
     case MENUROW_ALWAYS:
-        if (mainwin_menurow->mr_doublesize_selected)
+        if (mainwin_menurow->mr_always_selected)
             mainwin_lock_info_text(_("DISABLE ALWAYS ON TOP"));
         else
             mainwin_lock_info_text(_("ENABLE ALWAYS ON TOP"));
@@ -3365,7 +3365,10 @@
     gchar stime_prefix;
 
     length = playlist_get_current_length();
-    playlistwin_set_time(time, length, cfg.timer_mode);
+    if (bmp_playback_get_playing())
+        playlistwin_set_time(time, length, cfg.timer_mode);
+    else
+        playlistwin_hide_timer();
     input_update_vis(time);
 
     if (cfg.timer_mode == TIMER_REMAINING) {
--- a/audacious/skin.c	Sat May 13 23:28:57 2006 -0700
+++ b/audacious/skin.c	Sun May 14 01:20:40 2006 -0700
@@ -548,14 +548,22 @@
 
 GdkColor *
 skin_load_color(const gchar * path, const gchar * file,
-                const gchar * section, const gchar * key)
+                const gchar * section, const gchar * key,
+                gchar * default_hex)
 {
     gchar *filename, *value;
     GdkColor *color = NULL;
 
     filename = find_file_recursively(path, file);
-    if (filename) {
-        value = read_ini_string(filename, section, key);
+    if (filename || default_hex) {
+        if (filename) {
+            value = read_ini_string(filename, section, key);
+            if (value == NULL) {
+                value = g_strdup(default_hex);
+            }
+        } else {
+            value = g_strdup(default_hex);
+        }
         if (value) {
             gchar *ptr = value;
             gint len;
@@ -566,7 +574,6 @@
             if (value[0] == '#')
                 ptr++;
             len = strlen(ptr);
-
             /*
              * The handling of incomplete values is done this way
              * to maximize winamp compatibility
@@ -582,12 +589,12 @@
             if (len >= 2)
                 color->blue = hex_chars_to_int(*ptr, *(ptr + 1));
 
-
             gdk_color_alloc(gdk_window_get_colormap(playlistwin->window),
                             color);
             g_free(value);
         }
-        g_free(filename);
+        if (filename)
+            g_free(filename);
     }
     return color;
 }
@@ -787,13 +794,13 @@
 #endif
 
     skin->colors[SKIN_PLEDIT_NORMAL] =
-        skin_load_color(path, "pledit.txt", "text", "normal");
+        skin_load_color(path, "pledit.txt", "text", "normal", "#2499ff");
     skin->colors[SKIN_PLEDIT_CURRENT] =
-        skin_load_color(path, "pledit.txt", "text", "current");
+        skin_load_color(path, "pledit.txt", "text", "current", "#ffeeff");
     skin->colors[SKIN_PLEDIT_NORMALBG] =
-        skin_load_color(path, "pledit.txt", "text", "normalbg");
+        skin_load_color(path, "pledit.txt", "text", "normalbg", "#0a120a");
     skin->colors[SKIN_PLEDIT_SELECTEDBG] =
-        skin_load_color(path, "pledit.txt", "text", "selectedbg");
+        skin_load_color(path, "pledit.txt", "text", "selectedbg", "#0a124a");
 
     skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window);
     skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window);
--- a/audacious/ui_playlist.c	Sat May 13 23:28:57 2006 -0700
+++ b/audacious/ui_playlist.c	Sun May 14 01:20:40 2006 -0700
@@ -1567,7 +1567,7 @@
     playlistwin_info =
         create_textbox(&playlistwin_wlist, playlistwin_bg, playlistwin_gc,
                        playlistwin_get_width() - 143,
-                       cfg.playlist_height - 28, 85, FALSE, SKIN_TEXT);
+                       cfg.playlist_height - 28, 90, FALSE, SKIN_TEXT);
 
     /* mini play control buttons at right bottom corner */