Hello community, here is the log from the commit of package opensuse-updater-kde checked in at Thu Dec 6 17:08:32 CET 2007. -------- --- KDE/opensuse-updater-kde/opensuse-updater-kde.changes 2007-11-26 12:15:02.000000000 +0100 +++ /mounts/work_src_done/STABLE/opensuse-updater-kde/opensuse-updater-kde.changes 2007-12-06 16:53:29.000000000 +0100 @@ -1,0 +2,8 @@ +Thu Dec 6 16:51:17 CET 2007 - uli@suse.de + +- allow check intervals up to 1000 hours +- save applet state and do not recheck immediately on startup + unless it's in a exceptional state (needed for long intervals + to make sense) + +------------------------------------------------------------------- New: ---- opensuse-updater-kde-timing.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ opensuse-updater-kde.spec ++++++ --- /var/tmp/diff_new_pack.QR4593/_old 2007-12-06 17:07:55.000000000 +0100 +++ /var/tmp/diff_new_pack.QR4593/_new 2007-12-06 17:07:55.000000000 +0100 @@ -17,10 +17,11 @@ Group: System/Management Summary: KDE updater applet for OpenSUSE Version: 0.6.1 -Release: 1 +Release: 5 Url: http://en.opensuse.org/KDE_Updater_Applet BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 +Patch: opensuse-updater-kde-timing.patch Requires: zypper >= 0.8.22 Provides: opensuse-updater = 0.5 Obsoletes: opensuse-updater <= 0.5 @@ -35,6 +36,7 @@ %prep %setup -q -n %{name}-%{version} +%patch . /etc/opt/kde3/common_options %build @@ -85,6 +87,11 @@ /opt/kde3/share/locale %changelog +* Thu Dec 06 2007 - uli@suse.de +- allow check intervals up to 1000 hours +- save applet state and do not recheck immediately on startup + unless it's in a exceptional state (needed for long intervals + to make sense) * Fri Nov 23 2007 - tgoettlicher@suse.de - fixed confusing wording update v upgrades (#335566) - r7901 ++++++ opensuse-updater-kde-timing.patch ++++++ --- updater/ConfigWidgetUI.ui +++ updater/ConfigWidgetUI.ui @@ -35,6 +35,9 @@ <property name="minValue"> <number>1</number> </property> + <property name="maxValue"> + <number>1000</number> + </property> </widget> </hbox> --- updater/MainWindow.cpp +++ updater/MainWindow.cpp @@ -65,7 +65,24 @@ else applet = new TrayIcon(simple); + int st = UpdaterSettings::self()->state(); + applet->setState(st); + _simple->setState(st); applet->show(); + + if (st == APPLET_UPDATES || st == APPLET_CRITICAL_UPDATES || st == APPLET_PKGMGR_UPDATES || + st == APPLET_ONLY_OPTIONAL_UPDATES) { + // we know there are updates; no need to check again until + // the user clicks on the tray icon or the next timeout + connect(applet, SIGNAL(checkAgain()), this, SLOT(checkUpdatesWithoutProgress())); + } + else if (st != APPLET_NO_UPDATES) { + // weird state, better check immediately + applet->setState(APPLET_PROBLEM); + _simple->setState(APPLET_PROBLEM); + QTimer::singleShot( 300, this , SLOT(checkUpdatesWithoutProgress() )); + } + connect(applet, SIGNAL(quitSelected()), this, SLOT(slotExit())); connect(applet, SIGNAL(showSimpleView()), this, SLOT(showSimpleView())); connect(applet, SIGNAL(showDetailView()), this, SLOT(showMainWindow())); @@ -376,13 +393,7 @@ if ( patchCountRecommended(false) + patchCountSecurity(false) == 0) { - applet->setState(APPLET_ONLY_OPTIONAL_UPDATES); - _simple->setState(APPLET_ONLY_OPTIONAL_UPDATES); - } - else - { - applet->setState(state); - _simple->setState(state); + state = APPLET_ONLY_OPTIONAL_UPDATES; } } else @@ -392,30 +403,19 @@ if ( patchCountRecommended(false) + patchCountSecurity(false) == 0 && patches > 0) { - applet->setState(APPLET_ONLY_OPTIONAL_UPDATES); - _simple->setState(APPLET_ONLY_OPTIONAL_UPDATES); + state = APPLET_ONLY_OPTIONAL_UPDATES; } else if (patches > 0) { - applet->setState(state); - _simple->setState(state); } else { - applet->setState(APPLET_NO_UPDATES); - _simple->setState(APPLET_NO_UPDATES); - - // set last check time - UpdaterSettings::self()->setLastCheckTime(QDateTime::currentDateTime() ); - UpdaterSettings::self()->writeConfig(); + state = APPLET_NO_UPDATES; } } } - else - { _simple->setState(state); applet->setState(state); - } _check_updates_action->setEnabled(true); _edit_sources_action->setEnabled(true); @@ -425,7 +425,10 @@ else _check_updates_action->setEnabled(true); - + UpdaterSettings::self()->setState(state); + // set last check time + UpdaterSettings::self()->setLastCheckTime(QDateTime::currentDateTime() ); + UpdaterSettings::self()->writeConfig(); @@ -772,7 +775,8 @@ void MainWindow::checkUpdates(bool displayProgress) { - + // recheck has to be done at most once + disconnect(applet, SIGNAL(checkAgain()), 0, 0); slotAppletState(APPLET_CHECKING, 0, 0); --- updater/TrayIcon.cpp +++ updater/TrayIcon.cpp @@ -163,5 +163,10 @@ emit (showSimpleView()); } +void TrayIcon::mousePressEvent(QMouseEvent* e) +{ + if(e->button() == Qt::LeftButton) emit(checkAgain()); + KSystemTray::mousePressEvent(e); +} #include "TrayIcon.moc" --- updater/TrayIcon.h +++ updater/TrayIcon.h @@ -47,7 +47,10 @@ void setState(int state, const QString &description = QString() ); void setUpdates(int pat, int pac=0); - + + protected: + void mousePressEvent(QMouseEvent*); + private slots: void popupClicked(); void showPopup(); @@ -64,6 +67,7 @@ signals: void showSimpleView(); void showDetailView(); + void checkAgain(); }; #endif --- updater/UpdaterApplication.cpp +++ updater/UpdaterApplication.cpp @@ -103,9 +103,11 @@ kdDebug() << "sec diff : " << lastCheckTime.secsTo(now) << endl; kdDebug() << "nextCheck: " << nextCheck << endl; +#if 0 // what is that good for at this point? // clear last check time UpdaterSettings::self()->setLastCheckTime(QDateTime()); UpdaterSettings::self()->writeConfig(); +#endif QTimer::singleShot( nextCheck * 1000, _main , SLOT(checkUpdatesWithoutProgress() )); } --- updater/opensuseupdater_settings.kcfg +++ updater/opensuseupdater_settings.kcfg @@ -37,5 +37,8 @@ <entry name="LastCheckTime" type="DateTime"> <label>Last check for updates.</label> </entry> + <entry name="State" type="Int"> + <label>Last applet state.</label> + </entry> </group> </kcfg> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de