bbtime (0.1.5-12) direct (non packaging) changes

Summary

 Makefile.am      |    4 ++--
 Makefile.in      |    2 +-
 bbtime.cc        |    4 ++--
 bbtime.hh        |    5 +++++
 data/Makefile.am |    7 +++----
 data/Makefile.in |    6 +++---
 resource.cc      |   15 +++++++++++----
 7 files changed, 27 insertions(+), 16 deletions(-)

    
download this patch

Patch contents

--- bbtime-0.1.5.orig/Makefile.am
+++ bbtime-0.1.5/Makefile.am
@@ -1,6 +1,6 @@
 CPPFLAGS =	@CPPFLAGS@ \
-		-DDEFAULT_CONF=\"$(datadir)/bbtools/bbtime.conf\" \
-		-DDEFAULT_NOBB=\"$(datadir)/bbtools/bbtime.nobb\"
+		-DDEFAULT_CONF=\"$(sysconfdir)/bbtools/bbtime.conf\" \
+		-DDEFAULT_NOBB=\"$(sysconfdir)/bbtools/bbtime.nobb\"
 
 
 SUBDIRS = data
--- bbtime-0.1.5.orig/Makefile.in
+++ bbtime-0.1.5/Makefile.in
@@ -64,7 +64,7 @@
 VERSION = @VERSION@
 regex_cmd = @regex_cmd@
 
-CPPFLAGS = @CPPFLAGS@ 		-DDEFAULT_CONF=\"$(datadir)/bbtools/bbtime.conf\" 		-DDEFAULT_NOBB=\"$(datadir)/bbtools/bbtime.nobb\"
+CPPFLAGS = @CPPFLAGS@ 		-DDEFAULT_CONF=\"$(sysconfdir)/bbtools/bbtime.conf\" 		-DDEFAULT_NOBB=\"$(sysconfdir)/bbtools/bbtime.nobb\"
 
 
 SUBDIRS = data
--- bbtime-0.1.5.orig/bbtime.cc
+++ bbtime-0.1.5/bbtime.cc
@@ -34,7 +34,7 @@
   selected_friend=0;
 	MakeWindow(False);
   mbmenu->setHighlight(0);
-  CheckTime(False);
+  CheckTime(True);
   Redraw();
 }
 
@@ -316,7 +316,7 @@
 			mbmenu->UpdateTime(tmp+resource->timefriend[i].offset,i);
     ctmp=tmp + resource->timefriend[selected_friend].offset;
     if (! (tt = localtime(&ctmp))) return;
-    if (tt->tm_min != minute || tt->tm_hour != hour || redraw) {
+    if (redraw || tt->tm_min != minute || tt->tm_hour != hour) {
 
       hour = tt->tm_hour;
       minute = tt->tm_min;
--- bbtime-0.1.5.orig/bbtime.hh
+++ bbtime-0.1.5/bbtime.hh
@@ -21,6 +21,11 @@
 #ifndef __MAIN_HH
 #define __MAIN_HH
 
+// Added by Timshel Knoll, 22/02/2001 to fix Debian bug #86967
+#ifdef HAVE_STRFTIME
+#  include <time.h>
+#endif
+
 #include "Image.hh"
 #include "Basewindow.hh"
 #include "resource.hh"
--- bbtime-0.1.5.orig/resource.cc
+++ bbtime-0.1.5/resource.cc
@@ -462,10 +462,17 @@
   }
   else {
     delete [] report.strftimeFormat;
-    int len=strlen("%I:%M %p");
-    report.strftimeFormat = new char [len +1];
-    memset(report.strftimeFormat,0,len+1);
-    strncpy(report.strftimeFormat,"%I:%M %p",len);
+    if(report.clock24Hour) {
+      int len=strlen("%H:%M");
+      report.strftimeFormat = new char [len +1];
+      memset(report.strftimeFormat,0,len+1);
+      strncpy(report.strftimeFormat,"%H:%M",len);
+    } else {
+      int len=strlen("%I:%M %p");
+      report.strftimeFormat = new char [len +1];
+      memset(report.strftimeFormat,0,len+1);
+      strncpy(report.strftimeFormat,"%I:%M %p",len);
+    }
   }
 
 #ifdef    HAVE_STRFTIME
--- bbtime-0.1.5.orig/data/Makefile.in
+++ bbtime-0.1.5/data/Makefile.in
@@ -64,13 +64,13 @@
 VERSION = @VERSION@
 regex_cmd = @regex_cmd@
 
-configdir = $(datadir)/bbtools
+configdir = $(sysconfdir)/bbtools
 CLEANFILES = bbtoolsrc 
 
-config_DATA = bbtoolsrc.in 		bbtime.conf 		bbtime.style 		bbtime.nobb 		README.bbtime
+config_DATA = bbtime.conf 		bbtime.style 		bbtime.nobb 		README.bbtime
 
 
-EXTRA_DIST = $(config_DATA)
+EXTRA_DIST = $(config_DATA) bbtoolsrc.in
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 DATA =  $(config_DATA)
--- bbtime-0.1.5.orig/data/Makefile.am
+++ bbtime-0.1.5/data/Makefile.am
@@ -1,13 +1,12 @@
-configdir = $(datadir)/bbtools
+configdir = $(sysconfdir)/bbtools
 CLEANFILES = bbtoolsrc 
 
-config_DATA =	bbtoolsrc.in \
-		bbtime.conf \
+config_DATA =	bbtime.conf \
 		bbtime.style \
 		bbtime.nobb \
 		README.bbtime
 
-EXTRA_DIST = $(config_DATA)
+EXTRA_DIST = $(config_DATA) bbtoolsrc.in
 
 all-local: bbtoolsrc