GNOME Bugzilla – Bug 778583
todo.txt: Error when opening Todo.txt
Last modified: 2017-02-22 12:19:38 UTC
I can't enable todo.txt plugin. I get the following error logged into terminal: gtd_provider_todo_txt_load_source: Error while opening Todo.txt: Operation not supported May be because Todo.txt file isn't present already, and todo.txt plugin doesn't creates it. Thanks
Created attachment 346053 [details] [review] gtd-plugin-todo-txt: set default source when todo.txt source is not set Earlier default source was set when the self->source was NULL. but this aprroach is wrong as self->source is set to g_settings_get_string (self->settings, "file") during initialization, as g_settings_get_string return a empty string if the source is never set. So now set default source is called when the self->source is empty and not NULL. Due to this the source is never set on first start and hence the plugin does not loads.
Created attachment 346087 [details] [review] gtd-plugin-todo-txt: set default source when todo.txt source is not set Earlier default source was set when the self->source was NULL. but this aprroach is wrong as self->source is set to g_settings_get_string (self->settings, "file") during initialization, as g_settings_get_string return a empty string if the source is never set. So now set default source is called when the self->source is empty and not NULL. Due to this the source is never set on first start and hence the plugin does not loads.
Created attachment 346090 [details] [review] todo.txt plugin: move to GFile API Currently gtd-plugin-todo-txt has a source element in the struct which stores the todo.txt path. This is not needed and the code should make use of GFile API only. so the source variable has been removed from the structure in both provider and plugin and now we only use source_file.
Review of attachment 346087 [details] [review]: LGTM
Review of attachment 346090 [details] [review]: LGTM
Thank you so much for these patches. It's working much, much better now! :) Attachment 346087 [details] pushed as 46225b6 - todo-txt: set default source when todo.txt source is not set Attachment 346090 [details] pushed as 388c8e4 - todo.txt plugin: move to GFile API