aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-01-11 10:43:55 (GMT)
committerfluxgen <fluxgen>2002-01-11 10:43:55 (GMT)
commit06245dca91b460d6e6df80191477ac20f4f1dd21 (patch)
treeae85b74ea37cbf26e3f2c9c2edc275873b4e10d4
parent17f438db1ee854bbc85e8d1e7f91ee28b501b7ab (diff)
downloadfluxbox-06245dca91b460d6e6df80191477ac20f4f1dd21.zip
fluxbox-06245dca91b460d6e6df80191477ac20f4f1dd21.tar.bz2
fixed enums
-rw-r--r--src/Theme.cc26
-rw-r--r--src/Window.hh4
-rw-r--r--src/Workspace.cc24
3 files changed, 26 insertions, 28 deletions
diff --git a/src/Theme.cc b/src/Theme.cc
index ed43120..5377ecb 100644
--- a/src/Theme.cc
+++ b/src/Theme.cc
@@ -41,7 +41,7 @@
41// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 41// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
42// DEALINGS IN THE SOFTWARE. 42// DEALINGS IN THE SOFTWARE.
43 43
44// $Id: Theme.cc,v 1.13 2002/01/09 14:11:20 fluxgen Exp $ 44// $Id: Theme.cc,v 1.14 2002/01/11 10:43:55 fluxgen Exp $
45 45
46#ifndef _GNU_SOURCE 46#ifndef _GNU_SOURCE
47#define _GNU_SOURCE 47#define _GNU_SOURCE
@@ -69,7 +69,6 @@
69#include <iostream> 69#include <iostream>
70using namespace std; 70using namespace std;
71 71
72
73Theme::Theme(Display *display, Window rootwindow, Colormap colormap, 72Theme::Theme(Display *display, Window rootwindow, Colormap colormap,
74 int screennum, BImageControl *ic, const char *filename, const char *rootcommand): 73 int screennum, BImageControl *ic, const char *filename, const char *rootcommand):
75m_imagecontrol(ic), 74m_imagecontrol(ic),
@@ -78,7 +77,6 @@ m_colormap(colormap),
78m_screennum(screennum), 77m_screennum(screennum),
79m_rootcommand(rootcommand==0 ? "" : rootcommand) //we dont want to send 0-pointer to std::string 78m_rootcommand(rootcommand==0 ? "" : rootcommand) //we dont want to send 0-pointer to std::string
80{ 79{
81
82 //default settings 80 //default settings
83 m_menustyle.titlefont.set = m_menustyle.framefont.set = m_toolbarstyle.font.set = 81 m_menustyle.titlefont.set = m_menustyle.framefont.set = m_toolbarstyle.font.set =
84 m_windowstyle.font.set = m_windowstyle.tab.font.set = 0; 82 m_windowstyle.font.set = m_windowstyle.tab.font.set = 0;
@@ -362,27 +360,27 @@ void Theme::loadMenuStyle() {
362 &value_type, &value)) { 360 &value_type, &value)) {
363 361
364 if (! strncasecmp(value.addr, "empty", value.size)) 362 if (! strncasecmp(value.addr, "empty", value.size))
365 m_menustyle.bullet = Basemenu::Empty; 363 m_menustyle.bullet = Basemenu::EMPTY;
366 else if (! strncasecmp(value.addr, "square", value.size)) 364 else if (! strncasecmp(value.addr, "square", value.size))
367 m_menustyle.bullet = Basemenu::Square; 365 m_menustyle.bullet = Basemenu::SQUARE;
368 else if (! strncasecmp(value.addr, "diamond", value.size)) 366 else if (! strncasecmp(value.addr, "diamond", value.size))
369 m_menustyle.bullet = Basemenu::Diamond; 367 m_menustyle.bullet = Basemenu::DIAMOND;
370 else 368 else
371 m_menustyle.bullet = Basemenu::Triangle; 369 m_menustyle.bullet = Basemenu::TRIANGLE;
372 370
373 } else 371 } else
374 m_menustyle.bullet = Basemenu::Triangle; 372 m_menustyle.bullet = Basemenu::TRIANGLE;
375 373
376 if (XrmGetResource(m_database, "menu.bullet.position", 374 if (XrmGetResource(m_database, "menu.bullet.position",
377 "Menu.Bullet.Position", &value_type, &value)) { 375 "Menu.Bullet.Position", &value_type, &value)) {
378 376
379 if (! strncasecmp(value.addr, "right", value.size)) 377 if (! strncasecmp(value.addr, "right", value.size))
380 m_menustyle.bullet_pos = Basemenu::Right; 378 m_menustyle.bullet_pos = Basemenu::RIGHT;
381 else 379 else
382 m_menustyle.bullet_pos = Basemenu::Left; 380 m_menustyle.bullet_pos = Basemenu::LEFT;
383 381
384 } else 382 } else
385 m_menustyle.bullet_pos = Basemenu::Left; 383 m_menustyle.bullet_pos = Basemenu::LEFT;
386 384
387 //---------- font 385 //---------- font
388 386
@@ -669,6 +667,7 @@ void Theme::loadRootCommand() {
669 cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl; 667 cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl;
670 668
671 bexec(m_rootcommand.c_str(), const_cast<char *>(displaystring.c_str())); 669 bexec(m_rootcommand.c_str(), const_cast<char *>(displaystring.c_str()));
670
672 #else // __EMX__ 671 #else // __EMX__
673 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL); 672 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", m_rootcommand.c_str(), NULL);
674 #endif // !__EMX__ 673 #endif // !__EMX__
@@ -687,12 +686,12 @@ void Theme::loadRootCommand() {
687 displaystring.append(DisplayString(m_display)); 686 displaystring.append(DisplayString(m_display));
688 displaystring.append(tmpstring); // append m_screennum 687 displaystring.append(tmpstring); // append m_screennum
689 cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl; 688 cerr<<__FILE__<<"("<<__LINE__<<"): displaystring="<<displaystring.c_str()<<endl;
690 689
691 bexec(value.addr, const_cast<char *>(displaystring.c_str())); 690 bexec(value.addr, const_cast<char *>(displaystring.c_str()));
692 #else // __EMX__ 691 #else // __EMX__
693 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", value.addr, NULL); 692 spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", value.addr, NULL);
694 #endif // !__EMX__ 693 #endif // !__EMX__
695 694
696 #ifdef DEBUG 695 #ifdef DEBUG
697 fprintf(stderr, "rootcommand:%s\n", value.addr); 696 fprintf(stderr, "rootcommand:%s\n", value.addr);
698 #endif 697 #endif
@@ -965,7 +964,6 @@ void Theme::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
965 964
966void Theme::reconfigure() { 965void Theme::reconfigure() {
967 966
968 //Window rootwindow = DefaultRootWindow(m_display);
969 XGCValues gcv; 967 XGCValues gcv;
970 unsigned long gc_value_mask = GCForeground; 968 unsigned long gc_value_mask = GCForeground;
971 if (! I18n::instance()->multibyte()) 969 if (! I18n::instance()->multibyte())
diff --git a/src/Window.hh b/src/Window.hh
index c07786b..2c705d8 100644
--- a/src/Window.hh
+++ b/src/Window.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: Window.hh,v 1.3 2002/01/09 14:11:20 fluxgen Exp $ 25// $Id: Window.hh,v 1.4 2002/01/11 10:40:59 fluxgen Exp $
26 26
27#ifndef _WINDOW_HH_ 27#ifndef _WINDOW_HH_
28#define _WINDOW_HH_ 28#define _WINDOW_HH_
@@ -257,7 +257,7 @@ private:
257 bevel_w, resize_w, resize_h, snap_w, snap_h; 257 bevel_w, resize_w, resize_h, snap_w, snap_h;
258 } frame; 258 } frame;
259 259
260 enum { F_NoInput = 0, F_Passive, F_LocallyActive, F_GloballyActive }; 260 enum { F_NOINPUT = 0, F_PASSIVE, F_LOCALLYACTIVE, F_GLOBALLYACTIVE };
261 261
262 void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc); 262 void createButton(int type, ButtonEventProc, ButtonEventProc, ButtonDrawProc);
263 Window findTitleButton(int type); 263 Window findTitleButton(int type);
diff --git a/src/Workspace.cc b/src/Workspace.cc
index ec61e39..676c907 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -355,27 +355,27 @@ void Workspace::placeWindow(FluxboxWindow *win) {
355 (screen->getBorderWidth2x() * 2), 355 (screen->getBorderWidth2x() * 2),
356 place_x = 0, place_y = 0, change_x = 1, change_y = 1; 356 place_x = 0, place_y = 0, change_x = 1, change_y = 1;
357 357
358 if (screen->getColPlacementDirection() == BScreen::BottomTop) 358 if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
359 change_y = -1; 359 change_y = -1;
360 if (screen->getRowPlacementDirection() == BScreen::RightLeft) 360 if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
361 change_x = -1; 361 change_x = -1;
362 362
363 register int test_x, test_y, curr_w, curr_h; 363 register int test_x, test_y, curr_w, curr_h;
364 364
365 switch (screen->getPlacementPolicy()) { 365 switch (screen->getPlacementPolicy()) {
366 case BScreen::RowSmartPlacement: { 366 case BScreen::ROWSMARTPLACEMENT: {
367 test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); 367 test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
368 if (screen->getColPlacementDirection() == BScreen::BottomTop) 368 if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
369 test_y = screen->getHeight() - win_h - test_y; 369 test_y = screen->getHeight() - win_h - test_y;
370 370
371 while (((screen->getColPlacementDirection() == BScreen::BottomTop) ? 371 while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ?
372 test_y > 0 : test_y + win_h < (signed) screen->getHeight()) && 372 test_y > 0 : test_y + win_h < (signed) screen->getHeight()) &&
373 ! placed) { 373 ! placed) {
374 test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); 374 test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
375 if (screen->getRowPlacementDirection() == BScreen::RightLeft) 375 if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
376 test_x = screen->getWidth() - win_w - test_x; 376 test_x = screen->getWidth() - win_w - test_x;
377 377
378 while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ? 378 while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
379 test_x > 0 : test_x + win_w < (signed) screen->getWidth()) && 379 test_x > 0 : test_x + win_w < (signed) screen->getWidth()) &&
380 ! placed) { 380 ! placed) {
381 placed = True; 381 placed = True;
@@ -425,19 +425,19 @@ void Workspace::placeWindow(FluxboxWindow *win) {
425 425
426 break; } 426 break; }
427 427
428 case BScreen::ColSmartPlacement: { 428 case BScreen::COLSMARTPLACEMENT: {
429 test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); 429 test_x = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
430 if (screen->getRowPlacementDirection() == BScreen::RightLeft) 430 if (screen->getRowPlacementDirection() == BScreen::RIGHTLEFT)
431 test_x = screen->getWidth() - win_w - test_x; 431 test_x = screen->getWidth() - win_w - test_x;
432 432
433 while (((screen->getRowPlacementDirection() == BScreen::RightLeft) ? 433 while (((screen->getRowPlacementDirection() == BScreen::RIGHTLEFT) ?
434 test_x > 0 : test_x + win_w < (signed) screen->getWidth()) && 434 test_x > 0 : test_x + win_w < (signed) screen->getWidth()) &&
435 ! placed) { 435 ! placed) {
436 test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold(); 436 test_y = screen->getBorderWidth() + screen->getEdgeSnapThreshold();
437 if (screen->getColPlacementDirection() == BScreen::BottomTop) 437 if (screen->getColPlacementDirection() == BScreen::BOTTOMTOP)
438 test_y = screen->getHeight() - win_h - test_y; 438 test_y = screen->getHeight() - win_h - test_y;
439 439
440 while (((screen->getColPlacementDirection() == BScreen::BottomTop) ? 440 while (((screen->getColPlacementDirection() == BScreen::BOTTOMTOP) ?
441 test_y > 0 : test_y + win_h < (signed) screen->getHeight()) && 441 test_y > 0 : test_y + win_h < (signed) screen->getHeight()) &&
442 ! placed) { 442 ! placed) {
443 placed = True; 443 placed = True;