Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package otpclient for openSUSE:Factory 
checked in at 2026-08-02 23:14:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/otpclient (Old)
 and      /work/SRC/openSUSE:Factory/.otpclient.new.16738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "otpclient"

Sun Aug  2 23:14:48 2026 rev:53 rq:1369095 version:5.1.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/otpclient/otpclient.changes      2026-07-21 
23:00:44.022398151 +0200
+++ /work/SRC/openSUSE:Factory/.otpclient.new.16738/otpclient.changes   
2026-08-02 23:15:16.174017004 +0200
@@ -1,0 +2,18 @@
+Thu Jul 23 06:34:10 UTC 2026 - Paolo Stivanin <[email protected]>
+
+- Update to 5.1.6:
+  * FIX: with Auto-Lock enabled but the timeout left at its
+    default, the database re-locked roughly five seconds after each
+    unlock. The idle timer counts seconds, but the default was 5
+    and documented as minutes; it is now 300 seconds (five
+    minutes), so profiles that never set a timeout pick up a sane
+    value automatically (#467)
+  * FIX: the unlock prompt could not be dismissed and closing it
+    quit the whole application, so Settings could not be reached
+    while locked. Dismissing it (Escape, the dialog close button,
+    clicking outside, or the window close button) now drops to the
+    locked screen and keeps the toolbar reachable; the toolbar lock
+    button doubles as an unlock button while locked, and an
+    explicit Quit button remains on the prompt (#467)
+
+-------------------------------------------------------------------

Old:
----
  v5.1.5.tar.gz
  v5.1.5.tar.gz.asc

New:
----
  v5.1.6.tar.gz
  v5.1.6.tar.gz.asc

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

Other differences:
------------------
++++++ otpclient.spec ++++++
--- /var/tmp/diff_new_pack.GvWMzJ/_old  2026-08-02 23:15:17.218052889 +0200
+++ /var/tmp/diff_new_pack.GvWMzJ/_new  2026-08-02 23:15:17.218052889 +0200
@@ -18,7 +18,7 @@
 
 %define uclname OTPClient
 Name:           otpclient
-Version:        5.1.5
+Version:        5.1.6
 Release:        0
 Summary:        Simple GTK+ client for managing TOTP and HOTP
 License:        GPL-3.0-or-later

++++++ _scmsync.obsinfo ++++++
--- /var/tmp/diff_new_pack.GvWMzJ/_old  2026-08-02 23:15:17.266054539 +0200
+++ /var/tmp/diff_new_pack.GvWMzJ/_new  2026-08-02 23:15:17.270054676 +0200
@@ -1,5 +1,6 @@
-mtime: 1784528910
-commit: c5dfc727873cc35fbd92e5d70d25aa51991e7f0c910ac0fade8ac2b3e21ef9a1
+mtime: 1784788483
+commit: 500e6c52f63643c24e6f0b17e6fd96219ec1b31de29f7af9ae7132ddb510fb17
 url: https://src.opensuse.org/GNOME/otpclient
-revision: factory
+revision: 500e6c52f63643c24e6f0b17e6fd96219ec1b31de29f7af9ae7132ddb510fb17
+projectscmsync: https://src.opensuse.org/GNOME/_ObsPrj
 

++++++ build.specials.obscpio ++++++

++++++ build.specials.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.gitignore new/.gitignore
--- old/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/.gitignore      2026-07-23 08:34:43.000000000 +0200
@@ -0,0 +1,4 @@
+*.obscpio
+*.osc
+_build.*
+.pbuild


++++++ v5.1.5.tar.gz -> v5.1.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/CMakeLists.txt 
new/OTPClient-5.1.6/CMakeLists.txt
--- old/OTPClient-5.1.5/CMakeLists.txt  2026-07-16 17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/CMakeLists.txt  2026-07-22 15:25:23.000000000 +0200
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.25)
-project(OTPClient VERSION "5.1.5" LANGUAGES "C")
+project(OTPClient VERSION "5.1.6" LANGUAGES "C")
 include(GNUInstallDirs)
 include(CTest)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-5.1.5/data/com.github.paolostivanin.OTPClient.appdata.xml 
new/OTPClient-5.1.6/data/com.github.paolostivanin.OTPClient.appdata.xml
--- old/OTPClient-5.1.5/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-07-16 17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/data/com.github.paolostivanin.OTPClient.appdata.xml     
2026-07-22 15:25:23.000000000 +0200
@@ -90,6 +90,15 @@
   </content_rating>
 
   <releases>
+    <release version="5.1.6" date="2026-07-22">
+      <description>
+        <p>Bug-fix release. Auto-Lock was effectively unusable: on any profile 
that enabled it without changing the timeout, the database re-locked about five 
seconds after every unlock, and the unlock prompt could not be dismissed and 
quit the whole application when closed, leaving Settings unreachable. The 
timeout now defaults to five minutes, and the unlock prompt is dismissable and 
returns to a locked screen instead of quitting.</p>
+        <ul>
+          <li>FIX: with Auto-Lock enabled but the timeout left at its default, 
the database re-locked roughly five seconds after each unlock. The idle timer 
counts seconds, but the default was 5 and documented as minutes; the default is 
now 300 seconds (five minutes), so profiles that never set a timeout pick up a 
sane value automatically (#467)</li>
+          <li>FIX: the unlock prompt could not be dismissed and closing it 
quit the whole application, so Settings could not be reached while locked. 
Dismissing it (Escape, the dialog close button, clicking outside, or the window 
close button) now drops to the locked screen and keeps the toolbar reachable; 
the toolbar lock button doubles as an unlock button while locked, and an 
explicit Quit button remains on the prompt (#467)</li>
+        </ul>
+      </description>
+    </release>
     <release version="5.1.5" date="2026-07-16">
       <description>
         <p>Bug-fix release. A database stored on a filesystem that does not 
implement POSIX file locks, most notably the Flatpak XDG document-portal path 
(/run/user/UID/doc/) that the file chooser hands back, could not be opened or 
created and failed with "Failed to acquire database lock: Function not 
implemented"; the lock file added in 5.1.4 is now treated as best-effort. This 
release also stops the secure-memory pool from reserving the whole 
locked-memory budget, which had left the GTK password entry unable to lock its 
own buffer on every unlock.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OTPClient-5.1.5/data/com.github.paolostivanin.OTPClient.gschema.xml 
new/OTPClient-5.1.6/data/com.github.paolostivanin.OTPClient.gschema.xml
--- old/OTPClient-5.1.5/data/com.github.paolostivanin.OTPClient.gschema.xml     
2026-07-16 17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/data/com.github.paolostivanin.OTPClient.gschema.xml     
2026-07-22 15:25:23.000000000 +0200
@@ -47,9 +47,9 @@
       <description>Whether to auto lock the application or not</description>
     </key>
     <key name="auto-lock-timeout" type="u">
-      <default>5</default>
+      <default>300</default>
       <summary>Auto lock timeout</summary>
-      <description>Lock the application on idle after the specified amount of 
minutes</description>
+      <description>Lock the application on idle after the specified amount of 
seconds</description>
     </key>
     <key name="secret-service" type="b">
       <default>false</default>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/dialogs/password-dialog.c 
new/OTPClient-5.1.6/src/gui/dialogs/password-dialog.c
--- old/OTPClient-5.1.5/src/gui/dialogs/password-dialog.c       2026-07-16 
17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/src/gui/dialogs/password-dialog.c       2026-07-22 
15:25:23.000000000 +0200
@@ -170,12 +170,11 @@
     if (self->current_password_row != NULL)
         gtk_editable_set_text (GTK_EDITABLE (self->current_password_row), "");
 
-    /* Order matters: lock-state callers attach a "closed" handler that
-     * re-presents this dialog if the app is still locked when it fires. Run
-     * the callback first so it can flip app_locked to FALSE before the close
-     * triggers that handler - otherwise a successful unlock would race with a
-     * stale re-present. force_close bypasses can-close=FALSE (set by callers
-     * that want to block user-initiated dismissal). */
+    /* Order matters: lock-state callers attach a "closed" handler that drops
+     * the app to the locked page unless an unlock is in flight. Run the
+     * callback first so it marks the unlock in-progress before the close fires
+     * that handler, otherwise a successful unlock would race with a stray drop
+     * to the locked page. */
     adw_dialog_force_close (ADW_DIALOG (self));
 
     if (secure_current_pwd != NULL)
@@ -245,14 +244,6 @@
     g_signal_emit (self, signals[SIGNAL_QUIT_REQUESTED], 0);
 }
 
-static void
-on_locked_close_attempt (AdwDialog      *dialog,
-                         PasswordDialog *self)
-{
-    (void) dialog;
-    g_signal_emit (self, signals[SIGNAL_QUIT_REQUESTED], 0);
-}
-
 void
 password_dialog_set_locked_mode (PasswordDialog *self)
 {
@@ -262,14 +253,14 @@
         return;
     self->locked_mode = TRUE;
 
-    adw_dialog_set_can_close (ADW_DIALOG (self), FALSE);
-
+    /* The dialog stays dismissable (can_close defaults to TRUE): Escape, the
+     * dialog X, or the parent window's close button fire the normal "closed"
+     * signal, which lock-state callers use to drop to the locked page instead
+     * of quitting (#467). The Quit button remains the explicit way out. */
     GtkWidget *quit_button = gtk_button_new_with_label (_("Quit"));
     gtk_widget_add_css_class (quit_button, "flat");
     g_signal_connect (quit_button, "clicked", G_CALLBACK 
(on_quit_button_clicked), self);
     adw_header_bar_pack_start (ADW_HEADER_BAR (self->header), quit_button);
-
-    g_signal_connect (self, "close-attempt", G_CALLBACK 
(on_locked_close_attempt), self);
 }
 
 PasswordDialog *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/dialogs/password-dialog.h 
new/OTPClient-5.1.6/src/gui/dialogs/password-dialog.h
--- old/OTPClient-5.1.5/src/gui/dialogs/password-dialog.h       2026-07-16 
17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/src/gui/dialogs/password-dialog.h       2026-07-22 
15:25:23.000000000 +0200
@@ -24,12 +24,11 @@
                                                PasswordDialogCallback callback,
                                                gpointer              
user_data);
 
-/* Configure this dialog for "locked database" presentation:
- *  - shows a Quit button at the start of the header bar
- *  - sets can_close to FALSE so stray Escape/X don't dismiss the prompt
- *  - emits "quit-requested" when the user clicks Quit, presses Escape,
- *    clicks the dialog's X, or clicks the parent window's close button
- * Idempotent. */
+/* Configure this dialog for "locked database" presentation: adds a Quit
+ * button at the start of the header bar that emits "quit-requested" when
+ * clicked. The dialog stays dismissable, so Escape/X/click-outside fire the
+ * normal "closed" signal; lock-state callers use that to drop to the locked
+ * page rather than quit (#467). Idempotent. */
 void            password_dialog_set_locked_mode (PasswordDialog *self);
 
 G_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/lock-app.c 
new/OTPClient-5.1.6/src/gui/lock-app.c
--- old/OTPClient-5.1.5/src/gui/lock-app.c      2026-07-16 17:45:17.000000000 
+0200
+++ new/OTPClient-5.1.6/src/gui/lock-app.c      2026-07-22 15:25:23.000000000 
+0200
@@ -31,13 +31,20 @@
     (void) dialog;
     OTPClientApplication *app = OTPCLIENT_APPLICATION (user_data);
 
-    /* set_can_close(FALSE) blocks user-initiated dismissal, but the dialog can
-     * still close on parent-window teardown or programmatic close. If the app
-     * is still locked when that happens, re-present a fresh dialog so the user
-     * can't end up with the locked indicator on and no way to unlock. */
-    if (otpclient_application_get_app_locked (app) &&
-        !otpclient_application_is_unlocking (app))
-        lock_app_present_unlock_dialog (app);
+    /* An unlock submit is in flight: on_unlock_done loads the DB on success or
+     * re-presents this dialog on failure. Don't pre-empt it. */
+    if (otpclient_application_is_unlocking (app))
+        return;
+
+    /* Closed right after a successful unlock: the DB is open, nothing to do. 
*/
+    if (otpclient_application_is_db_unlocked (app))
+        return;
+
+    /* The user dismissed the prompt without unlocking (Escape, dialog X,
+     * click-outside, or the parent window's close button). Drop to the locked
+     * page instead of quitting or re-presenting, so the toolbar (Settings,
+     * unlock) stays reachable (#467). */
+    lock_app_enter_locked_state (app);
 }
 
 static void
@@ -59,6 +66,9 @@
     g_signal_connect_object (dlg, "quit-requested",
                              G_CALLBACK (on_unlock_dialog_quit_requested),
                              app, 0);
+    g_signal_connect_object (dlg, "closed",
+                             G_CALLBACK (on_unlock_dialog_closed),
+                             app, 0);
 }
 
 static void
@@ -72,7 +82,6 @@
                                                on_unlock_password,
                                                app);
     lock_app_install_unlock_dialog_quit (dlg, app);
-    g_signal_connect (dlg, "closed", G_CALLBACK (on_unlock_dialog_closed), 
app);
     adw_dialog_present (ADW_DIALOG (dlg), GTK_WIDGET (win));
 }
 
@@ -100,7 +109,7 @@
 }
 
 void
-lock_app_lock (OTPClientApplication *app)
+lock_app_enter_locked_state (OTPClientApplication *app)
 {
     if (otpclient_application_get_app_locked (app)) {
         if (otpclient_application_is_unlocking (app))
@@ -129,7 +138,19 @@
     }
 
     otpclient_application_purge_secrets (app);
-    if (win != NULL)
+}
+
+void
+lock_app_lock (OTPClientApplication *app)
+{
+    gboolean was_locked = otpclient_application_get_app_locked (app);
+
+    lock_app_enter_locked_state (app);
+
+    /* enter_locked_state is a no-op when already locked; only pop a fresh
+     * unlock dialog when this call actually transitioned into the locked
+     * state. */
+    if (!was_locked)
         present_unlock_dialog (app);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/lock-app.h 
new/OTPClient-5.1.6/src/gui/lock-app.h
--- old/OTPClient-5.1.5/src/gui/lock-app.h      2026-07-16 17:45:17.000000000 
+0200
+++ new/OTPClient-5.1.6/src/gui/lock-app.h      2026-07-22 15:25:23.000000000 
+0200
@@ -12,12 +12,18 @@
 void lock_app_lock                 (OTPClientApplication *app);
 void lock_app_unlock               (OTPClientApplication *app);
 
+/* Enter the locked state (purge the key, show the locked page, disable DB
+ * actions) WITHOUT presenting the unlock dialog. No-op when already locked.
+ * lock_app_lock is this plus a fresh unlock dialog; the unlock dialog's
+ * dismiss handler uses it to drop to the locked page (#467). */
+void lock_app_enter_locked_state   (OTPClientApplication *app);
+
 void lock_app_present_unlock_dialog (OTPClientApplication *app);
 
-/* Configure dlg as the unlock dialog for a locked database:
- * adds the Quit button, blocks accidental dismissal, and routes any
- * quit attempt (Quit button, Escape, dialog X, parent window X,
- * taskbar Close) to g_application_quit(app). */
+/* Wire dlg up as the unlock dialog for a locked database: adds the Quit
+ * button (routes to g_application_quit) and a "closed" handler that drops the
+ * app to the locked page when the user dismisses the prompt without unlocking
+ * (Escape, dialog X, parent window X). */
 void lock_app_install_unlock_dialog_quit (PasswordDialog       *dlg,
                                           OTPClientApplication *app);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/otpclient-application.c 
new/OTPClient-5.1.6/src/gui/otpclient-application.c
--- old/OTPClient-5.1.5/src/gui/otpclient-application.c 2026-07-16 
17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/src/gui/otpclient-application.c 2026-07-22 
15:25:23.000000000 +0200
@@ -1289,6 +1289,15 @@
     return self->unlock_in_progress;
 }
 
+gboolean
+otpclient_application_is_db_unlocked (OTPClientApplication *self)
+{
+    g_return_val_if_fail (OTPCLIENT_IS_APPLICATION (self), FALSE);
+    return !self->app_locked
+           && self->db_data != NULL
+           && self->db_data->in_memory_json_data != NULL;
+}
+
 void
 otpclient_application_set_db_data (OTPClientApplication *self,
                                     DatabaseData         *db_data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/otpclient-application.h 
new/OTPClient-5.1.6/src/gui/otpclient-application.h
--- old/OTPClient-5.1.5/src/gui/otpclient-application.h 2026-07-16 
17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/src/gui/otpclient-application.h 2026-07-22 
15:25:23.000000000 +0200
@@ -25,6 +25,11 @@
  * action that would free or replace db_data: the worker holds a raw
  * pointer to it and freeing under its feet is a use-after-free. */
 gboolean              otpclient_application_is_unlocking (OTPClientApplication 
*self);
+
+/* TRUE when a database is loaded and the app is not locked, i.e. OTP data is
+ * currently accessible. Used to tell a "successful unlock" dialog close apart
+ * from a user dismissal. */
+gboolean              otpclient_application_is_db_unlocked 
(OTPClientApplication *self);
 gboolean              otpclient_application_submit_unlock_password (
                                                            
OTPClientApplication *self,
                                                            const gchar         
 *password,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OTPClient-5.1.5/src/gui/otpclient-window.c 
new/OTPClient-5.1.6/src/gui/otpclient-window.c
--- old/OTPClient-5.1.5/src/gui/otpclient-window.c      2026-07-16 
17:45:17.000000000 +0200
+++ new/OTPClient-5.1.6/src/gui/otpclient-window.c      2026-07-22 
15:25:23.000000000 +0200
@@ -1139,7 +1139,7 @@
 
     if (locked) {
         gtk_button_set_icon_name (GTK_BUTTON (self->lock_button), 
"changes-prevent-symbolic");
-        gtk_widget_set_tooltip_text (self->lock_button, _("Database is 
locked"));
+        gtk_widget_set_tooltip_text (self->lock_button, _("Unlock database"));
     } else {
         gtk_button_set_icon_name (GTK_BUTTON (self->lock_button), 
"system-lock-screen-symbolic");
         gtk_widget_set_tooltip_text (self->lock_button, _("Lock database"));
@@ -3532,7 +3532,14 @@
 
     OTPClientApplication *app = OTPCLIENT_APPLICATION (
         gtk_window_get_application (GTK_WINDOW (self)));
-    if (app != NULL)
+    if (app == NULL)
+        return;
+
+    /* Context-sensitive toolbar button: while locked it re-presents the unlock
+     * dialog, otherwise it locks the database (#467). */
+    if (otpclient_application_get_app_locked (app))
+        lock_app_present_unlock_dialog (app);
+    else
         g_action_group_activate_action (G_ACTION_GROUP (app), "lock", NULL);
 }
 

Reply via email to