[Xfce4-commits] [xfce/xfce4-settings] 09/67: display: Clear combobox when deleting current profile
noreply at xfce.org
noreply at xfce.org
Sat Sep 22 11:23:00 CEST 2018
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 0519f3fae48cc934ff883cf2ef0860fec4515188
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Mon Aug 13 23:35:10 2018 +0200
display: Clear combobox when deleting current profile
---
dialogs/display-settings/main.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dialogs/display-settings/main.c b/dialogs/display-settings/main.c
index e6828fb..81a677e 100644
--- a/dialogs/display-settings/main.c
+++ b/dialogs/display-settings/main.c
@@ -1448,7 +1448,7 @@ profile_save (GtkWidget *widget, GtkBuilder *builder)
{
GtkWidget *entry = gtk_bin_get_child((GtkBin*)gtk_builder_get_object (builder, "randr-profile"));
- if(gtk_entry_get_text_length(GTK_ENTRY(entry)))
+ if (gtk_entry_get_text_length(GTK_ENTRY(entry)))
{
guint i = 0;
for (i=0; i < xfce_randr->noutput; i++)
@@ -1461,7 +1461,7 @@ static void
profile_load (GtkWidget *widget, GtkBuilder *builder)
{
GtkWidget *entry = gtk_bin_get_child((GtkBin*)gtk_builder_get_object (builder, "randr-profile"));
- if(gtk_entry_get_text_length(GTK_ENTRY(entry)))
+ if (gtk_entry_get_text_length(GTK_ENTRY(entry)))
{
xfce_randr_apply (xfce_randr, gtk_entry_get_text(GTK_ENTRY(entry)), display_channel);
}
@@ -1471,12 +1471,13 @@ static void
profile_delete (GtkWidget *widget, GtkBuilder *builder)
{
GtkWidget *entry = gtk_bin_get_child((GtkBin*)gtk_builder_get_object (builder, "randr-profile"));
- if(gtk_entry_get_text_length(GTK_ENTRY(entry)))
+ if (gtk_entry_get_text_length (GTK_ENTRY (entry)))
{
- GString *buf = g_string_new(gtk_entry_get_text(GTK_ENTRY(entry)));
- g_string_prepend_c(buf, '/');
- xfconf_channel_reset_property(display_channel, buf->str, True);
+ GString *buf = g_string_new (gtk_entry_get_text(GTK_ENTRY(entry)));
+ g_string_prepend_c (buf, '/');
+ xfconf_channel_reset_property (display_channel, buf->str, True);
profile_combobox_populate (builder);
+ gtk_entry_set_text(GTK_ENTRY(entry), "");
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list