summaryrefslogtreecommitdiff
path: root/gtk/gtkcontainer.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-01-11 12:22:52 +0000
committerTim Janik <timj@src.gnome.org>1999-01-11 12:22:52 +0000
commite3ee9e9d7dab56082480e2c77191d00f2e559670 (patch)
treef4ae947e100784a18c580caca44da31e9a1382da /gtk/gtkcontainer.c
parentf3af00f4501d4f019146b1be468fb81723f6da1a (diff)
downloadgtk+-e3ee9e9d7dab56082480e2c77191d00f2e559670.tar.gz
only pass key events to the focus widget if it is sensitive.
Mon Jan 11 13:18:37 1999 Tim Janik <timj@gtk.org> * gtk/gtkwindow.c: (gtk_window_key_release_event): (gtk_window_key_press_event): only pass key events to the focus widget if it is sensitive. * gtk/gtkmenuitem.c (gtk_menu_item_select_timeout): don't popup the submenu if it isn't sensitive. (gtk_menu_item_paint): state_type doesn't need to be reset to GTK_STATE_INSENSITIVE if the widget is insensitive anyways. * gtk/gtkcontainer.c (gtk_container_real_focus): * gtk/gtklist.c (gtk_list_focus): * gtk/gtkmenushell.c (gtk_menu_shell_move_selected): * gtk/gtknotebook.c (gtk_notebook_focus): s/GTK_WIDGET_SENSITIVE/GTK_WIDGET_IS_SENSITIVE/ since a widgets sensitivity is determined through the parent as well, GTK_WIDGET_SENSITIVE is only of interest inside gtkwidget.c, everywhere else GTK_WIDGET_IS_SENSITIVE (widget) needs to be used to check for sensitivity. * gtk/gtkaccelgroup.c (gtk_accel_group_activate): don't activate object if it is an insensitive widget.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r--gtk/gtkcontainer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index f375ae268f..ce8cc9ba2f 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -1394,7 +1394,7 @@ gtk_container_real_focus (GtkContainer *container,
/* Fail if the container is inappropriate for focus movement
*/
if (!GTK_WIDGET_DRAWABLE (container) ||
- !GTK_WIDGET_SENSITIVE (container))
+ !GTK_WIDGET_IS_SENSITIVE (container))
return FALSE;
return_val = FALSE;
@@ -1422,7 +1422,7 @@ gtk_container_real_focus (GtkContainer *container,
tmp_list = children;
while (tmp_list)
{
- if (GTK_WIDGET_SENSITIVE (tmp_list->data) &&
+ if (GTK_WIDGET_IS_SENSITIVE (tmp_list->data) &&
GTK_WIDGET_DRAWABLE (tmp_list->data) &&
(GTK_IS_CONTAINER (tmp_list->data) || GTK_WIDGET_CAN_FOCUS (tmp_list->data)))
tmp_list = tmp_list->next;