21 Commits

Author SHA1 Message Date
Jiří Techet
10a28b4191 Protect private definitions by the GEANY_PRIVATE macro in headers
In addition, this patch defines the GEANY_PRIVATE macro for the tag
manager library where it wasn't defined before, removes 2 tag manager
headers from distribution as they are not needed by plugins and
in the tag manager changes the docstrings to ordinary comments for
private definitions.
2014-10-09 20:51:32 +02:00
Matthew Brush
4efcbab332 Include what you use
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
2014-05-21 15:37:19 -07:00
Matthew Brush
6f87aac118 Normalize use of header guards and extern "C" guards
* 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.
2014-05-21 12:18:26 -07:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Matthew Brush
51dc2e9baf Support plugins written in C++
Rename use of C++ `template` keyword in plugin API function argument
and add `G_BEGIN_DECLS` and `G_END_DECLS` to public header files to
make them easier to include in C++ code. TagManager and Scintilla
headers already have these `extern "C"` blocks so they shouldn't
require any modifications.

The Autotools build system already adds in a `dummy.cxx` to hint
Automake into C++ linking to support Scintilla, which is quite
convenient for dynamically loading of C++ plugins at run-time into
the otherwise C-only program. The other build systems seem to also
use the correct linking.
2012-03-30 23:35:10 -07:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02: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
Enrico Tröger
fef3ee8fc5 Shorten the toolbar popup menu, only provide items for Toolbar Preferences and to Hide the toolbar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4818 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-11 21:56:23 +00:00
Enrico Tröger
e28ca32274 Add option 'System Default' for toolbar icon style and size to use the GTK default value.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4817 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-11 21:56:08 +00:00
Nick Treleaven
39a6d76e2a Improve API docs contents page by listing all commonly-used files.
Fix 'Date' appearing twice on the date line.
Don't generate API docs for prefs.h, toolbar.h (unused).
Move some '@file' doc-comments to the .c file.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4772 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-18 13:13:11 +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
baccf0391e Set the correct parent window for the toolbar editor dialog (closes #2913334).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4503 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 20:49:28 +00:00
Nick Treleaven
aa18efe5be Add missing dox for types/files in the API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4365 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-26 12:58:52 +00:00
Enrico Tröger
f217a608ba Show/hide the toolbar without a restart when the setting in the preferences dialog is changed (closes #2824785).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4009 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-21 22:10:42 +00:00
Enrico Tröger
060fc00929 Remove ui_toolbar.xml Configuration Files menu item.
Add a real toolbar editor dialog.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3898 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-25 17:21:45 +00:00
Enrico Tröger
8b5b6287e1 Instantly reload (i.e. rebuild) the toolbar when ui_toolbar.xml is saved within Geany.
Refactor some related code.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3874 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-20 16:51:32 +00:00
Enrico Tröger
560af59610 Add an option to allow appending the toolbar to the main menu bar to save some vertical space.
Allow setting toolbar icon size to very small (menu icon size).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3668 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-29 16:15:35 +00:00
Enrico Tröger
39a6eb455e Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3446 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 18:30:42 +00:00
Enrico Tröger
b5c392d309 Add new stock icon GEANY_STOCK_SAVE_ALL.
Remove code to manually update the size of the 'Save All' toolbar icon and use the GEANY_STOCK_SAVE_ALL stock icon instead.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3329 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-06 11:45:48 +00:00
Enrico Tröger
8ed9710f48 Rewrite of the whole toolbar code. Now it is based on GtkActions and all elements can be added/removed/reordered using a simple XML file.
Add GeanyMenubuttonAction and GeanyEntryAction as GtkAction subclasses to have menu buttons and text entries in the toolbar.
Change the Goto line toolbar item back to a plain text entry again.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3328 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-06 11:10:06 +00:00