fixed enums

This commit is contained in:
fluxgen 2002-01-11 10:43:55 +00:00
parent 17f438db1e
commit 06245dca91
3 changed files with 26 additions and 28 deletions

View file

@ -41,7 +41,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Theme.cc,v 1.13 2002/01/09 14:11:20 fluxgen Exp $
// $Id: Theme.cc,v 1.14 2002/01/11 10:43:55 fluxgen Exp $
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@ -69,7 +69,6 @@
#include <iostream>
using namespace std;
Theme::Theme(Display *display, Window rootwindow, Colormap colormap,
int screennum, BImageControl *ic, const char *filename, const char *rootcommand):
m_imagecontrol(ic),
@ -78,7 +77,6 @@ m_colormap(colormap),
m_screennum(screennum),
m_rootcommand(rootcommand==0 ? "" : rootcommand) //we dont want to send 0-pointer to std::string
{
//default settings
m_menustyle.titlefont.set = m_menustyle.framefont.set = m_toolbarstyle.font.set =
m_windowstyle.font.set = m_windowstyle.tab.font.set = 0;
@ -362,27 +360,27 @@ void Theme::loadMenuStyle() {
&value_type, &value)) {
if (! strncasecmp(value.addr, "empty", value.size))
m_menustyle.bullet = Basemenu::Empty;
m_menustyle.bullet = Basemenu::EMPTY;
else if (! strncasecmp(value.addr, "square", value.size))
m_menustyle.bullet = Basemenu::Square;
m_menustyle.bullet = Basemenu::SQUARE;
else if (! strncasecmp(value.addr, "diamond", value.size))
m_menustyle.bullet = Basemenu::Diamond;
m_menustyle.bullet = Basemenu::DIAMOND;
else
m_menustyle.bullet = Basemenu::Triangle;
m_menustyle.bullet = Basemenu::TRIANGLE;
} else
m_menustyle.bullet = Basemenu::Triangle;
m_menustyle.bullet = Basemenu::TRIANGLE;
if (XrmGetResource(m_database, "menu.bullet.position",
"Menu.Bullet.Position", &value_type, &value)) {
if (! strncasecmp(value.addr, "right", value.size))
m_menustyle.bullet_pos = Basemenu::Right;
m_menustyle.bullet_pos = Basemenu::RIGHT;
else
m_menustyle.bullet_pos = Basemenu::Left;
m_menustyle.bullet_pos = Basemenu::LEFT;
} else
m_menustyle.bullet_pos = Basemenu::Left;
m_menustyle.bullet_pos = Basemenu::LEFT;
//---------- font
@ -669,6 +667,7 @@ void Theme::loadRootCommand() {
cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl;
bexec(m_rootcommand.c_str(), const_cast<char *>(displaystring.c_str()));
#else // __EMX__
spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL);
#endif // !__EMX__
@ -965,7 +964,6 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
void Theme::reconfigure() {
//Window rootwindow = DefaultRootWindow(m_display);
XGCValues gcv;
unsigned long gc_value_mask = GCForeground;
if (! I18n::instance()->multibyte())

View file

@ -22,7 +22,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Window.hh,v 1.3 2002/01/09 14:11:20 fluxgen Exp $
// $Id: Window.hh,v 1.4 2002/01/11 10:40:59 fluxgen Exp $
#ifndef _WINDOW_HH_
#define _WINDOW_HH_
@ -257,7 +257,7 @@ private:
bevel_w, resize_w, resize_h, snap_w, snap_h;
} frame;
enum { F_NoInput = 0, F_Passive, F_LocallyActive, F_GloballyActive };
enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE };
void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc);
Window findTitleButton(int type);

View file

@ -355,27 +355,27 @@ void Workspace::placeWindow(FluxboxWindow *win) {
(screen->getBorderWidth2x() * 2),
place_x = 0, place_y = 0, change_x = 1, change_y = 1;
if (screen->getColPlacementDirection() == BScreen::BottomTop)
if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
change_y = -1;
if (screen->getRowPlacementDirection() == BScreen::RightLeft)
if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
change_x = -1;
register int test_x, test_y, curr_w, curr_h;
switch (screen->getPlacementPolicy()) {
case BScreen::RowSmartPlacement: {
case BScreen::ROWSMARTPLACEMENT: {
test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
if (screen->getColPlacementDirection() == BScreen::BottomTop)
if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
test_y = screen->getHeight() - win_h - test_y;
while (((screen->getColPlacementDirection() == BScreen::BottomTop) ?
while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ?
test_y > 0 : test_y + win_h < (signed) screen->getHeight()) &&
! placed) {
test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
if (screen->getRowPlacementDirection() == BScreen::RightLeft)
if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
test_x = screen->getWidth() - win_w - test_x;
while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ?
while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
test_x > 0 : test_x + win_w < (signed) screen->getWidth()) &&
! placed) {
placed = True;
@ -425,19 +425,19 @@ void Workspace::placeWindow(FluxboxWindow *win) {
break; }
case BScreen::ColSmartPlacement: {
case BScreen::COLSMARTPLACEMENT: {
test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
if (screen->getRowPlacementDirection() == BScreen::RightLeft)
if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
test_x = screen->getWidth() - win_w - test_x;
while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ?
while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
test_x > 0 : test_x + win_w < (signed) screen->getWidth()) &&
! placed) {
test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
if (screen->getColPlacementDirection() == BScreen::BottomTop)
if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
test_y = screen->getHeight() - win_h - test_y;
while (((screen->getColPlacementDirection() == BScreen::BottomTop) ?
while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ?
test_y > 0 : test_y + win_h < (signed) screen->getHeight()) &&
! placed) {
placed = True;