4784 Commits

Author SHA1 Message Date
Colomban Wendling
b7b34ec451 Rewrite the Txt2tags parser for better conformance and features
This fixes parsing indented titles and titles with embedded delimiter
characters, and adds support for title nesting information.

Syntax: http://txt2tags.org/rules.html

Closes [feature-requests:#690].
2014-08-19 16:11:23 +02:00
elextr
a8e8e2cd9e Merge pull request #312 from elextr/reflow_fix
Make reflow paragraph leave cursor at end of reflowed text, which is more likely to be useful than where it was left at the start of the last line.
2014-08-19 18:05:38 +10:00
Colomban Wendling
dc140165ae Use GeanyFindFlags instead of plain integer when expecting Geany find flags
This makes the API more obvious on what argument is expected, and avoid
confusion between Geany and Scintilla find flags.
2014-08-19 03:42:58 +02:00
Colomban Wendling
bdc0f720e7 Remove unused flags from document_search_bar_find()
Passed-in flags was always 0, so the argument is not useful.
Also, this function expected Scintilla search flags rather than Geany
ones, making the API confusing for no good reason.
2014-08-19 03:40:52 +02:00
Colomban Wendling
8812e39e2e Fix searching backwards from the Find dialog
search_find_prev() wasn't properly updated to work on GeanyFindFlags
leading to incorrect flags handling.
2014-08-19 03:31:34 +02:00
asmblur
0a063c1a72 Fix regexp search & replace. 2014-08-18 19:06:27 -05:00
Colomban Wendling
91d0ed2183 Find in Files: start search when pressing return in all field
Patch partly from Yosef Or Boczko, thanks.  Closes #959.
2014-08-14 17:12:58 +02:00
Colomban Wendling
521778ad31 Color scheme dialog: scroll to the initially selected item 2014-08-12 20:40:21 +02:00
Colomban Wendling
df964312b2 Remove a global in colorscheme dialog code 2014-08-12 20:38:59 +02:00
Colomban Wendling
8b0990e52a Fix relative project base path when creating a new project
Closes #1062.
2014-08-12 16:42:50 +02:00
Colomban Wendling
cc1c36d009 project: Sanitize entries_modified scope 2014-08-12 16:42:46 +02:00
Colomban Wendling
87c6cefc19 Remove dead assignment
`entries_modified` global is only used by on_name_entry_changed() and
on_entries_changed(), both of which are only ever called from
project_new() scope -- which already initializes this variable.
2014-08-12 16:17:39 +02:00
Colomban Wendling
0b2b647a6d Remove an unnecessary dynamic allocation 2014-08-12 14:39:53 +02:00
Colomban Wendling
6ed6a99565 about: Don't leak global variables to the program scope 2014-08-12 14:38:48 +02:00
Colomban Wendling
36a6dd2e2c dialogs: Don't abuse GObject data 2014-08-11 16:52:26 +02:00
Colomban Wendling
571239e0bf dialogs: Remove an unnecessary function indirection
Having add_input_widgets() didn't really make the code any simpler,
rather obfuscating it a little.
2014-08-11 16:38:09 +02:00
Colomban Wendling
5fcacf066d Add user data to GeanyInputCallback, avoiding global variable hacks 2014-08-11 15:44:51 +02:00
Colomban Wendling
2559cda954 prefs: Remove some global state in keybinding-related code
Use gtk_dialog_run() to run the key input dialog, which is modal anyway.
This avoids having to pass the label and the iter around for the dialog
response callback to have them, as they now only are used directly in the
function setting them in the first place.
2014-08-10 15:47:18 +02:00
Colomban Wendling
852f326650 prefs: Pack keybinding-related globals together and avoid much direct access
This however doesn't get rid of any of the global data itself, it only pack it
in a struct and passes pointer to this struct around instead of accessing the
global whenever possible.
2014-08-10 15:46:44 +02:00
Colomban Wendling
74ef1b8344 Update for new Scintilla styles 2014-08-10 02:21:54 +02:00
Colomban Wendling
593b9dd2c9 Merge branch 'single-line-regex' 2014-08-10 01:51:48 +02:00
Colomban Wendling
673c3c36a3 Add UI elements to control single-line regex settings 2014-08-10 01:46:31 +02:00
Colomban Wendling
482d2732af Add support for single-line regular expressions 2014-08-10 01:46:16 +02:00
Colomban Wendling
a26bdd628f Fix crash when closing a document with visible infobars
Apparently the ::unrealize symbol is sent too late, after we destroyed
the widget and freed the GeanyDocument, and some signals like
::focus-in-event can still be fired on the widget after that.

So, properly use the ::destroy signal that is supposed to be fired when
others should release references to that instance.
2014-08-07 15:14:22 +02:00
elextr
ed20a4373d Make reflow paragraph leave cursor at end.
The cursor was left at the beginning of the last line, leaving
it at the end is more likely to be a useful position to continue
typing.
2014-08-06 13:15:07 +10:00
Matthew Brush
3c2d93eca4 Refactor win32 native dialog-mainloop update code
Just cleaning up last commit.
2014-08-03 04:23:19 -07:00
Matthew Brush
eb267d30cb For native win32 dialogs, pump main window loop a bit
Mostly gets rid of re-drawing issues, however is not great.
2014-08-02 20:29:02 -07:00
Nick Treleaven
d4acd1e061 *View->Change Font* should respect native dialog setting (Windows, #1059) 2014-08-02 16:29:08 +02:00
Nick Treleaven
e1988964c1 Fix Windows build 2014-08-01 12:05:30 +01:00
Nick Treleaven
01b3103eaf Remove unread variable 2014-08-01 11:54:05 +01:00
Colomban Wendling
b65f49902f Fix closing the documents when quitting
When quitting we avoid doing some unnecessary actions, and used to
simply destroy the Scintilla widget (and thus the notebook page)
instead of the elaborate UI updates.

Unfortunately, when the infobars landed they changed what is packed as
a notebook page, and now destroying the Scintilla widget alone is not
enough to close the page.  Fix this by properly removing the whole page
no matter what it contains.

This issue was visible when quitting Geany with a project open.
2014-07-26 15:03:49 +02:00
Colomban Wendling
0682a25585 Fix crash when quitting with an infobar visible
When the infobar gets closed/destroyed it tries to focus the possibly
destroyed document, leading to a crash.
2014-07-26 13:36:19 +02:00
Colomban Wendling
a87655480f Merge most of PR#298 2014-07-11 18:06:59 +02:00
Colomban Wendling
487b8aea0b Custom commands dialog: Make sure the selected item is always visible
Always bring back the selected item after an user action, so the user
can see what she's doing.
2014-07-06 00:06:16 +02:00
Colomban Wendling
47e9e6c000 Ask whether to overwrite the project file when creating a new project 2014-07-04 17:54:07 +02:00
Colomban Wendling
7f7f66978b Add tooltips to explain the purpose of the New Project dialog fields 2014-07-04 17:53:24 +02:00
Colomban Wendling
11b50493fc Use ui_button_new_with_image() to build image buttons 2014-07-04 17:50:37 +02:00
Thomas Martitz
db90411b0e main: Refactor quit functions
Move quit-related functions to main.c and make them static. main_quit() now
does all the heavy work and can be called from signal handlers.
2014-07-03 22:33:26 +02:00
Martin Spacek
fd5ac727cb Add %l current line number substitution to build commands 2014-07-02 15:07:21 -07:00
Thomas Martitz
ffcec43d01 document.c: Immediately mark as changed when document is externally deleted
Before infobar it didn't matter because the dialog was modal and interaction
with the doc was impossible. Now that you can interact it the doc should
be marked changed immediately.
2014-06-29 11:38:02 +02:00
Thomas Martitz
0f7db113e7 document.c: Restore lost document_set_text_changed(doc, TRUE) call
It got lost by accident in 5117940.
2014-06-29 11:38:02 +02:00
Thomas Martitz
c8970e2331 info bars: Show additional save button for the "reload file?" info bar
This allows overwriting the file right from the info bar.
2014-06-29 11:38:02 +02:00
Thomas Martitz
4b8f42cd9e info bars: Explicitely move focus back to the editor when closing
This does not seem to happen automatically, at least on GTK3.
2014-06-29 11:37:47 +02:00
Thomas Martitz
ab42662309 Fix racy glib assertion failure
Use g_signal_connect_object() to establish automatic and race-free signal
disconnection instead of the hand-crafted mechanism.
2014-06-29 11:29:07 +02:00
Colomban Wendling
35a212dffc Merge branch 'callbacks-cleanup' 2014-06-27 22:32:38 +02:00
Colomban Wendling
3ce25db632 Remove line number zoom hack as it is no longer necessary
Since cbf9813632d7ee921ffa1fda0d1f69128b2bc755 we have a proper
solution for maintaining line number consistent with the editor zoom,
so drop the old hack.

This also allows to remove the now useless third argument of
sci_set_line_numbers().
2014-06-27 22:23:48 +02:00
Colomban Wendling
cccc6ea0df Remove some dead code 2014-06-26 20:04:15 +02:00
Colomban Wendling
6c80488037 Make sure the current document is still the same after Save All
Save All updates the sidebar and title bar with the document that was
the current one when the action was triggered, but the action could
have changed the focused document if an non-file-backed file required
saving.  So, make sure current document is the same after the action.
2014-06-26 20:00:24 +02:00
Colomban Wendling
0d03fad7bf Move date insert callbacks to the UI code where they belong 2014-06-26 18:36:51 +02:00
Colomban Wendling
a51bc3d654 Move include insert callbacks to the UI code where they belong 2014-06-26 18:36:49 +02:00