From fedb7781ba134719432aa7f96288a2fb8486c588 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sun, 9 Jun 2024 06:48:48 +0900 Subject: [PATCH] fix: Clipboard is used if text specified with --text is empty --- 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 95f4a30..f6e40de 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 {