Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package QTalarm for openSUSE:Factory checked in at 2023-09-12 21:02:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/QTalarm (Old) and /work/SRC/openSUSE:Factory/.QTalarm.new.1766 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "QTalarm" Tue Sep 12 21:02:58 2023 rev:9 rq:1110442 version:2.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/QTalarm/QTalarm.changes 2022-12-24 14:55:19.356692715 +0100 +++ /work/SRC/openSUSE:Factory/.QTalarm.new.1766/QTalarm.changes 2023-09-12 21:03:40.569872282 +0200 @@ -1,0 +2,7 @@ +Mon Sep 11 20:44:11 UTC 2023 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.5.0 + * Added One-time alarm type. + * Added new flag for waybar toggling. + +------------------------------------------------------------------- Old: ---- QTalarm-2.4.0.tar.gz New: ---- QTalarm-2.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ QTalarm.spec ++++++ --- /var/tmp/diff_new_pack.8rxb6q/_old 2023-09-12 21:03:41.585908524 +0200 +++ /var/tmp/diff_new_pack.8rxb6q/_new 2023-09-12 21:03:41.585908524 +0200 @@ -1,7 +1,7 @@ # # spec file for package QTalarm # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define _name qtalarm Name: QTalarm -Version: 2.4.0 +Version: 2.5.0 Release: 0 Summary: A handy alarm clock Program written in QT License: GPL-3.0-only ++++++ QTalarm-2.4.0.tar.gz -> QTalarm-2.5.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/README.md new/QTalarm-2.5.0/README.md --- old/QTalarm-2.4.0/README.md 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/README.md 2023-09-11 20:56:41.000000000 +0200 @@ -19,20 +19,24 @@ Features ======== -- Unlimted number of customizable alarms +- Unlimited number of customizable alarms - Can wake up using the default sound, or any of audio / video file of your choosing. - Custom date alarms -- Completely Cross plateform +- Completely Cross platform + +- Support for one-time alarms ## Linux Build/Install ### Building -1. Ensure QT5 is installed on your system. -1. In the termnal, type `qmake`. This will create a Makefile +1. Ensure the proper dependencies are met + 1. Ensure QT5 is installed on your system. On Arch, the needed packages are `qt5-base` and `qt5-multimedia` + 1. Optionally install `noto-fonts` to be able to properly see Unicode symbols in the alarm list widget +1. In the terminal, type `qmake`. This will create a Makefile 1. Type `make` ### Installing @@ -58,6 +62,9 @@ ``` 4. QTalarm Should now be installed. +## Waybar users +It is possible to configure QTalarm to launch when clicking on the waybar clock. Such a configuration would launch the application each time the clock was clicked. Normally, when QTalarm has a second instance the duplicate process will shutdown and the main window would be shown on the original process. Configuring waybar to run QTalarm with the `--toggleOnDup` flag should force the application to toggle its main window when a duplicate process is launched. + Licensing ========== GPL V3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/aboutdialog.h new/QTalarm-2.5.0/aboutdialog.h --- old/QTalarm-2.4.0/aboutdialog.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/aboutdialog.h 2023-09-11 20:56:41.000000000 +0200 @@ -14,7 +14,7 @@ public: explicit AboutDialog(QWidget *parent = 0); ~AboutDialog(); - const QString version="2.4.0"; + const QString version="2.5.0"; private: Ui::AboutDialog *ui; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/alarm.h new/QTalarm-2.5.0/alarm.h --- old/QTalarm-2.4.0/alarm.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/alarm.h 2023-09-11 20:56:41.000000000 +0200 @@ -23,6 +23,8 @@ void SetCustomPath(QString); bool UsingCustomPath; bool isBastard; + bool isOneshot; + int listId; private: explicit Alarm(QObject *parent = 0); QMediaPlayer * media; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/bastardsnooze.cpp new/QTalarm-2.5.0/bastardsnooze.cpp --- old/QTalarm-2.4.0/bastardsnooze.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/bastardsnooze.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -1,11 +1,12 @@ #include "bastardsnooze.h" +#include "schedules.h" #include "ui_bastardsnooze.h" #include <QRandomGenerator> #include <QDateTime> #include <QMessageBox> #include <QCloseEvent> -BastardSnooze::BastardSnooze(QWidget *parent, Alarm * curAlarm) : +BastardSnooze::BastardSnooze(QWidget *parent, Alarm * curAlarm, Schedules * schedule_list) : QMainWindow(parent), ui(new Ui::BastardSnooze) { @@ -31,6 +32,7 @@ } this->_curAlarm=curAlarm; + this->_schdule_list = schedule_list; //connect btn connect(ui->okbtn,SIGNAL(clicked()),this,SLOT(checkMath())); @@ -54,6 +56,10 @@ if(retVal) { this->_curAlarm->Stop(); + if(this->_curAlarm->isOneshot) + { + this->_schdule_list->removeScheduleByIndex(this->_curAlarm->listId); + } this->hide(); this->~BastardSnooze(); }else{ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/bastardsnooze.h new/QTalarm-2.5.0/bastardsnooze.h --- old/QTalarm-2.4.0/bastardsnooze.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/bastardsnooze.h 2023-09-11 20:56:41.000000000 +0200 @@ -3,6 +3,7 @@ #include <QMainWindow> #include "alarm.h" +#include "schedules.h" namespace Ui { class BastardSnooze; @@ -13,7 +14,7 @@ Q_OBJECT public: - explicit BastardSnooze(QWidget *parent = nullptr, Alarm * curAlarm=0); + explicit BastardSnooze(QWidget *parent = nullptr, Alarm * curAlarm=0, Schedules * schedule_list=0); ~BastardSnooze(); private: @@ -22,6 +23,7 @@ qint32 val2; qint32 randOp; Alarm * _curAlarm; + Schedules * _schdule_list; void closeEvent(QCloseEvent*); private slots: void checkMath(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/fileio.cpp new/QTalarm-2.5.0/fileio.cpp --- old/QTalarm-2.4.0/fileio.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/fileio.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -65,6 +65,8 @@ sched->isCustomSoundEnabled = this->_Settings.value(indexStr+"CustomSoundEnabled").toBool(); sched->CustomSoundPath = this->_Settings.value(indexStr+"CustomSound").toString(); + sched->Index = index; + sched->isOneshot = this->_Settings.value(indexStr+"isOneshot").toBool(); scheduleList.append(sched); } @@ -98,6 +100,7 @@ this->_Settings.setValue(IndexStr+"CustDate",currentSche->CustomAlarm); this->_Settings.setValue(IndexStr+"CustomSoundEnabled",currentSche->isCustomSoundEnabled); this->_Settings.setValue(IndexStr+"CustomSound",currentSche->CustomSoundPath); + this->_Settings.setValue(IndexStr+"isOneshot",currentSche->isOneshot); this->_Settings.sync(); index++; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/mainwindow.cpp new/QTalarm-2.5.0/mainwindow.cpp --- old/QTalarm-2.4.0/mainwindow.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/mainwindow.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -50,6 +50,7 @@ ShowActiveAlarm(0); LoadOptions(); + toggleOnDuplicateProcess = QApplication::arguments().count() > 1 ? QApplication::arguments().at(1) == "--toggleOnDup":false; //Setup threading TimeKeeper=new Timer(this,_Schedules); @@ -118,6 +119,7 @@ }else{ this->hide(); } + UpdateListWidget(); } void MainWindow::SetTime() @@ -215,6 +217,19 @@ UpdateListWidget(); } +void MainWindow::ToggleOneshot(bool isEnabled) +{ + ScheduleModel *Active = this->_Schedules->GetSchedule(this->ui->listWidget->currentRow()); + Active->isOneshot = isEnabled; + if(isEnabled) + { + DisableGUIIfOneshot(true); + }else{ + DisableGUIIfOneshot(false); + } + UpdateListWidget(); +} + void MainWindow::Quit() { if(this->CurAlarm->isPlaying() && this->CurAlarm->isBastard) @@ -237,7 +252,9 @@ ScheduleModel *scheToAdd=new ScheduleModel(this); this->_Schedules->AddSchedule(scheToAdd); ui->listWidget->addItem(scheToAdd->Name()); - ui->listWidget->setCurrentRow(ui->listWidget->count()-1); + int listIndex = ui->listWidget->count()-1; + scheToAdd->Index = listIndex; + ui->listWidget->setCurrentRow(listIndex); } else if(button->text()=="&Remove") { @@ -299,6 +316,23 @@ ui->chkSun->setChecked(active->isSunEnabled); ui->calendarWidget->setSelectedDate(active->CustomAlarm); ui->chkBastard->setChecked(active->isBastard); + ui->chkOnshot->setChecked(active->isOneshot); + + if(active->isOneshot) + { + DisableGUIIfOneshot(true); + } +} + +void MainWindow::DisableGUIIfOneshot(bool value) +{ + ui->chkFri->setDisabled(value); + ui->chkThurs->setDisabled(value); + ui->chkWed->setDisabled(value); + ui->chkTues->setDisabled(value); + ui->chkMon->setDisabled(value); + ui->chkSun->setDisabled(value); + ui->chkSat->setDisabled(value); } void MainWindow::timeCheck() @@ -364,7 +398,7 @@ if((this->testrun==true && this->CurAlarm->isBastard==false) || (this->CurAlarm->isPlaying() && this->CurAlarm->canResume && this->CurAlarm->isBastard==false)) { //Create Snooze Menu object - snooze *snMenu=new snooze(this,CurAlarm); + snooze *snMenu=new snooze(this,CurAlarm, this->_Schedules); snMenu->show(); if(this->_supportsTray && this->testrun==false) { @@ -379,7 +413,7 @@ { if((this->testrun==true && this->CurAlarm->isBastard==true) || (this->CurAlarm->isPlaying() && this->CurAlarm->canResume && this->CurAlarm->isBastard)) { - BastardSnooze *bsnooze= new BastardSnooze(this,this->CurAlarm); + BastardSnooze *bsnooze= new BastardSnooze(this,this->CurAlarm, this->_Schedules); bsnooze->show(); if(this->_supportsTray && this->testrun==false) { @@ -443,6 +477,7 @@ ui->timeEdit->setEnabled(false); ui->chkBastard->setEnabled(false); ui->lblTime->setEnabled(false); + ui->chkOnshot->setEnabled(false); ui->chkCustom->setChecked(false); ui->chkFri->setChecked(false); @@ -455,6 +490,7 @@ ui->chkTues->setChecked(false); ui->chkWed->setChecked(false); ui->txtSoundPath->setText(""); + ui->chkOnshot->setChecked(false); } else @@ -472,6 +508,7 @@ ui->timeEdit->setEnabled(true); ui->chkBastard->setEnabled(true); ui->lblTime->setEnabled(true); + ui->chkOnshot->setEnabled(true); } } @@ -537,6 +574,7 @@ connect(ui->TestBtn,SIGNAL(clicked()),this,SLOT(TestAlarm())); connect(ui->VolumeSlider,SIGNAL(valueChanged(int)),CurAlarm,SLOT(SetVolume(int))); connect(ui->calendarWidget,SIGNAL(clicked(QDate)),this,SLOT(SetCustomDate())); + connect(ui->chkOnshot,SIGNAL(clicked(bool)),this,SLOT(ToggleOneshot(bool))); } @@ -611,5 +649,10 @@ void MainWindow::handleLocalConnection() { - this->show(); + if(toggleOnDuplicateProcess) + { + ToggleWindow(); + }else{ + this->show(); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/mainwindow.h new/QTalarm-2.5.0/mainwindow.h --- old/QTalarm-2.4.0/mainwindow.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/mainwindow.h 2023-09-11 20:56:41.000000000 +0200 @@ -48,9 +48,11 @@ void SetupVolume(); void ConfigureButtons(); void TerminateIfRunning(); + void DisableGUIIfOneshot(bool); - QString solveNotificationTitle = "Solve To Silence"; - QString solveNotification = "Solve to Silence is a new feature that prevents the user from dismissing snooze until they solve a math problem"; + const QString solveNotificationTitle = "Solve To Silence"; + const QString solveNotification = "Solve to Silence is a new feature that prevents the user from dismissing snooze until they solve a math problem"; + bool toggleOnDuplicateProcess; private slots: void ToggleWindow(); @@ -68,6 +70,7 @@ void ToggleSun(bool); void ToggleCust(bool); void ToggleBastard(bool); + void ToggleOneshot(bool); void Quit(); void OpenDiaglog(bool); void TestAlarm(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/mainwindow.ui new/QTalarm-2.5.0/mainwindow.ui --- old/QTalarm-2.4.0/mainwindow.ui 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/mainwindow.ui 2023-09-11 20:56:41.000000000 +0200 @@ -216,6 +216,13 @@ </property> </widget> </item> + <item row="2" column="6"> + <widget class="QCheckBox" name="chkOnshot"> + <property name="text"> + <string>One-Time</string> + </property> + </widget> + </item> </layout> </widget> <widget class="QMenuBar" name="menuBar"> @@ -224,7 +231,7 @@ <x>0</x> <y>0</y> <width>810</width> - <height>21</height> + <height>22</height> </rect> </property> <widget class="QMenu" name="menuFile"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/schedulemodel.cpp new/QTalarm-2.5.0/schedulemodel.cpp --- old/QTalarm-2.4.0/schedulemodel.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/schedulemodel.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -20,6 +20,7 @@ this->CustomSoundPath = ""; this->isCustomSoundEnabled = false; this->isBastard = false; + this->isOneshot = false; } @@ -46,6 +47,8 @@ name.append(" "+this->CustomAlarm.toString()); if(this->isBastard) name.append(" Σ"); + if(this->isOneshot) + name.append("ð£"); return name; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/schedulemodel.h new/QTalarm-2.5.0/schedulemodel.h --- old/QTalarm-2.4.0/schedulemodel.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/schedulemodel.h 2023-09-11 20:56:41.000000000 +0200 @@ -26,6 +26,7 @@ bool isFriEnabled; bool isSatEnabled; bool isSunEnabled; + bool isOneshot; QString CustomSoundPath; bool isCustomSoundEnabled; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/snooze.cpp new/QTalarm-2.5.0/snooze.cpp --- old/QTalarm-2.4.0/snooze.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/snooze.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -2,15 +2,17 @@ #include <QTime> #include "snooze.h" #include "alarm.h" +#include "schedules.h" #include "ui_snooze.h" -snooze::snooze(QWidget *parent,Alarm *curAlarm) : +snooze::snooze(QWidget *parent,Alarm *curAlarm, Schedules * schedule_list) : QDialog(parent), ui(new Ui::snooze) { ui->setupUi(this); this->_curAlarm=curAlarm; this->_snoozeTimer=new QTimer(this); + this->_schedule_list = schedule_list; this->_otherAlarmCheckTimer=new QTimer(this); this->isDismissed=false; SetupClock(); @@ -56,6 +58,12 @@ { this->_snoozeTimer->stop(); this->_curAlarm->Stop(); + + if(this->_curAlarm->isOneshot) + { + this->_schedule_list->removeScheduleByIndex(this->_curAlarm->listId); + } + this->hide(); this->~snooze(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/snooze.h new/QTalarm-2.5.0/snooze.h --- old/QTalarm-2.4.0/snooze.h 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/snooze.h 2023-09-11 20:56:41.000000000 +0200 @@ -4,6 +4,7 @@ #include <QDialog> #include <QTimer> #include "alarm.h" +#include "schedules.h" namespace Ui { class snooze; @@ -14,7 +15,7 @@ Q_OBJECT public: - explicit snooze(QWidget *parent = 0,Alarm * curAlarm=0); + explicit snooze(QWidget *parent = 0,Alarm * curAlarm=0, Schedules * schedule_list = 0); ~snooze(); bool isDismissed; @@ -31,6 +32,7 @@ Ui::snooze *ui; void SetupClock(); Alarm *_curAlarm; + Schedules * _schedule_list; QTimer *_snoozeTimer; QTimer *_otherAlarmCheckTimer; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.4.0/timer.cpp new/QTalarm-2.5.0/timer.cpp --- old/QTalarm-2.4.0/timer.cpp 2022-12-23 01:33:52.000000000 +0100 +++ new/QTalarm-2.5.0/timer.cpp 2023-09-11 20:56:41.000000000 +0200 @@ -33,12 +33,16 @@ { this->_CurAlarm->SetCustomPath(cur_sche->CustomSoundPath); } + this->_CurAlarm->isOneshot=cur_sche->isOneshot; + this->_CurAlarm->listId = cur_sche->Index; QDateTime RightNow=QDateTime::currentDateTime();//We're in now, now... bool soundAlarm=false; if(cur_sche->AlarmTime.hour()==RightNow.time().hour() && cur_sche->AlarmTime.minute()==RightNow.time().minute()) { + if(cur_sche->isOneshot) + soundAlarm=true; switch(RightNow.date().dayOfWeek()) { //WeekDay Alarms