all repos — fluxbox @ 5685dc91951477ee0e0a280d1f30ec737cc95550

custom fork of the fluxbox windowmanager

empty accessor
fluxgen fluxgen
commit

5685dc91951477ee0e0a280d1f30ec737cc95550

parent

11a7029b22d1e4a25cbabb7e6af8ee3e69994d1f

2 files changed, 5 insertions(+), 4 deletions(-)

jump to
M src/Container.ccsrc/Container.cc

@@ -20,7 +20,7 @@ // 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: Container.cc,v 1.12 2004/01/14 23:05:14 fluxgen Exp $ +// $Id: Container.cc,v 1.13 2004/01/21 13:34:40 fluxgen Exp $ #include "Container.hh"

@@ -184,7 +184,7 @@ }

} void Container::repositionItems() { - if (size() == 0 || m_update_lock) + if (empty() || m_update_lock) return; //!! TODO vertical position
M src/Container.hhsrc/Container.hh

@@ -20,7 +20,7 @@ // 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: Container.hh,v 1.5 2003/12/23 01:55:07 rathnor Exp $ +// $Id: Container.hh,v 1.6 2004/01/21 13:34:40 fluxgen Exp $ #ifndef CONTAINER_HH #define CONTAINER_HH

@@ -68,10 +68,11 @@

/// accessors inline Alignment alignment() const { return m_align; } inline int size() const { return m_item_list.size(); } + inline bool empty() const { return m_item_list.empty(); } inline const Item selected() const { return m_selected; } inline Item selected() { return m_selected; } unsigned int maxWidthPerClient() const; - inline unsigned int maxHeightPerClient() const { return (size() == 0 ? height() : height()/size()); } + inline unsigned int maxHeightPerClient() const { return (empty() ? height() : height()/size()); } inline bool updateLock() const { return m_update_lock; } private: