This MR aims to fix issue #808 (closed).
As @Tamaranch suggested, switching from
g_signal_connect_object with the
G_CONNECT_SWAPPED flag seems to fix the issue.
However, there are a couple more things I think worth considering before the MR is ready:
- According to the documentation for
"When the gobject is destroyed the signal handler will be automatically disconnected".
Does this mean that thunar/thunar-windows.c:1487 is redundant now, since the signal handlers should be automatically disconnected when the label is destroyed?
@Tamaranch mentioned the
gbooleanreturn type on
thunar_window_notebook_update_titlenot being standard, should this be switched to a
voidas specified here? It also mentioned a
GParamSpecparameter that isn't being used by the function, is this alright?
Currently the function uses _thunar_return_val_if_fail to return early in case the window check fails. This macro is only defined if debugging is enabled. Should it instead use
g_return_if_failin case the function's return is changed to
void), so that it's always defined?