[Implemented] Enhance StringGadget for Linux/GTK

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] Enhance StringGadget for Linux/GTK

Post by BackupUser »

Restored from previous forum. Originally posted by turtle.

Hi all,

When using gadgets, it can be determined which gadget is triggered by using EventGadgetID. However, when pressing the key in the STRING gadget, no event is triggered for the Linux/GTK version of PureBASIC.

Is it possible to implement such an event for this gadget? On GTK-level, the signal implementation would be:

gtk_signal_connect (GTK_OBJECT (StringGadget), "activate", GTK_SIGNAL_FUNC (press_enter_callback), NULL);

And the routine which is called when pressing looks like:

void press_enter_callback(GtkWidget *widget, gpointer function)
{
printf ("Callback reached: StringGadget activated.\n");
}

Would you approve such a change?

Thanks and regards

Peter.