UI: Add system tray capability

This adds a system tray when enabled. There is also a option to minimize
to the system tray when the app is started.

Closes jp9000/obs-studio#595
This commit is contained in:
cg2121 2016-08-13 09:36:17 -05:00 • committed by jp9000
commit b71f5cc4fc
11 changed files with 298 additions and 22 deletions

View file

@ -604,9 +604,13 @@ bool SimpleOutput::StartRecording()
os_dir_t *dir = path ? os_opendir(path) : nullptr;
if (!dir) {
QMessageBox::information(main,
QTStr("Output.BadPath.Title"),
QTStr("Output.BadPath.Text"));
if (main->isVisible())
QMessageBox::information(main,
QTStr("Output.BadPath.Title"),
QTStr("Output.BadPath.Text"));
else
main->SysTrayNotify(QTStr("Output.BadPath.Text"),
QSystemTrayIcon::Warning);
return false;
}
@ -1147,9 +1151,13 @@ bool AdvancedOutput::StartRecording()
os_dir_t *dir = path ? os_opendir(path) : nullptr;
if (!dir) {
QMessageBox::information(main,
QTStr("Output.BadPath.Title"),
QTStr("Output.BadPath.Text"));
if (main->isVisible())
QMessageBox::information(main,
QTStr("Output.BadPath.Title"),
QTStr("Output.BadPath.Text"));
else
main->SysTrayNotify(QTStr("Output.BadPath.Text"),
QSystemTrayIcon::Warning);
return false;
}