popup window



hi, guys
    I write an application which has a button , when you click the button popup a new window, i want to add a 
button in the popup window, which could 
close the popup window.
    when i run my application, gtk debuger said that the the "gtk_main_loop != NULL" failed, why ?
this is my button callback function:
 void leftbutton_clicked(GtkWidget *widget, gpointer my_data)
{
     GtkWidget *win;
     GtkButton *btnclose;
       
    win = gtk_window_new (GTK_WINDOW_POPUP);      
     gtk_widget_show (win);

    btncolse = gtk_button_new_with_label ("close");
    gtk_widget_show (button);

    gtk_container_add (GTK_BOX(task_manager), GTK_WIDGET (btnclose));

    g_signal_connect (G_OBJECT (task_manager), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
    g_signal_connect (G_OBJECT (list->close_button), "clicked", gtk_main_quit, NULL);
  
     gtk_widget_show_all (task_manager);
}

sun zhiyong
2006-11-23
sunzyjszri gmail com



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