Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Gtk

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1



    I'm trying to build a really simple GUI. I'm doing this in C and Glade. The problem that i have right now, is that i can't run the btn_clicked handler. I always get the message segmentation fault.

    Anybody an id?

    void on_window_destroy (GtkObject *object, gpointer user_data){
    void btn_clicked(GtkButton *button, gpointer label){
    	gtk_label_set_text(GTK_LABEL("testjen"), "5");
    int main (int argc, char *argv[]){
            GtkBuilder              *builder;
            GtkWidget               *window;
            gtk_init (&argc, &argv);
            builder = gtk_builder_new ();
            gtk_builder_add_from_file (builder, "", NULL);
            window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
            gtk_builder_connect_signals (builder, NULL);        
    	    g_object_unref (G_OBJECT (builder));
            gtk_widget_show (window);       
            gtk_main ();
            return 0;
    Thanks in advance

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    3rd rock from sun - Often seen near moon
    I don't exactly remember this stuff now.(I hope someone will answer about your question) -a project like isPrime | Free Science & Engineering software downloads at helped a lot to understand glade and gtk.
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    FOSS India Award winning ext3fs Undelete tool Online Linux Terminal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts