[Xfce4-commits] [xfce/xfce4-settings] 01/01: display: Don't warn on deleting last profile
noreply at xfce.org
noreply at xfce.org
Wed Aug 7 09:32:28 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 6592ab6b6b431ae2e60ee60f116cc0ddad3fabb6
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Aug 7 09:32:09 2019 +0200
display: Don't warn on deleting last profile
---
dialogs/display-settings/main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index 46e6e59..ab9aad8 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1489,15 +1489,16 @@ display_settings_dialog_response (GtkDialog *dialog,
else if (response_id == GTK_RESPONSE_CLOSE)
{
gchar *new_active_profile = xfconf_channel_get_string (display_channel, "/ActiveProfile", NULL);
+ gchar *property = g_strdup_printf ("/%s", active_profile);
+ gchar *profile_name = xfconf_channel_get_string (display_channel, property, NULL);
if (g_strcmp0 (active_profile, new_active_profile) != 0 &&
+ profile_name != NULL &&
g_strcmp0 (active_profile, "Default") != 0)
{
GtkBuilder *profile_changed_builder;
GError *error = NULL;
gint profile_response_id;
- gchar *property = g_strdup_printf ("/%s", active_profile);
- gchar *profile_name = xfconf_channel_get_string (display_channel, property, NULL);
profile_changed_builder = gtk_builder_new ();
@@ -1548,9 +1549,9 @@ display_settings_dialog_response (GtkDialog *dialog,
}
g_object_unref (G_OBJECT (profile_changed_builder));
- g_free (profile_name);
- g_free (property);
}
+ g_free (profile_name);
+ g_free (property);
g_free (new_active_profile);
g_free (active_profile);
gtk_widget_destroy (GTK_WIDGET (dialog));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list