SVN commit 764724 by andrunko: Improve clocks config dialogs. Standardize strings (Eg. Show seconds in both clocks). Improved layout. Add the possibility to use local timezone on analog clock. Other small improvements. M +8 -2 analog-clock/clock.cpp M +114 -39 analog-clock/clockConfig.ui M +0 -1 digital-clock/clock.cpp M +24 -11 digital-clock/clockConfig.ui --- trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clock.cpp #764723:764724 @@ -50,7 +50,6 @@ : Plasma::Containment(parent, args), m_showTimeString(false), m_showSecondHand(false), - m_timezone("Local"), m_dialog(0) { setHasConfigurationInterface(true); @@ -149,6 +148,8 @@ } ui.timeZones->setSelected(m_timezone, true); + ui.timeZones->setEnabled(m_timezone != "Local"); + ui.localTimeZone->setChecked(m_timezone == "Local"); ui.showTimeStringCheckBox->setChecked(m_showTimeString); ui.showSecondHandCheckBox->setChecked(m_showSecondHand); m_dialog->show(); @@ -165,7 +166,11 @@ update(); QStringList tzs = ui.timeZones->selection(); - if (tzs.count() > 0) { + if (ui.localTimeZone->checkState() == Qt::Checked) { + dataEngine("time")->disconnectSource(m_timezone, this); + m_timezone = "Local"; + cg.writeEntry("timezone", m_timezone); + } else if (tzs.count() > 0) { //TODO: support multiple timezones QString tz = tzs.at(0); if (tz != m_timezone) { @@ -176,6 +181,7 @@ } else if (m_timezone != "Local") { dataEngine("time")->disconnectSource(m_timezone, this); m_timezone = "Local"; + cg.writeEntry("timezone", m_timezone); } connectToEngine(); --- trunk/KDE/kdebase/workspace/plasma/applets/analog-clock/clockConfig.ui #764723:764724 @@ -5,53 +5,111 @@ 0 0 - 350 - 367 + 400 + 300 - 350 - 200 + 400 + 300 - - - - 300 - 0 - - - + + + + + Appearance + + + true + + + + + + + + Show the seconds + + + Check this if you want to show the seconds. + + + Show &seconds + + + + + + + Show the time in text + + + Check this if you want to show the time as a text within the clock. + + + Also show the time in text + + + + + + + + + + + + Timezones + + + true + + + + + + + + Use &local timezone + + + + + + + + 300 + 150 + + + + + Area + + + + + Region + + + + + Comment + + + + + + + + + + - - - - Display the second hand - - - Check this if you want to display the second hand in order to see the seconds. - - - Display seconds - - - - - - - Display the time as a string - - - Check this if you want to display the time as a string within the clock. - - - Also display the time in text - - - @@ -62,5 +120,22 @@ - + + + localTimeZone + toggled(bool) + timeZones + setDisabled(bool) + + + 20 + 20 + + + 20 + 20 + + + + --- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clock.cpp #764723:764724 @@ -181,7 +181,6 @@ ui.timeZones->setEnabled(m_timezone != "Local"); ui.localTimeZone->setChecked(m_timezone == "Local"); - ui.timeZones->setSelected(m_timezone, true); m_dialog->show(); } --- trunk/KDE/kdebase/workspace/plasma/applets/digital-clock/clockConfig.ui #764723:764724 @@ -5,14 +5,14 @@ 0 0 - 420 - 428 + 400 + 300 - 420 - 320 + 400 + 300 @@ -24,12 +24,6 @@ 0 - - - 400 - 300 - - 0 @@ -109,16 +103,35 @@ + + Show the seconds + + + Check this if you want to show the seconds. + Show &seconds + + + + Qt::Vertical + + + + 20 + 0 + + + + - Timezones + Ti&mezones