From a15d9af3c7f58d671240b23607bb9488a9165eb1 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 25 Apr 2006 06:46:06 +0000 Subject: Cleanup unneeded headers (thanks Slava Semushin) --- ChangeLog | 3 +++ src/FbAtoms.cc | 5 ----- src/FbTk/App.cc | 5 ----- src/FocusControl.cc | 2 +- src/Keys.cc | 5 ----- src/Slit.cc | 5 ----- util/fbrun/FbRun.cc | 62 ++++++++++++++++++++++++++--------------------------- 7 files changed, 34 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13e866e..3306f27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 0.9.16: *06/04/25: + * Cleanup unneeded headers (thanks Slava Semushin) + FbAtoms.cc Slit.cc Keys.cc FocusControl.cc FbTk/App.cc + util/fbrun/FbRun.cc * Fix occasional highlighting of menu nops+separators, sf.net patch #1475268 (thanks Scott Kuhl; skuhl AT cs utah edu) FbTk/MenuSeparator.hh/cc FbTk/Menu.cc MenuCreator.cc diff --git a/src/FbAtoms.cc b/src/FbAtoms.cc index 6a67cdf..5314538 100644 --- a/src/FbAtoms.cc +++ b/src/FbAtoms.cc @@ -25,11 +25,6 @@ #include "App.hh" #include -#ifdef HAVE_CASSERT - #include -#else - #include -#endif using namespace std; diff --git a/src/FbTk/App.cc b/src/FbTk/App.cc index 1ef5aed..11bea9b 100644 --- a/src/FbTk/App.cc +++ b/src/FbTk/App.cc @@ -25,11 +25,6 @@ #include "EventManager.hh" -#ifdef HAVE_CASSERT - #include -#else - #include -#endif #include namespace FbTk { diff --git a/src/FocusControl.cc b/src/FocusControl.cc index f7ed962..e92eced 100644 --- a/src/FocusControl.cc +++ b/src/FocusControl.cc @@ -31,8 +31,8 @@ #include "FbWinFrameTheme.hh" #include -#include #include + using std::cerr; using std::endl; using std::string; diff --git a/src/Keys.cc b/src/Keys.cc index 78ad912..c6276c5 100644 --- a/src/Keys.cc +++ b/src/Keys.cc @@ -87,11 +87,6 @@ #include #include #include -#ifdef HAVE_CASSERT - #include -#else - #include -#endif #include using namespace std; diff --git a/src/Slit.cc b/src/Slit.cc index db2deae..15b171f 100644 --- a/src/Slit.cc +++ b/src/Slit.cc @@ -67,11 +67,6 @@ #include #include -#ifdef HAVE_CASSERT - #include -#else - #include -#endif #ifdef HAVE_SYS_STAT_H #include diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 7392083..c175e67 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc @@ -48,13 +48,9 @@ #include #include #include -#ifdef HAVE_CASSERT - #include -#else - #include -#endif using namespace std; + FbRun::FbRun(int x, int y, size_t width): FbTk::TextBox(DefaultScreen(FbTk::App::instance()->display()), m_font, ""), @@ -67,7 +63,7 @@ FbRun::FbRun(int x, int y, size_t width): m_last_completion_prefix(""), m_current_apps_item(0), m_cursor(XCreateFontCursor(FbTk::App::instance()->display(), XC_xterm)) { - + setGC(m_gc.gc()); setCursor(m_cursor); // setting nomaximize in local resize @@ -78,9 +74,9 @@ FbRun::FbRun(int x, int y, size_t width): if (class_hint == 0) throw string("Out of memory"); class_hint->res_name = "fbrun"; - class_hint->res_class = "FbRun"; + class_hint->res_class = "FbRun"; XSetClassHint(m_display, window(), class_hint); - + XFree(class_hint); #ifdef HAVE_XPM Pixmap mask = 0; @@ -123,7 +119,7 @@ void FbRun::run(const std::string &command) { } hide(); // hide gui - + // save command history to file if (text().size() != 0) { // no need to save empty command @@ -134,7 +130,7 @@ void FbRun::run(const std::string &command) { // m_current_history_item is the duplicate } else { m_current_history_item = 0; - for (; m_current_history_item < m_history.size(); + for (; m_current_history_item < m_history.size(); ++m_current_history_item) { if (m_history[m_current_history_item] == text()) break; @@ -154,7 +150,7 @@ void FbRun::run(const std::string &command) { // write the history items that come after current for (i++; i < m_history.size(); i++) inoutfile<= 0) { while(n--) { filename= dir.readFilename(); - fncomplete= dir.name() + - (*dir.name().rbegin() != '/' ? "/" : "") + + fncomplete= dir.name() + + (*dir.name().rbegin() != '/' ? "/" : "") + filename; // directories in dirmode ? if (add_dirs && FbTk::FileUtil::isDirectory(fncomplete.c_str()) && filename != ".." && filename != ".") { - m_apps.push_back(fncomplete); + m_apps.push_back(fncomplete); // executables in dirmode ? - } else if (add_dirs && FbTk::FileUtil::isRegularFile(fncomplete.c_str()) && - FbTk::FileUtil::isExecutable(fncomplete.c_str()) && - (prefix == "" || + } else if (add_dirs && FbTk::FileUtil::isRegularFile(fncomplete.c_str()) && + FbTk::FileUtil::isExecutable(fncomplete.c_str()) && + (prefix == "" || fncomplete.substr(0, prefix.size()) == prefix)) { m_apps.push_back(fncomplete); // executables in $PATH ? - } else if (FbTk::FileUtil::isRegularFile(fncomplete.c_str()) && - FbTk::FileUtil::isExecutable(fncomplete.c_str()) && - (prefix == "" || + } else if (FbTk::FileUtil::isRegularFile(fncomplete.c_str()) && + FbTk::FileUtil::isExecutable(fncomplete.c_str()) && + (prefix == "" || filename.substr(0, prefix.size()) == prefix)) { m_apps.push_back(filename); - } + } } } l= r + 1; @@ -473,7 +471,7 @@ void FbRun::tabCompleteApps() { } apps_item++; } - if (!changed_prefix && apps_item == m_current_apps_item) + if (!changed_prefix && apps_item == m_current_apps_item) XBell(m_display, 0); } } -- cgit v0.11.2