[Xfce4-commits] [xfce/xfce4-settings] 04/18: display: Correctly fall back to previous profile on cancel
noreply at xfce.org
noreply at xfce.org
Thu Apr 4 23:03:02 CEST 2019
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-settings.
commit 9ec3bde349fe2be7e574479524311fe0b9e4fdfc
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Thu Mar 28 23:12:47 2019 +0100
display: Correctly fall back to previous profile on cancel
---
dialogs/display-settings/main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 75cecef..c832035 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1662,15 +1662,17 @@ display_settings_profile_apply (GtkWidget *widget, GtkBuilder *builder)
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
gchar *profile_hash;
+ gchar *old_profile_hash;
+ old_profile_hash = xfconf_channel_get_string (display_channel, "/ActiveProfile", "Default");
gtk_tree_model_get (model, &iter, COLUMN_HASH, &profile_hash, -1);
xfce_randr_apply (xfce_randr, profile_hash, display_channel);
xfconf_channel_set_string (display_channel, "/ActiveProfile", profile_hash);
if (!display_setting_timed_confirmation (builder))
{
- xfce_randr_apply (xfce_randr, "Default", display_channel);
- xfconf_channel_set_string (display_channel, "/ActiveProfile", "Default");
+ xfce_randr_apply (xfce_randr, old_profile_hash, display_channel);
+ xfconf_channel_set_string (display_channel, "/ActiveProfile", old_profile_hash);
foo_scroll_area_invalidate (FOO_SCROLL_AREA (randr_gui_area));
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list