Your message dated Tue, 13 Jan 2009 23:22:24 +0000
with message-id <[email protected]>
and subject line Bug#510392: fixed in ncmpc 0.13-1
has caused the Debian Bug report #510392,
regarding [PATCH] ncmpc: status line clock display is not configurable
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
510392: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510392
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ncmpc
Version: 0.12-1
Tags: patch

I already have a clock, and I don't need ncmpc showing me another one.

This patch adds command line options and a config file item to allow the
user to flexibly enable or disable the clock.

diff --git a/src/conf.c b/src/conf.c
index 5b3ebb3..b43078c 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -71,6 +71,7 @@
 #define CONF_SCROLL_SEP "scroll-sep"
 #define CONF_VISIBLE_BITRATE "visible-bitrate"
 #define CONF_WELCOME_SCREEN_LIST "welcome-screen-list"
+#define CONF_DISPLAY_TIME "display-time"
 
 typedef enum {
        KEY_PARSER_UNKNOWN,
@@ -534,7 +535,9 @@ read_rc_file(char *filename)
                                else if (!strcasecmp(CONF_SCROLL_SEP, name)) {
                                        g_free(options.scroll_sep);
                                        options.scroll_sep = get_format(value);
-                               } else
+                               } else if (!strcasecmp(CONF_DISPLAY_TIME, name))
+                                       options.display_time = str2bool(value);
+                               else
                                        match_found = 0;
 
                                if (!match_found)
diff --git a/src/options.c b/src/options.c
index b6a49e3..9d8ce93 100644
--- a/src/options.c
+++ b/src/options.c
@@ -77,6 +77,8 @@ static const arg_opt_t option_table[] = {
        { 'f', "config", "FILE", "Read configuration from file" },
        { 'k', "key-file","FILE", "Read configuration from file" },
        { 'S', "no-splash", NULL, "Don't show the splash screen" },
+       { 't', "display-time", NULL, "Display the time when idle" },
+       { 'T', "no-display-time", NULL, "Do not display the time when idle" },
 #ifndef NDEBUG
        { 'K', "dump-keys", NULL, "Dump key bindings to stdout" },
 #endif
@@ -232,6 +234,12 @@ handle_option(int c, const char *arg)
        case 'S': /* --key-file */
                /* the splash screen was removed */
                break;
+       case 't': /* --display-time */
+               options.display_time = 1;
+               break;
+       case 'T': /* --no-display-time */
+               options.display_time = 0;
+               break;
 #ifndef NDEBUG
        case 'K': /* --dump-keys */
                read_configuration();
@@ -358,4 +366,5 @@ options_init(void)
 #ifndef NCMPC_MINI
        options.scroll_sep = g_strdup(DEFAULT_SCROLL_SEP);
 #endif
+       options.display_time = 1;
 }
diff --git a/src/options.h b/src/options.h
index 98ad315..cce36a5 100644
--- a/src/options.h
+++ b/src/options.h
@@ -51,6 +51,7 @@ typedef struct {
        bool visible_bitrate;
        bool welcome_screen_list;
 #endif
+       int display_time;
 } options_t;
 
 extern options_t options;
diff --git a/src/screen.c b/src/screen.c
index 1a68b41..05d1e83 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -331,10 +331,12 @@ paint_status_window(mpdclient_t *c)
                }
 #ifndef NCMPC_MINI
        } else {
-               time_t timep;
+               if (options.display_time) {
+                       time_t timep;
 
-               time(&timep);
-               strftime(screen.buf, screen.buf_size, "%X ",localtime(&timep));
+                       time(&timep);
+                       strftime(screen.buf, screen.buf_size, "%X 
",localtime(&timep));
+               }
 #endif
        }
 


-- 
Paul Collins
Wellington, New Zealand

Dag vijandelijk luchtschip de huismeester is dood



--- End Message ---
--- Begin Message ---
Source: ncmpc
Source-Version: 0.13-1

We believe that the bug you reported is fixed in the latest version of
ncmpc, which is due to be installed in the Debian FTP archive:

ncmpc-lyrics_0.13-1_all.deb
  to pool/main/n/ncmpc/ncmpc-lyrics_0.13-1_all.deb
ncmpc_0.13-1.diff.gz
  to pool/main/n/ncmpc/ncmpc_0.13-1.diff.gz
ncmpc_0.13-1.dsc
  to pool/main/n/ncmpc/ncmpc_0.13-1.dsc
ncmpc_0.13-1_amd64.deb
  to pool/main/n/ncmpc/ncmpc_0.13-1_amd64.deb
ncmpc_0.13.orig.tar.gz
  to pool/main/n/ncmpc/ncmpc_0.13.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sebastian Harl <[email protected]> (supplier of updated ncmpc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 11 Jan 2009 21:36:39 +0100
Source: ncmpc
Binary: ncmpc ncmpc-lyrics
Architecture: source amd64 all
Version: 0.13-1
Distribution: experimental
Urgency: low
Maintainer: Sebastian Harl <[email protected]>
Changed-By: Sebastian Harl <[email protected]>
Description: 
 ncmpc      - ncurses-based audio player
 ncmpc-lyrics - ncurses-based audio player (lyrics plugins)
Closes: 510392
Changes: 
 ncmpc (0.13-1) experimental; urgency=low
 .
   * New upstream release:
     - Made status line clock display configurable (Closes: #510392).
   * debian/changelog:
     - Upstream (partially) switched to mentioning "The Music Player Daemon
       Project" as copyright holder instead of listing single persons for each
       file. debian/changelog now refers to the AUTHORS file for a list of team
       members.
     - Use © instead of (C) to make lintian happy.
   * Added binary package "ncmpc-lyrics". This package includes the lyrics
     plugins, some of which depend on python or ruby. By splitting them into a
     separate package, we avoid any kind of dependency on python or ruby in the
     "ncmpc" package which now suggests ncmpc-lyrics instead of python, ruby.
Checksums-Sha1: 
 4a6b479f4f995929de9961b05ac45b176d91d2d6 1169 ncmpc_0.13-1.dsc
 5238a136e2e15f7e8c588b58828e7a12e40be7c6 265473 ncmpc_0.13.orig.tar.gz
 e93203a0997d1d621d20c2e3ff0767c1f50025fa 6097 ncmpc_0.13-1.diff.gz
 80841f4a6954bee0756bcd004a3d9a7a35c1d94a 105546 ncmpc_0.13-1_amd64.deb
 6f3279b1df242951916029e8aac77ffbad6d3b39 10340 ncmpc-lyrics_0.13-1_all.deb
Checksums-Sha256: 
 4a2002a7bd2c9e396e1da296eec2bb4cf0dcac11b0f9c34cbb2ff75ed67204ff 1169 
ncmpc_0.13-1.dsc
 1785cab76854ecfcb1d2eced171f6bd24a3d2b88ab2b05e0bd6acc6d09681e74 265473 
ncmpc_0.13.orig.tar.gz
 554c959e269b4c10c5ae0190316684df2cd21f2a391926726802d7ec626b8197 6097 
ncmpc_0.13-1.diff.gz
 b63cefee23247662f72d7db1f2a6131765c6c40d12d80a0818c94f7882f78813 105546 
ncmpc_0.13-1_amd64.deb
 9a808bf6f6a6a78bfb2c50d2fb1f6c073cd90eb63ea961258e1b8f977e62d75b 10340 
ncmpc-lyrics_0.13-1_all.deb
Files: 
 bd21b82f349a35021f1e77faf7e7190c 1169 sound optional ncmpc_0.13-1.dsc
 17335cbd4c0cf59b8c98de14b4d06eb0 265473 sound optional ncmpc_0.13.orig.tar.gz
 501904993a282663d24c370c3d2515f5 6097 sound optional ncmpc_0.13-1.diff.gz
 8a567a6ee998aaa530f2c6f902c50c4e 105546 sound optional ncmpc_0.13-1_amd64.deb
 a49fe06edfa98a2a8af2bd050f023ace 10340 sound optional 
ncmpc-lyrics_0.13-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklqY0UACgkQ01u8mbx9AgrqHQCgvmqqe4Qr8iyk8P+Tw7xlI2u2
LScAoMzSarVujohE5QOgIRmTl4BO5xrF
=SP2r
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to