Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package otpclient for openSUSE:Factory checked in at 2023-05-26 20:15:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/otpclient (Old) and /work/SRC/openSUSE:Factory/.otpclient.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "otpclient" Fri May 26 20:15:41 2023 rev:26 rq:1089142 version:3.1.7 Changes: -------- --- /work/SRC/openSUSE:Factory/otpclient/otpclient.changes 2023-03-22 22:31:58.758596958 +0100 +++ /work/SRC/openSUSE:Factory/.otpclient.new.1533/otpclient.changes 2023-05-26 20:15:55.336423167 +0200 @@ -1,0 +2,11 @@ +Fri May 26 06:41:32 UTC 2023 - Paolo Stivanin <i...@paolostivanin.com> + +- Update to 3.1.7: + * Add new Database info dialog (Hamburger menu -> Database info) + * Fix crash when no row is selected (#295) + * Fix UI when creating/changing a database + * Multiple fixes when creating a new database + * Use current db folder when creating/changing database + * Fix memory leak in case of error when opening the settings dialog + +------------------------------------------------------------------- Old: ---- v3.1.6.tar.gz v3.1.6.tar.gz.asc New: ---- v3.1.7.tar.gz v3.1.7.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ otpclient.spec ++++++ --- /var/tmp/diff_new_pack.48shN3/_old 2023-05-26 20:15:56.436429723 +0200 +++ /var/tmp/diff_new_pack.48shN3/_new 2023-05-26 20:15:56.440429747 +0200 @@ -18,7 +18,7 @@ %define uclname OTPClient Name: otpclient -Version: 3.1.6 +Version: 3.1.7 Release: 0 Summary: Simple GTK+ client for managing TOTP and HOTP License: GPL-3.0-or-later @@ -31,20 +31,19 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: libcotp-devel >= 2.0.0 -BuildRequires: libgcrypt-devel >= 1.6.0 -BuildRequires: libjansson-devel >= 2.10.0 -BuildRequires: libpng16-devel >= 1.6.0 +BuildRequires: libgcrypt-devel >= 1.8.0 +BuildRequires: libjansson-devel >= 2.12.0 +BuildRequires: libpng16-devel >= 1.6.30 BuildRequires: libprotobuf-c-devel >= 1.3.0 BuildRequires: libsecret-devel >= 0.20 BuildRequires: libuuid-devel >= 2.34.0 BuildRequires: libzbar-devel >= 0.20.0 -BuildRequires: libzip-devel >= 1.1.0 BuildRequires: pkgconfig BuildRequires: protobuf-devel >= 3.6.0 BuildRequires: qrencode-devel >= 4.0.2 BuildRequires: update-desktop-files BuildRequires: pkgconfig(glib-2.0) >= 2.64 -BuildRequires: pkgconfig(gtk+-3.0) >= 3.20 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.24 %description Highly secure and easy to use GTK+ software for two-factor authentication ++++++ v3.1.6.tar.gz -> v3.1.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/CMakeLists.txt new/OTPClient-3.1.7/CMakeLists.txt --- old/OTPClient-3.1.6/CMakeLists.txt 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/CMakeLists.txt 2023-05-26 08:24:01.000000000 +0200 @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.16) -project(OTPClient VERSION "3.1.6" LANGUAGES "C") +project(OTPClient VERSION "3.1.7" LANGUAGES "C") include(GNUInstallDirs) configure_file("src/common/version.h.in" "version.h") @@ -50,10 +50,10 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCOTP_OLD_LIB") pkg_check_modules(BASEENCODE REQUIRED baseencode>=1.0.15) endif() -pkg_check_modules(PNG REQUIRED libpng>=1.6.35) +pkg_check_modules(PNG REQUIRED libpng>=1.6.30) pkg_check_modules(JANSSON REQUIRED jansson>=2.12) pkg_check_modules(ZBAR REQUIRED zbar>=0.20) -pkg_check_modules(GTK3 REQUIRED gtk+-3.0>=3.20.0) +pkg_check_modules(GTK3 REQUIRED gtk+-3.0>=3.24.0) pkg_check_modules(GLIB2 REQUIRED glib-2.0>=2.64.0) pkg_check_modules(GIO REQUIRED gio-2.0>=2.64.0) pkg_check_modules(UUID REQUIRED uuid>=2.34.0) @@ -92,7 +92,7 @@ src/shortcuts-cb.h src/webcam-add-cb.h src/edit-row-cb.h - src/show-qr-cb.h) + src/show-qr-cb.h src/dbinfo-cb.h) set(GUI_SOURCE_FILES src/common/common.c @@ -132,7 +132,7 @@ src/about_diag_cb.c src/show-qr-cb.c src/setup-signals-shortcuts.c - src/change-pwd-cb.c) + src/change-pwd-cb.c src/dbinfo-cb.c) set(CLI_HEADER_FILES src/cli/help.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/README.md new/OTPClient-3.1.7/README.md --- old/OTPClient-3.1.6/README.md 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/README.md 2023-05-26 08:24:01.000000000 +0200 @@ -12,11 +12,11 @@ ## Requirements | Name | Min Version | |----------------------------------------------------|-------------| -| GTK+ | 3.20 | -| Glib | 2.48.0 | +| GTK+ | 3.24 | +| Glib | 2.64.0 | | jansson | 2.12 | | libgcrypt | 1.8.0 | -| libpng | 1.6.35 | +| libpng | 1.6.30 | | [libcotp](https://github.com/paolostivanin/libcotp) | 2.0.0 | | zbar | 0.20 | | protobuf-c | 1.3.0 | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/data/com.github.paolostivanin.OTPClient.appdata.xml new/OTPClient-3.1.7/data/com.github.paolostivanin.OTPClient.appdata.xml --- old/OTPClient-3.1.6/data/com.github.paolostivanin.OTPClient.appdata.xml 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/data/com.github.paolostivanin.OTPClient.appdata.xml 2023-05-26 08:24:01.000000000 +0200 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2019 Paolo Stivanin <i...@paolostivanin.com> --> +<!-- Copyright 2023 Paolo Stivanin <i...@paolostivanin.com> --> <component type="desktop-application"> <id type="desktop">com.github.paolostivanin.OTPClient.desktop</id> <metadata_license>CC-BY-4.0</metadata_license> @@ -14,11 +14,20 @@ </keywords> <description> - <p> - Easy to use GTK application for securely managing TOTP and HOTP tokens. -The content is encrypted on the disk using AES256-GCM and the master password is derived using PBKDF2 with 100k iterations and SHA512 as hash algorithm. -It's also possible to import/export backups from/to andOTP and import backups from Authenticator+. - </p> + <p>Highly secure and easy to use OTP client written in C/GTK3 that supports both TOTP and HOTP and has the following features:</p> +<ul> +<li>integration with the OS' secret service provider via libsecret</li> +<li>support both TOTP and HOTP</li> +<li>support setting custom digits (between 4 and 10 inclusive)</li> +<li>support setting a custom period (between 10 and 120 seconds inclusive)</li> +<li>support SHA1, SHA256 and SHA512 algorithms</li> +<li>support for Steam codes</li> +<li>import and export encrypted/plain andOTP backup</li> +<li>import and export encrypted/plain Aegis backup</li> +<li>import and export plain FreeOTPPlus backup (key URI format only)</li> +<li>import of Google's migration QR codes</li> +<li>local database is encrypted using AES256-GCM (PBKDF2 with SHA512 and 100k iterations) and, while decrypted, it's stored in a secure memory area allocated by GCrypt.</li> +</ul> </description> <launchable type="desktop-id">com.github.paolostivanin.OTPClient.desktop</launchable> @@ -75,6 +84,19 @@ </content_rating> <releases> + <release version="3.1.7" date="2023-05-26"> + <description> + <p>OTPClient 3.1.7 brings many fixes</p> + <ul> + <li>Add new Database info dialog</li> + <li>Fix crash when no row is selected (#295)</li> + <li>Fix UI when creating/changing a database</li> + <li>Multiple fixes when creating a new database</li> + <li>Use current db folder when creating/changing database</li> + <li>Fix memory leak in case of error when opening the settings dialog</li> + </ul> + </description> + </release> <release version="3.1.6" date="2023-03-22"> <description> <p>OTPClient 3.1.6 fixes a security issue.</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/flatpak/com.github.paolostivanin.OTPClient.yaml new/OTPClient-3.1.7/flatpak/com.github.paolostivanin.OTPClient.yaml --- old/OTPClient-3.1.6/flatpak/com.github.paolostivanin.OTPClient.yaml 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/flatpak/com.github.paolostivanin.OTPClient.yaml 2023-05-26 08:24:01.000000000 +0200 @@ -1,6 +1,6 @@ app-id: com.github.paolostivanin.OTPClient runtime: org.gnome.Platform -runtime-version: '42' +runtime-version: '44' sdk: org.gnome.Sdk command: otpclient finish-args: @@ -10,11 +10,7 @@ - "--device=all" - "--talk-name=org.freedesktop.secrets" modules: -- name: libzip - buildsystem: cmake-ninja - config-opts: - - "-DCMAKE_BUILD_TYPE=Release" - - "-DCMAKE_INSTALL_LIBDIR=lib" +- name: jansson cleanup: - "/include" - "/bin" @@ -23,9 +19,10 @@ - "/lib/*.la" sources: - type: archive - url: https://libzip.org/download/libzip-1.9.2.tar.xz - sha256: c93e9852b7b2dc931197831438fee5295976ee0ba24f8524a8907be5c2ba5937 -- name: jansson + url: https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz + sha256: 5798d010e41cf8d76b66236cfb2f2543c8d082181d16bc3085ab49538d4b9929 +- shared-modules/libsecret/libsecret.json +- name: protobuf cleanup: - "/include" - "/bin" @@ -34,8 +31,28 @@ - "/lib/*.la" sources: - type: archive - url: https://github.com/akheron/jansson/releases/download/v2.14/jansson-2.14.tar.gz - sha256: 5798d010e41cf8d76b66236cfb2f2543c8d082181d16bc3085ab49538d4b9929 + url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.tar.gz + sha256: 22fdaf641b31655d4b2297f9981fa5203b2866f8332d3c6333f6b0107bb320de +- name: protobuf-c + cleanup: + - "/include" + - "/bin" + - "/share" + - "/lib/pkgconfig" + - "/lib/*.la" + sources: + - type: archive + url: https://github.com/protobuf-c/protobuf-c/archive/refs/tags/v1.4.1.tar.gz + sha256: 99be336cdb15dfc5827efe34e5ac9aaa962e2485db547dd254d2a122a7d23102 +- name: qrencode + buildsystem: cmake-ninja + config-opts: + - "-DCMAKE_BUILD_TYPE=Release" + - "-DBUILD_SHARED_LIBS=TRUE" + sources: + - type: archive + url: https://github.com/fukuchi/libqrencode/archive/refs/tags/v4.1.1.tar.gz + sha256: 5385bc1b8c2f20f3b91d258bf8ccc8cf62023935df2d2676b5b67049f31a049c - name: zbar config-opts: - "--without-qt" @@ -51,17 +68,6 @@ - type: archive url: https://www.linuxtv.org/downloads/zbar/zbar-0.23.90.tar.gz sha256: ff857dd7e3dbe043dac3765b5182c91dfd0477800713a75d15287d797cee60fa -- name: libbaseencode - buildsystem: cmake-ninja - config-opts: - - "-DCMAKE_BUILD_TYPE=Release" - - "-DCMAKE_INSTALL_LIBDIR=lib" - cleanup: - - "/include" - sources: - - type: archive - url: https://github.com/paolostivanin/libbaseencode/archive/v1.0.14.tar.gz - sha256: bc95a64507b4ac359eec1f858a6bdcf84c9562424d40fbea8ab00021e9b3197c - name: libcotp buildsystem: cmake-ninja config-opts: @@ -71,8 +77,8 @@ - "/include" sources: - type: archive - url: https://github.com/paolostivanin/libcotp/archive/v1.2.6.tar.gz - sha256: f0e75c8bd27a16e808e0af7768dc100872f26dd7c64534ce971c407374386d4a + url: https://github.com/paolostivanin/libcotp/archive/v2.0.1.tar.gz + sha256: b111d528bbde7c1a0a392f49293b25ae33e6e78fbcbe378e0cf8bc6d59743d11 - name: OTPClient buildsystem: cmake-ninja config-opts: @@ -82,4 +88,3 @@ - type: git url: https://github.com/paolostivanin/OTPClient.git branch: master - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/app.c new/OTPClient-3.1.7/src/app.c --- old/OTPClient-3.1.6/src/app.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/app.c 2023-05-26 08:24:01.000000000 +0200 @@ -23,6 +23,7 @@ #include "manual-add-cb.h" #include "edit-row-cb.h" #include "show-qr-cb.h" +#include "dbinfo-cb.h" #ifndef USE_FLATPAK_APP_FOLDER @@ -548,6 +549,7 @@ { .name = "show_qr", .activate = show_qr_cb }, { .name = "settings", .activate = settings_dialog_cb }, { .name = "shortcuts", .activate = shortcuts_window_cb }, + { .name = "dbinfo", .activate = dbinfo_cb }, { .name = "about", .activate = about_diag_cb } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/db-actions.c new/OTPClient-3.1.7/src/db-actions.c --- old/OTPClient-3.1.6/src/db-actions.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/db-actions.c 2023-05-26 08:24:01.000000000 +0200 @@ -24,12 +24,18 @@ "OK", "Cancel"); + GFile *gfile_dbpath = g_file_new_for_path (app_data->db_data->db_path); + gchar *db_dir = g_file_get_path (g_file_get_parent (gfile_dbpath)); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), db_dir); + gint res = gtk_native_dialog_run (GTK_NATIVE_DIALOG(dialog)); if (res == GTK_RESPONSE_ACCEPT) { gtk_entry_set_text (entry, gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(dialog))); } + g_free (db_dir); + g_object_unref (gfile_dbpath); g_object_unref (dialog); } @@ -60,4 +66,4 @@ g_free (cfg_file_path); g_key_file_free (kf); -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/db-misc.c new/OTPClient-3.1.7/src/db-misc.c --- old/OTPClient-3.1.6/src/db-misc.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/db-misc.c 2023-05-26 08:24:01.000000000 +0200 @@ -129,6 +129,13 @@ } +void write_db_to_disk (DatabaseData *db_data, + GError **err) +{ + update_db (db_data, err); +} + + static void reload_db (DatabaseData *db_data, GError **err) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/db-misc.h new/OTPClient-3.1.7/src/db-misc.h --- old/OTPClient-3.1.6/src/db-misc.h 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/db-misc.h 2023-05-26 08:24:01.000000000 +0200 @@ -26,6 +26,9 @@ void load_new_db (AppData *app_data, GError **err); +void write_db_to_disk (DatabaseData *db_data, + GError **err); + gint check_duplicate (gconstpointer data, gconstpointer user_data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/dbinfo-cb.c new/OTPClient-3.1.7/src/dbinfo-cb.c --- old/OTPClient-3.1.6/src/dbinfo-cb.c 1970-01-01 01:00:00.000000000 +0100 +++ new/OTPClient-3.1.7/src/dbinfo-cb.c 2023-05-26 08:24:01.000000000 +0200 @@ -0,0 +1,34 @@ +#include "data.h" + + +void +dbinfo_cb (GSimpleAction *simple __attribute__((unused)), + GVariant *parameter __attribute__((unused)), + gpointer user_data) +{ + AppData *app_data = (AppData *)user_data; + + GtkWidget *dbinfo_diag = GTK_WIDGET(gtk_builder_get_object (app_data->builder, "dbinfo_diag_id")); + GtkWidget *db_location_entry = GTK_WIDGET(gtk_builder_get_object (app_data->builder, "dbentry_dbinfo_id")); + GtkWidget *config_entry = GTK_WIDGET(gtk_builder_get_object (app_data->builder, "configentry_dbinfo_id")); + GtkWidget *num_entries_label = GTK_WIDGET(gtk_builder_get_object (app_data->builder, "numofentries_dbinfo_id")); + + gtk_entry_set_text (GTK_ENTRY(db_location_entry), app_data->db_data->db_path); + gchar *cfg_file_path = NULL; +#ifdef USE_FLATPAK_APP_FOLDER + cfg_file_path = g_build_filename (g_get_user_data_dir (), "otpclient.cfg", NULL); +#else + cfg_file_path = g_build_filename (g_get_user_config_dir (), "otpclient.cfg", NULL); +#endif + gtk_entry_set_text (GTK_ENTRY(config_entry), cfg_file_path); + + gchar *num_of_entries = g_strdup_printf ("%lu", json_array_size (app_data->db_data->json_data)); + gtk_label_set_text (GTK_LABEL(num_entries_label), num_of_entries); + + gint result = gtk_dialog_run (GTK_DIALOG(dbinfo_diag)); + if (result == GTK_RESPONSE_CLOSE) { + g_free (cfg_file_path); + g_free (num_of_entries); + gtk_widget_hide (dbinfo_diag); + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/dbinfo-cb.h new/OTPClient-3.1.7/src/dbinfo-cb.h --- old/OTPClient-3.1.6/src/dbinfo-cb.h 1970-01-01 01:00:00.000000000 +0100 +++ new/OTPClient-3.1.7/src/dbinfo-cb.h 2023-05-26 08:24:01.000000000 +0200 @@ -0,0 +1,11 @@ +#pragma once + +#include <gtk/gtk.h> + +G_BEGIN_DECLS + +void dbinfo_cb (GSimpleAction *simple, + GVariant *parameter, + gpointer user_data); + +G_END_DECLS \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/new-db-cb.c new/OTPClient-3.1.7/src/new-db-cb.c --- old/OTPClient-3.1.6/src/new-db-cb.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/new-db-cb.c 2023-05-26 08:24:01.000000000 +0200 @@ -18,26 +18,34 @@ g_object_set_data (G_OBJECT(newdb_entry), "action", GINT_TO_POINTER(ACTION_SAVE)); g_signal_connect (newdb_entry, "icon-press", G_CALLBACK (select_file_icon_pressed_cb), app_data); - const gchar *new_db_path; + GString *new_db_path_with_suffix; gint result = gtk_dialog_run (GTK_DIALOG (newdb_diag)); switch (result) { case GTK_RESPONSE_OK: - new_db_path = gtk_entry_get_text (GTK_ENTRY(newdb_entry)); - if (g_file_test (new_db_path, G_FILE_TEST_IS_REGULAR) || g_file_test (new_db_path,G_FILE_TEST_IS_SYMLINK)){ + new_db_path_with_suffix = g_string_new (gtk_entry_get_text (GTK_ENTRY(newdb_entry))); + g_string_append (new_db_path_with_suffix, ".enc"); + if (g_file_test (new_db_path_with_suffix->str, G_FILE_TEST_IS_REGULAR) || g_file_test (new_db_path_with_suffix->str, G_FILE_TEST_IS_SYMLINK)) { show_message_dialog (app_data->main_window, "Selected file already exists, please choose another filename.", GTK_MESSAGE_ERROR); } else { g_free (app_data->db_data->db_path); - app_data->db_data->db_path = g_strdup (new_db_path); + app_data->db_data->db_path = g_strdup (new_db_path_with_suffix->str); update_cfg_file (app_data); gcry_free (app_data->db_data->key); app_data->db_data->key = prompt_for_password (app_data, NULL, NULL, FALSE); GError *err = NULL; - load_new_db (app_data, &err); + write_db_to_disk (app_data->db_data, &err); if (err != NULL) { show_message_dialog (app_data->main_window, err->message, GTK_MESSAGE_ERROR); g_clear_error (&err); + } else { + load_new_db (app_data, &err); + if (err != NULL) { + show_message_dialog (app_data->main_window, err->message, GTK_MESSAGE_ERROR); + g_clear_error (&err); + } } } + g_string_free (new_db_path_with_suffix, TRUE); break; case GTK_RESPONSE_CANCEL: default: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/settings-cb.c new/OTPClient-3.1.7/src/settings-cb.c --- old/OTPClient-3.1.6/src/settings-cb.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/settings-cb.c 2023-05-26 08:24:01.000000000 +0200 @@ -55,6 +55,7 @@ g_free (cfg_file_path); g_key_file_free (kf); g_clear_error (&err); + g_free (settings_data); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/show-qr-cb.c new/OTPClient-3.1.7/src/show-qr-cb.c --- old/OTPClient-3.1.6/src/show-qr-cb.c 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/show-qr-cb.c 2023-05-26 08:24:01.000000000 +0200 @@ -6,6 +6,7 @@ #include "data.h" #include "parse-uri.h" #include "get-builder.h" +#include "message-dialogs.h" #define INCHES_PER_METER (100.0/2.54) #define SIZE 3 @@ -24,6 +25,10 @@ AppData *app_data = (AppData *)user_data; gchar *otpauth_uri = get_otpauth_uri (app_data, NULL); + if (otpauth_uri == NULL) { + show_message_dialog (app_data->main_window, "Error: a row must be selected in order to get the QR Code.", GTK_MESSAGE_ERROR); + return; + } QRcode *qr = QRcode_encodeString8bit ((const gchar *)otpauth_uri, 0, QR_ECLEVEL_H); write_png (qr); g_free (otpauth_uri); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OTPClient-3.1.6/src/ui/otpclient.ui new/OTPClient-3.1.7/src/ui/otpclient.ui --- old/OTPClient-3.1.6/src/ui/otpclient.ui 2023-03-22 09:26:20.000000000 +0100 +++ new/OTPClient-3.1.7/src/ui/otpclient.ui 2023-05-26 08:24:01.000000000 +0200 @@ -190,10 +190,9 @@ <property name="tooltip-text" translatable="yes">Max 255 chars</property> <property name="editable">False</property> <property name="max-length">255</property> - <property name="visibility">False</property> <property name="secondary-icon-name">document-open-symbolic</property> - <property name="secondary-icon-tooltip-markup" translatable="yes">Show password</property> - <property name="placeholder-text" translatable="yes">New DB path...</property> + <property name="secondary-icon-tooltip-markup" translatable="yes">Open database file</property> + <property name="placeholder-text" translatable="yes">Absolute path of the existing database...</property> </object> <packing> <property name="expand">False</property> @@ -354,6 +353,174 @@ <action-widget response="-5">changepwd_diag_ok_btn_id</action-widget> </action-widgets> </object> + <object class="GtkDialog" id="dbinfo_diag_id"> + <property name="can-focus">False</property> + <property name="border-width">2</property> + <property name="title" translatable="yes">Database info</property> + <property name="window-position">center</property> + <property name="type-hint">dialog</property> + <property name="gravity">center</property> + <child internal-child="vbox"> + <object class="GtkBox"> + <property name="can-focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">2</property> + <child internal-child="action_area"> + <object class="GtkButtonBox"> + <property name="can-focus">False</property> + <property name="layout-style">end</property> + <child> + <object class="GtkButton" id="dbinfo_closebtn_id"> + <property name="label" translatable="yes">Close</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <!-- n-columns=2 n-rows=5 --> + <object class="GtkGrid"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="border-width">5</property> + <property name="row-spacing">10</property> + <property name="column-spacing">2</property> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Database location</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Config file location</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Entries in the database</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">Encryption algo</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">KDF iterations</property> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">4</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="dbentry_dbinfo_id"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="editable">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">0</property> + </packing> + </child> + <child> + <object class="GtkEntry" id="configentry_dbinfo_id"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="hexpand">True</property> + <property name="editable">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="numofentries_dbinfo_id"> + <property name="visible">True</property> + <property name="can-focus">False</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">2</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="encalgo_dbinfo_id"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">AES256-GCM</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">3</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="kdfiters_dbinfo_id"> + <property name="visible">True</property> + <property name="can-focus">False</property> + <property name="label" translatable="yes">100'000</property> + </object> + <packing> + <property name="left-attach">1</property> + <property name="top-attach">4</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="-7">dbinfo_closebtn_id</action-widget> + </action-widgets> + </object> <object class="GtkDialog" id="decpwd_diag_id"> <property name="can-focus">False</property> <property name="border-width">5</property> @@ -1492,10 +1659,9 @@ <property name="tooltip-text" translatable="yes">Max 255 chars</property> <property name="editable">False</property> <property name="max-length">255</property> - <property name="visibility">False</property> <property name="secondary-icon-name">document-open-symbolic</property> - <property name="secondary-icon-tooltip-text" translatable="yes">Show password</property> - <property name="placeholder-text" translatable="yes">Full path to the new database...</property> + <property name="secondary-icon-tooltip-text" translatable="yes">Open database file</property> + <property name="placeholder-text" translatable="yes">Absolute path of the new database...</property> </object> <packing> <property name="expand">False</property> @@ -2278,6 +2444,20 @@ </packing> </child> <child> + <object class="GtkModelButton" id="dbinfo_model_btn_id"> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> + <property name="action-name">settings_menu.dbinfo</property> + <property name="text" translatable="yes">Database info</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">9</property> + </packing> + </child> + <child> <object class="GtkModelButton" id="about_model_btn_id"> <property name="visible">True</property> <property name="can-focus">True</property> @@ -2288,7 +2468,7 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="position">9</property> + <property name="position">10</property> </packing> </child> </object>