Demana confirmació per a canviar el idioma amb les tecles ràpides

Demana confirmació per reiniciar
This commit is contained in:
2025-03-10 21:22:32 +01:00
parent 79b2917112
commit 9c1b3c45b0
11 changed files with 92 additions and 38 deletions

View File

@@ -153,7 +153,7 @@ void Notifier::clearFinishedNotifications()
}
}
void Notifier::showText(std::vector<std::string> texts, int icon, const std::string &code)
void Notifier::show(std::vector<std::string> texts, int icon, const std::string &code)
{
// Si no hay texto, acaba
if (texts.empty())
@@ -164,7 +164,7 @@ void Notifier::showText(std::vector<std::string> texts, int icon, const std::str
// Si las notificaciones no se apilan, elimina las anteriores
if (!stack_)
{
clearNotifications();
clearAllNotifications();
}
// Elimina las cadenas vacías
@@ -298,7 +298,7 @@ void Notifier::showText(std::vector<std::string> texts, int icon, const std::str
bool Notifier::isActive() { return !notifications_.empty(); }
// Finaliza y elimnina todas las notificaciones activas
void Notifier::clearNotifications()
void Notifier::clearAllNotifications()
{
for (auto &notification : notifications_)
{
@@ -317,4 +317,10 @@ std::vector<std::string> Notifier::getCodes()
codes.emplace_back(notification.code);
}
return codes;
}
// Comprueba si hay alguna notificacion con un código
bool Notifier::checkCode(std::string code)
{
return stringInVector(getCodes(), code);
}