[Xfce4-commits] <xfce4-settings:master> Set the edit button insensitive for arrays.
Jérôme Guelfucci
noreply at xfce.org
Tue Jan 19 19:34:34 CET 2010
Updating branch refs/heads/master
to f2053975a415ceafbc7ce1fe749470851d0343a5 (commit)
from 2a346d6efc0db7451f328ef4e6c2182b68195d10 (commit)
commit f2053975a415ceafbc7ce1fe749470851d0343a5
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date: Thu Jan 14 20:11:40 2010 +0100
Set the edit button insensitive for arrays.
xfce4-settings-editor/main_window.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/xfce4-settings-editor/main_window.c b/xfce4-settings-editor/main_window.c
index 914c2bc..57b9a57 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -527,6 +527,7 @@ cb_property_treeview_selection_changed (GtkTreeSelection *selection, GtkBuilder
GObject *property_revert_button;
GValue value = {0, };
gchar *prop_name = NULL;
+ const gchar *prop_type;
gchar *temp = NULL;
property_edit_button = gtk_builder_get_object (builder, "property_edit_button");
@@ -578,7 +579,9 @@ cb_property_treeview_selection_changed (GtkTreeSelection *selection, GtkBuilder
gtk_tree_selection_get_selected (selection, &model, &iter);
gtk_tree_model_get_value (model, &iter, 1, &value);
- if (g_strcmp0 (g_value_get_string (&value), "Empty") == 0)
+ prop_type = g_value_get_string (&value);
+
+ if ((g_strcmp0 (prop_type, "Empty") == 0) || g_strcmp0 (prop_type, "GPtrArray_GValue_") == 0)
gtk_widget_set_sensitive (GTK_WIDGET (property_edit_button), FALSE);
g_value_unset (&value);
}
More information about the Xfce4-commits
mailing list