- Timestamp:
- Sep 18, 2008 10:04:01 AM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxGlobal.h
r12424 r12553 566 566 static QString languageId(); 567 567 static void loadLanguage (const QString &aLangId = QString::null); 568 QString helpFile() const; 568 569 569 570 static QIcon iconSet (const char *aNormal, -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r12424 r12553 2916 2916 } 2917 2917 2918 QString VBoxGlobal::helpFile() const 2919 { 2920 #if defined (Q_WS_WIN32) || defined (Q_WS_X11) 2921 const QString name = "VirtualBox"; 2922 const QString suffix = "chm"; 2923 #elif defined (Q_WS_MAC) 2924 const QString name = "UserManual"; 2925 const QString suffix = "pdf"; 2926 #endif 2927 /* Where are the docs located? */ 2928 char szDocsPath[RTPATH_MAX]; 2929 int rc = RTPathAppDocs (szDocsPath, sizeof (szDocsPath)); 2930 Assert (RT_SUCCESS (rc)); 2931 2932 /* Construct the path and the filename */ 2933 QString manual = QString ("%1/%2_%3.%4").arg (szDocsPath) 2934 .arg (name) 2935 .arg (vboxGlobal().languageId()) 2936 .arg (suffix); 2937 /* Check if a help file with that name exists */ 2938 QFileInfo fi (manual); 2939 if (fi.exists()) 2940 return manual; 2941 2942 /* Fall back to the standard */ 2943 manual = QString ("%1/%2.%4").arg (szDocsPath) 2944 .arg (name) 2945 .arg (suffix); 2946 return manual; 2947 } 2948 2918 2949 /* static */ 2919 2950 QIcon VBoxGlobal::iconSet (const char *aNormal, -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp
r12098 r12553 2257 2257 { 2258 2258 #ifndef VBOX_OSE 2259 QString manual = vboxGlobal().helpFile(); 2259 2260 #if defined (Q_WS_WIN32) 2260 QString fullHelpFilePath = qApp->applicationDirPath() + "/VirtualBox.chm"; 2261 2262 HtmlHelp (GetDesktopWindow(), fullHelpFilePath.utf16(), 2261 HtmlHelp (GetDesktopWindow(), manual.utf16(), 2263 2262 HH_DISPLAY_TOPIC, NULL); 2264 2263 #elif defined (Q_WS_X11) 2265 char szDocsPath[RTPATH_MAX];2266 2264 char szViewerPath[RTPATH_MAX]; 2267 2265 int rc; 2268 2266 2269 rc = RTPathAppDocs (szDocsPath, sizeof (szDocsPath));2270 Assert(RT_SUCCESS(rc));2271 2267 rc = RTPathAppPrivateArch (szViewerPath, sizeof (szViewerPath)); 2272 2268 Assert(RT_SUCCESS(rc)); 2273 2269 2274 2270 QProcess::startDetached (QString(szViewerPath) + "/kchmviewer", 2275 QStringList ( QString(szDocsPath) + "/VirtualBox.chm"));2271 QStringList (manual)); 2276 2272 #elif defined (Q_WS_MAC) 2277 2273 QProcess::startDetached ("/usr/bin/open", 2278 QStringList ( qApp->applicationDirPath() + "/UserManual.pdf"));2274 QStringList (manual)); 2279 2275 #endif 2280 2276 #endif /* VBOX_OSE */
Note:
See TracChangeset
for help on using the changeset viewer.