use hyprland command socket instead of spawning a hyprctl process
This commit is contained in:
@@ -92,7 +92,7 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
|
||||
copyToClipboard(this->copiedImage);
|
||||
spdlog::info("Copied image to clipboard");
|
||||
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->getNotificationId());
|
||||
});
|
||||
saveToClipboardButton->set_tooltip_text("Copy to Clipboard");
|
||||
saveToClipboardButton->add_css_class("notification-button");
|
||||
@@ -100,7 +100,6 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
|
||||
|
||||
auto saveToFileButton = Gtk::make_managed<IconButton>(Icon::SAVE);
|
||||
saveToFileButton->signal_clicked().connect([this]() {
|
||||
// xdg-pic/screenshot // use env
|
||||
auto xdgPicturesDir = Glib::get_user_special_dir(Glib::UserDirectory::PICTURES);
|
||||
auto dateStamp = Glib::DateTime::create_now_local().format("%Y%m%d_%H%M%S");
|
||||
auto filepath = xdgPicturesDir + "/screenshot";
|
||||
@@ -108,7 +107,7 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
|
||||
saveImageToFile(this->copiedImage, filepath, filename);
|
||||
spdlog::info("Saved image to {}", filepath.c_str());
|
||||
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->getNotificationId());
|
||||
});
|
||||
saveToFileButton->set_tooltip_text("Save to File");
|
||||
saveToFileButton->add_css_class("notification-button");
|
||||
@@ -134,7 +133,7 @@ void CopyNotification::createTextNotification(NotifyMessage notify) {
|
||||
auto copyToClipboardButton = Gtk::make_managed<IconButton>(Icon::CONTENT_COPY);
|
||||
copyToClipboardButton->signal_clicked().connect([this]() {
|
||||
copyToClipboard(this->copiedText);
|
||||
this->signal_close.emit(this->notificationId);
|
||||
this->getSignalClose().emit(this->getNotificationId());
|
||||
});
|
||||
copyToClipboardButton->set_tooltip_text("Copy to Clipboard");
|
||||
copyToClipboardButton->add_css_class("notification-icon-button");
|
||||
|
||||
Reference in New Issue
Block a user