Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinoptions/mouse.cpp
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Line(s) | |||||
211 | const char* const tbl_TiAc[] = { | 211 | const char* const tbl_TiAc[] = { | ||
212 | "Raise", | 212 | "Raise", | ||
213 | "Lower", | 213 | "Lower", | ||
214 | "Toggle raise and lower", | 214 | "Toggle raise and lower", | ||
215 | "Minimize", | 215 | "Minimize", | ||
216 | "Shade", | 216 | "Shade", | ||
217 | "Close", | 217 | "Close", | ||
218 | "Operations menu", | 218 | "Operations menu", | ||
219 | "Start window tab drag", | | |||
220 | "Nothing", | 219 | "Nothing", | ||
221 | "" | 220 | "" | ||
222 | }; | 221 | }; | ||
223 | 222 | | |||
224 | const char* const tbl_TiInAc[] = { | 223 | const char* const tbl_TiInAc[] = { | ||
225 | "Activate and raise", | 224 | "Activate and raise", | ||
226 | "Activate and lower", | 225 | "Activate and lower", | ||
227 | "Activate", | 226 | "Activate", | ||
228 | "Raise", | 227 | "Raise", | ||
229 | "Lower", | 228 | "Lower", | ||
230 | "Toggle raise and lower", | 229 | "Toggle raise and lower", | ||
231 | "Minimize", | 230 | "Minimize", | ||
232 | "Shade", | 231 | "Shade", | ||
233 | "Close", | 232 | "Close", | ||
234 | "Operations menu", | 233 | "Operations menu", | ||
235 | "Start window tab drag", | | |||
236 | "Nothing", | 234 | "Nothing", | ||
237 | "" | 235 | "" | ||
238 | }; | 236 | }; | ||
239 | 237 | | |||
240 | const char* const tbl_Win[] = { | 238 | const char* const tbl_Win[] = { | ||
241 | "Activate, raise and pass click", | 239 | "Activate, raise and pass click", | ||
242 | "Activate and pass click", | 240 | "Activate and pass click", | ||
243 | "Activate", | 241 | "Activate", | ||
Show All 30 Lines | |||||
274 | 272 | | |||
275 | const char* const tbl_TiWAc[] = { | 273 | const char* const tbl_TiWAc[] = { | ||
276 | "Raise/Lower", | 274 | "Raise/Lower", | ||
277 | "Shade/Unshade", | 275 | "Shade/Unshade", | ||
278 | "Maximize/Restore", | 276 | "Maximize/Restore", | ||
279 | "Above/Below", | 277 | "Above/Below", | ||
280 | "Previous/Next Desktop", | 278 | "Previous/Next Desktop", | ||
281 | "Change Opacity", | 279 | "Change Opacity", | ||
282 | "Switch to Window Tab to the Left/Right", | | |||
283 | "Nothing", | 280 | "Nothing", | ||
284 | "" | 281 | "" | ||
285 | }; | 282 | }; | ||
286 | 283 | | |||
287 | const char* const tbl_AllW[] = { | 284 | const char* const tbl_AllW[] = { | ||
288 | "Raise/Lower", | 285 | "Raise/Lower", | ||
289 | "Shade/Unshade", | 286 | "Shade/Unshade", | ||
290 | "Maximize/Restore", | 287 | "Maximize/Restore", | ||
291 | "Above/Below", | 288 | "Above/Below", | ||
292 | "Previous/Next Desktop", | 289 | "Previous/Next Desktop", | ||
293 | "Change Opacity", | 290 | "Change Opacity", | ||
294 | "Switch to Window Tab to the Left/Right", | | |||
295 | "Nothing", | 291 | "Nothing", | ||
296 | "" | 292 | "" | ||
297 | }; | 293 | }; | ||
298 | 294 | | |||
299 | static const char* tbl_num_lookup(const char* const arr[], int pos) | 295 | static const char* tbl_num_lookup(const char* const arr[], int pos) | ||
300 | { | 296 | { | ||
301 | for (int i = 0; | 297 | for (int i = 0; | ||
302 | arr[ i ][ 0 ] != '\0' && pos >= 0; | 298 | arr[ i ][ 0 ] != '\0' && pos >= 0; | ||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 383 | { | |||
388 | KConfigGroup windowsConfig(config, "Windows"); | 384 | KConfigGroup windowsConfig(config, "Windows"); | ||
389 | setComboText(m_ui->coTiDbl, windowsConfig.readEntry("TitlebarDoubleClickCommand", "Maximize").toLatin1()); | 385 | setComboText(m_ui->coTiDbl, windowsConfig.readEntry("TitlebarDoubleClickCommand", "Maximize").toLatin1()); | ||
390 | setComboText(m_ui->leftClickMaximizeButton, windowsConfig.readEntry(cnf_Max[0], tbl_Max[0]).toLatin1()); | 386 | setComboText(m_ui->leftClickMaximizeButton, windowsConfig.readEntry(cnf_Max[0], tbl_Max[0]).toLatin1()); | ||
391 | setComboText(m_ui->middleClickMaximizeButton, windowsConfig.readEntry(cnf_Max[1], tbl_Max[1]).toLatin1()); | 387 | setComboText(m_ui->middleClickMaximizeButton, windowsConfig.readEntry(cnf_Max[1], tbl_Max[1]).toLatin1()); | ||
392 | setComboText(m_ui->rightClickMaximizeButton, windowsConfig.readEntry(cnf_Max[2], tbl_Max[2]).toLatin1()); | 388 | setComboText(m_ui->rightClickMaximizeButton, windowsConfig.readEntry(cnf_Max[2], tbl_Max[2]).toLatin1()); | ||
393 | 389 | | |||
394 | KConfigGroup cg(config, "MouseBindings"); | 390 | KConfigGroup cg(config, "MouseBindings"); | ||
395 | setComboText(m_ui->coTiAct1, cg.readEntry("CommandActiveTitlebar1", "Raise").toLatin1()); | 391 | setComboText(m_ui->coTiAct1, cg.readEntry("CommandActiveTitlebar1", "Raise").toLatin1()); | ||
396 | setComboText(m_ui->coTiAct2, cg.readEntry("CommandActiveTitlebar2", "Start Window Tab Drag").toLatin1()); | 392 | setComboText(m_ui->coTiAct2, cg.readEntry("CommandActiveTitlebar2", "Nothing").toLatin1()); | ||
397 | setComboText(m_ui->coTiAct3, cg.readEntry("CommandActiveTitlebar3", "Operations menu").toLatin1()); | 393 | setComboText(m_ui->coTiAct3, cg.readEntry("CommandActiveTitlebar3", "Operations menu").toLatin1()); | ||
398 | setComboText(m_ui->coTiAct4, cg.readEntry("CommandTitlebarWheel", "Switch to Window Tab to the Left/Right").toLatin1()); | 394 | setComboText(m_ui->coTiAct4, cg.readEntry("CommandTitlebarWheel", "Nothing").toLatin1()); | ||
399 | setComboText(m_ui->coTiInAct1, cg.readEntry("CommandInactiveTitlebar1", "Activate and raise").toLatin1()); | 395 | setComboText(m_ui->coTiInAct1, cg.readEntry("CommandInactiveTitlebar1", "Activate and raise").toLatin1()); | ||
400 | setComboText(m_ui->coTiInAct2, cg.readEntry("CommandInactiveTitlebar2", "Start Window Tab Drag").toLatin1()); | 396 | setComboText(m_ui->coTiInAct2, cg.readEntry("CommandInactiveTitlebar2", "Nothing").toLatin1()); | ||
401 | setComboText(m_ui->coTiInAct3, cg.readEntry("CommandInactiveTitlebar3", "Operations menu").toLatin1()); | 397 | setComboText(m_ui->coTiInAct3, cg.readEntry("CommandInactiveTitlebar3", "Operations menu").toLatin1()); | ||
402 | } | 398 | } | ||
403 | 399 | | |||
404 | void KTitleBarActionsConfig::save() | 400 | void KTitleBarActionsConfig::save() | ||
405 | { | 401 | { | ||
406 | KConfigGroup windowsConfig(config, "Windows"); | 402 | KConfigGroup windowsConfig(config, "Windows"); | ||
407 | windowsConfig.writeEntry("TitlebarDoubleClickCommand", functionTiDbl(m_ui->coTiDbl->currentIndex())); | 403 | windowsConfig.writeEntry("TitlebarDoubleClickCommand", functionTiDbl(m_ui->coTiDbl->currentIndex())); | ||
408 | windowsConfig.writeEntry(cnf_Max[0], functionMax(m_ui->leftClickMaximizeButton->currentIndex())); | 404 | windowsConfig.writeEntry(cnf_Max[0], functionMax(m_ui->leftClickMaximizeButton->currentIndex())); | ||
Show All 18 Lines | |||||
427 | 423 | | |||
428 | } | 424 | } | ||
429 | } | 425 | } | ||
430 | 426 | | |||
431 | void KTitleBarActionsConfig::defaults() | 427 | void KTitleBarActionsConfig::defaults() | ||
432 | { | 428 | { | ||
433 | setComboText(m_ui->coTiDbl, "Maximize"); | 429 | setComboText(m_ui->coTiDbl, "Maximize"); | ||
434 | setComboText(m_ui->coTiAct1, "Raise"); | 430 | setComboText(m_ui->coTiAct1, "Raise"); | ||
435 | setComboText(m_ui->coTiAct2, "Start Window Tab Drag"); | 431 | setComboText(m_ui->coTiAct2, "Nothing"); | ||
436 | setComboText(m_ui->coTiAct3, "Operations menu"); | 432 | setComboText(m_ui->coTiAct3, "Operations menu"); | ||
437 | setComboText(m_ui->coTiAct4, "Switch to Window Tab to the Left/Right"); | 433 | setComboText(m_ui->coTiAct4, "Nothing"); | ||
438 | setComboText(m_ui->coTiInAct1, "Activate and raise"); | 434 | setComboText(m_ui->coTiInAct1, "Activate and raise"); | ||
439 | setComboText(m_ui->coTiInAct2, "Start Window Tab Drag"); | 435 | setComboText(m_ui->coTiInAct2, "Nothing"); | ||
440 | setComboText(m_ui->coTiInAct3, "Operations menu"); | 436 | setComboText(m_ui->coTiInAct3, "Operations menu"); | ||
441 | setComboText(m_ui->leftClickMaximizeButton, tbl_Max[0]); | 437 | setComboText(m_ui->leftClickMaximizeButton, tbl_Max[0]); | ||
442 | setComboText(m_ui->middleClickMaximizeButton, tbl_Max[1]); | 438 | setComboText(m_ui->middleClickMaximizeButton, tbl_Max[1]); | ||
443 | setComboText(m_ui->rightClickMaximizeButton, tbl_Max[2]); | 439 | setComboText(m_ui->rightClickMaximizeButton, tbl_Max[2]); | ||
444 | } | 440 | } | ||
445 | 441 | | |||
446 | 442 | | |||
447 | KWindowActionsConfig::KWindowActionsConfig(bool _standAlone, KConfig *_config, QWidget * parent) | 443 | KWindowActionsConfig::KWindowActionsConfig(bool _standAlone, KConfig *_config, QWidget * parent) | ||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |