54 Commits

Author SHA1 Message Date
Enrico Tröger
e98cf99fb7 Don't follow the path of the document if the document has not an absolute file path.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3568 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-08 19:52:43 +00:00
Enrico Tröger
27530eabe8 Make Menu key and Shift-F10 working on the filebrowser treeview.
Return TRUE if appropriate in the event handlers.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3565 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-08 19:51:31 +00:00
Enrico Tröger
c45ea64eec Add an option to 'follow the path of the current file' in the filebrowser plugin.
Add an option to automatically set the project's base directory when a project is opened/changed (closes #2554027).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3533 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-02-01 18:48:09 +00:00
Enrico Tröger
56a1470bb9 Add utils_string_replace_first() to the plugin API.
Allow entering paths prefixed with '~' in the filebrowser path entry.
Show the full path for files and folders in the filebrowser plugin as tooltips.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3529 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-30 16:12:25 +00:00
Enrico Tröger
a2c01c6637 Use the selection 'changed' signal of the treeview to update the popup menu items and show the popup menu on mouse button press events so right clicking on items will select them first.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3521 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-28 17:22:34 +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
5394a14f4f When using the focus path entry and file list keyboard shortcuts, make sure the filebrowser tab is the current notebook tab in the sidebar (closes #2402290).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3341 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-07 19:12:27 +00:00
Nick Treleaven
73d44c0a79 Update to use geanyfunctions.h.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3317 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-04 17:05:36 +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
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
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
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
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
18ced215d1 Remove deprecated macros and typedefs (except DOC_IDX_*), as some of
them are likely to cause naming conflicts and all plugins will need
updating since 0.14 anyway.
Add geany macro that simply expands to geany_data.
Deprecate app, main_widgets, prefs, project macros, as the geany
macro can be used instead.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2761 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-07 16:16:18 +00:00
Enrico Tröger
1e8d82f46a Note: this breaks the plugin API for msgwin and navqueue functions.
Make NavQueueFuncs and MsgWinFuncs use a GeanyDocument* instead of an integer index.
Adjust plugins to work with these changes.            


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2688 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-12 20:09:57 +00:00
Nick Treleaven
be0d9e8ea7 Note: this breaks the plugin API.
Replace doc_array with documents_array, a pointer array. This is
necessary to avoid breaking the ABI every time a field is added to
GeanyDocument.
Remove deprecated pluginmacros.h documents macro, to avoid a
conflict.
Replace doc_list[] macro with documents[] macro, which returns a
GeanyDocument pointer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 17:00:54 +00:00
Nick Treleaven
e00f73bc5d Note: this breaks the plugin API.
Remove plugin symbol configure().
Add plugin symbol plugin_configure() which is used to tell Geany a
widget to pack into the plugin preferences dialog, and connect a
response callback for when the dialog receives a user decision.
This allows Geany to in future implement a common preferences dialog
for all plugins, without breaking the plugin API/ABI.
Add Apply button for plugin preference dialogs (to indicate plugins
should handle the apply response as well as OK, as a multiple plugin
configuration dialog would want an apply button).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-28 13:05:09 +00:00
Nick Treleaven
a87b2e57b9 Fix plugins to compile with GEANY_DISABLE_DEPRECATED.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2617 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-26 17:24:11 +00:00
Nick Treleaven
8c1c59eecf Deprecate PLUGIN_INFO() in favour of PLUGIN_SET_INFO().
Remove plugin symbol info(), which is replaced by plugin_set_info()
and a new symbol plugin_info. This is so the PluginInfo struct is
zero'd first by Geany, so plugins are still ABI compatible if we
want to add any more fields in the future.
Fail to load a plugin if plugin_info->name is not set.
Remove now unused string.h include from plugindata.h.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2612 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-23 17:08:58 +00:00
Nick Treleaven
398efbd373 Note: this commit breaks the plugin API.
Split widget fields out of GeanyApp into GeanyMainWidgets, so other
data items can be added without breaking the plugin ABI.
Add GeanyData::main_widgets, and macro.
Rename treeview_notebook sidebar_notebook in GeanyMainWidgets.
Move tools_menu from GeanyData to GeanyMainWidgets.
Move statusbar out of GeanyApp (shouldn't be used directly).
Move ignore_callback out of GeanyApp.
Rename sci_goto_line() argument unfold, like sci_goto_pos().
Make utils_goto_file_pos(), utils_goto_line(),
utils_switch_document() into static functions (they are UI-related,
so shouldn't be in utils.c).
Move utils_goto_pos() to editor.c, add mark argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-22 14:41:28 +00:00
Nick Treleaven
d99a4ea675 Note: this breaks the plugin API.
Split GeanyFunctions out of GeanyData so data pointers can be
appended before the function pointer structs without breaking the
ABI.
Rename GeanyFunctions fields with a p_ prefix to avoid name
conflicts.
Add new plugin symbol geany_functions.
Nearly all plugins will now need to declare the following:
'GeanyFunctions *geany_functions;', which is now used by
pluginmacros.h.
Add doxygen examples for geany_data and geany_functions.
Move deprecated document and filetype typedefs to src/plugindata.h,
as plugins aren't required to use pluginmacros.h.
Initialize geany_data by copying a stack struct so the compiler can
check for any missing field initializers.
Rename plugin macro p_encoding to p_encodings to follow the core
function encodings_ prefix.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2599 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-19 12:35:35 +00:00
Nick Treleaven
a6ba330b1d Make right clicking on items not lose the current selection, like
the standard GtkFileChooser.
Add separator before the Clear filter toolbar button.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2592 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:16:03 +00:00
Nick Treleaven
3a12da9daf Note: this commit breaks the plugin API (but is necessary so that in
future the ABI can stay stable when adding preferences).
Split up prefs into interface_prefs, toolbar_prefs, file_prefs,
search_prefs, tool_prefs, template_prefs, and add these to the
plugin API.
Move suppress_search_dialogs and search_use_current_word to
search_prefs, and rename accordingly.
Rename switch_msgwin_pages pref to switch_to_status.
Remove toolbar_ prefix for toolbar_prefs items.
Remove tool_ prefix for tool_prefs items.
Remove template_ prefix for template_prefs items.
Add Geany prefix for EditorPrefs.
Add Geany prefix for SearchPrefs.
Initialize search_prefs to zero in main.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2591 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 12:08:39 +00:00
Enrico Tröger
75e749ceb5 Add file filter text entry (patch by Robert McGinley, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-22 15:14:30 +00:00
Nick Treleaven
958cb93eac Add configurable keybindings for focusing the Path Entry and File
List.
Refactor load_settings() from init().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2444 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-03 16:06:41 +00:00
Nick Treleaven
07d37be882 Rename VERSION_CHECK PLUGIN_VERSION_CHECK, but keep a deprecated
alias so outside plugins still compile.
Update our plugins to use this.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2411 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-26 17:10:18 +00:00
Nick Treleaven
2c19fe8e14 Break down Edit, Editing, Tags, Other keybinding groups into Editor,
Clipboard, Select, Format, Insert groups and rename GEANY_KEYS_*
accordingly.
Group most keybinding callbacks together according to keybinding
group.
Add underscore for GEANY_KEYGROUP_*.
Set main menu widget with keybindings_set_item() - this is still
ignored for now. Popup menu accels are set separately.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2323 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-12 13:37:39 +00:00
Nick Treleaven
ee26ac9254 Change keybindings code to use keybinding groups, each with a
separate enum set, which will make the plugin ABI more stable,
and lay the groundwork for plugin keybindings support.
Note: this breaks the plugin API.
Disable setting menu accelerators (temporary).
Disable Keyboard Shortcuts dialog (temporary).
Disable snippets completion (temporary).
Disable focus commands in the VTE (temporary).
Make Tags group use separate cb_func_tags callback.
Rename keybindings_cmd() to keybindings_send_command().
Add keybindings_lookup_item().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/plugin-keybindings@2297 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-29 19:30:28 +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
7b9ba876c1 Make forgotten strings translatable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2232 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-06 16:02:00 +00:00
Nick Treleaven
cdf447647f Add new macros for plugin API functions that use a 'p_' prefix to
prevent conflicts with other tags whilst keeping the same first word
as core function names, and update plugins to use them.
The old plugin macros are still available, but will be removed
after the next release.
Compiling with -DGEANY_DISABLE_DEPRECATED in CFLAGS will disable
the old macros.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2195 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-28 17:27:39 +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
Nick Treleaven
43890f2045 Use documents->open_files() as it's more efficient when opening
multiple files and existing files are open for filetypes with
typename colouring.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2141 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-02 13:39:53 +00:00
Nick Treleaven
de3d1e3223 Disable popup menu items when there is no selection.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2134 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-28 17:35:58 +00:00
Nick Treleaven
6ea61f1722 Refactor with functions: check_single_selection(),
is_folder_selected(), get_tree_path_filename() and separate menu
item callbacks.
Rename "Open with..." popup item "Open externally" ("..." is usually
used when the user can input more information).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2133 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-28 17:02:07 +00:00
Enrico Tröger
e3e90f3de9 Improve error message when external command could not be executed.
Allow use of external command also for the special ".." item.      


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2091 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-05 13:54:43 +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
Enrico Tröger
01928d453a Add ".." path entry to every directory.
Fix display of double backslash in path entry on Windows.
Add basic path entry auto completion.
Print error message when external command fails to execute.	    


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2087 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-04 13:25:41 +00:00
Enrico Tröger
c27e9b54c6 Add search_show_find_in_files_dialog() to the plugin API.
Make path entry of filebrowser plugin editable.
Add "Open with" and "Find in Files" popup menu items to filebrowser  plugin and add configuration dialog.	    


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2085 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-02 10:52:19 +00:00
Enrico Tröger
42e026fe4b Fix display of double slash in path entry.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2074 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-29 17:56:36 +00:00
Enrico Tröger
2b07283739 Add plugin manager dialog to select plugins to load at startup and to call a plugin configure dialog.
Add configure symbol for plugins which is called by Geany when a configure dialog for the plugin is requested, optionally.
Add author field to plugin info struct.
Add sample configure dialog to the demo plugin.
Fix cleanup code in filebrowser plugin to remove it completely when unloaded.			


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2060 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-20 18:15:46 +00:00
Nick Treleaven
27fafa5ac7 Make 'Set path from document' use the current working directory or
the project base path when no document is open.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2047 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-13 16:41:59 +00:00
Nick Treleaven
6687b67074 Fix popup menu item capitalization according to Gnome HIG.
Add separator menu item to VTE popup menu.
Move VTE Prefs item below Input Methods.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2037 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-08 16:21:46 +00:00
Nick Treleaven
7e704a20ea Don't dereference symlinks.
Make sure current_dir always has a full path.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1990 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-29 17:15:03 +00:00
Enrico Tröger
dd67516ac9 Add macro project for app->project.
Rename macro tm to tagm to avoid conflicts with tm struct of time.h.
Fix a warning about shadowing a global symbol.
Use plugin macros in Export and SVNDiff plugins.	    


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1985 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-28 20:54:25 +00:00
Nick Treleaven
e4a593a4e6 Show icons only in the file browser toolbar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1983 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-26 16:09:00 +00:00
Nick Treleaven
1825a8dd40 Make all plugins distributed with Geany have the same version number
as Geany.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1978 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-26 12:32:23 +00:00