Re: [gtkmm] Signal emitted when changing a combo selection?



Paul Davis wrote:
> >> the combo box is horrible. you need to use both the "changed" event
> >> for the entry, but also the "unmap" event for the popwin.
> >You mean, I need to connect my signal handler to both of the signals? What
> >case isn't handled by only connecting it to entry.signal_changed?
> i'm not sure at the moment, but i know that i and other people have
> seen problems with just using the "changed" signal by itself.

After some tests, I found out the combo->get_list().signal_unmap() seems to be
never called... which is a pity, since it could possibly help me solve another
problem: The combo->get_entry().signal_changed() is always emitted twice if
changing from a non-empty string to another one.

Example: Combo changes from "Mr." to "Ms" using the dropdown list. Then I get
two signals:

  signal_changed: "Mr." -> ""
  signal_changed: "" -> "Ms."

This is a serious problem for me, since it tangles up my `undo' stack, doubles
the number of database queries etc.. Is there a proper way to solve this?



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