4784 Commits

Author SHA1 Message Date
Jiří Techet
1903b0a9b9 Add a flag indicating the tag tree needs updating
When the Symbols tab isn't shown, symbol tree isn't updated. However,
we should record the cases when update should have been performed
and once the symbols tab is shown, perform update if something changed.

Thanks to this patch we also don't have to always perform symbol tree
update when switching to the Symbols tab but only when something has
actually changed.
2015-05-06 18:48:14 +02:00
Colomban Wendling
80d7aa213c Allow to select None filetype in Open File dialog
Closes #483.
2015-05-03 23:41:32 +02:00
Colomban Wendling
62a8232901 Merge pull request #475 from techee/retval_refresh
Reload tooltip in the symbol tree also on tag update
2015-05-03 22:36:16 +02:00
Jiří Techet
44fec8f751 Prepend values to GtkTreeStore to eliminate quadratic complexity
The tree model nodes consist of GNode structs:

struct GNode {
  gpointer data;
  GNode	  *next;
  GNode	  *prev;
  GNode	  *parent;
  GNode	  *children;
};

where children are a linked list. To append a value, the list has to be
walked to the end and with nodes with many children (which is our case)
this becomes very expensive.

We sort the tree afterwards anyway so it doesn't matter where we insert the
value.
2015-05-03 19:36:26 +02:00
Jiří Techet
8ffd687af7 Don't update the symbol tree when not shown 2015-05-03 19:36:26 +02:00
Jiří Techet
e3e46ed63b Use gtk_tree_store_insert_with_values() to speed-up tree creation
About 30% faster tree creation.
2015-05-03 19:36:26 +02:00
Jiří Techet
35bde6c5ad Reload a tag in the sidebar only when it differs from the existing tag
gtk_tree_store_set() becomes very slow when the tree gets bigger
because internally it calls gtk_tree_store_get_path() which counts
all the entries in a linked list of elements at the same tree level
to get the tree path.

Avoid the call of this function when not needed.
2015-05-03 19:36:26 +02:00
Jiří Techet
5d94d15976 Reload tooltip in the symbol tree also on tag update
Because function return types are not used to determine tag equality,
we need to also update the tooltip of an existing tag otherwise the return
type doesn't get updated when changed.
2015-05-03 19:36:26 +02:00
Jiří Techet
d31c770a3d Tell users how to clear the terminal in the error message
This is not completely obvious - when I first saw the message, I started
pressing backspace which really doesn't help.

Also clarify and shorten the message a bit - in "Could not execute the file
in the VTE because it probably contains a command" it's not clear if it's
the file or VTE which contains the command. Also use "terminal" instead
of "VTE" which is more user-friendly.
2015-04-29 22:23:43 +02:00
Jiří Techet
9f0bfec045 Add "dirty" terminal indication
Right now users are confused when various VTE actions don't work because
there's no indication that the terminal is in the non-clean state.

Visualise "modified" terminal in the same way as modified document - by
a red label in the tab so it's clearer when terminal isn't clean.

Avoid quick red flashes when pressing enter by delaying the color change
a bit.
2015-04-29 22:23:35 +02:00
Colomban Wendling
1d9bb56c4a Fix incorrect safety check in non-regex search code
Only warn if MULTILINE is passed *together* with REGEX, but simply
ignore if it not.
2015-04-21 15:12:44 +02:00
Colomban Wendling
97ab68244c Fix "select-all" to work with any GtkTextView, not only the scribble
This makes the code more generic and allows the "select-all" keybinding
to work in any GtkTextView, e.g. potentially plugin's ones.
2015-04-20 22:24:50 +02:00
pik
4c504c2be2 Reorganize select callback
* select_all now works with splitwindow
* select_all now works with file-browser pane
* menu_select_all now works everywhere select_all hotkey does
2015-04-20 22:16:35 +02:00
pik
c214056ea1 Fix callbacks to scintilla functions to work with splitwindow
* Use Scintilla focus object instead of notebook document to fix
  splitwindow behaviour for cut, copy, paste and delete callbacks.
* move else-if to same line (style)
2015-04-20 22:16:07 +02:00
Thomas Huth
e9f4365a37 Fix typos in comments (discovered with the codespell utility) 2015-04-18 08:25:59 +02:00
Colomban Wendling
a98c9d5084 Merge pull request #468 from techee/link_warning
Compile prefix.c and osx.c only when needed to avoid warnings
2015-04-15 14:01:40 +02:00
Jiří Techet
db4bf54b2f Compile prefix.c and osx.c only when needed to avoid warnings
When mac integration or binary relocation are disabled, the compiled
object file contains no symbols because the guards in the source files
hide all code. On OS X there's a warning during compilation saying:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
file: .libs/libgeany.a(libgeany_la-prefix.o) has no symbols

If these features are disabled, don't compile the corresponding
sources to avoid the warnings.

Interestingly, waf compilation works without warnings - it appears
linking is done through g++ which doesn't produce these warnings.
2015-04-14 22:21:34 +02:00
Matthew Brush
d0a431e071 Remove pre-GTK+ 2.24 preprocessor checks and related code 2015-04-12 18:05:28 -07:00
Matthew Brush
87ee835ef2 Export scintilla_get_type() from libgeany
This is useful for plugins to be able to subclass the ScintillaObject
and use its full GObject features. The Overview plugin is one known
plugin that needs this.

Also update scintilla_changes.patch by running update-scintilla.sh
script with patch application commented-out and generating a reverse
diff using `git -R`, and manually remove `a/` and `b/` prefixes from
the resulting diff so it can be used with update-scintilla.sh script.
2015-04-11 13:35:11 -07:00
Matthew Brush
8bbe58cdf7 Fix a compiler warning about const 2015-04-10 18:52:46 -07:00
Colomban Wendling
f3078ebbc6 Merge branch 'kugel-/linkage-cleanup_rebase-for-merge'
This merges PR#429 with only small history cleanup (no code changes),
and ABI bump.

Closes #355, #358 and #429.
2015-04-10 16:54:30 +02:00
Colomban Wendling
5caf2b3e77 Bump ABI version for new linkage mechanism 2015-04-10 16:52:30 +02:00
Colomban Wendling
ede1faca54 Move GeanyFunctions declaration back in plugindata.h
This avoids breaking plugins that don't use geanyplugin.h as they
should but include some random headers.
2015-04-10 16:16:19 +02:00
Thomas Martitz
11b5c0216f stash_group_add_boolean is an API function, misplaced within GEANY_PRIVATE 2015-04-10 16:16:19 +02:00
Colomban Wendling
b2ba6c84d5 autotools: Cleanup makefile a little 2015-04-10 16:16:19 +02:00
Colomban Wendling
4e02f58847 autotools: Remove useless declaration
There is no need for tricking Automake to use the C++ linker to link
the main executable anymore, this is done for libgeany now.
2015-04-10 16:16:19 +02:00
Colomban Wendling
e61948adbd Fix or remove incorrect comments 2015-04-10 16:16:19 +02:00
Thomas Martitz
dbe910ca5e GEANY_API_SYMBOL for project_write_config() 2015-04-10 16:16:18 +02:00
Colomban Wendling
56b9189a6c Fix generation of signallist.i with BSD sed
4.2BSD sed doesn't understand the `+` quantifier, so use `{1,}`.
2015-04-10 16:16:18 +02:00
Colomban Wendling
c85b846eeb Simplify automated signal connection
Instead of processing a template C source in the build system, generate
a list to be included by the preprocessor.

This simplifies the build system code as it now only generates the list
and doesn't take care of processing the template.  It incidentally
fixes build on systems with 4.2BSD sed (at least OSX and FreeBSD) as it
removes some offending sed code.
2015-04-10 16:16:18 +02:00
Thomas Martitz
11d4bcf7c2 Only use LIBGEANY_CFLAGS on libgeany.
It includes stuff like -fvisibility which isn't appropriate for the main binary.
2015-04-10 16:16:18 +02:00
Thomas Martitz
616cbe3da9 src: Makefile.am cleanup 2015-04-10 16:08:08 +02:00
Colomban Wendling
9eee68b71d Fix exporting Scintilla symbols 2015-04-10 16:08:08 +02:00
Colomban Wendling
9644fb0ae2 Define GEANY_{EXPORT,API}_SYMBOL from the build system
This makes it easier to define it consistently to what the compiler
and platform supports, and avoids having to include a special header
everywhere, which is some kind of a problem for separate libraries
like TagManager and especially Scintilla.

As we only use these macros from the source and not the headers, it
is fine for it to be defined to a configure-time check from the build
system.

Warning: Although Waf and Windows makefiles are updated they are not
         tested an will probably required tuning.
2015-04-10 16:08:08 +02:00
Colomban Wendling
1bed458ab9 Merge pull request #270 from b4n/zephir-filetype
Zephir filetype
2015-04-09 01:06:57 +02:00
Colomban Wendling
11e16eed6f Remove an unused argument 2015-04-02 19:12:13 +02:00
Colomban Wendling
ca02c593e7 Merge pull request #445 from bengtan/erlang-fishman-ctags
Implement Erlang ctags
2015-03-27 14:44:55 +01:00
Colomban Wendling
1cea0b6a79 Merge pull request #411 from techee/shadows
Use consistent shadows across Geany
2015-03-26 22:53:29 +01:00
Jiří Techet
1a36eeaf4d Use consistent shadows across Geany
In principle, any scrolled window should have GTK_SHADOW_IN so the scrollbars
are not above the surface and there is a frame around the scrolled area.

The only exception are the elements of the main window where adding
GTK_SHADOW_IN causes there are too many shadows (or lines in 2D themes)
around the windows and the result isn't nice. So use GTK_SHADOW_NONE
for all main editor scrolled windows. (One additional exception is the
Help->Credits page which is gray and the extra frame doesn't look good.)

Replace frame around VTE with GtkViewport to avoid the extra line around.

Raise the second editor from the splitwindow plugin so it's at the same
level as the main editor.
2015-03-22 15:32:54 +01:00
Colomban Wendling
f35614757b Mark an argument const 2015-03-17 14:09:31 +01:00
Beng Tan
b0c5d221a5 Implement Erlang ctags.
Using erlang.c from fishman/ctags.
2015-03-15 13:41:23 +08:00
Colomban Wendling
2bfd394803 Don't export on_motion_event() callback unnecessarily 2015-03-10 23:17:08 +01:00
Colomban Wendling
bc013ae9fe Rename LIBGEANY_LIBS to LIBGEANY_LDFLAGS and only use it on libgeany.la
The flags in this variables are used to tune the linker behavior on the
final libgeany (currently set the version information), so should only
used on really linked libraries, not Libtool helper libraries.
2015-03-10 23:16:49 +01:00
Colomban Wendling
361bf702e0 Explicitly cast string literals to non-constant pointers 2015-03-10 23:10:06 +01:00
Matthew Brush
bcc7a35c06 Don't export GtkBuilder callbacks anymore
They are connected inside the library now rather than using GModule to
find the symbols. Mark local callback handlers as static since they
aren't global or exported anymore, they should be static. Since they're
static now, all of the forward-declarations of the functions local to
callbacks.c are pointless, so just remove them.
2015-03-10 23:10:06 +01:00
Matthew Brush
1d64d5211f Replace dynamic exports with codegen for GtkBuilder callbacks
This prevents having to export those callbacks and put them in the
global namespace. Also, use inline shell script in Makefile.am instead
of a Python script which should be more portable (by default) and gets
rid of the helper script.
2015-03-10 23:10:06 +01:00
Matthew Brush
eb36500ac4 Improve Autotools build system for libgeany
Checks if the compiler supports -fvisibility and the linker supports
-dynamic-list arguments and use them instead of hardcoding. The new
geany-lib.m4 also accomodates future use of Libtool versioning.
2015-03-10 23:10:06 +01:00
Matthew Brush
d33758da92 Move Geany's core into a library (libgeany)
This will allow plugins to link against the core when accessing API
functions, now that the macro/struct/funcptr stuff is gone.

Also convert the helper libraries into Libtool helper libraries as
linking a shared library against static libraries is (apparently) not
portable.
2015-03-10 23:09:46 +01:00
Matthew Brush
860df27696 Remove struct/macro/funcptr linkage control for plugin API
Add rest of headers needed for declarations of all public API
functions. Add HAVE_PLUGINS define to geanyplugins.h since some headers
need this and it should always be valid for this header.
geanyfunctions.h left for source-level backwards compatibility for
plugins which might `#include` this header directly. I don't know why
they do it, but some Geany-Plugins do this.
2015-03-10 22:06:47 +01:00
Matthew Brush
1e630e6f12 Remove redundant GEANY_EXPORT_SYMBOL usage in callbacks.h
It only needs to be specified in one place for each function.
2015-03-10 22:06:47 +01:00