aboutsummaryrefslogtreecommitdiff
path: root/src/BaseDisplay.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-04-04 11:28:19 (GMT)
committerfluxgen <fluxgen>2002-04-04 11:28:19 (GMT)
commit2526e4bce821eedcd4bcc13e0f27ac7b9e255350 (patch)
treef86898efe146ecb882e597955e1e94b375154b19 /src/BaseDisplay.cc
parentbd05695cfa6d066e5e5368d857eef8c0b11987c1 (diff)
downloadfluxbox-2526e4bce821eedcd4bcc13e0f27ac7b9e255350.zip
fluxbox-2526e4bce821eedcd4bcc13e0f27ac7b9e255350.tar.bz2
moved nls defines to enums in namespace FBNLS
Diffstat (limited to 'src/BaseDisplay.cc')
-rw-r--r--src/BaseDisplay.cc52
1 files changed, 12 insertions, 40 deletions
diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc
index d92c533..984a9db 100644
--- a/src/BaseDisplay.cc
+++ b/src/BaseDisplay.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: BaseDisplay.cc,v 1.11 2002/03/23 02:02:00 pekdon Exp $ 25// $Id: BaseDisplay.cc,v 1.12 2002/04/04 11:28:19 fluxgen Exp $
26 26
27// use GNU extensions 27// use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -107,11 +107,7 @@ static int handleXErrors(Display *d, XErrorEvent *e) {
107 fprintf(stderr, 107 fprintf(stderr,
108 I18n::instance()-> 108 I18n::instance()->
109 getMessage( 109 getMessage(
110 #ifdef NLS 110 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXError,
111 BaseDisplaySet, BaseDisplayXError,
112 #else // !NLS
113 0, 0,
114 #endif // NLS
115 "%s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n"), 111 "%s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n"),
116 base_display->getApplicationName(), errtxt, e->error_code, 112 base_display->getApplicationName(), errtxt, e->error_code,
117 e->request_code, e->minor_code, e->resourceid); 113 e->request_code, e->minor_code, e->resourceid);
@@ -165,11 +161,7 @@ static void signalhandler(int sig) {
165 161
166 fprintf(stderr, 162 fprintf(stderr,
167 i18n->getMessage( 163 i18n->getMessage(
168 #ifdef NLS 164 FBNLS::BaseDisplaySet, FBNLS::BaseDisplaySignalCaught,
169 BaseDisplaySet, BaseDisplaySignalCaught,
170 #else // !NLS
171 0, 0,
172 #endif // NLS
173 "%s: signal %d caught\n"), 165 "%s: signal %d caught\n"),
174 base_display->getApplicationName(), sig); 166 base_display->getApplicationName(), sig);
175 167
@@ -179,23 +171,15 @@ static void signalhandler(int sig) {
179 re_enter = 1; 171 re_enter = 1;
180 fprintf(stderr, 172 fprintf(stderr,
181 i18n->getMessage( 173 i18n->getMessage(
182 #ifdef NLS 174 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayShuttingDown,
183 BaseDisplaySet, BaseDisplayShuttingDown, 175 "shutting down\n"));
184 #else // !NLS
185 0, 0,
186 #endif // NLS
187 "shutting down\n"));
188 base_display->shutdown(); 176 base_display->shutdown();
189 } 177 }
190 178
191 if (sig != SIGTERM && sig != SIGINT) { 179 if (sig != SIGTERM && sig != SIGINT) {
192 fprintf(stderr, 180 fprintf(stderr,
193 i18n->getMessage( 181 i18n->getMessage(
194 #ifdef NLS 182 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayAborting,
195 BaseDisplaySet, BaseDisplayAborting,
196 #else // !NLS
197 0, 0,
198 #endif // NLS
199 "aborting... dumping core\n")); 183 "aborting... dumping core\n"));
200 abort(); 184 abort();
201 } 185 }
@@ -260,25 +244,17 @@ m_server_grabs(0)
260 fprintf(stderr, 244 fprintf(stderr,
261 i18n-> 245 i18n->
262 getMessage( 246 getMessage(
263 #ifdef NLS 247 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail,
264 BaseDisplaySet, BaseDisplayXConnectFail, 248 "BaseDisplay::BaseDisplay: connection to X server failed.\n"));
265 #else // !NLS
266 0, 0,
267 #endif // NLS
268 "BaseDisplay::BaseDisplay: connection to X server failed.\n"));
269 249
270 throw static_cast<int>(2); //throw error 2 250 throw static_cast<int>(2); //throw error 2
271 } else if (fcntl(ConnectionNumber(m_display), F_SETFD, 1) == -1) { 251 } else if (fcntl(ConnectionNumber(m_display), F_SETFD, 1) == -1) {
272 fprintf(stderr, 252 fprintf(stderr,
273 i18n-> 253 i18n->
274 getMessage( 254 getMessage(
275 #ifdef NLS 255 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayCloseOnExecFail,
276 BaseDisplaySet, BaseDisplayCloseOnExecFail, 256 "BaseDisplay::BaseDisplay: couldn't mark display connection "
277 #else // !NLS 257 "as close-on-exec\n"));
278 0, 0,
279 #endif // NLS
280 "BaseDisplay::BaseDisplay: couldn't mark display connection "
281 "as close-on-exec\n"));
282 throw static_cast<int>(2); //throw error 2 258 throw static_cast<int>(2); //throw error 2
283 } 259 }
284 //initiate atoms 260 //initiate atoms
@@ -332,11 +308,7 @@ void BaseDisplay::eventLoop(void) {
332 fprintf(stderr, 308 fprintf(stderr,
333 I18n::instance()-> 309 I18n::instance()->
334 getMessage( 310 getMessage(
335 #ifdef NLS 311 FBNLS::BaseDisplaySet, FBNLS::BaseDisplayBadWindowRemove,
336 BaseDisplaySet, BaseDisplayBadWindowRemove,
337 #else // !NLS
338 0, 0,
339 #endif // NLS
340 "BaseDisplay::eventLoop(): removing bad window " 312 "BaseDisplay::eventLoop(): removing bad window "
341 "from event queue\n")); 313 "from event queue\n"));
342 #endif // DEBUG 314 #endif // DEBUG