aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc58
1 files changed, 34 insertions, 24 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 8712fa3..00615e6 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -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: Screen.cc,v 1.139 2003/04/27 14:36:03 rathnor Exp $ 25// $Id: Screen.cc,v 1.140 2003/04/28 00:36:50 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -41,6 +41,7 @@
41#include "FbWinFrameTheme.hh" 41#include "FbWinFrameTheme.hh"
42#include "MenuTheme.hh" 42#include "MenuTheme.hh"
43#include "RootTheme.hh" 43#include "RootTheme.hh"
44//#include "WinButtonTheme.hh"
44#include "FbCommands.hh" 45#include "FbCommands.hh"
45#include "BoolMenuItem.hh" 46#include "BoolMenuItem.hh"
46#include "IntResMenuItem.hh" 47#include "IntResMenuItem.hh"
@@ -493,21 +494,24 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm,
493 494
494BScreen::BScreen(ResourceManager &rm, 495BScreen::BScreen(ResourceManager &rm,
495 const string &screenname, const string &altscreenname, 496 const string &screenname, const string &altscreenname,
496 int scrn, int num_layers) : ScreenInfo(scrn), 497 int scrn, int num_layers) :
497 m_clientlist_sig(*this), // client signal 498 ScreenInfo(scrn),
498 m_workspacecount_sig(*this), // workspace count signal 499 m_clientlist_sig(*this), // client signal
499 m_workspacenames_sig(*this), // workspace names signal 500 m_workspacecount_sig(*this), // workspace count signal
500 m_currentworkspace_sig(*this), // current workspace signal 501 m_workspacenames_sig(*this), // workspace names signal
501 m_layermanager(num_layers), 502 m_currentworkspace_sig(*this), // current workspace signal
502 cycling_focus(false), 503 m_layermanager(num_layers),
503 cycling_last(0), 504 cycling_focus(false),
504 m_windowtheme(new FbWinFrameTheme(scrn)), 505 cycling_last(0),
505 m_menutheme(new FbTk::MenuTheme(scrn)), 506 m_windowtheme(new FbWinFrameTheme(scrn)),
506 resource(rm, screenname, altscreenname), 507 m_menutheme(new FbTk::MenuTheme(scrn)),
507 m_root_theme(new 508 resource(rm, screenname, altscreenname),
508 RootTheme(scrn, 509 m_root_theme(new
509 *resource.rootcommand)), 510 RootTheme(scrn,
510 m_toolbarhandler(0) { 511 *resource.rootcommand)),
512 // m_winbutton_theme(new WinButtonTheme(scrn)),
513 m_toolbarhandler(0) {
514
511 515
512 Display *disp = FbTk::App::instance()->display(); 516 Display *disp = FbTk::App::instance()->display();
513 517
@@ -1328,13 +1332,15 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
1328 //create new buttons 1332 //create new buttons
1329 FbTk::Button *newbutton = 0; 1333 FbTk::Button *newbutton = 0;
1330 if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) { 1334 if (win.isIconifiable() && (*dir)[i] == Fluxbox::MINIMIZE) {
1331 newbutton = new WinButton(win, WinButton::MINIMIZE, 1335 newbutton = new WinButton(win, //*m_winbutton_theme.get(),
1336 WinButton::MINIMIZE,
1332 frame.titlebar(), 1337 frame.titlebar(),
1333 0, 0, 10, 10); 1338 0, 0, 10, 10);
1334 newbutton->setOnClick(iconify_cmd); 1339 newbutton->setOnClick(iconify_cmd);
1335 1340
1336 } else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) { 1341 } else if (win.isMaximizable() && (*dir)[i] == Fluxbox::MAXIMIZE) {
1337 newbutton = new WinButton(win, WinButton::MAXIMIZE, 1342 newbutton = new WinButton(win, //*m_winbutton_theme.get(),
1343 WinButton::MAXIMIZE,
1338 frame.titlebar(), 1344 frame.titlebar(),
1339 0, 0, 10, 10); 1345 0, 0, 10, 10);
1340 1346
@@ -1343,7 +1349,8 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
1343 newbutton->setOnClick(maximize_vert_cmd, 2); 1349 newbutton->setOnClick(maximize_vert_cmd, 2);
1344 1350
1345 } else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) { 1351 } else if (win.isClosable() && (*dir)[i] == Fluxbox::CLOSE) {
1346 newbutton = new WinButton(win, WinButton::CLOSE, 1352 newbutton = new WinButton(win, //*m_winbutton_theme.get(),
1353 WinButton::CLOSE,
1347 frame.titlebar(), 1354 frame.titlebar(),
1348 0, 0, 10, 10); 1355 0, 0, 10, 10);
1349 1356
@@ -1352,14 +1359,16 @@ void BScreen::setupWindowActions(FluxboxWindow &win) {
1352 cerr<<__FILE__<<": Creating close button"<<endl; 1359 cerr<<__FILE__<<": Creating close button"<<endl;
1353#endif // DEBUG 1360#endif // DEBUG
1354 } else if ((*dir)[i] == Fluxbox::STICK) { 1361 } else if ((*dir)[i] == Fluxbox::STICK) {
1355 WinButton *winbtn = new WinButton(win, WinButton::STICK, 1362 WinButton *winbtn = new WinButton(win, // *m_winbutton_theme.get(),
1363 WinButton::STICK,
1356 frame.titlebar(), 1364 frame.titlebar(),
1357 0, 0, 10, 10); 1365 0, 0, 10, 10);
1358 win.stateSig().attach(winbtn); 1366 win.stateSig().attach(winbtn);
1359 winbtn->setOnClick(stick_cmd); 1367 winbtn->setOnClick(stick_cmd);
1360 newbutton = winbtn; 1368 newbutton = winbtn;
1361 } else if ((*dir)[i] == Fluxbox::SHADE) { 1369 } else if ((*dir)[i] == Fluxbox::SHADE) {
1362 WinButton *winbtn = new WinButton(win, WinButton::SHADE, 1370 WinButton *winbtn = new WinButton(win, // *m_winbutton_theme.get(),
1371 WinButton::SHADE,
1363 frame.titlebar(), 1372 frame.titlebar(),
1364 0, 0, 10, 10); 1373 0, 0, 10, 10);
1365 winbtn->setOnClick(shade_cmd); 1374 winbtn->setOnClick(shade_cmd);
@@ -1431,7 +1440,8 @@ string BScreen::getNameOfWorkspace(unsigned int workspace) const {
1431 } 1440 }
1432} 1441}
1433 1442
1434void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id, bool ignore_sticky) { 1443void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1444 bool ignore_sticky) {
1435 if (w == 0) 1445 if (w == 0)
1436 return; 1446 return;
1437 1447
@@ -1816,7 +1826,7 @@ void BScreen::initMenu() {
1816 if (defaultMenu) { 1826 if (defaultMenu) {
1817 FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); 1827 FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd());
1818 FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd()); 1828 FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd());
1819 FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm")); 1829 FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm", getScreenNumber()));
1820 m_rootmenu->setInternalMenu(); 1830 m_rootmenu->setInternalMenu();
1821 m_rootmenu->insert(i18n->getMessage( 1831 m_rootmenu->insert(i18n->getMessage(
1822 FBNLS::ScreenSet, FBNLS::Screenxterm, 1832 FBNLS::ScreenSet, FBNLS::Screenxterm,
@@ -1888,7 +1898,7 @@ bool BScreen::parseMenuFile(ifstream &file, FbTk::Menu &menu, int &row) {
1888 "no menu label and/or command defined\n")); 1898 "no menu label and/or command defined\n"));
1889 cerr<<"Row: "<<row<<endl; 1899 cerr<<"Row: "<<row<<endl;
1890 } else { 1900 } else {
1891 FbTk::RefCount<FbTk::Command> exec_cmd(new FbCommands::ExecuteCmd(str_cmd)); 1901 FbTk::RefCount<FbTk::Command> exec_cmd(new FbCommands::ExecuteCmd(str_cmd, getScreenNumber()));
1892 FbTk::MacroCommand *exec_and_hide = new FbTk::MacroCommand(); 1902 FbTk::MacroCommand *exec_and_hide = new FbTk::MacroCommand();
1893 exec_and_hide->add(hide_menu); 1903 exec_and_hide->add(hide_menu);
1894 exec_and_hide->add(exec_cmd); 1904 exec_and_hide->add(exec_cmd);