Skip to content

Commit d623a89

Browse files
committed
fix: sni item fmt
1 parent 1210bcd commit d623a89

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

src/modules/image.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ auto waybar::modules::Image::update() -> void {
5757
int scaled_icon_size = size_ * image_.get_scale_factor();
5858
pixbuf = Gdk::Pixbuf::create_from_file(path_, scaled_icon_size, scaled_icon_size);
5959

60-
auto surface =
61-
Gdk::Cairo::create_surface_from_pixbuf(pixbuf, image_.get_scale_factor(), image_.get_window());
60+
auto surface = Gdk::Cairo::create_surface_from_pixbuf(pixbuf, image_.get_scale_factor(),
61+
image_.get_window());
6262
image_.set(surface);
6363
image_.show();
6464

src/modules/sni/item.cpp

+13-8
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,11 @@ void Item::proxyReady(Glib::RefPtr<Gio::AsyncResult>& result) {
104104
this->updateImage();
105105

106106
} 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()));
108109
} 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()));
110112
}
111113
}
112114

@@ -124,14 +126,15 @@ ToolTip get_variant<ToolTip>(const Glib::VariantBase& value) {
124126
result.text = get_variant<Glib::ustring>(container.get_child(2));
125127
auto description = get_variant<Glib::ustring>(container.get_child(3));
126128
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));
128130
}
129131
return result;
130132
}
131133

132134
void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) {
133135
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));
135138

136139
if (name == "Category") {
137140
category = get_variant<std::string>(value);
@@ -176,10 +179,12 @@ void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) {
176179
}
177180
} catch (const Glib::Error& err) {
178181
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()));
180184
} catch (const std::exception& err) {
181185
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()));
183188
}
184189
}
185190

@@ -221,9 +226,9 @@ void Item::processUpdatedProperties(Glib::RefPtr<Gio::AsyncResult>& _result) {
221226

222227
this->updateImage();
223228
} 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()));
225230
} 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()));
227232
}
228233
update_pending_.clear();
229234
}

subprojects/gtk-layer-shell.wrap

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[wrap-file]
2-
directory = gtk-layer-shell-0.8.2
3-
source_filename = gtk-layer-shell-0.8.2.tar.gz
4-
source_hash = 254dd246303127c5d5236ea640f01a82e35d2d652a48d139dd669c832a0f0dce
5-
source_url = https://github.com/wmww/gtk-layer-shell/archive/v0.8.2/gtk-layer-shell-0.8.2.tar.gz
2+
directory = gtk-layer-shell-0.9.0
3+
source_filename = gtk-layer-shell-0.9.0.tar.gz
4+
source_hash = 3809e5565d9ed02e44bb73787ff218523e8760fef65830afe60ea7322e22da1c
5+
source_url = https://github.com/wmww/gtk-layer-shell/archive/v0.9.0/gtk-layer-shell-0.9.0.tar.gz

0 commit comments

Comments
 (0)