Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 19 Oct 2014 18:18:32 UTC
Commit: 02a773c55c73245b202ae31bab2ea866fbf8da56
https://github.com/geany/geany-plugins/commit/02a773c55c73245b202ae31bab2ea…
Log Message:
-----------
geanyctags: open document automatically only when there is a single result
If there are several results from the ctags search, opening the first document
isn't the best thing to do because it's most probably not the tag we are
searching for. Instead, don't open the document and just write all the
results to the messages window so the user can choose which one to open.
Modified Paths:
--------------
geanyctags/src/geanyctags.c
Modified: geanyctags/src/geanyctags.c
28 lines changed, 20 insertions(+), 8 deletions(-)
===================================================================
@@ -422,6 +422,8 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen
{
GPatternSpec *name_pat;
gchar *name_case;
+ gchar *path = NULL;
+ gint num = 0;
if (case_sensitive)
name_case = g_strdup(name);
@@ -433,25 +435,35 @@ static void find_tags(const gchar *name, gboolean declaration, gboolean case_sen
if (!filter_tag(&entry, name_pat, declaration, case_sensitive))
{
- gchar *path = g_build_filename(prj->base_path, entry.file, NULL);
- GeanyDocument *doc = document_open_file(path, FALSE, NULL, NULL);
- if (doc != NULL)
- {
- navqueue_goto_line(document_get_current(), doc, entry.address.lineNumber);
- gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci));
- }
+ path = g_build_filename(prj->base_path, entry.file, NULL);
show_entry(&entry);
- g_free(path);
+ num++;
}
while (find_next(tf, &entry, match_type))
{
if (!filter_tag(&entry, name_pat, declaration, case_sensitive))
+ {
+ if (!path)
+ path = g_build_filename(prj->base_path, entry.file, NULL);
show_entry(&entry);
+ num++;
+ }
+ }
+
+ if (num == 1)
+ {
+ GeanyDocument *doc = document_open_file(path, FALSE, NULL, NULL);
+ if (doc != NULL)
+ {
+ navqueue_goto_line(document_get_current(), doc, entry.address.lineNumber);
+ gtk_widget_grab_focus(GTK_WIDGET(doc->editor->sci));
+ }
}
g_pattern_spec_free(name_pat);
g_free(name_case);
+ g_free(path);
}
tagsClose(tf);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Sun, 19 Oct 2014 17:46:30 UTC
Commit: e3ef8f0eea7c2827a0586a7d5765edbe8ecbb727
https://github.com/geany/geany-plugins/commit/e3ef8f0eea7c2827a0586a7d5765e…
Log Message:
-----------
geanyctags: correct documentation regarding the location of the tags file
Modified Paths:
--------------
geanyctags/README
Modified: geanyctags/README
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -38,7 +38,8 @@ To generate the list of tags, make sure that
* "File patterns" are specified correctly under Project->Properties
Then, select Project->Generate tags. After this, a file whose name corresponds to
-the project name with the suffix ".tags" is created in the base path of the project.
+the project name with the suffix ".tags" is created in the same directory as the
+project file.
Tag Querying
------------
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger(a)uvena.de>
Committer: Enrico Tröger <enrico.troeger(a)uvena.de>
Date: Sun, 19 Oct 2014 14:56:11 UTC
Commit: 1e234a4f770061d37b97880729857ca4d7af4c4b
https://github.com/geany/geany-plugins/commit/1e234a4f770061d37b97880729857…
Log Message:
-----------
Set a timeout of ten seconds instead of waiting for the default timeout
Ten seconds should be enough for this simple request. The default timeout
is OS-depent and might be much higher so better set a reasonable
value.
Modified Paths:
--------------
updatechecker/src/updatechecker.c
Modified: updatechecker/src/updatechecker.c
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -84,8 +84,10 @@ static void update_check(gint type)
GEANY_VERSION, NULL);
g_message("Checking for updates (querying URL \"%s\")", UPDATE_CHECK_URL);
- soup = soup_session_async_new_with_options(SOUP_SESSION_USER_AGENT,
- user_agent, NULL);
+ soup = soup_session_async_new_with_options(
+ SOUP_SESSION_USER_AGENT, user_agent,
+ SOUP_SESSION_TIMEOUT, 10,
+ NULL);
g_free(user_agent);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).