mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-11 09:18:40 +12:00
overlays: implement native sendmessage dialog
This commit is contained in:
parent
9ef5a01de4
commit
23dc6a44f6
13 changed files with 465 additions and 29 deletions
|
@ -22,7 +22,7 @@ sendmessage_dialog_frame::~sendmessage_dialog_frame()
|
|||
}
|
||||
}
|
||||
|
||||
bool sendmessage_dialog_frame::Exec(message_data& msg_data, std::set<std::string>& npids)
|
||||
error_code sendmessage_dialog_frame::Exec(message_data& msg_data, std::set<std::string>& npids)
|
||||
{
|
||||
if (m_dialog)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ bool sendmessage_dialog_frame::Exec(message_data& msg_data, std::set<std::string
|
|||
connect(this, &sendmessage_dialog_frame::signal_add_friend, this, &sendmessage_dialog_frame::slot_add_friend);
|
||||
connect(this, &sendmessage_dialog_frame::signal_remove_friend, this, &sendmessage_dialog_frame::slot_remove_friend);
|
||||
|
||||
bool result = false;
|
||||
error_code result = CELL_CANCEL;
|
||||
|
||||
connect(btn_ok, &QAbstractButton::clicked, this, [this, &msg_data, &npids, &result]()
|
||||
{
|
||||
|
@ -70,7 +70,10 @@ bool sendmessage_dialog_frame::Exec(message_data& msg_data, std::set<std::string
|
|||
npids.insert(selected[0]->text().toStdString());
|
||||
|
||||
// Send the message
|
||||
result = m_rpcn->send_message(msg_data, npids);
|
||||
if (m_rpcn->send_message(msg_data, npids))
|
||||
{
|
||||
result = CELL_OK;
|
||||
}
|
||||
m_dialog->close();
|
||||
});
|
||||
|
||||
|
@ -123,7 +126,7 @@ void sendmessage_dialog_frame::slot_remove_friend(QString name)
|
|||
remove_friend(m_lst_friends, name);
|
||||
}
|
||||
|
||||
void sendmessage_dialog_frame::callback_handler(rpcn::NotificationType ntype, const std::string& username, bool status)
|
||||
void sendmessage_dialog_frame::callback_handler(u16 ntype, const std::string& username, bool status)
|
||||
{
|
||||
QString qtr_username = QString::fromStdString(username);
|
||||
switch (ntype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue