481 Commits

Author SHA1 Message Date
Colomban Wendling
8ece89096d Merge branch 'master' into gtk3-support 2013-01-29 15:29:10 +01:00
Quentin Glidic
8c4db25396 Fix file saving behavior with "allow_always_save"
This preference should only be used for UI action, not for other file
saving triggering.
2012-12-02 17:22:06 +01:00
Nick Treleaven
0b63957e59 Add 'Move Line(s)' menu items in Edit->Commands (and popup menu)
Although using menu items for these is not very practical, it helps
discoverability, and they're more useful and intuitive than 'Transpose
Current Line'.
2012-11-23 16:30:18 +00:00
Colomban Wendling
a763e307f7 Don't access GtkWidget fields directly
Since many accessor are new in GTK versions we don't depend on, add
a header that defines them to the direct access if they aren't
available.
2012-10-08 20:08:06 +02:00
Colomban Wendling
9d2dab8fcf Fix an off-by-one issue in sci_get_position_from_line()
Scintilla counts lines from 0 but TagManager from 1, so convert them.
2012-09-17 20:22:52 +02:00
Colomban Wendling
2d878c8a5d Don't use deprecated GtkNotebookPage 2012-09-13 16:34:18 +02:00
Colomban Wendling
d80bc7ce56 Update FSF address
Closes #3557875.
2012-08-24 19:25:57 +02:00
Matthew Brush
5fff1e69c2 Add NULL guard for reloading "untitled" documents
Previously it was using a GLIB assertion which shouldn't be used
to detect a normal condition and so it caused a warning on the
console output when clicking "Reload" with an "untitled" document.
2012-07-24 17:56:29 -07:00
Colomban Wendling
1c2c455b1d Update copyright information 2012-06-18 01:15:04 +02:00
Colomban Wendling
e87f393192 Create color scheme menu item with Glade
Now there is a dialog instead of a menu for selecting the color
schemes, the item under View->Editor can be created with Glade like the
rest of the menu.
2012-05-27 01:14:25 +02:00
Matthew Brush
d7d5a6d7fb Add some more key links to the Help menu (wiki, bug tracker, donate) 2012-02-26 20:19:17 -08:00
Nick Treleaven
b287553e4a Use 'SETPTR' instead of 'setptr'
This makes it clearer we're using a macro.
2012-01-25 16:26:16 +00:00
Jiří Techet
73f345eb09 Use standard include paths for "open selected file"
Under linux, try to locate the file with the given
name also under /usr/local/include and /usr/include.
This feature is probably most often used for
opening include files so this helps for the system
ones.

In addition, fix locale/utf8 encoding usage.
2012-01-11 22:57:31 +01:00
Matthew Brush
6c31ed4bc0 Re-highlight type keywords on notebook page switch 2012-01-03 10:21:09 -08:00
Matthew Brush
088b0bc362 Merge branch 'master' into gtkbuilder
Conflicts:
	geany.glade
	src/Makefile.am
	src/callbacks.c
2011-12-05 20:52:00 -08:00
Colomban Wendling
f0de946d3e Fix inserting multi-line comments with "Insert multiline comment"
"Insert multiline comment" did insert single-line style comment when
available even if multi-line style was also supported for the filetype.
2011-12-04 00:21:41 +01:00
Enrico Tröger
cfa334de74 Fix using the current document on 'Close Other Documents' from the GtkNotebook tab menu
Instead we should use that tab which is under mouse cursor where the user clicked (this might be a
different one than the current document). To be able to do so, we need to handle the right-click signal
per tab not on the GtkNotebook tab area to identify the tab under the mouse cursor.
2011-11-20 16:05:39 +01:00
Matthew Brush
9bffb94cc4 Real-time type keyword highlighting
* Add new function: document_update_tags().
* Refactor the various tag update functions into document_update_tags().
* Remove extra call to update the tags in document_new_file().
2011-11-11 16:08:26 -08:00
Matthew Brush
0a16ec7520 Merge branch 'master' into gtkbuilder
Conflicts:
	src/interface.c
	src/vte.c
2011-11-06 23:44:24 -08:00
Colomban Wendling
3f31453ace Fix various integer sign and size issues 2011-11-06 01:12:42 +01:00
Colomban Wendling
0167f589b3 Small code cleanup
Use foreach_document() in a few places where appropriate and make
some code more consistent.
2011-11-03 19:22:40 +01:00
Nick Treleaven
de559ef5d4 Make document_save_file() show the Save As dialog when necessary
Previously an error message was shown if doc->file_name is NULL.

The Save As dialog is now shown if the document does not have an
absolute path. This is because the user should confirm where to save
the document in this case.

Although this changes plugin API behaviour, it seems the best way to
ensure the Save As dialog is always shown when needed so the user
knows where the document has been saved.
2011-11-02 15:17:17 +00:00
Matthew Brush
a23e999b7b Bump GTK+ version to 2.16 2011-10-28 10:25:58 -07:00
Matthew Brush
b1b88286cf Simplify updating Scintilla keywords on reload config and tab switch.
Remove type keywords caching function since it doesn't really speed up
anything and we don't care if the keywords change since they can/should
still be reloaded.  This also prevents "leaking" a static GString once
when the application closes and saves a call to g_string_free() when the
type keywords have changed.

Rename document_update_highlighting() to document_update_type_keywords()
since no re-highlighting is needed when updating Scintilla keywords.
Scintilla highlights the new keywords automatically so this saves a call
to queue_colourise().

Remove update_type_keywords() function since this is now all handled
in the document_update_type_keywords() function.  This function had a
comment about updating all documents when sci is NULL but it was never
used in this way since it was only called on document_load_config() which
always operates on a single document and the sci should not be NULL.
2011-10-19 21:39:17 -07:00
Matthew Brush
1a14e4869f Update Scintilla keywords and highlighting when changing document tabs 2011-10-19 01:29:10 -07:00
Matthew Brush
0d3040bf86 Export symbols from Geany to allow GtkBuilder to find the callbacks.
Link with --export-dynamic and add G_MODULE_EXPORT to make the callback
symbols visible on Win32.
2011-10-10 13:14:22 -07:00
Colomban Wendling
d06e9f4575 Remove $Id$ and $Date$ SVN keywords 2011-10-09 22:57:35 +02:00
Nick Treleaven
1563c625f7 Add document_show_tab().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@6017 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-10-07 16:47:31 +00:00
Colomban Wendling
33f471c6f1 Fix "toggle case" when there is no selection
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5991 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-10-03 17:05:25 +00:00
Colomban Wendling
e3bf851784 Add menu items to detect indentation settings from document's content
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5904 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-25 20:15:02 +00:00
Colomban Wendling
3440b6770f Add and use editor_set_indent_width() to only set indentation width
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5903 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-25 20:14:40 +00:00
Colomban Wendling
fc6dc88772 Fix search for the current word if it isn't composed of only GEANY_WORDCHARS
Use Scintilla's definition of a "word" when fetching the current word
to perform a search.  This is needed when we perform a whole-word
search for Scintilla to find the matches.

Closes #3386129.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5895 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-21 17:15:19 +00:00
Colomban Wendling
ddb4ad5fa5 Fix some whitespace style errors
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5886 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-08-06 18:34:14 +00:00
Colomban Wendling
acc1ad557c Enable GTK printing support unconditionally
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5841 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-13 20:42:31 +00:00
Colomban Wendling
6f9d845181 In messages show the actual text user entered in Find and Replace dialogs
Previously we could put into a message a string where escape sequences
were already translated.

In the code, now we pass the original text together with the one
that is actually searched for.  New `original_text' field was added to
GeanySearchData.  A bug was fixed in document.c:show_replace_summary(): it
did not escape the "No matches found for ..." string.

Patch by Eugene Arshinov, thanks.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5832 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-03 13:40:42 +00:00
Nick Treleaven
bef3d696fd Fix 'Toolbar Preferences' popup menu item (oops).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5760 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-05-06 15:59:30 +00:00
Colomban Wendling
9bdd1663f4 Avoid changing the tag tree if it's not the one of the current document
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5742 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-26 16:21:47 +00:00
Colomban Wendling
ec4a5ea4f9 Make sure to update the tag list only for the current document
Fix idle tag list updating not to update the tag list if the current
document isn't the one to update anymore. In this case, mark the
document as needing an update and re-schedule an idle update next time
the document gets the focus.

This fixes updating the tag list after switching documents, which
resulted in displaying the wrong tag list.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5738 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-26 13:52:31 +00:00
Colomban Wendling
7698bf60a7 Improve usage of G_(UN)?LIKELY()
G_(UN)?LIKELY() should be only used on whole conditional expressions,
and only if the branching is very highly predictable, not if it is only
more probable.

These macros should be used with care because a wrong prediction may
be a lot worst than what a good prediction can give.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5625 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 22:00:18 +00:00
Colomban Wendling
4ac3ccbd37 Make Shift-Enter in search dialog and toolbar search entries search backwards
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5621 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-24 16:51:02 +00:00
Colomban Wendling
441bab9d3b Add new filetype setting "comment_single"
This provides separated single-line and multiline comment support.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-20 15:02:22 +00:00
Colomban Wendling
bf16b24b98 Create a new undo action when inserting templates
This makes sure the user can undo the template insertion without also
undoing a previous action.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5608 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-03-19 22:48:43 +00:00
Enrico Tröger
6ac2623208 Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Nick Treleaven
d65d3adcc4 Fix segfaults when using 'Send Selection to Terminal' and the VTE
is not loaded, and when using Ctrl-A after enabling the 'Load VTE'
pref (patch by Dimitar Zhekov, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5470 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-12-07 13:02:46 +00:00
Nick Treleaven
47372d9331 Add 'Mark All' Search menu command.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5427 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-23 12:50:24 +00:00
Nick Treleaven
14daa797d0 Fix auto-displaying of sidebar tab bar when sidebar is reshown.
Only auto-display symbols and documents tabs when showing the
sidebar if there are no plugin tabs.
Don't hide the sidebar on startup if only plugin tabs are visible
(fixes #3101867).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5422 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-22 13:49:38 +00:00
Nick Treleaven
554f1b0526 Don't change default build command entry color when cancelling
label editing.
Make dialogs_show_input() return NULL when cancelled.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5416 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-18 17:51:15 +00:00
Nick Treleaven
e24d4fbfa0 Re-focus Set Build Commands/Project dialogs after editing a build
command label.
Add 'parent' argument to some dialogs_show_input*() functions because
the dialog parent may not always be the main window.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5414 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-18 16:15:10 +00:00
Nick Treleaven
e38f2f6a17 Add 'Project->Apply Default Indentation' menu command to override
every document's indentation settings.
Improve 'Indentation' section docs.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5386 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-11-08 18:15:14 +00:00
Nick Treleaven
ab673d22fd Move find_again() to search.c.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5246 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-21 16:16:15 +00:00