36a37,39 > void on_mainbarradiobutton_toggled (GtkToggleButton *toggledradiobutton, > gpointer user_data); > 98a102,146 > /* Main tabs IDs - Used to switch */ > enum { > MAIN_TAB_WELCOME=0, > MAIN_TAB_GENERAL, > MAIN_TAB_FS, > MAIN_TAB_STATS, > MAIN_TAB_CHAT > }; > > /* > * A button from the main bar was toggled : switch to the right tab > * @param toggledradiobutton the GtkToggleButton that was selected or unselected > * @param user_data custom data not used > */ > void on_mainbarradiobutton_toggled (GtkToggleButton *toggledradiobutton, > gpointer user_data) { > /* If toggledradiobutton is the unselected button, ignore it */ > if (!gtk_toggle_button_get_active (toggledradiobutton)) > return; > > const gchar *toggledbuttonname = gtk_widget_get_name (GTK_WIDGET(toggledradiobutton)); > GtkNotebook *mainnotebook = GTK_NOTEBOOK(glade_xml_get_widget (mainXML, > "mainnotebook")); > if (strcmp("generalradiobutton", > toggledbuttonname) == 0) > gtk_notebook_set_current_page (mainnotebook, > MAIN_TAB_GENERAL); > else if (strcmp("fsradiobutton", > toggledbuttonname) == 0) > gtk_notebook_set_current_page (mainnotebook, > MAIN_TAB_FS); > else if (strcmp("statsradiobutton", > toggledbuttonname) == 0) > gtk_notebook_set_current_page (mainnotebook, > MAIN_TAB_STATS); > else if (strcmp("chatradiobutton", > toggledbuttonname) == 0) > gtk_notebook_set_current_page (mainnotebook, > MAIN_TAB_CHAT); > else > gtk_notebook_set_current_page (mainnotebook, > MAIN_TAB_WELCOME); > return; > } >