Added entry for "Help & Support" to Help menu.

This commit is contained in:
LoRd_MuldeR 2011-03-20 14:28:27 +01:00
parent 8898d87975
commit db6b218d5d
14 changed files with 84 additions and 22 deletions

View File

@ -757,6 +757,22 @@
<source>Disable Shell Integration</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frequently Asked Questions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changelog</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Adding file(s), please wait...</source>
<translation type="unfinished"></translation>
@ -1209,18 +1225,6 @@
<source>The LameXP shell integration has been re-enabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frequently Asked Questions</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Changelog</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1212,15 +1212,19 @@
</message>
<message>
<source>Frequently Asked Questions</source>
<translation type="unfinished"></translation>
<translation>Häufig gestellte Fragen</translation>
</message>
<message>
<source>Changelog</source>
<translation type="unfinished"></translation>
<translation>Versionshistorie</translation>
</message>
<message>
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
<translation>Leitfaden für Übersetzer</translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation>Hilfe und Support</translation>
</message>
</context>
<context>

View File

@ -1221,6 +1221,10 @@
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1230,6 +1230,10 @@ Sélection automatique (par défaut)</translation>
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1222,6 +1222,10 @@
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1224,6 +1224,10 @@
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1221,6 +1221,10 @@
<source>Translator&apos;s Guide</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Help &amp;&amp; Support</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1057,8 +1057,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>604</width>
<height>1091</height>
<width>602</width>
<height>1088</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_22">
@ -2726,6 +2726,7 @@
<string>?</string>
</property>
<addaction name="actionCheckUpdates"/>
<addaction name="actionVisitSupport"/>
<addaction name="actionVisitHomepage"/>
<addaction name="separator"/>
<addaction name="actionDocumentFAQ"/>
@ -3062,6 +3063,15 @@
<string>Translator's Guide</string>
</property>
</action>
<action name="actionVisitSupport">
<property name="icon">
<iconset resource="../res/Icons.qrc">
<normaloff>:/icons/group.png</normaloff>:/icons/group.png</iconset>
</property>
<property name="text">
<string>Help &amp;&amp; Support</string>
</property>
</action>
</widget>
<resources>
<include location="../res/Icons.qrc"/>
@ -3127,6 +3137,7 @@
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
</resources>
<connections>
<connection>

View File

@ -47,6 +47,7 @@
<file>icons/folder_explore.png</file>
<file>icons/folder_page.png</file>
<file>icons/font.png</file>
<file>icons/group.png</file>
<file>icons/house.png</file>
<file>icons/hourglass.png</file>
<file>icons/information.png</file>

Binary file not shown.

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_BUILD 380
#define VER_LAMEXP_BUILD 382
#define VER_LAMEXP_SUFFIX Beta-10
/*

View File

@ -325,11 +325,14 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(actionShowDropBoxWidget, SIGNAL(triggered(bool)), this, SLOT(showDropBoxWidgetActionTriggered(bool)));
//Activate help menu actions
actionVisitHomepage->setData(QString::fromLatin1(lamexp_website_url()));
actionVisitSupport->setData(QString::fromLatin1(lamexp_support_url()));
actionDocumentFAQ->setData(QString("%1/FAQ.html").arg(QApplication::applicationDirPath()));
actionDocumentChangelog->setData(QString("%1/Changelog.html").arg(QApplication::applicationDirPath()));
actionDocumentTranslate->setData(QString("%1/Translate.html").arg(QApplication::applicationDirPath()));
connect(actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated()));
connect(actionVisitHomepage, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
connect(actionVisitSupport, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
connect(actionDocumentFAQ, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
connect(actionDocumentChangelog, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
connect(actionDocumentTranslate, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
@ -1515,7 +1518,13 @@ void MainWindow::clearMetaButtonClicked(void)
*/
void MainWindow::visitHomepageActionActivated(void)
{
QDesktopServices::openUrl(QUrl(lamexp_website_url()));
if(QAction *action = dynamic_cast<QAction*>(QObject::sender()))
{
if(action->data().isValid() && (action->data().type() == QVariant::String))
{
QDesktopServices::openUrl(QUrl(action->data().toString()));
}
}
}
/*
@ -1531,7 +1540,7 @@ void MainWindow::documentActionActivated(void)
QFileInfo resource(QString(":/doc/%1.html").arg(document.baseName()));
if(document.exists() && document.isFile() && (document.size() == resource.size()))
{
QDesktopServices::openUrl(QUrl(QString("file:///%1").arg(document.canonicalFilePath())));
QDesktopServices::openUrl(QUrl::fromLocalFile(document.canonicalFilePath()));
}
else
{
@ -1543,7 +1552,7 @@ void MainWindow::documentActionActivated(void)
action->setData(output.fileName());
source.close();
output.close();
QDesktopServices::openUrl(QUrl(QString("file:///%1").arg(output.fileName())));
QDesktopServices::openUrl(QUrl::fromLocalFile(output.fileName()));
}
}
}

View File

@ -132,6 +132,7 @@ static bool g_lamexp_console_attached = false;
//Official web-site URL
static const char *g_lamexp_website_url = "http://mulder.dummwiedeutsch.de/";
static const char *g_lamexp_support_url = "http://forum.doom9.org/showthread.php?t=157726";
//Tool versions (expected)
static const unsigned int g_lamexp_toolver_neroaac = VER_LAMEXP_TOOL_NEROAAC;
@ -198,13 +199,24 @@ unsigned int lamexp_version_build(void) { return g_lamexp_version.ver_build; }
const char *lamexp_version_release(void) { return g_lamexp_version.ver_release_name; }
const char *lamexp_version_compiler(void) {return g_lamexp_version_compiler; }
unsigned int lamexp_toolver_neroaac(void) { return g_lamexp_toolver_neroaac; }
const char *lamexp_website_url(void) { return g_lamexp_website_url; }
/*
* URL getters
*/
const char *lamexp_website_url(void) { return g_lamexp_website_url; }
const char *lamexp_support_url(void) { return g_lamexp_support_url; }
/*
* Check for Demo (pre-release) version
*/
bool lamexp_version_demo(void)
{
return LAMEXP_DEBUG || !(strstr(g_lamexp_version.ver_release_name, "Final") || strstr(g_lamexp_version.ver_release_name, "Hotfix"));
}
/*
* Calculate expiration date
*/
QDate lamexp_version_expires(void)
{
return lamexp_version_date().addDays(LAMEXP_DEBUG ? 2 : 30);

View File

@ -77,6 +77,7 @@ const char *lamexp_version_compiler(void);
QDate lamexp_version_expires(void);
unsigned int lamexp_toolver_neroaac(void);
const char *lamexp_website_url(void);
const char *lamexp_support_url(void);
//Public functions
void lamexp_init_console(int argc, char* argv[]);