Hello

I'm trying to write a program which changes a label from a callback and it's not 
working.

rmbackup.c

#include <stdio.h>
#include "tarlib.h"
#include "backprog.h"

int main(int argc, char **argv){
        struct s1 window1;
        gtk_init(&argc, &argv);
        window1 = screen1();
        gtk_main();
        exit(0);
}

backprog.c

struct s1 maketoggles(){
        static struct s1 handle;
        GtkWidget *button;
        GtkWidget *vbox;
        GtkWidget *label;
        
        vbox = gtk_vbox_new(TRUE, 0);
        
        label = gtk_label_new("Choose an Option");
        
        gtk_widget_show(label);
        
        gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE,3);
        
        button = gtk_toggle_button_new_with_label("Create Backup");
        gtk_box_pack_start(GTK_BOX(vbox), button, TRUE, FALSE, 0);
        gtk_widget_show(button);
        gtk_signal_connect(GTK_OBJECT(button), "clicked",
                        GTK_SIGNAL_FUNC(startbackup), 
                        label );

........

void startbackup( GtkWidget *widget, GtkWidget *lab){
        gint ret;
        gtk_label_set_text(GTK_LABEL(lab), "CREATING BACKUP");  <-----Not changing
        ret = createbackup();
        g_print("%d",ret);
        g_print("\n");
        gtk_label_set_text(GTK_LABEL(lab), "Choose an Option");
        
}


-- 
__________________________

Brooklyn Linux Solutions
__________________________
http://www.mrbrklyn.com - Consulting
http://www.brooklynonline.com - For the love of Brooklyn
http://www.nylxs.com - Leadership Development in Free Software
http://www.nyfairuse.org - The foundation of Democracy
http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from 
around the net
http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you...
http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....

1-718-382-5752



_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to