aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-09-05 00:37:16 (GMT)
committerfluxgen <fluxgen>2004-09-05 00:37:16 (GMT)
commitfb2e570e8c9fe92e448b017643c202c49a5d2457 (patch)
tree84ab94b2bbfc5d6b2b231272037143af0c28b78a
parentcc7586f4833580dca93c87b1fc0837eb8090461b (diff)
downloadfluxbox-fb2e570e8c9fe92e448b017643c202c49a5d2457.zip
fluxbox-fb2e570e8c9fe92e448b017643c202c49a5d2457.tar.bz2
unique list from removeDuplicate. If we, for some reason, should have duplicate windows in the second argument windowlist
-rw-r--r--src/IconbarTool.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index 90e0201..88670cb 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.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: IconbarTool.cc,v 1.44 2004/08/30 13:42:13 fluxgen Exp $ 23// $Id: IconbarTool.cc,v 1.45 2004/09/05 00:37:16 fluxgen Exp $
24 24
25#include "IconbarTool.hh" 25#include "IconbarTool.hh"
26 26
@@ -257,7 +257,7 @@ void removeDuplicate(const IconbarTool::IconList &iconlist, std::list<FluxboxWin
257 257
258 // remove already existing windows 258 // remove already existing windows
259 windowlist.erase(remove_it, windowlist.end()); 259 windowlist.erase(remove_it, windowlist.end());
260 260 windowlist.unique();
261} 261}
262 262
263}; // end anonymous namespace 263}; // end anonymous namespace
@@ -694,9 +694,12 @@ void IconbarTool::removeWindow(FluxboxWindow &win) {
694 break; 694 break;
695 } 695 }
696 // did we find it? 696 // did we find it?
697 if (it == m_icon_list.end()) 697 if (it == m_icon_list.end()) {
698 return; 698 return;
699 699 }
700#ifdef DEBUG
701 cerr<<"IconbarTool::"<<__FUNCTION__<<"( 0x"<<&win<<" title = "<<win.title()<<") found!"<<endl;
702#endif // DEBUG
700 // detach from all signals 703 // detach from all signals
701 win.focusSig().detach(this); 704 win.focusSig().detach(this);
702 win.dieSig().detach(this); 705 win.dieSig().detach(this);
@@ -719,7 +722,9 @@ void IconbarTool::addWindow(FluxboxWindow &win) {
719 // we just want windows that has clients 722 // we just want windows that has clients
720 if (win.clientList().empty() || win.isIconHidden() ) 723 if (win.clientList().empty() || win.isIconHidden() )
721 return; 724 return;
722 725#ifdef DEBUG
726 cerr<<"IconbarTool::addWindow(0x"<<&win<<" title = "<<win.title()<<")"<<endl;
727#endif // DEBUG
723 IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win); 728 IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win);
724 729
725 renderButton(*button, false); // update the attributes, but don't clear it 730 renderButton(*button, false); // update the attributes, but don't clear it
@@ -732,6 +737,7 @@ void IconbarTool::addWindow(FluxboxWindow &win) {
732 win.workspaceSig().attach(this); 737 win.workspaceSig().attach(this);
733 win.stateSig().attach(this); 738 win.stateSig().attach(this);
734 win.titleSig().attach(this); 739 win.titleSig().attach(this);
740
735} 741}
736 742
737void IconbarTool::updateIcons() { 743void IconbarTool::updateIcons() {