all repos — fluxbox @ 9c0272004e2509a2206d94dfbe30bb035c8c6d67

custom fork of the fluxbox windowmanager

using empty instead of size
fluxgen fluxgen
commit

9c0272004e2509a2206d94dfbe30bb035c8c6d67

parent

5685dc91951477ee0e0a280d1f30ec737cc95550

3 files changed, 17 insertions(+), 18 deletions(-)

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

@@ -19,7 +19,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: SystemTray.cc,v 1.5 2004/01/19 18:22:57 fluxgen Exp $ +// $Id: SystemTray.cc,v 1.6 2004/01/21 13:35:10 fluxgen Exp $ #include "SystemTray.hh"

@@ -215,7 +215,7 @@

#ifdef DEBUG cerr<<__FILE__<<"("<<__FUNCTION__<<"): 0x"<<hex<<win<<dec<<endl; #endif // DEBUG - if (m_clients.size() == 0) + if (m_clients.empty()) show(); FbTk::FbWindow *traywin = new TrayWindow(win);

@@ -244,7 +244,7 @@ m_clients.erase(tray_it);

delete traywin; resize(width(), height()); rearrangeClients(); - if (m_clients.size() == 0) { + if (m_clients.empty()) { // so we send configurenotify signal to parent m_window.resize(1, 1); hide();
M src/Toolbar.ccsrc/Toolbar.cc

@@ -22,7 +22,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: Toolbar.cc,v 1.137 2004/01/16 11:41:38 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.138 2004/01/21 13:36:09 fluxgen Exp $ #include "Toolbar.hh"

@@ -370,7 +370,7 @@ tools.end(),

tools.begin(), FbTk::StringUtil::toLower); - if (tools.size() == m_tools.size() && tools.size() != 0) { + if (!tools.empty() && tools.size() == m_tools.size()) { StringList::const_iterator tool_it = tools.begin(); StringList::const_iterator current_tool_it = m_tools.begin(); StringList::const_iterator tool_it_end = tools.end();
M src/fluxbox.ccsrc/fluxbox.cc

@@ -22,7 +22,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: fluxbox.cc,v 1.227 2004/01/19 18:33:05 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.228 2004/01/21 13:33:50 fluxgen Exp $ #include "fluxbox.hh"

@@ -508,8 +508,7 @@ for (int i = 0; i < ScreenCount(display()); i++) {

char scrname[128], altscrname[128]; sprintf(scrname, "session.screen%d", i); sprintf(altscrname, "session.Screen%d", i); - BScreen *screen = new BScreen(m_screen_rm.lock(), - + BScreen *screen = new BScreen(m_screen_rm.lock(), scrname, altscrname, i, getNumberOfLayers()); if (! screen->isScreenManaged()) {

@@ -563,7 +562,7 @@

m_keyscreen = m_mousescreen = m_screen_list.front(); - if (m_screen_list.size() == 0) { + if (m_screen_list.empty()) { //!! TODO: NLS throw string("Couldn't find screens to manage.\n" "Make sure you don't have another window manager running.");

@@ -1544,7 +1543,7 @@ char rc_string[1024];

string dbfile(getRcFilename()); - if (dbfile.size() != 0) { + if (!dbfile.empty()) { m_resourcemanager.save(dbfile.c_str(), dbfile.c_str()); m_screen_rm.save(dbfile.c_str(), dbfile.c_str()); } else

@@ -1593,7 +1592,7 @@

/// @return filename of resource file string Fluxbox::getRcFilename() { - if (m_rc_file.size() == 0) { // set default filename + if (m_rc_file.empty()) { // set default filename string defaultfile(getenv("HOME") + string("/.") + m_RC_PATH + string("/") + m_RC_INIT_FILE); return defaultfile; }

@@ -1612,7 +1611,7 @@

//get resource filename string dbfile(getRcFilename()); - if (dbfile.size() != 0) { + if (!dbfile.empty()) { if (!m_resourcemanager.load(dbfile.c_str())) { cerr<<"Failed to load database:"<<dbfile<<endl; cerr<<"Trying with: "<<DEFAULT_INITFILE<<endl;

@@ -1624,10 +1623,10 @@ if (!m_resourcemanager.load(DEFAULT_INITFILE))

cerr<<"Failed to load database: "<<DEFAULT_INITFILE<<endl; } - if (m_rc_menufile->size() == 0) + if (m_rc_menufile->empty()) m_rc_menufile.setDefaultValue(); - if (m_rc_slitlistfile->size() != 0) { + if (!m_rc_slitlistfile->empty()) { *m_rc_slitlistfile = StringUtil::expandFilename(*m_rc_slitlistfile); } else { string filename;

@@ -1640,7 +1639,7 @@ *m_rc_colors_per_channel = 2;

else if (*m_rc_colors_per_channel > 6) *m_rc_colors_per_channel = 6; - if (m_rc_stylefile->size() == 0) + if (m_rc_stylefile->empty()) *m_rc_stylefile = DEFAULTSTYLE; else // expand tilde *m_rc_stylefile = StringUtil::expandFilename(*m_rc_stylefile);

@@ -1711,7 +1710,7 @@ for (unsigned int i=0; i<paths.size(); ++i)

FbTk::Image::addSearchPath(paths[i]); } - if (dbfile.size() != 0) { + if (!dbfile.empty()) { if (!m_screen_rm.load(dbfile.c_str())) { cerr<<"Failed to load database:"<<dbfile<<endl; cerr<<"Trying with: "<<DEFAULT_INITFILE<<endl;

@@ -1948,7 +1947,7 @@

if (screen != 0) { screen->updateNetizenWindowFocus(); - for (int i=0; i < m_atomhandler.size(); ++i) { + for (size_t i=0; i < m_atomhandler.size(); ++i) { m_atomhandler[i]->updateFocusedWindow(*screen, (m_focused_window ? m_focused_window->window() :

@@ -1958,7 +1957,7 @@ }

if (old_screen && old_screen != screen) { old_screen->updateNetizenWindowFocus(); - for (int i=0; i < m_atomhandler.size(); ++i) + for (size_t i=0; i < m_atomhandler.size(); ++i) m_atomhandler[i]->updateFocusedWindow(*old_screen, 0); }