diff options
author | fluxgen <fluxgen> | 2004-07-19 13:53:46 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-07-19 13:53:46 (GMT) |
commit | 44f7069e1c80a61fb3ace2f6e155ec0e67c21a47 (patch) | |
tree | edee130063e03506d821987ad501b63a2d0c2e0c /src | |
parent | 66feb6dd892b7eab588d2d01b18e4309b1796f9d (diff) | |
download | fluxbox_paul-44f7069e1c80a61fb3ace2f6e155ec0e67c21a47.zip fluxbox_paul-44f7069e1c80a61fb3ace2f6e155ec0e67c21a47.tar.bz2 |
some EMX fixes, thanks dave_yeo at paralynx
Diffstat (limited to 'src')
-rw-r--r-- | src/FbCommands.cc | 21 | ||||
-rw-r--r-- | 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 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: FbCommands.cc,v 1.24 2004/04/22 21:12:32 fluxgen Exp $ | 22 | // $Id: FbCommands.cc,v 1.25 2004/07/19 13:52:15 fluxgen Exp $ |
23 | 23 | ||
24 | #include "FbCommands.hh" | 24 | #include "FbCommands.hh" |
25 | #include "fluxbox.hh" | 25 | #include "fluxbox.hh" |
@@ -37,6 +37,15 @@ | |||
37 | 37 | ||
38 | #include <fstream> | 38 | #include <fstream> |
39 | #include <iostream> | 39 | #include <iostream> |
40 | |||
41 | #ifdef HAVE_CONFIG_H | ||
42 | #include "config.h" | ||
43 | #endif // HAVE_CONFIG_H | ||
44 | |||
45 | #if defined(__EMX__) && defined(HAVE_PROCESS_H) | ||
46 | #include <process.h> // for P_NOWAIT | ||
47 | #endif // __EMX__ | ||
48 | |||
40 | using namespace std; | 49 | using namespace std; |
41 | 50 | ||
42 | namespace FbCommands { | 51 | namespace FbCommands { |
@@ -46,7 +55,7 @@ ExecuteCmd::ExecuteCmd(const std::string &cmd, int screen_num):m_cmd(cmd), m_scr | |||
46 | } | 55 | } |
47 | 56 | ||
48 | void ExecuteCmd::execute() { | 57 | void ExecuteCmd::execute() { |
49 | #ifndef __EMX__ | 58 | #ifndef __EMX__ |
50 | if (! fork()) { | 59 | if (! fork()) { |
51 | std::string displaystring("DISPLAY="); | 60 | std::string displaystring("DISPLAY="); |
52 | displaystring += DisplayString(FbTk::App::instance()->display()); | 61 | displaystring += DisplayString(FbTk::App::instance()->display()); |
@@ -70,7 +79,7 @@ void ExecuteCmd::execute() { | |||
70 | exit(0); | 79 | exit(0); |
71 | } | 80 | } |
72 | #else // __EMX__ | 81 | #else // __EMX__ |
73 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec().c_str(), 0); | 82 | spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_cmd.c_str(), 0); |
74 | #endif // !__EMX__ | 83 | #endif // !__EMX__ |
75 | 84 | ||
76 | } | 85 | } |
@@ -125,9 +134,9 @@ void ShowRootMenuCmd::execute() { | |||
125 | int wx, wy; | 134 | int wx, wy; |
126 | unsigned int mask; | 135 | unsigned int mask; |
127 | 136 | ||
128 | if ( XQueryPointer(FbTk::App::instance()->display(), | 137 | if (XQueryPointer(FbTk::App::instance()->display(), |
129 | screen->rootWindow().window(), &root_ret, &window_ret, | 138 | screen->rootWindow().window(), &root_ret, &window_ret, |
130 | &rx, &ry, &wx, &wy, &mask) ) { | 139 | &rx, &ry, &wx, &wy, &mask) ) { |
131 | 140 | ||
132 | if ( rx - (screen->getRootmenu().width()/2) > 0 ) | 141 | if ( rx - (screen->getRootmenu().width()/2) > 0 ) |
133 | rx-= screen->getRootmenu().width()/2; | 142 | 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 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: I18n.hh,v 1.1 2004/06/07 11:46:05 rathnor Exp $ | 25 | // $Id: I18n.hh,v 1.2 2004/07/19 13:53:46 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef I18N_HH | 27 | #ifndef I18N_HH |
28 | #define I18N_HH | 28 | #define I18N_HH |
@@ -44,7 +44,7 @@ | |||
44 | extern "C" { | 44 | extern "C" { |
45 | #include <nl_types.h> | 45 | #include <nl_types.h> |
46 | } | 46 | } |
47 | #elif defined(__CYGWIN__) | 47 | #elif defined(__CYGWIN__) || defined(__EMX__) |
48 | #ifdef __cplusplus | 48 | #ifdef __cplusplus |
49 | extern "C" { | 49 | extern "C" { |
50 | #endif // __cplusplus | 50 | #endif // __cplusplus |
@@ -68,7 +68,7 @@ void catclose(nl_catd cat); | |||
68 | // ignore the description, it's for helping translators | 68 | // ignore the description, it's for helping translators |
69 | #define _FBTEXT(msgset, msgid, default_text, description) \ | 69 | #define _FBTEXT(msgset, msgid, default_text, description) \ |
70 | i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text) | 70 | i18n.getMessage(FBNLS::msgset ## Set, FBNLS::msgset ## msgid, default_text) |
71 | 71 | ||
72 | // This ensure that FbTk nls stuff is in a kind of namespace of its own | 72 | // This ensure that FbTk nls stuff is in a kind of namespace of its own |
73 | #define _FBTKTEXT( msgset, msgid, default_text, description) \ | 73 | #define _FBTKTEXT( msgset, msgid, default_text, description) \ |
74 | i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text) | 74 | i18n.getMessage(FBNLS::FbTk ## msgset ## Set, FBNLS::FbTk ## msgset ## msgid, default_text) |