codebrainz commented on this pull request.
> @@ -2097,7 +2097,9 @@ static void on_config_file_clicked(GtkWidget *widget,
> gpointer user_data)
if (g_file_test(global_file, G_FILE_TEST_EXISTS))
g_file_get_contents(global_file, &global_content, NULL,
NULL);
- document_new_file(utf8_filename, ft, global_content);
+ // open or create the document and mark it as changed if it
didn't already exist
+ GeanyDocument *doc = document_new_file(utf8_filename, ft,
global_content);
+ document_set_text_changed(doc, ! g_file_test(file_name,
G_FILE_TEST_EXISTS));
It feels weird that when you click one of the configuration file items, it
generates you a new file with a path into home dir but you cannot see the file
on the file system or save it unless you make a change. You shouldn't be able
to have a open a file that doesn't exist on disk yet and close it without
getting asked what to do, IMO.
For the CSS file, it doesn't matter if it's just a blank file, it gets applied
after the system one(s) and if it's blank it will do nothing. For other config
files if you clicked it by accident, you just discard the file instead of going
hunting for a file which doesn't actually exist on disk despite it being open
in Geany with a file name.
--
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/1382