aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2007-12-27 21:55:24 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2007-12-27 21:55:24 (GMT)
commitb5c354b994bc06667abe35e2d528c0f025703c4e (patch)
tree081fd3207053a06cb50931ccec3237bc614f10eb /src/Screen.cc
parent1f5cd12facc662de240b36bf3c5c14f40adf391b (diff)
downloadfluxbox-b5c354b994bc06667abe35e2d528c0f025703c4e.zip
fluxbox-b5c354b994bc06667abe35e2d528c0f025703c4e.tar.bz2
architecture astronomy
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc55
1 files changed, 28 insertions, 27 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 97ce70b..c304b7e 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -47,8 +47,8 @@
47#include "SlitTheme.hh" 47#include "SlitTheme.hh"
48 48
49// menu items 49// menu items
50#include "BoolMenuItem.hh" 50#include "FbTk/BoolMenuItem.hh"
51#include "IntResMenuItem.hh" 51#include "FbTk/IntMenuItem.hh"
52#include "FocusModelMenuItem.hh" 52#include "FocusModelMenuItem.hh"
53 53
54// menus 54// menus
@@ -1576,7 +1576,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1576 "Method used to give focus to windows"); 1576 "Method used to give focus to windows");
1577 FbTk::Menu *focus_menu = createMenu(focusmenu_label); 1577 FbTk::Menu *focus_menu = createMenu(focusmenu_label);
1578 1578
1579#define _BOOLITEM(m,a, b, c, d, e, f) (m).insert(new BoolMenuItem(_FB_XTEXT(a, b, c, d), e, f)) 1579#define _BOOLITEM(m,a, b, c, d, e, f) (m).insert(new FbTk::BoolMenuItem(_FB_XTEXT(a, b, c, d), e, f))
1580 1580
1581 1581
1582#define _FOCUSITEM(a, b, c, d, e) \ 1582#define _FOCUSITEM(a, b, c, d, e) \
@@ -1599,19 +1599,19 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1599 focusControl(), FocusControl::MOUSETABFOCUS, save_and_reconfigure)); 1599 focusControl(), FocusControl::MOUSETABFOCUS, save_and_reconfigure));
1600 1600
1601 try { 1601 try {
1602 focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, FocusNew, 1602 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, FocusNew,
1603 "Focus New Windows", "Focus newly created windows"), 1603 "Focus New Windows", "Focus newly created windows"),
1604 *m_resource_manager.getResource<bool>(name() + ".focusNewWindows"), 1604 m_resource_manager.getResource<bool>(name() + ".focusNewWindows"),
1605 saverc_cmd)); 1605 saverc_cmd));
1606 } catch (FbTk::ResourceException e) { 1606 } catch (FbTk::ResourceException e) {
1607 cerr<<e.what()<<endl; 1607 cerr<<e.what()<<endl;
1608 } 1608 }
1609 1609
1610 focus_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, 1610 focus_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu,
1611 AutoRaise, 1611 AutoRaise,
1612 "Auto Raise", 1612 "Auto Raise",
1613 "Auto Raise windows on sloppy"), 1613 "Auto Raise windows on sloppy"),
1614 *resource.auto_raise, 1614 resource.auto_raise,
1615 save_and_reconfigure)); 1615 save_and_reconfigure));
1616 1616
1617 focus_menu->updateMenu(); 1617 focus_menu->updateMenu();
@@ -1628,17 +1628,17 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1628 1628
1629 _BOOLITEM(*maxmenu, Configmenu, FullMax, 1629 _BOOLITEM(*maxmenu, Configmenu, FullMax,
1630 "Full Maximization", "Maximise over slit, toolbar, etc", 1630 "Full Maximization", "Maximise over slit, toolbar, etc",
1631 *resource.full_max, saverc_cmd); 1631 resource.full_max, saverc_cmd);
1632 _BOOLITEM(*maxmenu, Configmenu, MaxIgnoreInc, 1632 _BOOLITEM(*maxmenu, Configmenu, MaxIgnoreInc,
1633 "Ignore Resize Increment", 1633 "Ignore Resize Increment",
1634 "Maximizing Ignores Resize Increment (e.g. xterm)", 1634 "Maximizing Ignores Resize Increment (e.g. xterm)",
1635 *resource.max_ignore_inc, saverc_cmd); 1635 resource.max_ignore_inc, saverc_cmd);
1636 _BOOLITEM(*maxmenu, Configmenu, MaxDisableMove, 1636 _BOOLITEM(*maxmenu, Configmenu, MaxDisableMove,
1637 "Disable Moving", "Don't Allow Moving While Maximized", 1637 "Disable Moving", "Don't Allow Moving While Maximized",
1638 *resource.max_disable_move, saverc_cmd); 1638 resource.max_disable_move, saverc_cmd);
1639 _BOOLITEM(*maxmenu, Configmenu, MaxDisableResize, 1639 _BOOLITEM(*maxmenu, Configmenu, MaxDisableResize,
1640 "Disable Resizing", "Don't Allow Resizing While Maximized", 1640 "Disable Resizing", "Don't Allow Resizing While Maximized",
1641 *resource.max_disable_resize, saverc_cmd); 1641 resource.max_disable_resize, saverc_cmd);
1642 1642
1643 maxmenu->updateMenu(); 1643 maxmenu->updateMenu();
1644 menu.insert(maxmenu_label, maxmenu); 1644 menu.insert(maxmenu_label, maxmenu);
@@ -1658,16 +1658,16 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1658 1658
1659 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar, 1659 _BOOLITEM(*tab_menu,Configmenu, TabsInTitlebar,
1660 "Tabs in Titlebar", "Tabs in Titlebar", 1660 "Tabs in Titlebar", "Tabs in Titlebar",
1661 *resource.default_internal_tabs, save_and_reconftabs); 1661 resource.default_internal_tabs, save_and_reconftabs);
1662 tab_menu->insert(new BoolMenuItem(_FB_XTEXT(Common, MaximizeOver, 1662 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Common, MaximizeOver,
1663 "Maximize Over", "Maximize over this thing when maximizing"), 1663 "Maximize Over", "Maximize over this thing when maximizing"),
1664 *resource.max_over_tabs, save_and_reconfigure)); 1664 resource.max_over_tabs, save_and_reconfigure));
1665 tab_menu->insert(new BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons, 1665 tab_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons,
1666 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"), 1666 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"),
1667 *resource.tabs_use_pixmap, save_and_reconfigure)); 1667 resource.tabs_use_pixmap, save_and_reconfigure));
1668 1668
1669 FbTk::MenuItem *tab_width_item = 1669 FbTk::MenuItem *tab_width_item =
1670 new IntResMenuItem< FbTk::Resource<int> >(_FB_XTEXT(Configmenu, ExternalTabWidth, 1670 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, ExternalTabWidth,
1671 "External Tab Width", 1671 "External Tab Width",
1672 "Width of external-style tabs"), 1672 "Width of external-style tabs"),
1673 resource.tab_width, 10, 3000, /* silly number */ 1673 resource.tab_width, 10, 3000, /* silly number */
@@ -1715,10 +1715,11 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1715 FbTk::Menu *alpha_menu = createMenu(alphamenu_label); 1715 FbTk::Menu *alpha_menu = createMenu(alphamenu_label);
1716 1716
1717 if (FbTk::Transparent::haveComposite(true)) { 1717 if (FbTk::Transparent::haveComposite(true)) {
1718 alpha_menu->insert(new BoolMenuItem(_FB_XTEXT(Configmenu, ForcePseudoTrans, 1718 static FbTk::SimpleAccessor<bool> s_pseudo(Fluxbox::instance()->getPseudoTrans());
1719 alpha_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Configmenu, ForcePseudoTrans,
1719 "Force Pseudo-Transparency", 1720 "Force Pseudo-Transparency",
1720 "When composite is available, still use old pseudo-transparency"), 1721 "When composite is available, still use old pseudo-transparency"),
1721 Fluxbox::instance()->getPseudoTrans(), save_and_reconfigure)); 1722 s_pseudo, save_and_reconfigure));
1722 } 1723 }
1723 1724
1724 // in order to save system resources, don't save or reconfigure alpha 1725 // in order to save system resources, don't save or reconfigure alpha
@@ -1727,7 +1728,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1727 new ::DelayedCmd(save_and_reconfigure)); 1728 new ::DelayedCmd(save_and_reconfigure));
1728 1729
1729 FbTk::MenuItem *focused_alpha_item = 1730 FbTk::MenuItem *focused_alpha_item =
1730 new IntResMenuItem< FbTk::Resource<int> >(_FB_XTEXT(Configmenu, FocusedAlpha, 1731 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, FocusedAlpha,
1731 "Focused Window Alpha", 1732 "Focused Window Alpha",
1732 "Transparency level of the focused window"), 1733 "Transparency level of the focused window"),
1733 resource.focused_alpha, 0, 255, *alpha_menu); 1734 resource.focused_alpha, 0, 255, *alpha_menu);
@@ -1735,7 +1736,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1735 alpha_menu->insert(focused_alpha_item); 1736 alpha_menu->insert(focused_alpha_item);
1736 1737
1737 FbTk::MenuItem *unfocused_alpha_item = 1738 FbTk::MenuItem *unfocused_alpha_item =
1738 new IntResMenuItem< FbTk::Resource<int> >(_FB_XTEXT(Configmenu, 1739 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu,
1739 UnfocusedAlpha, 1740 UnfocusedAlpha,
1740 "Unfocused Window Alpha", 1741 "Unfocused Window Alpha",
1741 "Transparency level of unfocused windows"), 1742 "Transparency level of unfocused windows"),
@@ -1745,7 +1746,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1745 alpha_menu->insert(unfocused_alpha_item); 1746 alpha_menu->insert(unfocused_alpha_item);
1746 1747
1747 FbTk::MenuItem *menu_alpha_item = 1748 FbTk::MenuItem *menu_alpha_item =
1748 new IntResMenuItem< FbTk::Resource<int> >(_FB_XTEXT(Configmenu, MenuAlpha, 1749 new FbTk::IntMenuItem(_FB_XTEXT(Configmenu, MenuAlpha,
1749 "Menu Alpha", "Transparency level of menu"), 1750 "Menu Alpha", "Transparency level of menu"),
1750 resource.menu_alpha, 0, 255, *alpha_menu); 1751 resource.menu_alpha, 0, 255, *alpha_menu);
1751 menu_alpha_item->setCommand(delayed_save_and_reconf); 1752 menu_alpha_item->setCommand(delayed_save_and_reconf);
@@ -1763,21 +1764,21 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1763 1764
1764 _BOOLITEM(menu, Configmenu, ImageDithering, 1765 _BOOLITEM(menu, Configmenu, ImageDithering,
1765 "Image Dithering", "Image Dithering", 1766 "Image Dithering", "Image Dithering",
1766 *resource.image_dither, save_and_reconfigure); 1767 resource.image_dither, save_and_reconfigure);
1767 _BOOLITEM(menu, Configmenu, OpaqueMove, 1768 _BOOLITEM(menu, Configmenu, OpaqueMove,
1768 "Opaque Window Moving", 1769 "Opaque Window Moving",
1769 "Window Moving with whole window visible (as opposed to outline moving)", 1770 "Window Moving with whole window visible (as opposed to outline moving)",
1770 *resource.opaque_move, saverc_cmd); 1771 resource.opaque_move, saverc_cmd);
1771 _BOOLITEM(menu, Configmenu, WorkspaceWarping, 1772 _BOOLITEM(menu, Configmenu, WorkspaceWarping,
1772 "Workspace Warping", 1773 "Workspace Warping",
1773 "Workspace Warping - dragging windows to the edge and onto the next workspace", 1774 "Workspace Warping - dragging windows to the edge and onto the next workspace",
1774 *resource.workspace_warping, saverc_cmd); 1775 resource.workspace_warping, saverc_cmd);
1775 _BOOLITEM(menu, Configmenu, DecorateTransient, 1776 _BOOLITEM(menu, Configmenu, DecorateTransient,
1776 "Decorate Transient Windows", "Decorate Transient Windows", 1777 "Decorate Transient Windows", "Decorate Transient Windows",
1777 *resource.decorate_transient, saverc_cmd); 1778 resource.decorate_transient, saverc_cmd);
1778 _BOOLITEM(menu, Configmenu, ClickRaises, 1779 _BOOLITEM(menu, Configmenu, ClickRaises,
1779 "Click Raises", "Click Raises", 1780 "Click Raises", "Click Raises",
1780 *resource.click_raises, saverc_cmd); 1781 resource.click_raises, saverc_cmd);
1781 1782
1782#undef _BOOLITEM 1783#undef _BOOLITEM
1783 1784