]> git.tue.mpg.de Git - paraslash.git/commitdiff
Replace status item STATUS_BAR to BASENAME.
authorAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:20:36 +0000 (22:20 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:20:36 +0000 (22:20 +0200)
as this is what it actually contains.

audiod.c
command.c
gui.c
gui_theme.c
para.h
stat.c

index 2a78332f2133c854937b4be239990cc6a3e1caf8..58d65275c6b9cb0b31017ec233b68d69502e7435 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -957,11 +957,11 @@ static void close_stat_pipe(void)
        stat_task->offset_seconds = 0;
        audiod_status_dump();
        stat_task->playing = 0;
-       stat_task->stat_item_values[SI_STATUS_BAR] = make_message(
+       stat_task->stat_item_values[SI_BASENAME] = make_message(
                "%s:no connection to para_server\n",
-               status_item_list[SI_STATUS_BAR]);
-       stat_client_write(stat_task->stat_item_values[SI_STATUS_BAR],
-               SI_STATUS_BAR);
+               status_item_list[SI_BASENAME]);
+       stat_client_write(stat_task->stat_item_values[SI_BASENAME],
+               SI_BASENAME);
        if (stat_task->clock_diff_count) {
                stat_task->clock_diff_barrier.tv_sec = now->tv_sec + 1;
                stat_task->clock_diff_barrier.tv_usec = now->tv_usec;
index 74141b9e3b5dc14d4a2ab70ed9138f2645e4debe..57d3917e68c2cd5f5a91de5a668d116e5ac9faed 100644 (file)
--- a/command.c
+++ b/command.c
@@ -97,7 +97,7 @@ static char *vss_get_status_flags(unsigned int flags)
 
 static char *get_status(struct misc_meta_data *nmmd)
 {
-       char *bar, *ret, mtime[30] = "";
+       char *basename, *ret, mtime[30] = "";
        char *status, *flags; /* vss status info */
        char *ut = uptime_str();
        long offset = (nmmd->offset + 500) / 1000;
@@ -109,7 +109,7 @@ static char *get_status(struct misc_meta_data *nmmd)
        /* report real status */
        status = vss_status_tohuman(nmmd->vss_status_flags);
        flags = vss_get_status_flags(nmmd->vss_status_flags);
-       bar = para_basename(nmmd->filename);
+       basename = para_basename(nmmd->filename);
        gettimeofday(&now, NULL);
        ret = make_message(
                "%s:%zu\n"      "%s:%s\n"               "%s:%lu\n"      "%s:%u\n"
@@ -121,7 +121,7 @@ static char *get_status(struct misc_meta_data *nmmd)
                status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total,
                status_item_list[SI_NUM_PLAYED], nmmd->num_played,
 
-               status_item_list[SI_STATUS_BAR], bar ? bar : "(none)",
+               status_item_list[SI_BASENAME], basename ? basename : "(none)",
                status_item_list[SI_STATUS], status,
                status_item_list[SI_STATUS_FLAGS], flags,
                status_item_list[SI_SELECTOR], "FIXME",
@@ -141,7 +141,7 @@ static char *get_status(struct misc_meta_data *nmmd)
                status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string
 
        );
-       free(bar);
+       free(basename);
        free(flags);
        free(status);
        free(ut);
diff --git a/gui.c b/gui.c
index a71a2a7c4ab2bf7355401f32450cdbab47837ae3..7dab4466beb0e4b1ecb7f5d007ed0f7bf89db9d6 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -918,8 +918,8 @@ repeat:
                        close(audiod_pipe);
                        audiod_pipe = -1;
                        clear_all_items();
-                       free(stat_content[SI_STATUS_BAR]);
-                       stat_content[SI_STATUS_BAR] =
+                       free(stat_content[SI_BASENAME]);
+                       stat_content[SI_BASENAME] =
                                para_strdup("audiod not running!?");
                        print_all_items();
                }
index 483b21fe5d4f43bbf49c43900a558ab443dc20f1..f3009082f04cd513938489eaa3629fcb820b1be1 100644 (file)
@@ -40,14 +40,14 @@ static void init_theme_simple(struct gui_theme *t)
        t->default_bg = COLOR_BLUE;
        t->sep_str = "*";
 
-       d[SI_STATUS_BAR].prefix = "";
-       d[SI_STATUS_BAR].postfix = "";
-       d[SI_STATUS_BAR].fg = COLOR_WHITE;
-       d[SI_STATUS_BAR].bg = COLOR_BLUE;
-       d[SI_STATUS_BAR].align = CENTER;
-       d[SI_STATUS_BAR].x = 0;
-       d[SI_STATUS_BAR].y = 7;
-       d[SI_STATUS_BAR].len = 100;
+       d[SI_BASENAME].prefix = "";
+       d[SI_BASENAME].postfix = "";
+       d[SI_BASENAME].fg = COLOR_WHITE;
+       d[SI_BASENAME].bg = COLOR_BLUE;
+       d[SI_BASENAME].align = CENTER;
+       d[SI_BASENAME].x = 0;
+       d[SI_BASENAME].y = 7;
+       d[SI_BASENAME].len = 100;
 
        d[SI_STATUS].prefix = "para_server: ";
        d[SI_STATUS].postfix = "";
@@ -110,14 +110,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_PLAY_TIME].y = 7;
        d[SI_PLAY_TIME].len = 35;
 
-       d[SI_STATUS_BAR].prefix = "";
-       d[SI_STATUS_BAR].postfix = "";
-       d[SI_STATUS_BAR].fg = COLOR_CYAN;
-       d[SI_STATUS_BAR].bg = COLOR_BLACK;
-       d[SI_STATUS_BAR].align = LEFT;
-       d[SI_STATUS_BAR].x = 35;
-       d[SI_STATUS_BAR].y = 7;
-       d[SI_STATUS_BAR].len = 65;
+       d[SI_BASENAME].prefix = "";
+       d[SI_BASENAME].postfix = "";
+       d[SI_BASENAME].fg = COLOR_CYAN;
+       d[SI_BASENAME].bg = COLOR_BLACK;
+       d[SI_BASENAME].align = LEFT;
+       d[SI_BASENAME].x = 35;
+       d[SI_BASENAME].y = 7;
+       d[SI_BASENAME].len = 65;
 
        d[SI_STATUS].prefix = "";
        d[SI_STATUS].postfix = " ";
diff --git a/para.h b/para.h
index c41ed9dd7c756d6dee17638fa33b19382d3349b1..17c6a821d0b99918b25735ae5ce34b20047efe3f 100644 (file)
--- a/para.h
+++ b/para.h
@@ -160,7 +160,7 @@ void ms2tv(const long unsigned n, struct timeval *tv);
 
 /* stat */
 enum {
-       SI_STATUS_BAR,          SI_STATUS,              SI_NUM_PLAYED,
+       SI_BASENAME,            SI_STATUS,              SI_NUM_PLAYED,
        SI_MTIME,               SI_LENGTH_MIN,          SI_LENGTH_SEC,
        SI_FILE_SIZE,           SI_STATUS_FLAGS,        SI_FORMAT,
        SI_SCORE,               SI_AUDIO_INFO1,         SI_AUDIO_INFO2,
diff --git a/stat.c b/stat.c
index 93607df710cf389f0a8c9e3a03517a0df00bfc70..8a2f8df49b282038ef4a4dd6007136ad0cbfaef7 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -48,7 +48,7 @@ static int num_clients;
  * the list of all status items sent by para_server/para_audiod
  */
 const char *status_item_list[NUM_STAT_ITEMS] = {
-       [SI_STATUS_BAR] = "status_bar",
+       [SI_BASENAME] = "basnemae",
        [SI_STATUS] = "status",
        [SI_NUM_PLAYED] = "num_played",