Revision: 5743
http://geany.svn.sourceforge.net/geany/?rev=5743&view=rev
Author: ntrel
Date: 2011-04-26 16:39:41 +0000 (Tue, 26 Apr 2011)
Log Message:
-----------
Remove Preferences label warning about restarting after editing
template data - this is no longer necessary.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/prefs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-26 16:21:47 UTC (rev 5742)
+++ trunk/ChangeLog 2011-04-26 16:39:41 UTC (rev 5743)
@@ -10,6 +10,9 @@
Change Programming Languages filetype group label -> Compiled
Languages.
Use 'source file' title for custom filetypes.
+ * src/prefs.c, doc/geany.txt, doc/geany.html:
+ Remove Preferences label warning about restarting after editing
+ template data - this is no longer necessary.
2011-04-26 Colomban Wendling <colomban(at)geany(dot)org>
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2011-04-26 16:21:47 UTC (rev 5742)
+++ trunk/doc/geany.html 2011-04-26 16:39:41 UTC (rev 5743)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2011-04-01" />
+<meta name="date" content="2011-04-02" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2011-04-01</td></tr>
+<td>2011-04-02</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.21</td></tr>
</tbody>
@@ -2641,11 +2641,6 @@
<p>This data is used as meta data for various template text to insert into
a document, such as the file header. You only need to set fields that
you want to use in your template files.</p>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">For changes made here to take effect, you must either select
-<em>Tools->Reload Configuration</em> or restart Geany.</p>
-</div>
<img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" />
<div class="section">
<h4><a class="toc-backref" href="#id122" id="template-data" name="template-data">Template data</a></h4>
@@ -5270,8 +5265,7 @@
meta data is only used for the ChangeLog and File header templates.</p>
<p>In the configuration dialog you can find a tab "Templates" (see
<a class="reference" href="#template-preferences">Template preferences</a>). You can define the default values
-which will be inserted in the templates. You should select
-<em>Tools->Reload Configuration</em> or restart Geany after making changes.</p>
+which will be inserted in the templates.</p>
</div>
<div class="section">
<h3><a class="toc-backref" href="#id204" id="file-templates" name="file-templates">File templates</a></h3>
@@ -6540,7 +6534,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2011-04-01 16:25 UTC.
+Generated on: 2011-04-26 16:36 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2011-04-26 16:21:47 UTC (rev 5742)
+++ trunk/doc/geany.txt 2011-04-26 16:39:41 UTC (rev 5743)
@@ -2323,10 +2323,6 @@
a document, such as the file header. You only need to set fields that
you want to use in your template files.
-.. note::
- For changes made here to take effect, you must either select
- *Tools->Reload Configuration* or restart Geany.
-
.. image:: ./images/pref_dialog_templ.png
Template data
@@ -4506,8 +4502,7 @@
In the configuration dialog you can find a tab "Templates" (see
`Template preferences`_). You can define the default values
-which will be inserted in the templates. You should select
-*Tools->Reload Configuration* or restart Geany after making changes.
+which will be inserted in the templates.
File templates
Modified: trunk/src/prefs.c
===================================================================
--- trunk/src/prefs.c 2011-04-26 16:21:47 UTC (rev 5742)
+++ trunk/src/prefs.c 2011-04-26 16:39:41 UTC (rev 5743)
@@ -1651,11 +1651,6 @@
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox31")),
label, FALSE, TRUE, 5);
- label = geany_wrap_label_new(_("<i>Notice: For all changes you make here to take effect, you need to restart Geany or force the reload of the settings using Tools->Reload Configuration.</i>"));
- gtk_widget_show(label);
- gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
- gtk_box_pack_start(GTK_BOX(ui_lookup_widget(ui_widgets.prefs_dialog, "vbox9")),
- label, FALSE, TRUE, 5);
/* page Keybindings */
label = geany_wrap_label_new(_("Here you can change keyboard shortcuts for various actions. Select one and press the Change button to enter a new shortcut, or double click on an action to edit the string representation of the shortcut directly."));
gtk_widget_show(label);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5742
http://geany.svn.sourceforge.net/geany/?rev=5742&view=rev
Author: colombanw
Date: 2011-04-26 16:21:47 +0000 (Tue, 26 Apr 2011)
Log Message:
-----------
Avoid changing the tag tree if it's not the one of the current document
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/document.c
trunk/src/documentprivate.h
trunk/src/sidebar.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-26 15:07:25 UTC (rev 5741)
+++ trunk/ChangeLog 2011-04-26 16:21:47 UTC (rev 5742)
@@ -18,6 +18,11 @@
src/documentprivate.h, src/editor.c, src/sidebar.c:
Make sure to update the tag list only for the current document,
avoiding idle updates to show the tag list for the wrong document.
+ * src/callbacks.c, src/document.c, src/documentprivate.h,
+ src/sidebar.c:
+ Avoid changing the tag tree if it's not the one of the current
+ document, fixing showing the wrong tag list when reloading
+ configuration files.
2011-04-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2011-04-26 15:07:25 UTC (rev 5741)
+++ trunk/src/callbacks.c 2011-04-26 16:21:47 UTC (rev 5742)
@@ -709,8 +709,6 @@
ui_update_popup_reundo_items(doc);
ui_document_show_hide(doc); /* update the document menu */
build_menu_update(doc);
- if (doc->priv->tag_list_update_needed)
- document_update_tag_list_in_idle(doc);
sidebar_update_tag_list(doc, FALSE);
/* We delay the check to avoid weird fast, unintended switching of notebook pages when
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2011-04-26 15:07:25 UTC (rev 5741)
+++ trunk/src/document.c 2011-04-26 16:21:47 UTC (rev 5742)
@@ -396,7 +396,6 @@
priv->redo_actions = NULL;
priv->line_count = 0;
priv->tag_list_update_source = 0;
- priv->tag_list_update_needed = FALSE;
#if ! defined(USE_GIO_FILEMON)
priv->last_check = time(NULL);
#endif
@@ -2334,12 +2333,7 @@
return FALSE;
if (! main_status.quitting)
- {
- if (doc == document_get_current ())
- document_update_tag_list(doc, TRUE);
- else
- doc->priv->tag_list_update_needed = TRUE;
- }
+ document_update_tag_list(doc, TRUE);
doc->priv->tag_list_update_source = 0;
return FALSE;
Modified: trunk/src/documentprivate.h
===================================================================
--- trunk/src/documentprivate.h 2011-04-26 15:07:25 UTC (rev 5741)
+++ trunk/src/documentprivate.h 2011-04-26 16:21:47 UTC (rev 5742)
@@ -86,8 +86,6 @@
time_t mtime;
/* ID of the idle callback updating the tag list */
guint tag_list_update_source;
- /* whether there is a tag list update we haven't had a chance to honor yet */
- gboolean tag_list_update_needed;
}
GeanyDocumentPrivate;
Modified: trunk/src/sidebar.c
===================================================================
--- trunk/src/sidebar.c 2011-04-26 15:07:25 UTC (rev 5741)
+++ trunk/src/sidebar.c 2011-04-26 16:21:47 UTC (rev 5742)
@@ -195,7 +195,10 @@
/* changes the tree view to the given one, trying not to do useless changes */
#define CHANGE_TREE(new_child) \
G_STMT_START { \
- if (child != new_child) \
+ /* only change the tag tree if it's actually not the same (to avoid flickering) and if
+ * it's the one of the current document (to avoid problems when e.g. reloading
+ * configuration files */ \
+ if (child != new_child && doc == document_get_current()) \
{ \
if (child) \
gtk_container_remove(GTK_CONTAINER(tag_window), child); \
@@ -213,8 +216,6 @@
return;
}
- doc->priv->tag_list_update_needed = FALSE;
-
if (update)
{ /* updating the tag list in the left tag window */
if (doc->priv->tag_tree == NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5739
http://geany.svn.sourceforge.net/geany/?rev=5739&view=rev
Author: colombanw
Date: 2011-04-26 13:52:43 +0000 (Tue, 26 Apr 2011)
Log Message:
-----------
Update the ChangeLog for my 2011-04-24 changes (oops)
Modified Paths:
--------------
trunk/ChangeLog
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-26 13:52:31 UTC (rev 5738)
+++ trunk/ChangeLog 2011-04-26 13:52:43 UTC (rev 5739)
@@ -13,6 +13,16 @@
<~foo> (oops).
+2011-04-24 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * src/editor.c:
+ Don't update the tag list when the user is typing (patch by Yura
+ Siamashka, thanks).
+ * src/filetypes.c:
+ When copying filetype groups, add keys from both system and user
+ ones, making sure user's ones have precedence over system ones.
+
+
2011-04-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/utils.c, src/utils.h, src/plugindata.h, src/plugins.c,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5738
http://geany.svn.sourceforge.net/geany/?rev=5738&view=rev
Author: colombanw
Date: 2011-04-26 13:52:31 +0000 (Tue, 26 Apr 2011)
Log Message:
-----------
Make sure to update the tag list only for the current document
Fix idle tag list updating not to update the tag list if the current
document isn't the one to update anymore. In this case, mark the
document as needing an update and re-schedule an idle update next time
the document gets the focus.
This fixes updating the tag list after switching documents, which
resulted in displaying the wrong tag list.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/callbacks.c
trunk/src/document.c
trunk/src/document.h
trunk/src/documentprivate.h
trunk/src/editor.c
trunk/src/sidebar.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/ChangeLog 2011-04-26 13:52:31 UTC (rev 5738)
@@ -1,3 +1,11 @@
+2011-04-26 Colomban Wendling <colomban(at)geany(dot)org>
+
+ * src/callbacks.c, src/document.c, src/document.h,
+ src/documentprivate.h, src/editor.c, src/sidebar.c:
+ Make sure to update the tag list only for the current document,
+ avoiding idle updates to show the tag list for the wrong document.
+
+
2011-04-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/utils.c:
Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/callbacks.c 2011-04-26 13:52:31 UTC (rev 5738)
@@ -709,6 +709,8 @@
ui_update_popup_reundo_items(doc);
ui_document_show_hide(doc); /* update the document menu */
build_menu_update(doc);
+ if (doc->priv->tag_list_update_needed)
+ document_update_tag_list_in_idle(doc);
sidebar_update_tag_list(doc, FALSE);
/* We delay the check to avoid weird fast, unintended switching of notebook pages when
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/document.c 2011-04-26 13:52:31 UTC (rev 5738)
@@ -395,6 +395,8 @@
priv->undo_actions = NULL;
priv->redo_actions = NULL;
priv->line_count = 0;
+ priv->tag_list_update_source = 0;
+ priv->tag_list_update_needed = FALSE;
#if ! defined(USE_GIO_FILEMON)
priv->last_check = time(NULL);
#endif
@@ -2324,6 +2326,38 @@
}
+static gboolean on_document_update_tag_list_idle(gpointer data)
+{
+ GeanyDocument *doc = data;
+
+ if (! DOC_VALID(doc))
+ return FALSE;
+
+ if (! main_status.quitting)
+ {
+ if (doc == document_get_current ())
+ document_update_tag_list(doc, TRUE);
+ else
+ doc->priv->tag_list_update_needed = TRUE;
+ }
+
+ doc->priv->tag_list_update_source = 0;
+ return FALSE;
+}
+
+
+void document_update_tag_list_in_idle(GeanyDocument *doc)
+{
+ if (editor_prefs.autocompletion_update_freq <= 0 || ! filetype_has_tags(doc->file_type))
+ return;
+
+ if (doc->priv->tag_list_update_source != 0)
+ g_source_remove(doc->priv->tag_list_update_source);
+ doc->priv->tag_list_update_source = g_timeout_add_full(G_PRIORITY_LOW,
+ editor_prefs.autocompletion_update_freq, on_document_update_tag_list_idle, doc, NULL);
+}
+
+
/* Caches the list of project typenames, as a space separated GString.
* Returns: TRUE if typenames have changed.
* (*types) is set to the list of typenames, or NULL if there are none. */
Modified: trunk/src/document.h
===================================================================
--- trunk/src/document.h 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/document.h 2011-04-26 13:52:31 UTC (rev 5738)
@@ -231,6 +231,8 @@
void document_update_tag_list(GeanyDocument *doc, gboolean update);
+void document_update_tag_list_in_idle(GeanyDocument *doc);
+
void document_set_encoding(GeanyDocument *doc, const gchar *new_encoding);
gboolean document_check_disk_status(GeanyDocument *doc, gboolean force);
Modified: trunk/src/documentprivate.h
===================================================================
--- trunk/src/documentprivate.h 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/documentprivate.h 2011-04-26 13:52:31 UTC (rev 5738)
@@ -84,6 +84,10 @@
time_t last_check;
/* Modification time of the document on disk, only used when legacy file monitoring is used. */
time_t mtime;
+ /* ID of the idle callback updating the tag list */
+ guint tag_list_update_source;
+ /* whether there is a tag list update we haven't had a chance to honor yet */
+ gboolean tag_list_update_needed;
}
GeanyDocumentPrivate;
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/editor.c 2011-04-26 13:52:31 UTC (rev 5738)
@@ -85,9 +85,6 @@
/* holds word under the mouse or keyboard cursor */
static gchar current_word[GEANY_MAX_WORD_LENGTH];
-/* whether there is a tag list update pending */
-static guint document_tags_update_source = 0;
-
/* Initialised in keyfile.c. */
GeanyEditorPrefs editor_prefs;
@@ -1001,27 +998,6 @@
}
-static gboolean on_document_update_tags_idle(gpointer data)
-{
- GeanyDocument *doc = data;
-
- if (!main_status.quitting && DOC_VALID(doc))
- document_update_tag_list(doc, TRUE);
-
- document_tags_update_source = 0;
- return FALSE;
-}
-
-
-static void request_tag_list_update(GeanyDocument *doc)
-{
- if (document_tags_update_source)
- g_source_remove(document_tags_update_source);
- document_tags_update_source = g_timeout_add_full(G_PRIORITY_LOW,
- editor_prefs.autocompletion_update_freq, on_document_update_tags_idle, doc, NULL);
-}
-
-
static gboolean on_editor_notify(G_GNUC_UNUSED GObject *object, GeanyEditor *editor,
SCNotification *nt, G_GNUC_UNUSED gpointer data)
{
@@ -1083,11 +1059,9 @@
/* handle special fold cases, e.g. #1923350 */
fold_changed(sci, nt->line, nt->foldLevelNow, nt->foldLevelPrev);
}
- if (editor_prefs.autocompletion_update_freq > 0 &&
- (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT)) &&
- filetype_has_tags(doc->file_type))
+ if (nt->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT))
{
- request_tag_list_update(doc);
+ document_update_tag_list_in_idle(doc);
}
break;
Modified: trunk/src/sidebar.c
===================================================================
--- trunk/src/sidebar.c 2011-04-25 16:23:58 UTC (rev 5737)
+++ trunk/src/sidebar.c 2011-04-26 13:52:31 UTC (rev 5738)
@@ -213,6 +213,8 @@
return;
}
+ doc->priv->tag_list_update_needed = FALSE;
+
if (update)
{ /* updating the tag list in the left tag window */
if (doc->priv->tag_tree == NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 5735
http://geany.svn.sourceforge.net/geany/?rev=5735&view=rev
Author: colombanw
Date: 2011-04-24 15:30:20 +0000 (Sun, 24 Apr 2011)
Log Message:
-----------
Don't update the tag list when the user is typing
Reset the pending update delay when we get a Scintilla change not to
reparse the tags when the user is actively typing.
This should not be a problem since the user is unlikely to care about
the tags being updated if he's actively typing, and should avoid
annoying delays when actively typing inside very large files.
Patch by Yura Siamashka, thanks.
Modified Paths:
--------------
trunk/src/editor.c
Modified: trunk/src/editor.c
===================================================================
--- trunk/src/editor.c 2011-04-23 12:18:32 UTC (rev 5734)
+++ trunk/src/editor.c 2011-04-24 15:30:20 UTC (rev 5735)
@@ -86,7 +86,7 @@
static gchar current_word[GEANY_MAX_WORD_LENGTH];
/* whether there is a tag list update pending */
-static gboolean document_tags_update_pending = FALSE;
+static guint document_tags_update_source = 0;
/* Initialised in keyfile.c. */
GeanyEditorPrefs editor_prefs;
@@ -1008,19 +1008,17 @@
if (!main_status.quitting && DOC_VALID(doc))
document_update_tag_list(doc, TRUE);
- document_tags_update_pending = FALSE;
+ document_tags_update_source = 0;
return FALSE;
}
static void request_tag_list_update(GeanyDocument *doc)
{
- if (!document_tags_update_pending)
- {
- document_tags_update_pending = TRUE;
- g_timeout_add_full(G_PRIORITY_LOW, editor_prefs.autocompletion_update_freq,
- on_document_update_tags_idle, doc, NULL);
- }
+ if (document_tags_update_source)
+ g_source_remove(document_tags_update_source);
+ document_tags_update_source = g_timeout_add_full(G_PRIORITY_LOW,
+ editor_prefs.autocompletion_update_freq, on_document_update_tags_idle, doc, NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.