- Timestamp:
- Sep 18, 2009 6:50:43 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxHostVersion.cpp
r23074 r23111 29 29 /* Returns 0 if equal, 1 if Ver1 is greater, 2 if Ver2 is greater 30 30 * Requires strings in form of "majorVer.minorVer.build" */ 31 /** @todo should be common code in the guest lib / headers */ 31 32 int VBoxCompareVersion (const char* pszVer1, const char* pszVer2) 32 33 { … … 64 65 { 65 66 /* Look up host version (revision) */ 66 char *pszVBoxHostVer; // , *pszVBoxHostRev;67 char *pszVBoxHostVer; 67 68 rc = VbglR3GuestPropReadValueAlloc(uGuestPropSvcClientID, "/VirtualBox/HostInfo/VBoxVer", &pszVBoxHostVer); 68 if (RT_FAILURE(rc))69 if (RT_FAILURE(rc)) 69 70 Log(("VBoxTray: Could not read VBox host version! rc = %d\n", rc)); 70 71 /*rc = VbglR3GuestPropReadValueAlloc(uGuestPropSvcClientID, "/VirtualBox/HostInfo/VBoxRev", &pszVBoxHostRev);72 if(RT_FAILURE(rc))73 Log(("VBoxTray: Could not read VBox host revision! rc = %d\n", rc));*/74 71 75 72 if (RT_SUCCESS(rc)) … … 113 110 { 114 111 /** @todo add some translation macros here */ 115 _snprintf(szTitle, sizeof(szTitle), "New VirtualBox Guest Additions %s available!", pszVBoxHostVer); 116 _snprintf(szMsg, sizeof(szMsg), "A new version %s of VirtualBox has been installed on the host. " 117 "To ensure that this guest can take advantage of the host's version, " 118 "please also update the Guest Additions (current: %s) of this machine.", 119 pszVBoxHostVer, szVBoxGuestVer); 112 _snprintf(szTitle, sizeof(szTitle), "VirtualBox Guest Additions update available!"); 113 _snprintf(szMsg, sizeof(szMsg), "Your guest is currently running the Guest Additions version %s. " 114 "We recommend updating to the latest version (%s) by choosing the " 115 "install option from the Devices menu.", szVBoxGuestVer, pszVBoxHostStr); 120 116 121 117 /* Save the version to just do a balloon once per new version */ … … 141 137 Log(("VBoxTray: Could not open VBoxTray registry key! Error = %ld\n", lRet)); 142 138 143 if (lRet != ERROR_SUCCESS)139 if (lRet != ERROR_SUCCESS) 144 140 rc = RTErrConvertFromWin32(lRet); 145 141 } … … 148 144 } 149 145 VbglR3GuestPropReadValueFree(pszVBoxHostVer); 150 //VbglR3GuestPropReadValueFree(pszVBoxHostRev);151 146 } 152 147 153 if (RT_SUCCESS(rc) && strlen(szMsg))148 if (RT_SUCCESS(rc) && strlen(szMsg)) 154 149 { 155 150 rc = showBalloonTip(gInstance, gToolWindow, ID_TRAYICON, szMsg, szTitle, 5000, 0); 156 if (RT_FAILURE(rc))151 if (RT_FAILURE(rc)) 157 152 Log(("VBoxTray: Could not show version notifier balloon tooltip! rc = %d\n", rc)); 158 153 }
Note:
See TracChangeset
for help on using the changeset viewer.