aboutsummaryrefslogtreecommitdiff
path: root/src/Configmenu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Configmenu.cc')
-rw-r--r--src/Configmenu.cc184
1 files changed, 56 insertions, 128 deletions
diff --git a/src/Configmenu.cc b/src/Configmenu.cc
index 0f8257f..4f24df4 100644
--- a/src/Configmenu.cc
+++ b/src/Configmenu.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: Configmenu.cc,v 1.11 2002/04/03 12:08:53 fluxgen Exp $ 25// $Id: Configmenu.cc,v 1.12 2002/04/04 11:28:19 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -48,105 +48,51 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
48 I18n *i18n = I18n::instance(); 48 I18n *i18n = I18n::instance();
49 49
50 setLabel(i18n->getMessage( 50 setLabel(i18n->getMessage(
51#ifdef NLS 51 FBNLS::ConfigmenuSet, FBNLS::ConfigmenuConfigOptions,
52 ConfigmenuSet, ConfigmenuConfigOptions, 52 "Config options"));
53#else // !NLS
54 0, 0,
55#endif // NLS
56 "Config options"));
57 53
58 setInternalMenu(); 54 setInternalMenu();
59 55
60 focusmenu = new Focusmenu(this); 56 focusmenu = new Focusmenu(this);
61 placementmenu = new Placementmenu(this); 57 placementmenu = new Placementmenu(this);
62 tabmenu = new Tabmenu(this); 58 tabmenu = new Tabmenu(this);
63 59 using namespace FBNLS;
64 insert(i18n->getMessage( 60 insert(i18n->getMessage(
65#ifdef NLS 61 ConfigmenuSet, ConfigmenuFocusModel,
66 ConfigmenuSet, ConfigmenuFocusModel, 62 "Focus Model"), focusmenu);
67#else // !NLS 63 insert(i18n->getMessage(
68 0, 0, 64 ConfigmenuSet, ConfigmenuWindowPlacement,
69#endif // NLS 65 "Window Placement"), placementmenu);
70 "Focus Model"), focusmenu); 66 insert(i18n->getMessage(
71 insert(i18n->getMessage( 67 ConfigmenuSet, ConfigmenuTabPlacement,
72#ifdef NLS 68 "Tab Placement"), tabmenu);
73 ConfigmenuSet, ConfigmenuWindowPlacement, 69 insert(i18n->getMessage(
74#else //! NLS 70 ConfigmenuSet, ConfigmenuImageDithering,
75 0, 0, 71 "Image Dithering"), 1);
76#endif // NLS 72 insert(i18n->getMessage(
77 "Window Placement"), placementmenu); 73 ConfigmenuSet, ConfigmenuOpaqueMove,
78 insert(i18n->getMessage( 74 "Opaque Window Moving"), 2);
79#ifdef NLS 75 insert(i18n->getMessage(
80 ConfigmenuSet, ConfigmenuTabPlacement, 76 ConfigmenuSet, ConfigmenuFullMax,
81#else // !NLS 77 "Full Maximization"), 3);
82 0, 0, 78 insert(i18n->getMessage(
83#endif // NLS 79 ConfigmenuSet, ConfigmenuFocusNew,
84 "Tab Placement"), tabmenu); 80 "Focus New Windows"), 4);
85 insert(i18n->getMessage( 81 insert(i18n->getMessage(
86#ifdef NLS 82 ConfigmenuSet, ConfigmenuFocusLast,
87 ConfigmenuSet, ConfigmenuImageDithering, 83 "Focus Last Window on Workspace"), 5);
88#else // !NLS 84 insert(i18n->getMessage(
89 0, 0, 85 ConfigmenuSet, ConfigmenuMaxOverSlit,
90#endif // NLS 86 "Maxmize Over Slit"), 6);
91 "Image Dithering"), 1);
92 insert(i18n->getMessage(
93#ifdef NLS
94 ConfigmenuSet, ConfigmenuOpaqueMove,
95#else // !NLS
96 0, 0,
97#endif // NLS
98 "Opaque Window Moving"), 2);
99 insert(i18n->getMessage(
100#ifdef NLS
101 ConfigmenuSet, ConfigmenuFullMax,
102#else // !NLS
103 0, 0,
104#endif // NLS
105 "Full Maximization"), 3);
106 insert(i18n->getMessage(
107#ifdef NLS
108 ConfigmenuSet, ConfigmenuFocusNew,
109#else // !NLS
110 0, 0,
111#endif // NLS
112 "Focus New Windows"), 4);
113 insert(i18n->getMessage(
114#ifdef NLS
115 ConfigmenuSet, ConfigmenuFocusLast,
116#else // !NLS
117 0, 0,
118#endif // NLS
119 "Focus Last Window on Workspace"), 5);
120 insert(i18n->getMessage(
121#ifdef NLS
122 ConfigmenuSet, ConfigmenuMaxOverSlit,
123#else // !NLS
124 0, 0,
125#endif // NLS
126 "Maxmize Over Slit"), 6);
127
128
129 insert(i18n->getMessage( 87 insert(i18n->getMessage(
130#ifdef NLS 88 ConfigmenuSet, ConfigmenuTabs,
131 ConfigmenuSet, ConfigmenuTabs, 89 "Use Tabs"), CMENU_USE_TABS);
132#else // !NLS 90 insert(i18n->getMessage(
133 0, 0, 91 ConfigmenuSet, ConfigmenuIcons,
134#endif // NLS 92 "Use Icons"), CMENU_USE_ICONS);
135 "Use Tabs"), CMENU_USE_TABS); 93 insert(i18n->getMessage(
136 insert(i18n->getMessage( 94 ConfigmenuSet, ConfigmenuSloppyWindowGrouping,
137#ifdef NLS 95 "Sloppy Window Grouping"), CMENU_SLOPPY_WIN_GROUP);
138 ConfigmenuSet, ConfigmenuIcons,
139#else // !NLS
140 0, 0,
141#endif // NLS
142 "Use Icons"), CMENU_USE_ICONS);
143 insert(i18n->getMessage(
144#ifdef NLS
145 ConfigmenuSet, ConfigmenuSloppyWindowGrouping,
146#else // !NLS
147 0, 0,
148#endif // NLS
149 "Sloppy Window Grouping"), CMENU_SLOPPY_WIN_GROUP);
150 96
151 update(); 97 update();
152 setItemSelected(8, screen->doMaxOverSlit()); 98 setItemSelected(8, screen->doMaxOverSlit());
@@ -253,52 +199,33 @@ void Configmenu::reconfigure(void) {
253Configmenu::Focusmenu::Focusmenu(Configmenu *cm) : Basemenu(cm->screen) { 199Configmenu::Focusmenu::Focusmenu(Configmenu *cm) : Basemenu(cm->screen) {
254 configmenu = cm; 200 configmenu = cm;
255 I18n *i18n = I18n::instance(); 201 I18n *i18n = I18n::instance();
202 using namespace FBNLS;
256 setLabel(i18n->getMessage( 203 setLabel(i18n->getMessage(
257#ifdef NLS 204 ConfigmenuSet, ConfigmenuFocusModel,
258 ConfigmenuSet, ConfigmenuFocusModel, 205 "Focus Model"));
259#else // !NLS
260 0, 0,
261#endif // NLS
262 "Focus Model"));
263 setInternalMenu(); 206 setInternalMenu();
264 207
265 insert(i18n->getMessage( 208 insert(i18n->getMessage(
266#ifdef NLS 209 ConfigmenuSet, ConfigmenuClickToFocus,
267 ConfigmenuSet, ConfigmenuClickToFocus, 210 "Click To Focus"), 1);
268#else // !NLS 211 insert(i18n->getMessage(
269 0, 0, 212 ConfigmenuSet, ConfigmenuSloppyFocus,
270#endif // NLS 213 "Sloppy Focus"), 2);
271 "Click To Focus"), 1); 214 insert(i18n->getMessage(
272 insert(i18n->getMessage( 215 ConfigmenuSet, ConfigmenuSemiSloppyFocus,
273#ifdef NLS 216 "Semi Sloppy Focus"), 3);
274 ConfigmenuSet, ConfigmenuSloppyFocus, 217 insert(i18n->getMessage(
275#else // !NLS 218 ConfigmenuSet, ConfigmenuAutoRaise,
276 0, 0, 219 "Auto Raise"), 4);
277#endif // NLS
278 "Sloppy Focus"), 2);
279 insert(i18n->getMessage(
280#ifdef NLS
281 ConfigmenuSet, ConfigmenuSemiSloppyFocus,
282#else // !NLS
283 0, 0,
284#endif // NLS
285 "Semi Sloppy Focus"), 3);
286 insert(i18n->getMessage(
287#ifdef NLS
288 ConfigmenuSet, ConfigmenuAutoRaise,
289#else // !NLS
290 0, 0,
291#endif // NLS
292 "Auto Raise"), 4);
293 220
294 update(); 221 update();
295 222
296 setItemSelected(0, !(configmenu->screen->isSloppyFocus() || 223 setItemSelected(0, !(configmenu->screen->isSloppyFocus() ||
297 configmenu->screen->isSemiSloppyFocus())); 224 configmenu->screen->isSemiSloppyFocus()));
298 setItemSelected(1, configmenu->screen->isSloppyFocus()); 225 setItemSelected(1, configmenu->screen->isSloppyFocus());
299 setItemSelected(2, configmenu->screen->isSemiSloppyFocus()); 226 setItemSelected(2, configmenu->screen->isSemiSloppyFocus());
300 setItemEnabled(3, (configmenu->screen->isSloppyFocus() || 227 setItemEnabled(3, (configmenu->screen->isSloppyFocus() ||
301 configmenu->screen->isSemiSloppyFocus())); 228 configmenu->screen->isSemiSloppyFocus()));
302 setItemSelected(3, configmenu->screen->doAutoRaise()); 229 setItemSelected(3, configmenu->screen->doAutoRaise());
303} 230}
304 231
@@ -366,7 +293,7 @@ void Configmenu::Focusmenu::itemSelected(int button, unsigned int index) {
366Configmenu::Placementmenu::Placementmenu(Configmenu *cm) : Basemenu(cm->screen) { 293Configmenu::Placementmenu::Placementmenu(Configmenu *cm) : Basemenu(cm->screen) {
367 configmenu = cm; 294 configmenu = cm;
368 I18n *i18n = I18n::instance(); 295 I18n *i18n = I18n::instance();
369 296 using namespace FBNLS;
370 setLabel(i18n->getMessage( 297 setLabel(i18n->getMessage(
371 ConfigmenuSet, ConfigmenuWindowPlacement, 298 ConfigmenuSet, ConfigmenuWindowPlacement,
372 "Window Placement")); 299 "Window Placement"));
@@ -495,6 +422,7 @@ void Configmenu::Placementmenu::itemSelected(int button, unsigned int index) {
495Configmenu::Tabmenu::Tabmenu(Configmenu *cm) : Basemenu(cm->screen) { 422Configmenu::Tabmenu::Tabmenu(Configmenu *cm) : Basemenu(cm->screen) {
496 configmenu = cm; 423 configmenu = cm;
497 I18n *i18n = I18n::instance(); 424 I18n *i18n = I18n::instance();
425 using namespace FBNLS;
498 426
499 setLabel(i18n->getMessage( 427 setLabel(i18n->getMessage(
500 ConfigmenuSet, ConfigmenuTabPlacement, 428 ConfigmenuSet, ConfigmenuTabPlacement,