From 44f7069e1c80a61fb3ace2f6e155ec0e67c21a47 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 19 Jul 2004 13:53:46 +0000 Subject: some EMX fixes, thanks dave_yeo at paralynx --- src/FbCommands.cc | 21 +++++++++++++++------ src/FbTk/I18n.hh | 6 +++--- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/FbCommands.cc b/src/FbCommands.cc index e7d1986..a2a1aa8 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbCommands.cc,v 1.24 2004/04/22 21:12:32 fluxgen Exp $ +// $Id: FbCommands.cc,v 1.25 2004/07/19 13:52:15 fluxgen Exp $ #include "FbCommands.hh" #include "fluxbox.hh" @@ -37,6 +37,15 @@ #include #include + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif // HAVE_CONFIG_H + +#if defined(__EMX__) && defined(HAVE_PROCESS_H) +#include // for P_NOWAIT +#endif // __EMX__ + using namespace std; namespace FbCommands { @@ -46,7 +55,7 @@ ExecuteCmd::ExecuteCmd(const std::string &cmd, int screen_num):m_cmd(cmd), m_scr } void ExecuteCmd::execute() { -#ifndef __EMX__ +#ifndef __EMX__ if (! fork()) { std::string displaystring("DISPLAY="); displaystring += DisplayString(FbTk::App::instance()->display()); @@ -70,7 +79,7 @@ void ExecuteCmd::execute() { exit(0); } #else // __EMX__ - spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec().c_str(), 0); + spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), 0); #endif // !__EMX__ } @@ -125,9 +134,9 @@ void ShowRootMenuCmd::execute() { int wx, wy; unsigned int mask; - if ( XQueryPointer(FbTk::App::instance()->display(), - screen->rootWindow().window(), &root_ret, &window_ret, - &rx, &ry, &wx, &wy, &mask) ) { + if (XQueryPointer(FbTk::App::instance()->display(), + screen->rootWindow().window(), &root_ret, &window_ret, + &rx, &ry, &wx, &wy, &mask) ) { if ( rx - (screen->getRootmenu().width()/2) > 0 ) rx-= screen->getRootmenu().width()/2; diff --git a/src/FbTk/I18n.hh b/src/FbTk/I18n.hh index 08f973d..186809b 100644 --- a/src/FbTk/I18n.hh +++ b/src/FbTk/I18n.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: I18n.hh,v 1.1 2004/06/07 11:46:05 rathnor Exp $ +// $Id: I18n.hh,v 1.2 2004/07/19 13:53:46 fluxgen Exp $ #ifndef I18N_HH #define I18N_HH @@ -44,7 +44,7 @@ extern "C" { #include } -#elif defined(__CYGWIN__) +#elif defined(__CYGWIN__) || defined(__EMX__) #ifdef __cplusplus extern "C" { #endif // __cplusplus @@ -68,7 +68,7 @@ void catclose(nl_catd cat); // ignore the description, it's for helping translators #define _FBTEXT(msgset, msgid, default_text, description) \ i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text) - + // This ensure that FbTk nls stuff is in a kind of namespace of its own #define _FBTKTEXT( msgset, msgid, default_text, description) \ i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text) -- cgit v0.11.2