24 Commits

Author SHA1 Message Date
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
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
Colomban Wendling
7c348e6847 Fix "vergeany" -> "version" typo in some license headers
Honestly, WTF?
2011-12-26 19:16:36 +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
Colomban Wendling
9830d5616c Drop another wrapper for GTK 2.12 tooltips
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5845 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 21:01:42 +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
Enrico Tröger
3cf1f7aaac Explicitly check for the type when iterating the action's proxies. For some reason on Windows, a GtkImageMenuItem proxy is created.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4922 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-16 17:43:35 +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
Nick Treleaven
9bb37bd6de Cache G_TYPE_INSTANCE_GET_PRIVATE() result when initializing an
object for efficiency.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4798 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-01 15:57:19 +00:00
Enrico Tröger
7ccd9dd46b Partly revert last commit:
Unref the new files toolbar menu when freeing templates as it was done before but unref it *after* the menu has been removed from the GeanyMenuButtonAction.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4652 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-07 18:19:25 +00:00
Enrico Tröger
4dfab4f7ee Unref the new files toolbar menu when setting a new menu to fix possible crashes when reloading configuration.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4643 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-02-06 17:24:43 +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
add6d45da2 Use separate tooltips for toolbar menu buttons and their attached drop-down arrows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4436 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-22 18:25:09 +00:00
Nick Treleaven
64942f3596 Try to fix Gtk warning when using Tools->Reload Configuration.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4434 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-19 13:29:30 +00:00
Enrico Tröger
d01a8f41d1 Only set the menu of the button if a non-empty GtkMenu is passed to geany_menu_button_action_set_menu() so the menu arrow keeps insensitive.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4414 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-09 19:13:45 +00:00
Nick Treleaven
02fabf16c2 Only use one 'New with template' submenu - reparent as needed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4279 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-10-01 14:40:42 +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
a95a59a42f Remove all G_LIKELY macros inside g_return_if_fail() statements as this is redundant.
Remove many other G_LIKELY/G_UNLIKELY macros which doesn't make much sense to keep the code more readable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-15 22:47:33 +00:00
Enrico Tröger
a9dc990049 Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3687 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-05 21:07:40 +00:00
Enrico Tröger
4daa599478 Use the G_DEFINE_TYPE() macro to generate the *_get_type() code.
Remove useless geany_object_finalize() function.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3549 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-05 19:04:54 +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
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