diff options
author | fluxgen <fluxgen> | 2003-05-15 12:00:46 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-05-15 12:00:46 (GMT) |
commit | 988392b1eb89deaddfddfcb37a15e8f55d58bb70 (patch) | |
tree | 493d69abd418722498d1b53982653eae1d4a37e6 /src/Screen.cc | |
parent | cbce8634dde14fd7000fde92e86f4bd4bf3525c2 (diff) | |
download | fluxbox-988392b1eb89deaddfddfcb37a15e8f55d58bb70.zip fluxbox-988392b1eb89deaddfddfcb37a15e8f55d58bb70.tar.bz2 |
minor cleaning in BScreen interface
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 161 |
1 files changed, 78 insertions, 83 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index e661ff4..49280e8 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.166 2003/05/15 11:17:27 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.167 2003/05/15 12:00:44 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -140,9 +140,9 @@ int anotherWMRunning(Display *display, XErrorEvent *) { | |||
140 | 140 | ||
141 | FbTk::Menu *createMenuFromScreen(BScreen &screen) { | 141 | FbTk::Menu *createMenuFromScreen(BScreen &screen) { |
142 | FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), | 142 | FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), |
143 | screen.getScreenNumber(), | 143 | screen.screenNumber(), |
144 | *screen.getImageControl(), | 144 | *screen.getImageControl(), |
145 | *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); | 145 | *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); |
146 | return menu; | 146 | return menu; |
147 | } | 147 | } |
148 | 148 | ||
@@ -541,7 +541,7 @@ BScreen::BScreen(ResourceManager &rm, | |||
541 | FBNLS::ScreenSet, FBNLS::ScreenManagingScreen, | 541 | FBNLS::ScreenSet, FBNLS::ScreenManagingScreen, |
542 | "BScreen::BScreen: managing screen %d " | 542 | "BScreen::BScreen: managing screen %d " |
543 | "using visual 0x%lx, depth %d\n"), | 543 | "using visual 0x%lx, depth %d\n"), |
544 | getScreenNumber(), XVisualIDFromVisual(rootWindow().visual()), | 544 | screenNumber(), XVisualIDFromVisual(rootWindow().visual()), |
545 | rootWindow().depth()); | 545 | rootWindow().depth()); |
546 | 546 | ||
547 | Fluxbox * const fluxbox = Fluxbox::instance(); | 547 | Fluxbox * const fluxbox = Fluxbox::instance(); |
@@ -653,10 +653,10 @@ BScreen::BScreen(ResourceManager &rm, | |||
653 | 653 | ||
654 | workspacemenu->setItemSelected(2, true); | 654 | workspacemenu->setItemSelected(2, true); |
655 | 655 | ||
656 | if (getToolbar()) { | 656 | if (toolbar()) { |
657 | getToolbar()->setPlacement(*resource.toolbar_placement); | 657 | toolbar()->setPlacement(*resource.toolbar_placement); |
658 | getToolbar()->theme().font().setAntialias(*resource.antialias); | 658 | toolbar()->theme().font().setAntialias(*resource.antialias); |
659 | getToolbar()->reconfigure(); | 659 | toolbar()->reconfigure(); |
660 | } | 660 | } |
661 | 661 | ||
662 | initMenu(); // create and initiate rootmenu | 662 | initMenu(); // create and initiate rootmenu |
@@ -723,8 +723,8 @@ BScreen::BScreen(ResourceManager &rm, | |||
723 | } | 723 | } |
724 | } | 724 | } |
725 | 725 | ||
726 | if (! isSloppyFocus() && getToolbar() != 0) { | 726 | if (! isSloppyFocus() && toolbar() != 0) { |
727 | XSetInputFocus(disp, getToolbar()->window().window(), | 727 | XSetInputFocus(disp, toolbar()->window().window(), |
728 | RevertToParent, CurrentTime); | 728 | RevertToParent, CurrentTime); |
729 | } | 729 | } |
730 | 730 | ||
@@ -777,7 +777,7 @@ FbTk::Menu &BScreen::getToolbarModemenu() { | |||
777 | return m_toolbarhandler->getModeMenu(); | 777 | return m_toolbarhandler->getModeMenu(); |
778 | } | 778 | } |
779 | 779 | ||
780 | unsigned int BScreen::getCurrentWorkspaceID() const { | 780 | unsigned int BScreen::currentWorkspaceID() const { |
781 | return current_workspace->workspaceID(); | 781 | return current_workspace->workspaceID(); |
782 | } | 782 | } |
783 | 783 | ||
@@ -805,22 +805,22 @@ Pixmap BScreen::rootPixmap() const { | |||
805 | } | 805 | } |
806 | 806 | ||
807 | /// TODO | 807 | /// TODO |
808 | unsigned int BScreen::getMaxLeft() const { | 808 | unsigned int BScreen::maxLeft() const { |
809 | return 0; | 809 | return 0; |
810 | } | 810 | } |
811 | 811 | ||
812 | ///!! TODO | 812 | ///!! TODO |
813 | unsigned int BScreen::getMaxRight() const { | 813 | unsigned int BScreen::maxRight() const { |
814 | return getWidth(); | 814 | return width(); |
815 | } | 815 | } |
816 | 816 | ||
817 | ///!! TODO | 817 | ///!! TODO |
818 | unsigned int BScreen::getMaxTop() const { | 818 | unsigned int BScreen::maxTop() const { |
819 | return 0; | 819 | return 0; |
820 | } | 820 | } |
821 | ///!! TODO | 821 | ///!! TODO |
822 | unsigned int BScreen::getMaxBottom() const { | 822 | unsigned int BScreen::maxBottom() const { |
823 | return getHeight(); | 823 | return height(); |
824 | } | 824 | } |
825 | 825 | ||
826 | void BScreen::reconfigure() { | 826 | void BScreen::reconfigure() { |
@@ -834,8 +834,8 @@ void BScreen::reconfigure() { | |||
834 | winFrameTheme().font().setAntialias(*resource.antialias); | 834 | winFrameTheme().font().setAntialias(*resource.antialias); |
835 | m_menutheme->titleFont().setAntialias(*resource.antialias); | 835 | m_menutheme->titleFont().setAntialias(*resource.antialias); |
836 | m_menutheme->frameFont().setAntialias(*resource.antialias); | 836 | m_menutheme->frameFont().setAntialias(*resource.antialias); |
837 | if (getToolbar() && getToolbar()->theme().font().isAntialias() != *resource.antialias) | 837 | if (toolbar() && toolbar()->theme().font().isAntialias() != *resource.antialias) |
838 | getToolbar()->theme().font().setAntialias(*resource.antialias); | 838 | toolbar()->theme().font().setAntialias(*resource.antialias); |
839 | 839 | ||
840 | // load theme | 840 | // load theme |
841 | std::string theme_filename(Fluxbox::instance()->getStyleFilename()); | 841 | std::string theme_filename(Fluxbox::instance()->getStyleFilename()); |
@@ -930,9 +930,9 @@ void BScreen::reconfigure() { | |||
930 | } | 930 | } |
931 | } | 931 | } |
932 | 932 | ||
933 | if (getToolbar()) { | 933 | if (toolbar()) { |
934 | getToolbar()->setPlacement(*resource.toolbar_placement); | 934 | toolbar()->setPlacement(*resource.toolbar_placement); |
935 | getToolbar()->reconfigure(); | 935 | toolbar()->reconfigure(); |
936 | } | 936 | } |
937 | 937 | ||
938 | #ifdef SLIT | 938 | #ifdef SLIT |
@@ -1054,8 +1054,8 @@ int BScreen::addWorkspace() { | |||
1054 | 1054 | ||
1055 | workspacemenu->update(); | 1055 | workspacemenu->update(); |
1056 | saveWorkspaces(workspacesList.size()); | 1056 | saveWorkspaces(workspacesList.size()); |
1057 | if (getToolbar() != 0) | 1057 | if (toolbar() != 0) |
1058 | getToolbar()->reconfigure(); | 1058 | toolbar()->reconfigure(); |
1059 | 1059 | ||
1060 | updateNetizenWorkspaceCount(); | 1060 | updateNetizenWorkspaceCount(); |
1061 | 1061 | ||
@@ -1083,8 +1083,8 @@ int BScreen::removeLastWorkspace() { | |||
1083 | workspacesList.pop_back(); | 1083 | workspacesList.pop_back(); |
1084 | delete wkspc; | 1084 | delete wkspc; |
1085 | 1085 | ||
1086 | if (getToolbar() != 0) | 1086 | if (toolbar() != 0) |
1087 | getToolbar()->reconfigure(); | 1087 | toolbar()->reconfigure(); |
1088 | 1088 | ||
1089 | updateNetizenWorkspaceCount(); | 1089 | updateNetizenWorkspaceCount(); |
1090 | saveWorkspaces(workspacesList.size()); | 1090 | saveWorkspaces(workspacesList.size()); |
@@ -1112,7 +1112,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
1112 | } | 1112 | } |
1113 | 1113 | ||
1114 | // reassociate all windows that are stuck to the new workspace | 1114 | // reassociate all windows that are stuck to the new workspace |
1115 | Workspace *wksp = getCurrentWorkspace(); | 1115 | Workspace *wksp = currentWorkspace(); |
1116 | Workspace::Windows wins = wksp->windowList(); | 1116 | Workspace::Windows wins = wksp->windowList(); |
1117 | Workspace::Windows::iterator it = wins.begin(); | 1117 | Workspace::Windows::iterator it = wins.begin(); |
1118 | for (; it != wins.end(); ++it) { | 1118 | for (; it != wins.end(); ++it) { |
@@ -1129,8 +1129,8 @@ void BScreen::changeWorkspaceID(unsigned int id) { | |||
1129 | current_workspace = getWorkspace(id); | 1129 | current_workspace = getWorkspace(id); |
1130 | 1130 | ||
1131 | workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true); | 1131 | workspacemenu->setItemSelected(current_workspace->workspaceID() + 2, true); |
1132 | if (getToolbar() != 0) | 1132 | if (toolbar() != 0) |
1133 | getToolbar()->redrawWorkspaceLabel(true); | 1133 | toolbar()->redrawWorkspaceLabel(true); |
1134 | 1134 | ||
1135 | current_workspace->showAll(); | 1135 | current_workspace->showAll(); |
1136 | 1136 | ||
@@ -1306,7 +1306,7 @@ FluxboxWindow *BScreen::createWindow(Window client) { | |||
1306 | 1306 | ||
1307 | #ifdef SLIT | 1307 | #ifdef SLIT |
1308 | if (win->initialState() == WithdrawnState) | 1308 | if (win->initialState() == WithdrawnState) |
1309 | getSlit()->addClient(win->clientWindow()); | 1309 | slit()->addClient(win->clientWindow()); |
1310 | #endif // SLIT | 1310 | #endif // SLIT |
1311 | 1311 | ||
1312 | if (!win->isManaged()) { | 1312 | if (!win->isManaged()) { |
@@ -1325,7 +1325,7 @@ FluxboxWindow *BScreen::createWindow(Window client) { | |||
1325 | setupWindowActions(*win); | 1325 | setupWindowActions(*win); |
1326 | Fluxbox::instance()->attachSignals(*win); | 1326 | Fluxbox::instance()->attachSignals(*win); |
1327 | } | 1327 | } |
1328 | if (win->workspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { | 1328 | if (win->workspaceNumber() == currentWorkspaceID() || win->isStuck()) { |
1329 | win->show(); | 1329 | win->show(); |
1330 | } | 1330 | } |
1331 | XSync(FbTk::App::instance()->display(), False); | 1331 | XSync(FbTk::App::instance()->display(), False); |
@@ -1338,7 +1338,7 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) { | |||
1338 | *layerManager().getLayer(Fluxbox::instance()->getNormalLayer())); | 1338 | *layerManager().getLayer(Fluxbox::instance()->getNormalLayer())); |
1339 | #ifdef SLIT | 1339 | #ifdef SLIT |
1340 | if (win->initialState() == WithdrawnState) | 1340 | if (win->initialState() == WithdrawnState) |
1341 | getSlit()->addClient(win->clientWindow()); | 1341 | slit()->addClient(win->clientWindow()); |
1342 | #endif // SLIT | 1342 | #endif // SLIT |
1343 | if (!win->isManaged()) { | 1343 | if (!win->isManaged()) { |
1344 | delete win; | 1344 | delete win; |
@@ -1350,7 +1350,7 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) { | |||
1350 | Fluxbox::instance()->saveWindowSearch(client.window(), win); | 1350 | Fluxbox::instance()->saveWindowSearch(client.window(), win); |
1351 | setupWindowActions(*win); | 1351 | setupWindowActions(*win); |
1352 | Fluxbox::instance()->attachSignals(*win); | 1352 | Fluxbox::instance()->attachSignals(*win); |
1353 | if (win->workspaceNumber() == getCurrentWorkspaceID() || win->isStuck()) { | 1353 | if (win->workspaceNumber() == currentWorkspaceID() || win->isStuck()) { |
1354 | win->show(); | 1354 | win->show(); |
1355 | } | 1355 | } |
1356 | return win; | 1356 | return win; |
@@ -1527,11 +1527,10 @@ void BScreen::nextFocus(int opts) { | |||
1527 | bool have_focused = false; | 1527 | bool have_focused = false; |
1528 | int focused_window_number = -1; | 1528 | int focused_window_number = -1; |
1529 | FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); | 1529 | FluxboxWindow *focused = Fluxbox::instance()->getFocusedWindow(); |
1530 | const int num_windows = getCurrentWorkspace()->numberOfWindows(); | 1530 | const int num_windows = currentWorkspace()->numberOfWindows(); |
1531 | 1531 | ||
1532 | if (focused != 0) { | 1532 | if (focused != 0) { |
1533 | if (focused->screen().getScreenNumber() == | 1533 | if (focused->screen().screenNumber() == screenNumber()) { |
1534 | getScreenNumber()) { | ||
1535 | have_focused = true; | 1534 | have_focused = true; |
1536 | focused_window_number = focused->windowNumber(); | 1535 | focused_window_number = focused->windowNumber(); |
1537 | } | 1536 | } |
@@ -1565,7 +1564,7 @@ void BScreen::nextFocus(int opts) { | |||
1565 | FluxboxWindow *fbwin = (*it)->m_win; | 1564 | FluxboxWindow *fbwin = (*it)->m_win; |
1566 | if (fbwin && !fbwin->isIconic() && | 1565 | if (fbwin && !fbwin->isIconic() && |
1567 | (fbwin->isStuck() | 1566 | (fbwin->isStuck() |
1568 | || fbwin->workspaceNumber() == getCurrentWorkspaceID())) { | 1567 | || fbwin->workspaceNumber() == currentWorkspaceID())) { |
1569 | // either on this workspace, or stuck | 1568 | // either on this workspace, or stuck |
1570 | 1569 | ||
1571 | // keep track of the originally selected window in a set | 1570 | // keep track of the originally selected window in a set |
@@ -1586,7 +1585,7 @@ void BScreen::nextFocus(int opts) { | |||
1586 | } | 1585 | } |
1587 | cycling_window = it; | 1586 | cycling_window = it; |
1588 | } else { // not stacked cycling | 1587 | } else { // not stacked cycling |
1589 | Workspace *wksp = getCurrentWorkspace(); | 1588 | Workspace *wksp = currentWorkspace(); |
1590 | Workspace::Windows &wins = wksp->windowList(); | 1589 | Workspace::Windows &wins = wksp->windowList(); |
1591 | Workspace::Windows::iterator it = wins.begin(); | 1590 | Workspace::Windows::iterator it = wins.begin(); |
1592 | 1591 | ||
@@ -1617,11 +1616,10 @@ void BScreen::prevFocus(int opts) { | |||
1617 | bool have_focused = false; | 1616 | bool have_focused = false; |
1618 | int focused_window_number = -1; | 1617 | int focused_window_number = -1; |
1619 | FluxboxWindow *focused; | 1618 | FluxboxWindow *focused; |
1620 | int num_windows = getCurrentWorkspace()->numberOfWindows(); | 1619 | int num_windows = currentWorkspace()->numberOfWindows(); |
1621 | 1620 | ||
1622 | if ((focused = Fluxbox::instance()->getFocusedWindow())) { | 1621 | if ((focused = Fluxbox::instance()->getFocusedWindow())) { |
1623 | if (focused->screen().getScreenNumber() == | 1622 | if (focused->screen().screenNumber() == screenNumber()) { |
1624 | getScreenNumber()) { | ||
1625 | have_focused = true; | 1623 | have_focused = true; |
1626 | focused_window_number = focused->windowNumber(); | 1624 | focused_window_number = focused->windowNumber(); |
1627 | } | 1625 | } |
@@ -1656,7 +1654,7 @@ void BScreen::prevFocus(int opts) { | |||
1656 | FluxboxWindow *fbwin = (*it)->m_win; | 1654 | FluxboxWindow *fbwin = (*it)->m_win; |
1657 | if (fbwin && !fbwin->isIconic() && | 1655 | if (fbwin && !fbwin->isIconic() && |
1658 | (fbwin->isStuck() | 1656 | (fbwin->isStuck() |
1659 | || fbwin->workspaceNumber() == getCurrentWorkspaceID())) { | 1657 | || fbwin->workspaceNumber() == currentWorkspaceID())) { |
1660 | // either on this workspace, or stuck | 1658 | // either on this workspace, or stuck |
1661 | 1659 | ||
1662 | // keep track of the originally selected window in a set | 1660 | // keep track of the originally selected window in a set |
@@ -1679,7 +1677,7 @@ void BScreen::prevFocus(int opts) { | |||
1679 | cycling_window = it; | 1677 | cycling_window = it; |
1680 | } else { // not stacked cycling | 1678 | } else { // not stacked cycling |
1681 | 1679 | ||
1682 | Workspace *wksp = getCurrentWorkspace(); | 1680 | Workspace *wksp = currentWorkspace(); |
1683 | Workspace::Windows &wins = wksp->windowList(); | 1681 | Workspace::Windows &wins = wksp->windowList(); |
1684 | Workspace::Windows::iterator it = wins.begin(); | 1682 | Workspace::Windows::iterator it = wins.begin(); |
1685 | 1683 | ||
@@ -1712,13 +1710,12 @@ void BScreen::raiseFocus() { | |||
1712 | Fluxbox * const fb = Fluxbox::instance(); | 1710 | Fluxbox * const fb = Fluxbox::instance(); |
1713 | 1711 | ||
1714 | if (fb->getFocusedWindow()) | 1712 | if (fb->getFocusedWindow()) |
1715 | if (fb->getFocusedWindow()->screen().getScreenNumber() == | 1713 | if (fb->getFocusedWindow()->screen().screenNumber() == screenNumber()) { |
1716 | getScreenNumber()) { | ||
1717 | have_focused = true; | 1714 | have_focused = true; |
1718 | focused_window_number = fb->getFocusedWindow()->windowNumber(); | 1715 | focused_window_number = fb->getFocusedWindow()->windowNumber(); |
1719 | } | 1716 | } |
1720 | 1717 | ||
1721 | if ((getCurrentWorkspace()->numberOfWindows() > 1) && have_focused) | 1718 | if ((currentWorkspace()->numberOfWindows() > 1) && have_focused) |
1722 | fb->getFocusedWindow()->raise(); | 1719 | fb->getFocusedWindow()->raise(); |
1723 | } | 1720 | } |
1724 | 1721 | ||
@@ -1745,7 +1742,7 @@ void BScreen::dirFocus(FluxboxWindow &win, FocusDir dir) { | |||
1745 | left = win.x(), | 1742 | left = win.x(), |
1746 | right = win.x() + win.width() + 2*borderW; | 1743 | right = win.x() + win.width() + 2*borderW; |
1747 | 1744 | ||
1748 | Workspace::Windows &wins = getCurrentWorkspace()->windowList(); | 1745 | Workspace::Windows &wins = currentWorkspace()->windowList(); |
1749 | Workspace::Windows::iterator it = wins.begin(); | 1746 | Workspace::Windows::iterator it = wins.begin(); |
1750 | for (; it != wins.end(); ++it) { | 1747 | for (; it != wins.end(); ++it) { |
1751 | if ((*it) == &win) continue; // skip self | 1748 | if ((*it) == &win) continue; // skip self |
@@ -1883,7 +1880,7 @@ void BScreen::initMenu() { | |||
1883 | if (defaultMenu) { | 1880 | if (defaultMenu) { |
1884 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); | 1881 | FbTk::RefCount<FbTk::Command> restart_fb(new FbCommands::RestartFluxboxCmd()); |
1885 | FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd()); | 1882 | FbTk::RefCount<FbTk::Command> exit_fb(new FbCommands::ExitFluxboxCmd()); |
1886 | FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm", getScreenNumber())); | 1883 | FbTk::RefCount<FbTk::Command> execute_xterm(new FbCommands::ExecuteCmd("xterm", screenNumber())); |
1887 | m_rootmenu->setInternalMenu(); | 1884 | m_rootmenu->setInternalMenu(); |
1888 | m_rootmenu->insert(i18n->getMessage( | 1885 | m_rootmenu->insert(i18n->getMessage( |
1889 | FBNLS::ScreenSet, FBNLS::Screenxterm, | 1886 | FBNLS::ScreenSet, FBNLS::Screenxterm, |
@@ -1955,7 +1952,7 @@ bool BScreen::parseMenuFile(ifstream &file, FbTk::Menu &menu, int &row) { | |||
1955 | "no menu label and/or command defined\n")); | 1952 | "no menu label and/or command defined\n")); |
1956 | cerr<<"Row: "<<row<<endl; | 1953 | cerr<<"Row: "<<row<<endl; |
1957 | } else { | 1954 | } else { |
1958 | FbTk::RefCount<FbTk::Command> exec_cmd(new FbCommands::ExecuteCmd(str_cmd, getScreenNumber())); | 1955 | FbTk::RefCount<FbTk::Command> exec_cmd(new FbCommands::ExecuteCmd(str_cmd, screenNumber())); |
1959 | FbTk::MacroCommand *exec_and_hide = new FbTk::MacroCommand(); | 1956 | FbTk::MacroCommand *exec_and_hide = new FbTk::MacroCommand(); |
1960 | exec_and_hide->add(hide_menu); | 1957 | exec_and_hide->add(hide_menu); |
1961 | exec_and_hide->add(exec_cmd); | 1958 | exec_and_hide->add(exec_cmd); |
@@ -2192,9 +2189,9 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
2192 | "Focus Model"), | 2189 | "Focus Model"), |
2193 | focus_menu); | 2190 | focus_menu); |
2194 | #ifdef SLIT | 2191 | #ifdef SLIT |
2195 | if (getSlit() != 0) { | 2192 | if (slit() != 0) { |
2196 | getSlit()->menu().setInternalMenu(); | 2193 | slit()->menu().setInternalMenu(); |
2197 | menu.insert("Slit", &getSlit()->menu()); | 2194 | menu.insert("Slit", &slit()->menu()); |
2198 | } | 2195 | } |
2199 | #endif // SLIT | 2196 | #endif // SLIT |
2200 | menu.insert(i18n->getMessage( | 2197 | menu.insert(i18n->getMessage( |
@@ -2346,8 +2343,8 @@ void BScreen::showPosition(int x, int y) { | |||
2346 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, | 2343 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, |
2347 | geom_w, geom_h); | 2344 | geom_w, geom_h); |
2348 | #else // !XINERMA | 2345 | #else // !XINERMA |
2349 | geom_window.moveResize((getWidth() - geom_w) / 2, | 2346 | geom_window.moveResize((width() - geom_w) / 2, |
2350 | (getHeight() - geom_h) / 2, geom_w, geom_h); | 2347 | (height() - geom_h) / 2, geom_w, geom_h); |
2351 | #endif // XINERAMA | 2348 | #endif // XINERAMA |
2352 | 2349 | ||
2353 | geom_window.show(); | 2350 | geom_window.show(); |
@@ -2358,20 +2355,18 @@ void BScreen::showPosition(int x, int y) { | |||
2358 | char label[256]; | 2355 | char label[256]; |
2359 | 2356 | ||
2360 | sprintf(label, | 2357 | sprintf(label, |
2361 | I18n::instance()->getMessage( | 2358 | I18n::instance()->getMessage(FBNLS::ScreenSet, FBNLS::ScreenPositionFormat, |
2362 | FBNLS::ScreenSet, FBNLS::ScreenPositionFormat, | ||
2363 | "X: %4d x Y: %4d"), x, y); | 2359 | "X: %4d x Y: %4d"), x, y); |
2364 | 2360 | ||
2365 | geom_window.clear(); | 2361 | geom_window.clear(); |
2366 | 2362 | ||
2367 | winFrameTheme().font().drawText( | 2363 | winFrameTheme().font().drawText(geom_window.window(), |
2368 | geom_window.window(), | 2364 | screenNumber(), |
2369 | getScreenNumber(), | 2365 | winFrameTheme().labelTextFocusGC(), |
2370 | winFrameTheme().labelTextFocusGC(), | 2366 | label, strlen(label), |
2371 | label, strlen(label), | 2367 | m_root_theme->bevelWidth(), |
2372 | m_root_theme->bevelWidth(), | 2368 | m_root_theme->bevelWidth() + |
2373 | m_root_theme->bevelWidth() + | 2369 | winFrameTheme().font().ascent()); |
2374 | winFrameTheme().font().ascent()); | ||
2375 | 2370 | ||
2376 | } | 2371 | } |
2377 | 2372 | ||
@@ -2385,8 +2380,8 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) { | |||
2385 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, | 2380 | getHeadY(head) + (getHeadHeight(head) - geom_h) / 2, |
2386 | geom_w, geom_h); | 2381 | geom_w, geom_h); |
2387 | #else // !XINERMA | 2382 | #else // !XINERMA |
2388 | geom_window.moveResize((getWidth() - geom_w) / 2, | 2383 | geom_window.moveResize((width() - geom_w) / 2, |
2389 | (getHeight() - geom_h) / 2, geom_w, geom_h); | 2384 | (height() - geom_h) / 2, geom_w, geom_h); |
2390 | #endif // XINERAMA | 2385 | #endif // XINERAMA |
2391 | geom_window.show(); | 2386 | geom_window.show(); |
2392 | geom_window.raise(); | 2387 | geom_window.raise(); |
@@ -2405,12 +2400,12 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) { | |||
2405 | 2400 | ||
2406 | //TODO: geom window again?! repeated | 2401 | //TODO: geom window again?! repeated |
2407 | winFrameTheme().font().drawText(geom_window.window(), | 2402 | winFrameTheme().font().drawText(geom_window.window(), |
2408 | getScreenNumber(), | 2403 | screenNumber(), |
2409 | winFrameTheme().labelTextFocusGC(), | 2404 | winFrameTheme().labelTextFocusGC(), |
2410 | label, strlen(label), | 2405 | label, strlen(label), |
2411 | m_root_theme->bevelWidth(), | 2406 | m_root_theme->bevelWidth(), |
2412 | m_root_theme->bevelWidth() + | 2407 | m_root_theme->bevelWidth() + |
2413 | winFrameTheme().font().ascent()); | 2408 | winFrameTheme().font().ascent()); |
2414 | } | 2409 | } |
2415 | 2410 | ||
2416 | 2411 | ||
@@ -2430,30 +2425,30 @@ void BScreen::setLayer(FbTk::XLayerItem &item, int layernum) { | |||
2430 | Goes to the workspace "right" of the current | 2425 | Goes to the workspace "right" of the current |
2431 | */ | 2426 | */ |
2432 | void BScreen::nextWorkspace(const int delta) { | 2427 | void BScreen::nextWorkspace(const int delta) { |
2433 | changeWorkspaceID( (getCurrentWorkspaceID() + delta) % getCount()); | 2428 | changeWorkspaceID( (currentWorkspaceID() + delta) % getCount()); |
2434 | } | 2429 | } |
2435 | 2430 | ||
2436 | /** | 2431 | /** |
2437 | Goes to the workspace "left" of the current | 2432 | Goes to the workspace "left" of the current |
2438 | */ | 2433 | */ |
2439 | void BScreen::prevWorkspace(const int delta) { | 2434 | void BScreen::prevWorkspace(const int delta) { |
2440 | changeWorkspaceID( (getCurrentWorkspaceID() - delta + getCount()) % getCount()); | 2435 | changeWorkspaceID( (currentWorkspaceID() - delta + getCount()) % getCount()); |
2441 | } | 2436 | } |
2442 | 2437 | ||
2443 | /** | 2438 | /** |
2444 | Goes to the workspace "right" of the current | 2439 | Goes to the workspace "right" of the current |
2445 | */ | 2440 | */ |
2446 | void BScreen::rightWorkspace(const int delta) { | 2441 | void BScreen::rightWorkspace(const int delta) { |
2447 | if (getCurrentWorkspaceID()+delta < getCount()) | 2442 | if (currentWorkspaceID()+delta < getCount()) |
2448 | changeWorkspaceID(getCurrentWorkspaceID()+delta); | 2443 | changeWorkspaceID(currentWorkspaceID()+delta); |
2449 | } | 2444 | } |
2450 | 2445 | ||
2451 | /** | 2446 | /** |
2452 | Goes to the workspace "left" of the current | 2447 | Goes to the workspace "left" of the current |
2453 | */ | 2448 | */ |
2454 | void BScreen::leftWorkspace(const int delta) { | 2449 | void BScreen::leftWorkspace(const int delta) { |
2455 | if (getCurrentWorkspaceID() >= static_cast<unsigned int>(delta)) | 2450 | if (currentWorkspaceID() >= static_cast<unsigned int>(delta)) |
2456 | changeWorkspaceID(getCurrentWorkspaceID()-delta); | 2451 | changeWorkspaceID(currentWorkspaceID()-delta); |
2457 | } | 2452 | } |
2458 | 2453 | ||
2459 | /** | 2454 | /** |
@@ -2521,11 +2516,11 @@ void BScreen::updateSize() { | |||
2521 | // reset background | 2516 | // reset background |
2522 | m_root_theme->reconfigTheme(); | 2517 | m_root_theme->reconfigTheme(); |
2523 | 2518 | ||
2524 | if (getToolbar()) | 2519 | if (toolbar()) |
2525 | getToolbar()->reconfigure(); | 2520 | toolbar()->reconfigure(); |
2526 | 2521 | ||
2527 | if (getSlit()) | 2522 | if (slit()) |
2528 | getSlit()->reconfigure(); | 2523 | slit()->reconfigure(); |
2529 | 2524 | ||
2530 | //!! TODO: should we re-maximize the maximized windows? | 2525 | //!! TODO: should we re-maximize the maximized windows? |
2531 | 2526 | ||