make bsetroot compile with the new codebase
This commit is contained in:
parent
6b438d9020
commit
c796dccdb9
3 changed files with 23 additions and 36 deletions
|
@ -7,7 +7,9 @@ bin_SCRIPTS = bsetbg
|
||||||
bin_PROGRAMS = bsetroot xftlsfonts
|
bin_PROGRAMS = bsetroot xftlsfonts
|
||||||
|
|
||||||
bsetroot_SOURCES = bsetroot.cc
|
bsetroot_SOURCES = bsetroot.cc
|
||||||
bsetroot_LDADD = ../src/BaseDisplay.o ../src/Color.o ../src/GCCache.o ../src/Texture.o ../src/Timer.o ../src/Image.o ../src/ImageControl.o ../src/i18n.o ../src/Util.o
|
bsetroot_LDADD = ../src/basedisplay.o ../src/color.o ../src/gccache.o \
|
||||||
|
../src/texture.o ../src/timer.o ../src/image.o \
|
||||||
|
../src/imagecontrol.o ../src/util.o
|
||||||
|
|
||||||
xftlsfonts_SOURCES = xftlsfonts.cc
|
xftlsfonts_SOURCES = xftlsfonts.cc
|
||||||
|
|
||||||
|
@ -17,9 +19,3 @@ distclean-local:
|
||||||
rm -f *\~ .\#*
|
rm -f *\~ .\#*
|
||||||
|
|
||||||
# local dependencies
|
# local dependencies
|
||||||
|
|
||||||
bsetroot.o: bsetroot.cc ../config.h ../src/i18n.hh \
|
|
||||||
../src/../nls/blackbox-nls.hh ../src/GCCache.hh ../src/BaseDisplay.hh \
|
|
||||||
../src/Timer.hh ../src/Color.hh ../src/Texture.hh ../src/Util.hh \
|
|
||||||
bsetroot.hh ../src/Image.hh
|
|
||||||
xftlsfonts.o: xftlsfonts.cc
|
|
||||||
|
|
|
@ -43,15 +43,11 @@ extern "C" {
|
||||||
#endif // HAVE_CTYPE_H
|
#endif // HAVE_CTYPE_H
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "../src/i18n.hh"
|
#include "../src/gccache.hh"
|
||||||
#include "../src/GCCache.hh"
|
#include "../src/texture.hh"
|
||||||
#include "../src/Texture.hh"
|
#include "../src/util.hh"
|
||||||
#include "../src/Util.hh"
|
|
||||||
#include "bsetroot.hh"
|
#include "bsetroot.hh"
|
||||||
|
|
||||||
|
|
||||||
I18n i18n;
|
|
||||||
|
|
||||||
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) {
|
||||||
|
|
||||||
|
@ -106,8 +102,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
|
||||||
|
|
||||||
if ((mod + sol + grd) != True) {
|
if ((mod + sol + grd) != True) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
i18n(bsetrootSet, bsetrootMustSpecify,
|
"%s: error: must specify one of: -solid, -mod, -gradient\n",
|
||||||
"%s: error: must specify one of: -solid, -mod, -gradient\n"),
|
|
||||||
getApplicationName());
|
getApplicationName());
|
||||||
|
|
||||||
usage(2);
|
usage(2);
|
||||||
|
@ -348,7 +343,6 @@ void bsetroot::gradient(void) {
|
||||||
|
|
||||||
void bsetroot::usage(int exit_code) {
|
void bsetroot::usage(int exit_code) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
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"
|
||||||
|
@ -360,7 +354,7 @@ void bsetroot::usage(int exit_code) {
|
||||||
" -from <color> gradient start color\n"
|
" -from <color> gradient start color\n"
|
||||||
" -to <color> gradient end color\n\n"
|
" -to <color> gradient end color\n\n"
|
||||||
" -solid <color> solid color\n\n"
|
" -solid <color> solid color\n\n"
|
||||||
" -help print this help text and exit\n"),
|
" -help print this help text and exit\n",
|
||||||
getApplicationName());
|
getApplicationName());
|
||||||
|
|
||||||
exit(exit_code);
|
exit(exit_code);
|
||||||
|
@ -369,15 +363,12 @@ 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;
|
||||||
|
|
||||||
i18n.openCatalog("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(mainSet, mainDISPLAYRequiresArg,
|
fprintf(stderr, "error: '-display' requires an argument\n");
|
||||||
"error: '-display' requires an argument\n"));
|
|
||||||
|
|
||||||
::exit(1);
|
::exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#ifndef __bsetroot2_hh
|
#ifndef __bsetroot2_hh
|
||||||
#define __bsetroot2_hh
|
#define __bsetroot2_hh
|
||||||
|
|
||||||
#include "../src/BaseDisplay.hh"
|
#include "../src/basedisplay.hh"
|
||||||
#include "../src/Image.hh"
|
#include "../src/image.hh"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue