Re: [Geary] First collaboration



Thank a lot Marvin, your guess was rigth!

model.get_iter_first(iter) works perfectly

This brings me to another question.. Has EntryCompletion a matching array property ?   I want to access to the first popup item, not the first model item. 


thanks again

El jue, 27 de oct 2016 a las 12:31 , Marvin W <gnome larma de> escribió:
Hi José, Without looking too deep in what you are actually doing: gtk_tree_model_get_iter_first is a GTK+ C method, however Geary is written in Vala. Vala is an object-orientated language based on GLib and GObject. Usually GObject C member methods are realized as object member methods in Vala. This means that instead of calling gtk_tree_model_get_iter_first(model, iter) you call model.get_iter_first(iter), just as in other object-orientated programming languages. Sometimes the Vala methods are a little different from how it's done in C, but in most cases, guessing works fine and in case it does not you can check the valadoc info site [1]. Cheers, Marvin [1] http://valadoc.org/, search is currently broken, there is a mirror here: http://www.valadate.org:8000/ On Do, Okt 27, 2016 at 5:07 , José Esteves <ajesteves gmail com> wrote:
Hi there !! I'm new to Gnome collaboration so I could use a littler help. Im getting familiarized with GTK lib.. so I wan 't to fix a bug o new feature.. the case is in the autocompletion list when typing contact name if no contact is highlighted and you hit enter or tab the first option should be selected. So I'm trying to get that done. .. in the src/composer/contact-entry-completion we have this fx
public void trigger_selection() { if (last_iter != null) { on_match_selected(this, model, last_iter); last_iter = null; } }
So I thought a good st art point is here.. if last_iter is null want to select the fires item on the autocompletion list.. I read about tree model and find this funciton gtk_tree_model_get_iter_first(model, last_iter) this will asign the fist iter of tree to last_iter and return true soo...
public void trigger_selection() { if (last_iter != null) { on_match_selected(this, model, last_iter); last_iter = null; } else { if ( gtk_tree_model_get_iter_first(model, last_iter)){ &nbs p; on_match_selected(this, model, last_iter); last_iter = null; } } }
But compilers complains about not knowing gtk_tree_model_get_iter_first function.. Any help or comments would be very hellpfull thanks


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