Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package QTalarm for openSUSE:Factory checked in at 2022-01-27 23:16:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/QTalarm (Old) and /work/SRC/openSUSE:Factory/.QTalarm.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "QTalarm" Thu Jan 27 23:16:53 2022 rev:6 rq:949401 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/QTalarm/QTalarm.changes 2021-10-18 22:02:13.850095250 +0200 +++ /work/SRC/openSUSE:Factory/.QTalarm.new.1898/QTalarm.changes 2022-01-27 23:18:35.462304917 +0100 @@ -1,0 +2,7 @@ +Sat Jan 22 19:40:10 UTC 2022 - Martin Hauke <mar...@gmx.de> + +- Update to version 2.3.0 + * Added clone button + * Refactored main controller a bit + +------------------------------------------------------------------- Old: ---- QTalarm-2.2.0.tar.gz New: ---- QTalarm-2.3.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ QTalarm.spec ++++++ --- /var/tmp/diff_new_pack.NESYjR/_old 2022-01-27 23:18:36.074300689 +0100 +++ /var/tmp/diff_new_pack.NESYjR/_new 2022-01-27 23:18:36.078300661 +0100 @@ -1,7 +1,7 @@ # # spec file for package QTalarm # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 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.2.0 +Version: 2.3.0 Release: 0 Summary: A handy alarm clock Program written in QT License: GPL-3.0-only ++++++ QTalarm-2.2.0.tar.gz -> QTalarm-2.3.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.2.0/aboutdialog.h new/QTalarm-2.3.0/aboutdialog.h --- old/QTalarm-2.2.0/aboutdialog.h 2021-10-06 03:50:21.000000000 +0200 +++ new/QTalarm-2.3.0/aboutdialog.h 2022-01-18 23:53:56.000000000 +0100 @@ -14,7 +14,7 @@ public: explicit AboutDialog(QWidget *parent = 0); ~AboutDialog(); - const QString version="2.2.0"; + const QString version="2.3.0"; private: Ui::AboutDialog *ui; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.2.0/mainwindow.cpp new/QTalarm-2.3.0/mainwindow.cpp --- old/QTalarm-2.2.0/mainwindow.cpp 2021-10-06 03:50:21.000000000 +0200 +++ new/QTalarm-2.3.0/mainwindow.cpp 2022-01-18 23:53:56.000000000 +0100 @@ -34,6 +34,9 @@ qInfo() << "No system tray detected. What a shitty DE"; //what is this 1993? } + //add buttons + ConfigureButtons(); + //Create / load Schedule _Schedules=new ScheduleCollection(this); _Schedules->LoadSchedules(); @@ -47,29 +50,16 @@ _prevTimeWasMil=_isMilTime; displayTimeMode(); - //Call Time keeper + //Setup threading TimeKeeper=new Timer(this,_Schedules); CurAlarm = &Alarm::GetInstance(); TimeKeeper->StartTimer(CurAlarm); - //Set Volume - int Volume = FileIO::LoadVolume(); - ui->VolumeSlider->setValue(Volume<=0? 50:Volume); - CurAlarm->SetVolume(ui->VolumeSlider->value()); - ui->listAlmBtn->button(QDialogButtonBox::Ok)->setText("&Add"); - ui->listAlmBtn->button(QDialogButtonBox::Cancel)->setText("&Remove"); + SetupVolume(); - trayIcon=new QSystemTrayIcon(this); - trayIconMenu=new QMenu(this); QAction *QAshow=new QAction("&Show",this); QAction *QAquit=new QAction("&Quit",this); - - trayIconMenu->addAction(QAshow); - trayIconMenu->addSeparator(); - trayIconMenu->addAction(QAquit); - trayIcon->setContextMenu(trayIconMenu); - ChangeIconToDefault(); - trayIcon->show(); + SetupTrayIcon(QAshow,QAquit); ui->txtSoundPath->setText(""); ui->CustEdit->setDate(QDate::currentDate()); @@ -77,33 +67,7 @@ ui->chkBastard->setToolTip("Only stop alarms after a random math problem has been solved."); ui->chkSounds->setToolTip("Use a custom sound/video file to wake up to"); - - - - //set up ui slots - connect(QAquit,SIGNAL(triggered()),this,SLOT(Quit())); - connect(QAshow,SIGNAL(triggered()),this,SLOT(ToggleWindow())); - connect(trayIcon,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(ToggleWindow(QSystemTrayIcon::ActivationReason))); - connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(Quit())); - connect(ui->actionAbout_QT,SIGNAL(triggered()),qApp,SLOT(aboutQt())); - connect(ui->actionAbout_QTalam,SIGNAL(triggered()),this,SLOT(ShowAbout())); - connect(ui->actionSettings,SIGNAL(triggered(bool)),this,SLOT(ShowSettings())); - connect(ui->timeEdit,SIGNAL(editingFinished()),this,SLOT(SetTime())); - connect(ui->listAlmBtn,SIGNAL(clicked(QAbstractButton*)),this,SLOT(AddRemoveAlarm(QAbstractButton*))); - connect(ui->listWidget,SIGNAL(currentRowChanged(int)),this,SLOT(ShowActiveAlarm(int))); - connect(ui->chkMon,SIGNAL(clicked(bool)),this,SLOT(ToggleMon(bool))); - connect(ui->chkTues,SIGNAL(clicked(bool)),this,SLOT(ToggleTue(bool))); - connect(ui->chkWed,SIGNAL(clicked(bool)),this,SLOT(ToggleWed(bool))); - connect(ui->chkThurs,SIGNAL(clicked(bool)),this,SLOT(ToggleThur(bool))); - connect(ui->chkFri,SIGNAL(clicked(bool)),this,SLOT(ToggleFri(bool))); - connect(ui->chkSat,SIGNAL(clicked(bool)),this,SLOT(ToggleSat(bool))); - connect(ui->chkSun,SIGNAL(clicked(bool)),this,SLOT(ToggleSun(bool))); - connect(ui->chkCustom,SIGNAL(clicked(bool)),this,SLOT(ToggleCust(bool))); - connect(ui->chkSounds,SIGNAL(clicked(bool)),this,SLOT(OpenDiaglog(bool))); - connect(ui->chkBastard,SIGNAL(clicked(bool)),this,SLOT(ToggleBastard(bool))); - 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())); + SetupSlots(QAquit,QAshow); } MainWindow::~MainWindow() @@ -278,6 +242,26 @@ this->_Schedules->removeScheduleByIndex(ui->listWidget->currentRow()); PopulateListWidget(); } + else if(button->text()=="Clone") + { + Schedule *toClone = this->_Schedules->GetSchedule(ui->listWidget->currentRow()); + Schedule *cloned = new Schedule(this); + cloned->SetCust(toClone->GetCustomDate()); + cloned->setIsCustomEnabled(toClone->GetCustomEnabled()); + cloned->setIsCustomSoundEnabled(toClone->GetCustomSoundEnabled()); + cloned->setIsFriEnabled(toClone->isFriEnabled()); + cloned->setIsMonEnabled(toClone->isMonEnabled()); + cloned->setIsSatEnabled(toClone->isSatEnabled()); + cloned->setIsSunEnabled(toClone->isSunEnabled()); + cloned->setIsThurEnabled(toClone->isThurEnabled()); + cloned->setIsTueEnabled(toClone->isTueEnabled()); + cloned->setIsWedEnabled(toClone->isWedEnabled()); + cloned->SetIsBastard(toClone->isBastard()); + cloned->SetTime(toClone->GetTime()); + cloned->SetCustomSound(toClone->GetCustomSound()); + this->_Schedules->AddSchedule(cloned); + PopulateListWidget(); + } this->_Schedules->Save(); } @@ -285,12 +269,16 @@ void MainWindow::ShowActiveAlarm(int index) { - DisablePanelIfNoSelection(); + if(!ui->listAlmBtn->button(QDialogButtonBox::Cancel)->isEnabled()) + ui->listAlmBtn->button(QDialogButtonBox::Cancel)->setDisabled(false); + DisablePanelIfNoSelection(); if(index==-1) { //in the middle of a list clear. Running further will cause seg fault + this->ui->listAlmBtn->button(QDialogButtonBox::Ignore)->setDisabled(true);//clone button return; } + this->ui->listAlmBtn->button(QDialogButtonBox::Ignore)->setDisabled(false); Schedule *active=this->_Schedules->GetSchedule(index); ui->timeEdit->setTime(active->GetTime()); @@ -451,6 +439,7 @@ ui->CustEdit->setEnabled(false); ui->timeEdit->setEnabled(false); ui->chkBastard->setEnabled(false); + ui->lblTime->setEnabled(false); ui->chkCustom->setChecked(false); ui->chkFri->setChecked(false); @@ -479,6 +468,7 @@ ui->CustEdit->setEnabled(true); ui->timeEdit->setEnabled(true); ui->chkBastard->setEnabled(true); + ui->lblTime->setEnabled(true); } } @@ -516,3 +506,63 @@ this->trayIcon->setIcon(QIcon(":/new/icons/Clock.png")); } } + + +void MainWindow::SetupSlots(QAction *QAquit, QAction *QAshow) +{ + //set up ui slots + connect(QAquit,SIGNAL(triggered()),this,SLOT(Quit())); + connect(QAshow,SIGNAL(triggered()),this,SLOT(ToggleWindow())); + connect(trayIcon,SIGNAL(activated(QSystemTrayIcon::ActivationReason)),this,SLOT(ToggleWindow(QSystemTrayIcon::ActivationReason))); + connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(Quit())); + connect(ui->actionAbout_QT,SIGNAL(triggered()),qApp,SLOT(aboutQt())); + connect(ui->actionAbout_QTalam,SIGNAL(triggered()),this,SLOT(ShowAbout())); + connect(ui->actionSettings,SIGNAL(triggered(bool)),this,SLOT(ShowSettings())); + connect(ui->timeEdit,SIGNAL(editingFinished()),this,SLOT(SetTime())); + connect(ui->listAlmBtn,SIGNAL(clicked(QAbstractButton*)),this,SLOT(AddRemoveAlarm(QAbstractButton*))); + connect(ui->listWidget,SIGNAL(currentRowChanged(int)),this,SLOT(ShowActiveAlarm(int))); + connect(ui->chkMon,SIGNAL(clicked(bool)),this,SLOT(ToggleMon(bool))); + connect(ui->chkTues,SIGNAL(clicked(bool)),this,SLOT(ToggleTue(bool))); + connect(ui->chkWed,SIGNAL(clicked(bool)),this,SLOT(ToggleWed(bool))); + connect(ui->chkThurs,SIGNAL(clicked(bool)),this,SLOT(ToggleThur(bool))); + connect(ui->chkFri,SIGNAL(clicked(bool)),this,SLOT(ToggleFri(bool))); + connect(ui->chkSat,SIGNAL(clicked(bool)),this,SLOT(ToggleSat(bool))); + connect(ui->chkSun,SIGNAL(clicked(bool)),this,SLOT(ToggleSun(bool))); + connect(ui->chkCustom,SIGNAL(clicked(bool)),this,SLOT(ToggleCust(bool))); + connect(ui->chkSounds,SIGNAL(clicked(bool)),this,SLOT(OpenDiaglog(bool))); + connect(ui->chkBastard,SIGNAL(clicked(bool)),this,SLOT(ToggleBastard(bool))); + 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())); + +} + +void MainWindow::SetupTrayIcon(QAction *QAshow, QAction *QAquit) +{ + trayIcon=new QSystemTrayIcon(this); + trayIconMenu=new QMenu(this); + + trayIconMenu->addAction(QAshow); + trayIconMenu->addSeparator(); + trayIconMenu->addAction(QAquit); + trayIcon->setContextMenu(trayIconMenu); + ChangeIconToDefault(); + trayIcon->show(); + +} + +void MainWindow::SetupVolume() +{ + int Volume = FileIO::LoadVolume(); + ui->VolumeSlider->setValue(Volume<=0? 50:Volume); + CurAlarm->SetVolume(ui->VolumeSlider->value()); +} + +void MainWindow::ConfigureButtons() +{ + this->ui->listAlmBtn->button(QDialogButtonBox::Ignore)->setText("Clone"); + this->ui->listAlmBtn->button(QDialogButtonBox::Ignore)->setDisabled(true); + ui->listAlmBtn->button(QDialogButtonBox::Ok)->setText("&Add"); + ui->listAlmBtn->button(QDialogButtonBox::Cancel)->setText("&Remove"); + ui->listAlmBtn->button(QDialogButtonBox::Cancel)->setDisabled(true); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.2.0/mainwindow.h new/QTalarm-2.3.0/mainwindow.h --- old/QTalarm-2.2.0/mainwindow.h 2021-10-06 03:50:21.000000000 +0200 +++ new/QTalarm-2.3.0/mainwindow.h 2022-01-18 23:53:56.000000000 +0100 @@ -26,7 +26,7 @@ Alarm *CurAlarm; ScheduleCollection *_Schedules; - int _lastDeletedIndex; + int _lastDeletedIndex=-1; bool _isMilTime; bool _prevTimeWasMil; bool _supportsTray; @@ -42,6 +42,10 @@ void DisablePanelIfNoSelection(); void UpdateListWidget(); void ChangeIconToDefault(); + void SetupSlots(QAction *,QAction *); + void SetupTrayIcon(QAction *,QAction*); + void SetupVolume(); + void ConfigureButtons(); 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"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QTalarm-2.2.0/mainwindow.ui new/QTalarm-2.3.0/mainwindow.ui --- old/QTalarm-2.2.0/mainwindow.ui 2021-10-06 03:50:21.000000000 +0200 +++ new/QTalarm-2.3.0/mainwindow.ui 2022-01-18 23:53:56.000000000 +0100 @@ -9,7 +9,7 @@ <rect> <x>0</x> <y>0</y> - <width>696</width> + <width>810</width> <height>644</height> </rect> </property> @@ -25,6 +25,108 @@ </property> <widget class="QWidget" name="centralWidget"> <layout class="QGridLayout" name="gridLayout"> + <item row="7" column="8"> + <widget class="QDialogButtonBox" name="listAlmBtn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ignore|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="0" column="0" colspan="6"> + <widget class="QCalendarWidget" name="calendarWidget"/> + </item> + <item row="2" column="4"> + <widget class="QCheckBox" name="chkSun"> + <property name="text"> + <string>Sunday</string> + </property> + </widget> + </item> + <item row="6" column="1"> + <widget class="QLabel" name="txtSoundPath"> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <widget class="QCheckBox" name="chkSounds"> + <property name="text"> + <string>Use File</string> + </property> + </widget> + </item> + <item row="1" column="6"> + <widget class="QCheckBox" name="chkThurs"> + <property name="text"> + <string>Thursday</string> + </property> + </widget> + </item> + <item row="3" column="2" colspan="2"> + <widget class="QTimeEdit" name="timeEdit"> + <property name="displayFormat"> + <string>hh:mm:ss:AP</string> + </property> + </widget> + </item> + <item row="1" column="0" colspan="2"> + <widget class="QCheckBox" name="chkMon"> + <property name="text"> + <string>Monday</string> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QCheckBox" name="chkSat"> + <property name="text"> + <string>Saturday</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> + <widget class="QCheckBox" name="chkCustom"> + <property name="text"> + <string>Custom Date:</string> + </property> + </widget> + </item> + <item row="5" column="2"> + <widget class="QCheckBox" name="chkBastard"> + <property name="cursor"> + <cursorShape>PointingHandCursor</cursorShape> + </property> + <property name="toolTip"> + <string extracomment="Force math questions to disable alarm"/> + </property> + <property name="text"> + <string>Solve to Silence</string> + </property> + </widget> + </item> + <item row="4" column="7"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Master Volume:</string> + </property> + </widget> + </item> + <item row="1" column="2"> + <widget class="QCheckBox" name="chkTues"> + <property name="text"> + <string>Tuesday</string> + </property> + </widget> + </item> <item row="0" column="6" colspan="3"> <widget class="QGroupBox" name="groupBox"> <property name="enabled"> @@ -73,26 +175,15 @@ </layout> </widget> </item> - <item row="1" column="2"> - <widget class="QCheckBox" name="chkTues"> + <item row="3" column="7"> + <widget class="QPushButton" name="TestBtn"> <property name="text"> - <string>Tuesday</string> - </property> - </widget> - </item> - <item row="5" column="7"> - <widget class="QSlider" name="VolumeSlider"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <string>Test</string> </property> </widget> </item> - <item row="4" column="7"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Master Volume:</string> - </property> - </widget> + <item row="7" column="0" colspan="8"> + <widget class="QListWidget" name="listWidget"/> </item> <item row="1" column="4" colspan="2"> <widget class="QCheckBox" name="chkWed"> @@ -101,6 +192,9 @@ </property> </widget> </item> + <item row="4" column="2" colspan="2"> + <widget class="QDateEdit" name="CustEdit"/> + </item> <item row="2" column="0" colspan="2"> <widget class="QCheckBox" name="chkFri"> <property name="text"> @@ -108,111 +202,17 @@ </property> </widget> </item> - <item row="7" column="8"> - <widget class="QDialogButtonBox" name="listAlmBtn"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - <item row="3" column="2" colspan="2"> - <widget class="QTimeEdit" name="timeEdit"> - <property name="displayFormat"> - <string>hh:mm:ss:AP</string> - </property> - </widget> - </item> <item row="3" column="0"> - <widget class="QLabel" name="label_2"> + <widget class="QLabel" name="lblTime"> <property name="text"> <string>Time:</string> </property> </widget> </item> - <item row="5" column="0"> - <widget class="QCheckBox" name="chkSounds"> - <property name="text"> - <string>Use File</string> - </property> - </widget> - </item> - <item row="1" column="0" colspan="2"> - <widget class="QCheckBox" name="chkMon"> - <property name="text"> - <string>Monday</string> - </property> - </widget> - </item> - <item row="4" column="2" colspan="2"> - <widget class="QDateEdit" name="CustEdit"/> - </item> - <item row="7" column="0" colspan="8"> - <widget class="QListWidget" name="listWidget"/> - </item> - <item row="6" column="1"> - <widget class="QLabel" name="txtSoundPath"> - <property name="text"> - <string>TextLabel</string> - </property> - </widget> - </item> - <item row="4" column="0" colspan="2"> - <widget class="QCheckBox" name="chkCustom"> - <property name="text"> - <string>Custom Date:</string> - </property> - </widget> - </item> - <item row="1" column="6"> - <widget class="QCheckBox" name="chkThurs"> - <property name="text"> - <string>Thursday</string> - </property> - </widget> - </item> - <item row="3" column="7"> - <widget class="QPushButton" name="TestBtn"> - <property name="text"> - <string>Test</string> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QCheckBox" name="chkSat"> - <property name="text"> - <string>Saturday</string> - </property> - </widget> - </item> - <item row="2" column="4"> - <widget class="QCheckBox" name="chkSun"> - <property name="text"> - <string>Sunday</string> - </property> - </widget> - </item> - <item row="0" column="0" colspan="6"> - <widget class="QCalendarWidget" name="calendarWidget"/> - </item> - <item row="5" column="2"> - <widget class="QCheckBox" name="chkBastard"> - <property name="cursor"> - <cursorShape>PointingHandCursor</cursorShape> - </property> - <property name="toolTip"> - <string extracomment="Force math questions to disable alarm"/> - </property> - <property name="text"> - <string>Solve to Silence</string> + <item row="5" column="7"> + <widget class="QSlider" name="VolumeSlider"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> </property> </widget> </item> @@ -223,8 +223,8 @@ <rect> <x>0</x> <y>0</y> - <width>696</width> - <height>22</height> + <width>810</width> + <height>21</height> </rect> </property> <widget class="QMenu" name="menuFile">