8065 Commits

Author SHA1 Message Date
Dimitar Zhekov
faa6cd8614 Clarify that a spawn stdout/stderr cb may modify the passed string 2015-03-16 22:25:54 +02:00
Dimitar Zhekov
dccd421a79 Don't check a spawned command line twice under Unix 2015-03-16 22:23:28 +02:00
Dimitar Zhekov
05415e53b6 Unify the build command spawning
Also, don't check build_spawn_cmd() cmd argument under Unix, since it
may be valid shell command rejected by glib g_shell_parse_argv().
2015-03-16 22:10:30 +02:00
Colomban Wendling
9c829aeb3c make: Fix parsing of empty continuation lines 2015-03-16 14:55:50 +01:00
Colomban Wendling
aae13ed26d Merge pull request #444 from techee/handle
Geany icon improvements
2015-03-16 02:01:58 +01:00
Jiří Techet
243480b83d Regenerate png/ico icons from svg and add the 32x32 size
The 32x32 size can be created by downsampling the 48x48
icon by gtk at runtime but the result will be worse than
doing the same directly from the svg icon (48->32
conversion means downsampling by 1.5 which can introduce
some moire artifacts and loss of information). Since
32x32 are quite commonly used, it makes sense to ship
this icon size with Geany.

The png files have been optimized by pngoptim to remove
metadata and compress the icon better.
2015-03-16 01:49:16 +01:00
Jiří Techet
34f911939c Make the geany icon bottleneck a bit wider
This way the non-highlighted part can still be shown.
2015-03-16 01:49:11 +01:00
Jiří Techet
45a375caeb Fix geany icon handle
The handle of the lamp icon looks strange. While
the image of the lamp itself is taken from top,
the handle looks it's taken from bottom.

Fix this by moving the wide part of the handle
down and moving the "shine" line to copy the
outer edge. Also adjust the handle curves a bit
to connect the lamp in a more natural way.
2015-03-16 01:48:34 +01:00
Colomban Wendling
78a45805f1 autotools: Fix make dist after Scintilla makefile.win32 move
8ebac60901c239a7dc36461a077139595bed12b8 moved the makefile.win32,
so we need to use the new location.
2015-03-15 15:38:47 +01:00
Colomban Wendling
ae7ecde1df autotools: Fix generating geanyfunctions.h in out-of-tree builds 2015-03-15 15:38:42 +01:00
Jiří Techet
fc766eda22 Fix visual problems around the bottle neck
The Light sublayer of the Lamp layer covers the lamp border
partly so it appears cut off. In addition, the Shine sublayer
doesn't follow the border properly. Adjust the curves in both
of these sublayers to fix the problem.
2015-03-15 10:57:00 +01:00
Jiří Techet
2199158b15 Subdivide the icon into layers for better navigation
No visual change.
2015-03-15 10:56:52 +01:00
Beng Tan
9721faff62 Add (and fix) ctags unit tests for Erlang. 2015-03-15 15:55:45 +08:00
Beng Tan
b0c5d221a5 Implement Erlang ctags.
Using erlang.c from fishman/ctags.
2015-03-15 13:41:23 +08:00
Dimitar Zhekov
690cb922be Alter build.c to use the new spawning module
The wrong and misleading "Failed to change the working directory" is
changed to a generic "Invalid working directory".

Under Windows, the build commands are run directly as command lines,
while under Unix, /bin/sh is used - for compatibility, and because
that's probably what a *nix user expects.

The run script is always run as a command line, since it contains it's
own shell, and because that lets us specify %c under Windows. In fact,
%c (or "%c") should probably be the default, since CreateProcess()
runs batch files with the default shell, instead of some our value.

Also changed build_spawn_cmd() and build_run_cmd() to void, since
their return values are not used anywhere.
2015-03-14 21:36:05 +02:00
Colomban Wendling
07aeafab81 autotools: Fix installation directory of plugins on Windows
For some reason we expect the plugins directly inside `$(libdir)` on
Windows instead of `$(libdir)/geany`, so install the plugins there on
Windows.
2015-03-11 02:39:45 +01: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
Colomban Wendling
a264b7ab77 Properly initialize Libtool 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
Matthew Brush
056e7cb4c8 Change to GEANY_EXPORT_SYMBOL for callback functions
This allows them to be dynamically exported when -fvisibility=hidden
is applied.

TODO: remove the CFLAGS hack in configure.ac
2015-03-10 22:06:47 +01:00
Matthew Brush
2f08670763 Mark all plugin API functions to have "default" (public) visibility
Adds a new header `pluginexport.h` to put the macros in, could be
moved into an existing header (support.h?) by I didn't want to drag
a bunch of existing stuff into the source files for this one macro.

TagManager has relative include, this could be fixed by changing the
include directories for it if it's a problem. Mark the Scintilla
functions exported by re-declaring them in sciwrappers.c with the
attribute to avoid changing upstream Scintilla code.
2015-03-10 22:06:47 +01:00
Matthew Brush
a40ab0a4d9 Explicitly list symbols to dynamically export
Uses a Python script to generate a listing used by the linker to
determine which symbols to dynamically export. This provides finer
grained control of which symbols are dynamically exported, limiting
only to the ones needed for GtkBuilder signal connections.

The build system integration could probably be done a little cleaner.
2015-03-10 22:06:18 +01:00
Dimitar Zhekov
ce0fa6ffa1 Add a spawn module for Geany
g_spawn_async_with_pipes() under Windows has various drawbacks:

- There is no g_shell_parse_argv() for windows. It's not hard to write
  one, but the command line recreated by mscvrt may be wrong.
- GLib converts the argument vector to UNICODE. For non-UTF8 arguments,
  the result is often "Invalid string in argument vector at %d: %s:
  Invalid byte sequence in conversion input" (YMMV). Our tools (make,
  grep, gcc, ...) are "ANSI", so converting to UNICODE and then back
  only causes problems.
- For various reasons, GLib uses an intermediate program to start
  children (see gspawn-win32.c), with the side effect that the
  grandchildren output (such as make -> gcc) is not captured.
- With non-blocking pipes, the g_io_add_watch() callbacks are never
  invoked, while with blocking pipes, g_io_channel_read_line() blocks.
- Some smaller problems, explained in spawn.c as inline comments.

The spawn module tries to fix these problems, and to provide easier
APIs, which guarantee that the callbacks will synchronized as expected,
and g_io_channel_read_line() will not be required, since even under
Unix, it may buffer lines of unlimited length.

This initial commit only adds the module source and header files, and
includes it in the various build systems.

You can see PR 274 for a long discussion about the module.
2015-03-10 21:24:42 +02:00
Colomban Wendling
7254bf9664 Merge branch 'scintilla-update-354' 2015-03-08 14:34:04 +01:00
Colomban Wendling
3cf8c3a6be objectivec: Enable escapes in verbatim strings
Enable new Scintlla lexer.cpp.verbatim.strings.allow.escapes lexer
property for ObjectiveC.
2015-03-08 14:31:26 +01:00
Colomban Wendling
8ac86ce423 Update Scintilla to version 3.5.4 2015-03-08 14:30:34 +01:00
Colomban Wendling
e64cb97332 Make the editor tab close buttons smaller on GTK3
Also remove extra padding around the button's image to reduce its size
and try and avoid it expanding the tab's height.

This at least fixes the editor tabs height on Adwaita theme, where they
were 1px taller than normal.
2015-03-06 17:36:15 +01:00
Colomban Wendling
c3d7acfe81 Merge pull request #433 from b4n/statusbar-eol-short-name
Use the short name for EOL mode in the statusbar
2015-03-06 02:45:39 +01:00
Colomban Wendling
93c217aae9 Merge pull request #412 from techee/rules_hint
Disable "rules hint" for the Documents tab
2015-03-06 01:47:42 +01:00
Jiří Techet
8d19ea4c9f Disable "rules hint" for the Documents tab
The "rules hint" property is used to tell the theme for which TreeView
even/odd rows should have a different color. This is typically used for
long rows or rows which need to be visually separated for some reason.

Currently the Documents sidebar view uses it which doesn't make much
sense because the row is short and neither of the other tabs in the sidebar
use it.
2015-03-05 10:21:11 +01:00
Colomban Wendling
e1c35d2dc1 Merge branch 'techee/leaks'
Merges PR #417.
2015-03-04 22:57:02 +01:00
Frank Lanitz
a40acf52b4 Update of German translation 2015-03-04 19:05:05 +01:00
Colomban Wendling
709cbd512b Explicitly initialize some variables for which we use the default value
This does not change anything in practice because static variables are
initialized implicitly as we need them anyway, but this makes things
clearer and more explicit.
2015-03-04 16:39:36 +01:00
Colomban Wendling
e0116ccd9c Merge pull request #418 from b4n/spell-windows-windows
Spell "Windows" as "Windows", not "Win".
2015-03-04 15:58:47 +01:00
Colomban Wendling
888d3dc9dc Use the short name for EOL mode in the statusbar
See discussion in https://github.com/geany/geany/pull/418
2015-03-04 15:57:26 +01:00
Colomban Wendling
96e2635abe Merge pull request #431 from techee/absolute_prjname
Always use absolute path when opening projects from command-line
2015-03-04 15:04:34 +01:00
Jiří Techet
51ce1018cc Always use absolute path when opening projects from command-line
At the moment when geany project is loaded from commandline using
e.g. "geany myproject.geany", the relative path is used by geany
so e.g. Project->Recent Projects shows the relative path instead of
the absolute one (also if the project is already in the list with an absolute
path, additional entry with relative path is created).

Use main_get_argv_filename(), which is already used for ordinary files,
also for opening .geany files.
2015-03-04 14:34:55 +01:00
Colomban Wendling
05e19be0a3 Merge pull request #419 from techee/osx-integration
OS X integration
2015-03-04 14:08:11 +01:00
Colomban Wendling
b032f2e214 Merge pull request #426 from techee/run_script_tmp
Create geany_run_script.sh in the temporary directory instead of the
working directory.
2015-03-04 13:58:02 +01:00
Nick Treleaven
185d4fff93 Merge pull request #430 from techee/fix_warning
Fix compiler warning
2015-03-04 12:40:15 +00:00
Jiří Techet
9df204ab78 Fix compiler warning 2015-03-04 12:47:20 +01:00
Jiří Techet
7fa8b3a695 Backport adaptive scrolling patch from scintilla 2015-03-04 12:40:45 +01:00
Jiří Techet
a9912c3c35 Don't use single menu for "New with template" shared by toolbar and menubar
The current implementation uses single menu for the toolbar and
menubar and reparents it when file menu is shown/hidden.
Connectiong "show"/"hide" signals doesn't work for menu items
on OS X (and I suppose Ubuntu either) so the template submenu is
never shown in the File menu.

The easiest fix seems to be having two identical menus the same
way we have them for recent files.
2015-03-04 12:40:45 +01:00