summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-07-10 11:53:44 (GMT)
committerfluxgen <fluxgen>2003-07-10 11:53:44 (GMT)
commitffead0ce00201c0ad82b3ccb6a2343f1c82750a7 (patch)
tree7adfa645f189c78b24abc11811a8161f5db47dee
parent0fc80a5a9b820165c95c5258191916f0ccc9bd6e (diff)
downloadfluxbox_lack-ffead0ce00201c0ad82b3ccb6a2343f1c82750a7.zip
fluxbox_lack-ffead0ce00201c0ad82b3ccb6a2343f1c82750a7.tar.bz2
some extra checks on icons
-rw-r--r--src/ToolbarHandler.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ToolbarHandler.cc b/src/ToolbarHandler.cc
index 152ed67..b9cf8d2 100644
--- a/src/ToolbarHandler.cc
+++ b/src/ToolbarHandler.cc
@@ -20,7 +20,7 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23// $Id: ToolbarHandler.cc,v 1.21 2003/07/04 14:06:20 rathnor Exp $ 23// $Id: ToolbarHandler.cc,v 1.22 2003/07/10 11:53:44 fluxgen Exp $
24 24
25/** 25/**
26 * The ToolbarHandler class acts as a rough interface to the toolbar. 26 * The ToolbarHandler class acts as a rough interface to the toolbar.
@@ -216,7 +216,8 @@ void ToolbarHandler::initForScreen(BScreen &screen) {
216 Workspace::Windows::iterator wit = wins.begin(); 216 Workspace::Windows::iterator wit = wins.begin();
217 Workspace::Windows::iterator wit_end = wins.end(); 217 Workspace::Windows::iterator wit_end = wins.end();
218 for (; wit != wit_end; ++wit) { 218 for (; wit != wit_end; ++wit) {
219 if (!m_toolbar->containsIcon(**wit)) 219
220 if (!m_toolbar->containsIcon(**wit) && *wit != 0)
220 m_toolbar->addIcon(*wit); 221 m_toolbar->addIcon(*wit);
221/* 222/*
222 FluxboxWindow::ClientList::iterator cit = (*wit)->clientList().begin(); 223 FluxboxWindow::ClientList::iterator cit = (*wit)->clientList().begin();
@@ -234,6 +235,8 @@ void ToolbarHandler::initForScreen(BScreen &screen) {
234 BScreen::Icons::iterator iconit = iconlist.begin(); 235 BScreen::Icons::iterator iconit = iconlist.begin();
235 BScreen::Icons::iterator iconit_end = iconlist.end(); 236 BScreen::Icons::iterator iconit_end = iconlist.end();
236 for(; iconit != iconit_end; ++iconit) { 237 for(; iconit != iconit_end; ++iconit) {
238 if (*iconit == 0)
239 continue;
237 m_toolbar->addIcon(*iconit); 240 m_toolbar->addIcon(*iconit);
238 } 241 }
239 } 242 }
@@ -243,7 +246,8 @@ void ToolbarHandler::initForScreen(BScreen &screen) {
243 Workspace::Windows::iterator wit = wins.begin(); 246 Workspace::Windows::iterator wit = wins.begin();
244 Workspace::Windows::iterator wit_end = wins.end(); 247 Workspace::Windows::iterator wit_end = wins.end();
245 for (; wit != wit_end; ++wit) { 248 for (; wit != wit_end; ++wit) {
246 if (!m_toolbar->containsIcon(**wit)) 249
250 if (!m_toolbar->containsIcon(**wit) && *wit != 0)
247 m_toolbar->addIcon(*wit); 251 m_toolbar->addIcon(*wit);
248 } 252 }
249 } 253 }
@@ -285,9 +289,8 @@ void ToolbarHandler::setupFrame(FluxboxWindow &win) {
285 // else fall through and add the icon 289 // else fall through and add the icon
286 case LASTMODE: 290 case LASTMODE:
287 case ICONS: 291 case ICONS:
288 if (win.isIconic()) { 292 if (win.isIconic())
289 m_toolbar->addIcon(&win); 293 m_toolbar->addIcon(&win);
290 }
291 break; 294 break;
292 case ALLWINDOWS: 295 case ALLWINDOWS:
293 m_toolbar->addIcon(&win); 296 m_toolbar->addIcon(&win);