close one notification to close all
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "widgets/notification/spotifyNotification.hpp"
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "helpers/string.hpp"
|
||||
#include "services/textureCache.hpp"
|
||||
@@ -9,7 +10,7 @@
|
||||
#include "gtkmm/image.h"
|
||||
#include "gtkmm/label.h"
|
||||
|
||||
SpotifyNotification::SpotifyNotification(std::shared_ptr<Gdk::Monitor> monitor, MprisPlayer2Message mpris) : BaseNotification(monitor) {
|
||||
SpotifyNotification::SpotifyNotification(uint64_t notificationId, std::shared_ptr<Gdk::Monitor> monitor, MprisPlayer2Message mpris) : BaseNotification(notificationId, monitor) {
|
||||
auto container = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL, 10);
|
||||
container->set_hexpand(true);
|
||||
|
||||
@@ -59,7 +60,7 @@ std::unique_ptr<Gtk::CenterBox> SpotifyNotification::createButtonBox(MprisPlayer
|
||||
backButton->signal_clicked().connect([this, mpris]() {
|
||||
if (mpris.previous) {
|
||||
mpris.previous();
|
||||
this->close();
|
||||
this->signal_close.emit(this->notificationId);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -86,7 +87,7 @@ std::unique_ptr<Gtk::CenterBox> SpotifyNotification::createButtonBox(MprisPlayer
|
||||
nextButton->signal_clicked().connect([this, mpris]() {
|
||||
if (mpris.next) {
|
||||
mpris.next();
|
||||
this->close();
|
||||
this->signal_close.emit(this->notificationId);
|
||||
}
|
||||
});
|
||||
buttonBox->set_start_widget(*backButton);
|
||||
|
||||
Reference in New Issue
Block a user