Thank you for a suggestion. Unfortunately this change isn't suitable. Imagine you are prefer-to use-keyboard type and choose in that dialog using keys - each key press will call g_app_info_set_as_default_for_type() which involves not only reload hashes in lxpanel but also regenerating one or more files in the system (where your configuration is saved). That is an abusing thing for slow systems, it's why it was implemented to run only once. Therefore this GTK+3 issue requires another solution, and thank you for mentioning that "destroy" signal is marked "unsuitable" for GTK+3, it was not with GTK+2 (see https://developer.gnome.org/gtk2/stable/GtkObject.html#GtkObject-destroy). If you happen to find any other signal which is ran once before finalizing the widget then it would be pretty good to use it for gtk+3. May be "unrealize" should do, could you test if it is ran just once with GTK+3 even if you change tabs in the configuration dialog few times, please?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, I understand. I tested the "unrealize" signal with GTK+3, and it works fine. It runs only once when I close the window. I attached an updated patch.
Thank you for a suggestion. Unfortunately this change isn't suitable. Imagine you are prefer-to use-keyboard type and choose in that dialog using keys - each key press will call g_app_info_set_as_default_for_type() which involves not only reload hashes in lxpanel but also regenerating one or more files in the system (where your configuration is saved). That is an abusing thing for slow systems, it's why it was implemented to run only once. Therefore this GTK+3 issue requires another solution, and thank you for mentioning that "destroy" signal is marked "unsuitable" for GTK+3, it was not with GTK+2 (see https://developer.gnome.org/gtk2/stable/GtkObject.html#GtkObject-destroy). If you happen to find any other signal which is ran once before finalizing the widget then it would be pretty good to use it for gtk+3. May be "unrealize" should do, could you test if it is ran just once with GTK+3 even if you change tabs in the configuration dialog few times, please?
Ah, I understand. I tested the "unrealize" signal with GTK+3, and it works fine. It runs only once when I close the window. I attached an updated patch.
Thank you very much, your patch is pushed into master GIT branch.