459 Commits

Author SHA1 Message Date
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
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
Colomban Wendling
9f4ef363f2 Html chars: fix translation of category names
Although the strings were properly marked for translation, they weren't
actually translated because they missed run-time replacement.
2014-04-10 14:16:18 +02:00
Colomban Wendling
85af65323b Export: escape file name in case it contains HTML control characters 2014-04-09 18:08:01 +02:00
Colomban Wendling
1032d0fc68 Export: use DOC_FILENAME() instead of re-implementing it manually 2014-04-09 18:07:58 +02:00
Colomban Wendling
527dee7203 Export: fix LaTeX export for more than 2 consecutive '-', '<' or '>'
Fix escaping of '-', '<' and '>' characters to properly handle inputs
with more than 2 consecutive identical characters of this set.
2014-04-09 18:07:48 +02:00
Colomban Wendling
874c822328 Export: don't include unused, random styles
Fix the bounds checking on included styles only to check for inclusion
actually defined styles, not to include random styles based on
uninitialized array indices.
2014-04-09 18:07:30 +02:00
Colomban Wendling
4eb8205f56 Export: don't try to read past the document end
A faulty bound checking resulted in reading a byte past the document
end, which resulted in Scintilla returning byte 0 because the position
was invalid.  By adding this NUL byte to the string used to build the
body, the body was truncated after the last document byte (as C strings
are NUL-terminated), leading to any format structure after it to be
missing from the output.

This broke HTML and LaTeX export if the last line didn't end with a
newline, as the last line's style closing structure were missing.
2014-04-09 18:05:38 +02:00
Steven Valsesia
467f56ae7e Add a new feature: autosave when the editor lose focus
Documented unwanted behavior: pop-up saving.

Closes feature request #683.

Signed-off-by: Steven Valsesia <steven.valsesia@gmail.com>
2014-03-06 14:20:38 +01:00
Nick Treleaven
0998f1c19c Make code more readable by renaming poorly named macros NZV and NVL
Closes #159
2013-08-14 21:54:20 -07:00
Frank Lanitz
9fbe2bc319 splitwindow: Change wording for keybinding to by in sync with tools-menu entries. Should fix #102 2013-08-08 11:43:12 +02:00
Matthew Brush
13ec6ffbea Add new API function plugin_builder_connect_signals() 2013-06-09 15:22:25 -07:00
Colomban Wendling
9652a34ef0 Add ellipsis to menu items requiring further user input
This is a very common paradigm used by GNOME, KDE, MacOSX, Windows,
etc., and following it makes our UI more consistent with these and
easier to use by their users.

https://developer.gnome.org/hig-book/stable/menus-design.html.en#menu-item-type-command

Closes #3613494.
2013-05-19 23:15:38 +02:00
Adam Dingle
4807ba6ce5 file browser: Fix capitalization in menu item
Closes #3613558.
2013-05-19 23:15:19 +02:00
elextr
1e1032505d Make save actions use something bigger than a pointer for a buffer
At commit 160e5e stamp was changed from a gchar[512] to a gchar*
but the copy loop still used stamp and sizeof(stamp) as the buffer.
Now gchar[512] buffer is used again.
2013-05-02 17:51:12 +10:00