On Tue, 2005-03-29 at 18:40 +0200, Marcus Habermehl wrote: > Nikos Kouremenos schrieb: > > >On Tue, 29 Mar 2005 07:20:31 +0200, Marcus Habermehl <[EMAIL PROTECTED]> > >wrote: > >> Nikos Kouremenos schrieb: > >> > >> >I want to have comboboxentry do what firefox and epiphany location > >> >comboboxentry does. > >> >So I need when the user selects a previous visited site, to have an event > >> >for that. The only thing I found was changed > >> >but that's not good cause it's emited on just typing a character in the > >> >entry too! > >> >now I know that I can (ugly) workaround this by checking if given text by > >> >the emission even is one of those in listed in comboboxentry but that's > >> >too ugly and too many emissions of events. > >> >I cannot believe that GTK lacks such a signal. ML help :) > >> I'm not sure (/me isn't a genius with Python ;)). What's about the > >> editing_done signal of the comboboxentry? > > > >gtk.CellEditable.editing_done > > def editing_done() > >The editing_done() method emits the "editing_done" signal that > >notifies the cell renderer to update it's value from the cell. > > > >If that's what I need then I don't know how to use it [when and how > >should I call editing_done()?] and we're talking about > >comboboxentry.child and I'm not sure this solves my problem. > > > I have searching in Glade. But i don't know how it is working, too. :( > > If you save the inserted strings in a list you can check on changed if > the string is in the list. You know waht I mean? > > Because of I have never working with gtk.ComboBoxEntry I doesn't have > experience with this widget. I only have use gtk.ComboBox with Gtk+ < 2.4. > > Sorry. I'm not a big help. :( > > regards > Marcus
I almost exclusively use 1.2 but in that version you could use combobox.list.get_selection() which would return an empty list if nothing in the list was selected. You would have to check that on every keystroke though which you've discovered by using the changed signal. It looks like in 2.x you'll have to do the same thing with the ComboBoxEntry widget using the same signal and the get_active() method. That part is in the FAQ: http://pygtk.org/pygtk2tutorial/sec- ComboBoxAndComboboxEntry.html#sec-ComboBox > > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/ -- Steve McClure Racemi email: [EMAIL PROTECTED] 75 5th St NE voice: 404-892-5850 Suite 333 fax: 404-892-7215 Atlanta, GA 30308 http://www.racemi.com _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
