This PR is about adding features to make it possible to sort the tabs in the editor area. It includes the following changes:
04eb16b Add capability to automatically sort editor tabs
138dd09 Add keybindings for sorting editor tabs
803d6a6 Add capability to sort editor tabs
a64749e Allow document_get_notebook_child() to be used globally
I chose to place them in one PR so everything can be discussed in one place. Each update depends on the other update that comes earlier than it. Which means, if the last update is wanted (`04eb16b`), all other updates that came before it should be included, but if only `803d6a6` is wanted, it would only require `a64749e`.
Here are the snapshots:
http://imgur.com/6uYVd72http://imgur.com/G4Fi9iVhttp://imgur.com/VNOJaVvhttp://imgur.com/Pb00zIK
The first 2 updates (`803d6a6` and `138dd09`) made a fair amount of changes in the code, but the last update had to be a little aggressive since the only way to get it done properly is to alter the codes that call `document_open_file()`. Modifying `document_open_file()` itself would mean that every file opened would cause the order of tabs in the notebook widget to be recalculated and rearranged.
This could cause significant slowdown during startup time especially when opening a lot of files. That's why the only proper way to do it is to make changes on the calling functions instead, where we could only allow a function like `notebook_auto_sort_tabs()` to be called once after multiple files are opened.
We can also create a wrapper function like `document_open_file_and_auto_sort_tabs()` but it would only apply to calling functions that only open a file once everytime they are called.
It's unlikely for the last update to be merged because of that, but please also consider the first two (`803d6a6` and `138dd09`). I can create another PR for those if wanted.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1144
-- Commit Summary --
* Allow document_get_notebook_child() to be used globally
* Add capability to sort editor tabs
* Add keybindings for sorting editor tabs
* Add capability to automatically sort editor tabs
-- File Changes --
M data/geany.glade (30)
M src/callbacks.c (4)
M src/document.c (16)
M src/document.h (2)
M src/keybindings.c (22)
M src/keybindings.h (2)
M src/keyfile.c (15)
M src/libmain.c (2)
M src/msgwindow.c (6)
M src/notebook.c (110)
M src/notebook.h (14)
M src/osx.c (3)
M src/prefs.c (40)
M src/symbols.c (8)
M src/ui_utils.c (7)
M src/ui_utils.h (2)
M src/win32.c (10)
-- Patch Links --
https://github.com/geany/geany/pull/1144.patchhttps://github.com/geany/geany/pull/1144.diff
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1144
Virtually it's more correct that if `document_rename_file()` fails, `handle_save_as()` would no longer proceed to call `document_save_file_as()`. I'm not sure if unexpected things in runtime would not happen if `document_save_file_as()` somehow succeeds even if `document_rename_file()` fails, but it's certainly not what the user would be expecting. I.e., being able to save to the target file but the originally file remains to exist. This might be a rare case, but it still stands to be programmatically incorrect.
I decided to include changing `document_rename_file()` itself in this update rather than creating another non-API function, because I believe it's the only correct way to do it. Sooner or later, it would have to be changed anyway. And I don't think it's likeable that an old non-gboolean function which no code would use would exist just for the sake of not breaking the API. This should also be helpful to future code that might rely on it.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1180
-- Commit Summary --
* Make document_rename_file() return a gboolean.
* Abort save if rename fails
-- File Changes --
M src/dialogs.c (6)
M src/document.c (4)
M src/document.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/1180.patchhttps://github.com/geany/geany/pull/1180.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1180
As discussed in https://github.com/geany/geany/pull/1180.
This change adds two new functions: `document_rename_file_and_save()`, and `document_rename_and_save()`. `document_rename_file_and_save()` is kind of like the combination of `document_rename_file()` and `document_save_file_as()`, and is strictly about renaming the associated file, and doing the stuff necessary before and after the file has been renamed, like disabling file monitoring, and putting it back if a rename fails, saving/restoring file disk status, etc.
`document_rename_and_save()` OTOH is more of a wrapper, and is about renaming the document itself. It doesn't require the document to have an associated file to it (i.e. `doc->real_path != NULL`). But if there is an associated file, the file is also renamed, i.e., `document_rename_file_and_save()` is called. The algorithm to check if the file has to be overwritten is also contained in it. This function should be adaptable to other implementations like [in-place renaming](https://github.com/konsolebox/geany/tree/docs_rename).
In `dialogs.c`, stuff about resetting `doc->tm_file` and calling `build_menu_update()` has been moved to `document_save_file_as()`, since both are essentially needed to be done by anyone that calls the function. It helps significantly simplify the two new functions and the functions in `dialogs.c`.
The function `save_as_dialog_handle_response()` has been refactored, and is now simpler since the "overwrite file?" prompt has been moved to `document_rename_and_save()`, and since it can now directly call `document_rename_and_save()` and `document_save_file_as()`. `dialogs_show_save_as()` now also directly calls `document_save_file_as()` if `interface_prefs.use_native_windows_dialogs == TRUE`. `handle_save_as()` is no longer needed, so it's been removed.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1194
-- Commit Summary --
* Add document_rename_file_and_save()
* Do not make document_rename_file_and_save() an API function for now
* Add document_rename_and_save()
* Move resetting GeanyDocument::tm_file, and calling build_menu_update() to document_save_file_as()
* Rework Save-As functions in dialogs.c
* dialogs_show_save_as: g_free(utf8_name);
-- File Changes --
M src/dialogs.c (78)
M src/document.c (81)
M src/document.h (4)
-- Patch Links --
https://github.com/geany/geany/pull/1194.patchhttps://github.com/geany/geany/pull/1194.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1194
Zooming itself is fine, it works if "zoom in(out)" menu items are clicked. Default zooming hotkeys (which are written on these menu items) do not have any effect.
Geany 1.32, macOS 10.12.6
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1712
For a fluent coding I love to not change my hand position to use the
arrow keys!
I realy like auto-closing.
If I activate the auto closing brackets, braces, parenthesis and
quotes feature, the closing characters are inserted, but to continue after
these, the arrow keys are necessary.
The modification I made: if autoclosing AND consuming is activated in
options, if a closing character is typed and the following character
matches this, not both characters stay - one deleted - curr pos
afterwards.
Example: the | marks the curr position:
"|"
"hallo|"
[Then the " is hit]
"hallo"|
The " is reachable without changing hand pos. Same for the other
"autoclosers".
I saw this in other IDEs and I want it in my Geany.
I don't know about internationatlization, so this is an incomplete
feature.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2122
-- Commit Summary --
* Consume closing brackets, braces, parenthesis, single and double quotes
-- File Changes --
M data/geany.glade (239)
M scintilla/include/Scintilla.h (1)
M scintilla/src/Editor.cxx (5)
M src/editor.c (67)
M src/editor.h (1)
M src/keyfile.c (2)
M src/prefs.c (43)
M src/sciwrappers.c (9)
M src/sciwrappers.h (3)
-- Patch Links --
https://github.com/geany/geany/pull/2122.patchhttps://github.com/geany/geany/pull/2122.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2122
There is no feedback about a failed GIT commit at all.
No status bar message, no status window message, no message in Help->Debug Messages and no error dialog.
At least one the above should happen to tell the user that the commit did not happen.
IMO there should be a message in Help->Debug Messages at the very least but also some more visible feedback to the user like an error dialog or at least a status bar message.
The only trace you get is the GIT error output on stderr but I guess most people won't want Geany's stderr regularly :).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/837
I think, when commenting Python code via `Edit` > `Format` > `Comment Line(s)`, after the `#` character would be better to add a space, [as mentioned in PEP8](https://www.python.org/dev/peps/pep-0008/#block-comments), resulting:
<code>
# commented line
</code>
instead of:
<code>
#commented line
</code>
This prevent me to manual adjust (all) the commented line(s).
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1681
I can reliably crash Geany 1.33 (and previous versions) by the following commands.
1. "File->Open" (or any other method) to display the open file dialog.
2. Shift+RightClick on a directory, and select "Copy as Path".
3. Wait. A crash will occur.
Note: the crash occurs sooner if you paste the copied path anywhere, for instance into the open "untitled" window, or where I first encountered the crash: open a cmd window, enter "cd /d " and paste the copied path.
The event viewer displays "Event 1000, Application Error" and the following info:
`Faulting application name: geany.exe, version: 1.33.0.0, time stamp: 0x00000000`
`Faulting module name: libgdk-win32-2.0-0.dll, version: 2.24.32.0, time stamp: 0x00000000`
`Exception code: 0xc0000005`
`Fault offset: 0x00026472`
`Faulting process id: 0x18f0`
`Faulting application start time: 0x01d44284f527cbc7`
`Faulting application path: C:\Program Files (x86)\Geany\bin\geany.exe`
`Faulting module path: C:\Program Files (x86)\Geany\bin\libgdk-win32-2.0-0.dll`
`Report Id: 056c8fd0-6756-4c2a-a813-32ce3f030269`
`Faulting package full name: `
`Faulting package-relative application ID:`
systeminfo displays the following:
`OS Name: Microsoft Windows 10 Home`
`OS Version: 10.0.17134 N/A Build 17134`
`OS Manufacturer: Microsoft Corporation`
`OS Configuration: Standalone Workstation`
`OS Build Type: Multiprocessor Free`
My WAG is that this relates to the allocation, permissions, or ownership of the paste buffer.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1942