diff options
author | simonb <simonb> | 2006-04-25 02:19:04 (GMT) |
---|---|---|
committer | simonb <simonb> | 2006-04-25 02:19:04 (GMT) |
commit | 3707b74c40256c09465171d39e2c4d95aeaefb0e (patch) | |
tree | dcb835e0ee929b65b53d0c9d0538167f1840245b /src | |
parent | fae88b329c63c16755f2c9b7a5a655a1414ab10f (diff) | |
download | fluxbox_paul-3707b74c40256c09465171d39e2c4d95aeaefb0e.zip fluxbox_paul-3707b74c40256c09465171d39e2c4d95aeaefb0e.tar.bz2 |
fix a bunch of comments, make default textures obvious
Thanks Jonas Koelker
Diffstat (limited to 'src')
-rw-r--r-- | src/ArrowButton.hh | 4 | ||||
-rw-r--r-- | src/CommandParser.cc | 4 | ||||
-rw-r--r-- | src/Container.hh | 2 | ||||
-rw-r--r-- | src/FbTk/EventHandler.hh | 4 | ||||
-rw-r--r-- | src/FbTk/Texture.cc | 8 | ||||
-rw-r--r-- | src/FbTk/Texture.hh | 11 | ||||
-rw-r--r-- | src/FbTk/Theme.hh | 2 | ||||
-rw-r--r-- | src/FbTk/ThemeItems.cc | 6 | ||||
-rw-r--r-- | src/Remember.cc | 2 | ||||
-rw-r--r-- | src/Screen.cc | 3 | ||||
-rw-r--r-- | src/Workspace.hh | 10 | ||||
-rw-r--r-- | src/fluxbox.cc | 2 | ||||
-rw-r--r-- | src/fluxbox.hh | 2 |
13 files changed, 36 insertions, 24 deletions
diff --git a/src/ArrowButton.hh b/src/ArrowButton.hh index b42cce2..59f81fa 100644 --- a/src/ArrowButton.hh +++ b/src/ArrowButton.hh | |||
@@ -31,10 +31,10 @@ class ArrowButton: public FbTk::Button { | |||
31 | public: | 31 | public: |
32 | enum Type { LEFT, RIGHT, UP, DOWN}; | 32 | enum Type { LEFT, RIGHT, UP, DOWN}; |
33 | 33 | ||
34 | ArrowButton(Type arrow_type, const FbTk::FbWindow &parent, | 34 | ArrowButton(ArrowButton::Type arrow_type, const FbTk::FbWindow &parent, |
35 | int x, int y, | 35 | int x, int y, |
36 | unsigned int width, unsigned int height); | 36 | unsigned int width, unsigned int height); |
37 | ArrowButton(Type arrow_type, int screen_num, | 37 | ArrowButton(ArrowButton::Type arrow_type, int screen_num, |
38 | int x, int y, | 38 | int x, int y, |
39 | unsigned int width, unsigned int height); | 39 | unsigned int width, unsigned int height); |
40 | void clear(); | 40 | void clear(); |
diff --git a/src/CommandParser.cc b/src/CommandParser.cc index 1f8218e..95630d0 100644 --- a/src/CommandParser.cc +++ b/src/CommandParser.cc | |||
@@ -45,7 +45,7 @@ CommandFactory::~CommandFactory() { | |||
45 | 45 | ||
46 | } | 46 | } |
47 | 47 | ||
48 | void CommandFactory::addCommand(const string &command_name) { | 48 | void CommandFactory::addCommand(const std::string &command_name) { |
49 | CommandParser::instance().associateCommand(command_name, *this); | 49 | CommandParser::instance().associateCommand(command_name, *this); |
50 | } | 50 | } |
51 | 51 | ||
@@ -62,7 +62,7 @@ CommandParser &CommandParser::instance() { | |||
62 | return *s_singleton; | 62 | return *s_singleton; |
63 | } | 63 | } |
64 | 64 | ||
65 | FbTk::Command *CommandParser::parseLine(const string &line) { | 65 | FbTk::Command *CommandParser::parseLine(const std::string &line) { |
66 | 66 | ||
67 | // parse arguments and command | 67 | // parse arguments and command |
68 | string command = line; | 68 | string command = line; |
diff --git a/src/Container.hh b/src/Container.hh index 448abee..65dfbb9 100644 --- a/src/Container.hh +++ b/src/Container.hh | |||
@@ -97,7 +97,7 @@ public: | |||
97 | inline unsigned int maxHeightPerClient() const { return (empty() ? height() : height()/size()); } | 97 | inline unsigned int maxHeightPerClient() const { return (empty() ? height() : height()/size()); } |
98 | inline bool updateLock() const { return m_update_lock; } | 98 | inline bool updateLock() const { return m_update_lock; } |
99 | 99 | ||
100 | void for_each(std::mem_fun_t<void, FbWindow> function); | 100 | void for_each(std::mem_fun_t<void, FbTk::FbWindow> function); |
101 | void setAlpha(unsigned char alpha); // set alpha on all windows | 101 | void setAlpha(unsigned char alpha); // set alpha on all windows |
102 | 102 | ||
103 | ItemList::iterator begin() { return m_item_list.begin(); } | 103 | ItemList::iterator begin() { return m_item_list.begin(); } |
diff --git a/src/FbTk/EventHandler.hh b/src/FbTk/EventHandler.hh index 4ae1aa5..62e2cb9 100644 --- a/src/FbTk/EventHandler.hh +++ b/src/FbTk/EventHandler.hh | |||
@@ -1,4 +1,4 @@ | |||
1 | // EventHandler.cc for Fluxbox Window Manager | 1 | // EventHandler.hh for Fluxbox Window Manager |
2 | // Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at fluxbox dot org) | 2 | // Copyright (c) 2002-2003 Henrik Kinnunen (fluxgen at fluxbox dot org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /// @file holds EventHandler interface for X events | 24 | /// @file EventHandler.hh holds EventHandler interface for X events |
25 | 25 | ||
26 | #ifndef FBTK_EVENTHANDLER_HH | 26 | #ifndef FBTK_EVENTHANDLER_HH |
27 | #define FBTK_EVENTHANDLER_HH | 27 | #define FBTK_EVENTHANDLER_HH |
diff --git a/src/FbTk/Texture.cc b/src/FbTk/Texture.cc index e06c328..0395cd5 100644 --- a/src/FbTk/Texture.cc +++ b/src/FbTk/Texture.cc | |||
@@ -77,15 +77,19 @@ void Texture::setFromString(const char * const texture_str) { | |||
77 | addType(Texture::VERTICAL); | 77 | addType(Texture::VERTICAL); |
78 | else | 78 | else |
79 | addType(Texture::DIAGONAL); | 79 | addType(Texture::DIAGONAL); |
80 | } else // default is "solid", according to ThemeItems.cc | 80 | } else if (strstr(ts, "solid")) |
81 | addType(Texture::SOLID); | 81 | addType(Texture::SOLID); |
82 | else | ||
83 | addType(Texture::DEFAULT_BEVEL); | ||
82 | 84 | ||
83 | if (strstr(ts, "raised")) | 85 | if (strstr(ts, "raised")) |
84 | addType(Texture::RAISED); | 86 | addType(Texture::RAISED); |
85 | else if (strstr(ts, "sunken")) | 87 | else if (strstr(ts, "sunken")) |
86 | addType(Texture::SUNKEN); | 88 | addType(Texture::SUNKEN); |
87 | else // default us "flat", according to ThemeItems.cc | 89 | else if (strstr(ts, "flat")) |
88 | addType(Texture::FLAT); | 90 | addType(Texture::FLAT); |
91 | else | ||
92 | addType(Texture::DEFAULT_TEXTURE); | ||
89 | 93 | ||
90 | if (! (type() & Texture::FLAT)) | 94 | if (! (type() & Texture::FLAT)) |
91 | if (strstr(ts, "bevel2")) | 95 | if (strstr(ts, "bevel2")) |
diff --git a/src/FbTk/Texture.hh b/src/FbTk/Texture.hh index 162cf44..35b628b 100644 --- a/src/FbTk/Texture.hh +++ b/src/FbTk/Texture.hh | |||
@@ -39,15 +39,18 @@ class Texture { | |||
39 | public: | 39 | public: |
40 | 40 | ||
41 | enum Bevel { | 41 | enum Bevel { |
42 | // why are we not using the lowest-order bit? | ||
42 | FLAT = 0x00002, | 43 | FLAT = 0x00002, |
43 | SUNKEN = 0x00004, | 44 | SUNKEN = 0x00004, |
44 | RAISED = 0x00008 | 45 | RAISED = 0x00008, |
46 | DEFAULT_BEVEL = FLAT, | ||
45 | }; | 47 | }; |
46 | 48 | ||
47 | enum Textures { | 49 | enum Textures { |
48 | NONE = 0x00000, | 50 | NONE = 0x00000, |
49 | SOLID = 0x00010, | 51 | SOLID = 0x00010, |
50 | GRADIENT = 0x00020 | 52 | GRADIENT = 0x00020, |
53 | DEFAULT_TEXTURE = SOLID, | ||
51 | }; | 54 | }; |
52 | 55 | ||
53 | enum Gradients { | 56 | enum Gradients { |
@@ -58,7 +61,7 @@ public: | |||
58 | RECTANGLE = 0x00400, | 61 | RECTANGLE = 0x00400, |
59 | PYRAMID = 0x00800, | 62 | PYRAMID = 0x00800, |
60 | PIPECROSS = 0x01000, | 63 | PIPECROSS = 0x01000, |
61 | ELLIPTIC = 0x02000 | 64 | ELLIPTIC = 0x02000 |
62 | }; | 65 | }; |
63 | 66 | ||
64 | enum { | 67 | enum { |
diff --git a/src/FbTk/Theme.hh b/src/FbTk/Theme.hh index 5edc840..e3fc5b4 100644 --- a/src/FbTk/Theme.hh +++ b/src/FbTk/Theme.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /** | 24 | /** |
25 | @file holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme | 25 | @file Theme.hh holds ThemeItem<T>, Theme and ThemeManager which is the base for any theme |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef FBTK_THEME_HH | 28 | #ifndef FBTK_THEME_HH |
diff --git a/src/FbTk/ThemeItems.cc b/src/FbTk/ThemeItems.cc index 41d05e8..2f58b2a 100644 --- a/src/FbTk/ThemeItems.cc +++ b/src/FbTk/ThemeItems.cc | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | // $Id$ | 22 | // $Id$ |
23 | 23 | ||
24 | /// @file implements common theme items | 24 | /// @file ThemeItems.cc implements common theme items |
25 | 25 | ||
26 | #ifndef THEMEITEMS_HH | 26 | #ifndef THEMEITEMS_HH |
27 | #define THEMEITEMS_HH | 27 | #define THEMEITEMS_HH |
@@ -71,7 +71,7 @@ void ThemeItem<string>::setFromString(const char *str) { | |||
71 | } | 71 | } |
72 | 72 | ||
73 | template <> | 73 | template <> |
74 | void ThemeItem<int>::load(const string *name, const string *altname) { } | 74 | void ThemeItem<int>::load(const std::string *name, const std::string *altname) { } |
75 | 75 | ||
76 | template<> | 76 | template<> |
77 | void ThemeItem<int>::setDefaultValue() { | 77 | void ThemeItem<int>::setDefaultValue() { |
@@ -233,7 +233,7 @@ void ThemeItem<Texture>::load(const string *o_name, const string *o_altname) { | |||
233 | 233 | ||
234 | template <> | 234 | template <> |
235 | void ThemeItem<Texture>::setDefaultValue() { | 235 | void ThemeItem<Texture>::setDefaultValue() { |
236 | m_value.setType(Texture::FLAT | Texture::SOLID); | 236 | m_value.setType(Texture::DEFAULT_BEVEL | Texture::DEFAULT_TEXTURE); |
237 | load(); // one might forget to add line something: so we try to load something.*: too | 237 | load(); // one might forget to add line something: so we try to load something.*: too |
238 | } | 238 | } |
239 | 239 | ||
diff --git a/src/Remember.cc b/src/Remember.cc index 3a2aac4..33ed08d 100644 --- a/src/Remember.cc +++ b/src/Remember.cc | |||
@@ -297,7 +297,7 @@ Application * Remember::add(WinClient &winclient) { | |||
297 | return app; | 297 | return app; |
298 | } | 298 | } |
299 | 299 | ||
300 | int Remember::parseApp(ifstream &file, Application &app, string *first_line) { | 300 | int Remember::parseApp(std::ifstream &file, Application &app, std::string *first_line) { |
301 | string line; | 301 | string line; |
302 | _FB_USES_NLS; | 302 | _FB_USES_NLS; |
303 | int row = 0; | 303 | int row = 0; |
diff --git a/src/Screen.cc b/src/Screen.cc index 03ec510..0609cd4 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -293,7 +293,8 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, | |||
293 | } | 293 | } |
294 | 294 | ||
295 | BScreen::BScreen(FbTk::ResourceManager &rm, | 295 | BScreen::BScreen(FbTk::ResourceManager &rm, |
296 | const string &screenname, const string &altscreenname, | 296 | const std::string &screenname, |
297 | const std::string &altscreenname, | ||
297 | int scrn, int num_layers) : | 298 | int scrn, int num_layers) : |
298 | m_clientlist_sig(*this), // client signal | 299 | m_clientlist_sig(*this), // client signal |
299 | m_iconlist_sig(*this), // icon list signal | 300 | m_iconlist_sig(*this), // icon list signal |
diff --git a/src/Workspace.hh b/src/Workspace.hh index 135ac4d..ffcde8a 100644 --- a/src/Workspace.hh +++ b/src/Workspace.hh | |||
@@ -42,8 +42,8 @@ class FluxboxWindow; | |||
42 | class WinClient; | 42 | class WinClient; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | Handles a single workspace | 45 | * Handles a single workspace |
46 | */ | 46 | */ |
47 | class Workspace:private FbTk::NotCopyable, private FbTk::Observer { | 47 | class Workspace:private FbTk::NotCopyable, private FbTk::Observer { |
48 | public: | 48 | public: |
49 | typedef std::vector<FluxboxWindow *> Windows; | 49 | typedef std::vector<FluxboxWindow *> Windows; |
@@ -54,13 +54,17 @@ public: | |||
54 | 54 | ||
55 | void setLastFocusedWindow(FluxboxWindow *w); | 55 | void setLastFocusedWindow(FluxboxWindow *w); |
56 | 56 | ||
57 | /// Set workspace name | 57 | /// Set workspace name |
58 | void setName(const std::string &name); | 58 | void setName(const std::string &name); |
59 | /// Deiconify all windows on this workspace | ||
59 | void showAll(); | 60 | void showAll(); |
60 | void hideAll(bool interrupt_moving); | 61 | void hideAll(bool interrupt_moving); |
62 | /// Iconify all windows on this workspace | ||
61 | void removeAll(); | 63 | void removeAll(); |
62 | void reconfigure(); | 64 | void reconfigure(); |
63 | void shutdown(); | 65 | void shutdown(); |
66 | |||
67 | /// Add @a win to this workspace, placing it if @a place is true | ||
64 | void addWindow(FluxboxWindow &win, bool place = false); | 68 | void addWindow(FluxboxWindow &win, bool place = false); |
65 | int removeWindow(FluxboxWindow *win, bool still_alive); | 69 | int removeWindow(FluxboxWindow *win, bool still_alive); |
66 | void updateClientmenu(); | 70 | void updateClientmenu(); |
diff --git a/src/fluxbox.cc b/src/fluxbox.cc index c18cc32..48b67bf 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc | |||
@@ -1511,7 +1511,7 @@ string Fluxbox::getRcFilename() { | |||
1511 | } | 1511 | } |
1512 | 1512 | ||
1513 | /// Provides default filename of data file | 1513 | /// Provides default filename of data file |
1514 | void Fluxbox::getDefaultDataFilename(char *name, string &filename) { | 1514 | void Fluxbox::getDefaultDataFilename(char *name, std::string &filename) { |
1515 | filename = string(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + name); | 1515 | filename = string(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + name); |
1516 | } | 1516 | } |
1517 | 1517 | ||
diff --git a/src/fluxbox.hh b/src/fluxbox.hh index da0a60a..7506dc6 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh | |||
@@ -199,7 +199,7 @@ public: | |||
199 | bool menuTimestampsChanged() const; | 199 | bool menuTimestampsChanged() const; |
200 | bool haveShape() const { return m_have_shape; } | 200 | bool haveShape() const { return m_have_shape; } |
201 | int shapeEventbase() const { return m_shape_eventbase; } | 201 | int shapeEventbase() const { return m_shape_eventbase; } |
202 | void getDefaultDataFilename(char *, std::string &); | 202 | void getDefaultDataFilename(char *name, std::string &); |
203 | // screen mouse was in at last key event | 203 | // screen mouse was in at last key event |
204 | BScreen *mouseScreen() { return m_mousescreen; } | 204 | BScreen *mouseScreen() { return m_mousescreen; } |
205 | // screen of window that last key event (i.e. focused window) went to | 205 | // screen of window that last key event (i.e. focused window) went to |