Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package myrlyn for openSUSE:Factory checked in at 2025-05-12 16:49:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/myrlyn (Old) and /work/SRC/openSUSE:Factory/.myrlyn.new.30101 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "myrlyn" Mon May 12 16:49:35 2025 rev:2 rq:1276607 version:0.9.4 Changes: -------- --- /work/SRC/openSUSE:Factory/myrlyn/myrlyn.changes 2025-04-07 18:41:53.016716645 +0200 +++ /work/SRC/openSUSE:Factory/.myrlyn.new.30101/myrlyn.changes 2025-05-12 16:53:42.364834636 +0200 @@ -1,0 +2,16 @@ +Sun May 11 11:58:25 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> + +- Update to version 0.9.4: + * Version bump + * Different text highlight colors for dark widget themes (Closes #91) + * Report failed repo refresh (closes #89) + * Linked official distro packages + * Redundant + * Typos + * Imported modernized packaging files + * Markdown formatting + * More relevant URLs + * Expanced OBS packaging doc + * Added doc for OBS packaging + +------------------------------------------------------------------- Old: ---- myrlyn-0.9.3.obscpio New: ---- myrlyn-0.9.4.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ myrlyn.spec ++++++ --- /var/tmp/diff_new_pack.ibbU9E/_old 2025-05-12 16:53:43.100865532 +0200 +++ /var/tmp/diff_new_pack.ibbU9E/_new 2025-05-12 16:53:43.100865532 +0200 @@ -20,7 +20,7 @@ Name: myrlyn # If you change the version here, don't forget ../VERSION.cmake ! # To increase only the last number, use rake version:bump -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: Package manager GUI License: GPL-2.0-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ibbU9E/_old 2025-05-12 16:53:43.128866707 +0200 +++ /var/tmp/diff_new_pack.ibbU9E/_new 2025-05-12 16:53:43.132866875 +0200 @@ -7,7 +7,7 @@ <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> - <param name="revision">0.9.3</param> + <param name="revision">0.9.4</param> <param name="changesgenerate">enable</param> </service> <service name="set_version" mode="manual"/> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ibbU9E/_old 2025-05-12 16:53:43.156867882 +0200 +++ /var/tmp/diff_new_pack.ibbU9E/_new 2025-05-12 16:53:43.156867882 +0200 @@ -3,6 +3,6 @@ <param name="url">https://github.com/shundhammer/yqpkg.git</param> <param name="changesrevision">ca8bd11aa2729b40fa14e5e7131f3e7506962260</param></service><service name="tar_scm"> <param name="url">https://github.com/shundhammer/myrlyn.git</param> - <param name="changesrevision">de63ea8d1d0260853dae9ba2fa6200fcf70946b7</param></service></servicedata> + <param name="changesrevision">f6ea978c7c6695aa958befa0a6fd771d08ee656c</param></service></servicedata> (No newline at EOF) ++++++ myrlyn-0.9.3.obscpio -> myrlyn-0.9.4.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/.gitignore new/myrlyn-0.9.4/.gitignore --- old/myrlyn-0.9.3/.gitignore 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -package/*.tar.* - -*~ -*.bak -*.auto -build/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/OBS-Packaging.md new/myrlyn-0.9.4/OBS-Packaging.md --- old/myrlyn-0.9.3/OBS-Packaging.md 1970-01-01 01:00:00.000000000 +0100 +++ new/myrlyn-0.9.4/OBS-Packaging.md 2025-05-11 13:47:40.000000000 +0200 @@ -0,0 +1,112 @@ +# Packaging Myrlyn with OBS + +## Devel Project + +https://build.opensuse.org/package/show/system:packagemanager/myrlyn + + +## Check Out the Package + +Branch and check out (`osc bco`) into a branch package: + +``` +cd /work/obs +osc bco system:packagemanager myrlyn +cd system:packagemanager/myrlyn +``` + +Alternative: Check out the devel project: + +``` +cd /work/obs +osc co system:packagemanager myrlyn +cd system:packagemanager/myrlyn +``` + + +## Updating the Git Tag + +``` +vi _service +``` + +Edit this line to the current tag: + +``` + <param name="revision">0.42.1</param> +``` + +## Run the Services + + +``` +osc service runall +``` + +This checks out the tarball of the specified tag (from _service), recompresses +it, creates a cpio archive from it, and regenerates the change log from the git +commits. + +You should now get new files + +- `myrlyn-0.42.2.obscpio` (Important!) +- `myrlyn-0.42.2.tar.zst` (Temporary - remove!) + +``` +rm *.zst +``` + + +## Check in the new cpio Archive + +``` +osc ar +``` + +## Double-Check + +``` +osc status +``` + +## Check In + +``` +osc ci +``` + +## Check the Result + +- In the home project: + https://build.opensuse.org/ + - Left sidebar: "Your Home Project" + - Center tab: "Subprojects" + - `home:${user}:branches:system:packagemanager` + - "myrlyn" + + +- In the real target project: + https://build.opensuse.org/package/show/system:packagemanager/myrlyn + + +## Submit from the Home Project to the Devel Project + +``` +osc sr home:shundhammer:myrlyn-stable/myrlyn system:packagemanager/myrlyn +``` + +Check the pending requests: +https://build.opensuse.org/package/requests/system:packagemanager/myrlyn + + +## Submit from the Devel Project to Factory + +- [Devel Project](https://build.opensuse.org/package/show/system:packagemanager/myrlyn) +- [Factory](https://build.opensuse.org/project/show/openSUSE:Factory) + +``` +osc sr system:packagemanager/myrlyn openSUSE:Factory/myrlyn +``` + +Check the pending requests: +https://build.opensuse.org/package/requests/openSUSE:Factory/myrlyn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/README.md new/myrlyn-0.9.4/README.md --- old/myrlyn-0.9.3/README.md 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/README.md 2025-05-11 13:47:40.000000000 +0200 @@ -208,12 +208,16 @@ ## Ready-Made Packages +Official distro packages: + +- [myrlyn for openSUSE Tumbleweed](https://software.opensuse.org/download/package?package=myrlyn&project=openSUSE%3AFactory) +- [myrlyn for openSUSE Slowroll](https://software.opensuse.org//download.html?project=openSUSE%3ASlowroll&package=myrlyn) + + The latest version from Git: - [myrlyn-git for openSUSE Tumbleweed](https://download.opensuse.org/repositories/home:/shundhammer:/myrlyn-git/openSUSE_Tumbleweed/x86_64/) - - [myrlyn-git for openSUSE Slowroll](https://download.opensuse.org/repositories/home:/shundhammer:/myrlyn-git/openSUSE_Slowroll/x86_64/) - - [myrlyn-git for Leap 15.6](https://download.opensuse.org/repositories/home:/shundhammer:/myrlyn-git/openSUSE_Leap_15.6_Update_standard/x86_64/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/VERSION.cmake new/myrlyn-0.9.4/VERSION.cmake --- old/myrlyn-0.9.3/VERSION.cmake 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/VERSION.cmake 2025-05-11 13:47:40.000000000 +0200 @@ -1,4 +1,4 @@ SET( VERSION_MAJOR "0") SET( VERSION_MINOR "9" ) -SET( VERSION_PATCH "3" ) +SET( VERSION_PATCH "4" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/package/README.md new/myrlyn-0.9.4/package/README.md --- old/myrlyn-0.9.3/package/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/myrlyn-0.9.4/package/README.md 2025-05-11 13:47:40.000000000 +0200 @@ -0,0 +1,7 @@ +## myrlyn/package + +This is just a backup for the relevant packaging files in OBS in +[myrlyn-stable](https://build.opensuse.org/package/show/home:shundhammer:myrlyn-stable/myrlyn) +or the [devel project](https://build.opensuse.org/package/show/system:packagemanager/myrlyn). + +The .changes file is auto-generated from the Git commit logs. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/package/_service new/myrlyn-0.9.4/package/_service --- old/myrlyn-0.9.3/package/_service 1970-01-01 01:00:00.000000000 +0100 +++ new/myrlyn-0.9.4/package/_service 2025-05-11 13:47:40.000000000 +0200 @@ -0,0 +1,19 @@ +<?xml version="1.0"?> +<services> + <service name="obs_scm" mode="manual"> + <param name="url">https://github.com/shundhammer/myrlyn.git</param> + <param name="scm">git</param> + <param name="exclude">.git</param> + <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param> + <param name="versionrewrite-pattern">(.*)\+0</param> + <param name="versionrewrite-replacement">\1</param> + <param name="revision">0.9.4</param> + <param name="changesgenerate">enable</param> + </service> + <service name="set_version" mode="manual"/> + <service name="tar" mode="buildtime"/> + <service name="recompress" mode="buildtime"> + <param name="file">*.tar</param> + <param name="compression">zst</param> + </service> +</services> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/package/myrlyn.changes new/myrlyn-0.9.4/package/myrlyn.changes --- old/myrlyn-0.9.3/package/myrlyn.changes 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/package/myrlyn.changes 1970-01-01 01:00:00.000000000 +0100 @@ -1,56 +0,0 @@ -------------------------------------------------------------------- -Sat Apr 5 16:14:01 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Improved dist upgrade / package update (icons etc.) -- "Automatic changes" dialog only when needed -- Don't require root privileges for solver test case anymore -- Feedback about post-trans scripts -- 0.9.3 - -------------------------------------------------------------------- -Mon Feb 24 23:03:21 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Migration to Qt 6 -- Obsolete accidential version 9.0.1 (wrong git tag instead of 0.9.1) -- 0.9.2 - -------------------------------------------------------------------- -Thu Feb 6 15:04:24 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Added repo configuration including adding community repos -- 0.9.1 - -------------------------------------------------------------------- -Sun Jan 26 10:42:08 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Fixed "Installation Summary" icons to match desktop theme -- Fixed ambiguous keyboard shortcuts -- Added global Ctrl+Shift+?? keyboard shortcuts for the filter view pages -- 0.8.05 - -------------------------------------------------------------------- -Mon Jan 20 10:47:20 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Fixed OBS build for Leap 15.6 -- Implemented repo GPG key import -- Better error handling for download / install errors -- Fixed initial filter page -- 0.8.04 - -------------------------------------------------------------------- -Tue Jan 14 16:22:09 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Use transparent artwork consistently -- Added "About" dialog -- Rely on project home pagei via browser a online help -- Added and cleaned up "Patches" view -- Show number of patches / updates in the tab labels -- 0.8.03 - -------------------------------------------------------------------- -Thu Jan 9 13:46:35 UTC 2025 - Stefan Hundhammer <shundham...@suse.com> - -- Initial version -- 0.8.02 - -------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/package/myrlyn.spec new/myrlyn-0.9.4/package/myrlyn.spec --- old/myrlyn-0.9.3/package/myrlyn.spec 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/package/myrlyn.spec 2025-05-11 13:47:40.000000000 +0200 @@ -20,21 +20,18 @@ Name: myrlyn # If you change the version here, don't forget ../VERSION.cmake ! # To increase only the last number, use rake version:bump -Version: 0.9.3 +Version: 0.9.4 Release: 0 Summary: Package manager GUI License: GPL-2.0-only Group: System/Packages URL: https://github.com/shundhammer/myrlyn -Source: %{name}-%{version}.tar.bz2 +Source: %{name}-%{version}.tar.zst BuildRequires: %{libzypp_devel_version} BuildRequires: ImageMagick BuildRequires: boost-devel BuildRequires: cmake >= 3.17 BuildRequires: hicolor-icon-theme -# Workaround for boost issue, see boo#1225861 -# FIXME: Is this still needed (gcc-fortran)? -BuildRequires: gcc-fortran BuildRequires: pkgconfig BuildRequires: pkgconfig(Qt6Core) >= 6.5 BuildRequires: pkgconfig(Qt6Gui) @@ -55,13 +52,14 @@ Obsoletes: myrlyn = 9.0.1 %description -Myrlyn is a graphical package manager to select software packages and patterns for installation, update and removal. It uses libzypp as its backend and Qt as its GUI toolkit. +Myrlyn is a graphical package manager to select software packages +and patterns for installation, update and removal. +It uses libzypp as its backend and Qt as its GUI toolkit. %prep %autosetup -p1 - %build %if 0%{?suse_version} < 1600 export CC=gcc-13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/package/myrlyn_service new/myrlyn-0.9.4/package/myrlyn_service --- old/myrlyn-0.9.3/package/myrlyn_service 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/package/myrlyn_service 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -<!-- Doc: https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.source_service.html --> -<services> - <service name="tar_scm"> - <param name="url">https://github.com/shundhammer/myrlyn.git</param> - <param name="scm">git</param> - <!-- <param name="versionformat">@PARENT_TAG@+git%cd.%h</param> --> - <param name="versionformat">0.9.3+git%cd.%h</param> - <param name="exclude">.git</param> - <param name="revision">master</param> - <param name="filename">myrlyn</param> - </service> - <service name="set_version"/> - <service name="recompress"> - <param name="file">*.tar</param> - <param name="compression">bz2</param> - </service> -</services> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/InitReposPage.cc new/myrlyn-0.9.4/src/InitReposPage.cc --- old/myrlyn-0.9.3/src/InitReposPage.cc 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/InitReposPage.cc 2025-05-11 13:47:40.000000000 +0200 @@ -68,6 +68,9 @@ connect( _repoManager, SIGNAL( refreshRepoDone ( ZyppRepoInfo ) ), this, SLOT ( refreshRepoDone ( ZyppRepoInfo ) ) ); + + connect( _repoManager, SIGNAL( refreshRepoError( ZyppRepoInfo ) ), + this, SLOT ( refreshRepoError( ZyppRepoInfo ) ) ); } @@ -85,6 +88,7 @@ _emptyIcon = QPixmap( ":/empty-40x22" ); _downloadOngoingIcon = QIcon( ":/download-ongoing" ).pixmap( iconSize ); _downloadDoneIcon = QIcon( ":/download-done" ).pixmap( iconSize ); + _downloadErrorIcon = QIcon( ":/emoji-sad" ).pixmap( iconSize ); } @@ -129,7 +133,7 @@ } -void InitReposPage::refreshRepoDone ( const ZyppRepoInfo & repo ) +void InitReposPage::refreshRepoDone( const ZyppRepoInfo & repo ) { // logDebug() << "Repo refresh done for " << repo.name() << endl; @@ -138,6 +142,17 @@ MainWindow::processEvents(); } + + +void InitReposPage::refreshRepoError( const ZyppRepoInfo & repo ) +{ + // logDebug() << "Repo refresh error for " << repo.name() << endl; + + _ui->progressBar->setValue( ++_refreshDoneCount ); + setItemIcon( repo, _downloadErrorIcon ); + + MainWindow::processEvents(); +} QListWidgetItem * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/InitReposPage.h new/myrlyn-0.9.4/src/InitReposPage.h --- old/myrlyn-0.9.3/src/InitReposPage.h 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/InitReposPage.h 2025-05-11 13:47:40.000000000 +0200 @@ -77,7 +77,12 @@ /** * Notification that refreshing a repo is done. **/ - void refreshRepoDone ( const ZyppRepoInfo & repo ); + void refreshRepoDone( const ZyppRepoInfo & repo ); + + /** + * Notification that refreshing a repo failed. + **/ + void refreshRepoError( const ZyppRepoInfo & repo ); protected: @@ -119,6 +124,7 @@ QPixmap _emptyIcon; QPixmap _downloadOngoingIcon; QPixmap _downloadDoneIcon; + QPixmap _downloadErrorIcon; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/MyrlynRepoManager.cc new/myrlyn-0.9.4/src/MyrlynRepoManager.cc --- old/myrlyn-0.9.3/src/MyrlynRepoManager.cc 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/MyrlynRepoManager.cc 2025-05-11 13:47:40.000000000 +0200 @@ -30,6 +30,7 @@ #include "Logger.h" #include "MainWindow.h" #include "MyrlynApp.h" +#include "QY2CursorHelper.h" #include "YQi18n.h" #include "utf8.h" #include "MyrlynRepoManager.h" @@ -233,6 +234,7 @@ KeyRingCallbacks keyRingCallbacks; QElapsedTimer timer; + _failedRepos.clear(); for ( ZyppRepoInfo & repo: _repos ) { @@ -261,8 +263,13 @@ logInfo() << "Disabling repo " << repo.name() << endl; repo.setEnabled( false ); + _failedRepos.push_back( repo ); + + emit refreshRepoError( repo ); } } + + showFailedRepos(); } @@ -293,7 +300,41 @@ std::cerr << toUTF8( message ) << std::endl; QMessageBox::warning( MainWindow::instance(), // parent - _( "Error" ), + _( "Error" ), // window title message ); } + +void MyrlynRepoManager::showFailedRepos() const +{ + if ( _failedRepos.empty() ) + return; + + QString msg; + + if ( _failedRepos.size() == 1 ) + { + QString repoName = fromUTF8( _failedRepos.front().name() ); + + msg = _( "Refreshing repository \"%1\" failed.\n\n" + "This repository is now disabled " + "for this program run." ).arg( repoName ); + } + else + { + QString repoNameList; + + for ( const ZyppRepoInfo & repo: _failedRepos ) + repoNameList += QString( " - %1\n" ).arg( fromUTF8( repo.name() ) ); + + msg = _( "Refreshing failed for repositories\n\n" + "%1\n" + "Those repositories are now disabled " + "for this program run." ).arg( repoNameList ); + } + + normalCursor(); + QMessageBox::warning( MainWindow::instance(), // parent + _( "Warning" ), // window title + msg ); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/MyrlynRepoManager.h new/myrlyn-0.9.4/src/MyrlynRepoManager.h --- old/myrlyn-0.9.3/src/MyrlynRepoManager.h 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/MyrlynRepoManager.h 2025-05-11 13:47:40.000000000 +0200 @@ -89,6 +89,11 @@ **/ RepoManager_Ptr repoManager(); + /** + * Return 'true' if there were any repos that failed to refresh. + **/ + bool haveFailedRepos() const { return ! _failedRepos.empty(); } + signals: @@ -105,7 +110,12 @@ /** * Emitted when refreshing a repo is done. **/ - void refreshRepoDone ( const ZyppRepoInfo & repo ); + void refreshRepoDone( const ZyppRepoInfo & repo ); + + /** + * Emitted when refreshing a repo failed. + **/ + void refreshRepoError( const ZyppRepoInfo & repo ); protected: @@ -151,6 +161,12 @@ **/ void notifyUserToRunZypperDup() const; + /** + * Show a popup dialog with the names of repos that failed to refresh. + * Do nothing if there weren't any. + **/ + void showFailedRepos() const; + // // Data members @@ -159,6 +175,7 @@ zypp::ZYpp::Ptr _zypp_ptr; RepoManager_Ptr _repo_manager_ptr; RepoInfoList _repos; + RepoInfoList _failedRepos; }; #endif // MyrlynRepoManager_h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/YQPkgObjList.cc new/myrlyn-0.9.4/src/YQPkgObjList.cc --- old/myrlyn-0.9.3/src/YQPkgObjList.cc 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/YQPkgObjList.cc 2025-05-11 13:47:40.000000000 +0200 @@ -77,6 +77,7 @@ _excludedItemsCount = 0; + initColors(); createActions(); connect( this, SIGNAL( columnClicked ( int, QTreeWidgetItem *, int, const QPoint & ) ), @@ -100,6 +101,25 @@ } +void YQPkgObjList::initColors() +{ + _normalTextColor = palette().color( QPalette::Active, QPalette::Text ); + QColor backgroundColor = palette().color( QPalette::Active, QPalette::Base ); + + if ( backgroundColor.lightness() >= 128 ) // light Theme: 0 (black) .. 255 (white) + { + _blueTextColor = Qt::blue; + _redTextColor = Qt::red; + } + else // dark Theme + { + _blueTextColor = Qt::cyan; + _redTextColor = Qt::red; + } + +} + + void YQPkgObjList::addPkgObjItem( ZyppSel selectable, ZyppObj zyppObj ) { @@ -346,10 +366,10 @@ void YQPkgObjList::selectNextItem() { - QTreeWidgetItemIterator it(this); + QTreeWidgetItemIterator it( this ); QTreeWidgetItem * item; - while ( (item = *it) != NULL ) + while ( ( item = *it ) != NULL ) { ++it; scrollToItem( *it ); // Scroll if necessary @@ -533,7 +553,7 @@ void YQPkgObjList::updateActions( YQPkgObjListItem * item ) { - if ( !item) + if ( !item ) item = dynamic_cast<YQPkgObjListItem *> ( currentItem() ); if ( item ) @@ -931,11 +951,11 @@ } if ( _installedIsNewer ) - setForeground( versionCol(), Qt::red ); + setForeground( versionCol(), redTextColor() ); else if ( _candidateIsNewer ) - setForeground( versionCol(), Qt::blue ); + setForeground( versionCol(), blueTextColor() ); else - setForeground( versionCol(), Qt::black ); + setForeground( versionCol(), normalTextColor() ); } } else // separate columns for installed and available versions @@ -947,11 +967,11 @@ setText( instVersionCol(), installed->edition() ); if ( _installedIsNewer ) - setForeground( instVersionCol(), Qt::red ); + setForeground( instVersionCol(), redTextColor() ); else if ( _candidateIsNewer ) - setForeground( instVersionCol(), Qt::blue ); + setForeground( instVersionCol(), blueTextColor() ); else - setForeground( versionCol(), Qt::black ); + setForeground( versionCol(), normalTextColor() ); } } @@ -967,11 +987,11 @@ setText( versionCol(), candidate->edition() ); if ( _installedIsNewer ) - setForeground( versionCol(), Qt::red); + setForeground( versionCol(), redTextColor() ); else if ( _candidateIsNewer ) - setForeground( versionCol(), Qt::blue); + setForeground( versionCol(), blueTextColor() ); else - setForeground( versionCol(), Qt::black ); + setForeground( versionCol(), normalTextColor() ); } } } @@ -1154,7 +1174,6 @@ void YQPkgObjListItem::showNotifyTexts( ZyppStatus status ) { - // just return if no selectable if ( ! selectable() ) return; @@ -1452,7 +1471,7 @@ } -void YQPkgObjList::slotCustomContextMenu(const QPoint& pos) +void YQPkgObjList::slotCustomContextMenu( const QPoint& pos ) { YQPkgObjListItem * item = dynamic_cast<YQPkgObjListItem *> ( currentItem() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/myrlyn-0.9.3/src/YQPkgObjList.h new/myrlyn-0.9.4/src/YQPkgObjList.h --- old/myrlyn-0.9.3/src/YQPkgObjList.h 2025-04-05 18:17:43.000000000 +0200 +++ new/myrlyn-0.9.4/src/YQPkgObjList.h 2025-05-11 13:47:40.000000000 +0200 @@ -18,6 +18,7 @@ #ifndef YQPkgObjList_h #define YQPkgObjList_h +#include <QColor> #include <QPixmap> #include <QRegularExpression> #include <QMenu> @@ -77,6 +78,14 @@ int versionCol() const { return _versionCol; } int instVersionCol() const { return _instVersionCol; } + + // Text colors + + QColor normalTextColor() { return _normalTextColor; } + QColor blueTextColor() { return _blueTextColor; } + QColor redTextColor() { return _redTextColor; } + + /** * Return whether or not items in this list are generally editable, * i.e. the user can change their status. Note that individual items can be @@ -306,6 +315,12 @@ protected: /** + * Initialize the internally used colors depending on the widget theme + * (light or dark). + **/ + void initColors(); + + /** * Event handler for keyboard input. * Only very special keys are processed here. * @@ -369,16 +384,21 @@ // Data members - int _iconCol; - int _statusCol; - int _nameCol; - int _summaryCol; - int _sizeCol; - int _versionCol; - int _instVersionCol; - bool _editable; - bool _debug; - int _excludedItemsCount; + int _iconCol; + int _statusCol; + int _nameCol; + int _summaryCol; + int _sizeCol; + int _versionCol; + int _instVersionCol; + + QColor _normalTextColor; + QColor _redTextColor; + QColor _blueTextColor; + + bool _editable; + bool _debug; + int _excludedItemsCount; QMenu * _installedContextMenu; QMenu * _notInstalledContextMenu; @@ -599,6 +619,13 @@ int instVersionCol() const { return _pkgObjList->instVersionCol(); } + // Text colors + + QColor normalTextColor() { return _pkgObjList->normalTextColor(); } + QColor blueTextColor() { return _pkgObjList->blueTextColor(); } + QColor redTextColor() { return _pkgObjList->redTextColor(); } + + protected: /** ++++++ myrlyn.obsinfo ++++++ --- /var/tmp/diff_new_pack.ibbU9E/_old 2025-05-12 16:53:43.452880308 +0200 +++ /var/tmp/diff_new_pack.ibbU9E/_new 2025-05-12 16:53:43.456880476 +0200 @@ -1,5 +1,5 @@ name: myrlyn -version: 0.9.3 -mtime: 1743869863 -commit: de63ea8d1d0260853dae9ba2fa6200fcf70946b7 +version: 0.9.4 +mtime: 1746964060 +commit: f6ea978c7c6695aa958befa0a6fd771d08ee656c