[Xfce4-commits] [xfce/xfce4-settings] 01/18: display: Start tracking the active display profile

noreply at xfce.org noreply at xfce.org
Thu Apr 4 23:02:59 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 ba4de298c75b42872592ed01c3a41d2d03c7f62c
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu Mar 28 20:03:48 2019 +0100

    display: Start tracking the active display profile
---
 dialogs/display-settings/main.c | 5 +++++
 xfsettingsd/displays.c          | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 47daa4a..9edab70 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1531,6 +1531,7 @@ display_settings_profile_save (GtkWidget *widget, GtkBuilder *builder)
 
         /* save the human-readable name of the profile as string value */
         xfconf_channel_set_string (display_channel, property, profile_name);
+        xfconf_channel_set_string (display_channel, "/ActiveProfile", profile_hash);
 
         display_settings_profile_list_populate (builder);
         gtk_widget_set_sensitive (widget, FALSE);
@@ -1563,6 +1564,7 @@ display_settings_profile_create_cb (GtkWidget *widget, GtkBuilder *builder)
 
         /* save the human-readable name of the profile as string value */
         xfconf_channel_set_string (display_channel, property, profile_name);
+        xfconf_channel_set_string (display_channel, "/ActiveProfile", profile_hash);
         display_settings_profile_list_populate (builder);
 
         g_free (property);
@@ -1634,10 +1636,12 @@ display_settings_profile_apply (GtkWidget *widget, GtkBuilder *builder)
 
         gtk_tree_model_get (model, &iter, COLUMN_COMBO_VALUE, &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");
 
             foo_scroll_area_invalidate (FOO_SCROLL_AREA (randr_gui_area));
         }
@@ -1685,6 +1689,7 @@ display_settings_profile_delete (GtkWidget *widget, GtkBuilder *builder)
             g_string_prepend_c (property, '/');
 
             xfconf_channel_reset_property (display_channel, property->str, True);
+            xfconf_channel_set_string (display_channel, "/ActiveProfile", "Default");
             display_settings_profile_list_populate (builder);
             g_free (profile_name);
         }
diff --git a/xfsettingsd/displays.c b/xfsettingsd/displays.c
index 8c9823b..329ebc0 100644
--- a/xfsettingsd/displays.c
+++ b/xfsettingsd/displays.c
@@ -472,6 +472,7 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
                 property = g_strdup_printf ("/%s", (gchar *) profile);
                 profile_name = xfconf_channel_get_string (helper->channel, property, NULL);
                 xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Applied the only matching display profile: %s", profile_name);
+                xfconf_channel_set_string (helper->channel, "/ActiveProfile", (gchar *) profile);
                 g_free (profile_name);
                 g_free (property);
                 return GDK_FILTER_CONTINUE;
@@ -481,6 +482,7 @@ xfce_displays_helper_screen_on_event (GdkXEvent *xevent,
                 xfsettings_dbg (XFSD_DEBUG_DISPLAYS, "Found %d matching display profiles.", g_list_length (profiles));
             }
         }
+        xfconf_channel_set_string (helper->channel, "/ActiveProfile", "Default");
 
         if (old_outputs->len > helper->outputs->len)
         {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list