Updating branch refs/heads/master
to d1baceda081f201558a09622fc620491c1daf215 (commit)
from fc4d2ba9e6a31dcefb8088a94b1762d614b6332e (commit)
commit d1baceda081f201558a09622fc620491c1daf215
Author: Jérôme Guelfucci <[email protected]>
Date: Mon Dec 21 00:17:24 2009 +0100
Only allow to edit the property if it's not locked.
xfce4-settings-editor/main_window.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/xfce4-settings-editor/main_window.c
b/xfce4-settings-editor/main_window.c
index 6ed731a..446e9a8 100644
--- a/xfce4-settings-editor/main_window.c
+++ b/xfce4-settings-editor/main_window.c
@@ -60,7 +60,7 @@ load_properties (XfconfChannel *channel, GtkTreeStore *store,
GtkTreeView *treev
static void
cb_channel_treeview_selection_changed (GtkTreeSelection *selection, gpointer
user_data);
static void
-cb_property_treeview_selection_changed (GtkTreeSelection *selection, gpointer
user_data);
+cb_property_treeview_selection_changed (GtkTreeSelection *selection, GtkWidget
*edit_button);
static void
cb_property_treeview_row_activated (GtkTreeView *tree_view, GtkTreePath *path,
GtkTreeViewColumn *column, gpointer user_data);
@@ -148,7 +148,7 @@ xfce4_settings_editor_main_window_new(void)
g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK
(cb_channel_treeview_selection_changed), NULL);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW
(property_treeview));
- g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK
(cb_property_treeview_selection_changed), NULL);
+ g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK
(cb_property_treeview_selection_changed), property_edit_button);
/* Connect signal-handlers to toolbar buttons */
@@ -442,7 +442,7 @@ cb_channel_treeview_selection_changed (GtkTreeSelection
*selection, gpointer use
}
static void
-cb_property_treeview_selection_changed (GtkTreeSelection *selection, gpointer
user_data)
+cb_property_treeview_selection_changed (GtkTreeSelection *selection, GtkWidget
*edit_button)
{
GtkTreeModel *model;
GtkTreeIter iter;
@@ -481,6 +481,10 @@ cb_property_treeview_selection_changed (GtkTreeSelection
*selection, gpointer us
}
current_property = prop_name;
+
+ /* Set the state of the edit button */
+ gtk_widget_set_sensitive (edit_button,
+ !xfconf_channel_is_property_locked
(current_channel, current_property));
}
static void
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits