all repos — fluxbox @ 0ec165e85b313588d43dbdc2450da9838c4c528f

custom fork of the fluxbox windowmanager

move STLUtil to FbTk
Mark Tiefenbruck mark@fluxbox.org
commit

0ec165e85b313588d43dbdc2450da9838c4c528f

parent

32eb2a148ea7a257a058658af36e9f8c801a524a

M src/AttentionNoticeHandler.ccsrc/AttentionNoticeHandler.cc

@@ -25,8 +25,8 @@ #include "AttentionNoticeHandler.hh"

#include "Window.hh" #include "Screen.hh" -#include "STLUtil.hh" +#include "FbTk/STLUtil.hh" #include "FbTk/Subject.hh" #include "FbTk/Timer.hh" #include "FbTk/Resource.hh"

@@ -50,7 +50,7 @@ } // end anonymous namespace

AttentionNoticeHandler::~AttentionNoticeHandler() { - STLUtil::destroyAndClearSecond(m_attentions); + FbTk::STLUtil::destroyAndClearSecond(m_attentions); } void AttentionNoticeHandler::addAttention(Focusable &client) {
M src/FbTk/Makefile.amsrc/FbTk/Makefile.am

@@ -57,7 +57,7 @@ KeyUtil.hh KeyUtil.cc \

MenuSeparator.hh MenuSeparator.cc \ stringstream.hh \ TypeAhead.hh SearchResult.hh SearchResult.cc ITypeAheadable.hh \ - Select2nd.hh \ + Select2nd.hh STLUtil.hh \ CachedPixmap.hh CachedPixmap.cc \ ${xpm_SOURCE} \ ${xft_SOURCE} \
M src/IconbarTool.ccsrc/IconbarTool.cc

@@ -37,8 +37,8 @@ #include "WinClient.hh"

#include "FocusControl.hh" #include "FbCommands.hh" #include "Layer.hh" -#include "STLUtil.hh" +#include "FbTk/STLUtil.hh" #include "FbTk/I18n.hh" #include "FbTk/Menu.hh" #include "FbTk/MenuItem.hh"

@@ -523,7 +523,7 @@ }

void IconbarTool::deleteIcons() { m_icon_container.removeAll(); - STLUtil::destroyAndClearSecond(m_icons); + FbTk::STLUtil::destroyAndClearSecond(m_icons); } void IconbarTool::removeWindow(Focusable &win) {
M src/Makefile.amsrc/Makefile.am

@@ -143,7 +143,6 @@ UnderMousePlacement.hh UnderMousePlacement.cc \

AttentionNoticeHandler.hh AttentionNoticeHandler.cc \ IconButton.hh IconButton.cc \ IconbarTheme.hh IconbarTheme.cc \ - STLUtil.hh \ Focusable.hh FocusableList.hh FocusableList.cc \ ${newwmspec_SOURCE} ${gnome_SOURCE} \ ${REMEMBER_SOURCE} ${TOOLBAR_SOURCE}
M src/STLUtil.hhsrc/FbTk/STLUtil.hh

@@ -1,4 +1,4 @@

-// STLUtil.cc for fluxbox +// STLUtil.cc for FbTk // Copyright (c) 2006 Fluxbox Team (fluxgen at fluxbox dot org) // // Permission is hereby granted, free of charge, to any person obtaining a

@@ -19,13 +19,11 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id$ - - -#ifndef STLUTIL_HH -#define STLUTIL_HH +#ifndef FBTK_STLUTIL_HH +#define FBTK_STLUTIL_HH /// contains useful utilities for STL +namespace FbTk { namespace STLUtil { /// calls delete on each item in the container and then clears the container

@@ -51,6 +49,7 @@ delete it->second;

a.clear(); } -}; +}; // end namespace STLUtil +}; // end namespace FbTk #endif // STLUTIL_Hh
M src/Screen.ccsrc/Screen.cc

@@ -37,8 +37,6 @@ #include "Layer.hh"

#include "FocusControl.hh" #include "ScreenPlacement.hh" -#include "STLUtil.hh" - // themes #include "FbWinFrameTheme.hh" #include "MenuTheme.hh"

@@ -79,6 +77,7 @@ #include "FbTk/Transparent.hh"

#include "FbTk/Select2nd.hh" #include "FbTk/Compose.hh" #include "FbTk/FbString.hh" +#include "FbTk/STLUtil.hh" //use GNU extensions #ifndef _GNU_SOURCE

@@ -588,7 +587,7 @@ if (pos_pixmap != None)

imageControl().removeImage(pos_pixmap); removeWorkspaceNames(); - using namespace STLUtil; + using namespace FbTk::STLUtil; destroyAndClear(m_workspaces_list); destroyAndClear(m_managed_resources);