all repos — fluxbox @ 5e5118b4e3b283220533aa4845e879150ae705ee

custom fork of the fluxbox windowmanager

using empty instead of size
fluxgen fluxgen
commit

5e5118b4e3b283220533aa4845e879150ae705ee

parent

9c0272004e2509a2206d94dfbe30bb035c8c6d67

M src/FbCommandFactory.ccsrc/FbCommandFactory.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: FbCommandFactory.cc,v 1.25 2004/01/16 11:41:38 fluxgen Exp $ +// $Id: FbCommandFactory.cc,v 1.26 2004/01/21 14:11:42 fluxgen Exp $ #include "FbCommandFactory.hh"

@@ -252,9 +252,9 @@ return new CurrentWindowCmd(&FluxboxWindow::popupMenu);

// // Workspace commands // - else if (command == "nextworkspace" && arguments.size() == 0) + else if (command == "nextworkspace" && arguments.empty()) return new NextWorkspaceCmd(); - else if (command == "prevworkspace" && arguments.size() == 0) + else if (command == "prevworkspace" && arguments.empty()) return new PrevWorkspaceCmd(); else if (command == "rightworkspace") return new RightWorkspaceCmd(atoi(arguments.c_str()));
M src/FbCommands.ccsrc/FbCommands.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: FbCommands.cc,v 1.22 2003/12/20 17:41:32 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.23 2004/01/21 14:11:15 fluxgen Exp $ #include "FbCommands.hh" #include "fluxbox.hh"

@@ -86,11 +86,10 @@ RestartFluxboxCmd::RestartFluxboxCmd(const std::string &cmd):m_cmd(cmd){

} void RestartFluxboxCmd::execute() { - if (m_cmd.size() == 0) { + if (m_cmd.empty()) Fluxbox::instance()->restart(); - } else { + else Fluxbox::instance()->restart(m_cmd.c_str()); - } } void ReconfigureFluxboxCmd::execute() {
M src/FbWinFrame.ccsrc/FbWinFrame.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: FbWinFrame.cc,v 1.70 2004/01/10 20:22:05 rathnor Exp $ +// $Id: FbWinFrame.cc,v 1.71 2004/01/21 14:12:31 fluxgen Exp $ #include "FbWinFrame.hh"

@@ -619,7 +619,7 @@ resize(event.width, event.height);

} void FbWinFrame::reconfigure() { - if (m_labelbuttons.size() == 0) + if (m_labelbuttons.empty()) return; m_bevel = theme().bevelWidth();

@@ -717,15 +717,14 @@ /**

aligns and redraws title */ void FbWinFrame::redrawTitle() { - if (m_labelbuttons.size() == 0) + if (m_labelbuttons.empty()) return; int button_width = label().width()/m_labelbuttons.size(); int rounding_error = label().width() - m_labelbuttons.size()*button_width; //!! TODO: bevel //int border_width = m_labelbuttons.front()->window().borderWidth(); - int border_width = m_labelbuttons.size() != 0 ? - m_labelbuttons.front()->borderWidth() : 0; + int border_width = m_labelbuttons.empty() ? 0 : m_labelbuttons.front()->borderWidth(); LabelList::iterator btn_it = m_labelbuttons.begin(); LabelList::iterator btn_it_end = m_labelbuttons.end();

@@ -799,7 +798,7 @@ next_x += m_bevel;

// space left on titlebar between left and right buttons unsigned int space_left = m_titlebar.width() - next_x; - if (m_buttons_right.size() != 0) + if (!m_buttons_right.empty()) space_left -= m_buttons_right.size() * (button_size + m_bevel); space_left -= m_bevel;
M src/I18n.ccsrc/I18n.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: I18n.cc,v 1.5 2004/01/06 13:42:47 grubert Exp $ +// $Id: I18n.cc,v 1.6 2004/01/21 14:12:51 fluxgen Exp $ //usr GNU extensions #ifndef _GNU_SOURCE

@@ -56,7 +56,7 @@ #ifdef HAVE_SETLOCALE

//make sure we don't get 0 to m_locale string char *temp = setlocale(LC_ALL, ""); m_locale = ( temp ? temp : ""); - if (m_locale.size() == 0) { + if (m_locale.empty()) { cerr<<"Warning: Failed to set locale, reverting to \"C\""<<endl; #endif // HAVE_SETLOCALE
M src/IconButton.ccsrc/IconButton.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: IconButton.cc,v 1.16 2004/01/16 09:32:44 fluxgen Exp $ +// $Id: IconButton.cc,v 1.17 2004/01/21 14:13:32 fluxgen Exp $ #include "IconButton.hh"

@@ -161,7 +161,7 @@ // icon pixmap was updated,

// so we refresh everything // we need to check our client first - if (m_win.clientList().size() == 0) + if (m_win.clientList().empty()) return; XWMHints *hints = XGetWMHints(FbTk::App::instance()->display(), m_win.winClient().window());
M src/IconbarTool.ccsrc/IconbarTool.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: IconbarTool.cc,v 1.31 2004/01/19 18:28:08 fluxgen Exp $ +// $Id: IconbarTool.cc,v 1.32 2004/01/21 14:13:57 fluxgen Exp $ #include "IconbarTool.hh"

@@ -682,7 +682,7 @@ }

void IconbarTool::addWindow(FluxboxWindow &win) { // we just want windows that has clients - if (win.clientList().size() == 0) + if (win.clientList().empty()) return; IconButton *button = new IconButton(m_icon_container, m_theme.focusedText().font(), win);
M src/Screen.ccsrc/Screen.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: Screen.cc,v 1.263 2004/01/19 22:07:24 fluxgen Exp $ +// $Id: Screen.cc,v 1.264 2004/01/21 14:14:18 fluxgen Exp $ #include "Screen.hh"

@@ -1980,7 +1980,7 @@ } else { // start of else 'x'

// perform shell style ~ home directory expansion string newfile(FbTk::StringUtil::expandFilename(str_label)); - if (newfile.size() != 0) { + if (!newfile.empty()) { if (!FbTk::Directory::isRegularFile(newfile)) { fprintf(stderr, i18n->
M src/Workspace.ccsrc/Workspace.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: Workspace.cc,v 1.89 2003/12/30 18:16:51 fluxgen Exp $ +// $Id: Workspace.cc,v 1.90 2004/01/21 14:14:40 fluxgen Exp $ #include "Workspace.hh"

@@ -365,7 +365,7 @@ }

void Workspace::setName(const std::string &name) { - if (name.size() != 0) { + if (!name.empty()) { m_name = name; } else { //if name == 0 then set default name from nls char tname[128];