From 8136ab814ecc952a0def62ec278e146630752076 Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Fri, 18 Feb 2022 14:19:39 +0100 Subject: [PATCH 1/2] Fix show next OTP option this fixes #234 --- src/app.c | 3 +-- src/liststore-misc.c | 5 ++--- src/treeview.c | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app.c b/src/app.c index 9bffc00..9030039 100644 --- a/src/app.c +++ b/src/app.c @@ -2,7 +2,6 @@ #include #include #include "otpclient.h" -#include "gui-common.h" #include "gquarks.h" #include "imports.h" #include "common/exports.h" @@ -226,7 +225,7 @@ activate (GtkApplication *app, g_signal_connect (app_data->main_window, "destroy", G_CALLBACK(destroy_cb), app_data); - app_data->source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 500, traverse_liststore, app_data, NULL); + app_data->source_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 1000, traverse_liststore, app_data, NULL); setup_dbus_listener (app_data); diff --git a/src/liststore-misc.c b/src/liststore-misc.c index 12e9832..0ec6676 100644 --- a/src/liststore-misc.c +++ b/src/liststore-misc.c @@ -4,7 +4,6 @@ #include "treeview.h" #include "liststore-misc.h" #include "gquarks.h" -#include "gui-common.h" #include "common/common.h" @@ -106,8 +105,8 @@ foreach_func_update_otps (GtkTreeModel *model, if (otp != NULL && g_utf8_strlen (otp, -1) > 4 && g_ascii_strcasecmp (otp_type, "TOTP") == 0) { gboolean short_countdown = (period <= 60 || only_a_minute_left) ? TRUE : FALSE; - gint remaining_seconds = (!short_countdown ? 119 : 59) - g_date_time_get_second (g_date_time_new_now_local()); - gint token_validity = remaining_seconds % period; + guint remaining_seconds = (!short_countdown ? 119 : 59) - g_date_time_get_second (g_date_time_new_now_local()); + guint token_validity = remaining_seconds % period; if (remaining_seconds % period == 60) { short_countdown = TRUE; } diff --git a/src/treeview.c b/src/treeview.c index 0f8f002..04b89eb 100644 --- a/src/treeview.c +++ b/src/treeview.c @@ -2,7 +2,6 @@ #include #include "otpclient.h" #include "liststore-misc.h" -#include "gui-common.h" #include "message-dialogs.h" From 21569822f6066dcebe49d5d0c998f5a91390f47f Mon Sep 17 00:00:00 2001 From: Paolo Stivanin Date: Fri, 18 Feb 2022 14:21:54 +0100 Subject: [PATCH 2/2] Release 2.4.8 --- CMakeLists.txt | 2 +- data/com.github.paolostivanin.OTPClient.appdata.xml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdabd6a..bcd93be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(OTPClient VERSION "2.4.7" LANGUAGES "C") +project(OTPClient VERSION "2.4.8" LANGUAGES "C") configure_file("src/common/version.h.in" "version.h") include_directories(${PROJECT_BINARY_DIR}) diff --git a/data/com.github.paolostivanin.OTPClient.appdata.xml b/data/com.github.paolostivanin.OTPClient.appdata.xml index 54c2d7a..fe6a846 100644 --- a/data/com.github.paolostivanin.OTPClient.appdata.xml +++ b/data/com.github.paolostivanin.OTPClient.appdata.xml @@ -83,6 +83,15 @@ It's also possible to import/export backups from/to andOTP and import backups fr + + +

OTPClient 2.4.8 brings a couple of fixes

+
    +
  • fix show next OTP option (issue#234)
  • +
  • correctly decode URIs from QR codes
  • +
+
+

OTPClient 2.4.7 implements some small code optimization