SF.net SVN: geany:[3930] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Jul 8 14:51:30 UTC 2009


Revision: 3930
          http://geany.svn.sourceforge.net/geany/?rev=3930&view=rev
Author:   ntrel
Date:     2009-07-08 14:51:25 +0000 (Wed, 08 Jul 2009)

Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/TODO
    trunk/icons/16x16/Makefile.am
    trunk/src/editor.c

Added Paths:
-----------
    trunk/icons/16x16/classviewer-method.xpm
    trunk/icons/16x16/classviewer-var.xpm

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-07-08 12:40:57 UTC (rev 3929)
+++ trunk/ChangeLog	2009-07-08 14:51:25 UTC (rev 3930)
@@ -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>

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-07-08 12:40:57 UTC (rev 3929)
+++ trunk/TODO	2009-07-08 14:51:25 UTC (rev 3930)
@@ -21,7 +21,6 @@
 	   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:

Modified: trunk/icons/16x16/Makefile.am
===================================================================
--- trunk/icons/16x16/Makefile.am	2009-07-08 12:40:57 UTC (rev 3929)
+++ trunk/icons/16x16/Makefile.am	2009-07-08 14:51:25 UTC (rev 3930)
@@ -11,4 +11,6 @@
 	classviewer-var.png							\
 	geany.png
 
-EXTRA_DIST = $(icons_DATA)
+EXTRA_DIST = $(icons_DATA) \
+	classviewer-var.xpm \
+	classviewer-method.xpm

Added: trunk/icons/16x16/classviewer-method.xpm
===================================================================
--- trunk/icons/16x16/classviewer-method.xpm	                        (rev 0)
+++ trunk/icons/16x16/classviewer-method.xpm	2009-07-08 14:51:25 UTC (rev 3930)
@@ -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"
+};


Property changes on: trunk/icons/16x16/classviewer-method.xpm
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Added: trunk/icons/16x16/classviewer-var.xpm
===================================================================
--- trunk/icons/16x16/classviewer-var.xpm	                        (rev 0)
+++ trunk/icons/16x16/classviewer-var.xpm	2009-07-08 14:51:25 UTC (rev 3930)
@@ -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"
+};


Property changes on: trunk/icons/16x16/classviewer-var.xpm
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c	2009-07-08 12:40:57 UTC (rev 3929)
+++ trunk/src/editor.c	2009-07-08 14:51:25 UTC (rev 3930)
@@ -452,6 +452,8 @@
 
 		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 @@
 				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 @@
 }
 
 
+#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 @@
 	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)
 	{


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list