Revision: 1388
http://svn.sourceforge.net/geany/?rev=1388&view=rev
Author: ntrel
Date: 2007-03-13 04:32:57 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Use tab stops for status bar line, column and selection data to stop
the other fields being moved so often when browsing code or typing.
Rearrange status bar statistics to be clearer/more concise.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/ui_utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-03-12 16:30:15 UTC (rev 1387)
+++ trunk/ChangeLog 2007-03-13 11:32:57 UTC (rev 1388)
@@ -1,3 +1,11 @@
+2007-03-13 Nick Treleaven <nick.treleaven(a)btinternet.com>
+
+ * src/ui_utils.c:
+ Use tab stops for status bar line, column and selection data to stop
+ the other fields being moved so often when browsing code or typing.
+ Rearrange status bar statistics to be clearer/more concise.
+
+
2007-03-12 Enrico Tröger <enrico.troeger(a)uvena.de>
* doc/geany.docbook: Added description for disable-server command line
Modified: trunk/src/ui_utils.c
===================================================================
--- trunk/src/ui_utils.c 2007-03-12 16:30:15 UTC (rev 1387)
+++ trunk/src/ui_utils.c 2007-03-13 11:32:57 UTC (rev 1388)
@@ -113,18 +113,22 @@
else
col = 0;
- text = g_strdup_printf(_("%c line: % 4d column: % 3d selection: % 4d %s mode: %s%s cur. function: %s encoding: %s %s filetype: %s"),
- (doc_list[idx].changed) ? 42 : 32,
+ /* Status bar statistics: col = column, sel = selection, RO = read-only,
+ * OVR = overwrite/overtype, INS = insert, MOD = modified */
+ text = g_strdup_printf(_("line: %d\t col: %d\t sel: %d\t %s %s "
+ "mode: %s encoding: %s %s filetype: %s scope: %s"),
(line + 1), col,
sci_get_selected_text_length(doc_list[idx].sci) - 1,
- sci_get_overtype(doc_list[idx].sci) ? _("OVR") : _("INS"),
+ (doc_list[idx].readonly) ? _("RO ") :
+ (sci_get_overtype(doc_list[idx].sci) ? _("OVR") : _("INS")),
+ (doc_list[idx].changed) ? _("MOD") : " ",
document_get_eol_mode(idx),
- (doc_list[idx].readonly) ? ", read only" : "",
- cur_tag,
(doc_list[idx].encoding) ? doc_list[idx].encoding : _("unknown"),
(encodings_is_unicode_charset(doc_list[idx].encoding)) ?
- ((doc_list[idx].has_bom) ? _("(with BOM)") : _("(without BOM)")) : "",
- (doc_list[idx].file_type) ? doc_list[idx].file_type->title : _("unknown"));
+ ((doc_list[idx].has_bom) ? _("(with BOM)") : "") : "",
+ (doc_list[idx].file_type) ? doc_list[idx].file_type->name :
+ filetypes[GEANY_FILETYPES_ALL]->name,
+ cur_tag);
set_statusbar(text, TRUE); // can be overridden by status messages
g_free(text);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1387
http://svn.sourceforge.net/geany/?rev=1387&view=rev
Author: ntrel
Date: 2007-03-12 09:30:15 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
Fix segfault (oops).
Modified Paths:
--------------
trunk/src/utils.c
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2007-03-12 16:24:52 UTC (rev 1386)
+++ trunk/src/utils.c 2007-03-12 16:30:15 UTC (rev 1387)
@@ -385,7 +385,7 @@
gboolean ret;
// check if the cached line and file index have changed since last time:
- if (cur_idx != old_idx)
+ if (cur_idx < 0 || cur_idx != old_idx)
ret = TRUE;
else
if (cur_line == old_line)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1386
http://svn.sourceforge.net/geany/?rev=1386&view=rev
Author: ntrel
Date: 2007-03-12 09:24:52 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
Update the status bar after setting the document file type, if it
has changed.
Update the status bar after colourising open files, so the current
tag is accurate.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-03-12 16:18:12 UTC (rev 1385)
+++ trunk/ChangeLog 2007-03-12 16:24:52 UTC (rev 1386)
@@ -8,6 +8,11 @@
* src/build.c:
Switch to Compiler window when using Next Error command.
+ * src/utils.c, src/document.c:
+ Update the status bar after setting the document file type, if it
+ has changed.
+ Update the status bar after colourising open files, so the current
+ tag is accurate.
2007-03-10 Nick Treleaven <nick.treleaven(a)btinternet.com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-03-12 16:18:12 UTC (rev 1385)
+++ trunk/src/document.c 2007-03-12 16:24:52 UTC (rev 1386)
@@ -1586,13 +1586,15 @@
void document_set_filetype(gint idx, filetype *type)
{
gboolean colourise = FALSE;
+ gboolean ft_changed;
if (type == NULL || ! DOC_IDX_VALID(idx))
return;
geany_debug("%s : %s (%s)", doc_list[idx].file_name, type->name, doc_list[idx].encoding);
- if (doc_list[idx].file_type != type) // filetype has changed
+ ft_changed = (doc_list[idx].file_type != type);
+ if (ft_changed) // filetype has changed
{
doc_list[idx].file_type = type;
@@ -1615,6 +1617,11 @@
if (! update_type_keywords(doc_list[idx].sci) && colourise)
sci_colourise(doc_list[idx].sci, 0, -1);
}
+ if (ft_changed)
+ {
+ utils_get_current_function(-1, NULL);
+ ui_update_statusbar(idx, -1);
+ }
}
@@ -2179,6 +2186,11 @@
delay_colourise = FALSE;
g_array_free(doc_indexes, TRUE);
doc_indexes = NULL;
+
+ /* now that the current document is colourised, fold points are now accurate,
+ * so force an update of the current function/tag. */
+ utils_get_current_function(-1, NULL);
+ ui_update_statusbar(-1, -1);
}
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2007-03-12 16:18:12 UTC (rev 1385)
+++ trunk/src/utils.c 2007-03-12 16:24:52 UTC (rev 1386)
@@ -491,14 +491,29 @@
}
+/* Sets *tagname to point at the current function or tag name.
+ * If idx is -1, reset the cached current tag data to ensure it will be reparsed on the next
+ * call to this function.
+ * Returns: line number of the current tag, or -1 if unknown. */
gint utils_get_current_function(gint idx, const gchar **tagname)
{
static gint tag_line = -1;
static gchar *cur_tag = NULL;
gint line;
gint fold_level;
- TMWorkObject * tm_file = doc_list[idx].tm_file;
+ TMWorkObject *tm_file;
+ if (! DOC_IDX_VALID(idx)) // reset current function
+ {
+ current_function_changed(-1, -1, -1);
+ g_free(cur_tag);
+ cur_tag = g_strdup(_("unknown"));
+ if (tagname != NULL)
+ *tagname = cur_tag;
+ tag_line = -1;
+ return tag_line;
+ }
+
line = sci_get_current_line(doc_list[idx].sci, -1);
fold_level = sci_get_fold_level(doc_list[idx].sci, line);
// check if the cached line and file index have changed since last time:
@@ -518,6 +533,7 @@
tag_line = -1;
return tag_line;
}
+ tm_file = doc_list[idx].tm_file;
// if the document has no changes, get the previous function name from TM
if(! doc_list[idx].changed && tm_file != NULL && tm_file->tags_array != NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1385
http://svn.sourceforge.net/geany/?rev=1385&view=rev
Author: eht16
Date: 2007-03-12 09:18:12 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
Added missing whitespace (found by Frank).
Modified Paths:
--------------
trunk/src/project.c
Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c 2007-03-12 16:12:42 UTC (rev 1384)
+++ trunk/src/project.c 2007-03-12 16:18:12 UTC (rev 1385)
@@ -435,7 +435,7 @@
if (app->project != NULL)
{
gchar *msg =
- _("The '%s' project is already open."
+ _("The '%s' project is already open. "
"Do you want to close it before proceeding?");
if (dialogs_show_question(msg, app->project->name))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 1384
http://svn.sourceforge.net/geany/?rev=1384&view=rev
Author: eht16
Date: 2007-03-12 09:12:42 -0700 (Mon, 12 Mar 2007)
Log Message:
-----------
Added description for disable-server command line option for Xfce Terminal.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.docbook
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-03-12 12:13:45 UTC (rev 1383)
+++ trunk/ChangeLog 2007-03-12 16:12:42 UTC (rev 1384)
@@ -1,3 +1,9 @@
+2007-03-12 Enrico Tröger <enrico.troeger(a)uvena.de>
+
+ * doc/geany.docbook: Added description for disable-server command line
+ option for Xfce Terminal.
+
+
2007-03-12 Nick Treleaven <nick.treleaven(a)btinternet.com>
* src/build.c:
Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook 2007-03-12 12:13:45 UTC (rev 1383)
+++ trunk/doc/geany.docbook 2007-03-12 16:12:42 UTC (rev 1384)
@@ -1088,8 +1088,11 @@
stopped. This can happen when the process creates more than one child process.
Therefore stopping any make actions is not possible because make creates child
processes and these child processes creates again child process. There might be
- some other programs which cannot be stopped correctly, e.g. "Terminal" (the
- terminal program of Xfce). Xterm is known to work properly.
+ some other programs which cannot be stopped correctly. Xterm is known to work
+ properly. If you are using "Terminal" (the terminal program of Xfce), you
+ should add the command line option "--disable-server" otherwise the started
+ process cannot be stopped. Just add this option in the preferences dialog on
+ the Tools tab in the terminal field.
</para>
</section>
<section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.