diff options
Diffstat (limited to 'src/Theme.cc')
-rw-r--r-- | src/Theme.cc | 26 |
1 files changed, 12 insertions, 14 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> |
70 | using namespace std; | 70 | using namespace std; |
71 | 71 | ||
72 | |||
73 | Theme::Theme(Display *display, Window rootwindow, Colormap colormap, | 72 | Theme::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): |
75 | m_imagecontrol(ic), | 74 | m_imagecontrol(ic), |
@@ -78,7 +77,6 @@ m_colormap(colormap), | |||
78 | m_screennum(screennum), | 77 | m_screennum(screennum), |
79 | m_rootcommand(rootcommand==0 ? "" : rootcommand) //we dont want to send 0-pointer to std::string | 78 | m_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 | ||
966 | void Theme::reconfigure() { | 965 | void 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()) |