define variant type using const, remove extras, define dependency

This commit is contained in:
yggverse 2024-09-15 03:46:25 +03:00
parent e17a47bb85
commit 382c110621
2 changed files with 7 additions and 3 deletions

View File

@ -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<Glib::Variant<Glib::ustring>>(parameter).get()
}

View File

@ -4,6 +4,7 @@
#include <giomm/simpleaction.h>
#include <glibmm/i18n.h>
#include <glibmm/refptr.h>
#include <glibmm/varianttype.h>
#include <gtkmm/application.h>
#include <gtkmm/applicationwindow.h>
#include <gtkmm/object.h>