Branch: refs/heads/master
Author: LiquidCake <han132321(a)gmail.com>
Committer: LiquidCake <han132321(a)gmail.com>
Date: Wed, 27 Nov 2024 18:15:04 UTC
Commit: 896dfa13f233615a0dc159733c3c4a1001445f89
https://github.com/geany/geany/commit/896dfa13f233615a0dc159733c3c4a1001445…
Log Message:
-----------
persistent-temp-files-plugin: (persistent-untitled-documents) added plugin description
Modified Paths:
--------------
doc/geany.txt
Modified: doc/geany.txt
44 lines changed, 32 insertions(+), 12 deletions(-)
===================================================================
@@ -5371,24 +5371,13 @@ a given delay.
Save on focus out
-^^^^^^^^^^^^^^^^^
+`````````````````
You can save the current document when the editor's focus goes out.
Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
will make the current document to be saved.
-Instant Save
-^^^^^^^^^^^^
-This plugin sets on every new file (*File->New* or *File->New (with template)*)
-a randomly chosen filename and set its filetype appropriate to the used template
-or when no template was used, to a configurable default filetype.
-This enables you to quickly compile, build and/or run the new file without the
-need to give it an explicit filename using the Save As dialog. This might be
-useful when you often create new files just for testing some code or something
-similar.
-
-
Backup Copy
^^^^^^^^^^^
@@ -5417,6 +5406,37 @@ cause the plugin to create the last two components of the original
file's path in the backup copy path and place the new file there.
+Untitled Document Save
+^^^^^^^^^^^^^^^^^^^^^^
+
+This configuration allows to automatically create an underlying file for newly-opened editor tabs
+(or when using *File->New* or *File->New (with template)*).
+File type is set appropriately to the used template.
+When no template is used - filetype will be determined by the configurable default
+value. Such functionality is useful when user often creates new files just for quick
+editing, taking notes, testing code etc.
+
+Instant Save
+````````````
+
+In this mode, for each new editor tab opened by the user, the plugin creates a new
+file with randomly generated name inside the configured directory.
+This enables users to quickly compile, build and/or run the new file without the
+need to assign an explicit filename through the Save As dialog.
+
+By default, the operating system temporary directory is used so files are cleaned up after reboot.
+
+Persistent Untitled Documents
+`````````````````````````````
+
+Unlike Instant Save, which treats untitled documents as temporary files that are automatically deleted,
+untitled documents in this mode behave more like ordinary files that are stored permanently.
+Users do not have to worry about saving or restoring such files by themselves - all untitled
+documents are auto-saved at regular intervals and restored on Geany start or when opening/closing projects.
+
+By default, files backing untitled documents in this mode are stored under the Geany configuration directory.
+
+
Contributing to this document
=============================
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: Sat, 30 Nov 2024 15:04:38 UTC
Commit: 34c97386f471df7dc923145dda30df3d879f0c66
https://github.com/geany/geany/commit/34c97386f471df7dc923145dda30df3d879f0…
Log Message:
-----------
Merge pull request #4077 from LiquidCake/saveactions_persistent_temp_files_doc
persistent-temp-files-plugin: (persistent-untitled-documents) added p…
Modified Paths:
--------------
doc/geany.txt
Modified: doc/geany.txt
44 lines changed, 32 insertions(+), 12 deletions(-)
===================================================================
@@ -5371,24 +5371,13 @@ a given delay.
Save on focus out
-^^^^^^^^^^^^^^^^^
+`````````````````
You can save the current document when the editor's focus goes out.
Every pop-up, menu dialogs, or anything else that can make the editor lose the focus,
will make the current document to be saved.
-Instant Save
-^^^^^^^^^^^^
-This plugin sets on every new file (*File->New* or *File->New (with template)*)
-a randomly chosen filename and set its filetype appropriate to the used template
-or when no template was used, to a configurable default filetype.
-This enables you to quickly compile, build and/or run the new file without the
-need to give it an explicit filename using the Save As dialog. This might be
-useful when you often create new files just for testing some code or something
-similar.
-
-
Backup Copy
^^^^^^^^^^^
@@ -5417,6 +5406,37 @@ cause the plugin to create the last two components of the original
file's path in the backup copy path and place the new file there.
+Untitled Document Save
+^^^^^^^^^^^^^^^^^^^^^^
+
+This configuration allows to automatically create an underlying file for newly-opened editor tabs
+(or when using *File->New* or *File->New (with template)*).
+File type is set appropriately to the used template.
+When no template is used - filetype will be determined by the configurable default
+value. Such functionality is useful when user often creates new files just for quick
+editing, taking notes, testing code etc.
+
+Instant Save
+````````````
+
+In this mode, for each new editor tab opened by the user, the plugin creates a new
+file with randomly generated name inside the configured directory.
+This enables users to quickly compile, build and/or run the new file without the
+need to assign an explicit filename through the Save As dialog.
+
+By default, the operating system temporary directory is used so files are cleaned up after reboot.
+
+Persistent Untitled Documents
+`````````````````````````````
+
+Unlike Instant Save, which treats untitled documents as temporary files that are automatically deleted,
+untitled documents in this mode behave more like ordinary files that are stored permanently.
+Users do not have to worry about saving or restoring such files by themselves - all untitled
+documents are auto-saved at regular intervals and restored on Geany start or when opening/closing projects.
+
+By default, files backing untitled documents in this mode are stored under the Geany configuration directory.
+
+
Contributing to this document
=============================
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: LiquidCake <han132321(a)gmail.com>
Committer: LiquidCake <han132321(a)gmail.com>
Date: Sun, 24 Nov 2024 16:56:43 UTC
Commit: c32c92feaeb9724559e62251bb01d12be5afa59a
https://github.com/geany/geany/commit/c32c92feaeb9724559e62251bb01d12be5afa…
Log Message:
-----------
persistent-temp-files-plugin: (persistent-untitled-documents) added function to API
Modified Paths:
--------------
src/libmain.c
src/main.h
src/plugindata.h
Modified: src/libmain.c
12 lines changed, 12 insertions(+), 0 deletions(-)
===================================================================
@@ -462,6 +462,18 @@ gboolean main_is_realized(void)
}
+/**
+ * Checks whether Geany is 'closing all' documents right now.
+ *
+ * @return @c TRUE if the Geany is 'closing all' documents right now or @c FALSE otherwise.
+ **/
+GEANY_API_SYMBOL
+gboolean geany_is_closing_all_documents(void)
+{
+ return main_status.closing_all;
+}
+
+
/**
* Initialises the gettext translation system.
* This is a convenience function to set up gettext for internationalisation support
Modified: src/main.h
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -32,6 +32,8 @@ void main_locale_init(const gchar *locale_dir, const gchar *gettext_package);
gboolean main_is_realized(void);
+gboolean geany_is_closing_all_documents(void);
+
#ifdef GEANY_PRIVATE
Modified: src/plugindata.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -57,7 +57,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
-#define GEANY_API_VERSION 248
+#define GEANY_API_VERSION 249
/* hack to have a different ABI when built with different GTK major versions
* because loading plugins linked to a different one leads to crashes.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).