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 2a78332..58d6527 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->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",
                "%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;
        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 74141b9..57d3917 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)
 {
 
 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;
        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);
        /* 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"
        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_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",
                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
 
        );
                status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string
 
        );
-       free(bar);
+       free(basename);
        free(flags);
        free(status);
        free(ut);
        free(flags);
        free(status);
        free(ut);
diff --git a/gui.c b/gui.c
index a71a2a7..7dab446 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -918,8 +918,8 @@ repeat:
                        close(audiod_pipe);
                        audiod_pipe = -1;
                        clear_all_items();
                        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();
                }
                                para_strdup("audiod not running!?");
                        print_all_items();
                }
index 483b21f..f300908 100644 (file)
@@ -40,14 +40,14 @@ static void init_theme_simple(struct gui_theme *t)
        t->default_bg = COLOR_BLUE;
        t->sep_str = "*";
 
        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 = "";
 
        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_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 = " ";
 
        d[SI_STATUS].prefix = "";
        d[SI_STATUS].postfix = " ";
diff --git a/para.h b/para.h
index c41ed9d..17c6a82 100644 (file)
--- a/para.h
+++ b/para.h
@@ -160,7 +160,7 @@ void ms2tv(const long unsigned n, struct timeval *tv);
 
 /* stat */
 enum {
 
 /* 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,
        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 93607df..8a2f8df 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] = {
  * 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",
 
        [SI_STATUS] = "status",
        [SI_NUM_PLAYED] = "num_played",