Changeset 51004 in vbox
- Timestamp:
- Apr 8, 2014 5:13:43 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
r49779 r51004 51 51 52 52 /* Machine-window definitions: */ 53 #ifndef Q_WS_MAC 54 const char* UIDefs::GUI_MachineWindowIcons = "GUI/MachineWindowIcons"; 55 #endif /* !Q_WS_MAC */ 53 56 const char* UIDefs::GUI_RestrictedRuntimeMenus = "GUI/RestrictedRuntimeMenus"; 54 57 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r49779 r51004 120 120 121 121 /* Machine-window declarations: */ 122 #ifndef Q_WS_MAC 123 extern const char* GUI_MachineWindowIcons; 124 #endif /* !Q_WS_MAC */ 122 125 extern const char* GUI_RestrictedRuntimeMenus; 123 126 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r50935 r51004 4084 4084 } 4085 4085 4086 #ifndef Q_WS_MAC 4087 /* static */ 4088 QStringList VBoxGlobal::machineWindowIconNames(CMachine &machine) 4089 { 4090 /* Return result: */ 4091 return machine.GetExtraDataStringList(GUI_MachineWindowIcons); 4092 } 4093 #endif /* !Q_WS_MAC */ 4094 4086 4095 #ifdef RT_OS_LINUX 4087 4096 /* static */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r50935 r51004 397 397 static QList<GlobalSettingsPageType> restrictedGlobalSettingsPages(CVirtualBox &vbox); 398 398 static QList<MachineSettingsPageType> restrictedMachineSettingsPages(CMachine &machine); 399 #ifndef Q_WS_MAC 400 /** Loads redefined machine-window icon names. */ 401 static QStringList machineWindowIconNames(CMachine &machine); 402 #endif /* !Q_WS_MAC */ 399 403 400 404 #ifdef RT_OS_LINUX -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r50631 r51004 174 174 { 175 175 #ifndef Q_WS_MAC 176 /* On Mac OS X applicationicon referenced in info.plist is used. */177 178 /* Set default applicationicon (will be changed to VM-specific icon little bit later): */176 /* On Mac OS X window icon referenced in info.plist is used. */ 177 178 /* Set default window icon (will be changed to VM-specific icon little bit later): */ 179 179 setWindowIcon(QIcon(":/VirtualBox_48px.png")); 180 180 181 /* Set VM-specific application icon: */ 182 setWindowIcon(vboxGlobal().vmGuestOSTypeIcon(machine().GetOSTypeId())); 181 /* Set redefined machine-window icon if any: */ 182 QIcon *pMachineWidnowIcon = uisession()->machineWindowIcon(); 183 if (pMachineWidnowIcon) 184 setWindowIcon(*pMachineWidnowIcon); 185 /* Or set default machine-window icon: */ 186 else 187 setWindowIcon(vboxGlobal().vmGuestOSTypeIcon(machine().GetOSTypeId())); 183 188 #endif /* !Q_WS_MAC */ 184 189 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r50801 r51004 130 130 , m_machineStatePrevious(KMachineState_Null) 131 131 , m_machineState(session().GetMachine().GetState()) 132 #ifndef Q_WS_MAC 133 , m_pMachineWindowIcon(0) 134 #endif /* !Q_WS_MAC */ 132 135 , m_fIsExtensionPackUsable(false) 133 136 , m_requestedVisualStateType(UIVisualStateType_Invalid) … … 1117 1120 QString strSettings; 1118 1121 1122 #ifndef Q_WS_MAC 1123 /* Load/prepare user's machine-window icon: */ 1124 QIcon icon; 1125 foreach (const QString &strIconName, VBoxGlobal::machineWindowIconNames(machine)) 1126 if (!strIconName.isEmpty()) 1127 icon.addFile(strIconName); 1128 if (!icon.isNull()) 1129 m_pMachineWindowIcon = new QIcon(icon); 1130 #endif /* !Q_WS_MAC */ 1131 1119 1132 /* Is there should be First RUN Wizard? */ 1120 1133 strSettings = machine.GetExtraData(GUI_FirstRun); … … 1179 1192 # endif /* Q_WS_WIN */ 1180 1193 #endif 1194 1195 #ifndef Q_WS_MAC 1196 /* Cleanup user's machine-window icon: */ 1197 delete m_pMachineWindowIcon; 1198 m_pMachineWindowIcon = 0; 1199 #endif /* !Q_WS_MAC */ 1181 1200 } 1182 1201 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r50490 r51004 41 41 class CNetworkAdapter; 42 42 class CMediumAttachment; 43 #ifndef Q_WS_MAC 44 class QIcon; 45 #endif /* !Q_WS_MAC */ 43 46 44 47 /* CConsole callback event types: */ … … 94 97 QCursor cursor() const { return m_cursor; } 95 98 99 #ifndef Q_WS_MAC 100 /** @name Branding stuff. 101 ** @{ */ 102 /** Returns redefined machine-window icon. */ 103 QIcon* machineWindowIcon() const { return m_pMachineWindowIcon; } 104 /** @} */ 105 #endif /* !Q_WS_MAC */ 106 96 107 /** @name Extension Pack stuff. 97 108 ** @{ */ … … 330 341 QCursor m_cursor; 331 342 343 #ifndef Q_WS_MAC 344 /** @name Branding variables. 345 ** @{ */ 346 /** Holds redefined machine-window icon. */ 347 QIcon *m_pMachineWindowIcon; 348 /** @} */ 349 #endif /* !Q_WS_MAC */ 350 332 351 /** @name Extension Pack variables. 333 352 ** @{ */
Note:
See TracChangeset
for help on using the changeset viewer.