From 382c110621850851ea44fe002e4c392756fcc4af Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 15 Sep 2024 03:46:25 +0300 Subject: [PATCH] define variant type using const, remove extras, define dependency --- src/app/browser.cpp | 9 ++++++--- src/app/browser.hpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/browser.cpp b/src/app/browser.cpp index d1b2e1d..3bdaa8d 100644 --- a/src/app/browser.cpp +++ b/src/app/browser.cpp @@ -26,11 +26,14 @@ Browser::Browser( } ); - const auto ACTION__OPEN = add_action_with_parameter( + add_action_with_parameter( "open", - Glib::VariantType("s"), // string - [this](const Glib::VariantBase & parameter) + Glib::VARIANT_TYPE_STRING, + [this](const Glib::VariantBase & PARAMETER) { + if (PARAMETER.is_of_type(Glib::VARIANT_TYPE_STRING)) + { + } // @TODO process request // Glib::VariantBase::cast_dynamic>(parameter).get() } diff --git a/src/app/browser.hpp b/src/app/browser.hpp index e625279..b0ee76b 100644 --- a/src/app/browser.hpp +++ b/src/app/browser.hpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include