51 Commits

Author SHA1 Message Date
Nick Treleaven
a25c8ec38b Don't look up "scroll_arrow_hlength" and "scroll_arrow_vlength"
GtkWidget properties on GTK < 2.10.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2887 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-14 15:48:11 +00:00
Enrico Tröger
080c93b8c0 Ignore the scroll arrows when checking for a double click in the notebook tab bar (closes #2033059).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2852 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-08-04 08:53:21 +00:00
Enrico Tröger
4936861c6a Oops, compile fix.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2840 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-30 18:19:57 +00:00
Enrico Tröger
961b040d8e Fix signature of focus_sci().
Double clicking on free space in the tab bar opens a new file (#2003291).

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2839 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-30 18:19:19 +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
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
Nick Treleaven
4b1e4056b8 Fix redo, reload commands.
Fix focusing editor on notebook tab click.
Minor formatting and use NZV, DOC_FILENAME macros.
Make doc_at() debug function check idx is within range.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2702 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-18 13:36:33 +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
Nick Treleaven
37e0d1f3f1 Move GeanyDocument GUI elements and saved_encoding to private
Document struct which inherits from GeanyDocument. This is to hide
implementation fields from the plugin API, so that we can change
them if necessary.
Add DOCUMENT() macro to convert a GeanyDocument* to a Document*.
Also move UNDO_*, FileEncoding to documentprivate.h.
Move undo_action struct to document.c.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-02 15:31:59 +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
311b82ebb2 Rename document struct to GeanyDocument.
Rename filetype struct to GeanyFiletype.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2594 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-16 14:17:54 +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
Nick Treleaven
5bb5ff514f When closing tabs that were opened left-to-right, don't temporarily
focus the previous tab when closing tabs, to prevent unnecessary
checking for disk changes.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2375 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-03-21 13:05:47 +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
4a62d1d04f When closing a tab when using left-to-right tabs, focus the next
document, not the previous.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2282 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-25 17:02:23 +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
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
Enrico Tröger
416e1b0a69 Enable close tab on middle-clicking a notebook tab label.
Enable toggle additional widgets on double-clicking notebook tab label.	 


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2042 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-11-11 10:19:50 +00:00
Enrico Tröger
0c79897dfe Don't make notebook tabs higher than necessary.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1967 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-22 17:10:02 +00:00
Nick Treleaven
f6c3430623 Attempt to fix problem with tab close button size.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1925 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-02 14:23:11 +00:00
Nick Treleaven
b8043b31a2 Use stock close image for notebook tab close buttons.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1922 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-10-01 11:46:19 +00:00
Enrico Tröger
edc0ceaad6 Add version to plugin info fields and two other fields for future use.
Add option to show/hide the small crosses on each file tab (closes #1757680).


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1826 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-08-25 14:16:52 +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
638af6cd6d Don't recreate the open files items when DnD reordering tabs, now
that the open files treeview is sorted alphabetically.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1394 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-14 12:11:50 +00:00
Enrico Tröger
90b01daf35 Fixed several compiler warnings (mainly shadowing local variables and unreachable code).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1376 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-09 13:52:26 +00:00
Nick Treleaven
806dd5be1d Add descriptions for all .c source files below the file header.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1329 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-24 11:41:56 +00:00
Enrico Tröger
7b61ad934d Updated copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1188 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-14 17:36:42 +00:00
Nick Treleaven
9a34105638 Fix some indent formatting.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1177 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-12 16:56:23 +00:00
Nick Treleaven
1edaaa3d6c Show read-only notebook tabs in green.
Add document_get_status() to get the tab colour for the document.
Use ui_update_tab_status() to update notebook tabs and open files
treeview items.
Avoid using GtkTreeIter struct as treeviews function arguments.
Remove unneeded arguments for treeviews_openfiles_add(),
notebook_new_tab().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1053 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-12-05 10:37:36 +00:00
Nick Treleaven
d5004f43e4 Add some const char* argument modifiers, remove unneeded static from
some local vars.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1029 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-25 12:17:50 +00:00
Nick Treleaven
6bb48f0800 Make tab_count_changed() slightly more efficient.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1024 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-23 16:06:54 +00:00
Nick Treleaven
9cff8504ea Ensure tab DnD is enabled when tabs are added; use
notebook_remove_page() instead of gtk_notebook_remove_page().
Unified notebook_[en|dis]able_dnd_for_dropping_files() in
tab_count_changed().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1017 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-22 16:07:18 +00:00
Enrico Tröger
4306f9091a Removed DnD handler for the main window (not very useful).
Fixed broken tab reordering by only enabling DnD for dropping files when there are no open file tabs, otherwise disable it and enable DnD for moving file tabs. Dropping files into Geany when file tabs are open still works because then it is handled by the Scintilla widget.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1015 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-21 18:39:23 +00:00
Nick Treleaven
5ac6b8393c Focus the current document after clicking on a tab.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@963 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-11-03 15:03:57 +00:00
Nick Treleaven
a63fc1e40e Moved UI related utils from utils.c to ui_utils.c
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@790 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-09-05 14:24:47 +00:00
Enrico Tröger
ffccef2c68 Enlarged the tab close icon. This should fix some display issues.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@752 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-21 17:07:44 +00:00
Nick Treleaven
a9873e040c Add info to file header text
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@748 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-20 11:54:33 +00:00
Nick Treleaven
0a4e1ff7da Use native tab DnD reordering on GTK+ 2.10; closes #1519650
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@686 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-09 11:14:02 +00:00
Nick Treleaven
badd2b7fd7 Move notebook motion event setup to notebook_init
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@683 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-08 10:52:36 +00:00
Nick Treleaven
58af613d59 Fixed GTK 2.6 workaround for DnD tab reordering so it works on the first attempt
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@682 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-08-08 10:39:18 +00:00
Nick Treleaven
c67bd70d53 Use tab reorder workaround only if GTK runtime <2.8
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@615 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-24 17:30:08 +00:00
Enrico Tröger
285cda8924 Keep the list of open files in sync when reordering notebook tabs.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@606 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-22 14:36:20 +00:00
Enrico Tröger
0e4e014759 Compile notebook_motion_notify_event_cb() only with GTK 2.6 (again).
Made "built on" string translatable.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@583 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-18 22:01:24 +00:00
Enrico Tröger
2e31c57b44 Compile notebook_motion_notify_event_cb() only with GTK 2.6.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@543 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-08 18:23:20 +00:00
Nick Treleaven
be9461a4d2 Don't prevent notebook tab focus because this disables the notebook arrows
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@513 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-07-01 10:22:54 +00:00
Nick Treleaven
93a9a2bd8a Fix close tab button bug introduced in last commit
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@480 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-06-25 12:48:38 +00:00
Nick Treleaven
efe658834e Enable drag reordering of tabs for GTK+2.8, and a temporary workaround for GTK+2.6. Add notebook_new_tab and update document_create_new_sci to use it; also remove on_tab_close_clicked
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@479 ea778897-0a13-0410-b9d1-a72fbfd435f5
2006-06-25 12:13:35 +00:00