summaryrefslogtreecommitdiff
path: root/gtk/gtktreeitem.c
diff options
context:
space:
mode:
authorElliot Lee <sopwith@src.gnome.org>1998-01-27 03:57:59 +0000
committerElliot Lee <sopwith@src.gnome.org>1998-01-27 03:57:59 +0000
commit918f7d484df52c9af2d76a5a779fa406a2c9f0cd (patch)
tree95a01ecc3672bde50e66e6f504e4e95887273080 /gtk/gtktreeitem.c
parent2c4b378455ef0ee5e83d136a710e5658b31deef7 (diff)
downloadgtk+-918f7d484df52c9af2d76a5a779fa406a2c9f0cd.tar.gz
Fixed widget sensitivity for the treeitem - please review at leisure
Diffstat (limited to 'gtk/gtktreeitem.c')
-rw-r--r--gtk/gtktreeitem.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 71f833d37e..c9f2753f36 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -171,6 +171,8 @@ gtk_tree_item_subtree_button_click (GtkWidget *widget)
GtkTreeItem* item;
item = (GtkTreeItem*) gtk_object_get_user_data(GTK_OBJECT(widget));
+ if(!GTK_WIDGET_IS_SENSITIVE(item))
+ return;
if(item->expanded)
gtk_tree_item_collapse(item);
@@ -678,8 +680,9 @@ gtk_tree_item_button_press (GtkWidget *widget,
g_return_val_if_fail (GTK_IS_TREE_ITEM (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
- if (event->type == GDK_BUTTON_PRESS)
- if (!GTK_WIDGET_HAS_FOCUS (widget))
+ if (event->type == GDK_BUTTON_PRESS
+ && GTK_WIDGET_IS_SENSITIVE(widget)
+ && !GTK_WIDGET_HAS_FOCUS (widget))
gtk_widget_grab_focus (widget);
return FALSE;
@@ -738,7 +741,8 @@ gtk_real_tree_item_select (GtkItem *item)
g_return_if_fail (item != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (item));
- if (GTK_WIDGET (item)->state == GTK_STATE_SELECTED)
+ if (GTK_WIDGET (item)->state == GTK_STATE_SELECTED
+ || !GTK_WIDGET_IS_SENSITIVE(item))
return;
if(GTK_TREE(GTK_WIDGET(item)->parent)->view_mode == GTK_TREE_VIEW_LINE)
@@ -777,6 +781,9 @@ gtk_real_tree_item_toggle (GtkItem *item)
g_return_if_fail (item != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (item));
+ if(!GTK_WIDGET_IS_SENSITIVE(item))
+ return;
+
if (GTK_WIDGET (item)->parent && GTK_IS_TREE (GTK_WIDGET (item)->parent))
gtk_tree_select_child (GTK_TREE (GTK_WIDGET (item)->parent),
GTK_WIDGET (item));