- 论坛徽章:
- 0
|
#include <stdlib.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#include "main.h"
GladeXML *xml;
int main (int argc, char *argv[])
{
g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, (GLogFunc) gtk_false, NULL);
gtk_init (&argc, &argv);
g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, g_log_default_handler, NULL);
xml = glade_xml_new("tutorial.glade", NULL, NULL);
glade_xml_signal_autoconnect(xml);
gtk_main ();
return 0;
}
void on_ok_button_clicked(GtkButton *ok_button,gpointer user_data)
{
GtkWidget *student;
student = glade_xml_get_widget (xml,"student_window");
gtk_widget_show (student);
}
编译能通过,可以运行的时候说找不到on_ok_button_clicked句柄,可我在glade里真的设定了呀!! |
|