45 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
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
4aff511b01 Remove unnecessary allocation for VTE color settings 2013-12-05 20:16:54 +01:00
Mislav Blažević
15fddad323 Implement terminal background image 2012-12-18 12:19:53 +01: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
59eb0557b6 Add a configurable prefix for commands sent to the shell in the VTE
This adds an hidden VTE preference, send_cmd_prefix, that allows to
define a prefix for the commands Geany sends to the shell in the VTE
like "cd" when following current path.

This can be used for example to prevent some shells (Bash, ZSH, maybe
others) from putting these commands in the history by setting this to
a space.
2011-11-17 03:57:14 +01: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
Nick Treleaven
d65d3adcc4 Fix segfaults when using 'Send Selection to Terminal' and the VTE
is not loaded, and when using Ctrl-A after enabling the 'Load VTE'
pref (patch by Dimitar Zhekov, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5470 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-07 13:02:46 +00:00
Enrico Tröger
67c7f1bbfb Implement 'Select All' for the VTE widget.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5108 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-07-29 18:28:37 +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
2669ad3b1b Add a hidden pref to allow executing text which was sent to the terminal directly, i.e. do not strip trailing newline characters.
Also fix the stripping of trailing newline characters if there was more than one.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4456 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-29 20:59:31 +00:00
Enrico Tröger
59079283f2 Add 'Send Selection to Terminal' command to the Edit->Format menu (initial patch by David Gleich, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3601 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-25 23:28:01 +00:00
Enrico Tröger
c70d6c4338 Some code cleanup and improve comments, no changes in functionality.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3545 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-04 19:52:44 +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
3c35ed1d55 Some cleanup in vte.c.
Add a setting for the VTE to enable/disable a blinking cursor.
This is useful for future VTE versions where the cursor blinks by default which might be not be desirable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3339 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-07 19:11:36 +00:00
Enrico Tröger
bbfd7a1ee8 Revert r2843 because it messed it Ctrl-C/SIGINT in the VTE.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2848 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-01 15:54:21 +00:00
Enrico Tröger
c98c4d099a Make Copy & Paste clipboard keybindings also work for the VTE (closes #2029675).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2843 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-30 18:22:51 +00:00
Nick Treleaven
24aca5a740 Move struct _VteTerminal, VteFunctions from vte.h to vte.c.
Call vte_restart() in vte_keypress() as the code is the same.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2726 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-26 16:14:00 +00:00
Enrico Tröger
b7bfb2743a Replace all C++-style comments with usual C-like multi-line comments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2287 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-27 13:17:29 +00:00
Enrico Tröger
85f73129c0 Apply patch from Daniel Richard G. to fix to fix several compiler warnings, C89 violations and minor code problems (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-20 11:24:23 +00:00
Enrico Tröger
e3201062c6 Update copyright information and change format of email addresses in source files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2150 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-06 18:11:57 +00:00
Enrico Tröger
0d92c102b5 Use project's base dir and run command when running commands in the VTE.
Add VTE preference to skip the generated run script. when running commands in the VTE.
Make vte_cwd() accept also paths not only filenames.	       


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2105 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-17 16:58:26 +00:00
Enrico Tröger
d3994ae07d Prevent execution of commands by Geany if the VTE may contain any text on the prompt (thanks to "Jeff Pohlmeyer for reporting).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2092 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-06 16:38:13 +00:00
Enrico Tröger
083e5057af Let right-clicks select an item.
Don't load unused symbols from library.
Grab focus after right-clicked in the VTE widget.	  


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2088 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-04 15:28:17 +00:00
Nick Treleaven
5b6b03c058 Move and rename the bash shortcuts hidden preference - it's now in
geany.conf, [VTE] section, called 'enable_bash_keys'.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1927 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-02 16:20:44 +00:00
Enrico Tröger
7b61ad934d Updated copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1188 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-14 17:36:42 +00:00
Enrico Tröger
33425f1a5d Added option to execute programs in the VTE instead of executing them in a terminal emulation window (closes #1594456).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1078 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-12-10 21:29:04 +00:00
Nick Treleaven
4c9b41dfe4 Move VTE preferences GUI code to vte.c.
Move on_pref_tools_button_clicked() to prefs.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1027 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-24 11:47:29 +00:00
Enrico Tröger
5321e14d3f Change the current working directory within the VTE also when a new file is saved.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@774 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-30 18:53:45 +00:00
Enrico Tröger
f509afca7e Save all VTE settings in an own VTE section in the configuration file instead of using an unhandy string list.
Added new settings: ignore menu bar accelerator and define the shell which is started within the VTE.
(Code not yet complete, might be buggy, GUI stuff is missing)


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@755 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-22 19:03:38 +00:00
Nick Treleaven
ac3d928453 Remember the VTE current directory
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@746 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-19 15:07:11 +00:00
Enrico Tröger
c308b37049 Added the GTK IM menu items to the VTE popup menu.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@710 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-13 08:45:59 +00:00
Enrico Tröger
086aeb4c4c Added option to disable the VTE follows path feature.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@527 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-02 18:34:03 +00:00
Enrico Tröger
1451d8f72d Change the path in the VTE widget when switching between files according to the path of the current file.
Process the switch_page callback only once.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@508 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-06-29 23:51:32 +00:00
Enrico Tröger
d703c394a6 declared some functions static
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@353 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-05-22 00:19:15 +00:00
Enrico Tröger
c2344d66bb removed some compiler warnings
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@272 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-04-27 17:54:02 +00:00
Enrico Tröger
e68725fc7a included <unistd.h> for BSD compatibility
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@111 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-01-07 18:58:01 +00:00
Enrico Tröger
ef51fc436e included <stdlib.h> to avoid compiler errors
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@98 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-01-03 12:29:50 +00:00
Enrico Tröger
5deab2b6e5 improved usage of config.h and cleaned some header files from unneeded includes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@89 ea778897-0a13-0410-b9d1-a72fbfd435f5
2005-12-29 19:50:50 +00:00
Enrico Tröger
2afef49a5e added popup menu for the VTE widget
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@59 ea778897-0a13-0410-b9d1-a72fbfd435f5
2005-12-16 22:19:51 +00:00
Enrico Tröger
1984a7f661 fixed typo in function declarations
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@46 ea778897-0a13-0410-b9d1-a72fbfd435f5
2005-12-12 01:53:08 +00:00
Enrico Tröger
bd79cecd60 many changes, improving symbol list view, adding color settings for VTE
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@43 ea778897-0a13-0410-b9d1-a72fbfd435f5
2005-12-11 02:16:02 +00:00
Enrico Tröger
a60d6a20bf added support for a virtual terminal emulator widget
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@22 ea778897-0a13-0410-b9d1-a72fbfd435f5
2005-11-27 20:54:28 +00:00