268 Commits

Author SHA1 Message Date
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
Frank Lanitz
c56653aac9 Change of a typo in singular form of some status messages.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3068 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-10-12 13:07:56 +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
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
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
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
Nick Treleaven
a2cd1c4916 Move 2 search prefs to new Search tab of Preferences dialog.
Add new search pref: 'Use the current file's directory for Find in
Files' (#1930435).
Add PrefEntry struct which is used for an array containing widget
names to lookup; currently only used for 3 search-related
GtkToggleButton prefs.
Add SettingEntry struct which is used for an array containing keyfile
key and group information; currently only used for 3 search-related
gboolean settings.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2724 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-25 11:56:58 +00:00
Nick Treleaven
56e77de794 Bring back GeanyDocument::is_valid field as it is clearer and more
descriptive than using doc->index != -1.
Add deprecated macros DOC_IDX_VALID and DOC_IDX in plugindata.h,
which can make porting outside plugins easier; of course, it is
better to rewrite the code to use document pointers.
Use is_valid instead of the DOC_VALID macro when iterating over
documents_array, as there are never NULL pointers in it.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2704 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-18 14:18:26 +00:00
Nick Treleaven
1e4b1594e5 Minor formatting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2703 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-18 13:37:03 +00:00
Enrico Tröger
57b3fb52b0 Fix wrong and add missing checks.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2697 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-16 18:31:59 +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
1baa9d3159 Remove temporary navqueues_ and msgwins_ functions and adjust depending code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2689 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-12 20:45: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
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
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
c87a82adec Make use of ngettext() for strings with plural forms.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2515 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-04-22 14:44:45 +00:00
Enrico Tröger
99a3d8e3c3 Add preference for not using the current word under the cursor when opening Find dialogs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2389 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-23 16:29:43 +00:00
Enrico Tröger
0d5614a2d4 Use the default values for various tools if they don't exist in the config file instead of using g_find_program_in_path(), patch by Yura Siamashka (thanks).
Fix executable check for grep command.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2331 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 09:33:23 +00:00
Enrico Tröger
5deb55e7ae Oops, don't change font size.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2329 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 08:45:20 +00:00
Enrico Tröger
c4679ead75 Use monospace font for text entry fields in search dialogs and add a notice how to change the used font (#1907117).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2328 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-13 08:37:29 +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
Nick Treleaven
78a063e54b Don't beep when using Replace All in Session unless all open files
have no replacements (fixes #1893796).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2283 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-25 17:27:54 +00:00
Nick Treleaven
3714cf498f Don't scroll the editor view if it is unnecessary when using Find
Next/Previous, Find Selected and when searching from the search bar.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2274 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-22 13:30:16 +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
e4edda0fa2 Allow using Find In Files dialog even if no files are open (closes #1891818).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2250 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-12 12:04:21 +00:00
Nick Treleaven
667126d7f6 Factor out get_search_flags() from Find, Replace dialog response
code.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2199 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-29 16:34:16 +00:00
Nick Treleaven
5994857b42 Allow case sensitive replace when the replace string varies only
in case.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2196 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-29 12:21:02 +00:00
Nick Treleaven
6eceb83d41 Make 'Open Selected File' first try the current file's directory,
falling back to the project base path if no file was found.
Add editor_get_default_selection() from get_default_text() in
search.c, to get the current selection or current word.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2172 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-14 17:30:59 +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
2ef88ff298 Add mnemonics for Find All, Replace All expanders in dialogs.
Fix Find dialog mnemonic conflict _f.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2143 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-02 16:23:32 +00:00
Nick Treleaven
39738f90ca Make Open, Save As dialogs start in project base path (or default
path pref) when the current file has no filename.
Split up widget setup code for dialogs_show_open_file(),
dialogs_show_save_as().
Add initial_dir argument for win32_show_file_dialog().
Add utils_get_default_dir_utf8().
Rename utils_get_current_file_dir() to
utils_get_current_file_dir_utf8().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2122 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-12-21 17:25:58 +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
Nick Treleaven
601dfd69f7 Make msgwin_status_add() only log a message, not display it on the
status bar.
Make ui_set_statusbar() take a log argument for whether to record the
message in the Status window.
(Plugin API functions already do this).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1971 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-24 10:52:48 +00:00
Nick Treleaven
90f19ceb3f Remove unused variable.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1970 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-23 15:23:08 +00:00
Nick Treleaven
601fb23da4 Add foreground colouring to messages items.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1887 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-17 16:33:17 +00:00
Nick Treleaven
ef1399e000 Rename MyApp -> GeanyApp.
Move most GeanyApp fields into:
GeanyPrefs for (most) Preferences dialog fields;
UIPrefs for non-Prefs dialog visual settings;
UIWidgets for less commonly used widgets such as menuitems and
dialogs;
GeanyStatus for various states the application can be in.
Move some GeanyApp fields into EditorPrefs (and one into each of
CommandLineOptions and SidebarTreeviews).
Add plugin API prefs field.
Move disabling build widgets on Windows to build_init().
Make build callbacks static.
Add treeviews_init() to prepare popup menus and open files treeview.
Replace treeviews_find_node() with treeviews_select_openfiles_item().
Make utils_isbrace() and utils_is_opening_brace() take an
'include_angles' argument (to separate from editor_prefs).
Make 'Goto matching brace' keybinding include <> angle brackets.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1815 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-23 11:34:06 +00:00
Nick Treleaven
25e596bf0d Add allocation for NULL-terminated selection ends.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1765 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-30 10:40:09 +00:00
Nick Treleaven
8fe0974d8a Capitalize some dialog titles.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1694 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-12 11:59:13 +00:00
Enrico Tröger
9ff36c9a18 Also change background colour of search bar when using find next/previous after using the search bar.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1692 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-11 17:44:43 +00:00
Enrico Tröger
4d769f61b0 Fix usage of wrong dialog pointer.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1667 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-05 15:44:08 +00:00
Enrico Tröger
6069531e78 Fix focus problem when using the Find dialog.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1663 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-04 17:08:53 +00:00
Enrico Tröger
b737d4b963 Improve many mnemonics in the Search, Find in Files and Replace dialogs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1654 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-06-29 16:01:40 +00:00
Nick Treleaven
9f471c5bec Fix hang with Find All/Usage with regex '^' or '$'.
Fix replacing '^' or '$' regexes.
Use double quotes for search strings.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1650 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-06-28 16:00:29 +00:00
Nick Treleaven
fdaa689bff Rename sci_cb.[hc] editor.[hc].
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1584 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-28 16:07:30 +00:00
Enrico Tröger
085012e2be Oops, forget to commit with r1535.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1541 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-16 17:09:02 +00:00
Nick Treleaven
9570443c7b Use open folder dialog for project base path instead of create folder
dialog (better for choosing existing directories, and can still
create new folders).
Add optional title parameter for open dialog with ui_path_box_new()
and ui_setup_open_button_callback().
Use Windows folder dialog in ui_path_box_open_clicked().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1526 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-11 16:34:18 +00:00
Nick Treleaven
163890a33e Move search_get_file_list() to utils.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1520 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-05-11 11:42:00 +00:00