@@ -104,9 +104,11 @@ void Item::proxyReady(Glib::RefPtr<Gio::AsyncResult>& result) {
104
104
this ->updateImage ();
105
105
106
106
} catch (const Glib::Error& err) {
107
- spdlog::error (" Failed to create DBus Proxy for {} {}: {}" , bus_name, object_path, err.what ());
107
+ spdlog::error (" Failed to create DBus Proxy for {} {}: {}" , bus_name, object_path,
108
+ std::string (err.what ()));
108
109
} catch (const std::exception & err) {
109
- spdlog::error (" Failed to create DBus Proxy for {} {}: {}" , bus_name, object_path, err.what ());
110
+ spdlog::error (" Failed to create DBus Proxy for {} {}: {}" , bus_name, object_path,
111
+ std::string (err.what ()));
110
112
}
111
113
}
112
114
@@ -124,14 +126,15 @@ ToolTip get_variant<ToolTip>(const Glib::VariantBase& value) {
124
126
result.text = get_variant<Glib::ustring>(container.get_child (2 ));
125
127
auto description = get_variant<Glib::ustring>(container.get_child (3 ));
126
128
if (!description.empty ()) {
127
- result.text = fmt::format (" <b>{}</b>\n {}" , result.text , description);
129
+ result.text = fmt::format (" <b>{}</b>\n {}" , std::string ( result.text ), std::string ( description) );
128
130
}
129
131
return result;
130
132
}
131
133
132
134
void Item::setProperty (const Glib::ustring& name, Glib::VariantBase& value) {
133
135
try {
134
- spdlog::trace (" Set tray item property: {}.{} = {}" , id.empty () ? bus_name : id, name, value);
136
+ spdlog::trace (" Set tray item property: {}.{} = {}" , id.empty () ? bus_name : id,
137
+ std::string (name), get_variant<std::string>(value));
135
138
136
139
if (name == " Category" ) {
137
140
category = get_variant<std::string>(value);
@@ -176,10 +179,12 @@ void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) {
176
179
}
177
180
} catch (const Glib::Error& err) {
178
181
spdlog::warn (" Failed to set tray item property: {}.{}, value = {}, err = {}" ,
179
- id.empty () ? bus_name : id, name, value, err.what ());
182
+ id.empty () ? bus_name : id, std::string (name), get_variant<std::string>(value),
183
+ std::string (err.what ()));
180
184
} catch (const std::exception & err) {
181
185
spdlog::warn (" Failed to set tray item property: {}.{}, value = {}, err = {}" ,
182
- id.empty () ? bus_name : id, name, value, err.what ());
186
+ id.empty () ? bus_name : id, std::string (name), get_variant<std::string>(value),
187
+ std::string (err.what ()));
183
188
}
184
189
}
185
190
@@ -221,9 +226,9 @@ void Item::processUpdatedProperties(Glib::RefPtr<Gio::AsyncResult>& _result) {
221
226
222
227
this ->updateImage ();
223
228
} catch (const Glib::Error& err) {
224
- spdlog::warn (" Failed to update properties: {}" , err.what ());
229
+ spdlog::warn (" Failed to update properties: {}" , std::string ( err.what () ));
225
230
} catch (const std::exception & err) {
226
- spdlog::warn (" Failed to update properties: {}" , err.what ());
231
+ spdlog::warn (" Failed to update properties: {}" , std::string ( err.what () ));
227
232
}
228
233
update_pending_.clear ();
229
234
}
@@ -245,7 +250,7 @@ static const std::map<std::string_view, std::set<std::string_view>> signal2props
245
250
246
251
void Item::onSignal (const Glib::ustring& sender_name, const Glib::ustring& signal_name,
247
252
const Glib::VariantContainerBase& arguments) {
248
- spdlog::trace (" Tray item '{}' got signal {}" , id, signal_name);
253
+ spdlog::trace (" Tray item '{}' got signal {}" , id, std::string ( signal_name) );
249
254
auto changed = signal2props.find (signal_name.raw ());
250
255
if (changed != signal2props.end ()) {
251
256
if (update_pending_.empty ()) {
0 commit comments