Preview layout setting does not stick after app restart
The change from classic/horizontal to vertical is saved into the GSettings, but on start the state was restored to the second action of this radio group, while the group was not set yet, due to the EUIManager being frozen at that time, thus when the EUIMnager had been unfrozen, the value of the first action in the group was used to update the group value, which did not reflect the value read from the GSettings. Instead of shifting the binding settings to a place where the EUIManager is truly unfrozen, simply use the first action in the group for the GSettings key.
This commit is contained in:
@ -625,7 +625,9 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view)
|
||||
book_shell_view->priv->book_shell_content, "preview-visible",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
|
||||
action = ACTION (CONTACT_VIEW_VERTICAL);
|
||||
/* use the "classic" action, because it's the first in the group and
|
||||
the group is not set yet, due to the UI manager being frozen */
|
||||
action = ACTION (CONTACT_VIEW_CLASSIC);
|
||||
|
||||
g_settings_bind_with_mapping (
|
||||
settings, "layout",
|
||||
|
||||
@ -593,7 +593,9 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view)
|
||||
priv->views[E_CAL_VIEW_KIND_YEAR].calendar_view, "preview-visible",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
|
||||
action = ACTION (CALENDAR_PREVIEW_VERTICAL);
|
||||
/* use the "horizontal" action, because it's the first in the group and
|
||||
the group is not set yet, due to the UI manager being frozen */
|
||||
action = ACTION (CALENDAR_PREVIEW_HORIZONTAL);
|
||||
|
||||
g_settings_bind_with_mapping (
|
||||
settings, "year-layout",
|
||||
|
||||
@ -277,7 +277,9 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view)
|
||||
priv->memo_shell_content, "preview-visible",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
|
||||
action = ACTION (MEMO_VIEW_VERTICAL);
|
||||
/* use the "classic" action, because it's the first in the group and
|
||||
the group is not set yet, due to the UI manager being frozen */
|
||||
action = ACTION (MEMO_VIEW_CLASSIC);
|
||||
|
||||
g_settings_bind_with_mapping (
|
||||
settings, "memo-layout",
|
||||
|
||||
@ -432,11 +432,13 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view)
|
||||
priv->task_shell_content, "preview-visible",
|
||||
G_BINDING_SYNC_CREATE);
|
||||
|
||||
action = ACTION (TASK_VIEW_VERTICAL);
|
||||
/* use the "classic" action, because it's the first in the group and
|
||||
the group is not set yet, due to the UI manager being frozen */
|
||||
action = ACTION (TASK_VIEW_CLASSIC);
|
||||
|
||||
g_settings_bind_with_mapping (
|
||||
settings, "task-layout",
|
||||
ACTION (TASK_VIEW_VERTICAL), "state",
|
||||
action, "state",
|
||||
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY,
|
||||
e_shell_view_util_layout_to_state_cb,
|
||||
e_shell_view_util_state_to_layout_cb, NULL, NULL);
|
||||
|
||||
@ -638,7 +638,9 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view)
|
||||
ACTION (MAIL_SHOW_PREVIEW_TOOLBAR), "active",
|
||||
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
|
||||
|
||||
action = ACTION (MAIL_VIEW_VERTICAL);
|
||||
/* use the "classic" action, because it's the first in the group and
|
||||
the group is not set yet, due to the UI manager being frozen */
|
||||
action = ACTION (MAIL_VIEW_CLASSIC);
|
||||
|
||||
g_settings_bind_with_mapping (
|
||||
settings, "layout",
|
||||
|
||||
Reference in New Issue
Block a user