use local object

This commit is contained in:
yggverse 2024-08-27 15:06:43 +03:00
parent bdf33f1086
commit 0bf1a6041a
2 changed files with 3 additions and 5 deletions

View File

@ -10,14 +10,14 @@ Label::Label(
);
// Setup label controller
controller = Gtk::GestureClick::create();
auto GtkGestureClick_RefPtr = Gtk::GestureClick::create();
/* @TODO remove as default
controller->set_button(
GDK_BUTTON_PRIMARY
);*/
controller->signal_pressed().connect(
GtkGestureClick_RefPtr->signal_pressed().connect(
[this](int n, double x, double y)
{
if (n == 2) // double click
@ -30,7 +30,7 @@ Label::Label(
);
add_controller(
controller
GtkGestureClick_RefPtr
);
}

View File

@ -11,8 +11,6 @@ namespace app::browser::main::tab
{
class Label : public Gtk::Label
{
Glib::RefPtr<Gtk::GestureClick> controller;
public:
Label(