]> git.tue.mpg.de Git - paraslash.git/commitdiff
More status item renames.
authorAndre Noll <maan@systemlinux.org>
Fri, 2 Nov 2007 14:55:24 +0000 (15:55 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 2 Nov 2007 14:55:24 +0000 (15:55 +0100)
SI_LENGTH_MIN -> SI_BITRATE
SI_LENGTH_SEC -> SI_FREQUENCY

SI_ATTRIBUTES -> SI_ATTRIBUTES_BITMAP
SI_UPTIME -> SI_ATTRIBUTES_TXT

aft.c
gui_theme.c
para.h
stat.c

diff --git a/aft.c b/aft.c
index e485997e273bbf4f656a582a695e6344043ea930..6010d5def12175af7b3be545bd2d475aa7703b7b 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -810,8 +810,9 @@ static char *make_attribute_lines(const char *att_bitmap, struct afs_info *afsi)
        get_attribute_text(&afsi->attributes, " ", &att_text);
        if (!att_text)
                return para_strdup(att_bitmap);
-       att_lines = make_message("attributes: %s\nattributes_txt: %s",
-               att_bitmap, att_text);
+       att_lines = make_message("%s: %s\n%s: %s",
+               status_item_list[SI_ATTRIBUTES_BITMAP], att_bitmap,
+               status_item_list[SI_ATTRIBUTES_TXT], att_text);
        free(att_text);
        return att_lines;
 }
@@ -924,9 +925,9 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts,
                        "hash: %s\n"
                        "%s" /* image id, image name */
                        "%s" /* lyrics */
-                       "bitrate: %dkbit/s\n"
+                       "%s: %dkbit/s\n" /* bitrate */
                        "format: %s\n"
-                       "frequency: %dHz\n"
+                       "%s: %dHz\n" /* frequency */
                        "channels: %d\n"
                        "duration: %s\n"
                        "seconds_total: %lu\n"
@@ -940,9 +941,9 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts,
                        asc_hash,
                        image_lines,
                        lyrics_lines,
-                       afhi->bitrate,
+                       status_item_list[SI_BITRATE], afhi->bitrate,
                        audio_format_name(afsi->audio_format_id),
-                       afhi->frequency,
+                       status_item_list[SI_FREQUENCY], afhi->frequency,
                        afhi->channels,
                        duration_buf,
                        afhi->seconds_total,
index bb0a813f741208ede81528901415cffb05c18be1..262d9d56ac140286e3fe898a2bb6a9fcf2ed7505 100644 (file)
@@ -173,14 +173,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_NUM_PLAYED].y = 17;
        d[SI_NUM_PLAYED].len = 15;
 
-       d[SI_UPTIME].prefix = "SUp: ";
-       d[SI_UPTIME].postfix = "";
-       d[SI_UPTIME].fg = COLOR_RED;
-       d[SI_UPTIME].bg = COLOR_BLACK;
-       d[SI_UPTIME].align = CENTER;
-       d[SI_UPTIME].x = 75;
-       d[SI_UPTIME].y = 17;
-       d[SI_UPTIME].len = 25;
+       d[SI_BITRATE].prefix = "";
+       d[SI_BITRATE].postfix = "";
+       d[SI_BITRATE].fg = COLOR_RED;
+       d[SI_BITRATE].bg = COLOR_BLACK;
+       d[SI_BITRATE].align = CENTER;
+       d[SI_BITRATE].x = 75;
+       d[SI_BITRATE].y = 17;
+       d[SI_BITRATE].len = 25;
 
        d[SI_AUDIOD_STATUS].prefix = "audiod: ";
        d[SI_AUDIOD_STATUS].postfix = "";
@@ -273,15 +273,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_DURATION].y = 77;
        d[SI_DURATION].len = 50;
 
-
-       d[SI_ATTRIBUTES].prefix = "";
-       d[SI_ATTRIBUTES].postfix = "";
-       d[SI_ATTRIBUTES].fg = COLOR_YELLOW;
-       d[SI_ATTRIBUTES].bg = COLOR_BLACK;
-       d[SI_ATTRIBUTES].align = CENTER;
-       d[SI_ATTRIBUTES].x = 0;
-       d[SI_ATTRIBUTES].y = 87;
-       d[SI_ATTRIBUTES].len = 100;
+       d[SI_ATTRIBUTES_TXT].prefix = "";
+       d[SI_ATTRIBUTES_TXT].postfix = "";
+       d[SI_ATTRIBUTES_TXT].fg = COLOR_YELLOW;
+       d[SI_ATTRIBUTES_TXT].bg = COLOR_BLACK;
+       d[SI_ATTRIBUTES_TXT].align = CENTER;
+       d[SI_ATTRIBUTES_TXT].x = 0;
+       d[SI_ATTRIBUTES_TXT].y = 87;
+       d[SI_ATTRIBUTES_TXT].len = 100;
 
        d[SI_DIRECTORY].prefix = "dir:";
        d[SI_DIRECTORY].postfix = "";
diff --git a/para.h b/para.h
index b7542bf5e2b95f43b21b02cb76907cd22daebe0a..14a77cfd1d853062a68fd97a1c848058bb112666 100644 (file)
--- a/para.h
+++ b/para.h
@@ -161,12 +161,12 @@ void ms2tv(const long unsigned n, struct timeval *tv);
 /* stat */
 enum {
        SI_BASENAME,            SI_STATUS,              SI_NUM_PLAYED,
-       SI_MTIME,               SI_LENGTH_MIN,          SI_LENGTH_SEC,
+       SI_MTIME,               SI_BITRATE,             SI_FREQUENCY,
        SI_FILE_SIZE,           SI_STATUS_FLAGS,        SI_FORMAT,
        SI_SCORE,               SI_AUDIO_FILE_INFO,     SI_TAG_INFO1,
-       SI_TAG_INFO2,           SI_AFS_MODE,            SI_ATTRIBUTES,
+       SI_TAG_INFO2,           SI_AFS_MODE,            SI_ATTRIBUTES_BITMAP,
        SI_DIRECTORY,           SI_DECODER_FLAGS,       SI_AUDIOD_STATUS,
-       SI_PLAY_TIME,           SI_UPTIME,              SI_OFFSET,
+       SI_PLAY_TIME,           SI_ATTRIBUTES_TXT,      SI_OFFSET,
        SI_SECONDS_TOTAL,       SI_STREAM_START,        SI_CURRENT_TIME,
        SI_AUDIOD_UPTIME,       SI_IMAGE_ID,            SI_LYRICS_ID,
        SI_DURATION,
diff --git a/stat.c b/stat.c
index 5b1c033e7ab2c42de82457c5f080b60146a5053a..1ea2318dabc51d1d5c650e8ee8047615312a0aa3 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -51,8 +51,8 @@ const char *status_item_list[NUM_STAT_ITEMS] = {
        [SI_NUM_PLAYED] = "num_played",
 
        [SI_MTIME] = "mtime",
-       [SI_LENGTH_MIN] = "length_min",
-       [SI_LENGTH_SEC] = "length_sec",
+       [SI_BITRATE] = "bitrate",
+       [SI_FREQUENCY] = "frequency",
 
        [SI_FILE_SIZE] = "file_size",
        [SI_STATUS_FLAGS] = "status_flags",
@@ -64,14 +64,14 @@ const char *status_item_list[NUM_STAT_ITEMS] = {
        [SI_TAG_INFO1] = "taginfo1",
        [SI_TAG_INFO2] =  "taginfo2",
        [SI_AFS_MODE] = "afs_mode",
-       [SI_ATTRIBUTES] = "attributes",
+       [SI_ATTRIBUTES_TXT] = "attributes_txt",
 
        [SI_DIRECTORY] = "dir",
        [SI_DECODER_FLAGS] = "decoder_flags",
        [SI_AUDIOD_STATUS] = "audiod_status",
 
        [SI_PLAY_TIME] = "play_time",
-       [SI_UPTIME] = "uptime",
+       [SI_ATTRIBUTES_BITMAP] = "attributes_bitmap",
        [SI_OFFSET] = "offset",
 
        [SI_SECONDS_TOTAL] = "seconds_total",