aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-06-11 11:00:45 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-11-01 09:52:46 (GMT)
commit8c208459910f1dddcfdeb00567b990eebfc218b8 (patch)
tree47c442f906124306a52e13641d28fc6cd1ac513e /src/Window.cc
parent60cd98604ae0ee62d64e3bc852898f69dae221d4 (diff)
downloadfluxbox_pavel-8c208459910f1dddcfdeb00567b990eebfc218b8.zip
fluxbox_pavel-8c208459910f1dddcfdeb00567b990eebfc218b8.tar.bz2
Simplify FbTk::Resource template class
by outsourcing the conversion from string/lua to the specific type (and back) to a separate class. This change touches a lot of files because the interface of FbTk::Resource changed slightly. However, the changes are minor.
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index db5bacc..551836c 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -251,6 +251,11 @@ private:
251 int m_mode; 251 int m_mode;
252}; 252};
253 253
254typedef FbTk::Resource<
255 vector<WinButton::Type>,
256 FbTk::VectorTraits<FbTk::EnumTraits<WinButton::Type> >
257> WinButtonsResource;
258
254} 259}
255 260
256 261
@@ -3430,9 +3435,6 @@ void FluxboxWindow::setupWindow() {
3430 // sets up our window 3435 // sets up our window
3431 // we allow both to be done at once to share the commands 3436 // we allow both to be done at once to share the commands
3432 3437
3433 using namespace FbTk;
3434 typedef FbTk::Resource<vector<WinButton::Type> > WinButtonsResource;
3435
3436 string titlebar_name[2]; 3438 string titlebar_name[2];
3437 string titlebar_alt_name[2]; 3439 string titlebar_alt_name[2];
3438 titlebar_name[0] = screen().name() + ".titlebar.left"; 3440 titlebar_name[0] = screen().name() + ".titlebar.left";
@@ -3495,7 +3497,6 @@ void FluxboxWindow::updateButtons() {
3495 titlebar_name[0] = screen().name() + ".titlebar.left"; 3497 titlebar_name[0] = screen().name() + ".titlebar.left";
3496 titlebar_name[1] = screen().name() + ".titlebar.right"; 3498 titlebar_name[1] = screen().name() + ".titlebar.right";
3497 3499
3498 typedef FbTk::Resource<vector<WinButton::Type> > WinButtonsResource;
3499 WinButtonsResource *titlebar_side[2]; 3500 WinButtonsResource *titlebar_side[2];
3500 ResourceManager &rm = screen().resourceManager(); 3501 ResourceManager &rm = screen().resourceManager();
3501 3502