New upstream version 19.0.3+dfsg1

This commit is contained in:
Sebastian Ramacher 2017-06-29 21:01:10 +02:00
parent 3708b8e092
commit 1f1bbb3518
534 changed files with 13862 additions and 2459 deletions

View file

@ -16,6 +16,8 @@
******************************************************************************/
#include "qt-wrappers.hpp"
#include "obs-app.hpp"
#include <graphics/graphics.h>
#include <QWidget>
#include <QLayout>
@ -42,6 +44,51 @@ void OBSErrorBox(QWidget *parent, const char *msg, ...)
va_end(args);
}
QMessageBox::StandardButton OBSMessageBox::question(
QWidget *parent,
const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton)
{
QMessageBox mb(QMessageBox::Question,
title, text, buttons,
parent);
mb.setDefaultButton(defaultButton);
if (buttons & QMessageBox::Ok) \
mb.setButtonText(QMessageBox::Ok, QTStr("OK"));
#define translate_button(x) \
if (buttons & QMessageBox::x) \
mb.setButtonText(QMessageBox::x, QTStr(#x));
translate_button(Open);
translate_button(Save);
translate_button(Cancel);
translate_button(Close);
translate_button(Discard);
translate_button(Apply);
translate_button(Reset);
translate_button(Yes);
translate_button(No);
translate_button(No);
translate_button(Abort);
translate_button(Retry);
translate_button(Ignore);
#undef translate_button
return (QMessageBox::StandardButton)mb.exec();
}
void OBSMessageBox::information(
QWidget *parent,
const QString &title,
const QString &text)
{
QMessageBox mb(QMessageBox::Information,
title, text, QMessageBox::Ok,
parent);
mb.setButtonText(QMessageBox::Ok, QTStr("OK"));
mb.exec();
}
void QTToGSWindow(WId windowId, gs_window &gswindow)
{
#ifdef _WIN32