From ab5bfc7907e7ca5869ecc95f20c1e99012ac04da Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sun, 9 Jun 2024 06:51:19 +0900 Subject: [PATCH 1/3] docs: README: Do not specify usage of cmd opts --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dadcc92..0703dde 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ It is recommended to assign a shortcut key to launch the app for daily use: ![assign shortcut](data/assign-shortcut.png) -You can also use the following command line options for debugging: +You can also use the following command line options: ``` -k, --keep-open Keep the app window open when unfocused From 7a184665506404c0658a34e9c9b9141b98599b97 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sun, 9 Jun 2024 07:03:08 +0900 Subject: [PATCH 2/3] refactor: Use G_SOURCE_REMOVE macro for legibility --- src/MainWindow.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 95f4a30..7e22855 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -127,7 +127,7 @@ public class MainWindow : Gtk.ApplicationWindow { hide (); Timeout.add (250, () => { destroy (); - return false; + return Source.REMOVE; }); } } From c16daa8bf36f8bede419a660d2573735318a3ed0 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sun, 9 Jun 2024 07:08:21 +0900 Subject: [PATCH 3/3] fix: Clipboard is used if text specified with --text is empty (#75) --- src/Application.vala | 2 +- src/MainWindow.vala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application.vala b/src/Application.vala index 7ab6de7..17c2575 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -5,7 +5,7 @@ public class Application : Gtk.Application { public static bool keep_open = false; - public static string text = ""; + public static string? text = null; private OptionEntry[] options = { { diff --git a/src/MainWindow.vala b/src/MainWindow.vala index 7e22855..3869855 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -92,7 +92,7 @@ public class MainWindow : Gtk.ApplicationWindow { private async void update_result_label () { is_label_updated = true; - if (Application.text != "") { + if (Application.text != null) { // Set the text passed by the command line option if specified result_label.label = Application.text; } else {