GtkNotebook signal: switch_page

I cannot seem to get the switch_page signal to work at all in my
application.  Hrmm...

Just as a simple test I have connected a callback to that signal on one of
my notebooks with a simple printf statement... and nothing happens when I
switch tabs within the interface...

Any help would be greatly appreciated.

Leeman Strout

here's the relevant stuff...

notebook1 = gtk_notebook_new ();
gtk_widget_set_name (notebook1, "notebook1");
gtk_widget_ref (notebook1);
gtk_object_set_data_full (GTK_OBJECT (bfgmj), "notebook1", notebook1,
                          (GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (notebook1);
gtk_box_pack_start (GTK_BOX (vbox1), notebook1, TRUE, TRUE, 0);

gtk_signal_connect (GTK_OBJECT (notebook1), "switch_page",
                    GTK_SIGNAL_FUNC (notebook1_switch_page),


notebook1_switch_page                  (GtkNotebook     *notebook,
                                        GtkNotebookPage *page,
                                        gint             page_num,
                                        gpointer         user_data)
{ gint i;
  i = gtk_notebook_get_current_page (GTK_NOTEBOOK(user_data));
  printf ("current page: %d", i);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]