]> git.tue.mpg.de Git - paraslash.git/commitdiff
Replace status item DBINFO3 by DIRECTORY.
authorAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:37:59 +0000 (22:37 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 23 Oct 2007 20:37:59 +0000 (22:37 +0200)
command.c
gui_theme.c
para.h
stat.c

index 57d3917e68c2cd5f5a91de5a668d116e5ac9faed..f1a0bd186e262d2443f4e34c171335b49f928a64 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 *basename, *ret, mtime[30] = "";
+       char *basename, *dirname, *ret, mtime[30] = "";
        char *status, *flags; /* vss status info */
        char *ut = uptime_str();
        long offset = (nmmd->offset + 500) / 1000;
@@ -110,12 +110,14 @@ static char *get_status(struct misc_meta_data *nmmd)
        status = vss_status_tohuman(nmmd->vss_status_flags);
        flags = vss_get_status_flags(nmmd->vss_status_flags);
        basename = para_basename(nmmd->filename);
+       dirname = para_dirname(nmmd->filename);
        gettimeofday(&now, NULL);
        ret = make_message(
                "%s:%zu\n"      "%s:%s\n"               "%s:%lu\n"      "%s:%u\n"
                "%s:%s\n"       "%s:%s\n"       "%s:%s\n"       "%s:%s\n"
                "%s:%li\n"      "%s:%s\n"       "%s:%s\n" "%s"
-               "%s:%s\n"       "%s:%lu.%lu\n"  "%s:%lu.%lu\n" "%s:%s\n",
+               "%s:%s\n"       "%s:%lu.%lu\n"  "%s:%lu.%lu\n" "%s:%s\n"
+               "%s:%s\n",
                status_item_list[SI_FILE_SIZE], nmmd->size / 1024,
                status_item_list[SI_MTIME], mtime,
                status_item_list[SI_LENGTH], nmmd->afd.afhi.seconds_total,
@@ -138,10 +140,13 @@ static char *get_status(struct misc_meta_data *nmmd)
                status_item_list[SI_CURRENT_TIME],
                        (long unsigned)now.tv_sec,
                        (long unsigned)now.tv_usec,
-               status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string
+               status_item_list[SI_ATTRIBUTES], mmd->afd.attributes_string,
+
+               status_item_list[SI_DIRECTORY], dirname
 
        );
        free(basename);
+       free(dirname);
        free(flags);
        free(status);
        free(ut);
index f3009082f04cd513938489eaa3629fcb820b1be1..e7112b3fd796490c6b677b77ec722e57353a83b4 100644 (file)
@@ -265,14 +265,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_ATTRIBUTES].y = 87;
        d[SI_ATTRIBUTES].len = 100;
 
-       d[SI_DBINFO3].prefix = "";
-       d[SI_DBINFO3].postfix = "";
-       d[SI_DBINFO3].fg = COLOR_YELLOW;
-       d[SI_DBINFO3].bg = COLOR_BLACK;
-       d[SI_DBINFO3].align = CENTER;
-       d[SI_DBINFO3].x = 0;
-       d[SI_DBINFO3].y = 97;
-       d[SI_DBINFO3].len = 100;
+       d[SI_DIRECTORY].prefix = "dir:";
+       d[SI_DIRECTORY].postfix = "";
+       d[SI_DIRECTORY].fg = COLOR_YELLOW;
+       d[SI_DIRECTORY].bg = COLOR_BLACK;
+       d[SI_DIRECTORY].align = CENTER;
+       d[SI_DIRECTORY].x = 0;
+       d[SI_DIRECTORY].y = 97;
+       d[SI_DIRECTORY].len = 100;
 }
 
 void init_theme(int num, struct gui_theme *t)
diff --git a/para.h b/para.h
index 17c6a821d0b99918b25735ae5ce34b20047efe3f..258f8b8d83eb75ad3db75107f08412e8c51feaca 100644 (file)
--- a/para.h
+++ b/para.h
@@ -165,7 +165,7 @@ enum {
        SI_FILE_SIZE,           SI_STATUS_FLAGS,        SI_FORMAT,
        SI_SCORE,               SI_AUDIO_INFO1,         SI_AUDIO_INFO2,
        SI_AUDIO_INFO3,         SI_AFS_MODE,            SI_ATTRIBUTES,
-       SI_DBINFO3,             SI_DECODER_FLAGS,       SI_AUDIOD_STATUS,
+       SI_DIRECTORY,           SI_DECODER_FLAGS,       SI_AUDIOD_STATUS,
        SI_PLAY_TIME,           SI_UPTIME,              SI_OFFSET,
        SI_LENGTH,              SI_STREAM_START,        SI_CURRENT_TIME,
        SI_AUDIOD_UPTIME,       SI_SELECTOR,            NUM_STAT_ITEMS
diff --git a/stat.c b/stat.c
index ed63ec36b36ff89b5dfc0767ddb6720a6b4a45bb..3ba13b7e0d0f7655692e4421e80b30c97e1719a2 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -66,7 +66,7 @@ const char *status_item_list[NUM_STAT_ITEMS] = {
        [SI_AFS_MODE] = "afs_mode",
        [SI_ATTRIBUTES] = "attributes",
 
-       [SI_DBINFO3] = "dbinfo3",
+       [SI_DIRECTORY] = "dir",
        [SI_DECODER_FLAGS] = "decoder_flags",
        [SI_AUDIOD_STATUS] = "audiod_status",