GtkSourceCompletion
- From: perriman <chuchiperriman gmail com>
- To: gedit-list <gedit-list gnome org>
- Cc: gnome-devtools <gnome-devtools gnome org>
- Subject: GtkSourceCompletion
- Date: Sun, 11 Nov 2007 23:22:32 +0100
Hi all,
I have uploaded a new version of GtkSourceCompletion to svn. It supports
disable events, control if two differents plugins add the same events. I
have added a new delay property to show the completion popup. This
feature does the completion less intrusive.
svn: http://tools.assembla.com/svn/gtkdevtools/gtksourcecompletion/trunk
I have uploaded a new gedit plugin: Document words completion. This
plugin complete the written words in the current document. You can
activate the autocompletion or complete the actual word with a user
request (control+Return). You can set the completion delay too.
svn:
http://tools.assembla.com/svn/gtkdevtools/gedit-docwordscompletion-plugin/trunk
You need install gtksourcecompletion and then compile and install
gedit-docwordscompletion-plugin.
You can open a ticket with some new features or a bug in:
http://tools.assembla.com/gtkdevtools/wiki
I show to you an snippet using gtksourcecompletion. With only a few of
lines you can add autocompletion support to a GtkTextView:
DocwordscompletionPlugin * dw_plugin =
(DocwordscompletionPlugin*)plugin;
GtkTextView* view = GTK_TEXT_VIEW(gedit_window_get_active_view(window));
if (view!=NULL)
{
GtkSourceCompletion *comp = gtk_source_completion_get_from_view(view);
if (comp==NULL)
{
comp = gtk_source_completion_new(GTK_TEXT_VIEW(view));
}
if (!
gtk_source_completion_have_provider(comp,GSC_DOCUMENTWORDS_PROVIDER_NAME))
{
if (dw_plugin->priv->conf->ac_enabled)
{
gtk_source_completion_autocompletion_event_enable(comp);
gtk_source_completion_autocompletion_event_delay(comp,dw_plugin->priv->conf->ac_delay);
}
gtk_source_completion_active_user_request_event(comp);
GscDocumentwordsProvider *dw = gsc_documentwords_provider_new();
gtk_source_completion_register_provider(comp,GTK_SOURCE_COMPLETION_PROVIDER(dw));
}
}
Regards,
Chuchi
PD: I will add the plugin to gedit plugins page.
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]