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
Preview documents written in various markup languages.
* Supports: Markdown, reStructuredText, Txt2tags, LaTeX, Docbook, Asciidoc, Textile, org-mode, and RFC-822-like messages
* May be used as a rudimentary web browser
* Can toggle visibility of menubar and tab close buttons
* Requires geanypy, pandoc, and asciidoc
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/489
-- Commit Summary --
* new plugin: geanypy-preview
-- File Changes --
A geanypy-preview/AUTHORS (1)
A geanypy-preview/CHANGELOG (33)
A geanypy-preview/COPYING (339)
A geanypy-preview/README.md (93)
A geanypy-preview/preview.py (741)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/489.patchhttps://github.com/geany/geany-plugins/pull/489.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-plugins/pull/489
Hello, I have a very simple request for Geany which I use heavily.
On my system I frequently view the output of commands the following way:
$ ls -l | nano -
here, nano reads standard input as a new unsaved file, making it easy to quickly access ls command output.
I would love to be able to do the same with geany:
$ ls -l | geany -
In other words, instead of a file, having standard input read as a new unsaved file (which would open either as new window or new tab depending on user's settings, but this is of no concern to me).
Thank you
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/780
I would like to see the Multipaste option for Scintilla implemented I hacked together something that works, but someone just needs to add a new option in Preferences somewhere to set it
add to sciwrappersc:
void sci_set_multi_paste(ScintillaObject *sci, gboolean mpval) { SSM(sci, SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0); }
add to sciwrappersh:
void sci_set_multi_paste (ScintillaObject *sci, gboolean mpval);
What works for now, but requires that you modify something in Preferences at least once in the session to get it to fire is adding, the following to editorc:
sci_set_multi_paste(editor->sci, 1);
To test it out turn on the setting, change a keybinding in Preferences
Then copy some text to the clipboard, select multilines (Alt+Shift Up/DownArrow) and paste!
Now you should see all pasted text onto each line in the editor
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/850
I followed the instructions on the homepage exactly, but my colorscheme hasn't changed when I restart Geany. Are there missing instructions?
"Extract the tarball and copy all of the files in the colorschemes directory to your C:\Users\YourUserName\AppData\Roaming\geany\colorschemes directory. Create this directory if it doesn't already exist."
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-themes/issues/6
Hi,
I will be really nice to have the feature "go to column" to be able to easily go to a specific column (say 1500) for text files with long lines (usually data exchange files)
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/869
I am really enjoying using Geany and congratulate you on its richness of functions but there is one thing that makes me curse:
I have to close the "find" pop-up dialog each time that I select a new area of text to find and then re-open it by clicking "find" or ctrl-f.
I have been used to using TexPad which re-writes the new find text each time without having to close the pop-up.
Thank you for your great efforts.
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/758
I have a large Java file (4.8MB). If I insert a new <b><big>{</big></b> near the start of this file, the run time for the parser becomes very long (5 minutes or so) - while the parser is running the editor is unusable. Is there some way to prevent this from happening? By parser I mean the code that determines the coloration of the keywords, strings, etc. <b>Thanks!</b>
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/791