src/cli_info.cc (raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
// cli_info.cc for Fluxbox Window Manager // Copyright (c) 2014 - Mathias Gumz <akira at fluxbox.org> // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, // and/or sell copies of the Software, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #include "cli.hh" #include "defaults.hh" #include "version.h" #include "FbTk/I18n.hh" #include "FbTk/StringUtil.hh" #ifdef HAVE_CONFIG_H #include "config.h" #endif // HAVE_CONFIG_H #ifdef HAVE_CSTRING #include <cstring> #else #include <string.h> #endif using std::endl; using std::ostream; void FluxboxCli::showInfo(ostream &ostr) { _FB_USES_NLS; ostr << _FB_CONSOLETEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading") << ": " << __fluxbox_version <<endl; if (strlen(gitrevision()) > 0) ostr << _FB_CONSOLETEXT(Common, SvnRevision, "GIT Revision", "Revision number in GIT repositary") << ": " << gitrevision() << endl; #if defined(__DATE__) && defined(__TIME__) ostr << _FB_CONSOLETEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled") << ": " << __DATE__ << " " << __TIME__ << endl; #endif #ifdef __fluxbox_compiler ostr << _FB_CONSOLETEXT(Common, Compiler, "Compiler", "Compiler used to build fluxbox") << ": " << __fluxbox_compiler << endl; #endif // __fluxbox_compiler #ifdef __fluxbox_compiler_version ostr << _FB_CONSOLETEXT(Common, CompilerVersion, "Compiler version", "Compiler version used to build fluxbox") << ": " << __fluxbox_compiler_version << endl; #endif // __fluxbox_compiler_version ostr << endl <<_FB_CONSOLETEXT(Common, Defaults, "Defaults", "Default values compiled in") << ": " << endl; ostr <<_FB_CONSOLETEXT(Common, DefaultMenuFile, " menu", "default menu file (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(DEFAULTMENU) << endl; ostr <<_FB_CONSOLETEXT(Common, DefaultWindowMenuFile, " windowmenu", "default windowmenu file (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(DEFAULT_WINDOWMENU) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultStyle, " style", "default style (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(DEFAULTSTYLE) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultKeyFile, " keys", "default key file (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(DEFAULTKEYSFILE) << endl; ostr << _FB_CONSOLETEXT(Common, DefaultInitFile, " init", "default init file (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(DEFAULT_INITFILE) << endl; #ifdef NLS ostr << _FB_CONSOLETEXT(Common, DefaultLocalePath, " nls", "location for localization files (right aligned - make sure same width as other default values)") << ": " << FbTk::StringUtil::expandFilename(LOCALEPATH) << endl; #endif const char NOT[] = "-"; ostr << endl << _FB_CONSOLETEXT(Common, CompiledOptions, "Compiled options", "Options used when compiled") << " (" << NOT << " => " << _FB_CONSOLETEXT(Common, Disabled, "disabled", "option is turned off") << "): " << endl << /**** NOTE: This list is in alphabetical order! ****/ #ifndef HAVE_FRIBIDI NOT << #endif "BIDI" << endl << #ifndef DEBUG NOT << #endif // DEBUG "DEBUG" << endl << #ifndef USE_EWMH NOT << #endif // USE_EWMH "EWMH" << endl << #ifndef HAVE_IMLIB2 NOT<< #endif // HAVE_IMLIB2 "IMLIB2" << endl << #ifndef NLS NOT<< #endif // NLS "NLS" << endl << #ifndef REMEMBER NOT << #endif // REMEMBER "REMEMBER" << endl << #ifndef HAVE_XRENDER NOT << #endif // HAVE_XRENDER "RENDER" << endl << #ifndef SHAPE NOT << #endif // SHAPE "SHAPE" << endl << #ifndef USE_SLIT NOT << #endif // SLIT "SLIT" << endl << #ifndef USE_SYSTRAY NOT << #endif "SYSTEMTRAY" << endl << #ifndef USE_TOOLBAR NOT << #endif // USE_TOOLBAR "TOOLBAR" << endl << #ifndef HAVE_RANDR NOT << #endif "RANDR" << #ifdef HAVE_RANDR1_2 "1.2" << #endif endl << #ifndef USE_XFT NOT << #endif // USE_XFT "XFT" << endl << #ifndef XINERAMA NOT << #endif // XINERAMA "XINERAMA" << endl << #ifndef USE_XMB NOT << #endif // USE_XMB "XMB" << endl << #ifndef HAVE_XPM NOT << #endif // HAVE_XPM "XPM" << endl << endl; } |