VirtualBox

Changeset 105772 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 21, 2024 2:56:51 PM (3 months ago)
Author:
vboxsync
Message:

FE/Qt: Action pool & VISO Creator: Renaming Toggle Settings action NLS to Toggle Preferences as we are using preferences pane now, not separate settings dialog; Besides that, some internal refactoring for enum value and variables.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp

    r105771 r105772  
    23452345};
    23462346
    2347 /** Toggle action extension, used to toggle 'VISO Creator settings' dialog in file manager. */
    2348 class UIActionMenuVISOCreatorToggleSettingsDialog : public UIActionToggle
    2349 {
    2350     Q_OBJECT;
    2351 
    2352 public:
    2353 
    2354     /** Constructs action passing @a pParent to the base-class. */
    2355     UIActionMenuVISOCreatorToggleSettingsDialog(UIActionPool *pParent)
     2347/** Toggle action extension, used to toggle 'VISO Creator Preferences' pane in VISO Creator. */
     2348class UIActionToggleVISOCreatorPreferences : public UIActionToggle
     2349{
     2350    Q_OBJECT;
     2351
     2352public:
     2353
     2354    /** Constructs action passing @a pParent to the base-class. */
     2355    UIActionToggleVISOCreatorPreferences(UIActionPool *pParent)
    23562356        : UIActionToggle(pParent)
    23572357    {
     
    23682368    virtual QString shortcutExtraDataID() const RT_OVERRIDE
    23692369    {
    2370         return QString("ToggleVISOCreatorSettingsDialog");
     2370        return QString("ToggleVISOCreatorPreferences");
    23712371    }
    23722372
     
    23802380    virtual void retranslateUi() RT_OVERRIDE
    23812381    {
    2382         setName(QApplication::translate("UIActionPool", "Settings"));
     2382        setName(QApplication::translate("UIActionPool", "&Preferences"));
    23832383        setShortcutScope(QApplication::translate("UIActionPool", "VISO Creator"));
    2384         setStatusTip(QApplication::translate("UIActionPool", "Open VISO Creator settings dialog"));
    2385         setToolTip(QApplication::translate("UIActionPool", "Open Settings Dialog")
     2384        setStatusTip(QApplication::translate("UIActionPool", "Open pane with VISO Creator preferences"));
     2385        setToolTip(QApplication::translate("UIActionPool", "Open Preferences Pane")
    23862386                   + (shortcut().isEmpty() ? QString() : QString(" (%1)").arg(shortcut().toString())));
    23872387    }
     
    35613561    /* Create VISO Creator actions: */
    35623562    m_pool[UIActionIndex_M_VISOCreator] = new UIActionMenuVISOCreator(this);
    3563     m_pool[UIActionIndex_M_VISOCreator_ToggleSettingsDialog] = new UIActionMenuVISOCreatorToggleSettingsDialog(this);
     3563    m_pool[UIActionIndex_M_VISOCreator_TogglePreferences] = new UIActionToggleVISOCreatorPreferences(this);
    35643564    m_pool[UIActionIndex_M_VISOCreator_Add] = new UIActionMenuVISOCreatorAdd(this);
    35653565    m_pool[UIActionIndex_M_VISOCreator_Remove] = new UIActionMenuVISOCreatorRemove(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h

    r104445 r105772  
    55
    66/*
    7  * Copyright (C) 2010-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2010-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    149149    /* VISO Creator actions: */
    150150    UIActionIndex_M_VISOCreator,
    151     UIActionIndex_M_VISOCreator_ToggleSettingsDialog,
     151    UIActionIndex_M_VISOCreator_TogglePreferences,
    152152    UIActionIndex_M_VISOCreator_Add,
    153153    UIActionIndex_M_VISOCreator_Remove,
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp

    r104915 r105772  
    55
    66/*
    7  * Copyright (C) 2006-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    311311                                         bool fShowToolBar, const QString& strVisoFilePath, const QString& strMachineName)
    312312    : QWidget(pParent)
    313     , m_pActionSettings(0)
     313    , m_pActionPreferences(0)
    314314    , m_pAddAction(0)
    315315    , m_pOpenAction(0)
     
    334334    populateMenuMainToolbar();
    335335    prepareConnections();
    336     if (m_pActionSettings)
    337         sltSettingsActionToggled(m_pActionSettings->isChecked());
     336    if (m_pActionPreferences)
     337        sltSettingsActionToggled(m_pActionPreferences->isChecked());
    338338}
    339339
     
    503503void UIVisoCreatorWidget::sltPanelContainerHidden()
    504504{
    505     m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleSettingsDialog)->blockSignals(true);
    506     m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleSettingsDialog)->setChecked(false);
    507     m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleSettingsDialog)->blockSignals(false);
     505    m_pActionPool->action(UIActionIndex_M_VISOCreator_TogglePreferences)->blockSignals(true);
     506    m_pActionPool->action(UIActionIndex_M_VISOCreator_TogglePreferences)->setChecked(false);
     507    m_pActionPool->action(UIActionIndex_M_VISOCreator_TogglePreferences)->blockSignals(false);
    508508}
    509509
     
    594594    }
    595595
    596     if (m_pActionSettings)
    597         connect(m_pActionSettings, &QAction::triggered, this, &UIVisoCreatorWidget::sltSettingsActionToggled);
     596    if (m_pActionPreferences)
     597        connect(m_pActionPreferences, &QAction::triggered, this, &UIVisoCreatorWidget::sltSettingsActionToggled);
    598598
    599599    if (m_pSettingsWidget)
     
    627627        return;
    628628
    629     m_pActionSettings = m_pActionPool->action(UIActionIndex_M_VISOCreator_ToggleSettingsDialog);
     629    m_pActionPreferences = m_pActionPool->action(UIActionIndex_M_VISOCreator_TogglePreferences);
    630630
    631631    m_pAddAction = m_pActionPool->action(UIActionIndex_M_VISOCreator_Add);
     
    648648    if (m_pToolBar)
    649649    {
    650         if (m_pActionSettings)
    651             m_pToolBar->addAction(m_pActionSettings);
     650        if (m_pActionPreferences)
     651            m_pToolBar->addAction(m_pActionPreferences);
    652652    }
    653653    if (m_pMainMenu)
    654654    {
    655         m_pMainMenu->addAction(m_pActionSettings);
     655        m_pMainMenu->addAction(m_pActionPreferences);
    656656        m_pMainMenu->addSeparator();
    657657        if (m_pOpenAction)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r104232 r105772  
    55
    66/*
    7  * Copyright (C) 2006-2023 Oracle and/or its affiliates.
     7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
    88 *
    99 * This file is part of VirtualBox base platform packages, as
     
    155155    /** @name Main toolbar (and main menu) actions
    156156      * @{ */
    157         QAction         *m_pActionSettings;
     157        QAction         *m_pActionPreferences;
    158158    /** @} */
    159159
Note: See TracChangeset for help on using the changeset viewer.

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