On Sun, 2015-10-25 at 18:35 +0100, Pekka Riikonen wrote:
> second one with "changed" signal on the combobox isn't because the
> signal 
> is emitted also when typing into the entry.  It effectively becomes 
> impossible to determine whether item was typed in or selected from the
> list.

OK, no answer from experts yet.

I can remember that I used this Ruby code for that task:

@changed_handler_id = self.signal_connect('changed') {|w|
  if @pda
    if w.active != -1
    i = w.active_text.to_i
    if i != (@major ? @pda.schem.major_grid : @pda.schem.minor_grid)
      if @major then @pda.schem.major_grid = i else @pda.schem.minor_grid = i 
end
        @pda.schem.active_grid = i if radio_button.active?
        @pda.redraw
      end
    end
  end
}

So active property of

 https://developer.gnome.org/gtk3/stable/GtkComboBox.html#GtkComboBox--active

can be used to detect if an item was selected from list.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to