[Glade-users] help regarding the combobox append functionality at runtime


        I am making my own function as shown below in the callbacks.c but
when i am using the g_list_append() function i am getting the errors
and my system shows the dialog box of fatal error with the
segmentation fault....Initially i was using this thind in the for loop
but even when i tried keeping it outside the loop the same error
appears please have a look at the code.....And mail me the solution if
anyone knows about it.....

int myfunc(char *name)
{        int i=0;   
        GtkWidget *seccmbentry;
        GList *items,*seccmb_items;
        ini = iniparser_load(ini_name); //one of thelibrary function that i am using
        if (ini==NULL)
                fprintf(stderr, "cannot parse file [%s]", ini_name);
                return -1 ;
        section=iniparser_getnsec(ini); //library function
        printf("the number of sections:%d\n",section);

        seccmbentry = GTK_COMBO (seccmb)->entry;

                seccmb_items=iniparser_getsecname(ini,i); //library function
                items=g_list_append(items,seccmb_items); // giving me error over here
        //gtk_entry_set_text (GTK_ENTRY (seccmbentry), seccmb_items);
        //gtk_combo_set_popdown_strings (GTK_COMBO (seccmb), items);
        iniparser_freedict(ini); //my library function
        return 0;

Please help me as soon as possible .......

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