Changeset 5078 in vbox
- Timestamp:
- Sep 27, 2007 1:58:39 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h
r4514 r5078 227 227 // Help actions 228 228 QAction *helpWebAction; 229 QAction *helpRegisterAction; 229 230 QAction *helpAboutAction; 230 231 QAction *helpResetMessagesAction; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r5051 r5078 377 377 #endif 378 378 379 void showRegistrationDialog();379 void callRegistration(); 380 380 381 381 CSession openSession (const QUuid &id); … … 511 511 512 512 bool openURL (const QString &aURL); 513 514 void showRegistrationDialog(); 513 515 514 516 protected: -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxSelectorWnd.h
r4071 r5078 120 120 QAction *helpContentsAction; 121 121 QAction *helpWebAction; 122 QAction *helpRegisterAction; 122 123 QAction *helpAboutAction; 123 124 QAction *helpResetMessagesAction; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r4701 r5078 263 263 helpWebAction = new QAction (this, "helpWebAction"); 264 264 helpWebAction->setIconSet (VBoxGlobal::iconSet ("site_16px.png")); 265 helpRegisterAction = new QAction (this, "helpRegisterAction"); 266 helpRegisterAction->setIconSet (VBoxGlobal::iconSet ("refresh_16px.png")); 265 267 helpAboutAction = new QAction (this, "helpAboutAction"); 266 268 helpAboutAction->setIconSet (VBoxGlobal::iconSet ("about_16px.png")); … … 371 373 helpWebAction->addTo( helpMenu ); 372 374 helpMenu->insertSeparator(); 375 helpRegisterAction->addTo( helpMenu ); 373 376 helpAboutAction->addTo( helpMenu ); 374 377 helpMenu->insertSeparator(); … … 519 522 connect (helpWebAction, SIGNAL (activated()), 520 523 &vboxProblem(), SLOT (showHelpWebDialog())); 524 connect (helpRegisterAction, SIGNAL (activated()), 525 &vboxGlobal(), SLOT (showRegistrationDialog())); 521 526 connect (helpAboutAction, SIGNAL (activated()), 522 527 &vboxProblem(), SLOT (showHelpAboutDialog())); … … 1475 1480 tr ("Open the browser and go to the VirtualBox product web site")); 1476 1481 1482 helpRegisterAction->setMenuText (tr ("&Register VirtualBox...")); 1483 helpRegisterAction->setStatusTip ( 1484 tr ("Open VirtualBox registration form")); 1485 1477 1486 helpAboutAction->setMenuText (tr ("&About VirtualBox...")); 1478 1487 helpAboutAction->setStatusTip (tr ("Show a dialog with product information")); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r5051 r5078 1644 1644 #endif 1645 1645 1646 void VBoxGlobal:: showRegistrationDialog()1647 { 1648 /* check if theregistration already passed */1646 void VBoxGlobal::callRegistration() 1647 { 1648 /* Check if the automatic registration already passed */ 1649 1649 if (virtualBox().GetExtraData (VBoxDefs::GUI_RegistrationTriesLeft) == "0") 1650 1650 return; 1651 1651 1652 /* store the winid of main app wgt to ensure only one reg dlg running */1652 /* Store the winid of main app wgt to ensure only one reg dlg running */ 1653 1653 virtualBox().SetExtraData (VBoxDefs::GUI_RegistrationDlgWinID, 1654 1654 QString ("%1").arg ((long)qApp->mainWidget()->winId())); 1655 } 1656 1657 void VBoxGlobal::showRegistrationDialog() 1658 { 1659 if (mRegDlg) 1660 { 1661 /* Show already opened registration dialog */ 1662 mRegDlg->setWindowState (mRegDlg->windowState() & ~WindowMinimized); 1663 mRegDlg->raise(); 1664 mRegDlg->setActiveWindow(); 1665 } 1666 else 1667 { 1668 /* Create new registration dialog */ 1669 VBoxRegistrationDlg *dlg = 1670 new VBoxRegistrationDlg (0, 0, false, WDestructiveClose); 1671 dlg->setup (&mRegDlg, "http://www.innotek.de/register762.php"); 1672 Assert (dlg == mRegDlg); 1673 mRegDlg->show(); 1674 } 1655 1675 } 1656 1676 … … 3460 3480 case VBoxDefs::ShowRegDlgEventType: 3461 3481 { 3462 /* show unique registration dialog */ 3463 if (!mRegDlg) 3464 { 3465 VBoxRegistrationDlg *dlg = 3466 new VBoxRegistrationDlg (0, 0, false, WDestructiveClose); 3467 dlg->setup (&mRegDlg, "http://www.innotek.de/register762.php"); 3468 Assert (dlg == mRegDlg); 3469 mRegDlg->show(); 3470 } 3482 showRegistrationDialog(); 3471 3483 return true; 3472 3484 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r5030 r5078 425 425 helpWebAction = new QAction (this, "helpWebAction"); 426 426 helpWebAction->setIconSet (VBoxGlobal::iconSet ("site_16px.png")); 427 helpRegisterAction = new QAction (this, "helpRegisterAction"); 428 helpRegisterAction->setIconSet (VBoxGlobal::iconSet ("refresh_16px.png")); 427 429 helpAboutAction = new QAction (this, "helpAboutAction"); 428 430 helpAboutAction->setIconSet (VBoxGlobal::iconSet ("about_16px.png")); … … 522 524 helpWebAction->addTo( helpMenu ); 523 525 helpMenu->insertSeparator(); 526 helpRegisterAction->addTo( helpMenu ); 524 527 helpAboutAction->addTo( helpMenu ); 525 528 helpMenu->insertSeparator(); … … 580 583 connect (helpWebAction, SIGNAL (activated()), 581 584 &vboxProblem(), SLOT (showHelpWebDialog())); 585 connect (helpRegisterAction, SIGNAL (activated()), 586 &vboxGlobal(), SLOT (showRegistrationDialog())); 582 587 connect (helpAboutAction, SIGNAL (activated()), 583 588 &vboxProblem(), SLOT (showHelpAboutDialog())); … … 1100 1105 tr ("Open the browser and go to the VirtualBox product web site")); 1101 1106 1107 helpRegisterAction->setMenuText (tr ("&Register VirtualBox...")); 1108 helpRegisterAction->setAccel( QString::null ); 1109 helpRegisterAction->setStatusTip ( 1110 tr ("Open VirtualBox registration form")); 1111 1102 1112 helpAboutAction->setMenuText (tr ("&About VirtualBox...")); 1103 1113 helpAboutAction->setAccel( QString::null ); -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r5022 r5078 234 234 if (vboxGlobal().startMachine (vboxGlobal().managedVMUuid())) 235 235 { 236 vboxGlobal(). showRegistrationDialog();236 vboxGlobal().callRegistration(); 237 237 rc = a.exec(); 238 238 } … … 245 245 { 246 246 a.setMainWidget (&vboxGlobal().selectorWnd()); 247 vboxGlobal(). showRegistrationDialog();247 vboxGlobal().callRegistration(); 248 248 vboxGlobal().selectorWnd().show(); 249 249 vboxGlobal().startEnumeratingMedia();
Note:
See TracChangeset
for help on using the changeset viewer.