aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathias <mathias>2005-02-03 16:46:46 (GMT)
committermathias <mathias>2005-02-03 16:46:46 (GMT)
commitb7bf873aa0512c672a36cad852ebd6742ffaf681 (patch)
treea26f695388914816e9fd0202271b64acda04d58b /src
parenta88dcb3676aaf3ab3186ba1c2fb95f02e105d819 (diff)
downloadfluxbox_paul-b7bf873aa0512c672a36cad852ebd6742ffaf681.zip
fluxbox_paul-b7bf873aa0512c672a36cad852ebd6742ffaf681.tar.bz2
fixes the year for fluxbox -version
added a way to display the svn-revision-number in fluxbox -info
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am13
-rw-r--r--src/main.cc5
2 files changed, 15 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e6f7dad..243cb1d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,11 +41,20 @@ defaults.hh: Makefile
41 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"' >> defaults.hh 41 echo '#define DEFAULTKEYSFILE "$(DEFAULT_KEYSFILE)"' >> defaults.hh
42 echo '#define DEFAULT_INITFILE "$(pkgdatadir)/init"' >> defaults.hh 42 echo '#define DEFAULT_INITFILE "$(pkgdatadir)/init"' >> defaults.hh
43 echo '#define LOCALEPATH "$(pkgdatadir)/nls"' >> defaults.hh 43 echo '#define LOCALEPATH "$(pkgdatadir)/nls"' >> defaults.hh
44 echo 'const char* svnversion(void);' >> defaults.hh
44 45
45# an extra dep for fluxbox 46defaults.cc: force
47 echo 'const char* svnversion(void) {' > defaults.cc
48 echo ' return "'`(svnversion . | sed "s/[^0-9].*//") 2> /dev/null`'";' >> defaults.cc
49 echo '}' >> defaults.cc
50
51force: ;
46 52
53# an extra dep for fluxbox
47fluxbox.$(OBJEXT): defaults.hh 54fluxbox.$(OBJEXT): defaults.hh
48 55
56
57
49if NEWWMSPEC 58if NEWWMSPEC
50newwmspec_SOURCE= Ewmh.hh Ewmh.cc 59newwmspec_SOURCE= Ewmh.hh Ewmh.cc
51endif 60endif
@@ -120,4 +129,4 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \
120 ${REMEMBER_SOURCE} ${REGEXP_SOURCE} ${TOOLBAR_SOURCE} 129 ${REMEMBER_SOURCE} ${REGEXP_SOURCE} ${TOOLBAR_SOURCE}
121 130
122 131
123LDADD=FbTk/libFbTk.a 132LDADD=FbTk/libFbTk.a defaults.$(OBJEXT)
diff --git a/src/main.cc b/src/main.cc
index 3da300e..ce93186 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -63,6 +63,9 @@ using namespace std;
63void showInfo(ostream &ostr) { 63void showInfo(ostream &ostr) {
64 _FB_USES_NLS; 64 _FB_USES_NLS;
65 ostr<<_FBTEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl; 65 ostr<<_FBTEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl;
66
67 if (strlen(svnversion()) > 0)
68 ostr<<"SVN Revision: "<<svnversion()<<endl;
66#if defined(__DATE__) && defined(__TIME__) 69#if defined(__DATE__) && defined(__TIME__)
67 ostr<<_FBTEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl; 70 ostr<<_FBTEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl;
68#endif 71#endif
@@ -221,7 +224,7 @@ int main(int argc, char **argv) {
221 "\t-help\t\t\t\tdisplay this help text and exit.\n\n", 224 "\t-help\t\t\t\tdisplay this help text and exit.\n\n",
222 225
223 "Main usage string. Please lay it out nicely. There is one %s that is given the version"), 226 "Main usage string. Please lay it out nicely. There is one %s that is given the version"),
224 __fluxbox_version, "2001-2004"); 227 __fluxbox_version, "2001-2005");
225 exit(0); 228 exit(0);
226 } else if (strcmp(argv[i], "-info") == 0 || strcmp(argv[i], "-i") == 0) { 229 } else if (strcmp(argv[i], "-info") == 0 || strcmp(argv[i], "-i") == 0) {
227 showInfo(cout); 230 showInfo(cout);