1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +00:00

NotificationServer: Allow showing an icon in notifications

We currently use icon paths for this because I didn't want to deal with
implementing icon bitmap sharing right now. In the future it would be
better to post a bitmap somehow instead of a path.
This commit is contained in:
Andreas Kling 2020-03-26 20:38:28 +01:00
parent 3c29818048
commit faedb763ca
7 changed files with 24 additions and 9 deletions

View file

@ -35,7 +35,7 @@ Notification::~Notification()
void Notification::show()
{
auto connection = NotificationServerConnection::construct();
connection->post_message(Messages::NotificationServer::ShowNotification(m_text, m_title));
connection->post_message(Messages::NotificationServer::ShowNotification(m_text, m_title, m_icon_path));
}
}

View file

@ -16,6 +16,9 @@ public:
const String& title() const { return m_title; }
void set_title(const String& title) { m_title = title; }
const String& icon_path() const { return m_icon_path; }
void set_icon_path(const String& icon_path) { m_icon_path = icon_path; }
void show();
private:
@ -23,6 +26,7 @@ private:
String m_title;
String m_text;
String m_icon_path;
};
}