Added an "About..." entry to the system menu.

This commit is contained in:
LoRd_MuldeR 2012-10-17 23:34:42 +02:00
parent 61d440303b
commit a2fd0f2460
7 changed files with 676 additions and 656 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 6 #define VER_LAMEXP_MINOR_LO 6
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3 #define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 1151 #define VER_LAMEXP_BUILD 1152
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!) // Tool versions (minimum expected versions!)

View File

@ -144,6 +144,8 @@ while(0)
#define USE_NATIVE_FILE_DIALOG (lamexp_themes_enabled() || ((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) < QSysInfo::WV_XP)) #define USE_NATIVE_FILE_DIALOG (lamexp_themes_enabled() || ((QSysInfo::windowsVersion() & QSysInfo::WV_NT_based) < QSysInfo::WV_XP))
#define CENTER_CURRENT_OUTPUT_FOLDER_DELAYED QTimer::singleShot(125, this, SLOT(centerOutputFolderModel())) #define CENTER_CURRENT_OUTPUT_FOLDER_DELAYED QTimer::singleShot(125, this, SLOT(centerOutputFolderModel()))
static const DWORD IDM_ABOUTBOX = 0xEFF0;
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Constructor // Constructor
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
@ -179,6 +181,13 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
tabWidget->setCurrentIndex(0); tabWidget->setCurrentIndex(0);
connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabPageChanged(int))); connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(tabPageChanged(int)));
//Add system menu
if(HMENU hMenu = ::GetSystemMenu(winId(), FALSE))
{
AppendMenuW(hMenu, MF_SEPARATOR, 0, 0);
AppendMenuW(hMenu, MF_STRING, IDM_ABOUTBOX, L"About...");
}
//-------------------------------- //--------------------------------
// Setup "Source" tab // Setup "Source" tab
//-------------------------------- //--------------------------------
@ -969,6 +978,12 @@ void MainWindow::changeEvent(QEvent *e)
ShellIntegration::install(); ShellIntegration::install();
} }
//Translate system menu
if(HMENU hMenu = ::GetSystemMenu(winId(), FALSE))
{
ModifyMenu(hMenu, IDM_ABOUTBOX, MF_STRING | MF_BYCOMMAND, IDM_ABOUTBOX, QWCHAR(buttonAbout->text()));
}
//Force resize, if needed //Force resize, if needed
tabPageChanged(tabWidget->currentIndex()); tabPageChanged(tabWidget->currentIndex());
} }
@ -1153,6 +1168,11 @@ bool MainWindow::event(QEvent *e)
bool MainWindow::winEvent(MSG *message, long *result) bool MainWindow::winEvent(MSG *message, long *result)
{ {
if((message->message == WM_SYSCOMMAND) && ((message->wParam & 0xFFF0) == IDM_ABOUTBOX))
{
buttonAbout->click();
return true;
}
return WinSevenTaskbar::handleWinEvent(message, result); return WinSevenTaskbar::handleWinEvent(message, result);
} }

View File

@ -170,7 +170,7 @@ SIZE_T lamexp_dbg_private_bytes(void);
#define LAMEXP_MIN_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor > (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor >= (VER_MIN)))) #define LAMEXP_MIN_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor > (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor >= (VER_MIN))))
#define LAMEXP_MAX_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor < (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor <= (VER_MIN)))) #define LAMEXP_MAX_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor < (VER_MAJ)) || (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor <= (VER_MIN))))
#define LAMEXP_EQL_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor == (VER_MIN))) #define LAMEXP_EQL_OS_VER(VER_INFO, VER_MAJ, VER_MIN) (((VER_INFO)->versionMajor == (VER_MAJ)) && ((VER_INFO)->versionMinor == (VER_MIN)))
#define QWCHAR(STR) reinterpret_cast<const wchar_t*>(STR.utf16()) #define QWCHAR(STR) reinterpret_cast<const wchar_t*>((STR).utf16())
#define WCHAR2QSTR(STR) QString::fromUtf16(reinterpret_cast<const unsigned short*>(STR)) #define WCHAR2QSTR(STR) QString::fromUtf16(reinterpret_cast<const unsigned short*>(STR))
#define LAMEXP_BOOL2STR(X) (X ? "1" : "0") #define LAMEXP_BOOL2STR(X) (X ? "1" : "0")
#define LAMEXP_MAKE_STRING_EX(X) #X #define LAMEXP_MAKE_STRING_EX(X) #X