VirtualBox

Changeset 26460 in vbox


Ignore:
Timestamp:
Feb 12, 2010 1:20:57 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57619
Message:

FE/Qt4: The buttons have different titles on the different host platforms.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWizard.cpp

    r26296 r26460  
    2929#include "QIWizard.h"
    3030#include "QILabel.h"
     31#include "VBoxGlobal.h"
    3132
    3233/* System includes */
     
    179180    pSummaryField->setFixedHeight(lineHeight * iNumber + textMargin * 2);
    180181}
     182
     183QString QIWizardPage::standardHelpText() const
     184{
     185    return tr("Use the <b>%1</b> button to go to the next page of the wizard and the "
     186              "<b>%2</b> button to return to the previous page. "
     187              "You can also press <b>%3</b> if you want to cancel the execution "
     188              "of this wizard.</p>")
     189        .arg(VBoxGlobal::replaceHtmlEntities(VBoxGlobal::removeAccelMark(wizard()->buttonText(QWizard::NextButton))))
     190        .arg(VBoxGlobal::replaceHtmlEntities(VBoxGlobal::removeAccelMark(wizard()->buttonText(QWizard::BackButton))))
     191#ifdef Q_WS_MAC
     192        .arg(QKeySequence("ESC").toString()); /* There is no button shown on Mac OS X, so just say the key sequence. */
     193#else /* Q_WS_MAC */
     194        .arg(VBoxGlobal::replaceHtmlEntities(VBoxGlobal::removeAccelMark(wizard()->buttonText(QWizard::CancelButton))));
     195#endif /* Q_WS_MAC */
     196}
     197
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIWizard.h

    r26187 r26460  
    6767    static void setSummaryFieldLinesNumber(QTextEdit *pSummaryField, int iNumber);
    6868
     69    QString standardHelpText() const;
     70
    6971private:
    7072
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r26391 r26460  
    37773777
    37783778    return text;
     3779}
     3780
     3781/* static */
     3782QString VBoxGlobal::replaceHtmlEntities(QString strText)
     3783{
     3784    return strText
     3785        .replace('&', "&amp;")
     3786        .replace('<', "&lt;")
     3787        .replace('>', "&gt;")
     3788        .replace('\"', "&quot;");
    37793789}
    37803790
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r26079 r26460  
    777777    static QString highlight (const QString &aStr, bool aToolTip = false);
    778778
     779    static QString replaceHtmlEntities(QString strText);
    779780    static QString emphasize (const QString &aStr);
    780781
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIExportApplianceWzd.cpp

    r26230 r26460  
    111111    /* Fill 'VM Selector' */
    112112    populateVMSelectorItems();
    113 
    114     /* Translate */
    115     retranslateUi();
    116113}
    117114
     
    123120    /* Wizard page 1 title */
    124121    setTitle(tr("Welcome to the Appliance Export Wizard!"));
     122
     123    m_pPage1Text1->setText(tr("<p>This wizard will guide you through the process of "
     124                              "exporting an appliance.</p><p>%1</p><p>Please select "
     125                              "the virtual machines that should be added to the "
     126                              "appliance. You can select more than one. Please note "
     127                              "that these machines have to be turned off before they "
     128                              "can be exported.</p>")
     129                           .arg(standardHelpText()));
    125130}
    126131
     
    206211    registerField("applianceWidget", this, "applianceWidget");
    207212    m_pApplianceWidget = m_pSettingsCnt;
    208 
    209     /* Translate */
    210     retranslateUi();
    211213}
    212214
     
    326328    m_pTypeLocalFilesystem->click();
    327329#endif
    328 
    329     /* Translate */
    330     retranslateUi();
    331330}
    332331
     
    388387    m_pLeBucket->setText(vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_Export_Bucket));
    389388#endif
    390 
    391     /* Translate */
    392     retranslateUi();
    393389}
    394390
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIExportApplianceWzdPage1.ui

    r26079 r26460  
    4040   <item>
    4141    <widget class="QILabel" name="m_pPage1Text1">
    42      <property name="text">
    43       <string>&lt;p&gt;This wizard will guide you through the process of exporting an appliance.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page.&lt;/p&gt;&lt;p&gt;Please select the virtual machines that you wish to the appliance. You can select more than one. Please note that these machines have to be turned off before they can be exported.&lt;/p&gt;</string>
    44      </property>
    4542     <property name="wordWrap">
    4643      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzd.cpp

    r26230 r26460  
    7272    /* Decorate page */
    7373    Ui::UIFirstRunWzdPage1::setupUi(this);
    74 
    75     /* Translate */
    76     retranslateUi();
    7774}
    7875
     
    9693    /* Wizard page 1 title */
    9794    setTitle(tr("Welcome to the First Run Wizard!"));
     95
     96    m_pPage1Text1Var1->setText(tr("<p>You have started a newly created virtual machine for the "
     97                                  "first time. This wizard will help you to perform the steps "
     98                                  "necessary for installing an operating system of your choice "
     99                                  "onto this virtual machine.</p><p>%1</p>")
     100                               .arg(standardHelpText()));
     101
     102    m_pPage1Text1Var2->setText(tr("<p>You have started a newly created virtual machine for the "
     103                                  "first time. This wizard will help you to perform the steps "
     104                                  "necessary for booting an operating system of your choice on "
     105                                  "the virtual machine.</p><p>Note that you will not be able to "
     106                                  "install an operating system into this virtual machine right "
     107                                  "now because you did not attach any hard disk to it. If this "
     108                                  "is not what you want, you can cancel the execution of this "
     109                                  "wizard, select <b>Settings</b> from the <b>Machine</b> menu "
     110                                  "of the main VirtualBox window to access the settings dialog "
     111                                  "of this machine and change the hard disk configuration.</p>"
     112                                  "<p>%1</p>")
     113                               .arg(standardHelpText()));
     114}
     115
     116void UIFirstRunWzdPage1::initializePage()
     117{
     118    /* Translate */
     119    retranslateUi();
    98120}
    99121
     
    120142    connect (m_pMediaSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(sltMediumChanged()));
    121143    connect (m_pSelectMediaButton, SIGNAL(clicked()), this, SLOT(sltOpenVirtualMediaManager()));
    122 
    123     /* Translate */
    124     retranslateUi();
    125144}
    126145
     
    231250    /* Make the summary field read-only */
    232251    m_pSummaryText->setReadOnly (true);
    233 
    234     /* Translate */
    235     retranslateUi();
    236252}
    237253
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzd.h

    r26079 r26460  
    5959
    6060    void retranslateUi();
     61
     62    void initializePage();
    6163};
    6264
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIFirstRunWzdPage1.ui

    r26079 r26460  
    4040   <item>
    4141    <widget class="QILabel" name="m_pPage1Text1Var1">
    42      <property name="text">
    43       <string>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for installing an operating system of your choice onto this virtual machine.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;Cancel&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</string>
    44      </property>
    4542     <property name="wordWrap">
    4643      <bool>true</bool>
     
    5047   <item>
    5148    <widget class="QILabel" name="m_pPage1Text1Var2">
    52      <property name="text">
    53       <string>&lt;p&gt;You have started a newly created virtual machine for the first time. This wizard will help you to perform the steps necessary for booting an operating system of your choice on the virtual machine.&lt;/p&gt;&lt;p&gt;Note that you will not be able to install an operating system into this virtual machine right now because you did not attach any hard disk to it. If this is not what you want, you can cancel the execution of this wizard, select &lt;b&gt;Settings&lt;/b&gt; from the &lt;b&gt;Machine&lt;/b&gt; menu of the main VirtualBox window to access the settings dialog of this machine and change the hard disk configuration.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page. You can also press &lt;b&gt;Cancel&lt;/b&gt; if you want to cancel the execution of this wizard.&lt;/p&gt;</string>
    54      </property>
    5549     <property name="wordWrap">
    5650      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIImportApplianceWzd.cpp

    r26187 r26460  
    156156    /* Setup validation */
    157157    connect(m_pFileSelector, SIGNAL(pathChanged(const QString &)), this, SIGNAL(completeChanged()));
    158 
    159     /* Translate */
    160     retranslateUi();
    161158}
    162159
     
    172169    /* Wizard page 1 title */
    173170    setTitle(tr("Welcome to the Appliance Import Wizard!"));
     171
     172    m_pPage1Text1->setText(tr("<p>This wizard will guide you through importing an appliance.</p>"
     173                              "<p>%1</p><p>VirtualBox currently supports importing appliances "
     174                              "saved in the Open Virtualization Format (OVF). To continue, "
     175                              "select the file to import below:</p>")
     176                           .arg(standardHelpText()));
     177}
     178
     179void UIImportApplianceWzdPage1::initializePage()
     180{
     181    /* Translate */
     182    retranslateUi();
    174183}
    175184
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIImportApplianceWzd.h

    r26079 r26460  
    100100    void retranslateUi();
    101101
     102    void initializePage();
     103
    102104    bool isComplete() const;
    103105    bool validatePage();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIImportApplianceWzdPage1.ui

    r26079 r26460  
    4040   <item>
    4141    <widget class="QILabel" name="m_pPage1Text1">
    42      <property name="text">
    43       <string>&lt;p&gt;This wizard will guide you through importing an appliance.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page.&lt;/p&gt;&lt;p&gt;VirtualBox currently supports importing appliances saved in the Open Virtualization Format (OVF). To continue, select the file to import below:&lt;/p&gt;</string>
    44      </property>
    4542     <property name="wordWrap">
    4643      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp

    r26187 r26460  
    103103    /* Decorate page */
    104104    Ui::UINewHDWzdPage1::setupUi(this);
    105 
     105}
     106
     107void UINewHDWzdPage1::retranslateUi()
     108{
     109    /* Translate uic generated strings */
     110    Ui::UINewHDWzdPage1::retranslateUi(this);
     111
     112    /* Wizard page 1 title */
     113    setTitle(tr("Welcome to the Create New Virtual Disk Wizard!"));
     114
     115
     116    m_pPage1Text1->setText(tr("<p>This wizard will help you to create a new virtual hard disk "
     117                              "for your virtual machine.</p><p>%1</p>")
     118                           .arg(standardHelpText()));
     119}
     120
     121void UINewHDWzdPage1::initializePage()
     122{
    106123    /* Translate */
    107124    retranslateUi();
    108 }
    109 
    110 void UINewHDWzdPage1::retranslateUi()
    111 {
    112     /* Translate uic generated strings */
    113     Ui::UINewHDWzdPage1::retranslateUi(this);
    114 
    115     /* Wizard page 1 title */
    116     setTitle(tr("Welcome to the Create New Virtual Disk Wizard!"));
    117125}
    118126
     
    131139    connect (m_pTypeDynamic, SIGNAL(clicked(bool)), this, SLOT(onTypeChanged()));
    132140    connect (m_pTypeFixed, SIGNAL(clicked(bool)), this, SLOT(onTypeChanged()));
    133 
    134     /* Translate */
    135     retranslateUi();
    136 }
     141}
     142
    137143void UINewHDWzdPage2::retranslateUi()
    138144{
     
    235241    connect(m_pSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(onSizeSliderValueChanged(int)));
    236242    connect(m_pSizeEditor, SIGNAL(textChanged(const QString &)), this, SLOT(onSizeEditorTextChanged(const QString &)));
    237 
    238     /* Translate */
    239     retranslateUi();
    240243}
    241244
     
    411414    /* Make the summary field read-only */
    412415    m_pSummaryText->setReadOnly (true);
    413 
    414     /* Translate */
    415     retranslateUi();
    416416}
    417417
     
    446446
    447447    m_pSummaryText->setText("<table cellspacing=0 cellpadding=0>" + summary + "</table>");
     448
     449    m_pPage4Text2->setText(tr("If the above settings are correct, press the <b>%1</b> button. "
     450                              "Once you press it, a new hard disk will be created.")
     451                           .arg(VBoxGlobal::replaceHtmlEntities(VBoxGlobal::removeAccelMark(wizard()->buttonText(QWizard::FinishButton)))));
    448452}
    449453
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.h

    r26079 r26460  
    6565
    6666    void retranslateUi();
     67
     68    void initializePage();
    6769};
    6870
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzdPage1.ui

    r26079 r26460  
    4040   <item>
    4141    <widget class="QILabel" name="m_pPage1Text1">
    42      <property name="text">
    43       <string>&lt;p&gt;This wizard will help you to create a new virtual hard disk for your virtual machine.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go to the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page.&lt;/p&gt;</string>
    44      </property>
    4542     <property name="wordWrap">
    4643      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzdPage4.ui

    r26079 r26460  
    7272   <item>
    7373    <widget class="QILabel" name="m_pPage4Text2">
    74      <property name="text">
    75       <string>If the above settings are correct, press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, a new hard disk will be created.</string>
    76      </property>
    7774     <property name="wordWrap">
    7875      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.cpp

    r26456 r26460  
    168168    /* Decorate page */
    169169    Ui::UINewVMWzdPage1::setupUi(this);
    170 
     170}
     171
     172void UINewVMWzdPage1::retranslateUi()
     173{
     174    /* Translate uic generated strings */
     175    Ui::UINewVMWzdPage1::retranslateUi(this);
     176
     177    /* Wizard page 1 title */
     178    setTitle(tr("Welcome to the New Virtual Machine Wizard!"));
     179
     180    m_pPage1Text1->setText(tr("<p>This wizard will guide you through the steps that are necessary "
     181                              "to create a new virtual machine for VirtualBox.</p><p>%1</p>")
     182                           .arg(standardHelpText()));
     183}
     184
     185void UINewVMWzdPage1::initializePage()
     186{
    171187    /* Translate */
    172188    retranslateUi();
    173 }
    174 
    175 void UINewVMWzdPage1::retranslateUi()
    176 {
    177     /* Translate uic generated strings */
    178     Ui::UINewVMWzdPage1::retranslateUi(this);
    179 
    180     /* Wizard page 1 title */
    181     setTitle(tr("Welcome to the New Virtual Machine Wizard!"));
    182189}
    183190
     
    198205    /* Setup contents */
    199206    m_pTypeSelector->activateLayout();
    200 
    201     /* Translate */
    202     retranslateUi();
    203207}
    204208
     
    262266    /* Initialise page connections */
    263267    ramSliderValueChanged(m_pRamSlider->value());
    264 
    265     /* Translate */
    266     retranslateUi();
    267268}
    268269
     
    358359    /* Initialise page connections */
    359360    hardDiskSourceChanged();
    360 
    361     /* Translate */
    362     retranslateUi();
    363361}
    364362
     
    559557    /* Make the summary field read-only */
    560558    m_pSummaryText->setReadOnly (true);
    561 
    562     /* Translate */
    563     retranslateUi();
    564559}
    565560
     
    604599
    605600    m_pSummaryText->setText("<table cellspacing=0 cellpadding=0>" + summary + "</table>");
     601
     602    m_pPage5Text2->setText(tr("<p>If the above is correct press the <b>%1</b> button. Once "
     603                              "you press it, a new virtual machine will be created. </p><p>Note "
     604                              "that you can alter these and all other setting of the created "
     605                              "virtual machine at any time using the <b>Settings</b> dialog "
     606                              "accessible through the menu of the main window.</p>")
     607                           .arg(VBoxGlobal::replaceHtmlEntities(VBoxGlobal::removeAccelMark(wizard()->buttonText(QWizard::FinishButton)))));
    606608}
    607609
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzd.h

    r26456 r26460  
    6363
    6464    void retranslateUi();
     65
     66    void initializePage();
    6567};
    6668
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzdPage1.ui

    r26079 r26460  
    4646   <item>
    4747    <widget class="QILabel" name="m_pPage1Text1">
    48      <property name="text">
    49       <string>&lt;p&gt;This wizard will guide you through the steps that are necessary to create a new virtual machine for VirtualBox.&lt;/p&gt;&lt;p&gt;Use the &lt;b&gt;Next&lt;/b&gt; button to go the next page of the wizard and the &lt;b&gt;Back&lt;/b&gt; button to return to the previous page.&lt;/p&gt;</string>
    50      </property>
    5148     <property name="wordWrap">
    5249      <bool>true</bool>
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UINewVMWzdPage5.ui

    r26079 r26460  
    7272   <item>
    7373    <widget class="QILabel" name="m_pPage5Text2">
    74      <property name="text">
    75       <string>&lt;p&gt;If the above is correct press the &lt;b&gt;Finish&lt;/b&gt; button. Once you press it, a new virtual machine will be created. &lt;/p&gt;&lt;p&gt;Note that you can alter these and all other setting of the created virtual machine at any time using the &lt;b&gt;Settings&lt;/b&gt; dialog accessible through the menu of the main window.&lt;/p&gt;</string>
    76      </property>
    7774     <property name="wordWrap">
    7875      <bool>true</bool>
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette