kdeplasma-addons: set the minimum time to 1sec for timer and frame applet

where zero time timers do not make sense, e.g. when the frame applet
slideshow should be updated (never updating the slideshow automatically
could be a feature because the frame shows arrows to switch between images
but zero time for the slideshow is not handled by the frame applet)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-08-03 07:39:54 +03:00
parent e4722c9617
commit f4ba650074
2 changed files with 2 additions and 0 deletions

View file

@ -583,6 +583,7 @@ void Frame::createConfigurationInterface(KConfigDialog *parent)
m_configDialog->imageUi.slideShowDirList->clear();
m_configDialog->imageUi.slideShowDirList->addItems(m_slideShowPaths);
m_configDialog->imageUi.removeDirButton->setEnabled(!m_slideShowPaths.isEmpty());
m_configDialog->imageUi.slideShowDelay->setMinimumTime(QTime(0, 0, 1));
m_configDialog->imageUi.slideShowDelay->setTime(QTime(m_slideshowTime / 3600, (m_slideshowTime / 60) % 60, m_slideshowTime % 60));
m_configDialog->previewPicture(m_mySlideShow->image());
m_configDialog->imageUi.autoUpdateTime->setTime(QTime(m_autoUpdateIntervall / 3600, (m_autoUpdateIntervall / 60) % 60, m_autoUpdateIntervall % 60));

View file

@ -29,6 +29,7 @@ CustomTimeEditor::CustomTimeEditor()
: QObject()
{
timeEdit=new KTimeEdit();
timeEdit->setMinimumTime(QTime(0, 0, 1));
editor=new KLineEdit();
customEditor=new KEditListWidget::CustomEditor(timeEdit, editor);
connect(timeEdit, SIGNAL(timeChanged(QTime)), this, SLOT(setEdit(QTime)));