Enrico Tröger
c636728975
Fix several compiler warnings and build errors (patch by Daniel Richard G., thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3460 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-11 18:29:39 +00:00
Enrico Tröger
153544a80e
Add utils_is_remote_path().
...
Add private field 'is_remote' to GeanyDocument to indicate whether an opened file is locally accessed or via gvfs-fuse.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3457 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-09 18:22:07 +00:00
Enrico Tröger
2c90b52dcd
Plug a small memleak.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3456 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-09 18:21: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
Nick Treleaven
077270c647
Remove geanyobject.h includes.
...
Use GObject instead of unused GeanyObject argument.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3439 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-03 13:03:42 +00:00
Enrico Tröger
cc7b058653
Only stat() files after saving for the timestamp when file_prefs.disk_check_timeout is set (to greater 0).
...
Call realpath() on files only when opening or changing the filename but not on every save.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3412 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-21 20:09:08 +00:00
Enrico Tröger
9e25c43487
Move implementation of lookup_widget() into ui_lookup_widget().
...
Change uses of lookup_widget() to ui_lookup_widget().
Remove now unneeded support.c.
Use GLib gettext macros in support.h instead of own ones.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3402 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 21:21:53 +00:00
Enrico Tröger
aceb1aa703
Remove remaining uses of doc->editor and use GeanyEditor directly.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3401 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-18 19:23:32 +00:00
Enrico Tröger
44b7d27b50
Add "editor-notify" to the plugin API.
...
This signal is emitted whenever something in an editor widget changes, e.g. a character was typed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3391 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-17 16:00:18 +00:00
Nick Treleaven
9fb349fcd2
Fix showing tooltips for notebook tab labels (oops).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3343 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-08 12:59:13 +00:00
Enrico Tröger
72d6493932
Don't mark console messages as translatable.
...
Add two comments for translators.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3315 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 15:56:54 +00:00
Nick Treleaven
5763dfbe2d
Add document_index(), filetypes_index() array accessor functions to
...
the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3310 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-03 18:03:54 +00:00
Nick Treleaven
ffffc759b1
Remove now-unnecessary checks for geany_object != NULL.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3266 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 17:33:35 +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
Enrico Tröger
ffc9c924b0
Fix empty tab labels for new files and cleanup.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3249 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 20:13:50 +00:00
Enrico Tröger
ac52e42417
Show the full filename of a document as tooltip on the tab labels.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3248 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 20:13:29 +00:00
Enrico Tröger
d1b5ace11c
Replace uses of g_strcasecmp() with our own implementation, utils_str_casecmp().
...
Add utils_str_casecmp() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3210 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-11 19:18:51 +00:00
Enrico Tröger
99860e187a
Add support for updating tags from a memory buffer (code merged from Anjuta).
...
This still doesn't work and is currently disabled. It would only work for a few filetypes like C, Fortran and JavaScript.
The current implementation is still buggy, e.g. function signature parsing is broken.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3184 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-07 14:37:17 +00:00
Enrico Tröger
631eb07c27
Handle UTF16/32 encoded files without a BOM better and allow them to opened ( #2155573 , patch by Jason Oster, thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3156 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-26 14:16:09 +00:00
Enrico Tröger
25a9d1c0e9
Issue a warning message when closing document fails.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3150 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-25 18:55:51 +00:00
Nick Treleaven
0117b3e5b2
Apply patch from Jason Oster to auto-update the line margin width as
...
lines are added (thanks; #2129157 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3021 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-29 12:44:31 +00:00
Nick Treleaven
46cae47182
Use GeanyDocumentPrivate instead of using inheritance for non-public
...
fields (this was unnecessary and meant using ugly casts).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3010 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-26 17:28:50 +00:00
Enrico Tröger
83d6c2e8e2
Fix using direct Scintilla access in document.c and callbacks.
...
Add wrapper functions instead.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3000 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-25 18:29:53 +00:00
Enrico Tröger
a032d6a660
Unify the API in editor.c, all public functions now take a GeanyEditor* object.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2998 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-25 18:28:37 +00:00
Enrico Tröger
437fafd46e
Move document_apply_update_prefs() in editor.c.
...
Refactor get_indent_guides_from_lexer() from sciwrappers.c in editor_set_indentation_guides().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2979 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-21 16:43:45 +00:00
Nick Treleaven
5dde790601
Add 'Tab key indents' pref, which replaces hidden pref
...
'use_tab_to_indent'; it's now on by default.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2971 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-18 12:43:41 +00:00
Nick Treleaven
d625394615
Apply patch (with minor changes) from Jason Oster to improve showing
...
brace indent guides on empty lines when appropriate (thanks,
#2105982 ).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2958 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-17 12:36:04 +00:00
Nick Treleaven
03f0700c23
Add plugin signal "document-close", sent just before a document is
...
closed.
(Merged from split-window-plugin branch).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2953 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-16 15:47:26 +00:00
Enrico Tröger
fdd6ce4f49
Partial update of the German translation.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2922 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-01 14:50:26 +00:00
Enrico Tröger
266cbed6ff
Add 'Stop scroll at last line' editor pref (patch by Timothy Boronczyk, thanks).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2918 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-01 11:18:06 +00:00
Nick Treleaven
d43cd0ee2a
Add editor_destroy() to dispose of a GeanyEditor struct (in future
...
we may want to do more than just free it).
Fix editor.h dox description to be more informative for the API
(and move dox from editor.h to editor.c).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2901 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-25 15:44:51 +00:00
Nick Treleaven
8126ee2098
Detect 'Tabs and Spaces' indent mode on finding one or more hard
...
tabs before a soft tab at the start of several lines, and also when
the first indent symbol count is not mainly tabs or mainly spaces.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2900 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-19 14:55:56 +00:00
Nick Treleaven
e05b225632
Don't warn about a missing file on disk more than once (otherwise
...
somtimes it's too difficult to close the file before getting the
prompt).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2899 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-19 11:45:07 +00:00
Nick Treleaven
fb82e51d64
Support detecting 'Tabs and Spaces' indent mode when opening a file.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2894 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-18 15:58:36 +00:00
Nick Treleaven
d3fbdf278b
Fix build; currently auto-indentation doesn't support inserting tabs
...
and spaces, only spaces. Also Tabs & Spaces cannot be detected yet
when opening files. Default file templates still only use tabs.
Add editor_get_indent_prefs() which should be used to get the right
settings for a document/editor instead of reading any default prefs.
This could also support project/filetype indentation prefs quite
easily.
Don't change per-document auto-indent setting after changing default
auto-indentation type.
Remove ui_radio_menu_item_*(), not good to use as they depended on
the order of widget creation, so don't work well with Glade. Use
RadioPrefEntry array instead.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-tab-width@2853 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-04 14:07:49 +00:00
Nick Treleaven
82399858ee
Add more dox explaining how to use documents_array (moved from
...
document.h, to minimise rebuilding after adding dox).
Remove some mentions of document indexes in document.c comments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2812 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-24 15:17:55 +00:00
Nick Treleaven
1580203f8a
Rename document_new_file() argument to utf8_filename.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2810 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-24 12:12:47 +00:00
Nick Treleaven
5f18cee90f
Add dox for FiletypeFuncs and some of GeanyFiletype.
...
Rename filetypes_detect_from_file() to
filetypes_detect_from_document().
Rename filetypes_detect_from_filename() to
filetypes_detect_from_file() because it also detects shebang lines.
Remove function prototype comments for filetypes.h (see filetypes.c
or API dox instead).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2805 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-23 14:44:27 +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
Enrico Tröger
3c3edd3e03
Fix compiler warning because of missing cast, oops.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2784 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-15 18:51:19 +00:00
Enrico Tröger
ff43ad1fa7
Enforce focus grabbing when creating new documents ( closes #2018427 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2783 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-15 18:46:17 +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
Enrico Tröger
ed016dc093
Split filetype Fortran into Fortran 77 and Fortran 90.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2777 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-14 18:27:20 +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
Nick Treleaven
82d63e09b0
Make editor_set_font() take a pango-style font string, and use a
...
GeanyEditor pointer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2771 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-11 17:09:01 +00:00
Nick Treleaven
ad6b64647d
Fix segfault in update_type_keywords().
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2769 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-11 14:25:26 +00:00
Nick Treleaven
0ae04ea2f9
Create the doc->editor field in editor_create(). This means any
...
checks for doc->editor->scintilla != NULL will segfault for invalid
documents - check against doc->is_valid or doc->editor != NULL
instead.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2768 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-11 14:11:53 +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
7c71457fb1
Fix building editor.c, using GeanyEditor* instead of GeanyDocument*
...
(most global editor functions still need conversion though).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/editor-struct@2765 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-08 13:53:08 +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