Revision: 3817
http://geany.svn.sourceforge.net/geany/?rev=3817&view=rev
Author: eht16
Date: 2009-05-27 17:21:51 +0000 (Wed, 27 May 2009)
Log Message:
-----------
Remove quote_executable() as it is not used anymore.
When creating the geany_run_script.bat use the "%0" variable expansion and quote it for the "del" command (closes #2797172).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-26 20:45:36 UTC (rev 3816)
+++ trunk/ChangeLog 2009-05-27 17:21:51 UTC (rev 3817)
@@ -1,3 +1,11 @@
+2009-05-27 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/build.c:
+ Remove quote_executable() as it is not used anymore.
+ When creating the geany_run_script.bat use the "%0" variable
+ expansion and quote it for the "del" command (closes #2797172).
+
+
2009-05-26 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/win32.c:
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2009-05-26 20:45:36 UTC (rev 3816)
+++ trunk/src/build.c 2009-05-27 17:21:51 UTC (rev 3817)
@@ -407,26 +407,6 @@
#ifdef G_OS_WIN32
-/* cmd is a command line separated with spaces, first element will be escaped with double quotes
- * and a newly allocated string will be returned */
-static gchar *quote_executable(const gchar *cmd)
-{
- gchar **fields;
- gchar *result;
-
- if (! NZV(cmd))
- return NULL;
-
- fields = g_strsplit(cmd, " ", 2);
- if (fields == NULL || g_strv_length(fields) != 2)
- return g_strdup(cmd);
-
- result = g_strconcat("\"", fields[0], "\" ", fields[1], NULL);
-
- g_strfreev(fields);
- return result;
-}
-
static void parse_build_output(const gchar **output, gint status)
{
guint x, i, len;
@@ -998,9 +978,10 @@
gchar *str;
fp = g_fopen(fname, "w");
- if (! fp) return FALSE;
+ if (! fp)
+ return FALSE;
#ifdef G_OS_WIN32
- str = g_strdup_printf("%s\n\n%s\ndel %s\n", cmd, (autoclose) ? "" : "pause", fname);
+ str = g_strdup_printf("%s\n\n%s\ndel \"%%0\"\n\npause\n", cmd, (autoclose) ? "" : "pause");
#else
str = g_strdup_printf(
"#!/bin/sh\n\nrm $0\n\n%s\n\necho \"\n\n------------------\n(program exited with code: $?)\" \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3811
http://geany.svn.sourceforge.net/geany/?rev=3811&view=rev
Author: ntrel
Date: 2009-05-22 14:50:34 +0000 (Fri, 22 May 2009)
Log Message:
-----------
Improve MRU document switching so there are no duplicates in the
list and documents switched to whilst the dialog is open are
ignored. Also beep when cycling through to the first document in the
list.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/keybindings.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-21 19:19:12 UTC (rev 3810)
+++ trunk/ChangeLog 2009-05-22 14:50:34 UTC (rev 3811)
@@ -1,3 +1,12 @@
+2009-05-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keybindings.c:
+ Improve MRU document switching so there are no duplicates in the
+ list and documents switched to whilst the dialog is open are
+ ignored. Also beep when cycling through to the first document in the
+ list.
+
+
2009-05-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/dialogs.c:
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-05-21 19:19:12 UTC (rev 3810)
+++ trunk/src/keybindings.c 2009-05-22 14:50:34 UTC (rev 3811)
@@ -500,9 +500,11 @@
{
GeanyDocument *old = document_get_current();
- /* when closing current doc, old is NULL */
- if (old)
+ /* when closing current doc, old is NULL.
+ * Don't add to the mru list when switch dialog is visible. */
+ if (old && switch_dialog_cancelled)
{
+ g_queue_remove(mru_docs, old);
g_queue_push_head(mru_docs, old);
if (g_queue_get_length(mru_docs) > MAX_MRU_DOCS)
@@ -517,8 +519,7 @@
GeanyDocument *current;
current = document_get_current();
-
- while (current && g_queue_peek_head(mru_docs) == current)
+ if (current && g_queue_peek_head(mru_docs) == current)
g_queue_pop_head(mru_docs);
return FALSE;
@@ -529,7 +530,7 @@
{
if (! main_status.quitting)
{
- g_queue_remove_all(mru_docs, doc);
+ g_queue_remove(mru_docs, doc);
g_idle_add(on_idle_close, NULL);
}
}
@@ -1558,7 +1559,10 @@
{
return FALSE;
}
- mru_pos += 2;
+ if (! switch_dialog || !GTK_WIDGET_VISIBLE(switch_dialog))
+ mru_pos = 2; /* skip past the previous document */
+ else
+ mru_pos += 1;
if (! switch_dialog)
switch_dialog = create_switch_dialog();
@@ -1576,6 +1580,7 @@
if (! DOC_VALID(last_doc))
{
+ utils_beep();
mru_pos = 0;
last_doc = g_queue_peek_nth(mru_docs, mru_pos);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 3809
http://geany.svn.sourceforge.net/geany/?rev=3809&view=rev
Author: ntrel
Date: 2009-05-20 15:38:04 +0000 (Wed, 20 May 2009)
Log Message:
-----------
Parse Python calltips.
Modified Paths:
--------------
trunk/ChangeLog
trunk/TODO
trunk/src/editor.c
trunk/tagmanager/python.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-05-20 15:01:04 UTC (rev 3808)
+++ trunk/ChangeLog 2009-05-20 15:38:04 UTC (rev 3809)
@@ -4,6 +4,8 @@
Fix multiline indent when selection covers text on the last line.
* src/notebook.c:
Show current document in bold in tab popup menu.
+ * src/editor.c, tagmanager/python.c, TODO:
+ Parse Python calltips.
2009-05-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-05-20 15:01:04 UTC (rev 3808)
+++ trunk/TODO 2009-05-20 15:38:04 UTC (rev 3809)
@@ -20,10 +20,6 @@
o (better search & replace regex support - use
SCI_GETCHARACTERPOINTER and GNU regex?)
o (parsing tags from a memory buffer instead of a file on disk)
- o (calltip support for non-C-like languages that use
- function_name(arguments) syntax)
- o (better tags support for popular languages? - this is a moving
- target...)
o (tango-like icons for the symbol list)
o (show autocompletion symbol icons - see SCI_REGISTERIMAGE)
@@ -40,6 +36,10 @@
--------
Note: these items might not get worked on.
+ o (calltip support for non-C-like languages that use
+ function_name(arguments) syntax - see python.c:parseArglist())
+ o (better tags support for popular languages? - this is a moving
+ target...)
o Some kind of support for CTags tags files
o Scope resolution for object members
o Python plugin interface (different concept from Lua scripting)
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2009-05-20 15:01:04 UTC (rev 3808)
+++ trunk/src/editor.c 2009-05-20 15:38:04 UTC (rev 3809)
@@ -1377,7 +1377,8 @@
g_return_val_if_fail(ft && word && *word, NULL);
- tags = tm_workspace_find(word, arg_types | tm_tag_class_t, attrs, FALSE, ft->lang);
+ /* use all types in case language uses wrong tag type e.g. python "members" instead of "methods" */
+ tags = tm_workspace_find(word, tm_tag_max_t, attrs, FALSE, ft->lang);
if (tags->len == 0)
return NULL;
Modified: trunk/tagmanager/python.c
===================================================================
--- trunk/tagmanager/python.c 2009-05-20 15:01:04 UTC (rev 3808)
+++ trunk/tagmanager/python.c 2009-05-20 15:38:04 UTC (rev 3809)
@@ -61,13 +61,14 @@
* extract all relevant information and create a tag.
*/
static void makeFunctionTag (vString *const function,
- vString *const parent, int is_class_parent)
+ vString *const parent, int is_class_parent, const char *arglist)
{
tagEntryInfo tag;
initTagEntry (&tag, vStringValue (function));
tag.kindName = "function";
tag.kind = 'f';
+ tag.extensionFields.arglist = arglist;
if (vStringLength (parent) > 0)
{
@@ -291,11 +292,39 @@
vStringDelete (name_next);
}
+/* modified from get.c getArglistFromStr().
+ * warning: terminates rest of string past arglist!
+ * note: does not ignore brackets inside strings! */
+static char *parseArglist(const char *buf)
+{
+ char *start, *end;
+ int level;
+ if (NULL == buf)
+ return NULL;
+ if (NULL == (start = strchr(buf, '(')))
+ return NULL;
+ for (level = 1, end = start + 1; level > 0; ++end)
+ {
+ if ('\0' == *end)
+ break;
+ else if ('(' == *end)
+ ++ level;
+ else if (')' == *end)
+ -- level;
+ }
+ *end = '\0';
+ return strdup(start);
+}
+
static void parseFunction (const char *cp, vString *const def,
vString *const parent, int is_class_parent)
{
+ char *arglist;
+
cp = parseIdentifier (cp, def);
- makeFunctionTag (def, parent, is_class_parent);
+ arglist = parseArglist (cp);
+ makeFunctionTag (def, parent, is_class_parent, arglist);
+ eFree (arglist);
}
/* Get the combined name of a nested symbol. Classes are separated with ".",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.