472 Commits

Author SHA1 Message Date
Jiří Techet
f95656cbe8 Remove makefile.win32 based build system
No more needed using MSYS2.
2016-07-21 13:21:32 +02:00
Jiří Techet
3d2e7d4fca Move TM into src
Move the tag manager implementation to src as it really is part of Geany
sources and start making the ctags directory structure similar to
the universal-ctags one.

In principle, the patch does

mv tagmanager/src src/tagmanager
mv tagmanager/ctags tagmanager/main
mv tagmanager ctags

plus corresponding Makefile.am and configure.ac updates.
2016-07-21 13:08:42 +02:00
Yan Pashkovsky
a5a47da9f2 classbuilder: Use .hpp instead of .h for C++ header file extension
.hpp is a C++-specific extension avoiding any confusion, and better
supported as C++ out of the box by Geany.

Closes #999.
2016-04-30 00:06:51 +02:00
Colomban Wendling
47816339b6 Merge pull request #911 from b4n/deprecations
Deprecations cleanup and improvement
2016-03-01 19:25:53 +01:00
Colomban Wendling
ceca962a4a Merge pull request #547 from techee/locale_utf8
Locale/utf8 fixes
2016-02-28 19:42:34 +01:00
Colomban Wendling
8bce6031b5 Avoid use of deprecated API from core plugins 2016-02-24 23:08:48 +01:00
Thomas Martitz
bbf8e882c2 demoproxy: add a demo proxy showcasing how to create a proxy plugin
This demo proxy does not actually do anything useful. It simply loads
pseudo-plugins from an ini-style file. The point is that there will be a plugin
in the PM dialog for each ini. Each ini-plugin also causes a menu item to be
generated.
2015-10-06 15:40:34 +02:00
Colomban Wendling
280163a244 Merge pull request #469 from kugel-/new_hooks
Plugin loader redesign
2015-08-23 23:50:44 +02:00
Thomas Martitz
58c8144afc plugins: Pass pdata to PluginCallback function by default
If the plugin did not set its own user_data we set it to whatever it set
with geany_plugin_register_full() or geany_plugin_set_data().
This is particularly convinient because PluginCallback is usually statically
allocated, at which point dynamically allocated plugin data doesn't exists yet.
2015-08-23 20:01:41 +02:00
Thomas Martitz
43c58e0fdd plugins: change return codes of geany_load_module() and GeanyPluginFuncs::init
- The return value from geany_load_module is removed (void). It was ignored
  anyway and we have to check separately whether the plugin loaded OK or not
  anyway. If the plugin specific code fails it should simply not call
  geany_plugin_register() (which it should only call iff all other conditions
  are good).

- GeanyPluginFuncs::init() now returns a bool to allow failing initialization.
  Some plugins might want to defer work to their init() (i.e. only do
  it when the plugin was activated by the user), and some of that work can
  possibly fail (e.g. GtkBuilder fails to load .xml).

Note that the GUI integration of the latter is less than ideal but this kind
of GUI/policy work is out of scope for this patch set. Therefore a plugin
failing to init is simply removed from the PM dialog as if it became
incompatible. However, as the code that generates the list does not call init
they will show up again if the PM dialog is re-opened.
2015-08-23 20:01:41 +02:00
Thomas Martitz
8241278472 demoplugin: Adapt demoplugin to the new loader
Demoplugin, while not installed by default, is a nice starting point
and mini-howto. Therefore it should advertise the new loader from the
beginning.
2015-08-23 20:01:41 +02:00
Colomban Wendling
1658babe45 Remove obsolete GTK compatibility code 2015-07-14 15:44:47 +02:00
Colomban Wendling
6c753e591b filebrowser: Use Spawn module to launch the external command
This makes the command syntax consistent with other
Geany ones and more native on Windows.
2015-07-11 22:14:25 +02:00
Colomban Wendling
05f35ed683 Include spawn.h in geanyplugin.h as it has Plugin API bits in it 2015-07-11 22:12:08 +02:00
Jiří Techet
b6f1eb9136 Show tooltip in correct encoding in the file browser
Clearly a typo in the original code.
2015-07-02 18:04:22 +02:00
Thomas Martitz
0b4228b94c win32: change default plugin dir to match Linux.
There is no need to do it differently as Linux here, and it confuses the
autotools based compilation of geany-plugins which installs to libdir/geany
unconditionally.
2015-07-01 23:41:37 +02:00
Colomban Wendling
f427a3a6e1 Merge pull request #455 from techee/filebrowser_icons
Show icons corresponding to MIME types in the file browser plugin
2015-06-18 16:49:37 +02:00
Jiří Techet
358758c9f8 Show icons corresponding to MIME types in the file browser plugin 2015-06-16 15:43:45 +02:00
Jiří Techet
83f261fd64 filebrowser: Add a flag to the tree model to indicate whether en entry is a directory
Used by the subsequent patch which changes "stock-id" to GIcon and
disables row type detection using FILEVIEW_COLUMN_ICON.
2015-04-14 23:49:22 +02:00
Enrico Tröger
a23f4b2d39 Remove deprecated and unnecessary use of GeanyFunctions declaration 2015-04-12 23:11:28 +02:00
Colomban Wendling
f3078ebbc6 Merge branch 'kugel-/linkage-cleanup_rebase-for-merge'
This merges PR#429 with only small history cleanup (no code changes),
and ABI bump.

Closes #355, #358 and #429.
2015-04-10 16:54:30 +02:00
Colomban Wendling
5b9bb1d7b2 Include geanyplugin.h from geanyfunctions.h for compatibility
geanyfunctions.h used to bring all function declarations, and some
plugins depend on this side effect instead of properly including
geanyplugin.h directly.  So, reintroduce the behavior for
compatibility with those plugins.
2015-04-10 16:16:19 +02:00
Colomban Wendling
ede1faca54 Move GeanyFunctions declaration back in plugindata.h
This avoids breaking plugins that don't use geanyplugin.h as they
should but include some random headers.
2015-04-10 16:16:19 +02:00
Thomas Martitz
05f362b3bd Have to include a few more headers for plugins 2015-04-10 16:16:19 +02:00
Colomban Wendling
1cea0b6a79 Merge pull request #411 from techee/shadows
Use consistent shadows across Geany
2015-03-26 22:53:29 +01:00
Jiří Techet
1a36eeaf4d Use consistent shadows across Geany
In principle, any scrolled window should have GTK_SHADOW_IN so the scrollbars
are not above the surface and there is a frame around the scrolled area.

The only exception are the elements of the main window where adding
GTK_SHADOW_IN causes there are too many shadows (or lines in 2D themes)
around the windows and the result isn't nice. So use GTK_SHADOW_NONE
for all main editor scrolled windows. (One additional exception is the
Help->Credits page which is gray and the extra frame doesn't look good.)

Replace frame around VTE with GtkViewport to avoid the extra line around.

Raise the second editor from the splitwindow plugin so it's at the same
level as the main editor.
2015-03-22 15:32:54 +01:00
Colomban Wendling
ae7ecde1df autotools: Fix generating geanyfunctions.h in out-of-tree builds 2015-03-15 15:38:42 +01: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
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
Colomban Wendling
1c1d76721d Fix several tooltips to properly use plain text instead of markup
Most of our tree view tooltips were set from plain text values but
parsed as markup by GTK, which sometimes lead to markup errors, when
the tooltip value contained markup control characters.

This also adds ui_tree_view_set_tooltip_text_column() to the plugin
API so plugins can easily set plain text tooltips from tree views
columns.

Fixes https://sourceforge.net/p/geany/bugs/1091/
2015-02-28 19:15:00 +01:00
Colomban Wendling
e9c9e9a2fa Merge pull request #396 from techee/osx
OS X improvements
2015-02-10 17:12:30 +01:00
Enrico Tröger
7229aa9cff SaveActions: Set file permissions of backup copies to 0600
As discussed in SF bug #125, it might be dangerous to store backup
copies in a publicly accessable directory like /tmp with default
permissions, especially on multi-user systems.
So set the file permissions on non-Windows systems to 0600 by default.
Also improve the documentation of the save Actions plugin to reflect this
change.
2015-01-31 16:11:48 +01:00
Jiří Techet
daecf69c9c Make keybindings_get_modifiers() part of plugin API 2015-01-20 19:33:06 +01:00
Jiří Techet
508216b7b4 Use the open command to open a directory in Finder on OS X 2015-01-20 19:33:06 +01:00
Colomban Wendling
14f1468f78 Merge pull request #377 from b4n/autotools-mingw-cross
Autotools: Fix MinGW cross-compilation
2015-01-20 16:09:49 +01:00
Colomban Wendling
700c05e413 Autotools: Build plugins with Libtool on MinGW too 2015-01-20 16:04:54 +01:00
Colomban Wendling
87331093a9 Merge pull request #361 from techee/prj_write
Add project_write_config() to force project file rewrite
2014-12-11 00:07:41 +01:00
Colomban Wendling
8c77accfd0 Merge PR#356 from 'b4n/techee/tm'
Huge TagManager improvements
2014-11-08 19:37:20 +01:00
Jiří Techet
a95fc1a994 Don't expose the source file update function to plugins 2014-11-05 21:50:07 +01:00
Jiří Techet
71cc1ecb20 Cleaner and safer TMWorkspace API
With the previous TMWorkspace API it was possible to make the workspace
inconsistent by e.g. removing source files and forgetting to update
workspace. This could lead to non-obvious and not immediately visible
crashes.

The new set of the public (but also Geany private) API calls always
updates the workspace accordingly and neither of the calls can lead
to an inconsistent state of the workspace.

In addition, perform some minor cleanups and simplifications - unify
parsing from buffer and from file, support "parsing" of 0-sized buffers
and improve documentation.
2014-11-02 11:39:57 +01:00
Jiří Techet
0285ec28a5 Move tm_source_file_update() to tm_workspace.c
The placement of this function in tm_source_file is not right - by moving
it to the workspace we can make the source file unaware of the existence
of the workspace (no inclusion of tm_workspace.h in tm_source_file any
more). Also change tm_source_file_new() so it doesn't offer the source file
update.

After this change
* TMWorkspace knows TMSourceFile and TMTag
* TMSourceFile knows TMTag
* TMTag knows TMSourceFile
2014-10-30 22:08:17 +01:00
Nick Treleaven
36c155cbe8 Make File Browser use explorer as default open command on Windows 2014-10-26 15:06:16 +00:00
Jiří Techet
233ca08e88 Add project_write_config() to force project file rewrite
Since plugins don't have direct access to the project file,
only through the project-save signal, they need some way to emit this
signal when saving their preferences outside the project dialog,
which is what this function does.
2014-10-25 22:30:54 +02:00
Jiří Techet
8c25ff871c Make tm_workspace_update() public 2014-10-18 21:40:10 +02:00
Jiří Techet
26587454b0 Remove TmWorkObject and all the OO related stuff
In addition, rename all functions, parameters, comments etc. mentioning
work_object and remove unnecessary parameters of various functions.
Delete dead code paths.

Also move common functions like tm_get_real_path() from tm_work_object to
tm_source_file.
2014-10-18 21:40:10 +02:00
Nick Treleaven
9d669a72f7 API: Rename document_reload_file -> document_reload_force
New name is clearer against document_reload_prompt.
Add deprecated alias.
2014-09-25 11:45:49 +01:00
Nick Treleaven
18181c2e90 Support pseudo-unique IDs for documents
Add GeanyDocument::id, document_find_by_id() to plugin API.

This also fixes clicking on a Messages item whose document has been
closed and reused. Now the click will be ignored instead of jumping to
an unexpected line in the new document.
2014-08-19 15:40:05 +01: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
Frank Lanitz
f205c97362 Update open string on filebrowser plugin to make clearer, that the file will be opened in Geany 2014-05-01 00:35:16 +02:00