make work with new i18n
This commit is contained in:
parent
67b4df1eff
commit
83347770a6
1 changed files with 7 additions and 8 deletions
|
@ -44,6 +44,8 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
I18n i18n("openbox.cat");
|
||||||
|
|
||||||
bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
|
bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
|
||||||
: BaseDisplay(argv[0], dpy_name)
|
: BaseDisplay(argv[0], dpy_name)
|
||||||
{
|
{
|
||||||
|
@ -99,9 +101,8 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
|
||||||
|
|
||||||
if ((mod + sol + grd) != True) {
|
if ((mod + sol + grd) != True) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
i18n->getMessage(bsetrootSet, bsetrootMustSpecify,
|
i18n(bsetrootSet, bsetrootMustSpecify,
|
||||||
"%s: error: must specify one of: "
|
"%s: error: must specify one of: -solid, -mod, -gradient\n"),
|
||||||
"-solid, -mod, -gradient\n"),
|
|
||||||
getApplicationName());
|
getApplicationName());
|
||||||
|
|
||||||
usage(2);
|
usage(2);
|
||||||
|
@ -328,7 +329,7 @@ void bsetroot::gradient(void) {
|
||||||
|
|
||||||
void bsetroot::usage(int exit_code) {
|
void bsetroot::usage(int exit_code) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
i18n->getMessage(bsetrootSet, bsetrootUsage,
|
i18n(bsetrootSet, bsetrootUsage,
|
||||||
"%s 2.0\n\n"
|
"%s 2.0\n\n"
|
||||||
"Copyright (c) 1997-2000, 2002 Bradley T Hughes\n"
|
"Copyright (c) 1997-2000, 2002 Bradley T Hughes\n"
|
||||||
"Copyright (c) 2001-2002 Sean 'Shaleh' Perry\n\n"
|
"Copyright (c) 2001-2002 Sean 'Shaleh' Perry\n\n"
|
||||||
|
@ -349,15 +350,13 @@ void bsetroot::usage(int exit_code) {
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
char *display_name = (char *) 0;
|
char *display_name = (char *) 0;
|
||||||
|
|
||||||
NLSInit("openbox.cat");
|
|
||||||
|
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
if (! strcmp(argv[i], "-display")) {
|
if (! strcmp(argv[i], "-display")) {
|
||||||
// check for -display option
|
// check for -display option
|
||||||
|
|
||||||
if ((++i) >= argc) {
|
if ((++i) >= argc) {
|
||||||
fprintf(stderr, i18n->getMessage(mainSet, mainDISPLAYRequiresArg,
|
fprintf(stderr, i18n(mainSet, mainDISPLAYRequiresArg,
|
||||||
"error: '-display' requires an argument\n"));
|
"error: '-display' requires an argument\n"));
|
||||||
|
|
||||||
::exit(1);
|
::exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue