aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-18 09:47:03 (GMT)
committerfluxgen <fluxgen>2002-08-18 09:47:03 (GMT)
commit9ad48cd5acf4c1035c865fc4b9bf669c393b736a (patch)
treee43022c5a809aeceb9e78465aab2c0ce64b65338
parent866d68d87fd02140ee9a71b2368f26edbafbfdea (diff)
downloadfluxbox_paul-9ad48cd5acf4c1035c865fc4b9bf669c393b736a.zip
fluxbox_paul-9ad48cd5acf4c1035c865fc4b9bf669c393b736a.tar.bz2
license and handleEvent fix
-rw-r--r--util/bsetroot.cc29
-rw-r--r--util/bsetroot.hh40
2 files changed, 58 insertions, 11 deletions
diff --git a/util/bsetroot.cc b/util/bsetroot.cc
index eef21a7..be7b69a 100644
--- a/util/bsetroot.cc
+++ b/util/bsetroot.cc
@@ -1,6 +1,29 @@
1// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
2// Copyright (c) 1997 - 2000 Brad Hughes <bhughes at trolltech.com>
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
21// $Id: bsetroot.cc,v 1.8 2002/08/18 09:47:03 fluxgen Exp $
22
1#include "bsetroot.hh" 23#include "bsetroot.hh"
2 24
3#include "../src/i18n.hh" 25#include "../src/i18n.hh"
26#include "../src/Image.hh"
4 27
5#ifdef HAVE_CONFIG_H 28#ifdef HAVE_CONFIG_H
6# include "../config.h" 29# include "../config.h"
@@ -81,7 +104,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
81 usage(); 104 usage();
82 } 105 }
83 106
84 if ((mod + sol + grd) != True) { 107 if ((mod + sol + grd) != true) {
85 fprintf(stderr, 108 fprintf(stderr,
86 I18n::instance()-> 109 I18n::instance()->
87 getMessage( 110 getMessage(
@@ -107,7 +130,7 @@ bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
107} 130}
108 131
109 132
110bsetroot::~bsetroot(void) { 133bsetroot::~bsetroot() {
111 XKillClient(display, AllTemporary); 134 XKillClient(display, AllTemporary);
112 135
113 if (pixmaps) { // should always be true 136 if (pixmaps) { // should always be true
@@ -181,7 +204,7 @@ void bsetroot::setRootAtoms(Pixmap pixmap, int screen) {
181//-------------- solid -------------------- 204//-------------- solid --------------------
182// draws pixmaps with a single color 205// draws pixmaps with a single color
183//----------------------------------------- 206//-----------------------------------------
184void bsetroot::solid(void) { 207void bsetroot::solid() {
185 register int screen = 0; 208 register int screen = 0;
186 209
187 pixmaps = new Pixmap[getNumberOfScreens()]; 210 pixmaps = new Pixmap[getNumberOfScreens()];
diff --git a/util/bsetroot.hh b/util/bsetroot.hh
index 41d298b..d2f005b 100644
--- a/util/bsetroot.hh
+++ b/util/bsetroot.hh
@@ -1,22 +1,48 @@
1// Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org)
2// Copyright (c) 1997 - 2000 Brad Hughes <bhughes at trolltech.com>
3//
4// Permission is hereby granted, free of charge, to any person obtaining a
5// copy of this software and associated documentation files (the "Software"),
6// to deal in the Software without restriction, including without limitation
7// the rights to use, copy, modify, merge, publish, distribute, sublicense,
8// and/or sell copies of the Software, and to permit persons to whom the
9// Software is furnished to do so, subject to the following conditions:
10//
11// The above copyright notice and this permission notice shall be included in
12// all copies or substantial portions of the Software.
13//
14// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
21// $Id: bsetroot.hh,v 1.4 2002/08/18 09:47:03 fluxgen Exp $
22
1#ifndef BSETROOT_HH 23#ifndef BSETROOT_HH
2#define BSETROOT_HH 24#define BSETROOT_HH
3 25
4#include "../src/BaseDisplay.hh" 26#include "../src/BaseDisplay.hh"
5#include "../src/Image.hh" 27
28class BImageControl;
6 29
7class bsetroot : public BaseDisplay { 30class bsetroot : public BaseDisplay {
8public: 31public:
9 bsetroot(int, char **, char * = 0); 32 bsetroot(int argc, char **argv, char * dpy_name= 0);
10 ~bsetroot(void); 33 ~bsetroot();
11 34
12 inline virtual Bool handleSignal(int) { return False; } 35 inline virtual bool handleSignal(int num) { return False; }
13 36
14 void gradient(void); 37 void gradient();
15 void modula(int, int); 38 void modula(int, int);
16 void solid(void); 39 void solid();
17 void usage(int = 0); 40 void usage(int = 0);
18 void setRootAtoms(Pixmap pixmap, int screen); 41 void setRootAtoms(Pixmap pixmap, int screen);
19 42
43protected:
44 void handleEvent(XEvent *xe) { }
45
20private: 46private:
21 BImageControl **img_ctrl; 47 BImageControl **img_ctrl;
22 Pixmap *pixmaps; 48 Pixmap *pixmaps;
@@ -24,8 +50,6 @@ private:
24 char *fore, *back, *grad; 50 char *fore, *back, *grad;
25 Display *display; 51 Display *display;
26 int num_screens; 52 int num_screens;
27protected:
28 inline virtual void process_event(XEvent *) { }
29 53
30}; 54};
31 55