Show autocompletion icons for tag symbols - for now only tags with
an arglist have the 'function/method' icon, all others have the 'variable' icon. Note: XPMs were created from the PNGs with the ImageMagick 'convert' program. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3930 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
aee6e14840
commit
ab002c80f2
@ -6,6 +6,13 @@
|
||||
Use 'autocompletion' in dialog and docs, not 'auto completion'.
|
||||
* src/editor.c:
|
||||
Fix limiting number of word completion entries too much.
|
||||
* src/editor.c, TODO, icons/16x16/classviewer-var.xpm,
|
||||
icons/16x16/classviewer-method.xpm, icons/16x16/Makefile.am:
|
||||
Show autocompletion icons for tag symbols - for now only tags with
|
||||
an arglist have the 'function/method' icon, all others have the
|
||||
'variable' icon.
|
||||
Note: XPMs were created from the PNGs with the ImageMagick 'convert'
|
||||
program.
|
||||
|
||||
|
||||
2009-07-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
1
TODO
1
TODO
@ -21,7 +21,6 @@ Note: features included in brackets have lower priority.
|
||||
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)
|
||||
|
||||
|
||||
1.0:
|
||||
|
@ -11,4 +11,6 @@ icons_DATA = \
|
||||
classviewer-var.png \
|
||||
geany.png
|
||||
|
||||
EXTRA_DIST = $(icons_DATA)
|
||||
EXTRA_DIST = $(icons_DATA) \
|
||||
classviewer-var.xpm \
|
||||
classviewer-method.xpm
|
||||
|
27
icons/16x16/classviewer-method.xpm
Normal file
27
icons/16x16/classviewer-method.xpm
Normal file
@ -0,0 +1,27 @@
|
||||
/* XPM */
|
||||
static char *classviewer_method[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 5 1",
|
||||
" c black",
|
||||
". c #E0BC38",
|
||||
"X c #F0DC5C",
|
||||
"o c #FCFC80",
|
||||
"O c None",
|
||||
/* pixels */
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOO OOOO",
|
||||
"OOOOOOOOO oo OO",
|
||||
"OOOOOOOO ooooo O",
|
||||
"OOOOOOO ooooo. O",
|
||||
"OOOO O XXoo.. O",
|
||||
"OOO oo XXX... O",
|
||||
"OO ooooo XX.. OO",
|
||||
"O ooooo. X. OOO",
|
||||
"O XXoo.. O OOOO",
|
||||
"O XXX... OOOOOOO",
|
||||
"O XXX.. OOOOOOOO",
|
||||
"OO X. OOOOOOOOO",
|
||||
"OOOO OOOOOOOOOO"
|
||||
};
|
27
icons/16x16/classviewer-var.xpm
Normal file
27
icons/16x16/classviewer-var.xpm
Normal file
@ -0,0 +1,27 @@
|
||||
/* XPM */
|
||||
static char *classviewer_var[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 5 1",
|
||||
" c black",
|
||||
". c #8C748C",
|
||||
"X c #9C94A4",
|
||||
"o c #ACB4C0",
|
||||
"O c None",
|
||||
/* pixels */
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOOOOOOOOO",
|
||||
"OOOOOOOOO OOOOO",
|
||||
"OOOOOOOO oo OOO",
|
||||
"OOOOOOO ooooo OO",
|
||||
"OOOOOO ooooo. OO",
|
||||
"OOOOOO XXoo.. OO",
|
||||
"OOOOOO XXX... OO",
|
||||
"OOOOOO XXX.. OOO",
|
||||
"OOOOOOO X. OOOO",
|
||||
"OOOOOOOOO OOOOO",
|
||||
"OOOOOOOOOOOOOOOO"
|
||||
};
|
17
src/editor.c
17
src/editor.c
@ -452,6 +452,8 @@ static void show_tags_list(GeanyEditor *editor, const GPtrArray *tags, gsize roo
|
||||
|
||||
for (j = 0; j < tags->len; ++j)
|
||||
{
|
||||
TMTag *tag = tags->pdata[j];
|
||||
|
||||
if (j > 0)
|
||||
g_string_append_c(words, '\n');
|
||||
|
||||
@ -460,7 +462,13 @@ static void show_tags_list(GeanyEditor *editor, const GPtrArray *tags, gsize roo
|
||||
g_string_append(words, "...");
|
||||
break;
|
||||
}
|
||||
g_string_append(words, ((TMTag *) tags->pdata[j])->name);
|
||||
g_string_append(words, tag->name);
|
||||
|
||||
/* for now, tag types don't all follow C, so just look at arglist */
|
||||
if (NZV(tag->atts.entry.arglist))
|
||||
g_string_append(words, "?2");
|
||||
else
|
||||
g_string_append(words, "?1");
|
||||
}
|
||||
show_autocomplete(sci, rootlen, words->str);
|
||||
g_string_free(words, TRUE);
|
||||
@ -4484,6 +4492,9 @@ static void setup_sci_keys(ScintillaObject *sci)
|
||||
}
|
||||
|
||||
|
||||
#include "icons/16x16/classviewer-var.xpm"
|
||||
#include "icons/16x16/classviewer-method.xpm"
|
||||
|
||||
/* Create new editor widget (scintilla).
|
||||
* @note The @c "sci-notify" signal is connected separately. */
|
||||
static ScintillaObject *create_new_sci(GeanyEditor *editor)
|
||||
@ -4510,6 +4521,10 @@ static ScintillaObject *create_new_sci(GeanyEditor *editor)
|
||||
SSM(sci, SCI_AUTOCSETDROPRESTOFWORD, TRUE, 0);
|
||||
SSM(sci, SCI_SETSCROLLWIDTHTRACKING, 1, 0);
|
||||
|
||||
/* tag autocompletion images */
|
||||
SSM(sci, SCI_REGISTERIMAGE, 1, (sptr_t)classviewer_var);
|
||||
SSM(sci, SCI_REGISTERIMAGE, 2, (sptr_t)classviewer_method);
|
||||
|
||||
/* only connect signals if this is for the document notebook, not split window */
|
||||
if (editor->sci == NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user