Changeset 42760 in vbox for trunk/src/VBox
- Timestamp:
- Aug 10, 2012 4:53:11 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r42755 r42760 247 247 { 248 248 setText(QApplication::translate("UIActionPool", "Show &Log...")); 249 setStatusTip(QApplication::translate("UIActionPool", "Show the log files of the selected virtual machine "));249 setStatusTip(QApplication::translate("UIActionPool", "Show the log files of the selected virtual machines")); 250 250 } 251 251 }; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r42755 r42760 179 179 }; 180 180 181 class UIActionSimpleGroupNewWizard : public UIActionSimple 182 { 183 Q_OBJECT; 184 185 public: 186 187 UIActionSimpleGroupNewWizard(QObject *pParent) 181 class UIActionSimpleGroupRename : public UIActionSimple 182 { 183 Q_OBJECT; 184 185 public: 186 187 UIActionSimpleGroupRename(QObject *pParent) 188 : UIActionSimple(pParent, ":/name_16px.png") 189 { 190 retranslateUi(); 191 } 192 193 protected: 194 195 void retranslateUi() 196 { 197 setText(QApplication::translate("UIActionPool", "Rena&me Group...")); 198 setStatusTip(QApplication::translate("UIActionPool", "Rename the selected virtual machine group")); 199 setShortcut(gSS->keySequence(UISelectorShortcuts::RenameVMGroupShortcut)); 200 } 201 }; 202 203 class UIActionSimpleGroupRemove : public UIActionSimple 204 { 205 Q_OBJECT; 206 207 public: 208 209 UIActionSimpleGroupRemove(QObject *pParent) 210 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 211 ":/vm_delete_32px.png", ":/delete_16px.png", 212 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 213 { 214 retranslateUi(); 215 } 216 217 protected: 218 219 void retranslateUi() 220 { 221 setText(QApplication::translate("UIActionPool", "&Break Group...")); 222 setStatusTip(QApplication::translate("UIActionPool", "Break the selected virtual machine group")); 223 setShortcut(gSS->keySequence(UISelectorShortcuts::BreakVMGroupShortcut)); 224 } 225 }; 226 227 class UIActionSimpleGroupSort : public UIActionSimple 228 { 229 Q_OBJECT; 230 231 public: 232 233 UIActionSimpleGroupSort(QObject *pParent) 234 : UIActionSimple(pParent/*, ":/settings_16px.png", ":/settings_dis_16px.png"*/) 235 { 236 retranslateUi(); 237 } 238 239 protected: 240 241 void retranslateUi() 242 { 243 setText(QApplication::translate("UIActionPool", "Sort Group")); 244 setStatusTip(QApplication::translate("UIActionPool", "Sort the items of the selected virtual machine group alphabetically")); 245 setShortcut(gSS->keySequence(UISelectorShortcuts::SortGroup)); 246 } 247 }; 248 249 250 class UIActionMenuMachine : public UIActionMenu 251 { 252 Q_OBJECT; 253 254 public: 255 256 UIActionMenuMachine(QObject *pParent) 257 : UIActionMenu(pParent) 258 { 259 retranslateUi(); 260 } 261 262 protected: 263 264 void retranslateUi() 265 { 266 menu()->setTitle(QApplication::translate("UIActionPool", "&Machine")); 267 } 268 }; 269 270 class UIActionSimpleMachineAddGroup : public UIActionSimple 271 { 272 Q_OBJECT; 273 274 public: 275 276 UIActionSimpleMachineAddGroup(QObject *pParent) 277 : UIActionSimple(pParent, ":/add_shared_folder_16px.png") 278 { 279 retranslateUi(); 280 } 281 282 protected: 283 284 void retranslateUi() 285 { 286 setText(QApplication::translate("UIActionPool", "&Add Group...")); 287 setStatusTip(QApplication::translate("UIActionPool", "Add a new group based on the items selected")); 288 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMGroupShortcut)); 289 } 290 }; 291 292 class UIActionSimpleMachineSettings : public UIActionSimple 293 { 294 Q_OBJECT; 295 296 public: 297 298 UIActionSimpleMachineSettings(QObject *pParent) 299 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 300 ":/vm_settings_32px.png", ":/settings_16px.png", 301 ":/vm_settings_disabled_32px.png", ":/settings_dis_16px.png") 302 { 303 retranslateUi(); 304 } 305 306 protected: 307 308 void retranslateUi() 309 { 310 setText(QApplication::translate("UIActionPool", "&Settings...")); 311 setStatusTip(QApplication::translate("UIActionPool", "Manage the virtual machine settings")); 312 setShortcut(gSS->keySequence(UISelectorShortcuts::SettingsVMShortcut)); 313 setToolTip(text().remove('&').remove('.') + 314 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 315 } 316 }; 317 318 class UIActionSimpleMachineClone : public UIActionSimple 319 { 320 Q_OBJECT; 321 322 public: 323 324 UIActionSimpleMachineClone(QObject *pParent) 325 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") 326 { 327 retranslateUi(); 328 } 329 330 protected: 331 332 void retranslateUi() 333 { 334 setText(QApplication::translate("UIActionPool", "Cl&one...")); 335 setStatusTip(QApplication::translate("UIActionPool", "Clone the selected virtual machine")); 336 setShortcut(gSS->keySequence(UISelectorShortcuts::CloneVMShortcut)); 337 } 338 }; 339 340 class UIActionSimpleMachineRemove : public UIActionSimple 341 { 342 Q_OBJECT; 343 344 public: 345 346 UIActionSimpleMachineRemove(QObject *pParent) 347 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 348 ":/vm_delete_32px.png", ":/delete_16px.png", 349 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 350 { 351 retranslateUi(); 352 } 353 354 protected: 355 356 void retranslateUi() 357 { 358 setText(QApplication::translate("UIActionPool", "&Remove...")); 359 setStatusTip(QApplication::translate("UIActionPool", "Remove the selected virtual machines")); 360 setShortcut(gSS->keySequence(UISelectorShortcuts::RemoveVMShortcut)); 361 } 362 }; 363 364 365 class UIActionSimpleCommonNew : public UIActionSimple 366 { 367 Q_OBJECT; 368 369 public: 370 371 UIActionSimpleCommonNew(QObject *pParent) 188 372 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), ":/vm_new_32px.png", ":/new_16px.png") 189 373 { … … 195 379 void retranslateUi() 196 380 { 197 setText(QApplication::translate("UIActionPool", "&New Machine..."));381 setText(QApplication::translate("UIActionPool", "&New...")); 198 382 setStatusTip(QApplication::translate("UIActionPool", "Create a new virtual machine")); 199 383 setShortcut(gSS->keySequence(UISelectorShortcuts::NewVMShortcut)); … … 203 387 }; 204 388 205 class UIActionSimple GroupAddDialog: public UIActionSimple206 { 207 Q_OBJECT; 208 209 public: 210 211 UIActionSimple GroupAddDialog(QObject *pParent)389 class UIActionSimpleCommonAdd : public UIActionSimple 390 { 391 Q_OBJECT; 392 393 public: 394 395 UIActionSimpleCommonAdd(QObject *pParent) 212 396 : UIActionSimple(pParent, ":/vm_add_16px.png") 213 397 { … … 219 403 void retranslateUi() 220 404 { 221 setText(QApplication::translate("UIActionPool", "&Add Machine..."));405 setText(QApplication::translate("UIActionPool", "&Add...")); 222 406 setStatusTip(QApplication::translate("UIActionPool", "Add an existing virtual machine")); 223 407 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMShortcut)); … … 225 409 }; 226 410 227 class UIActionSimpleGroupRenameDialog : public UIActionSimple 228 { 229 Q_OBJECT; 230 231 public: 232 233 UIActionSimpleGroupRenameDialog(QObject *pParent) 234 : UIActionSimple(pParent, ":/name_16px.png") 235 { 236 retranslateUi(); 237 } 238 239 protected: 240 241 void retranslateUi() 242 { 243 setText(QApplication::translate("UIActionPool", "Rena&me Group...")); 244 setStatusTip(QApplication::translate("UIActionPool", "Rename the selected virtual machine group")); 245 setShortcut(gSS->keySequence(UISelectorShortcuts::RenameVMGroupShortcut)); 246 } 247 }; 248 249 class UIActionSimpleGroupRemoveDialog : public UIActionSimple 250 { 251 Q_OBJECT; 252 253 public: 254 255 UIActionSimpleGroupRemoveDialog(QObject *pParent) 256 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 257 ":/vm_delete_32px.png", ":/delete_16px.png", 258 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 259 { 260 retranslateUi(); 261 } 262 263 protected: 264 265 void retranslateUi() 266 { 267 setText(QApplication::translate("UIActionPool", "&Break Group...")); 268 setStatusTip(QApplication::translate("UIActionPool", "Break the selected virtual machine group")); 269 setShortcut(gSS->keySequence(UISelectorShortcuts::BreakVMGroupShortcut)); 270 } 271 }; 272 273 class UIActionStateGroupStartOrShow : public UIActionState 274 { 275 Q_OBJECT; 276 277 public: 278 279 UIActionStateGroupStartOrShow(QObject *pParent) 411 class UIActionStateCommonStartOrShow : public UIActionState 412 { 413 Q_OBJECT; 414 415 public: 416 417 UIActionStateCommonStartOrShow(QObject *pParent) 280 418 : UIActionState(pParent, QSize(32, 32), QSize(16, 16), 281 282 419 ":/vm_start_32px.png", ":/start_16px.png", 420 ":/vm_start_disabled_32px.png", ":/start_dis_16px.png") 283 421 { 284 422 retranslateUi(); … … 294 432 { 295 433 setText(QApplication::translate("UIActionPool", "S&tart")); 296 setStatusTip(QApplication::translate("UIActionPool", "Start the selected virtual machine "));434 setStatusTip(QApplication::translate("UIActionPool", "Start the selected virtual machines")); 297 435 setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 298 436 setToolTip(text().remove('&').remove('.') + … … 303 441 { 304 442 setText(QApplication::translate("UIActionPool", "S&how")); 305 setStatusTip(QApplication::translate("UIActionPool", "Switch to the window of the selected virtual machine"));443 setStatusTip(QApplication::translate("UIActionPool", "Switch to the windows of the selected virtual machines")); 306 444 setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 307 445 setToolTip(text().remove('&').remove('.') + … … 315 453 }; 316 454 317 class UIActionToggle GroupPauseAndResume : public UIActionToggle318 { 319 Q_OBJECT; 320 321 public: 322 323 UIActionToggle GroupPauseAndResume(QObject *pParent)455 class UIActionToggleCommonPauseAndResume : public UIActionToggle 456 { 457 Q_OBJECT; 458 459 public: 460 461 UIActionToggleCommonPauseAndResume(QObject *pParent) 324 462 : UIActionToggle(pParent, QSize(32, 32), QSize(16, 16), 325 463 ":/vm_pause_32px.png", ":/pause_16px.png", … … 334 472 { 335 473 setText(QApplication::translate("UIActionPool", "&Pause")); 336 setStatusTip(QApplication::translate("UIActionPool", "Suspend the execution of the virtual machine"));474 setStatusTip(QApplication::translate("UIActionPool", "Suspend the execution of the selected virtual machines")); 337 475 setShortcut(gSS->keySequence(UISelectorShortcuts::PauseVMShortcut)); 338 476 } 339 477 }; 340 478 341 class UIActionSimple GroupReset : public UIActionSimple342 { 343 Q_OBJECT; 344 345 public: 346 347 UIActionSimple GroupReset(QObject *pParent)479 class UIActionSimpleCommonReset : public UIActionSimple 480 { 481 Q_OBJECT; 482 483 public: 484 485 UIActionSimpleCommonReset(QObject *pParent) 348 486 : UIActionSimple(pParent, ":/reset_16px.png", ":/reset_disabled_16px.png") 349 487 { … … 356 494 { 357 495 setText(QApplication::translate("UIActionPool", "&Reset")); 358 setStatusTip(QApplication::translate("UIActionPool", "Reset the virtual machine"));496 setStatusTip(QApplication::translate("UIActionPool", "Reset the selected virtual machines")); 359 497 setShortcut(gSS->keySequence(UISelectorShortcuts::ResetVMShortcut)); 360 498 } 361 499 }; 362 500 363 class UIActionSimpleGroupRefresh : public UIActionSimple 364 { 365 Q_OBJECT; 366 367 public: 368 369 UIActionSimpleGroupRefresh(QObject *pParent) 501 class UIActionSimpleCommonDiscard : public UIActionSimple 502 { 503 Q_OBJECT; 504 505 public: 506 507 UIActionSimpleCommonDiscard(QObject *pParent) 508 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 509 ":/vm_discard_32px.png", ":/discard_16px.png", 510 ":/vm_discard_disabled_32px.png", ":/discard_dis_16px.png") 511 { 512 retranslateUi(); 513 } 514 515 protected: 516 517 void retranslateUi() 518 { 519 setIconText(QApplication::translate("UIActionPool", "Discard")); 520 setText(QApplication::translate("UIActionPool", "D&iscard saved state...")); 521 setStatusTip(QApplication::translate("UIActionPool", "Discard the saved state of the selected virtual machines")); 522 setShortcut(gSS->keySequence(UISelectorShortcuts::DiscardVMShortcut)); 523 setToolTip(text().remove('&').remove('.') + 524 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 525 } 526 }; 527 528 class UIActionSimpleCommonRefresh : public UIActionSimple 529 { 530 Q_OBJECT; 531 532 public: 533 534 UIActionSimpleCommonRefresh(QObject *pParent) 370 535 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 371 536 ":/refresh_32px.png", ":/refresh_16px.png", … … 385 550 }; 386 551 387 class UIActionSimple GroupShowInFileManager : public UIActionSimple388 { 389 Q_OBJECT; 390 391 public: 392 393 UIActionSimple GroupShowInFileManager(QObject *pParent)552 class UIActionSimpleCommonShowInFileManager : public UIActionSimple 553 { 554 Q_OBJECT; 555 556 public: 557 558 UIActionSimpleCommonShowInFileManager(QObject *pParent) 394 559 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 395 560 { … … 403 568 #if defined(Q_WS_MAC) 404 569 setText(QApplication::translate("UIActionPool", "Show in Finder")); 405 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Finder ."));570 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Finder")); 406 571 #elif defined(Q_WS_WIN) 407 572 setText(QApplication::translate("UIActionPool", "Show in Explorer")); 408 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Explorer ."));573 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Explorer")); 409 574 #else 410 575 setText(QApplication::translate("UIActionPool", "Show in File Manager")); … … 415 580 }; 416 581 417 class UIActionSimple GroupCreateShortcut : public UIActionSimple418 { 419 Q_OBJECT; 420 421 public: 422 423 UIActionSimple GroupCreateShortcut(QObject *pParent)582 class UIActionSimpleCommonCreateShortcut : public UIActionSimple 583 { 584 Q_OBJECT; 585 586 public: 587 588 UIActionSimpleCommonCreateShortcut(QObject *pParent) 424 589 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 425 590 { … … 433 598 #if defined(Q_WS_MAC) 434 599 setText(QApplication::translate("UIActionPool", "Create Alias on Desktop")); 435 setStatusTip(QApplication::translate("UIActionPool", "Creates an alias file to the VirtualBox Machine Definition file on your desktop ."));600 setStatusTip(QApplication::translate("UIActionPool", "Creates an alias file to the VirtualBox Machine Definition file on your desktop")); 436 601 #else 437 602 setText(QApplication::translate("UIActionPool", "Create Shortcut on Desktop")); 438 setStatusTip(QApplication::translate("UIActionPool", "Creates an shortcut file to the VirtualBox Machine Definition file on your desktop.")); 439 #endif 440 setShortcut(gSS->keySequence(UISelectorShortcuts::CreateVMAliasShortcut)); 441 } 442 }; 443 444 class UIActionSimpleGroupSort : public UIActionSimple 445 { 446 Q_OBJECT; 447 448 public: 449 450 UIActionSimpleGroupSort(QObject *pParent) 451 : UIActionSimple(pParent/*, ":/settings_16px.png", ":/settings_dis_16px.png"*/) 452 { 453 retranslateUi(); 454 } 455 456 protected: 457 458 void retranslateUi() 459 { 460 setText(QApplication::translate("UIActionPool", "Sort Group")); 461 setStatusTip(QApplication::translate("UIActionPool", "Sort the items of the selected group alphabetically")); 462 setShortcut(gSS->keySequence(UISelectorShortcuts::SortGroup)); 463 } 464 }; 465 466 467 class UIActionMenuMachine : public UIActionMenu 468 { 469 Q_OBJECT; 470 471 public: 472 473 UIActionMenuMachine(QObject *pParent) 474 : UIActionMenu(pParent) 475 { 476 retranslateUi(); 477 } 478 479 protected: 480 481 void retranslateUi() 482 { 483 menu()->setTitle(QApplication::translate("UIActionPool", "&Machine")); 484 } 485 }; 486 487 class UIActionSimpleMachineNewWizard : public UIActionSimple 488 { 489 Q_OBJECT; 490 491 public: 492 493 UIActionSimpleMachineNewWizard(QObject *pParent) 494 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), ":/vm_new_32px.png", ":/new_16px.png") 495 { 496 retranslateUi(); 497 } 498 499 protected: 500 501 void retranslateUi() 502 { 503 setText(QApplication::translate("UIActionPool", "&New...")); 504 setStatusTip(QApplication::translate("UIActionPool", "Create a new virtual machine")); 505 setShortcut(gSS->keySequence(UISelectorShortcuts::NewVMShortcut)); 506 setToolTip(text().remove('&').remove('.') + 507 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 508 } 509 }; 510 511 class UIActionSimpleMachineAddDialog : public UIActionSimple 512 { 513 Q_OBJECT; 514 515 public: 516 517 UIActionSimpleMachineAddDialog(QObject *pParent) 518 : UIActionSimple(pParent, ":/vm_add_16px.png") 519 { 520 retranslateUi(); 521 } 522 523 protected: 524 525 void retranslateUi() 526 { 527 setText(QApplication::translate("UIActionPool", "&Add...")); 528 setStatusTip(QApplication::translate("UIActionPool", "Add an existing virtual machine")); 529 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMShortcut)); 530 } 531 }; 532 533 class UIActionSimpleMachineAddGroupDialog : public UIActionSimple 534 { 535 Q_OBJECT; 536 537 public: 538 539 UIActionSimpleMachineAddGroupDialog(QObject *pParent) 540 : UIActionSimple(pParent, ":/add_shared_folder_16px.png") 541 { 542 retranslateUi(); 543 } 544 545 protected: 546 547 void retranslateUi() 548 { 549 setText(QApplication::translate("UIActionPool", "&Add Group...")); 550 setStatusTip(QApplication::translate("UIActionPool", "Add a new group based on the items selected")); 551 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMGroupShortcut)); 552 } 553 }; 554 555 class UIActionSimpleMachineSettingsDialog : public UIActionSimple 556 { 557 Q_OBJECT; 558 559 public: 560 561 UIActionSimpleMachineSettingsDialog(QObject *pParent) 562 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 563 ":/vm_settings_32px.png", ":/settings_16px.png", 564 ":/vm_settings_disabled_32px.png", ":/settings_dis_16px.png") 565 { 566 retranslateUi(); 567 } 568 569 protected: 570 571 void retranslateUi() 572 { 573 setText(QApplication::translate("UIActionPool", "&Settings...")); 574 setStatusTip(QApplication::translate("UIActionPool", "Manage the virtual machine settings")); 575 setShortcut(gSS->keySequence(UISelectorShortcuts::SettingsVMShortcut)); 576 setToolTip(text().remove('&').remove('.') + 577 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 578 } 579 }; 580 581 class UIActionSimpleMachineCloneWizard : public UIActionSimple 582 { 583 Q_OBJECT; 584 585 public: 586 587 UIActionSimpleMachineCloneWizard(QObject *pParent) 588 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") 589 { 590 retranslateUi(); 591 } 592 593 protected: 594 595 void retranslateUi() 596 { 597 setText(QApplication::translate("UIActionPool", "Cl&one...")); 598 setStatusTip(QApplication::translate("UIActionPool", "Clone the selected virtual machine")); 599 setShortcut(gSS->keySequence(UISelectorShortcuts::CloneVMShortcut)); 600 } 601 }; 602 603 class UIActionSimpleMachineRemoveDialog : public UIActionSimple 604 { 605 Q_OBJECT; 606 607 public: 608 609 UIActionSimpleMachineRemoveDialog(QObject *pParent) 610 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 611 ":/vm_delete_32px.png", ":/delete_16px.png", 612 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 613 { 614 retranslateUi(); 615 } 616 617 protected: 618 619 void retranslateUi() 620 { 621 setText(QApplication::translate("UIActionPool", "&Remove...")); 622 setStatusTip(QApplication::translate("UIActionPool", "Remove the selected virtual machine")); 623 setShortcut(gSS->keySequence(UISelectorShortcuts::RemoveVMShortcut)); 624 } 625 }; 626 627 class UIActionStateMachineStartOrShow : public UIActionState 628 { 629 Q_OBJECT; 630 631 public: 632 633 UIActionStateMachineStartOrShow(QObject *pParent) 634 : UIActionState(pParent, QSize(32, 32), QSize(16, 16), 635 ":/vm_start_32px.png", ":/start_16px.png", 636 ":/vm_start_disabled_32px.png", ":/start_dis_16px.png") 637 { 638 retranslateUi(); 639 } 640 641 protected: 642 643 void retranslateUi() 644 { 645 switch (m_iState) 646 { 647 case 1: 648 { 649 setText(QApplication::translate("UIActionPool", "S&tart")); 650 setStatusTip(QApplication::translate("UIActionPool", "Start the selected virtual machine")); 651 setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 652 setToolTip(text().remove('&').remove('.') + 653 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 654 break; 655 } 656 case 2: 657 { 658 setText(QApplication::translate("UIActionPool", "S&how")); 659 setStatusTip(QApplication::translate("UIActionPool", "Switch to the window of the selected virtual machine")); 660 setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 661 setToolTip(text().remove('&').remove('.') + 662 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 663 break; 664 } 665 default: 666 break; 667 } 668 } 669 }; 670 671 class UIActionSimpleMachineDiscard : public UIActionSimple 672 { 673 Q_OBJECT; 674 675 public: 676 677 UIActionSimpleMachineDiscard(QObject *pParent) 678 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 679 ":/vm_discard_32px.png", ":/discard_16px.png", 680 ":/vm_discard_disabled_32px.png", ":/discard_dis_16px.png") 681 { 682 retranslateUi(); 683 } 684 685 protected: 686 687 void retranslateUi() 688 { 689 setIconText(QApplication::translate("UIActionPool", "Discard")); 690 setText(QApplication::translate("UIActionPool", "D&iscard saved state...")); 691 setStatusTip(QApplication::translate("UIActionPool", "Discard the saved state of the selected virtual machine")); 692 setShortcut(gSS->keySequence(UISelectorShortcuts::DiscardVMShortcut)); 693 setToolTip(text().remove('&').remove('.') + 694 (shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(shortcut().toString()))); 695 } 696 }; 697 698 class UIActionToggleMachinePauseAndResume : public UIActionToggle 699 { 700 Q_OBJECT; 701 702 public: 703 704 UIActionToggleMachinePauseAndResume(QObject *pParent) 705 : UIActionToggle(pParent, QSize(32, 32), QSize(16, 16), 706 ":/vm_pause_32px.png", ":/pause_16px.png", 707 ":/vm_pause_disabled_32px.png", ":/pause_disabled_16px.png") 708 { 709 retranslateUi(); 710 } 711 712 protected: 713 714 void retranslateUi() 715 { 716 setText(QApplication::translate("UIActionPool", "&Pause")); 717 setStatusTip(QApplication::translate("UIActionPool", "Suspend the execution of the virtual machine")); 718 setShortcut(gSS->keySequence(UISelectorShortcuts::PauseVMShortcut)); 719 } 720 }; 721 722 class UIActionSimpleMachineReset : public UIActionSimple 723 { 724 Q_OBJECT; 725 726 public: 727 728 UIActionSimpleMachineReset(QObject *pParent) 729 : UIActionSimple(pParent, ":/reset_16px.png", ":/reset_disabled_16px.png") 730 { 731 retranslateUi(); 732 } 733 734 protected: 735 736 void retranslateUi() 737 { 738 setText(QApplication::translate("UIActionPool", "&Reset")); 739 setStatusTip(QApplication::translate("UIActionPool", "Reset the virtual machine")); 740 setShortcut(gSS->keySequence(UISelectorShortcuts::ResetVMShortcut)); 741 } 742 }; 743 744 class UIActionSimpleMachineRefresh : public UIActionSimple 745 { 746 Q_OBJECT; 747 748 public: 749 750 UIActionSimpleMachineRefresh(QObject *pParent) 751 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 752 ":/refresh_32px.png", ":/refresh_16px.png", 753 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") 754 { 755 retranslateUi(); 756 } 757 758 protected: 759 760 void retranslateUi() 761 { 762 setText(QApplication::translate("UIActionPool", "Re&fresh...")); 763 setStatusTip(QApplication::translate("UIActionPool", "Refresh the accessibility state of the selected virtual machine")); 764 setShortcut(gSS->keySequence(UISelectorShortcuts::RefreshVMShortcut)); 765 } 766 }; 767 768 class UIActionSimpleMachineShowInFileManager : public UIActionSimple 769 { 770 Q_OBJECT; 771 772 public: 773 774 UIActionSimpleMachineShowInFileManager(QObject *pParent) 775 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 776 { 777 retranslateUi(); 778 } 779 780 protected: 781 782 void retranslateUi() 783 { 784 #if defined(Q_WS_MAC) 785 setText(QApplication::translate("UIActionPool", "Show in Finder")); 786 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Finder.")); 787 #elif defined(Q_WS_WIN) 788 setText(QApplication::translate("UIActionPool", "Show in Explorer")); 789 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Explorer.")); 790 #else 791 setText(QApplication::translate("UIActionPool", "Show in File Manager")); 792 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in the File Manager")); 793 #endif 794 setShortcut(gSS->keySequence(UISelectorShortcuts::ShowVMInFileManagerShortcut)); 795 } 796 }; 797 798 class UIActionSimpleMachineCreateShortcut : public UIActionSimple 799 { 800 Q_OBJECT; 801 802 public: 803 804 UIActionSimpleMachineCreateShortcut(QObject *pParent) 805 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 806 { 807 retranslateUi(); 808 } 809 810 protected: 811 812 void retranslateUi() 813 { 814 #if defined(Q_WS_MAC) 815 setText(QApplication::translate("UIActionPool", "Create Alias on Desktop")); 816 setStatusTip(QApplication::translate("UIActionPool", "Creates an alias file to the VirtualBox Machine Definition file on your desktop.")); 817 #else 818 setText(QApplication::translate("UIActionPool", "Create Shortcut on Desktop")); 819 setStatusTip(QApplication::translate("UIActionPool", "Creates an shortcut file to the VirtualBox Machine Definition file on your desktop.")); 603 setStatusTip(QApplication::translate("UIActionPool", "Creates an shortcut file to the VirtualBox Machine Definition file on your desktop")); 820 604 #endif 821 605 setShortcut(gSS->keySequence(UISelectorShortcuts::CreateVMAliasShortcut)); … … 863 647 { 864 648 menu()->setTitle(QApplication::translate("UIActionPool", "&Close")); 865 menu()->setStatusTip(QApplication::translate("UIActionPool", "Close the virtual machine"));866 649 } 867 650 }; … … 884 667 { 885 668 setText(QApplication::translate("UIActionPool", "Save State")); 886 setStatusTip(QApplication::translate("UIActionPool", "Save the machine state of the selected virtual machine "));669 setStatusTip(QApplication::translate("UIActionPool", "Save the machine state of the selected virtual machines")); 887 670 setShortcut(gSS->keySequence(UISelectorShortcuts::SaveVMShortcut)); 888 671 } … … 906 689 { 907 690 setText(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); 908 setStatusTip(QApplication::translate("UIActionPool", "Send the ACPI Power Button press event to the virtual machine"));691 setStatusTip(QApplication::translate("UIActionPool", "Send the ACPI Power Button press event to the selected virtual machines")); 909 692 setShortcut(gSS->keySequence(UISelectorShortcuts::ACPIShutdownVMShortcut)); 910 693 } … … 928 711 { 929 712 setText(QApplication::translate("UIActionPool", "Po&wer Off")); 930 setStatusTip(QApplication::translate("UIActionPool", "Power off the virtual machine"));713 setStatusTip(QApplication::translate("UIActionPool", "Power off the selected virtual machines")); 931 714 setShortcut(gSS->keySequence(UISelectorShortcuts::PowerOffVMShortcut)); 932 715 } … … 973 756 974 757 /* 'Group' actions: */ 975 m_pool[UIActionIndexSelector_Simple_Group_NewWizard] = new UIActionSimpleGroupNewWizard(this); 976 m_pool[UIActionIndexSelector_Simple_Group_AddDialog] = new UIActionSimpleGroupAddDialog(this); 977 m_pool[UIActionIndexSelector_Simple_Group_RenameDialog] = new UIActionSimpleGroupRenameDialog(this); 978 m_pool[UIActionIndexSelector_Simple_Group_RemoveDialog] = new UIActionSimpleGroupRemoveDialog(this); 979 m_pool[UIActionIndexSelector_State_Group_StartOrShow] = new UIActionStateGroupStartOrShow(this); 980 m_pool[UIActionIndexSelector_Toggle_Group_PauseAndResume] = new UIActionToggleGroupPauseAndResume(this); 981 m_pool[UIActionIndexSelector_Simple_Group_Reset] = new UIActionSimpleGroupReset(this); 982 m_pool[UIActionIndexSelector_Simple_Group_Refresh] = new UIActionSimpleGroupRefresh(this); 983 m_pool[UIActionIndexSelector_Simple_Group_ShowInFileManager] = new UIActionSimpleGroupShowInFileManager(this); 984 m_pool[UIActionIndexSelector_Simple_Group_CreateShortcut] = new UIActionSimpleGroupCreateShortcut(this); 758 m_pool[UIActionIndexSelector_Simple_Group_Rename] = new UIActionSimpleGroupRename(this); 759 m_pool[UIActionIndexSelector_Simple_Group_Remove] = new UIActionSimpleGroupRemove(this); 985 760 m_pool[UIActionIndexSelector_Simple_Group_Sort] = new UIActionSimpleGroupSort(this); 986 761 987 762 /* 'Machine' actions: */ 988 m_pool[UIActionIndexSelector_Simple_Machine_NewWizard] = new UIActionSimpleMachineNewWizard(this); 989 m_pool[UIActionIndexSelector_Simple_Machine_AddDialog] = new UIActionSimpleMachineAddDialog(this); 990 m_pool[UIActionIndexSelector_Simple_Machine_AddGroupDialog] = new UIActionSimpleMachineAddGroupDialog(this); 991 m_pool[UIActionIndexSelector_Simple_Machine_SettingsDialog] = new UIActionSimpleMachineSettingsDialog(this); 992 m_pool[UIActionIndexSelector_Simple_Machine_CloneWizard] = new UIActionSimpleMachineCloneWizard(this); 993 m_pool[UIActionIndexSelector_Simple_Machine_RemoveDialog] = new UIActionSimpleMachineRemoveDialog(this); 994 m_pool[UIActionIndexSelector_State_Machine_StartOrShow] = new UIActionStateMachineStartOrShow(this); 995 m_pool[UIActionIndexSelector_Simple_Machine_Discard] = new UIActionSimpleMachineDiscard(this); 996 m_pool[UIActionIndexSelector_Toggle_Machine_PauseAndResume] = new UIActionToggleMachinePauseAndResume(this); 997 m_pool[UIActionIndexSelector_Simple_Machine_Reset] = new UIActionSimpleMachineReset(this); 998 m_pool[UIActionIndexSelector_Simple_Machine_Refresh] = new UIActionSimpleMachineRefresh(this); 999 m_pool[UIActionIndexSelector_Simple_Machine_ShowInFileManager] = new UIActionSimpleMachineShowInFileManager(this); 1000 m_pool[UIActionIndexSelector_Simple_Machine_CreateShortcut] = new UIActionSimpleMachineCreateShortcut(this); 763 m_pool[UIActionIndexSelector_Simple_Machine_Settings] = new UIActionSimpleMachineSettings(this); 764 m_pool[UIActionIndexSelector_Simple_Machine_Clone] = new UIActionSimpleMachineClone(this); 765 m_pool[UIActionIndexSelector_Simple_Machine_Remove] = new UIActionSimpleMachineRemove(this); 766 m_pool[UIActionIndexSelector_Simple_Machine_AddGroup] = new UIActionSimpleMachineAddGroup(this); 1001 767 1002 768 /* Common actions: */ 769 m_pool[UIActionIndexSelector_Simple_Common_New] = new UIActionSimpleCommonNew(this); 770 m_pool[UIActionIndexSelector_Simple_Common_Add] = new UIActionSimpleCommonAdd(this); 771 m_pool[UIActionIndexSelector_State_Common_StartOrShow] = new UIActionStateCommonStartOrShow(this); 772 m_pool[UIActionIndexSelector_Toggle_Common_PauseAndResume] = new UIActionToggleCommonPauseAndResume(this); 773 m_pool[UIActionIndexSelector_Simple_Common_Reset] = new UIActionSimpleCommonReset(this); 774 m_pool[UIActionIndexSelector_Simple_Common_Discard] = new UIActionSimpleCommonDiscard(this); 775 m_pool[UIActionIndexSelector_Simple_Common_Refresh] = new UIActionSimpleCommonRefresh(this); 776 m_pool[UIActionIndexSelector_Simple_Common_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); 777 m_pool[UIActionIndexSelector_Simple_Common_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this); 1003 778 m_pool[UIActionIndexSelector_Simple_Common_SortParent] = new UIActionSimpleCommonSortParent(this); 1004 779 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r42751 r42760 36 36 /* 'Group' menu actions: */ 37 37 UIActionIndexSelector_Menu_Group, 38 UIActionIndexSelector_Simple_Group_NewWizard, 39 UIActionIndexSelector_Simple_Group_AddDialog, 40 UIActionIndexSelector_Simple_Group_RenameDialog, 41 UIActionIndexSelector_Simple_Group_RemoveDialog, 42 UIActionIndexSelector_State_Group_StartOrShow, 43 UIActionIndexSelector_Toggle_Group_PauseAndResume, 44 UIActionIndexSelector_Simple_Group_Reset, 45 UIActionIndexSelector_Simple_Group_Refresh, 46 UIActionIndexSelector_Simple_Group_ShowInFileManager, 47 UIActionIndexSelector_Simple_Group_CreateShortcut, 38 UIActionIndexSelector_Simple_Group_Rename, 39 UIActionIndexSelector_Simple_Group_Remove, 48 40 UIActionIndexSelector_Simple_Group_Sort, 49 41 50 42 /* 'Machine' menu actions: */ 51 43 UIActionIndexSelector_Menu_Machine, 52 UIActionIndexSelector_Simple_Machine_NewWizard, 53 UIActionIndexSelector_Simple_Machine_AddDialog, 54 UIActionIndexSelector_Simple_Machine_AddGroupDialog, 55 UIActionIndexSelector_Simple_Machine_SettingsDialog, 56 UIActionIndexSelector_Simple_Machine_CloneWizard, 57 UIActionIndexSelector_Simple_Machine_RemoveDialog, 58 UIActionIndexSelector_State_Machine_StartOrShow, 59 UIActionIndexSelector_Simple_Machine_Discard, 60 UIActionIndexSelector_Toggle_Machine_PauseAndResume, 61 UIActionIndexSelector_Simple_Machine_Reset, 62 UIActionIndexSelector_Simple_Machine_Refresh, 63 UIActionIndexSelector_Simple_Machine_ShowInFileManager, 64 UIActionIndexSelector_Simple_Machine_CreateShortcut, 44 UIActionIndexSelector_Simple_Machine_Settings, 45 UIActionIndexSelector_Simple_Machine_Clone, 46 UIActionIndexSelector_Simple_Machine_Remove, 47 UIActionIndexSelector_Simple_Machine_AddGroup, 65 48 66 /* Common menu action: */ 49 /* Common 'Group' / 'Machine' menu actions: */ 50 UIActionIndexSelector_Simple_Common_New, 51 UIActionIndexSelector_Simple_Common_Add, 52 UIActionIndexSelector_State_Common_StartOrShow, 53 UIActionIndexSelector_Toggle_Common_PauseAndResume, 54 UIActionIndexSelector_Simple_Common_Reset, 55 UIActionIndexSelector_Simple_Common_Discard, 56 UIActionIndexSelector_Simple_Common_Refresh, 57 UIActionIndexSelector_Simple_Common_ShowInFileManager, 58 UIActionIndexSelector_Simple_Common_CreateShortcut, 67 59 UIActionIndexSelector_Simple_Common_SortParent, 68 60 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r42756 r42760 371 371 { 372 372 /* Check that we do NOT handling that already: */ 373 if (m_pAction MachineSettingsDialog->data().toBool())373 if (m_pAction_Machine_Settings->data().toBool()) 374 374 return; 375 375 /* Remember that we handling that already: */ 376 m_pAction MachineSettingsDialog->setData(true);376 m_pAction_Machine_Settings->setData(true); 377 377 378 378 /* Process href from VM details / description: */ … … 407 407 408 408 /* Remember that we do NOT handling that already: */ 409 m_pAction MachineSettingsDialog->setData(false);409 m_pAction_Machine_Settings->setData(false); 410 410 } 411 411 … … 423 423 void UISelectorWindow::sltPerformStartOrShowAction() 424 424 { 425 /* Check if the action is enabled: */426 if (!m_pActionMachineStartOrShow->isEnabled())427 return;428 429 425 /* Get selected items: */ 430 426 QList<UIVMItem*> items = currentItems(); … … 435 431 { 436 432 /* Check if current item could be started/showed: */ 437 if (!isActionEnabled(UIActionIndexSelector_State_ Machine_StartOrShow, items))433 if (!isActionEnabled(UIActionIndexSelector_State_Common_StartOrShow, items)) 438 434 continue; 439 435 … … 488 484 489 485 /* Check if current item could be paused/resumed: */ 490 if (!isActionEnabled(UIActionIndexSelector_Toggle_ Machine_PauseAndResume, items))486 if (!isActionEnabled(UIActionIndexSelector_Toggle_Common_PauseAndResume, items)) 491 487 continue; 492 488 … … 547 543 548 544 /* Check if current item could be reseted: */ 549 if (!isActionEnabled(UIActionIndexSelector_Simple_ Machine_Reset, items))545 if (!isActionEnabled(UIActionIndexSelector_Simple_Common_Reset, items)) 550 546 continue; 551 547 … … 732 728 733 729 /* Check if that item could be shown in file-browser: */ 734 if (!isActionEnabled(UIActionIndexSelector_Simple_ Machine_ShowInFileManager, items))730 if (!isActionEnabled(UIActionIndexSelector_Simple_Common_ShowInFileManager, items)) 735 731 continue; 736 732 … … 753 749 754 750 /* Check if shortcuts could be created for this item: */ 755 if (!isActionEnabled(UIActionIndexSelector_Simple_ Machine_CreateShortcut, items))751 if (!isActionEnabled(UIActionIndexSelector_Simple_Common_CreateShortcut, items)) 756 752 continue; 757 753 … … 1066 1062 prepareMenuMachineClose(m_pMachineCloseMenu); 1067 1063 1064 /* Create actions for 'Group' and 'Machine' menus: */ 1065 prepareCommonActions(); 1066 prepareGroupActions(); 1067 prepareMachineActions(); 1068 1068 1069 /* Prepare Group-menu: */ 1069 1070 m_pGroupMenu = gActionPool->action(UIActionIndexSelector_Menu_Group)->menu(); … … 1114 1115 } 1115 1116 1117 void UISelectorWindow::prepareCommonActions() 1118 { 1119 m_pAction_Common_New = gActionPool->action(UIActionIndexSelector_Simple_Common_New); 1120 m_pAction_Common_Add = gActionPool->action(UIActionIndexSelector_Simple_Common_Add); 1121 m_pAction_Common_StartOrShow = gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow); 1122 m_pAction_Common_PauseAndResume = gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume); 1123 m_pAction_Common_Reset = gActionPool->action(UIActionIndexSelector_Simple_Common_Reset); 1124 m_pAction_Common_Discard = gActionPool->action(UIActionIndexSelector_Simple_Common_Discard); 1125 m_pAction_Common_LogDialog = gActionPool->action(UIActionIndex_Simple_LogDialog); 1126 m_pAction_Common_Refresh = gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh); 1127 m_pAction_Common_ShowInFileManager = gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager); 1128 m_pAction_Common_CreateShortcut = gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut); 1129 m_pAction_Common_SortParent = gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent); 1130 } 1131 1132 void UISelectorWindow::prepareGroupActions() 1133 { 1134 m_pAction_Group_Rename = gActionPool->action(UIActionIndexSelector_Simple_Group_Rename); 1135 m_pAction_Group_Remove = gActionPool->action(UIActionIndexSelector_Simple_Group_Remove); 1136 m_pAction_Group_Sort = gActionPool->action(UIActionIndexSelector_Simple_Group_Sort); 1137 } 1138 1139 void UISelectorWindow::prepareMachineActions() 1140 { 1141 m_pAction_Machine_Settings = gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings); 1142 m_pAction_Machine_Clone = gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone); 1143 m_pAction_Machine_Remove = gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove); 1144 m_pAction_Machine_AddGroup = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup); 1145 } 1146 1116 1147 void UISelectorWindow::prepareMenuGroup(QMenu *pMenu) 1117 1148 { … … 1121 1152 1122 1153 /* Populate Machine-menu: */ 1123 m_pActionGroupNewWizard = gActionPool->action(UIActionIndexSelector_Simple_Group_NewWizard); 1124 pMenu->addAction(m_pActionGroupNewWizard); 1125 m_pActionGroupAddDialog = gActionPool->action(UIActionIndexSelector_Simple_Group_AddDialog); 1126 pMenu->addAction(m_pActionGroupAddDialog); 1154 pMenu->addAction(m_pAction_Common_New); 1155 pMenu->addAction(m_pAction_Common_Add); 1127 1156 pMenu->addSeparator(); 1128 m_pActionGroupRenameDialog = gActionPool->action(UIActionIndexSelector_Simple_Group_RenameDialog); 1129 pMenu->addAction(m_pActionGroupRenameDialog); 1130 m_pActionGroupRemoveDialog = gActionPool->action(UIActionIndexSelector_Simple_Group_RemoveDialog); 1131 pMenu->addAction(m_pActionGroupRemoveDialog); 1157 pMenu->addAction(m_pAction_Group_Rename); 1158 pMenu->addAction(m_pAction_Group_Remove); 1132 1159 pMenu->addSeparator(); 1133 m_pActionGroupStartOrShow = gActionPool->action(UIActionIndexSelector_State_Group_StartOrShow); 1134 pMenu->addAction(m_pActionGroupStartOrShow); 1135 m_pActionGroupPauseAndResume = gActionPool->action(UIActionIndexSelector_Toggle_Group_PauseAndResume); 1136 pMenu->addAction(m_pActionGroupPauseAndResume); 1137 m_pActionGroupReset = gActionPool->action(UIActionIndexSelector_Simple_Group_Reset); 1138 pMenu->addAction(m_pActionGroupReset); 1160 pMenu->addAction(m_pAction_Common_StartOrShow); 1161 pMenu->addAction(m_pAction_Common_PauseAndResume); 1162 pMenu->addAction(m_pAction_Common_Reset); 1139 1163 pMenu->addMenu(m_pMachineCloseMenu); 1140 1164 pMenu->addSeparator(); 1141 m_pActionGroupRefresh = gActionPool->action(UIActionIndexSelector_Simple_Group_Refresh); 1142 pMenu->addAction(m_pActionGroupRefresh); 1143 m_pActionGroupLogDialog = gActionPool->action(UIActionIndex_Simple_LogDialog); 1144 pMenu->addAction(m_pActionGroupLogDialog); 1165 pMenu->addAction(m_pAction_Common_Discard); 1166 pMenu->addAction(m_pAction_Common_LogDialog); 1167 pMenu->addAction(m_pAction_Common_Refresh); 1145 1168 pMenu->addSeparator(); 1146 m_pActionGroupShowInFileManager = gActionPool->action(UIActionIndexSelector_Simple_Group_ShowInFileManager); 1147 pMenu->addAction(m_pActionGroupShowInFileManager); 1148 m_pActionGroupCreateShortcut = gActionPool->action(UIActionIndexSelector_Simple_Group_CreateShortcut); 1149 pMenu->addAction(m_pActionGroupCreateShortcut); 1169 pMenu->addAction(m_pAction_Common_ShowInFileManager); 1170 pMenu->addAction(m_pAction_Common_CreateShortcut); 1150 1171 pMenu->addSeparator(); 1151 m_pActionGroupSortParent = gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent); 1152 pMenu->addAction(m_pActionGroupSortParent); 1153 m_pActionGroupSort = gActionPool->action(UIActionIndexSelector_Simple_Group_Sort); 1154 pMenu->addAction(m_pActionGroupSort); 1172 pMenu->addAction(m_pAction_Common_SortParent); 1173 pMenu->addAction(m_pAction_Group_Sort); 1155 1174 1156 1175 /* Remember action list: */ 1157 m_groupActions << m_pActionGroupNewWizard << m_pActionGroupAddDialog 1158 << m_pActionGroupRenameDialog << m_pActionGroupRemoveDialog 1159 << m_pActionGroupStartOrShow << m_pActionGroupPauseAndResume 1160 << m_pActionGroupReset << m_pActionGroupRefresh 1161 << m_pActionGroupLogDialog << m_pActionGroupShowInFileManager 1162 << m_pActionGroupCreateShortcut << m_pActionGroupSort; 1176 m_groupActions << m_pAction_Group_Rename 1177 << m_pAction_Group_Remove 1178 << m_pAction_Group_Sort; 1163 1179 } 1164 1180 … … 1170 1186 1171 1187 /* Populate Machine-menu: */ 1172 m_pActionMachineNewWizard = gActionPool->action(UIActionIndexSelector_Simple_Machine_NewWizard); 1173 pMenu->addAction(m_pActionMachineNewWizard); 1174 m_pActionMachineAddDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddDialog); 1175 pMenu->addAction(m_pActionMachineAddDialog); 1176 m_pActionMachineSettingsDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_SettingsDialog); 1177 pMenu->addAction(m_pActionMachineSettingsDialog); 1178 m_pActionMachineCloneWizard = gActionPool->action(UIActionIndexSelector_Simple_Machine_CloneWizard); 1179 pMenu->addAction(m_pActionMachineCloneWizard); 1180 m_pActionMachineRemoveDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_RemoveDialog); 1181 pMenu->addAction(m_pActionMachineRemoveDialog); 1182 m_pActionMachineAddGroupDialog = gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroupDialog); 1183 pMenu->addAction(m_pActionMachineAddGroupDialog); 1188 pMenu->addAction(m_pAction_Common_New); 1189 pMenu->addAction(m_pAction_Common_Add); 1190 pMenu->addAction(m_pAction_Machine_Settings); 1191 pMenu->addAction(m_pAction_Machine_Clone); 1192 pMenu->addAction(m_pAction_Machine_Remove); 1193 pMenu->addAction(m_pAction_Machine_AddGroup); 1184 1194 pMenu->addSeparator(); 1185 m_pActionMachineStartOrShow = gActionPool->action(UIActionIndexSelector_State_Machine_StartOrShow); 1186 pMenu->addAction(m_pActionMachineStartOrShow); 1187 m_pActionMachinePauseAndResume = gActionPool->action(UIActionIndexSelector_Toggle_Machine_PauseAndResume); 1188 pMenu->addAction(m_pActionMachinePauseAndResume); 1189 m_pActionMachineReset = gActionPool->action(UIActionIndexSelector_Simple_Machine_Reset); 1190 pMenu->addAction(m_pActionMachineReset); 1195 pMenu->addAction(m_pAction_Common_StartOrShow); 1196 pMenu->addAction(m_pAction_Common_PauseAndResume); 1197 pMenu->addAction(m_pAction_Common_Reset); 1191 1198 pMenu->addMenu(m_pMachineCloseMenu); 1192 1199 pMenu->addSeparator(); 1193 m_pActionMachineDiscard = gActionPool->action(UIActionIndexSelector_Simple_Machine_Discard); 1194 pMenu->addAction(m_pActionMachineDiscard); 1195 m_pActionMachineRefresh = gActionPool->action(UIActionIndexSelector_Simple_Machine_Refresh); 1196 pMenu->addAction(m_pActionMachineRefresh); 1197 m_pActionMachineLogDialog = gActionPool->action(UIActionIndex_Simple_LogDialog); 1198 pMenu->addAction(m_pActionMachineLogDialog); 1200 pMenu->addAction(m_pAction_Common_Discard); 1201 pMenu->addAction(m_pAction_Common_LogDialog); 1202 pMenu->addAction(m_pAction_Common_Refresh); 1199 1203 pMenu->addSeparator(); 1200 m_pActionMachineShowInFileManager = gActionPool->action(UIActionIndexSelector_Simple_Machine_ShowInFileManager); 1201 pMenu->addAction(m_pActionMachineShowInFileManager); 1202 m_pActionMachineCreateShortcut = gActionPool->action(UIActionIndexSelector_Simple_Machine_CreateShortcut); 1203 pMenu->addAction(m_pActionMachineCreateShortcut); 1204 pMenu->addAction(m_pAction_Common_ShowInFileManager); 1205 pMenu->addAction(m_pAction_Common_CreateShortcut); 1204 1206 pMenu->addSeparator(); 1205 m_pActionMachineSortParent = gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent); 1206 pMenu->addAction(m_pActionMachineSortParent); 1207 pMenu->addAction(m_pAction_Common_SortParent); 1207 1208 1208 1209 /* Remember action list: */ 1209 m_machineActions << m_pActionMachineNewWizard << m_pActionMachineAddDialog 1210 << m_pActionMachineSettingsDialog << m_pActionMachineCloneWizard 1211 << m_pActionMachineAddGroupDialog 1212 << m_pActionMachineRemoveDialog << m_pActionMachineStartOrShow 1213 << m_pActionMachineDiscard << m_pActionMachinePauseAndResume 1214 << m_pActionMachineReset << m_pActionMachineRefresh 1215 << m_pActionMachineLogDialog << m_pActionMachineShowInFileManager 1216 << m_pActionMachineCreateShortcut; 1210 m_machineActions << m_pAction_Machine_Settings 1211 << m_pAction_Machine_Clone 1212 << m_pAction_Machine_Remove 1213 << m_pAction_Machine_AddGroup; 1217 1214 } 1218 1215 … … 1286 1283 mVMToolBar->setIconSize(QSize(32, 32)); 1287 1284 mVMToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 1288 mVMToolBar->addAction(m_pAction MachineNewWizard);1289 mVMToolBar->addAction(m_pAction MachineSettingsDialog);1290 mVMToolBar->addAction(m_pAction MachineStartOrShow);1291 mVMToolBar->addAction(m_pAction MachineDiscard);1285 mVMToolBar->addAction(m_pAction_Common_New); 1286 mVMToolBar->addAction(m_pAction_Machine_Settings); 1287 mVMToolBar->addAction(m_pAction_Common_StartOrShow); 1288 mVMToolBar->addAction(m_pAction_Common_Discard); 1292 1289 1293 1290 /* Prepare graphics VM list: */ … … 1299 1296 1300 1297 /* Prepare details and snapshots tabs: */ 1301 m_pVMDesktop = new UIVMDesktop(mVMToolBar, m_pAction MachineRefresh, this);1298 m_pVMDesktop = new UIVMDesktop(mVMToolBar, m_pAction_Common_Refresh, this); 1302 1299 1303 1300 /* Crate container: */ … … 1349 1346 connect(m_pExitAction, SIGNAL(triggered()), this, SLOT(sltPerformExit())); 1350 1347 1351 /* 'Group' menu connections: */ 1352 connect(m_pActionGroupAddDialog, SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1353 connect(m_pActionGroupStartOrShow, SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1354 connect(m_pActionGroupPauseAndResume, SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1355 connect(m_pActionGroupReset, SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1356 connect(m_pActionGroupRefresh, SIGNAL(triggered()), this, SLOT(sltPerformRefreshAction())); 1357 connect(m_pActionGroupLogDialog, SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1358 connect(m_pActionGroupShowInFileManager, SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1359 connect(m_pActionGroupCreateShortcut, SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1348 /* 'Group'/'Machine' menu common connections: */ 1349 connect(m_pAction_Common_Add, SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1350 connect(m_pAction_Common_StartOrShow, SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1351 connect(m_pAction_Common_PauseAndResume, SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1352 connect(m_pAction_Common_Reset, SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1353 connect(m_pAction_Common_Discard, SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1354 connect(m_pAction_Common_LogDialog, SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1355 connect(m_pAction_Common_Refresh, SIGNAL(triggered()), this, SLOT(sltPerformRefreshAction())); 1356 connect(m_pAction_Common_ShowInFileManager, SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1357 connect(m_pAction_Common_CreateShortcut, SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1360 1358 1361 1359 /* 'Machine' menu connections: */ 1362 connect(m_pActionMachineAddDialog, SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1363 connect(m_pActionMachineSettingsDialog, SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog())); 1364 connect(m_pActionMachineCloneWizard, SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard())); 1365 connect(m_pActionMachineStartOrShow, SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1366 connect(m_pActionMachineDiscard, SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1367 connect(m_pActionMachinePauseAndResume, SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1368 connect(m_pActionMachineReset, SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1369 connect(m_pActionMachineRefresh, SIGNAL(triggered()), this, SLOT(sltPerformRefreshAction())); 1370 connect(m_pActionMachineLogDialog, SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1371 connect(m_pActionMachineShowInFileManager, SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1372 connect(m_pActionMachineCreateShortcut, SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1360 connect(m_pAction_Machine_Settings, SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog())); 1361 connect(m_pAction_Machine_Clone, SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard())); 1373 1362 1374 1363 /* 'Machine/Close' menu connections: */ … … 1550 1539 QList<UIVMItem*> items = currentItems(); 1551 1540 1541 /* Enable/disable common actions: */ 1542 m_pAction_Common_StartOrShow->setEnabled(isActionEnabled(UIActionIndexSelector_State_Common_StartOrShow, items)); 1543 m_pAction_Common_PauseAndResume->setEnabled(isActionEnabled(UIActionIndexSelector_Toggle_Common_PauseAndResume, items)); 1544 m_pAction_Common_Reset->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Reset, items)); 1545 m_pAction_Common_Discard->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Discard, items)); 1546 m_pAction_Common_LogDialog->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1547 m_pAction_Common_Refresh->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Refresh, items)); 1548 m_pAction_Common_ShowInFileManager->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_ShowInFileManager, items)); 1549 m_pAction_Common_CreateShortcut->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_CreateShortcut, items)); 1550 m_pAction_Common_SortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_SortParent, items)); 1551 1552 1552 /* Enable/disable group actions: */ 1553 m_pActionGroupRenameDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_RenameDialog, items)); 1554 m_pActionGroupRemoveDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_RemoveDialog, items)); 1555 m_pActionGroupStartOrShow->setEnabled(isActionEnabled(UIActionIndexSelector_State_Group_StartOrShow, items)); 1556 m_pActionGroupPauseAndResume->setEnabled(isActionEnabled(UIActionIndexSelector_Toggle_Group_PauseAndResume, items)); 1557 m_pActionGroupReset->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Reset, items)); 1558 m_pActionGroupRefresh->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Refresh, items)); 1559 m_pActionGroupLogDialog->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1560 m_pActionGroupShowInFileManager->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_ShowInFileManager, items)); 1561 m_pActionGroupCreateShortcut->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_CreateShortcut, items)); 1562 m_pActionGroupSortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_SortParent, items)); 1563 m_pActionGroupSort->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Sort, items)); 1553 m_pAction_Group_Rename->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Rename, items)); 1554 m_pAction_Group_Remove->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Remove, items)); 1555 m_pAction_Group_Sort->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Sort, items)); 1564 1556 1565 1557 /* Enable/disable machine actions: */ 1566 m_pActionMachineSettingsDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_SettingsDialog, items)); 1567 m_pActionMachineCloneWizard->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_CloneWizard, items)); 1568 m_pActionMachineAddGroupDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_AddGroupDialog, items)); 1569 m_pActionMachineRemoveDialog->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_RemoveDialog, items)); 1570 m_pActionMachineStartOrShow->setEnabled(isActionEnabled(UIActionIndexSelector_State_Machine_StartOrShow, items)); 1571 m_pActionMachineDiscard->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Discard, items)); 1572 m_pActionMachinePauseAndResume->setEnabled(isActionEnabled(UIActionIndexSelector_Toggle_Machine_PauseAndResume, items)); 1573 m_pActionMachineReset->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Reset, items)); 1574 m_pActionMachineRefresh->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Refresh, items)); 1575 m_pActionMachineLogDialog->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1576 m_pActionMachineShowInFileManager->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_ShowInFileManager, items)); 1577 m_pActionMachineCreateShortcut->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_CreateShortcut, items)); 1578 m_pActionMachineSortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_SortParent, items)); 1558 m_pAction_Machine_Settings->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Settings, items)); 1559 m_pAction_Machine_Clone->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Clone, items)); 1560 m_pAction_Machine_Remove->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Remove, items)); 1561 m_pAction_Machine_AddGroup->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_AddGroup, items)); 1579 1562 1580 1563 /* Enable/disable machine-close actions: */ … … 1596 1579 state == KMachineState_Aborted) 1597 1580 { 1598 m_pActionGroupStartOrShow->setState(1); 1599 m_pActionMachineStartOrShow->setState(1); 1581 m_pAction_Common_StartOrShow->setState(1); 1600 1582 #ifdef QT_MAC_USE_COCOA 1601 1583 /* There is a bug in Qt Cocoa which result in showing a "more arrow" when … … 1608 1590 else 1609 1591 { 1610 m_pActionGroupStartOrShow->setState(2); 1611 m_pActionMachineStartOrShow->setState(2); 1592 m_pAction_Common_StartOrShow->setState(2); 1612 1593 #ifdef QT_MAC_USE_COCOA 1613 1594 /* There is a bug in Qt Cocoa which result in showing a "more arrow" when … … 1623 1604 state == KMachineState_TeleportingPausedVM) 1624 1605 { 1625 m_pActionGroupPauseAndResume->blockSignals(true); 1626 m_pActionGroupPauseAndResume->setChecked(true); 1627 m_pActionGroupPauseAndResume->blockSignals(false); 1628 m_pActionMachinePauseAndResume->blockSignals(true); 1629 m_pActionMachinePauseAndResume->setChecked(true); 1630 m_pActionMachinePauseAndResume->blockSignals(false); 1606 m_pAction_Common_PauseAndResume->blockSignals(true); 1607 m_pAction_Common_PauseAndResume->setChecked(true); 1608 m_pAction_Common_PauseAndResume->blockSignals(false); 1631 1609 } 1632 1610 else 1633 1611 { 1634 m_pActionGroupPauseAndResume->blockSignals(true); 1635 m_pActionGroupPauseAndResume->setChecked(false); 1636 m_pActionGroupPauseAndResume->blockSignals(false); 1637 m_pActionMachinePauseAndResume->blockSignals(true); 1638 m_pActionMachinePauseAndResume->setChecked(false); 1639 m_pActionMachinePauseAndResume->blockSignals(false); 1640 } 1641 m_pActionGroupPauseAndResume->updateAppearance(); 1642 m_pActionMachinePauseAndResume->updateAppearance(); 1612 m_pAction_Common_PauseAndResume->blockSignals(true); 1613 m_pAction_Common_PauseAndResume->setChecked(false); 1614 m_pAction_Common_PauseAndResume->blockSignals(false); 1615 } 1616 m_pAction_Common_PauseAndResume->updateAppearance(); 1643 1617 } 1644 1618 else 1645 1619 { 1646 1620 /* Update the Start button action appearance: */ 1647 m_pActionGroupStartOrShow->setState(1); 1648 m_pActionMachineStartOrShow->setState(1); 1621 m_pAction_Common_StartOrShow->setState(1); 1649 1622 } 1650 1623 } … … 1662 1635 switch (iActionIndex) 1663 1636 { 1664 case UIActionIndexSelector_Simple_Machine_Settings Dialog:1637 case UIActionIndexSelector_Simple_Machine_Settings: 1665 1638 { 1666 1639 /* Check that we are not saving groups, … … 1672 1645 pItem->machineState() != KMachineState_Stuck; 1673 1646 } 1674 case UIActionIndexSelector_Simple_Machine_Clone Wizard:1647 case UIActionIndexSelector_Simple_Machine_Clone: 1675 1648 { 1676 1649 /* Check that there is only one item, its accessible … … 1680 1653 pItem->sessionState() == KSessionState_Unlocked; 1681 1654 } 1682 case UIActionIndexSelector_Simple_Machine_AddGroupDialog: 1655 case UIActionIndexSelector_Simple_Group_Rename: 1656 case UIActionIndexSelector_Simple_Group_Remove: 1657 { 1658 /* Make sure we are not saving groups: */ 1659 if (m_pChooser->isGroupSavingInProgress()) 1660 return false; 1661 1662 /* Group can be always removed/renamed: */ 1663 return true; 1664 } 1665 case UIActionIndexSelector_Simple_Machine_Remove: 1666 { 1667 /* Make sure we are not saving groups: */ 1668 if (m_pChooser->isGroupSavingInProgress()) 1669 return false; 1670 1671 /* Check that all machines are NOT accessible 1672 * or session states of all machines are unlocked. */ 1673 return isItemsInaccessible(items) || isItemsHasUnlockedSession(items); 1674 } 1675 case UIActionIndexSelector_Simple_Machine_AddGroup: 1683 1676 { 1684 1677 /* Check that there is more than one item, … … 1688 1681 isItemsPoweredOff(items); 1689 1682 } 1690 case UIActionIndexSelector_Simple_Group_RenameDialog: 1691 case UIActionIndexSelector_Simple_Group_RemoveDialog: 1692 { 1693 /* Make sure we are not saving groups: */ 1694 if (m_pChooser->isGroupSavingInProgress()) 1695 return false; 1696 1697 /* Group can be always removed/renamed: */ 1698 return true; 1699 } 1700 case UIActionIndexSelector_Simple_Machine_RemoveDialog: 1701 { 1702 /* Make sure we are not saving groups: */ 1703 if (m_pChooser->isGroupSavingInProgress()) 1704 return false; 1705 1706 /* Check that all machines are NOT accessible 1707 * or session states of all machines are unlocked. */ 1708 return isItemsInaccessible(items) || isItemsHasUnlockedSession(items); 1709 } 1710 case UIActionIndexSelector_State_Group_StartOrShow: 1711 case UIActionIndexSelector_State_Machine_StartOrShow: 1683 case UIActionIndexSelector_State_Common_StartOrShow: 1712 1684 { 1713 1685 /* Make sure all items are accessible: */ … … 1733 1705 return pItem->canSwitchTo(); 1734 1706 } 1735 case UIActionIndexSelector_Simple_ Machine_Discard:1707 case UIActionIndexSelector_Simple_Common_Discard: 1736 1708 { 1737 1709 /* Check that there is only one item, its accessible … … 1742 1714 pItem->sessionState() == KSessionState_Unlocked; 1743 1715 } 1744 case UIActionIndexSelector_Toggle_Group_PauseAndResume: 1745 case UIActionIndexSelector_Toggle_Machine_PauseAndResume: 1716 case UIActionIndexSelector_Toggle_Common_PauseAndResume: 1746 1717 { 1747 1718 /* Make sure all items are accessible: */ … … 1756 1727 pItem->machineState() == KMachineState_TeleportingPausedVM; 1757 1728 } 1758 case UIActionIndexSelector_Simple_Group_Reset: 1759 case UIActionIndexSelector_Simple_Machine_Reset: 1729 case UIActionIndexSelector_Simple_Common_Reset: 1760 1730 { 1761 1731 /* Make sure all items are accessible: */ … … 1809 1779 return isActionEnabled(UIActionIndexSelector_Menu_Machine_Close, items); 1810 1780 } 1811 case UIActionIndexSelector_Simple_Group_Refresh: 1812 case UIActionIndexSelector_Simple_Machine_Refresh: 1781 case UIActionIndexSelector_Simple_Common_Refresh: 1813 1782 { 1814 1783 /* Make sure all items are NOT accessible: */ … … 1816 1785 } 1817 1786 case UIActionIndex_Simple_LogDialog: 1818 case UIActionIndexSelector_Simple_Group_ShowInFileManager: 1819 case UIActionIndexSelector_Simple_Machine_ShowInFileManager: 1787 case UIActionIndexSelector_Simple_Common_ShowInFileManager: 1820 1788 case UIActionIndexSelector_Simple_Common_SortParent: 1821 1789 case UIActionIndexSelector_Simple_Group_Sort: … … 1824 1792 return items.size() > 0 && isItemsAccessible(items); 1825 1793 } 1826 case UIActionIndexSelector_Simple_Group_CreateShortcut: 1827 case UIActionIndexSelector_Simple_Machine_CreateShortcut: 1794 case UIActionIndexSelector_Simple_Common_CreateShortcut: 1828 1795 { 1829 1796 /* Make sure all items supports shortcuts: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r42751 r42760 125 125 void prepareMenuBar(); 126 126 void prepareMenuFile(QMenu *pMenu); 127 void prepareCommonActions(); 128 void prepareGroupActions(); 129 void prepareMachineActions(); 127 130 void prepareMenuGroup(QMenu *pMenu); 128 131 void prepareMenuMachine(QMenu *pMenu); … … 177 180 UIAction *m_pExitAction; 178 181 182 /* Common Group/Machine actions: */ 183 UIAction *m_pAction_Common_New; 184 UIAction *m_pAction_Common_Add; 185 UIAction *m_pAction_Common_StartOrShow; 186 UIAction *m_pAction_Common_PauseAndResume; 187 UIAction *m_pAction_Common_Reset; 188 UIAction *m_pAction_Common_Discard; 189 UIAction *m_pAction_Common_LogDialog; 190 UIAction *m_pAction_Common_Refresh; 191 UIAction *m_pAction_Common_ShowInFileManager; 192 UIAction *m_pAction_Common_CreateShortcut; 193 UIAction *m_pAction_Common_SortParent; 194 179 195 /* 'Group' menu action pointers: */ 180 196 QList<UIAction*> m_groupActions; 181 197 QAction *m_pGroupMenuAction; 182 198 QMenu *m_pGroupMenu; 183 UIAction *m_pActionGroupNewWizard; 184 UIAction *m_pActionGroupAddDialog; 185 UIAction *m_pActionGroupRenameDialog; 186 UIAction *m_pActionGroupRemoveDialog; 187 UIAction *m_pActionGroupStartOrShow; 188 UIAction *m_pActionGroupPauseAndResume; 189 UIAction *m_pActionGroupReset; 190 UIAction *m_pActionGroupRefresh; 191 UIAction *m_pActionGroupLogDialog; 192 UIAction *m_pActionGroupShowInFileManager; 193 UIAction *m_pActionGroupCreateShortcut; 194 UIAction *m_pActionGroupSortParent; 195 UIAction *m_pActionGroupSort; 199 UIAction *m_pAction_Group_Rename; 200 UIAction *m_pAction_Group_Remove; 201 UIAction *m_pAction_Group_Sort; 196 202 197 203 /* 'Machine' menu action pointers: */ … … 199 205 QAction *m_pMachineMenuAction; 200 206 QMenu *m_pMachineMenu; 201 UIAction *m_pActionMachineNewWizard; 202 UIAction *m_pActionMachineAddDialog; 203 UIAction *m_pActionMachineSettingsDialog; 204 UIAction *m_pActionMachineCloneWizard; 205 UIAction *m_pActionMachineAddGroupDialog; 206 UIAction *m_pActionMachineRemoveDialog; 207 UIAction *m_pActionMachineStartOrShow; 208 UIAction *m_pActionMachineDiscard; 209 UIAction *m_pActionMachinePauseAndResume; 210 UIAction *m_pActionMachineReset; 211 UIAction *m_pActionMachineRefresh; 212 UIAction *m_pActionMachineLogDialog; 213 UIAction *m_pActionMachineShowInFileManager; 214 UIAction *m_pActionMachineCreateShortcut; 215 UIAction *m_pActionMachineSortParent; 207 UIAction *m_pAction_Machine_Settings; 208 UIAction *m_pAction_Machine_Clone; 209 UIAction *m_pAction_Machine_Remove; 210 UIAction *m_pAction_Machine_AddGroup; 216 211 217 212 /* 'Machine / Close' menu action pointers: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r42734 r42760 814 814 815 815 connect(m_pSettingsButton, SIGNAL(sigButtonClicked()), 816 gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings Dialog), SLOT(trigger()),816 gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings), SLOT(trigger()), 817 817 Qt::QueuedConnection); 818 818 connect(m_pStartButton, SIGNAL(sigButtonClicked()), 819 gActionPool->action(UIActionIndexSelector_State_ Machine_StartOrShow), SLOT(trigger()),819 gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow), SLOT(trigger()), 820 820 Qt::QueuedConnection); 821 821 connect(m_pPauseButton, SIGNAL(sigButtonClicked()), 822 gActionPool->action(UIActionIndexSelector_Toggle_ Machine_PauseAndResume), SLOT(trigger()),822 gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume), SLOT(trigger()), 823 823 Qt::QueuedConnection); 824 824 connect(m_pCloseButton, SIGNAL(sigButtonClicked()), -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r42756 r42760 465 465 void UIGChooserModel::activate() 466 466 { 467 gActionPool->action(UIActionIndexSelector_State_ Machine_StartOrShow)->activate(QAction::Trigger);467 gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->activate(QAction::Trigger); 468 468 } 469 469 … … 897 897 /* Context menu for group: */ 898 898 m_pContextMenuGroup = new QMenu; 899 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_NewWizard));900 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_AddDialog));899 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_New)); 900 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Add)); 901 901 m_pContextMenuGroup->addSeparator(); 902 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename Dialog));903 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove Dialog));902 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename)); 903 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove)); 904 904 m_pContextMenuGroup->addSeparator(); 905 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_State_ Group_StartOrShow));906 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Toggle_ Group_PauseAndResume));907 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_Reset));905 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)); 906 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume)); 907 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Reset)); 908 908 m_pContextMenuGroup->addMenu(gActionPool->action(UIActionIndexSelector_Menu_Machine_Close)->menu()); 909 909 m_pContextMenuGroup->addSeparator(); 910 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Discard)); 910 911 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndex_Simple_LogDialog)); 911 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_Refresh));912 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh)); 912 913 m_pContextMenuGroup->addSeparator(); 913 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_ShowInFileManager));914 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Group_CreateShortcut));914 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager)); 915 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut)); 915 916 m_pContextMenuGroup->addSeparator(); 916 917 m_pContextMenuGroup->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent)); … … 919 920 /* Context menu for machine(s): */ 920 921 m_pContextMenuMachine = new QMenu; 921 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings Dialog));922 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone Wizard));923 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove Dialog));924 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup Dialog));922 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Settings)); 923 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Clone)); 924 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove)); 925 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup)); 925 926 m_pContextMenuMachine->addSeparator(); 926 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_State_ Machine_StartOrShow));927 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Toggle_ Machine_PauseAndResume));928 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Machine_Reset));927 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)); 928 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume)); 929 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Reset)); 929 930 m_pContextMenuMachine->addMenu(gActionPool->action(UIActionIndexSelector_Menu_Machine_Close)->menu()); 930 931 m_pContextMenuMachine->addSeparator(); 931 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Machine_Discard));932 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Discard)); 932 933 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndex_Simple_LogDialog)); 933 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Machine_Refresh));934 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_Refresh)); 934 935 m_pContextMenuMachine->addSeparator(); 935 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Machine_ShowInFileManager));936 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_ Machine_CreateShortcut));936 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager)); 937 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut)); 937 938 m_pContextMenuMachine->addSeparator(); 938 939 m_pContextMenuMachine->addAction(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent)); … … 941 942 connect(m_pContextMenuMachine, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*))); 942 943 943 connect(gActionPool->action(UIActionIndexSelector_Simple_ Group_NewWizard), SIGNAL(triggered()),944 connect(gActionPool->action(UIActionIndexSelector_Simple_Common_New), SIGNAL(triggered()), 944 945 this, SLOT(sltCreateNewMachine())); 945 connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_NewWizard), SIGNAL(triggered()), 946 this, SLOT(sltCreateNewMachine())); 947 connect(gActionPool->action(UIActionIndexSelector_Simple_Group_RenameDialog), SIGNAL(triggered()), 946 connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Rename), SIGNAL(triggered()), 948 947 this, SLOT(sltStartEditingSelectedGroup())); 949 connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove Dialog), SIGNAL(triggered()),948 connect(gActionPool->action(UIActionIndexSelector_Simple_Group_Remove), SIGNAL(triggered()), 950 949 this, SLOT(sltRemoveCurrentlySelectedGroup())); 951 connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroupDialog), SIGNAL(triggered()), 950 connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_Remove), SIGNAL(triggered()), 951 this, SLOT(sltRemoveCurrentlySelectedMachine())); 952 connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup), SIGNAL(triggered()), 952 953 this, SLOT(sltAddGroupBasedOnChosenItems())); 953 connect(gActionPool->action(UIActionIndexSelector_Simple_Machine_RemoveDialog), SIGNAL(triggered()),954 this, SLOT(sltRemoveCurrentlySelectedMachine()));955 954 connect(gActionPool->action(UIActionIndexSelector_Simple_Common_SortParent), SIGNAL(triggered()), 956 955 this, SLOT(sltSortParentGroup()));
Note:
See TracChangeset
for help on using the changeset viewer.