title: connecting a function to a GtkAction
body: <p>I'm trying to write a GTK+3 application using C.</p>
  
  <p>I created a glade file with an action that it's id is 'tracks_deck.add_empty_track'.</p>
  
  <p>i connected the action to a toolbar item and a menu item.</p>
  
  <p>the question is how do I connect a function to that action ?</p>
  
  <p>I have the following C Code:</p>
  
  <pre><code>#include &lt;gtk/gtk.h&gt;
  #define UI_FILE "tuxmusicstudio.glade" 
  #define TOP_WINDOW "application_window"
  
  int main (int argc, char *argv[])
  {
  GtkWidget *main_window;
  GtkBuilder *builder;
  GError *error = NULL;
  
  GtkAction *action;
  
  gtk_init (&amp;argc, &amp;argv);
  
  builder = gtk_builder_new();
  if (!gtk_builder_add_from_file(builder, UI_FILE, &amp;error)) {
      g_critical("couldn't load builder file: %s",error-&gt;message);
      g_error_free(error);
  }
  
  /* create the main, top level, window */
  main_window = GTK_WIDGET(gtk_builder_get_object(builder, TOP_WINDOW));
  if (!main_window) {
      g_critical("widget \"%s\" is missing in file %s.",TOP_WINDOW,UI_FILE);
  } 
  
  action = GTK_ACTION(gtk_builder_get_object(builder, "tracks_deck.add_empty_track"));
  if (!action) {
      g_critical("could not fetch action tracks_deck.empty_track");
  }
  
   gtk_widget_show_all (main_window);
  
  /* start the main loop, and let it rest there until the application is closed */
  gtk_main ();
  
  return 0;
  </code></pre>
  
  <p>so as you can see i'm trying to fetch the GtkAction in order to connect a function to it.
  the compiler is compiling that this line is deprecated:</p>
  
  <pre><code>main.c:46:5: warning: ‘gtk_action_get_type’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkaction.h:87) [-Wdeprecated-declarations]
   action = GTK_ACTION(gtk_builder_get_object(builder, "tracks_deck.add_empty_track"));
   ^
  </code></pre>
  
  <p>so how do I fetch the GtkAction with some function that is not deprecated.
  and how do I connect the a c function to that action?!</p>
  
  <p>any ideas regarding the issue would be greatly appreciated.</p>