summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/MacroCommand.cc16
-rw-r--r--src/FbTk/StringUtil.hh2
-rw-r--r--src/Keys.cc8
-rw-r--r--src/Makefile.am8
-rw-r--r--src/RootTheme.cc4
-rw-r--r--src/Screen.cc2
-rw-r--r--src/SystemTray.cc2
-rw-r--r--src/TextDialog.cc1
-rw-r--r--src/Window.cc4
-rw-r--r--src/main.cc4
10 files changed, 31 insertions, 20 deletions
diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc
index 511683b..555e5f5 100644
--- a/src/FbTk/MacroCommand.cc
+++ b/src/FbTk/MacroCommand.cc
@@ -33,16 +33,18 @@ namespace {
33template <typename M> 33template <typename M>
34M *addCommands(M *macro, const std::string &args, bool trusted) { 34M *addCommands(M *macro, const std::string &args, bool trusted) {
35 35
36 std::string blah; 36 std::string remainder;
37 std::list<std::string> cmds; 37 std::list<std::string> cmds;
38 StringUtil::stringTokensBetween(cmds, args, blah, '{', '}'); 38 StringUtil::stringTokensBetween(cmds, args, remainder, '{', '}');
39 RefCount<Command<void> > cmd(0); 39 RefCount<Command<void> > cmd(0);
40 40
41 std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end(); 41 if (remainder.length() == 0) {
42 for (; it != it_end; ++it) { 42 std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end();
43 cmd = CommandParser<void>::instance().parse(*it, trusted); 43 for (; it != it_end; ++it) {
44 if (*cmd) 44 cmd = CommandParser<void>::instance().parse(*it, trusted);
45 macro->add(cmd); 45 if (*cmd)
46 macro->add(cmd);
47 }
46 } 48 }
47 49
48 if (macro->size() > 0) 50 if (macro->size() > 0)
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh
index 75fa69e..35f23a2 100644
--- a/src/FbTk/StringUtil.hh
+++ b/src/FbTk/StringUtil.hh
@@ -84,7 +84,7 @@ static void stringTokensBetween(Container &container, const std::string &in,
84 while (true) { 84 while (true) {
85 err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars, 85 err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars,
86 allow_nesting); 86 allow_nesting);
87 if (err == 0) 87 if (err <= 0)
88 break; 88 break;
89 container.push_back(token); 89 container.push_back(token);
90 pos += err; 90 pos += err;
diff --git a/src/Keys.cc b/src/Keys.cc
index ac25588..794aad4 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -35,6 +35,7 @@
35#include "FbTk/CommandParser.hh" 35#include "FbTk/CommandParser.hh"
36#include "FbTk/I18n.hh" 36#include "FbTk/I18n.hh"
37#include "FbTk/AutoReloadHelper.hh" 37#include "FbTk/AutoReloadHelper.hh"
38#include "FbTk/STLUtil.hh"
38 39
39#ifdef HAVE_CONFIG_H 40#ifdef HAVE_CONFIG_H
40#include "config.h" 41#include "config.h"
@@ -102,6 +103,8 @@ using std::vector;
102using std::ifstream; 103using std::ifstream;
103using std::pair; 104using std::pair;
104 105
106using FbTk::STLUtil::destroyAndClearSecond;
107
105// helper class 'keytree' 108// helper class 'keytree'
106class Keys::t_key { 109class Keys::t_key {
107public: 110public:
@@ -185,9 +188,8 @@ Keys::~Keys() {
185 188
186/// Destroys the keytree 189/// Destroys the keytree
187void Keys::deleteTree() { 190void Keys::deleteTree() {
188 for (keyspace_t::iterator map_it = m_map.begin(); map_it != m_map.end(); ++map_it) 191
189 delete map_it->second; 192 destroyAndClearSecond(m_map);
190 m_map.clear();
191 next_key = 0; 193 next_key = 0;
192 saved_keymode = 0; 194 saved_keymode = 0;
193} 195}
diff --git a/src/Makefile.am b/src/Makefile.am
index 6861506..24153a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,7 +54,7 @@ defaults.hh: Makefile
54 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \ 54 echo '#define PROGRAM_PREFIX "$(PROGRAM_PREFIX:NONE=)"'; \
55 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \ 55 echo '#define PROGRAM_SUFFIX "$(PROGRAM_SUFFIX:NONE=)"'; \
56 echo 'std::string realProgramName(std::string name);'; \ 56 echo 'std::string realProgramName(std::string name);'; \
57 echo 'const char* svnversion(void);' ) > defaults.hh 57 echo 'const char* gitrevision();' ) > defaults.hh
58 58
59defaults.cc: force 59defaults.cc: force
60 @( \ 60 @( \
@@ -64,7 +64,7 @@ defaults.cc: force
64 echo ' return PROGRAM_PREFIX + name + PROGRAM_SUFFIX;'; \ 64 echo ' return PROGRAM_PREFIX + name + PROGRAM_SUFFIX;'; \
65 echo '}'; \ 65 echo '}'; \
66 echo ''; \ 66 echo ''; \
67 echo 'const char* svnversion(void) {'; \ 67 echo 'const char* gitrevision() {'; \
68 echo ' return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d ' ')`'";';\ 68 echo ' return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d ' ')`'";';\
69 echo '}' ) > defaults_tmp.cc 69 echo '}' ) > defaults_tmp.cc
70 @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi 70 @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi
@@ -84,8 +84,7 @@ if GNOME
84gnome_SOURCE= Gnome.hh Gnome.cc 84gnome_SOURCE= Gnome.hh Gnome.cc
85endif 85endif
86if REMEMBER_SRC 86if REMEMBER_SRC
87REMEMBER_SOURCE= Remember.hh Remember.cc \ 87REMEMBER_SOURCE= Remember.hh Remember.cc
88 ClientPattern.hh ClientPattern.cc
89endif 88endif
90if TOOLBAR_SRC 89if TOOLBAR_SRC
91TOOLBAR_SOURCE = Toolbar.hh Toolbar.cc \ 90TOOLBAR_SOURCE = Toolbar.hh Toolbar.cc \
@@ -132,6 +131,7 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \
132 RootCmdMenuItem.hh RootCmdMenuItem.cc\ 131 RootCmdMenuItem.hh RootCmdMenuItem.cc\
133 MenuCreator.hh MenuCreator.cc \ 132 MenuCreator.hh MenuCreator.cc \
134 ClientMenu.hh ClientMenu.cc \ 133 ClientMenu.hh ClientMenu.cc \
134 ClientPattern.hh ClientPattern.cc \
135 WorkspaceMenu.hh WorkspaceMenu.cc \ 135 WorkspaceMenu.hh WorkspaceMenu.cc \
136 FocusModelMenuItem.hh \ 136 FocusModelMenuItem.hh \
137 ToggleMenu.hh \ 137 ToggleMenu.hh \
diff --git a/src/RootTheme.cc b/src/RootTheme.cc
index 049eb27..34c06e9 100644
--- a/src/RootTheme.cc
+++ b/src/RootTheme.cc
@@ -202,6 +202,10 @@ void RootTheme::reconfigTheme() {
202 filename = FbTk::StringUtil::expandFilename(filename); 202 filename = FbTk::StringUtil::expandFilename(filename);
203 std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z "); 203 std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z ");
204 204
205 // user explicitly requests NO background be set at all
206 if (strstr(m_background->options().c_str(), "unset") != 0) {
207 return;
208 }
205 // style doesn't wish to change the background 209 // style doesn't wish to change the background
206 if (strstr(m_background->options().c_str(), "none") != 0) { 210 if (strstr(m_background->options().c_str(), "none") != 0) {
207 if (!m_first) 211 if (!m_first)
diff --git a/src/Screen.cc b/src/Screen.cc
index 4d9a65f..1581571 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -39,7 +39,7 @@
39#include "FbTk/IntMenuItem.hh" 39#include "FbTk/IntMenuItem.hh"
40#include "FbTk/MenuSeparator.hh" 40#include "FbTk/MenuSeparator.hh"
41#include "FocusModelMenuItem.hh" 41#include "FocusModelMenuItem.hh"
42#include "RadioMenuItem.hh" 42#include "FbTk/RadioMenuItem.hh"
43 43
44// menus 44// menus
45#include "FbMenu.hh" 45#include "FbMenu.hh"
diff --git a/src/SystemTray.cc b/src/SystemTray.cc
index 0c3e550..05d8d09 100644
--- a/src/SystemTray.cc
+++ b/src/SystemTray.cc
@@ -25,13 +25,13 @@
25#include "FbTk/ImageControl.hh" 25#include "FbTk/ImageControl.hh"
26#include "FbTk/TextUtils.hh" 26#include "FbTk/TextUtils.hh"
27#include "FbTk/MemFun.hh" 27#include "FbTk/MemFun.hh"
28#include "FbTk/SimpleObserver.hh"
28 29
29#include "AtomHandler.hh" 30#include "AtomHandler.hh"
30#include "fluxbox.hh" 31#include "fluxbox.hh"
31#include "WinClient.hh" 32#include "WinClient.hh"
32#include "Screen.hh" 33#include "Screen.hh"
33#include "ButtonTheme.hh" 34#include "ButtonTheme.hh"
34#include "SimpleObserver.hh"
35 35
36#include <X11/Xutil.h> 36#include <X11/Xutil.h>
37#include <X11/Xatom.h> 37#include <X11/Xatom.h>
diff --git a/src/TextDialog.cc b/src/TextDialog.cc
index 7f95c13..17f5f37 100644
--- a/src/TextDialog.cc
+++ b/src/TextDialog.cc
@@ -33,7 +33,6 @@
33#include <X11/Xutil.h> 33#include <X11/Xutil.h>
34 34
35#include <memory> 35#include <memory>
36#include <stdexcept>
37 36
38using std::string; 37using std::string;
39 38
diff --git a/src/Window.cc b/src/Window.cc
index 1104e50..b2bfcf7 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -36,7 +36,9 @@
36#include "WinButton.hh" 36#include "WinButton.hh"
37#include "WinButtonTheme.hh" 37#include "WinButtonTheme.hh"
38#include "WindowCmd.hh" 38#include "WindowCmd.hh"
39#ifdef REMEMBER
39#include "Remember.hh" 40#include "Remember.hh"
41#endif
40#include "MenuCreator.hh" 42#include "MenuCreator.hh"
41#include "FocusControl.hh" 43#include "FocusControl.hh"
42#include "IconButton.hh" 44#include "IconButton.hh"
@@ -2197,9 +2199,11 @@ void FluxboxWindow::propertyNotifyEvent(WinClient &client, Atom atom) {
2197 } else if (atom == fbatoms->getMWMHintsAtom()) { 2199 } else if (atom == fbatoms->getMWMHintsAtom()) {
2198 client.updateMWMHints(); 2200 client.updateMWMHints();
2199 updateMWMHintsFromClient(client); 2201 updateMWMHintsFromClient(client);
2202#ifdef REMEMBER
2200 if (!m_toggled_decos) { 2203 if (!m_toggled_decos) {
2201 Remember::instance().updateDecoStateFromClient(client); 2204 Remember::instance().updateDecoStateFromClient(client);
2202 } 2205 }
2206#endif
2203 applyDecorations(); // update decorations (if they changed) 2207 applyDecorations(); // update decorations (if they changed)
2204 } 2208 }
2205 break; 2209 break;
diff --git a/src/main.cc b/src/main.cc
index 1cca774..32d4cc5 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -72,8 +72,8 @@ static void showInfo(ostream &ostr) {
72 _FB_USES_NLS; 72 _FB_USES_NLS;
73 ostr<<_FB_CONSOLETEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl; 73 ostr<<_FB_CONSOLETEXT(Common, FluxboxVersion, "Fluxbox version", "Fluxbox version heading")<<": "<<__fluxbox_version<<endl;
74 74
75 if (strlen(svnversion()) > 0) 75 if (strlen(gitrevision()) > 0)
76 ostr << _FB_CONSOLETEXT(Common, SvnRevision, "GIT Revision", "Revision number in GIT repositary") << ": " << svnversion() << endl; 76 ostr << _FB_CONSOLETEXT(Common, SvnRevision, "GIT Revision", "Revision number in GIT repositary") << ": " << gitrevision() << endl;
77#if defined(__DATE__) && defined(__TIME__) 77#if defined(__DATE__) && defined(__TIME__)
78 ostr<<_FB_CONSOLETEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl; 78 ostr<<_FB_CONSOLETEXT(Common, Compiled, "Compiled", "Time fluxbox was compiled")<<": "<<__DATE__<<" "<<__TIME__<<endl;
79#endif 79#endif