Why are you putting the button in a structure. It is already passed as being the one that the signal activates on. In this case you only need to pass the notebook and so don't need a structure; thus can pass it in the gpointer as is. E.g.:
Code:
void btn_login_clicked_cb (GtkButton *btn_login, gpointer data)
{
gtk_widget_set_sensitive (GTK_WIDGET(btn_login), FALSE);
gtk_button_set_label (login, "Please Wait...");
gtk_notebook_set_current_page(GTK_NOTEBOOK(data), 1);
}
int main(int argc, char *argv[])
{
...
g_signal_connect(G_OBJECT(btn_login), "clicked", G_CALLBACK(btn_login_clicked_cb), (gpointer) notebook);
...
The other thing is: Yes you are allowed to declare a global variable. And for something like a notebook that is routinely altered by various functions, it makes sense to do so. Structured programming may say otherwise but to that I say goto