I have just started to learn about Gnome application developement. I read the beginners tutorial and have watched some youtube videos. I want to know what is the differnece between using g_signal_connect macro to connect your GTK widget like GTKBUTTON to some functionality vs using the GAction to do the same.
Actions are a “newer” API (though not that new at all, really) whereas signals are a lower-level part of the glib2 infrastructure, and have been there since the word go.
Although at first it may seem easier to just use signals, since they’re easier to wrap your head around, actions allow for cleaner code structure in the long run in many circumstances. You can even do things like use
<attribute name="target"> in .ui files to automate a lot for you.
Check out: HowDoI/GAction - GNOME Wiki!
and the demos in the GTK source tree - especially
application.c and the associated
I read about GAction. So, with GAction I won’t be able to change the text within GtkLabel widget using gtk_label_set_text () as GAction doesn’t contain any presentational information. Am I right?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.