Hello
I have problem with Combobox. I need to catch signal when Combobox expand popup menu and i achieve this in pure C with GTK+ 3.24 and code below:
g_signal_connect(cbPortTest, "notify::popup-shown", G_CALLBACK (signal_cbPortTest), NULL);
void signal_cbPortTest(GtkWidget* widget, GParamSpec* property, gpointer data)
{
bool value;
g_object_get(G_OBJECT(widget),"popup-shown", &value,NULL);
if(value)
{
g_print ("Hello World cbPortTest \n");
}
}
But i have to problem to make it work with gtkmm. I try something like this:
in class constructor:
m_cbPortTest->add_events(Gdk::PROPERTY_CHANGE_MASK);
m_cbPortTest->signal_property_notify_event().connect(sigc::mem_fun(*this, &appWindow::onPortTestNotify), false);
and class method:
bool appWindow::onPortTestNotify(GdkEventProperty* property_event)
{
g_print ("Hello World\n");
return true;
}
In gtkmm callback is not working. It is possible to make it working?