Commit 2418d1a2 authored by whitlocb's avatar whitlocb
Browse files

Updated splashscreen, version, added initial release notes, moved HTML files...

Updated splashscreen, version, added initial release notes, moved HTML files into help/en_US directory since we'll eventually have multiple translations.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@3931 18c085ea-50e0-402c-830e-de6fd14e8384
parent 5b427b9e
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3093,6 +3093,10 @@ QvisGUIApplication::SetupWindows()
// Brad Whitlock, Tue Apr 8 16:29:55 PDT 2008
// Support for internationalization.
//
// Brad Whitlock, Mon Apr 21 15:29:03 PDT 2008
// Set the application locale into the Help window so we can look for other
// language help documents.
//
// ****************************************************************************
QvisWindowBase *
......@@ -3233,7 +3237,10 @@ QvisGUIApplication::WindowFactory(int i)
break;
case WINDOW_HELP:
// Create the help window
win = new QvisHelpWindow(tr("Help"));
{ QvisHelpWindow *helpwin = new QvisHelpWindow(tr("Help"));
helpwin->SetLocale(applicationLocale);
win = helpwin;
}
break;
case WINDOW_QUERY:
// Create the query window.
......
......@@ -86,10 +86,13 @@
// Brad Whitlock, Wed Apr 9 11:28:58 PDT 2008
// QString for captionString.
//
// Brad Whitlock, Mon Apr 21 15:24:47 PDT 2008
// Added locale.
//
// ****************************************************************************
QvisHelpWindow::QvisHelpWindow(const QString &captionString) :
QvisDelayedWindow(captionString), helpFile(), index(), bookmarks()
QvisDelayedWindow(captionString), helpFile(), index(), bookmarks(), locale()
{
// Set the help path from an environment variable.
char *helpHome = getenv("VISITHELPHOME");
......@@ -119,6 +122,32 @@ QvisHelpWindow::~QvisHelpWindow()
{
}
// ****************************************************************************
// Method: QvisHelpWindow::SetLocale
//
// Purpose:
// Set the locale to be used when searching for help files.
//
// Arguments:
// s : The locale to use.
//
// Returns:
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Mon Apr 21 15:25:26 PDT 2008
//
// Modifications:
//
// ****************************************************************************
void
QvisHelpWindow::SetLocale(const QString &s)
{
locale = s;
}
// ****************************************************************************
// Method: QvisHelpWindow::CreateWindowContents
//
......@@ -290,8 +319,7 @@ QvisHelpWindow::CreateWindowContents()
buttonLayout->addWidget(dismissButton);
// Try and load the help index file.
QString indexFile;
indexFile = helpPath + QString("/visit.helpml");
QString indexFile(CompleteFileName("visit.helpml"));
LoadHelp(indexFile);
// Show the appropriate page based on the activeTab setting.
......@@ -305,6 +333,33 @@ QvisHelpWindow::CreateWindowContents()
helpTabs->blockSignals(false);
}
// ****************************************************************************
// Method: QvisHelpWindow::ReleaseNotesFile
//
// Purpose:
// Returns the name of the release notes file.
//
// Returns: The name of the release notes file.
//
// Note:
//
// Programmer: Brad Whitlock
// Creation: Mon Apr 21 15:05:10 PDT 2008
//
// Modifications:
//
// ****************************************************************************
QString
QvisHelpWindow::ReleaseNotesFile() const
{
QString relNotes, ver(VERSION);
if(ver.right(1) == "b")
ver = ver.left(ver.length()-1);
relNotes = QString("relnotes") + ver + QString(".html");
return relNotes;
}
// ****************************************************************************
// Method: QvisHelpWindow::LoadHelp
//
......@@ -340,6 +395,9 @@ QvisHelpWindow::CreateWindowContents()
// Brad Whitlock, Tue Apr 8 09:27:26 PDT 2008
// Support for internationalization.
//
// Brad Whitlock, Mon Apr 21 15:06:00 PDT 2008
// Changed how we find the release notes file.
//
// ****************************************************************************
void
......@@ -421,10 +479,8 @@ QvisHelpWindow::LoadHelp(const QString &fileName)
QvisHelpListViewItem *releaseNotes = new QvisHelpListViewItem(
helpContents, 0);
QString relNotes;
relNotes.sprintf("relnotes%s.html", VERSION);
releaseNotes->setText(0, tr("Release Notes"));
releaseNotes->setDocument(relNotes);
releaseNotes->setDocument(ReleaseNotesFile());
releaseNotes->setPixmap(0, helpIcon);
// Create a root node for the VisIt home page.
......@@ -529,8 +585,7 @@ QvisHelpWindow::BuildIndex()
AddToIndex(tr("Frequently asked questions"), "faq.html");
AddToIndex(tr("FAQ"), "faq.html");
AddToIndex(tr("VisIt"), "home.html");
QString str; str.sprintf("relnotes%s.html", VERSION);
AddToIndex(tr("Release notes"), str);
AddToIndex(tr("Release notes"), ReleaseNotesFile());
// Populate the index list box.
helpIndex->blockSignals(true);
......@@ -845,14 +900,26 @@ QvisHelpWindow::TopicFromDocHelper(QString &str, const QString &doc,
// Creation: Tue Sep 10 16:24:46 PST 2002
//
// Modifications:
//
// Brad Whitlock, Mon Apr 21 15:32:04 PDT 2008
// Added support for multiple locales.
//
// ****************************************************************************
QString
QvisHelpWindow::CompleteFileName(const QString &page) const
{
QString file;
file.sprintf("%s%s%s", helpPath.latin1(), SLASH_STRING, page.latin1());
QString file(helpPath + QString(SLASH_STRING) +
locale + QString(SLASH_STRING) +
page);
if(!QFile(file).exists())
{
// The page did not exist for the desired locale, revert to the
// en_US page.
file = QString(helpPath + QString(SLASH_STRING) +
QString("en_US") + QString(SLASH_STRING) +
page);
}
return file;
}
......@@ -1180,14 +1247,16 @@ QvisHelpWindow::displayContributors()
// so that the window gets created first if it has not been created so we
// can try to update the page without actually having to show the window
// unless the release notes are present.
//
//
// Brad Whitlock, Mon Apr 21 15:08:45 PDT 2008
// Changed how we find the release notes file.
//
// ****************************************************************************
void
QvisHelpWindow::displayReleaseNotesHelper(bool showWin)
{
QString relnotes;
relnotes.sprintf("relnotes%s.html", VERSION);
QString relnotes(ReleaseNotesFile());
// Since we want to try and display the page before ever showing the
// window, we have to create the window first so we won't try to display
......
......@@ -83,6 +83,9 @@ class QvisHelpListViewItem;
// Brad Whitlock, Wed Apr 9 11:28:42 PDT 2008
// QString for captionString.
//
// Brad Whitlock, Mon Apr 21 15:26:37 PDT 2008
// Added helper methods and the SetLocale method.
//
// ****************************************************************************
class GUI_API QvisHelpWindow : public QvisDelayedWindow
......@@ -92,6 +95,8 @@ public:
QvisHelpWindow(const QString &captionString);
virtual ~QvisHelpWindow();
void SetLocale(const QString &);
virtual void CreateWindowContents();
virtual void CreateNode(DataNode *);
virtual void SetFromNode(DataNode *, const int *borders);
......@@ -123,6 +128,7 @@ private slots:
private:
typedef QMap<QString, QString> IndexMap;
QString ReleaseNotesFile() const;
void LoadHelp(const QString &helpFile);
void BuildIndex();
void AddToIndex(const QString &topic, const QString &doc);
......@@ -136,6 +142,7 @@ private:
void synchronizeContents(const QString &page);
void displayReleaseNotesHelper(bool);
QString locale;
QTabWidget *helpTabs;
QListView *helpContents;
QTextBrowser *helpBrowser;
......
......@@ -191,6 +191,8 @@ SplashScreen::SplashScreen(bool cyclePictures, const char *name) :
if(ret < 0)
{
ver = QString(VERSION);
if(ver.right(1) == "b")
ver = tr("Beta");
drawVersion = true;
}
else if(patch > 0)
......@@ -240,7 +242,7 @@ SplashScreen::SplashScreen(bool cyclePictures, const char *name) :
versionText += " ";
versionText += SVN_REVISION;
lLayout->addWidget(new QLabel(versionText, this, "versionText"));
lLayout->addWidget(new QLabel(tr("April 2008"), this, "dateCompiled"));
lLayout->addWidget(new QLabel(tr("July 2008"), this, "dateCompiled"));
copyrightButton = 0;
contributorButton = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment