45 Commits

Author SHA1 Message Date
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Nick Treleaven
5af4dab5f0 Fix showing project name in sidebar documents
This was broken if the base path ended with a directory separator.
2012-07-06 13:17:54 +01:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Colomban Wendling
ef0b059917 Rewrite symbols tree updating code
Old implementation was not really fitting the updating needs and had a
bug making symbols disappear if they haven't changed but their parent
did (e.g. when a C++ constructor's signature changed).

New implementation does:
1) walk old tree, updating or removing rows;
2) add remaining tags.

It walks less than (new_tags + old_tags + new_tags) in the worst case,
thanks to some hash table-based caching;  and also gets rid of the
"valid" column in the symbols tree, saving a few bytes in memory.

Finally, there is a ~7% performance gain (from 21 to 18ms) upon common
tree updates, sometimes more.
2011-11-21 03:52:42 +01:00
Lex Trotman
4d92e0530b Fix warnings
Fix warnings that appeared with GCC 4.6
js.c:1067:10: warning: variable ‘is_prototype’ set but not used
dialogs.c:173:2: warning: missing initializer
dialogs.c:173:2: warning: (near initialization for ‘value.data’)
sidebar.c:534:17: warning: unused variable ‘doc’
2011-11-06 18:10:56 +11:00
Colomban Wendling
0167f589b3 Small code cleanup
Use foreach_document() in a few places where appropriate and make
some code more consistent.
2011-11-03 19:22:40 +01:00
Nick Treleaven
5f0e46e07e Fix finding paths in the document list on Windows
Finding paths in the tree was not case-insensitive either.
2011-11-01 13:27:00 +00:00
Nick Treleaven
42b3e7212a Fix document list path comparison on Windows
Use case-insensitive matching for project base path and home
directory in document filenames.
2011-10-31 17:08:24 +00:00
Colomban Wendling
af838cda7b Allow to expand or collapse all items from openfiles popup menu
This is useful if one have many open files from different directories
and wants to see the files from only one or another.
2011-10-30 23:11:04 +01:00
Colomban Wendling
36ebb1f2b7 Use canonical macros for stock items rather than plain strings
This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
2011-10-30 22:01:49 +01:00
Colomban Wendling
010be558cd Plug a few memory leaks 2011-10-11 20:20:51 +02:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02:00
Nick Treleaven
1563c625f7 Add document_show_tab().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@6017 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-10-07 16:47:31 +00:00
Colomban Wendling
9fa8cd8bf9 Fix a few GCC warnings
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5856 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-17 22:52:43 +00:00
Colomban Wendling
6380810550 Remove treeview-related pre GTK 2.12 support
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5848 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 23:03:19 +00:00
Colomban Wendling
ebca594c3c Remove GTK version check for setting show_symbol_list_expanders
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5843 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 20:43:17 +00:00
Colomban Wendling
9bdd1663f4 Avoid changing the tag tree if it's not the one of the current document
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5742 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-26 16:21:47 +00:00
Colomban Wendling
ec4a5ea4f9 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.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5738 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-26 13:52:31 +00:00
Colomban Wendling
fb16bf90d4 Fix the sidebar popup menu to popup for the correct selection
Fix the sidebar popup menu to properly use the currently selected item
rather than the previous one.

Also change the hack used for the selection to be updated in the input
handlers (key and mouse button) to call the GtkTreeView's handler
manually rather than doing the actual job in IDLE callbacks for the
TreeView's handler to have run.
This prevents from having several different handlers but removes the
need to work in IDLE time and then possible have a lag, as well as
simplifying the code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5630 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-26 03:12:50 +00:00
Colomban Wendling
87350d7624 Fix wrong constant variable
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5577 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-06 17:08:54 +00:00
Colomban Wendling
57d00f48d0 Update the symbol list rather than clearing and re-building it
The main advantages of not clearing and rebuilding the whole list is
that it doesn't loose the folding and selection (as far as the selected
row(s) still exist after the update, of course), and it reduces
flickering upon update.

The current implementation works in 3-steps:
1) mark all rows as invalid;
2) insert/update the rows, according to the new tag list, marking them
   as valid;
3) remove all rows that are still invalid.
This walks (rows) the first time, (tags*rows) the second and (rows) the
third. This also uses an extra column to store the row's validity.

A (probably) better implementation would be to:
1) walk the current rows, updating them if necessary, or removing them;
2) add the remaining tags that weren't there before.
This is probably faster in theory (and probably also in practice), but
it needs to refactor a lot the code to easily update *or* create a row,
what the current code does not provide.
Basically this is would be a two-pass update, walking (rows*tags) in
the first pass, and only the remaining non-added tags in the second.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5562 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:53:13 +00:00
Colomban Wendling
a1a13e18e2 Don't remove and add the symbols tree view if we re-add the same one
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5561 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:51:32 +00:00
Colomban Wendling
f120554364 Provide a GType for TMTag and use it
It is a boxed type but uses reference counting behind the scene. This
allow for example the tag store to make sure the tags it holds are
always valid.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5560 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-05 22:50:04 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
14daa797d0 Fix auto-displaying of sidebar tab bar when sidebar is reshown.
Only auto-display symbols and documents tabs when showing the
sidebar if there are no plugin tabs.
Don't hide the sidebar on startup if only plugin tabs are visible
(fixes #3101867).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5422 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-22 13:49:38 +00:00
Nick Treleaven
3455a25cf4 Show mimetype icon in sidebar Documents list (patch by Colomban
Wendling, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5330 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-26 17:20:48 +00:00
Nick Treleaven
132a053c0d Make stash_group static (patch by Dimitar Zhekov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5093 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-07 11:50:16 +00:00
Nick Treleaven
1132d0f219 Add sidebar Documents popup menu item 'Find in Files'.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5087 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-05 11:55:44 +00:00
Nick Treleaven
77183d838e Refactor get_doc_parent().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5030 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-17 12:14:48 +00:00
Nick Treleaven
f86deb0a03 Replace /home/user with ~ in the documents list (patch by Jon
Strait, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5028 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-17 12:03:00 +00:00
Enrico Tröger
64a152972a Fix reducing paths to project name in the Documents list (patch by Eugene Arshinov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5003 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-06 17:21:52 +00:00
Enrico Tröger
ff401e2755 Destroy the default symbol list treeview only once (fixes gtk_widget_destroy warning on exit).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4991 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-06-03 15:37:27 +00:00
Enrico Tröger
798fc82a2b Fix project base_path detection if the path has a trailing slash.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4920 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-16 17:43:10 +00:00
Enrico Tröger
93abd91162 Improve sorting of document list items (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4908 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-14 14:46:20 +00:00
Enrico Tröger
8c963d2829 Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:39 +00:00
Enrico Tröger
9761d8057d Properly guard the automatic sidebar notebook tab hiding against older GTK versions
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4841 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-19 20:48:54 +00:00
Enrico Tröger
fd6bf166af Automatically show and hide the sidebar notebook tabs according to the amount of visible pages (patch by Adrian Dimitrov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4839 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-19 20:42:34 +00:00
Nick Treleaven
201b595b51 Rename Stash data types to be independently named from Geany (so
Stash can be reused for other projects).
Rename GeanyPrefGroup to StashGroup.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-18 17:04:17 +00:00
Enrico Tröger
f72f6381df Add and use convenience function ui_is_keyval_enter_or_return() and add it to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4737 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-07 19:33:15 +00:00
Enrico Tröger
995a467901 Fix document_try_focus() to make it work with the sidebar document list as well.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4712 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-28 14:32:38 +00:00
Enrico Tröger
32797c0ebd Make Space on the symbol and document list not focus the editor widget while Enter does (closes #2919444, patch by Can Koy, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4711 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-28 14:30:27 +00:00
Enrico Tröger
6826240858 Add keybindings to switch to the sidebar's Document and Symbol list as well as to the Message Window's current tab (patch by Eugene Arshinov, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4686 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-21 18:06:42 +00:00
Enrico Tröger
7ba4a81181 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Enrico Tröger
036e38f20b Rename "select" variables into "selection" to avoid shadowed names.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4360 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-25 12:21:05 +00:00
Nick Treleaven
caec1ec7c3 Rename treeviews.[hc] -> sidebar.[hc].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4252 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-28 11:16:59 +00:00