Re: Changed callback emitted twice ??



Do you use glade to build your source code?
Do you use glade_auto_connect(I can't remeber this function name clearly)?
Once I made mistake like this, g_signal_connect after glade_auto_connect
, both to one widget.

poonam chokshi wrote:



On Apr 12, 2005 9:49 AM, *poonam chokshi* <poonam13 gmail com <mailto:poonam13 gmail com>> wrote:

    hello Arren

Thanks for replying but i havent connectted the signal twice i just write once in the interface.c file as shown below
     g_signal_connect (G_OBJECT(GTK_COMBO(seccmb)->entry),"changed",
    G_CALLBACK(enter_callback),(gpointer) seccmbentry);


This is it  what i am writing....


    On Apr 12, 2005 6:59 AM, *Arren* <jianling xiang sw-linux com
    <mailto:jianling xiang sw-linux com>> wrote:

        Maybe you signal_connected this function twice.

        poonam chokshi wrote:

hello,

I am calling this function on the changed signal emitted from
        the textentry
of the combobox....The problem is that whenever i select the
        text from the
combobox then this changed signal is emitted twice....giving
        me the output
as shown below:

/* Function to fetch the active selected text from the combobox*/
void enter_callback (GtkEntry *entry, gpointer user_data)
{
const gchar *entry_text;
GtkWidget *Mywidget,*VCTG;
Mywidget=lookup_widget(VCTG,"seccmbentry");
entry_text = gtk_entry_get_text (GTK_ENTRY (Mywidget));
printf ("Entry contents: %s\n", entry_text);
}


OUTPUT
Entry contents:
Entry contents:Font
Entry contents:
Entry contents: Color




This seems that the only the second call contains some data
        otherwise not..I
tried using the avtivate but u have to use th e enter key with
        it.which i
dont want...So i used the changed signal but it is emitted
        twice........

Am i missing somehting over here that i should be using......??
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org <mailto:gtk-app-devel-list gnome org>
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list











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