Browse Source

define variant type using const, remove extras, define dependency

CPP-GTK4
yggverse 2 months ago
parent
commit
382c110621
  1. 9
      src/app/browser.cpp
  2. 1
      src/app/browser.hpp

9
src/app/browser.cpp

@ -26,11 +26,14 @@ Browser::Browser( @@ -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()
}

1
src/app/browser.hpp

@ -4,6 +4,7 @@ @@ -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>

Loading…
Cancel
Save