From 0a5024913270a4113caa5ed27eb6c5fef1986fc3 Mon Sep 17 00:00:00 2001 From: pit-ray Date: Tue, 13 Feb 2024 21:58:03 +0900 Subject: [PATCH] change the size of tray --- src/core/version.hpp | 2 +- src/gui/main.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/core/version.hpp b/src/core/version.hpp index ebcc150f..3e59e687 100644 --- a/src/core/version.hpp +++ b/src/core/version.hpp @@ -1,6 +1,6 @@ #ifndef _VERSION_HPP #define _VERSION_HPP -#define WIN_VIND_VERSION "5.10.0.0" +#define WIN_VIND_VERSION "5.11.0.0" #endif diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 2e2c7d38..522f3601 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -127,22 +127,24 @@ int WINAPI WinMain( "win-vind", WIN_VIND_VERSION, argparse::default_arguments::none) ; parser.add_argument("-h", "--help") - .action([&parser] (const auto&) { + .action([&parser, &runnable] (const auto&) { if(create_console()) { std::cout << parser ; system("PAUSE") ; } + runnable.store(false) ; }) .default_value(false) .help("Shows help message and exits.") .implicit_value(true) .nargs(0) ; parser.add_argument("-v", "--version") - .action([&parser] (const auto&) { + .action([&parser, &runnable] (const auto&) { if(create_console()) { std::cout << WIN_VIND_VERSION << std::endl ; system("PAUSE") ; } + runnable.store(false) ; }) .default_value(false) .help("Prints version information and exits.") @@ -155,6 +157,10 @@ int WINAPI WinMain( parser.parse_args(args) ; + if(!runnable.load()) { + return 0 ; + } + auto exit_process = [&runnable] { runnable = false ; return false ; @@ -187,7 +193,7 @@ int WINAPI WinMain( if(!tray.create_tray( "win-vind", (core::RESOURCE_ROOT_PATH() / "icons" / icon_path).u8string(), - 5, 5, 10, 5, 240, true)) { + 5, 5, 10, 10, 240, true)) { PRINT_ERROR("Failed tray initialization") ; return 1 ; }