1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

Fix some double newlines

Just a couple that woud now print double (or several more) newlines.

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
Tamas TEVESZ
2010-09-28 02:09:51 +02:00
committed by Carlos R. Mafra
parent 8594c39a0b
commit 94a0c7b42f
11 changed files with 87 additions and 90 deletions

View File

@@ -3031,7 +3031,7 @@ static void customPaletteMenuRename(W_ColorPanel * panel)
} }
if (rename(fromPath, toPath) != 0) if (rename(fromPath, toPath) != 0)
werror(_("Couldn't rename palette %s to %s\n"), fromName, toName); werror(_("Couldn't rename palette %s to %s"), fromName, toName);
else { else {
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item); WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item);
WMInsertPopUpButtonItem(panel->customPaletteHistoryBtn, item, toName); WMInsertPopUpButtonItem(panel->customPaletteHistoryBtn, item, toName);
@@ -3078,7 +3078,7 @@ static void customPaletteMenuRemove(W_ColorPanel * panel)
WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item); WMRemovePopUpButtonItem(panel->customPaletteHistoryBtn, item);
} else { } else {
werror(_("Couldn't remove palette %s\n"), tmp); werror(_("Couldn't remove palette %s"), tmp);
} }
wfree(tmp); wfree(tmp);

View File

@@ -704,7 +704,7 @@ static void storeCommandInScript(char *cmd, char *line)
fclose(fo); fclose(fo);
if (rename(tmppath, path) != 0) { if (rename(tmppath, path) != 0) {
werror(_("could not rename file %s to %s\n"), tmppath, path); werror(_("could not rename file %s to %s"), tmppath, path);
} }
wfree(tmppath); wfree(tmppath);
} }

View File

@@ -387,7 +387,7 @@ char *LocateImage(char *name)
} }
wfree(tmp); wfree(tmp);
if (!path) { if (!path) {
wwarning(_("could not locate image file %s\n"), name); wwarning(_("could not locate image file %s"), name);
} }
return path; return path;
@@ -962,7 +962,7 @@ int GetSpeedForKey(char *defaultName)
else if (strcasecmp(str, "ultrafast") == 0) else if (strcasecmp(str, "ultrafast") == 0)
i = 4; i = 4;
else { else {
wwarning(_("bad speed value for option %s\n. Using default Medium"), defaultName); wwarning(_("bad speed value for option %s; using default Medium"), defaultName);
i = 2; i = 2;
} }
return i; return i;

View File

@@ -121,24 +121,24 @@ static void x_reset_modifier_mapping(Display * display)
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display); XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
#define modwarn(name,old,other) \ #define modwarn(name,old,other) \
wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \ wwarning ("%s (0x%x) generates %s, which is generated by %s.", \
name, code, index_to_name (old), other), \ name, code, index_to_name (old), other), \
warned_about_overlapping_modifiers = 1 warned_about_overlapping_modifiers = 1
#define modbarf(name,other) \ #define modbarf(name,other) \
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
name, code, other), \ name, code, other), \
warned_about_predefined_modifiers = 1 warned_about_predefined_modifiers = 1
#define check_modifier(name,mask) \ #define check_modifier(name,mask) \
if ((1<<modifier_index) != mask) \ if ((1<<modifier_index) != mask) \
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
name, code, index_to_name (modifier_index)), \ name, code, index_to_name (modifier_index)), \
warned_about_predefined_modifiers = 1 warned_about_predefined_modifiers = 1
#define store_modifier(name,old) \ #define store_modifier(name,old) \
if (old && old != modifier_index) \ if (old && old != modifier_index) \
wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.", \
name, code, index_to_name (old), \ name, code, index_to_name (old), \
index_to_name (modifier_index)), \ index_to_name (modifier_index)), \
warned_about_duplicate_modifiers = 1; \ warned_about_duplicate_modifiers = 1; \
@@ -252,8 +252,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit) else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0; warn = "Alt", alt_bit = 0;
if (warn) { if (warn) {
wwarning wwarning("%s is being used for both Mode_switch and %s.",
("%s is being used for both Mode_switch and %s.\n\n",
index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1; index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
} }
} }

View File

@@ -865,7 +865,7 @@ static void launchDockedApplication(WAppIcon * btn, Bool withSelection)
dockIconPaint(btn); dockIconPaint(btn);
} }
} else { } else {
wwarning(_("could not launch application %s\n"), btn->command); wwarning(_("could not launch application %s"), btn->command);
btn->launching = 0; btn->launching = 0;
if (!btn->relaunching) { if (!btn->relaunching) {
btn->running = 0; btn->running = 0;

View File

@@ -494,8 +494,7 @@ static void inotifyWatchConfig()
*/ */
inotifyWD = inotify_add_watch(inotifyFD, watchPath, IN_ALL_EVENTS); inotifyWD = inotify_add_watch(inotifyFD, watchPath, IN_ALL_EVENTS);
if (inotifyWD < 0) { if (inotifyWD < 0) {
wwarning(_("could not add an inotify watch on path\n." wwarning(_("could not add an inotify watch on path %s."
"%s\n"
"Changes to the defaults database will require" "Changes to the defaults database will require"
" a restart to take effect."), watchPath); " a restart to take effect."), watchPath);
close(inotifyFD); close(inotifyFD);

View File

@@ -175,7 +175,7 @@ static int catchXError(Display * dpy, XErrorEvent * error)
return 0; return 0;
} }
FormatXError(dpy, error, buffer, MAXLINE); FormatXError(dpy, error, buffer, MAXLINE);
wwarning(_("internal X error: %s\n"), buffer); wwarning(_("internal X error: %s"), buffer);
return -1; return -1;
} }
@@ -228,13 +228,13 @@ static RETSIGTYPE handleExitSig(int sig)
sigprocmask(SIG_BLOCK, &sigs, NULL); sigprocmask(SIG_BLOCK, &sigs, NULL);
if (sig == SIGUSR1) { if (sig == SIGUSR1) {
wwarning("got signal %i - restarting\n", sig); wwarning("got signal %i - restarting", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_RESTART); SIG_WCHANGE_STATE(WSTATE_NEED_RESTART);
} else if (sig == SIGUSR2) { } else if (sig == SIGUSR2) {
wwarning("got signal %i - rereading defaults\n", sig); wwarning("got signal %i - rereading defaults", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_REREAD); SIG_WCHANGE_STATE(WSTATE_NEED_REREAD);
} else if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP) { } else if (sig == SIGTERM || sig == SIGINT || sig == SIGHUP) {
wwarning("got signal %i - exiting...\n", sig); wwarning("got signal %i - exiting...", sig);
SIG_WCHANGE_STATE(WSTATE_NEED_EXIT); SIG_WCHANGE_STATE(WSTATE_NEED_EXIT);
} }
@@ -255,7 +255,7 @@ static void dummyHandler(int sig)
*/ */
static RETSIGTYPE handleSig(int sig) static RETSIGTYPE handleSig(int sig)
{ {
wfatal("got signal %i\n", sig); wfatal("got signal %i", sig);
/* Setting the signal behaviour back to default and then reraising the /* Setting the signal behaviour back to default and then reraising the
* signal is a cleaner way to make program exit and core dump than calling * signal is a cleaner way to make program exit and core dump than calling
@@ -676,7 +676,7 @@ void StartUp(Bool defaultScreenOnly)
/* check sanity of some values */ /* check sanity of some values */
if (wPreferences.icon_size < 16) { if (wPreferences.icon_size < 16) {
wwarning(_("icon size is configured to %i, but it's too small. Using 16, instead\n"), wwarning(_("icon size is configured to %i, but it's too small. Using 16 instead"),
wPreferences.icon_size); wPreferences.icon_size);
wPreferences.icon_size = 16; wPreferences.icon_size = 16;
} }

View File

@@ -385,7 +385,7 @@ static int bounceDirection(WAppIcon *aicon)
break; break;
default: default:
wwarning(_("Impossible direction: %d\n"), dir); wwarning(_("Impossible direction: %d"), dir);
dir = 3; dir = 3;
break; break;
} }

View File

@@ -2726,7 +2726,7 @@ static void resizebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
#ifndef NUMLOCK_HACK #ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask) if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) { != (event->xbutton.state & ~LockMask)) {
wwarning(_("the NumLock, ScrollLock or similar key seems to be turned on.\n" wwarning(_("The NumLock, ScrollLock or similar key seems to be turned on. "
"Turn it off or some mouse actions and keyboard shortcuts will not work.")); "Turn it off or some mouse actions and keyboard shortcuts will not work."));
} }
#endif #endif
@@ -2884,7 +2884,7 @@ static void titlebarMouseDown(WCoreWindow *sender, void *data, XEvent *event)
#ifndef NUMLOCK_HACK #ifndef NUMLOCK_HACK
if ((event->xbutton.state & ValidModMask) if ((event->xbutton.state & ValidModMask)
!= (event->xbutton.state & ~LockMask)) { != (event->xbutton.state & ~LockMask)) {
wwarning(_("the NumLock, ScrollLock or similar key seems to be turned on.\n" wwarning(_("The NumLock, ScrollLock or similar key seems to be turned on. "
"Turn it off or some mouse actions and keyboard shortcuts will not work.")); "Turn it off or some mouse actions and keyboard shortcuts will not work."));
} }
#endif #endif

View File

@@ -122,24 +122,24 @@ static void x_reset_modifier_mapping(Display * display)
XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display); XModifierKeymap *x_modifier_keymap = XGetModifierMapping(display);
#define modwarn(name,old,other) \ #define modwarn(name,old,other) \
wwarning ("%s (0x%x) generates %s, which is generated by %s.\n\n", \ wwarning ("%s (0x%x) generates %s, which is generated by %s.", \
name, code, index_to_name (old), other), \ name, code, index_to_name (old), other), \
warned_about_overlapping_modifiers = 1 warned_about_overlapping_modifiers = 1
#define modbarf(name,other) \ #define modbarf(name,other) \
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
name, code, other), \ name, code, other), \
warned_about_predefined_modifiers = 1 warned_about_predefined_modifiers = 1
#define check_modifier(name,mask) \ #define check_modifier(name,mask) \
if ((1<<modifier_index) != mask) \ if ((1<<modifier_index) != mask) \
wwarning ("%s (0x%x) generates %s, which is nonsensical.\n\n", \ wwarning ("%s (0x%x) generates %s, which is nonsensical.", \
name, code, index_to_name (modifier_index)), \ name, code, index_to_name (modifier_index)), \
warned_about_predefined_modifiers = 1 warned_about_predefined_modifiers = 1
#define store_modifier(name,old) \ #define store_modifier(name,old) \
if (old && old != modifier_index) \ if (old && old != modifier_index) \
wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.\n\n",\ wwarning ("%s (0x%x) generates both %s and %s, which is nonsensical.", \
name, code, index_to_name (old), \ name, code, index_to_name (old), \
index_to_name (modifier_index)), \ index_to_name (modifier_index)), \
warned_about_duplicate_modifiers = 1; \ warned_about_duplicate_modifiers = 1; \
@@ -253,8 +253,7 @@ static void x_reset_modifier_mapping(Display * display)
else if (mode_bit == alt_bit) else if (mode_bit == alt_bit)
warn = "Alt", alt_bit = 0; warn = "Alt", alt_bit = 0;
if (warn) { if (warn) {
wwarning wwarning("%s is being used for both Mode_switch and %s.",
("%s is being used for both Mode_switch and %s.\n\n",
index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1; index_to_name(mode_bit), warn), warned_about_overlapping_modifiers = 1;
} }
} }

View File

@@ -492,7 +492,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
GETSTRORGOTO(val, tmp, 2, error); GETSTRORGOTO(val, tmp, 2, error);
if (!XParseColor(dpy, DefaultColormap(dpy, scr), tmp, &color)) { if (!XParseColor(dpy, DefaultColormap(dpy, scr), tmp, &color)) {
wwarning("could not parse color %s in texture %s\n", tmp, text); wwarning("could not parse color %s in texture %s", tmp, text);
RReleaseImage(image); RReleaseImage(image);
goto error; goto error;
} }
@@ -913,7 +913,7 @@ void helperLoop(RContext * rc)
buf[4] = 0; buf[4] = 0;
workspace = atoi(buf); workspace = atoi(buf);
if (workspace < 0 || workspace >= WORKSPACE_COUNT) { if (workspace < 0 || workspace >= WORKSPACE_COUNT) {
wwarning("received message with invalid workspace number %i\n", workspace); wwarning("received message with invalid workspace number %i", workspace);
continue; continue;
} }
} }
@@ -1216,7 +1216,7 @@ int main(int argc, char **argv)
} else if (strcmp(argv[i], "-display") == 0) { } else if (strcmp(argv[i], "-display") == 0) {
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
display = argv[i]; display = argv[i];
@@ -1246,38 +1246,38 @@ int main(int argc, char **argv)
update++; update++;
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
domain = wstrdup(argv[i]); domain = wstrdup(argv[i]);
} else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--colors") == 0) { } else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--colors") == 0) {
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
if (sscanf(argv[i], "%i", &cpc) != 1) { if (sscanf(argv[i], "%i", &cpc) != 1) {
wfatal("bad value for colors per channel: \"%s\"\n", argv[i]); wfatal("bad value for colors per channel: \"%s\"", argv[i]);
exit(1); exit(1);
} }
} else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--back-color") == 0) { } else if (strcmp(argv[i], "-b") == 0 || strcmp(argv[i], "--back-color") == 0) {
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
back_color = argv[i]; back_color = argv[i];
} else if (strcmp(argv[i], "-p") == 0 || strcmp(argv[i], "--parse") == 0) { } else if (strcmp(argv[i], "-p") == 0 || strcmp(argv[i], "--parse") == 0) {
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
texture = argv[i]; texture = argv[i];
} else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--workspace") == 0) { } else if (strcmp(argv[i], "-w") == 0 || strcmp(argv[i], "--workspace") == 0) {
i++; i++;
if (i >= argc) { if (i >= argc) {
wfatal("too few arguments for %s\n", argv[i - 1]); wfatal("too few arguments for %s", argv[i - 1]);
exit(1); exit(1);
} }
if (sscanf(argv[i], "%i", &workspace) != 1) { if (sscanf(argv[i], "%i", &workspace) != 1) {