328 Commits

Author SHA1 Message Date
Nick Treleaven
98e127d3bd Generate plugin API header geanyfunctions.h containing macros to
avoid having to type the function pointer names manually.
E.g. plugin_add_toolbar_item(...) is expanded to
p_plugin->add_toolbar_item(...).
Note: For now, building on Windows or with Waf needs genapi.py to be
run manually when adding plugin API functions.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3305 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-02 16:34:32 +00:00
Nick Treleaven
bea7bbab00 Use g_str_has_suffix() instead of utils_str_equal().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3277 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-24 17:57:16 +00:00
Enrico Tröger
160e5e8491 Attempt to make utils_get_date_time() UTF-8 safe and add it to the plugin API.
Fix misnamed str_casecmp() function in the plugin API, sorry.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 17:40:04 +00:00
Nick Treleaven
dc8227ad94 Add function ui_image_menu_item_new() to the plugin API, to easily
create a menu item with a stock image and a custom label.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3261 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 13:34:58 +00:00
Enrico Tröger
81ffd05aa1 dd ui_widget_set_tooltip_text() as a convenience function to easily set tooltips for widgets. It uses gtk_widget_set_tooltip_text() on GTK >= 2.12 otherwise the old tooltips API.Use ui_widget_set_tooltip_text().
Use ui_widget_set_tooltip_text() in the plugins.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3250 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 20:14:42 +00:00
Nick Treleaven
484f1ea9ab Update utils_free_pointers().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3246 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 17:24:10 +00:00
Enrico Tröger
d7caf0f9c0 Follow XDG Base Directory specification and use $XDG_CONFIG_HOME/geany (most often this is ~/.config/geany) as default configuration directory (closes #2166229).
The previous configuration will be moved to the new location if the new directory doesn't exist yet.
Move utils_make_settings_dir() into main.c.
Remove win32_get_appdata_folder() because g_get_user_config_dir() does the same.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3219 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 14:37:47 +00:00
Nick Treleaven
24c7302f9c Add Split Vertically command (patch by Moritz Barsnick, thanks;
#2219553).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3215 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-12 16:21:32 +00:00
Enrico Tröger
0b49cf4449 Use 'utf8' as encoding package in the LaTeX template as it seems it is the most used version for UTF-8 support.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3208 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-11 18:07:35 +00:00
Nick Treleaven
12e29d7ebd Make Version Diff plugin set the indent type for diffs based on the
current file's indent type.
Add editor_set_indent_type() to the API.
Note: uses editor.h plugindata.h include.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3194 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-08 13:32:55 +00:00
Enrico Tröger
bae8ca23d7 Revert last change as it breaks (again) the primary X selection as well as the mouse cursor on the scrollbar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3163 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-30 15:23:27 +00:00
Enrico Tröger
c9fc4a1048 Try to fix a weird bug in reparenting the notebook widget when splitting on Windows. It still occurs on unsplitting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3161 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-29 20:52:22 +00:00
Enrico Tröger
6bc86c4462 Replace gtk_widget_(un)ref() with g_object(un)ref(), patch by Colomban Wendling, thanks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3143 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-22 15:36:45 +00:00
Enrico Tröger
a47d72432c Include "support.h" for I18N support instead of <glib/gi18n.h> to get strings translated with GLib 2.18+.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3112 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-18 10:54:49 +00:00
Nick Treleaven
1096ec427c Fix mixed indentation (prevents vcdiff.c being detected as T/S).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3096 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-15 12:24:48 +00:00
Nick Treleaven
51d28d688d Use ui_add_document_sensitive().
Use PLUGIN_VERSION_CHECK(GEANY_API_VERSION) for internal plugins,
except the Demo plugin (as an example).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3085 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-14 17:03:44 +00:00
Nick Treleaven
d8d727752e - API changes:
Replace p_ui->get_toolbar_insert_position() with
p_plugin->add_toolbar_item(), which also adds a separator when the
first item is added.
Add 'GeanyPlugin *geany_plugin' plugin symbol, partly to replace
plugin_info (now deprecated), mainly to identify a plugin and hold
private implementation fields for plugin utility functions.
(plugin_info will be removed after the 0.15 release.)
- Code changes:
Add ui_auto_separator_add_ref() to hide separator-like widgets when
their visible group elements are hidden or destroyed.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3074 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-13 12:38:32 +00:00
Enrico Tröger
5b772ef629 InstantSave: when opening new files from template, use the template's filetype, otherwise fall back to configured default filetype.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3072 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-12 17:51:56 +00:00
Nick Treleaven
76708ae327 Fix only updating filename label after saving the relevant document.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3059 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-08 11:38:40 +00:00
Enrico Tröger
9aa5ba41c7 Plug some memory leaks due to some missing g_object_unref's.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3056 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 18:51:50 +00:00
Nick Treleaven
c430b7e57a Add filename label.
Fix Gtk warning when resplitting.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3055 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 17:31:17 +00:00
Nick Treleaven
8c2a6ed157 Refactor with set_editor().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3054 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 17:12:33 +00:00
Nick Treleaven
73c73a6bcf Fix segfault when clicking on split window after the original
document has been closed and the view has been refreshed to another
document.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3053 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 15:19:37 +00:00
Nick Treleaven
c47a0d8ab2 Use EditWindow structure instead of separate global variables.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3052 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 14:50:54 +00:00
Nick Treleaven
21b5fb03f2 Fix file header info.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3050 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 12:03:45 +00:00
Nick Treleaven
7d3adcea45 Add toolbar with Refresh button to sync to the current document, and
an Unsplit button (reuses existing string).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3049 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-07 12:00:29 +00:00
Nick Treleaven
ff85d28238 Fix wrong editor scrollbar mouse cursor and broken middle-click
paste after splitting or unsplitting (fixes #2142186).
Note: this is a workaround for an issue with Scintilla where the
widget (or its parents) can't be removed or reparented to a
non-visible widget.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3044 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-06 16:13:35 +00:00
Nick Treleaven
a9f071e3f5 Remove trailing whitespace.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3043 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-06 15:48:42 +00:00
Enrico Tröger
75d46bff7e Merge InstantSave, AutoSave and BackupCopy plugins into the plugin 'Save Actions'.
Add a section for documentation of internal plugins in the documentation.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3035 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-02 13:37:35 +00:00
Nick Treleaven
186e366348 Add editor_create_widget() to the API; remove editor_create(),
editor_destroy().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2950 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-16 15:21:46 +00:00
Nick Treleaven
e6c807c25b Use SCI_STYLEGET(FONT|SIZE) instead of parsing editor_font.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2947 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-15 16:53:31 +00:00
Nick Treleaven
a0493aa678 Make menu document-sensitive.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2941 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-12 14:12:15 +00:00
Nick Treleaven
0d9f0ea3df Set pane splitter halfway.
Copy cursor position from original editor.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2939 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-11 16:26:34 +00:00
Nick Treleaven
0bf9414532 Unsplit when the source document is closed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2937 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-11 15:06:14 +00:00
Nick Treleaven
906ec0e73b Move menu items to a submenu.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2935 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-10 14:49:16 +00:00
Nick Treleaven
850a558f9c Add Unsplit command.
Clean up menus and split window when unloading plugin.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2934 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-10 14:29:16 +00:00
Nick Treleaven
9f8f2c7b28 Add Split Window plugin (work-in-progress).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2906 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-26 15:58:07 +00:00
Nick Treleaven
c0ee8ae6e6 Fix using correct hard tab width for HTML export, not just LaTeX.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2873 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-11 16:44:19 +00:00
Nick Treleaven
b74eb47577 Add sci_get_tab_width() to the API, and use it to get the correct
display tab width in the Export plugin.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2866 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-08 14:46:31 +00:00
Nick Treleaven
ec1e9de8dc Fix using editor_get_indent_prefs().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-tab-width@2862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-07 15:32:56 +00:00
Nick Treleaven
4faeb8f46f Move utils_reload_configuration() to main.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2803 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-23 11:46:02 +00:00
Enrico Tröger
617cdee77c Encourage single header includes as it is necessary with GTK 2.14+.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2790 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-18 13:56:56 +00:00
Enrico Tröger
8d67117d47 Rename "delete_event" to "delete-event".
Remove some unnecessary GObject casts in g_signal_connect() calls.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2788 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-18 13:40:48 +00:00
Nick Treleaven
43484b8a51 Show '..' item when the current folder is empty (fixes #2015121).
Replace is_top_level_directory() code by checking g_path_skip_root().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2780 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-15 14:50:06 +00:00
Nick Treleaven
000e8fcc9b Merge the editor-struct branch:
Note: this breaks the plugin API for editor-related document fields
and functions.
Split new GeanyEditor struct type from GeanyDocument fields sci,
line_wrapping, auto_indent, scroll_percent, use_tabs, line_breaking.
GeanyEditor::document allows access back to document fields.
Add GeanyDocument::editor field; this is only valid when the
document is valid, and NULL otherwise. This means any checks for
doc->editor->scintilla != NULL will segfault for invalid
documents - check against doc->is_valid or doc->editor != NULL
instead.
Change plugin API EditorFuncs to use GeanyEditor pointers.
Make editor_set_font() take a pango-style font string, and use a
GeanyEditor pointer.
Use GeanyEditor* instead of GeanyDocument* in editor.c (most global
editor functions still need conversion though, but this may be done
gradually or as required).
Move utils_get_current_function() to symbols.c.
Move utils_replace_filename() to document.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2779 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-15 14:29:41 +00:00
Nick Treleaven
7db4bfe493 Rename GeanyEditor::scintilla to GeanyEditor::sci.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2776 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-14 11:13:54 +00:00
Enrico Tröger
4ef9af9c6f Fix some formatting issues.
Add 'static' keyword to generated finalize() function in GTK classes.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2772 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-12 11:46:59 +00:00
Nick Treleaven
e204cc44fb Remove deprecated struct field macros (this fixes building Geany
when GEANY_DISABLE_DEPRECATED is not set, fixes #2014586).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2767 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-10 14:12:09 +00:00
Nick Treleaven
4837030ca1 Fix compilation.
Move utils_get_current_function() to symbols.c.
Move utils_replace_filename() to document.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2766 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 16:30:37 +00:00
Nick Treleaven
8dcfb7e336 Update for doc->editor->scintilla.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2764 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 11:26:09 +00:00