Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package qpwgraph for openSUSE:Factory 
checked in at 2023-04-02 21:35:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qpwgraph (Old)
 and      /work/SRC/openSUSE:Factory/.qpwgraph.new.9019 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qpwgraph"

Sun Apr  2 21:35:02 2023 rev:16 rq:1076749 version:0.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/qpwgraph/qpwgraph.changes        2023-03-03 
22:32:11.680232726 +0100
+++ /work/SRC/openSUSE:Factory/.qpwgraph.new.9019/qpwgraph.changes      
2023-04-02 21:35:02.598702603 +0200
@@ -1,0 +2,10 @@
+Sun Apr  2 14:25:42 UTC 2023 - Alexei Sorokin <sor.ale...@meowr.ru>
+
+- Update to version 0.4.2:
+  * Soft incremental bounds constraints now imposed to all new and
+    old nodes positioning.
+  * Attempt to auto-start minimised to system-tray icon, if
+    enabled, when restoring a desktop session (eg. after logout,
+    shutdown or restart).
+
+-------------------------------------------------------------------

Old:
----
  qpwgraph-v0.4.1.tar.bz2

New:
----
  qpwgraph-v0.4.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qpwgraph.spec ++++++
--- /var/tmp/diff_new_pack.j10BIG/_old  2023-04-02 21:35:03.078705045 +0200
+++ /var/tmp/diff_new_pack.j10BIG/_new  2023-04-02 21:35:03.082705066 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           qpwgraph
-Version:        0.4.1
+Version:        0.4.2
 Release:        0
 Summary:        PipeWire Graph Qt GUI Interface
 License:        GPL-2.0-or-later

++++++ qpwgraph-v0.4.1.tar.bz2 -> qpwgraph-v0.4.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/.gitlab-ci.yml 
new/qpwgraph-v0.4.2/.gitlab-ci.yml
--- old/qpwgraph-v0.4.1/.gitlab-ci.yml  2023-03-03 17:54:04.000000000 +0100
+++ new/qpwgraph-v0.4.2/.gitlab-ci.yml  2023-04-02 11:40:12.000000000 +0200
@@ -2,7 +2,7 @@
 #
 workflow:
   rules:
-    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
+    - if: $CI_COMMIT_BRANCH == "main"
     - when: never
 
 stages:
@@ -37,7 +37,7 @@
 .fedora:
   variables:
     # Update this tag when you want to trigger a rebuild
-    FDO_DISTRIBUTION_TAG: '2023-02-27.0'
+    FDO_DISTRIBUTION_TAG: '2023-03-15.0'
     FDO_DISTRIBUTION_VERSION: '37'
     FDO_DISTRIBUTION_PACKAGES: >-
       gcc
@@ -54,7 +54,7 @@
 .ubuntu:
   variables:
     # Update this tag when you want to trigger a rebuild
-    FDO_DISTRIBUTION_TAG: '2023-02-27.0'
+    FDO_DISTRIBUTION_TAG: '2023-03-15.0'
     FDO_DISTRIBUTION_VERSION: '22.10'
     FDO_DISTRIBUTION_PACKAGES: >-
       debhelper-compat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/CMakeLists.txt 
new/qpwgraph-v0.4.2/CMakeLists.txt
--- old/qpwgraph-v0.4.1/CMakeLists.txt  2023-03-03 17:54:04.000000000 +0100
+++ new/qpwgraph-v0.4.2/CMakeLists.txt  2023-04-02 11:40:12.000000000 +0200
@@ -1,7 +1,7 @@
 cmake_minimum_required (VERSION 3.15)
 
 project(qpwgraph
-  VERSION 0.4.1
+  VERSION 0.4.2
   DESCRIPTION "A PipeWire Graph Qt GUI Interface"
   HOMEPAGE_URL "https://gitlab.freedesktop.org/rncbc/qpwgraph";
   LANGUAGES C CXX)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/ChangeLog 
new/qpwgraph-v0.4.2/ChangeLog
--- old/qpwgraph-v0.4.1/ChangeLog       2023-03-03 17:54:04.000000000 +0100
+++ new/qpwgraph-v0.4.2/ChangeLog       2023-04-02 11:40:12.000000000 +0200
@@ -2,21 +2,30 @@
 --------------------------------------------
 
 
+0.4.2  2023-04-02  An early-spring'23 release.
+
+- Soft incremental bounds constraints now imposed to all new and
+  old nodes positioning.
+- Attempt to auto-start minimized to system-tray icon, if enabled,
+  when restoring a desktop session (eg. after logout, shutdown or
+  restart).
+
+
 0.4.1  2023-03-03  A late-winter'23 release.
 
-- Attempt to make port labels as short as possible. (EXPERIMENTAL)
+- Attempt to make port labels as short as possible.
 - Fixed a possible crash when several PW objects (nodes and ports)
-  are created and destroyed in fast succession. (EXPERIMENTAL)
+  are created and destroyed in fast succession.
 
 
 0.4.0  2023-02-25  A mid-winter'23 release.
 
 - Node names now have the "media.name" property as a bracketed
-  suffix; when given and applicable. (EXPERIMENTAL) 
+  suffix; when given and applicable.
 - Node icons now reflecting their proper application/theme icons
   or else, a bland and generic default taken from the "client.api"
-  property (eg. "pw", "jack" or "pulse"). (EXPERIMENTAL)
-- Introducing touch pinch-gesture for zooming. (EXPERIMENTAL)
+  property (eg. "pw", "jack" or "pulse").
+- Introducing touch pinch-gesture for zooming.
 - Bumping copyright headers to the brand new year.
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/debian/changelog 
new/qpwgraph-v0.4.2/debian/changelog
--- old/qpwgraph-v0.4.1/debian/changelog        2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/debian/changelog        2023-04-02 11:40:12.000000000 
+0200
@@ -1,3 +1,9 @@
+qpwgraph (0.4.2-24.1) unstable; urgency=low
+
+  * An early-spring'23 release.
+
+ -- Rui Nuno Capela <rn...@rncbc.org>  Sun,  2 Apr 2023 12:00:00 +0100
+
 qpwgraph (0.4.1-23.1) unstable; urgency=low
 
   * A late-winter'23 release.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/rpm/qpwgraph.spec 
new/qpwgraph-v0.4.2/rpm/qpwgraph.spec
--- old/qpwgraph-v0.4.1/rpm/qpwgraph.spec       2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/rpm/qpwgraph.spec       2023-04-02 11:40:12.000000000 
+0200
@@ -16,8 +16,8 @@
 #
 
 %define name   qpwgraph
-%define version        0.4.1
-%define release        23.1
+%define version        0.4.2
+%define release        24.1
 
 %define _prefix        /usr
 
@@ -141,6 +141,8 @@
 
 
 %changelog
+* Sun Apr  2 2023 Rui Nuno Capela <rn...@rncbc.org> 0.4.2
+- An early-spring'23 release.
 * Fri Mar  3 2023 Rui Nuno Capela <rn...@rncbc.org> 0.4.1
 - A late-winter'23 release.
 * Sat Feb 25 2023 Rui Nuno Capela <rn...@rncbc.org> 0.4.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/qpwgraph-v0.4.1/src/appdata/org.rncbc.qpwgraph.metainfo.xml 
new/qpwgraph-v0.4.2/src/appdata/org.rncbc.qpwgraph.metainfo.xml
--- old/qpwgraph-v0.4.1/src/appdata/org.rncbc.qpwgraph.metainfo.xml     
2023-03-03 17:54:04.000000000 +0100
+++ new/qpwgraph-v0.4.2/src/appdata/org.rncbc.qpwgraph.metainfo.xml     
2023-04-02 11:40:12.000000000 +0200
@@ -37,7 +37,7 @@
  <developer_name>rncbc aka. Rui Nuno Capela</developer_name>
  <update_contact>rn...@rncbc.org</update_contact>
  <releases>
-  <release version="0.4.1" date="2023-03-03" urgency="low" />
+  <release version="0.4.2" date="2023-04-02" urgency="low" />
  </releases>
  <content_rating type="oars-1.0"/>
 </component>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph.cpp 
new/qpwgraph-v0.4.2/src/qpwgraph.cpp
--- old/qpwgraph-v0.4.1/src/qpwgraph.cpp        2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph.cpp        2023-04-02 11:40:12.000000000 
+0200
@@ -1,7 +1,7 @@
 // qpwgraph.cpp
 //
 /****************************************************************************
-   Copyright (C) 2021-2022, rncbc aka Rui Nuno Capela. All rights reserved.
+   Copyright (C) 2021-2023, rncbc aka Rui Nuno Capela. All rights reserved.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -264,8 +264,11 @@
        app.setMainWidget(&form);
        form.apply_args(&app);
 
-       if (!app.isStartMinimized())
-               form.show();
+       // Setup session manager shutdown (eg. logoff)...
+       QObject::connect(
+               &app, SIGNAL(commitDataRequest(QSessionManager&)),
+               &form, SLOT(commitData(QSessionManager&)),
+               Qt::DirectConnection);
 
        return app.exec();
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph.h 
new/qpwgraph-v0.4.2/src/qpwgraph.h
--- old/qpwgraph-v0.4.1/src/qpwgraph.h  2023-03-03 17:54:04.000000000 +0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph.h  2023-04-02 11:40:12.000000000 +0200
@@ -1,7 +1,7 @@
 // qpwgraph.h
 //
 /****************************************************************************
-   Copyright (C) 2021-2022, rncbc aka Rui Nuno Capela. All rights reserved.
+   Copyright (C) 2021-2023, rncbc aka Rui Nuno Capela. All rights reserved.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_canvas.cpp 
new/qpwgraph-v0.4.2/src/qpwgraph_canvas.cpp
--- old/qpwgraph-v0.4.1/src/qpwgraph_canvas.cpp 2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_canvas.cpp 2023-04-02 11:40:12.000000000 
+0200
@@ -665,10 +665,8 @@
                                                ++nchanged;
                                        }
                                        // Original node position (for move 
command)...
-                                       QPointF pos1 = m_pos;
-                                       pos1.setX(4.0 * ::round(0.25 * 
pos1.x()));
-                                       pos1.setY(4.0 * ::round(0.25 * 
pos1.y()));
-                                       m_pos1 = pos1;
+                                       m_pos1 = m_pos;
+                                       snapPos(m_pos1);
                                }
                                else m_item = nullptr;
                        }
@@ -678,19 +676,12 @@
                                m_rubberband = new 
QRubberBand(QRubberBand::Rectangle, this);
                        }
                        // Set allowed auto-scroll margins/limits...
-                       const QRect& rect = QGraphicsView::rect();
-                       const qreal mx = 0.5f * rect.width();
-                       const qreal my = 0.5f * rect.height();
-                       m_rect1 = m_scene->itemsBoundingRect()
-                               .marginsAdded(QMarginsF(mx, my, mx, my));
+                       boundingRect(true);
                }
                break;
        case DragMove:
                // Allow auto-scroll only if within allowed margins/limits...
-               if (!m_rect1.contains(pos)) {
-                       pos.setX(qBound(m_rect1.left(), pos.x(), 
m_rect1.right()));
-                       pos.setY(qBound(m_rect1.top(),  pos.y(), 
m_rect1.bottom()));
-               }
+               boundingPos(pos);
                QGraphicsView::ensureVisible(QRectF(pos, QSizeF(2, 2)), 8, 8);
                // Move new connection line...
                if (m_connect)
@@ -742,8 +733,7 @@
                }
                // Move current selected nodes...
                if (m_item && m_item->type() == qpwgraph_node::Type) {
-                       pos.setX(4.0 * ::round(0.25 * pos.x()));
-                       pos.setY(4.0 * ::round(0.25 * pos.y()));
+                       snapPos(pos);
                        const QPointF delta = (pos - m_pos);
                        foreach (QGraphicsItem *item, m_scene->selectedItems()) 
{
                                if (item->type() == qpwgraph_node::Type) {
@@ -1280,13 +1270,14 @@
                node->setNodeTitle(node_title);
 
        m_settings->beginGroup(NodePosGroup);
-       const QPointF& node_pos
-               = m_settings->value('/' + node_key).toPointF();
+       QPointF node_pos = m_settings->value('/' + node_key).toPointF();
        m_settings->endGroup();
 
        if (node_pos.isNull())
                return false;
 
+       boundingPos(node_pos);
+
        node->setPos(node_pos);
        return true;
 }
@@ -1378,13 +1369,12 @@
        m_settings->endGroup();
 
        m_settings->beginGroup(CanvasGroup);
-       m_settings->setValue(CanvasRectKey, QGraphicsView::sceneRect());
        const QRectF& rect = m_settings->value(CanvasRectKey).toRectF();
        const qreal zoom = m_settings->value(CanvasZoomKey, 1.0).toReal();
        m_settings->endGroup();
 
        if (rect.isValid())
-               QGraphicsView::setSceneRect(rect);
+               m_rect1 = rect; // QGraphicsView::setSceneRect(rect);
 
        setZoom(zoom);
 
@@ -1439,7 +1429,7 @@
 
        m_settings->beginGroup(CanvasGroup);
        m_settings->setValue(CanvasZoomKey, zoom());
-       m_settings->setValue(CanvasRectKey, QGraphicsView::sceneRect());
+       m_settings->setValue(CanvasRectKey, m_rect1);
        m_settings->endGroup();
 
        m_settings->beginGroup(ColorsGroup);
@@ -1750,4 +1740,47 @@
 }
 
 
+// Bounding margins/limits...
+//
+const QRectF& qpwgraph_canvas::boundingRect ( bool reset )
+{
+       if (!m_rect1.isValid() || reset) {
+               const QRect& rect = QGraphicsView::rect();
+               const qreal mx = 0.33 * rect.width();
+               const qreal my = 0.33 * rect.height();
+               m_rect1 = m_scene->itemsBoundingRect()
+                       .marginsAdded(QMarginsF(mx, my, mx, my));
+       }
+
+       return m_rect1;
+}
+
+
+void qpwgraph_canvas::boundingPos ( QPointF& pos )
+{
+       const QRectF& rect = boundingRect();
+       if (!rect.contains(pos)) {
+               pos.setX(qBound(rect.left(), pos.x(), rect.right()));
+               pos.setY(qBound(rect.top(),  pos.y(), rect.bottom()));
+       }
+}
+
+
+// Snap into position helpers.
+//
+void qpwgraph_canvas::snapPos ( QPointF& pos ) const
+{
+       pos.setX(4.0 * ::round(0.25 * pos.x()));
+       pos.setY(4.0 * ::round(0.25 * pos.y()));
+}
+
+
+QPointF qpwgraph_canvas::snapPos ( qreal x, qreal y ) const
+{
+       QPointF pos(x, y);
+       snapPos(pos);
+       return pos;
+}
+
+
 // end of qpwgraph_canvas.cpp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_canvas.h 
new/qpwgraph-v0.4.2/src/qpwgraph_canvas.h
--- old/qpwgraph-v0.4.1/src/qpwgraph_canvas.h   2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_canvas.h   2023-04-02 11:40:12.000000000 
+0200
@@ -159,6 +159,9 @@
        // Clear all state.
        void clear();
 
+       // Snap into position helper.
+       QPointF snapPos(qreal x, qreal y) const;
+
 signals:
 
        // Node factory notifications.
@@ -252,6 +255,13 @@
        // Renaming editor position and size updater.
        void updateEditorGeometry();
 
+       // Bounding margins/limits...
+       const QRectF& boundingRect(bool reset = false);
+       void boundingPos(QPointF& pos);
+
+       // Snap into position helper.
+       void snapPos(QPointF& pos) const;
+
 private:
 
        // Mouse pointer dragging states.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_config.cpp 
new/qpwgraph-v0.4.2/src/qpwgraph_config.cpp
--- old/qpwgraph-v0.4.1/src/qpwgraph_config.cpp 2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_config.cpp 2023-04-02 11:40:12.000000000 
+0200
@@ -58,6 +58,9 @@
 static const char *SystemTrayEnabledKey = "/Enabled";
 #endif
 
+static const char *SessionGroup = "/Session";
+static const char *SessionStartMinimizedKey = "/StartMinimized";
+
 
 //----------------------------------------------------------------------------
 // qpwgraph_config --  Canvas state memento.
@@ -310,6 +313,26 @@
 }
 
 
+void qpwgraph_config::setSessionStartMinimized ( bool start_minimized )
+{
+       m_settings->beginGroup(SessionGroup);
+       m_settings->setValue(SessionStartMinimizedKey, start_minimized);
+       m_settings->endGroup();
+
+       m_settings->sync();
+}
+
+bool qpwgraph_config::isSessionStartMinimized (void) const
+{
+       m_settings->beginGroup(SessionGroup);
+       const bool start_minimized
+               = m_settings->value(SessionStartMinimizedKey, false).toBool();
+       m_settings->endGroup();
+
+       return start_minimized;
+}
+
+
 // Graph main-widget state methods.
 bool qpwgraph_config::restoreState ( QMainWindow *widget )
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_config.h 
new/qpwgraph-v0.4.2/src/qpwgraph_config.h
--- old/qpwgraph-v0.4.1/src/qpwgraph_config.h   2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_config.h   2023-04-02 11:40:12.000000000 
+0200
@@ -101,6 +101,9 @@
        void setSystemTrayEnabled(bool enabled);
        bool isSystemTrayEnabled() const;
 
+       void setSessionStartMinimized(bool start_minimized);
+       bool isSessionStartMinimized() const;
+
        // Graph main-widget state methods.
        bool restoreState(QMainWindow *widget);
        bool saveState(QMainWindow *widget) const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_form.cpp 
new/qpwgraph-v0.4.2/src/qpwgraph_form.cpp
--- old/qpwgraph-v0.4.1/src/qpwgraph_form.cpp   2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_form.cpp   2023-04-02 11:40:12.000000000 
+0200
@@ -55,6 +55,8 @@
 #include <QResizeEvent>
 #include <QCloseEvent>
 
+#include <QSessionManager>
+
 #include <cmath>
 
 
@@ -520,12 +522,23 @@
 
        updatePatchbayNames();
 
-       if (app->isStartMinimized())
+       bool start_minimized = app->isStartMinimized();
+       if (!start_minimized && app->isSessionRestored())
+               start_minimized = m_config->isSessionStartMinimized();
+       if (start_minimized) {
        #ifdef CONFIG_SYSTEM_TRAY
-               hide();
+               if (m_systray) {
+                       hide();
+                       m_systray_closed = true;
+               } else {
+                       showMinimized();
+               }
        #else
                showMinimized();
        #endif
+       } else {
+               show();
+       }
 }
 
 
@@ -959,10 +972,10 @@
                break;
        }}
 
-       x = 4.0 * ::round(0.25 * (x - qreal(::rand() & 0x1f)));
-       y = 4.0 * ::round(0.25 * (y - qreal(::rand() & 0x1f)));
+       x -= qreal(::rand() & 0x1f);
+       y -= qreal(::rand() & 0x1f);
 
-       node->setPos(x, y);
+       node->setPos(canvas->snapPos(x, y));
 
        updated(node);
 }
@@ -1662,5 +1675,14 @@
 }
 
 
+// Session management handler (eg. logoff)
+void qpwgraph_form::commitData ( QSessionManager& sm )
+{
+       sm.release();
+
+       m_config->setSessionStartMinimized(!isVisible() && !isMinimized());
+}
+
+
 // end of qpwgraph_form.cpp
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/qpwgraph-v0.4.1/src/qpwgraph_form.h 
new/qpwgraph-v0.4.2/src/qpwgraph_form.h
--- old/qpwgraph-v0.4.1/src/qpwgraph_form.h     2023-03-03 17:54:04.000000000 
+0100
+++ new/qpwgraph-v0.4.2/src/qpwgraph_form.h     2023-04-02 11:40:12.000000000 
+0200
@@ -48,6 +48,8 @@
 
 class QActionGroup;
 
+class QSessionManager;
+
 
 //----------------------------------------------------------------------------
 // qpwgraph_form -- UI wrapper form.
@@ -151,6 +153,8 @@
 
        void closeQuit();
 
+       void commitData(QSessionManager& sm);
+
 protected:
 
        // Open/save patchbay file.

Reply via email to