- Timestamp:
- Sep 27, 2018 3:39:39 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.cpp
r74501 r74505 105 105 m_pLayout->addWidget(m_pPaneDesktop); 106 106 m_pLayout->setCurrentWidget(m_pPaneDesktop); 107 108 /* Retranslate Desktop pane: */ 109 retranslateDesktopPane(); 107 110 } 108 111 break; … … 189 192 void UIToolPaneGlobal::retranslateUi() 190 193 { 191 if (m_pPaneDesktop) 192 { 193 /* Translate Global Tools welcome screen: */ 194 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_banner_global_200px.png")); 195 m_pPaneDesktop->setToolsPaneText( 196 tr("<h3>Welcome to VirtualBox!</h3>" 197 "<p>This window represents a set of global tools " 198 "which are currently opened (or can be opened). " 199 "They are not related to any particular machine but " 200 "to the complete VM collection. For a list of currently " 201 "available tools check the corresponding menu at the right " 202 "side of the main tool bar located at the top of the window. " 203 "This list will be extended with new tools in future releases.</p>" 204 "<p>You can press the <b>%1</b> key to get instant help, or visit " 205 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 206 "for more information and latest news.</p>") 207 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 208 209 /* Wipe out the tool descriptions: */ 210 m_pPaneDesktop->removeToolDescriptions(); 211 212 /* Add tool descriptions: */ 213 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager); 214 m_pPaneDesktop->addToolDescription(pAction1, 215 tr("Tool to observe virtual storage media. " 216 "Reflects all the chains of virtual disks you have registered " 217 "(per each storage type) within your virtual machines and allows for media " 218 "operations like copy, remove, release " 219 "(detach it from VMs where it is currently attached to) and observe their properties. " 220 "Allows to edit medium attributes like type, " 221 "location/name, description and size (for dynamical storages " 222 "only).")); 223 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager); 224 m_pPaneDesktop->addToolDescription(pAction2, 225 tr("Tool to control host-only network interfaces. " 226 "Reflects host-only networks, their DHCP servers and allows " 227 "for operations on the networks like possibility to create, remove " 228 "and observe their properties. Allows to edit various " 229 "attributes for host-only interface and corresponding DHCP server.")); 230 } 194 retranslateDesktopPane(); 231 195 } 232 196 … … 254 218 } 255 219 220 void UIToolPaneGlobal::retranslateDesktopPane() 221 { 222 if (!m_pPaneDesktop) 223 return; 224 225 /* Translate Global Tools welcome screen: */ 226 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_banner_global_200px.png")); 227 m_pPaneDesktop->setToolsPaneText( 228 tr("<h3>Welcome to VirtualBox!</h3>" 229 "<p>This window represents a set of global tools " 230 "which are currently opened (or can be opened). " 231 "They are not related to any particular machine but " 232 "to the complete VM collection. For a list of currently " 233 "available tools check the corresponding menu at the right " 234 "side of the main tool bar located at the top of the window. " 235 "This list will be extended with new tools in future releases.</p>" 236 "<p>You can press the <b>%1</b> key to get instant help, or visit " 237 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 238 "for more information and latest news.</p>") 239 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 240 241 /* Wipe out the tool descriptions: */ 242 m_pPaneDesktop->removeToolDescriptions(); 243 244 /* Add tool descriptions: */ 245 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager); 246 m_pPaneDesktop->addToolDescription(pAction1, 247 tr("Tool to observe virtual storage media. " 248 "Reflects all the chains of virtual disks you have registered " 249 "(per each storage type) within your virtual machines and allows for media " 250 "operations like copy, remove, release " 251 "(detach it from VMs where it is currently attached to) and observe their properties. " 252 "Allows to edit medium attributes like type, " 253 "location/name, description and size (for dynamical storages " 254 "only).")); 255 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager); 256 m_pPaneDesktop->addToolDescription(pAction2, 257 tr("Tool to control host-only network interfaces. " 258 "Reflects host-only networks, their DHCP servers and allows " 259 "for operations on the networks like possibility to create, remove " 260 "and observe their properties. Allows to edit various " 261 "attributes for host-only interface and corresponding DHCP server.")); 262 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneGlobal.h
r73424 r74505 76 76 void cleanup(); 77 77 78 /** Handles translation for Desktop pane. */ 79 void retranslateDesktopPane(); 80 78 81 /** Holds the action pool reference. */ 79 82 UIActionPool *m_pActionPool; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r74501 r74505 109 109 m_pLayout->addWidget(m_pPaneDesktop); 110 110 m_pLayout->setCurrentWidget(m_pPaneDesktop); 111 112 /* Retranslate Desktop pane: */ 113 retranslateDesktopPane(); 111 114 } 112 115 break; … … 255 258 void UIToolPaneMachine::retranslateUi() 256 259 { 257 if (m_pPaneDesktop) 258 { 259 /* Translate Machine Tools welcome screen: */ 260 if (!m_pItem || !m_pItem->accessible()) 261 { 262 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/welcome_200px.png")); 263 m_pPaneDesktop->setToolsPaneText( 264 tr("<h3>Welcome to VirtualBox!</h3>" 265 "<p>The left part of this window lists all virtual " 266 "machines and virtual machine groups on your computer. " 267 "The list is empty now because you haven't created any " 268 "virtual machines yet.</p>" 269 "<p>In order to create a new virtual machine, press the " 270 "<b>New</b> button in the main tool bar located at the " 271 "top of the window.</p>" 272 "<p>You can press the <b>%1</b> key to get instant help, or visit " 273 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 274 "for more information and latest news.</p>") 275 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 276 } 277 else 278 { 279 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_banner_machine_200px.png")); 280 m_pPaneDesktop->setToolsPaneText( 281 tr("<h3>Welcome to VirtualBox!</h3>" 282 "<p>The left part of this window lists all virtual " 283 "machines and virtual machine groups on your computer.</p>" 284 "<p>The right part of this window represents a set of " 285 "tools which are currently opened (or can be opened) for " 286 "the currently chosen machine. For a list of currently " 287 "available tools check the corresponding menu at the right " 288 "side of the main tool bar located at the top of the window. " 289 "This list will be extended with new tools in future releases.</p>" 290 "<p>You can press the <b>%1</b> key to get instant help, or visit " 291 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 292 "for more information and latest news.</p>") 293 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 294 } 295 296 /* Wipe out the tool descriptions: */ 297 m_pPaneDesktop->removeToolDescriptions(); 298 299 /* Add tool descriptions: */ 300 if (m_pItem && m_pItem->accessible()) 301 { 302 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_Details); 303 m_pPaneDesktop->addToolDescription(pAction1, 304 tr("Tool to observe virtual machine (VM) details. " 305 "Reflects groups of properties for the currently chosen VM and allows " 306 "basic operations on certain properties (like the machine storage devices).")); 307 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots); 308 m_pPaneDesktop->addToolDescription(pAction2, 309 tr("Tool to control virtual machine (VM) snapshots. " 310 "Reflects snapshots created for the currently selected VM and allows " 311 "snapshot operations like create, remove, " 312 "restore (make current) and observe their properties. Allows to " 313 "edit snapshot attributes like name and description.")); 314 QAction *pAction3 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer); 315 m_pPaneDesktop->addToolDescription(pAction3, 316 tr("Tool to display virtual machine (VM) logs. ")); 317 } 318 } 260 retranslateDesktopPane(); 319 261 } 320 262 … … 341 283 } 342 284 } 285 286 void UIToolPaneMachine::retranslateDesktopPane() 287 { 288 /* Make sure pane exists: */ 289 if (!m_pPaneDesktop) 290 return; 291 292 /* Translate Machine Tools welcome screen: */ 293 if (!m_pItem || !m_pItem->accessible()) 294 { 295 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/welcome_200px.png")); 296 m_pPaneDesktop->setToolsPaneText( 297 tr("<h3>Welcome to VirtualBox!</h3>" 298 "<p>The left part of this window lists all virtual " 299 "machines and virtual machine groups on your computer. " 300 "The list is empty now because you haven't created any " 301 "virtual machines yet.</p>" 302 "<p>In order to create a new virtual machine, press the " 303 "<b>New</b> button in the main tool bar located at the " 304 "top of the window.</p>" 305 "<p>You can press the <b>%1</b> key to get instant help, or visit " 306 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 307 "for more information and latest news.</p>") 308 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 309 } 310 else 311 { 312 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_banner_machine_200px.png")); 313 m_pPaneDesktop->setToolsPaneText( 314 tr("<h3>Welcome to VirtualBox!</h3>" 315 "<p>The left part of this window lists all virtual " 316 "machines and virtual machine groups on your computer.</p>" 317 "<p>The right part of this window represents a set of " 318 "tools which are currently opened (or can be opened) for " 319 "the currently chosen machine. For a list of currently " 320 "available tools check the corresponding menu at the right " 321 "side of the main tool bar located at the top of the window. " 322 "This list will be extended with new tools in future releases.</p>" 323 "<p>You can press the <b>%1</b> key to get instant help, or visit " 324 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 325 "for more information and latest news.</p>") 326 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 327 } 328 329 /* Wipe out the tool descriptions: */ 330 m_pPaneDesktop->removeToolDescriptions(); 331 332 /* Add tool descriptions: */ 333 if (m_pItem && m_pItem->accessible()) 334 { 335 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_Details); 336 m_pPaneDesktop->addToolDescription(pAction1, 337 tr("Tool to observe virtual machine (VM) details. " 338 "Reflects groups of properties for the currently chosen VM and allows " 339 "basic operations on certain properties (like the machine storage devices).")); 340 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots); 341 m_pPaneDesktop->addToolDescription(pAction2, 342 tr("Tool to control virtual machine (VM) snapshots. " 343 "Reflects snapshots created for the currently selected VM and allows " 344 "snapshot operations like create, remove, " 345 "restore (make current) and observe their properties. Allows to " 346 "edit snapshot attributes like name and description.")); 347 QAction *pAction3 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer); 348 m_pPaneDesktop->addToolDescription(pAction3, 349 tr("Tool to display virtual machine (VM) logs. ")); 350 } 351 } -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.h
r73424 r74505 97 97 void cleanup(); 98 98 99 /** Handles translation for Desktop pane. */ 100 void retranslateDesktopPane(); 101 99 102 /** Holds the action pool reference. */ 100 103 UIActionPool *m_pActionPool; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIWelcomePane.cpp
r73456 r74505 796 796 const QSize firstOne = aSizes.isEmpty() ? QSize(200, 200) : aSizes.first(); 797 797 const double dRatio = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize) / 32; 798 m_pLabelToolsPaneIcon->setPixmap(m_icon.pixmap(window()->windowHandle(), QSize(firstOne.width() * dRatio, firstOne.height() * dRatio))); 798 if (!m_icon.isNull()) 799 m_pLabelToolsPaneIcon->setPixmap(m_icon.pixmap(window()->windowHandle(), QSize(firstOne.width() * dRatio, firstOne.height() * dRatio))); 799 800 } 800 801
Note:
See TracChangeset
for help on using the changeset viewer.