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.
This commit is contained in:
Tim Janik
1999-01-11 12:22:52 +00:00
committed by Tim Janik
parent f3af00f450
commit e3ee9e9d7d
17 changed files with 210 additions and 33 deletions

View File

@ -1522,7 +1522,7 @@ gtk_notebook_focus (GtkContainer *container,
notebook = GTK_NOTEBOOK (container);
if (!GTK_WIDGET_DRAWABLE (notebook) || !GTK_WIDGET_SENSITIVE (container) ||
if (!GTK_WIDGET_DRAWABLE (notebook) || !GTK_WIDGET_IS_SENSITIVE (container) ||
!notebook->children || !notebook->cur_page)
return FALSE;
@ -1532,7 +1532,7 @@ gtk_notebook_focus (GtkContainer *container,
if (!notebook->show_tabs)
{
if (GTK_WIDGET_DRAWABLE (notebook->cur_page->child) &&
GTK_WIDGET_SENSITIVE (notebook->cur_page->child))
GTK_WIDGET_IS_SENSITIVE (notebook->cur_page->child))
{
if (GTK_IS_CONTAINER (notebook->cur_page->child))
{