Extension of `saveactions` plugin that allows Geany to store/load data for new, unnamed tabs when Geany window is closed/reopened. This is a convenience feature inspired by Notepad++ and discussed here https://github.com/geany/geany/issues/905 Include one small extension to Geany plugins API
https://github.com/geany/geany/assets/9273621/2924719f-7a86-4386-8db9-1c2a99...
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3904
-- Commit Summary --
* persistent-temp-files-plugin: added feature to saveactions plugin
-- File Changes --
M plugins/saveactions.c (542) M src/libmain.c (12) M src/main.h (2)
-- Patch Links --
https://github.com/geany/geany/pull/3904.patch https://github.com/geany/geany/pull/3904.diff
@LiquidCake commented on this pull request.
@@ -393,19 +689,54 @@ static gboolean auto_save(gpointer data)
static void autosave_set_timeout(void) { + if (autosave_src_id != 0)
this fixes a bug when disabling `autosave` function didn't actually stop autosave timer Unrelated to new functionality
@LiquidCake pushed 1 commit.
7bdf3a035dd544ec57c7ce739daf4ac565456422 persistent-temp-files-plugin: fixed tabs vs spaces
@LiquidCake commented on this pull request.
old_file_path = gtk_widget_get_tooltip_text(page_label);
+ new_file_path = DOC_FILENAME(doc); + + if (old_file_path == NULL) + { + ui_set_statusbar(TRUE, _("plugin error: failed to delete initial temp file " + "('failed to get notebook tab label')")); + + return; + } + + old_file_name = g_path_get_basename(old_file_path); + + if (is_temp_saved_file(old_file_name) && ! g_str_equal(old_file_path, new_file_path)) + { + g_hash_table_insert(
we have to use this hack with hashtable to remember name of original 'temp' file, during performing 'save as' which assigns a new 'final' name to file.
Ideally we would like to e.g. add 'original name' field to GeanyDocument structure but this wont happen for single plugin needs
@LiquidCake pushed 1 commit.
1c20c61cf6f5f9409b6577051eb4f3f71457af1d Merge branch 'geany:master' into persistent_temp_files
@LiquidCake pushed 1 commit.
bcc6dc00d04903bdc39fa5b1a8daf1b4f19ecf58 persistent-temp-files-plugin: future-proof empty check
@LiquidCake pushed 1 commit.
0c156634f8b5733087c47044959c6c096e80be5c persistent-temp-files-plugin: added auto-loading of possible out-of-session temp files
@LiquidCake pushed 1 commit.
999d2009d776e7e20d8c3da22c971a87ebfa3f76 persistent-temp-files-plugin: deleted file handling
@LiquidCake pushed 1 commit.
3b1b021c87c796a9d90ae840d0b35f7bf3dfc312 persistent-temp-files-plugin: rollback unrelated bug fix
Closed #3904.
github-comments@lists.geany.org