aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Container.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-01-18 08:33:47 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-01-18 08:33:47 (GMT)
commit1d4bea8a2db2c0ab1e14b8afd81c87b80a262d66 (patch)
tree21cc4e919cabe52ab8d355a7ceec980da6fb420a /src/FbTk/Container.cc
parent3a5fd7342d6cfd00acafeec4c1f35948a550e4ab (diff)
parent8c2cee577a744870fd497f73a21c2d4e1c45c907 (diff)
downloadfluxbox-1d4bea8a2db2c0ab1e14b8afd81c87b80a262d66.zip
fluxbox-1d4bea8a2db2c0ab1e14b8afd81c87b80a262d66.tar.bz2
Merge branch 'master' of fluxbox@gitfbox:fluxbox
Diffstat (limited to 'src/FbTk/Container.cc')
-rw-r--r--src/FbTk/Container.cc32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc
index 9da25c6..0c9b6ac 100644
--- a/src/FbTk/Container.cc
+++ b/src/FbTk/Container.cc
@@ -23,6 +23,7 @@
23#include "Container.hh" 23#include "Container.hh"
24 24
25#include "Button.hh" 25#include "Button.hh"
26#include "TextUtils.hh"
26#include "EventManager.hh" 27#include "EventManager.hh"
27#include "CompareEqual.hh" 28#include "CompareEqual.hh"
28 29
@@ -62,37 +63,6 @@ void Container::moveResize(int x, int y,
62 repositionItems(); 63 repositionItems();
63} 64}
64 65
65#ifdef NOT_USED
66void Container::insertItems(ItemList &item_list, int pos) {
67
68 // make sure all items have parent == this
69 ItemList::iterator it = m_item_list.begin();
70 ItemList::iterator it_end = m_item_list.end();
71 for (; it != it_end; ++it) {
72 if ((*it)->parent() != this)
73 return;
74 }
75
76 if (pos > size() || pos < 0) {
77 // insert last
78 m_item_list.splice(m_item_list.end(), item_list);
79 } else if (pos == 0) {
80 // insert first
81 m_item_list.splice(m_item_list.begin(), item_list);
82 } else {
83 // find insert point
84 for (it = m_item_list.begin(); pos != 0; ++it, --pos)
85 continue;
86 m_item_list.splice(it, item_list);
87 }
88
89 m_item_list.unique();
90
91 // update position
92 repositionItems();
93}
94#endif
95
96void Container::insertItem(Item item, int pos) { 66void Container::insertItem(Item item, int pos) {
97 if (find(item) != -1) 67 if (find(item) != -1)
98 return; 68 return;