Re: GtkComboBox question



Mike,

-----Original Message-----
>From: Mike Massonnet <mmassonnet gmail com>
>Sent: Mar 11, 2009 1:47 PM
>To: gtk-list gnome org
>Cc: Igor Korot <ikorot earthlink net>
>Subject: Re: GtkComboBox question
>
>Le Wed, 11 Mar 2009 12:54:09 -0700 (GMT-07:00),
>Igor Korot <ikorot earthlink net> a écrit :
>
>> Hi, ALL,
>> I am looking at this page:
>> http://library.gnome.org/devel/gtk/stable/GtkComboBox.html.
>> 
>> There is a "popup-shown" property that reads:
>> 
>> "
>> Whether the combo boxes dropdown is popped up. Note that this
>> property is mainly useful, because it allows you to connect to
>> notify::popup-shown.
>> 
>> Default value: FALSE
>> 
>> Since 2.10
>> "
>> However I can't find the documentation about "notify::popup-shown"
>> signal/event.
>
>It's there in the properties. You can connect to every property by
>using the signal name "notify::<property>".

Well, if you pick up an event/signal from the same page it has the function
definition for it. For example:

void                user_function                      (GtkComboBox  *widget,
                                                        GtkScrollType scroll_type,
                                                        gpointer      user_data)        : Run Last / Action

I was kind of hoping to get something like this for this signal.

>
>> Basically I'm looking for a way to override the mouse click on the
>> arrow for the combo box when the list either pops-up or closes down.
>> If this is not the right event/signal, please let me know.
>
>I didn't try. The last time I had to hack with this case I used the
>popdown/up signals, which was plain wrong as they work strictly with
>the keyboard shortcuts. So you might be right with notify::popup-shown.

Also, do you know how do I make the function that connects to
this signal? I was hoping to write something like this:

void my_func( GtkComboBox *widget, GtkScrollType scroll_type, gpointer user_data)
{
     if( widget->popup-shown )
     {
// code for list shown
     }
     else
     {
// code for list not shown
     }
}

But I don't know if this is a right prototype or not.
And the code itself, I'm not sure if it's right as well, as I can't check...

>
>> Thank you.

Thank you for the fast responce.

>
>Mike



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