332 Commits

Author SHA1 Message Date
Enrico Tröger
8ed9710f48 Rewrite of the whole toolbar code. Now it is based on GtkActions and all elements can be added/removed/reordered using a simple XML file.
Add GeanyMenubuttonAction and GeanyEntryAction as GtkAction subclasses to have menu buttons and text entries in the toolbar.
Change the Goto line toolbar item back to a plain text entry again.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3328 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-06 11:10:06 +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
492f78c769 Move configuration_read_filetype_extensions() to
filetypes_read_extensions().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3281 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-26 16:09:48 +00:00
Nick Treleaven
899dce26b6 Add 'Tools->Configuration Files' menu with items to open
filetype_extensions.conf and ignore.tags. These files are also
reloaded automatically when saved.
- Code changes:
Make app->configdir a realpath().
Add ui_add_config_file_menu_item().
Add utils_build_path(), similar to g_build_path() but (re)using a
fixed buffer, so the result is never freed.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3279 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-26 13:15:53 +00:00
Nick Treleaven
d05dca5468 Make 'Reload Configuration' command also reload ignore.tags.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3278 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-25 12:09:08 +00:00
Nick Treleaven
e6fa252184 Create geany_object in main.c so core functions can use it even
when plugins are disabled.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3265 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 17:27:16 +00:00
Enrico Tröger
f31899538d Try to fix some problems when opening files with non-Ascii characters on Windows from the command line.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3263 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-21 15:42:26 +00:00
Nick Treleaven
51e4000038 Move symbol list popup menu code to symbols.c.
Add symbols_init().



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3243 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-18 13:29:53 +00:00
Nick Treleaven
44bff7b443 Prompt the user for whether to move the configuration directory or
just quit instead. This is useful if the user is already running an
older binary of Geany and the second instance is newer.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3225 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-14 13:38:59 +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
Enrico Tröger
1c46db7dd6 Add main_locale_init() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3153 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-25 18:56:27 +00:00
Enrico Tröger
242f50ebd9 Fix deprecated usage of g_win32_get_package_installation_directory(), pass NULL as package name.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3151 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-25 18:56:04 +00:00
Nick Treleaven
b0fa2d3e6b Fix warning about ignoring command-line files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3132 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-20 14:52:29 +00:00
Nick Treleaven
79e2142b6c Add description for -P option.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3131 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-20 14:48:21 +00:00
Nick Treleaven
270de6cac6 Support loading a project file in a new instance from the
command-line.
Warn user when ignoring other command-line files when a project file
is the first argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3130 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-20 12:13:27 +00:00
Nick Treleaven
bee27a12d1 Show SVN revision also for geany -v and first status message.
Add main_get_version_string().
Rename get_argv_filename() main_get_argv_filename().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2991 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-24 12:07:22 +00:00
Enrico Tröger
5f51987732 Display SVN revision number in version information if available.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2965 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-17 18:03:52 +00:00
Enrico Tröger
ab7a522ca9 Rename all toolbar widgets for consistent names.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2924 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-08 14:22:39 +00:00
Enrico Tröger
b185501584 Don't force debug mode when compiling with GEANY_DEBUG (this affects only the messages on stdout and stderr). Messages are logged always in the debug window.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2886 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-13 18:44:09 +00:00
Enrico Tröger
de7019ba6b Remove trailing spaces.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2878 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-11 18:20:19 +00:00
Enrico Tröger
459ba625ed Move geany_debug() into log.c.
Use GLib log/print handlers to log messages/warnings into a string for later usage.
Add a debug messages window, accessible through the help menu to easily view debug messages/warnings.
This might replace the extra console window on Windows.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2876 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-11 18:16:35 +00:00
Nick Treleaven
309b853b57 Merge changes from the custom-tab-width branch (closes #1662173).
Thanks to Joerg Desch for explaining how it needs to work.
Note: this breaks the plugin API for indentation editor_prefs.
Add separate Width indent pref (as well as the Tab Width pref).
Add 'Tabs & Spaces' Indent Type radio option pref.
Add 'Tabs and Spaces' Document menu indent option.
Note: Tabs & Spaces cannot be detected (yet) when opening files;
default file templates still only use tabs.
Set 'Detect from file' indent type setting insensitive when Tabs &
Spaces is set.
Don't change per-document auto-indent setting after changing default
auto-indentation type.
- API changes:
Add GeanyIndentPrefs struct from some GeanyEditorPrefs fields.
Replace GeanyIndentPrefs::use_tabs with GeanyIndentType field 'type'.
Add editor_get_indent_prefs() to the API, which should be used to
get the right settings for a document/editor instead of reading
any struct fields. This could also support project/filetype
indentation prefs quite easily.
- Core code changes:
Move toggle_prefs to a function toggle_items_foreach(), which takes
a PREF_DISPLAY or PREF_UPDATE argument. This means the PrefEntry
array can contain runtime fields, so can read pointer contents.
Add pref_item_callbacks array of functions to call;
toggle_items_foreach(), spin_items_foreach(), radio_items_foreach(),
combo_items_foreach().
Update keyfile.c to use foreach-style functions for SettingEntry
arrays, like the new PrefEntry code in prefs.c.
Add get_indent_size_after_line() to replace get_indent() for
clarity, and to fix Tabs & Spaces auto-indentation > basic.
Remove opening-brace indent code from get_indent() as it's now in
get_brace_indent().
Change editor_close_block() to use sci_get_line_indentation() for
clarity.
Make editor_close_block() static.
Add editor_init().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2863 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-07 16:36:06 +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
Enrico Tröger
866f8fbefe Add a preference for the comment toggle mark string("~ " by default).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2825 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-27 18:41:07 +00:00
Nick Treleaven
501d543492 Note: this breaks the plugin API for indentation editor_prefs.
Add GeanyIndentPrefs struct from some GeanyEditorPrefs fields (maybe
this struct will get used elsewhere too).
Add editor_init().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-tab-width@2821 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-25 15:05:27 +00:00
Nick Treleaven
185b56c030 Add doxygen file header for generating MainFuncs API documentation.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2804 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-23 13:48:13 +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
Nick Treleaven
c5fb6b34bc Add new Files pref 'Allow new documents from the command-line'.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2796 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-21 14:28:46 +00:00
Nick Treleaven
7939b900ae Fix filename encoding for new files at startup from the command-line.
Make socket open command support filename:line:column syntax.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2795 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-21 14:12:15 +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
a569c69e33 Move widget array lookups from main.c to ui_utils.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2785 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-17 16:28:16 +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
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
Enrico Tröger
1a1f244cc6 Move code to read snippets configuration to editor.c.
Split editor_snippets_free() from editor_finalize().

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2738 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-30 16:14:55 +00:00
Nick Treleaven
a85c71ee9b Remove document_delay_colourise(), document_colourise_all().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2719 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-20 14:19:57 +00:00
Enrico Tröger
d03f72122a Get rid of GeanyDocument::is_valid, use the index value instead.
Remove DOC_IDX_* macros.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2693 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 15:24:44 +00:00
Enrico Tröger
d3439f8a17 Use document pointer instead of an index to the documents array everywhere in the core code.
Pass a document pointer to the callbacks of all "document-*" signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2692 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 13:35:48 +00:00
Enrico Tröger
5739654633 Windows changes: Install plugins into lib/ not into plugins/. Don't link against libiconv when compiling against GLib 2.14 and above (it's statically linked into GLib). Install Geany's message catalogs into share/locale rather than lib/locale as GTK does since 2.12.2.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2673 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-09 19:29:54 +00:00
Nick Treleaven
9268c9a1dc Replace 2 macros only used locally with const char pointers.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2645 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-05 12:43:10 +00:00
Enrico Tröger
45c62d7e3b Fix slightly wrong preprocessor checks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2636 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-03 16:30:54 +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
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
Enrico Tröger
629fc70a35 Allow loading projects from command line (closes #1961083).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2598 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-18 16:27:08 +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
beb68832b3 Move several editing related functions from document.c to editor.c.
Fix two compiler warnings about non-literal format strings.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2588 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-15 13:43:29 +00:00
Nick Treleaven
f700baa906 Rename old uses of line breaking -> line wrapping. This includes the
keyfile pref, so any users with this enabled will have to reset it.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2563 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-09 14:17:25 +00:00
Nick Treleaven
67316db4c5 Remove GEANY_MAX_FILE_TYPES and replace most uses of it with
filetypes_array->len.
Highlighting and templates now use GEANY_MAX_BUILT_IN_FILETYPES.
Move print_filetypes() out of parse_command_line_options();


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2553 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-07 11:34:38 +00:00
Nick Treleaven
7bffaa3b17 Refactor open_session_file() from configuration_open_files().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/custom-filetypes@2541 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-29 11:30:19 +00:00
Nick Treleaven
baa27abbe9 Remove active_plugins from GeanyApp.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2492 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-16 15:44:29 +00:00
Nick Treleaven
730fc1a35c Refactor handle_cl_filename() from open_cl_files().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2489 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-16 11:41:36 +00:00