mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Qt/Linux: Implement SignalFailure with dbus
This commit is contained in:
parent
3f55067414
commit
45f5819ef3
@ -372,12 +372,10 @@ void msg_dialog_frame::ProgressBarSetLimit(u32 index, u32 limit)
|
||||
#ifdef HAVE_QTDBUS
|
||||
void msg_dialog_frame::UpdateProgress(int progress, bool disable)
|
||||
{
|
||||
QDBusMessage message = QDBusMessage::createSignal
|
||||
(
|
||||
QDBusMessage message = QDBusMessage::createSignal(
|
||||
QStringLiteral("/"),
|
||||
QStringLiteral("com.canonical.Unity.LauncherEntry"),
|
||||
QStringLiteral("Update")
|
||||
);
|
||||
QStringLiteral("Update"));
|
||||
QVariantMap properties;
|
||||
if (disable)
|
||||
properties.insert(QStringLiteral("progress-visible"), false);
|
||||
|
@ -54,7 +54,16 @@ progress_dialog::~progress_dialog()
|
||||
m_tb_progress->hide();
|
||||
}
|
||||
#elif HAVE_QTDBUS
|
||||
UpdateProgress(0);
|
||||
QDBusMessage message = QDBusMessage::createSignal(
|
||||
QStringLiteral("/"),
|
||||
QStringLiteral("com.canonical.Unity.LauncherEntry"),
|
||||
QStringLiteral("Update"));
|
||||
QVariantMap properties;
|
||||
properties.insert(QStringLiteral("urgent"), false);
|
||||
properties.insert(QStringLiteral("progress-visible"), false);
|
||||
properties.insert(QStringLiteral("progress"), 0);
|
||||
message << QStringLiteral("application://rpcs3.desktop") << properties;
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -84,8 +93,16 @@ void progress_dialog::SignalFailure() const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
m_tb_progress->stop();
|
||||
#elif HAVE_QTDBUS
|
||||
QDBusMessage message = QDBusMessage::createSignal(
|
||||
QStringLiteral("/"),
|
||||
QStringLiteral("com.canonical.Unity.LauncherEntry"),
|
||||
QStringLiteral("Update"));
|
||||
QVariantMap properties;
|
||||
properties.insert(QStringLiteral("urgent"), true);
|
||||
message << QStringLiteral("application://rpcs3.desktop") << properties;
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
#endif
|
||||
// TODO: Implement an equivalent for Linux, if possible
|
||||
|
||||
QApplication::beep();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user