Re: [gedit-list] GtkSourceCompletion



Hi!

I already proposed month ago that the highlight API would expose the
current state (comment, keyword, etc.) but many people seem to want to
hide it.

Regards,
Johannes

Jesse van den Kieboom schrieb:
> Wouldn't this be problematic if you have more than one plugin that wants to
> 
> provide completion items for the same events (say "."). How would this
> 
> work. Both need to detect insertion of "." and popup the completion dialog,
> 
> but this goes wrong if they're both active. It might be a good idea to add
> 
> a function with which you can register a provider together with a list of
> 
> strings which initiates the event? Another problem might be how that you
> 
> don't always show a popup for "->" or "." in programming languages due to
> 
> the context of a string or a comment. We might be able to use the contexts
> 
> in the new highlighting engine if they could be exposed somehow (as they
> 
> are now just some internal representation of different parts to highlight).
> 
> 
> 
> Jesse
> 
> 
> 
> On Sun, 22 Jul 2007 23:22:11 +0200, perriman <chuchiperriman gmail com>
> 
> wrote:
> 
>> Hi Johannes!
> 
> 
>> I explain you some about the trigger events:
> 
> 
>> Actually GtkSourceCompletion have two default events:
> 
> 
>> .- User request event: When a user press control+return
> 
>> .- Word completion event: When a user writes 4 consecutive characters
> 
> 
>> You can develop a lot of external events like a "c-completion-event"
> 
>> that trigger an event when the user writes "->" or "." etc. This event
> 
>> only have to detect the user entry ("->", "." etc) and then call
> 
>> gtk_source_completion_popup_raise_event with the parameters and
> 
>> GtkSourceCompletionPopup call to all providers registered to this event.
> 
> 
>> Other way to do this: Create a provider and register it with the "word
> 
>> completion event" then detect if the user write a c symbol "->", "." etc
> 
>> and show the data.
> 
> 
> 
>> I don't know the new Tooltip API but I can study it. Can you give me an
> 
>> URL or some documentation where I can learn it?
> 
> 
>> Regards,
> 
>> 	Chuchi
> 
> 
>> El dom, 22-07-2007 a las 17:20 +0200, Johannes Schmid escribió:
> 
>>> Hi Perriman!
> 
> 
>>> Looks good! Some questions:
> 
> 
>>> What can trigger events? We usually want that an event occurs when the
> 
>>> user types in a word, something like "->" or "." or "(", etc. Is this
> 
>>> possible?
> 
> 
>>> Another thing that would be nice is that we integrate tooltips into this
> 
>>> API (using the new Tooltip API) because we already have all this code
> 
>>> for the events.
> 
> 
>>> Regards,
> 
>>> Johannes
> 
> 
>>> perriman schrieb:
> 
>>>> I have changed some things:
> 
> 
>>>>  - Added a priority property to GtkSourceCompletionData
> 
>>>>  - GtkSourceCompletionPopup sort all items by priority
> 
>>>>  - I have removed gtk_source_completion_popup_add_event
> 
>>>>  - I have changed gtk_source_completion_popup_register_provider. Now
> 
>> you
> 
>>>> must 
> 
>>>>    pass a parameter with the event name. When an event occurs, the
> 
>> popup
> 
>>>> only call
> 
>>>>    the providers registered for this event.
> 
> 
>>>> If you have some another change, make me know.
> 
> 
> 
>>>> _______________________________________________
> 
>>>> gnome-devtools mailing list
> 
>>>> gnome-devtools gnome org
> 
>>>> http://mail.gnome.org/mailman/listinfo/gnome-devtools
> 
> 
> 
> 
>> _______________________________________________
> 
>> gedit-list mailing list
> 
>> gedit-list gnome org
> 
>> http://mail.gnome.org/mailman/listinfo/gedit-list
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature



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