* If GETTEXT_PACKAGE is not defined (ex. by build system/user) then
define it to NULL. Most GLib gettext-functions allow passing NULL
to use the domain set with textdomain().
* Improve the ngettext() wrapper macro.
* Improve/fix bind_textdomain_codeset() wrapper macro.
* Fix argument in bindtextdomain()
* Cast bind*textdomain*() results with (void) to get rid of compiler
warnings when building without GETTEXT_PACKAGE defined.
This is a mega-commit - because most of it had to be done in one go
otherwise some commits would fail to compile - that attempts to fix a
few problems with Geany's includes as well as various other related
cleanups. After this change it's easier to use includes and there's
little worry about which order things are included in or who includes
what.
Overview of changes:
* Include config.h at the start of each source file if HAVE_CONFIG_H
is defined (and never in headers).
* Go through each source file and make the includes section generally
like this:
- Always config.h first as above
- Then if the file has a header with the same name, include that
- Then include in alphabetical order each other internal/geany header.
- Then include standard headers
- Then include non-standard system headers
- Then include GLib/GTK+ related stuff
* Doing as above makes it easier to find implicit header include
dependencies and it exposed quite a few weird problems with includes
or forward declarations, fix those.
* Make geany.h contain not much besides some defines.
- Add a little header file "app.h" for GeanyApp and move it there
- Move "app" global to new "app.h" file
- Move "ignore_callback" global to "callbacks.h"
- Move "geany_object" global to "geanyobject.h"
* Add an include in "geany.h" for "app.h" since GeanyApp used to be
defined there and some plugins included this header to access
GeanyApp.
* Include "gtkcompat.h" everywhere instead of gtk/gtk.h so that
everywhere sees the same definitions (not a problem in practice AFAIK
so this could be changed back if better that way.
* Remove forward declarations from previous commits as some people
apparently consider this bad style, despite that it reduces inter-
header dependencies.
TODO:
* As always, to test on win32
* As always, to test with not Autotools
* Test plugins better, both builtin and geany-plugins, likely API/ABI bump
* Test with various defines/flags that may change what is included
* win32.[ch] not really touched since I couldn't test
* Always define GEANY_FOO_H to 1 in the header guards
* Always put a G_BEGIN_DECLS/G_END_DECLS guard in every header for
consistency, even private ones where it doesn't matter.
* Always include either <glib.h>, <gtk/gtk.h> or some other header
that will provide G_BEGIN_DECLS before using it. In a lot of headers
that use glib.h and gtk/gtk.h stuff anyway, this resolves an implicit
dependency they had on them being included before that header.
* Always put a comment at the #endif part of the guard so it's
easier to see what it applies to.
* Always use an underscore between the header guard identifier's words
even though the filename doesn't have one.
This is for work on making the files scannable by GObject-Introspection
but is still useful otherwise (even fixes a FIXME in the comments). I
made this by using a simple GNU Make file and trying to compile the
sources each on their own without all the build system infrastructure.
* Add keybindingsprivate.h file to hold private GeanyKeyGroup structure
and remove it from the GEANY_PRIVATE guard in keybindings.h.
* Move private members that were guarded by GEANY_PRIVATE from
GeanyFiletypes to GeanyFiletypesPrivate and remove guarded build.h
include.
* Move private members that were guarded by GEANY_PRIVATE from
GeanyProject to GeanyProjectPrivate.
Also, make the recent redraw fixes depend on the GTK version Scintilla
is running against, rather than built against. This allows for the
same build to work with both GTK < 3.9.2 or >= 3.9.2.
3.8.5 is supposed to fix the unstable file output, hopefully making
further edits generate small diffs, not rearranging the whole file for
no good reason.
Note that this commit may introduce UI problems if the output actually
isn't equivalent, the diff making it nearly impossible to review
manually. Keep an eye open for such problems.
Fix modulo zero error resulting in floating point exception, and then
crash. This was introduced in fd6ce2da11e9f2d20cb96236753662c23feaecb4.
Closes#265.
75e10f49fc8b12b5fefc719e0e15e2dfe43eeda3 broke Japanese translation
because it had been re-generated since the first recent mnemonic
changes, leading for the automatic update in that commit to create
duplicate entries.
There is no need to require the translators to review their translation
for these changes as the mnemonics and wordings are specific to the
language. The update here will only save translators from having to
manually check and and remove the fuzzy marks from those strings.
Using the exact same string avoids duplicate translation, and here only
mnemonic changes were introduced with commit
95306ac8db4fc38ad7ba7e172328cef5117efaf0.
When loading a project and focusing the last document, the UI wouldn't
get properly updated for the displayed file -- because for performance
reasons we disable notebook page switch handlers when loading session
files. Fix this by synthesizing a notebook page switch event when done
loading.
Recent changes to Doxyfile.in added new placeholders the build system
has to replace, and Waf recognized them but failed, not knowing what to
replace them with.