aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-04-26 12:02:03 -0300
committerRobert Tari <robert@tari.in>2021-07-06 02:25:29 +0200
commit32db30a126d9d96de51a2a0fa8d6fa820dc8d341 (patch)
treeec47df753cab2c8f9022c7b890fe988a867e3466 /src
parentd39dd6255625021cb5e3596ef4c5b921d59797b5 (diff)
downloadayatana-indicator-datetime-32db30a126d9d96de51a2a0fa8d6fa820dc8d341.tar.gz
ayatana-indicator-datetime-32db30a126d9d96de51a2a0fa8d6fa820dc8d341.tar.bz2
ayatana-indicator-datetime-32db30a126d9d96de51a2a0fa8d6fa820dc8d341.zip
Fixed as reviewer requested.
Diffstat (limited to 'src')
-rw-r--r--src/notifications.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/notifications.cpp b/src/notifications.cpp
index 076ad13..f3dcb14 100644
--- a/src/notifications.cpp
+++ b/src/notifications.cpp
@@ -278,8 +278,9 @@ public:
uuid_t message_uuid;
uuid_generate(message_uuid);
- char message_id[37];
- uuid_unparse(message_uuid, message_id);
+ char uuid_buf[37];
+ uuid_unparse(message_uuid, uuid_buf);
+ const std::string message_id(uuid_buf);
GIcon *icon = g_themed_icon_new(data.m_icon_name.c_str());
@@ -287,7 +288,7 @@ public:
if (!messaging_menu_app_has_source(m_messaging_app.get(), m_app_name.c_str()))
messaging_menu_app_append_source(m_messaging_app.get(), m_app_name.c_str(), icon, "Calendar");
- auto msg = messaging_menu_message_new(message_id,
+ auto msg = messaging_menu_message_new(message_id.c_str(),
icon,
data.m_title.c_str(),
nullptr,
@@ -297,7 +298,7 @@ public:
if (msg)
{
std::shared_ptr<messaging_menu_data> msg_data(new messaging_menu_data{message_id, data.m_missed_click_callback, this});
- m_messaging_messages[std::string(message_id)] = msg_data;
+ m_messaging_messages[message_id] = msg_data;
g_signal_connect(G_OBJECT(msg), "activate",
G_CALLBACK(on_message_activated), msg_data.get());
messaging_menu_app_append_message(m_messaging_app.get(), msg, m_app_name.c_str(), false);