Revision: 3897
http://geany.svn.sourceforge.net/geany/?rev=3897&view=rev
Author: ntrel
Date: 2009-06-25 15:57:11 +0000 (Thu, 25 Jun 2009)
Log Message:
-----------
Beep when trying to activate the '...' autocompletion item.
Limit (forced) document word completion to
autocompletion_max_entries.
Beep if no completions are shown when forcing autocompletion.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-25 12:39:21 UTC (rev 3896)
+++ trunk/ChangeLog 2009-06-25 15:57:11 UTC (rev 3897)
@@ -3,6 +3,11 @@
* src/dialogs.c:
Fix Gtk NULL warning with gtk_file_chooser_set_current_folder().
Fix using locale encoding for default Save As dialog path.
+ * src/editor.c:
+ Beep when trying to activate the '...' autocompletion item.
+ Limit (forced) document word completion to
+ autocompletion_max_entries.
+ Beep if no completions are shown when forcing autocompletion.
2009-06-24 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-06-25 12:39:21 UTC (rev 3896)
+++ trunk/src/editor.c 2009-06-25 15:57:11 UTC (rev 3897)
@@ -721,6 +721,7 @@
if (nt->nmhdr.code == SCN_AUTOCSELECTION)
{
gint pos = SSM(calltip.sci, SCI_GETCURRENTPOS, 0, 0);
+
sci_set_selection_start(calltip.sci, nt->lParam);
sci_set_selection_end(calltip.sci, pos);
sci_replace_sel(calltip.sci, ""); /* clear root of word */
@@ -825,8 +826,15 @@
}
break;
}
+ case SCN_AUTOCSELECTION:
+ if (g_str_equal(nt->text, "..."))
+ {
+ sci_cancel(sci);
+ utils_beep();
+ break;
+ }
+ /* fall through */
case SCN_AUTOCCANCELLED:
- case SCN_AUTOCSELECTION:
{
/* now that autocomplete is finishing or was cancelled, reshow calltips
* if they were showing */
@@ -877,7 +885,7 @@
break;
}
}
- /* we always return FALSE here to let plugins handle the event to */
+ /* we always return FALSE here to let plugins handle the event too */
return FALSE;
}
@@ -1709,13 +1717,15 @@
/* Algorithm based on based on Scite's StartAutoCompleteWord() */
-static void complete_doc_word(GeanyEditor *editor, gchar *root, gsize rootlen)
+static gboolean complete_doc_word(GeanyEditor *editor, gchar *root, gsize rootlen)
{
ScintillaObject *sci = editor->sci;
gchar *word;
gint len, current, word_end;
gint pos_find, flags;
guint word_length;
+ gsize nmatches = 0;
+ gboolean ret = FALSE;
GString *words;
struct TextToFind ttf;
@@ -1753,6 +1763,13 @@
if (strstr(words->str, word) == NULL)
g_string_append(words, word + 1);
g_free(word);
+
+ nmatches++;
+ if (nmatches == editor_prefs.autocompletion_max_entries)
+ {
+ g_string_append(words, "... ");
+ break;
+ }
}
}
ttf.chrg.cpMin = word_end;
@@ -1764,11 +1781,13 @@
g_strdelimit(words->str, " ", '\n');
words->str[words->len - 1] = '\0'; /* remove the trailing '\n' */
show_autocomplete(sci, rootlen, words->str + 1);
+ ret = TRUE;
}
else
scintilla_send_message(sci, SCI_AUTOCCANCEL, 0, 0);
g_string_free(words, TRUE);
+ return ret;
}
@@ -1836,12 +1855,17 @@
/* force is set when called by keyboard shortcut, otherwise start at the
* editor_prefs.symbolcompletion_min_chars'th char */
if (force || rootlen >= editor_prefs.symbolcompletion_min_chars)
+ {
ret = autocomplete_tags(editor, root, rootlen);
+ /* If forcing and there's nothing else to show, complete from words in document */
+ if (!ret && force /* || editor_prefs.autocomplete_doc_words) */)
+ ret = complete_doc_word(editor, root, rootlen);
+ }
}
- /* If forcing and there's nothing else to show, complete from words in document */
- if (!ret && force)
- complete_doc_word(editor, root, rootlen);
}
+ if (!ret && force)
+ utils_beep();
+
g_free(linebuf);
return ret;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3894
http://geany.svn.sourceforge.net/geany/?rev=3894&view=rev
Author: ntrel
Date: 2009-06-24 12:27:48 +0000 (Wed, 24 Jun 2009)
Log Message:
-----------
Add item: pref for autocompletion of all words in the current document.
Edit some items.
Modified Paths:
--------------
trunk/TODO
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-06-24 12:26:09 UTC (rev 3893)
+++ trunk/TODO 2009-06-24 12:27:48 UTC (rev 3894)
@@ -12,17 +12,19 @@
programming languages (done for C-like filetypes using
filetypes.common named styles)
o configurable filetype and project make commands (e.g. using
- bud for D)
+ bud for D) - see the build-system SVN branch
o (support for adding plugin filetypes - SCI_LOADLEXERLIBRARY?)
o (selectable menu of arguments to use for Make, from Make Custom)
o (DBUS)
- o (indent wrapped lines - Scintilla issue)
- o (macro support)
- o (better search & replace regex support - use
+ o (indent wrapped lines - SCI_SETWRAPINDENTMODE)
+ o (sci macro support)
+ o (better search & replace regex support e.g. multiline - use
SCI_GETCHARACTERPOINTER and GNU regex?)
o (parsing tags from a memory buffer instead of a file on disk)
o (tango-like icons for the symbol list)
o (show autocompletion symbol icons - see SCI_REGISTERIMAGE)
+ o (pref for autocompletion of all words in the current document - see
+ complete_doc_word() in editor.c)
1.0:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3892
http://geany.svn.sourceforge.net/geany/?rev=3892&view=rev
Author: ntrel
Date: 2009-06-23 12:53:18 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Add *.m4 for shell scripts.
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/filetype_extensions.conf
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-23 12:51:16 UTC (rev 3891)
+++ trunk/ChangeLog 2009-06-23 12:53:18 UTC (rev 3892)
@@ -3,6 +3,8 @@
* src/plugins.c:
Add debug message if plugin has not set a name for its keybinding
group.
+ * data/filetype_extensions.conf:
+ Add *.m4 for shell scripts.
2009-06-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/data/filetype_extensions.conf
===================================================================
--- trunk/data/filetype_extensions.conf 2009-06-23 12:51:16 UTC (rev 3891)
+++ trunk/data/filetype_extensions.conf 2009-06-23 12:53:18 UTC (rev 3892)
@@ -32,7 +32,7 @@
Python=*.py;*.pyw;
R=*.R;*.r;
Ruby=*.rb;*.rhtml;*.ruby;
-Sh=*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.zsh;*.ash;*.bash;
+Sh=*.sh;configure;configure.in;configure.in.in;configure.ac;*.ksh;*.zsh;*.ash;*.bash;*.m4;
Tcl=*.tcl;*.tk;*.wish;
CSS=*.css;
Docbook=*.docbook;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3891
http://geany.svn.sourceforge.net/geany/?rev=3891&view=rev
Author: ntrel
Date: 2009-06-23 12:51:16 +0000 (Tue, 23 Jun 2009)
Log Message:
-----------
Add debug message if plugin has not set a name for its keybinding
group.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/plugins.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-06-22 15:26:44 UTC (rev 3890)
+++ trunk/ChangeLog 2009-06-23 12:51:16 UTC (rev 3891)
@@ -1,3 +1,10 @@
+2009-06-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/plugins.c:
+ Add debug message if plugin has not set a name for its keybinding
+ group.
+
+
2009-06-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/highlighting.c, doc/geany.txt, doc/geany.html,
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2009-06-22 15:26:44 UTC (rev 3890)
+++ trunk/src/plugins.c 2009-06-23 12:51:16 UTC (rev 3891)
@@ -484,7 +484,13 @@
{
guint i;
- g_return_if_fail(NZV(plugin->key_group->name));
+ if (!NZV(plugin->key_group->name))
+ {
+ geany_debug("Plugin \"%s\" has not set a name for its keybinding group"
+ " - ignoring all keybindings!",
+ plugin->info.name);
+ return;
+ }
g_return_if_fail(! g_str_equal(plugin->key_group->name, keybindings_keyfile_group_name));
for (i = 0; i < plugin->key_group->count; i++)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3889
http://geany.svn.sourceforge.net/geany/?rev=3889&view=rev
Author: ntrel
Date: 2009-06-22 15:09:16 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Fix using same version number as Geany.
Modified Paths:
--------------
trunk/plugins/splitwindow.c
Modified: trunk/plugins/splitwindow.c
===================================================================
--- trunk/plugins/splitwindow.c 2009-06-22 15:08:44 UTC (rev 3888)
+++ trunk/plugins/splitwindow.c 2009-06-22 15:09:16 UTC (rev 3889)
@@ -40,7 +40,7 @@
PLUGIN_VERSION_CHECK(GEANY_API_VERSION)
PLUGIN_SET_INFO(_("Split Window"), _("Splits the editor view into two windows."),
- "0.1", _("The Geany developer team"))
+ VERSION, _("The Geany developer team"))
GeanyData *geany_data;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3888
http://geany.svn.sourceforge.net/geany/?rev=3888&view=rev
Author: ntrel
Date: 2009-06-22 15:08:44 +0000 (Mon, 22 Jun 2009)
Log Message:
-----------
Minor typos.
Modified Paths:
--------------
trunk/src/main.c
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2009-06-21 21:19:43 UTC (rev 3887)
+++ trunk/src/main.c 2009-06-22 15:08:44 UTC (rev 3888)
@@ -396,9 +396,9 @@
* This is a convenience function to set up gettext for internationalisation support
* in external plugins. You should call this function early in @ref plugin_init().
* If the macro HAVE_LOCALE_H is defined, @a setlocale(LC_ALL, "") is called.
- * The codeset for the mesaage translations is set to UTF-8.
+ * The codeset for the message translations is set to UTF-8.
*
- * Note that this function only setup the gettext textdomain for you. You still have
+ * Note that this function only setups the gettext textdomain for you. You still have
* to adjust the build system of your plugin to get internationalisation support
* working properly.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.