numeric keypad, tooltips/whatsthis key



Hi,

This patch adds GDK_KP_* keybindings all over the place. It even
supports KP_space, KP_Tab and other things that aren't even on my
keypad. ;-)

It also adds show_tooltips and show_whats_this action signals to
GtkWidget, the latter just for future expansion or something.
Thinking about it right now, I think a better solution would be 
a show_help taking a GtkHelpType enum with values for 
tooltips, whatsthis, and maybe other stuff in the future.
If people agree I'll change it to work that way.

The actual gtktooltips changes aren't really right; the tooltip
doesn't pop down in a coherent way. Calum suggests that the tooltip
pop down on Escape or focus switch. This is really painful to
implement, because doing it on Escape requires the tip to grab
keyboard, and doing it on focus switch requires events to go to the
window the tooltip is popped up for. Probably we can't just pop down
on any key event since some may be needed for accessible navigation.

The only implementations I can come up with require hardcoding the
Escape key, because binding sets always absorb the keys they bind, and
here we need to absorb Escape only in this one situation and pass
through otherwise. Solutions involving enable/disable on binding
signals or allowing binding signal emissions to indicate "event
unhandled" seem a bit like overkill, but may be of general use.

The patch also changes GtkDialog to use binding set for the Escape
shortcut.

ChangeLog contains the GDK changes I posted a few days ago (mostly
pixbuf_from_drawable fixes), but I don't have the gdk subdir included
in the patch.

Havoc

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.1949
diff -u -u -r1.1949 ChangeLog
--- ChangeLog	2001/05/10 23:22:13	1.1949
+++ ChangeLog	2001/05/11 04:10:05
@@ -1,3 +1,84 @@
+2001-05-06  Havoc Pennington  <hp pobox com>
+
+	* gtk/gtktext.c (gtk_text_key_press): numeric keypad support
+
+	* gtk/gtkspinbutton.c (gtk_spin_button_key_press): numeric keypad
+	support (should be using binding set here)
+
+	* gtk/gtkoptionmenu.c (gtk_option_menu_key_press): numeric keypad
+	support (should be using binding set here)
+
+	* gtk/gtkmenushell.c (gtk_menu_shell_class_init): numeric keypad 
+	support
+
+	* gtk/gtkmenu.c (gtk_menu_class_init): numeric keypad support
+
+	* gtk/gtkmenubar.c (gtk_menu_bar_class_init): numeric keypad
+
+	* gtk/gtklistitem.c (gtk_list_item_class_init): numeric keypad
+
+	* gtk/gtkimcontextsimple.c
+	(gtk_im_context_simple_filter_keypress): keypad
+
+	* gtk/gtkfilesel.c (gtk_file_selection_key_press): keypad 
+
+	* gtk/gtkentry.c (gtk_entry_class_init): numeric keypad fixes
+
+	* gtk/gtkctree.c (gtk_ctree_class_init): numeric keypad support
+
+	* gtk/gtkcolorsel.c (palette_activate): keypad support (of course,
+	should be binding-setted)
+
+	* gtk/gtkwindow.c (gtk_window_class_init): numeric keypad fixes
+
+	* gtk/gtkclist.c (gtk_clist_class_init): numeric keypad fixes
+
+	* gtk/gtkcalendar.c: numeric keypad fixes
+
+	* gtk/gtktextview.c (gtk_text_view_class_init): numeric keypad
+	support
+
+	* gdk/gdkwindow.c (gdk_window_get_clip_region): fix infinite loop
+	screwup
+
+	* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap):
+	error trap around getting the colormap
+
+	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha): 
+	clip the render area to the drawable's clip region in advance,
+	so we don't get data from the server that we don't need.
+
+	* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): push an error
+	trap around XGetImage()
+
+	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
+	check return value of gdk_pixbuf_get_from_drawable(), fall back 
+	to bilevel alpha if we can't get the pixbuf to composite against.
+
+	* gdk/gdkdraw.c (gdk_drawable_get_image): set the image colormap
+
+	* gdk/gdkimage.c (gdk_image_get_colormap): add
+	gdk_image_set_colormap, gdk_image_get_colormap
+
+	* gdk/gdkpixbuf-drawable.c (rgbconvert): always use the fallback
+	converter if the dest pixbuf has alpha, the fast converters don't
+	handle it. Change all converters to take a region of the image,
+	instead of converting the entire image.
+
+	* gtk/gtkwidget.h (struct _GtkWidgetClass): add show_tooltip and
+	show_whats_this keybinding signals. Add default bindings for
+	those. Add default handler for show_tooltip that shows the tooltip
+	for the widget.
+
+	* gtk/gtkdialog.c (gtk_dialog_class_init): add binding set and
+	"close" keybinding signal, remove key press handler.
+
+	* gtk/gtktooltips.c (gtk_tooltips_set_colors): Just remove this,
+	it's not our usual practice to leave a deprecated function around
+	with a runtime warning, plus we don't want it to appear in docs,
+	plus if we make them yellow no one will want to change them
+	anyhow.
+
 Fri May 11 01:05:00 2001  Tim Janik  <timj gtk org>
 
 	* gtk/gtktypeutils.h: grum, gtk_type_class() is not GNUC_CONST
Index: gtk/gtkcalendar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcalendar.c,v
retrieving revision 1.33
diff -u -u -r1.33 gtkcalendar.c
--- gtk/gtkcalendar.c	2001/04/04 21:16:47	1.33
+++ gtk/gtkcalendar.c	2001/05/11 04:10:06
@@ -2648,6 +2648,7 @@
 
   switch (event->keyval)
     {
+    case GDK_KP_Left:
     case GDK_Left:
       return_val = TRUE;
       if (event->state & GDK_CONTROL_MASK)
@@ -2670,6 +2671,7 @@
 				  calendar->focus_col);
 	}
       break;
+    case GDK_KP_Right:
     case GDK_Right:
       return_val = TRUE;
       if (event->state & GDK_CONTROL_MASK)
@@ -2692,6 +2694,7 @@
 				  calendar->focus_col);
 	}
       break;
+    case GDK_KP_Up:
     case GDK_Up:
       return_val = TRUE;
       if (event->state & GDK_CONTROL_MASK)
@@ -2709,6 +2712,7 @@
 				  calendar->focus_col);
 	}
       break;
+    case GDK_KP_Down:
     case GDK_Down:
       return_val = TRUE;
       if (event->state & GDK_CONTROL_MASK)
@@ -2726,6 +2730,7 @@
 				  calendar->focus_col);
 	}
       break;
+    case GDK_KP_Space:
     case GDK_space:
       row = calendar->focus_row;
       col = calendar->focus_col;
Index: gtk/gtkclist.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.c,v
retrieving revision 1.193
diff -u -u -r1.193 gtkclist.c
--- gtk/gtkclist.c	2001/04/24 14:58:31	1.193
+++ gtk/gtkclist.c	2001/05/11 04:10:07
@@ -733,80 +733,157 @@
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, GDK_CONTROL_MASK,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0);
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Home,
 				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home,
+                                GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_End,
 				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End,
+				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
 
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
+
   gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0);
 
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
 				"undo_selection", 0);
   gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
 				"abort_column_resize", 0);
   gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
 				"toggle_focus_row", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+				"toggle_focus_row", 0);  
   gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
+				"toggle_add_mode", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
 				"toggle_add_mode", 0);
-  gtk_binding_entry_add_signal (binding_set, '/', GDK_CONTROL_MASK,
+  gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
+				"select_all", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Divide, GDK_CONTROL_MASK,
 				"select_all", 0);
   gtk_binding_entry_add_signal (binding_set, '\\', GDK_CONTROL_MASK,
 				"unselect_all", 0);
Index: gtk/gtkcolorsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcolorsel.c,v
retrieving revision 1.67
diff -u -u -r1.67 gtkcolorsel.c
--- gtk/gtkcolorsel.c	2001/05/07 15:58:44	1.67
+++ gtk/gtkcolorsel.c	2001/05/11 04:10:07
@@ -955,7 +955,10 @@
 		  gpointer     data)
 {
   /* should have a drawing area subclass with an activate signal */
-  if ((event->keyval == ' ') || (event->keyval == GDK_Return))
+  if ((event->keyval == GDK_space) ||
+      (event->keyval == GDK_Return) ||
+      (event->keyval == GDK_KP_Enter) ||
+      (event->keyval == GDK_KP_Space))
     {
       if (GPOINTER_TO_INT (gtk_object_get_data (GTK_OBJECT (widget), "color_set")) != 0)
         {
Index: gtk/gtkcombo.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcombo.c,v
retrieving revision 1.49
diff -u -u -r1.49 gtkcombo.c
--- gtk/gtkcombo.c	2001/04/28 00:12:44	1.49
+++ gtk/gtkcombo.c	2001/05/11 04:10:07
@@ -176,7 +176,10 @@
   GList *li;
 
   /* completion */
-  if ((event->keyval == GDK_Tab) && (event->state & GDK_MOD1_MASK)) 
+  if ((event->keyval == GDK_Tab ||
+       event->keyval == GDK_ISO_Left_Tab ||
+       event->keyval == GDK_KP_Tab) &&
+      (event->state & GDK_MOD1_MASK)) 
     {
       GtkEditable *editable = GTK_EDITABLE (entry);
     GCompletion * cmpl;
Index: gtk/gtkctree.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkctree.c,v
retrieving revision 1.84
diff -u -u -r1.84 gtkctree.c
--- gtk/gtkctree.c	2001/04/24 14:58:32	1.84
+++ gtk/gtkctree.c	2001/05/11 04:10:08
@@ -474,36 +474,45 @@
 
   binding_set = gtk_binding_set_by_class (klass);
   gtk_binding_entry_add_signal (binding_set,
-				'+', GDK_SHIFT_MASK,
+				GDK_plus, GDK_SHIFT_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
   gtk_binding_entry_add_signal (binding_set,
-				'+', 0,
+				GDK_plus, 0,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
   gtk_binding_entry_add_signal (binding_set,
-				'+', GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+				GDK_plus, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
   gtk_binding_entry_add_signal (binding_set,
-				'+', GDK_CONTROL_MASK,
+				GDK_plus, GDK_CONTROL_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
+
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Add, GDK_SHIFT_MASK,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_KP_Add, 0,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Add, GDK_CONTROL_MASK | GDK_SHIFT_MASK,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_KP_Add, GDK_CONTROL_MASK,
 				"change_focus_row_expansion", 1,
-				GTK_TYPE_ENUM,
-				GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_EXPAND_RECURSIVE);
+  
   gtk_binding_entry_add_signal (binding_set,
-				'-', 0,
+				GDK_minus, 0,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_COLLAPSE);
   gtk_binding_entry_add_signal (binding_set,
-				'-', GDK_CONTROL_MASK,
+                                GDK_minus, GDK_CONTROL_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM,
 				GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE);
@@ -516,23 +525,40 @@
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM,
 				GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE);
+  gtk_binding_entry_add_signal (binding_set,
+				GDK_equal, 0,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
   gtk_binding_entry_add_signal (binding_set,
-				'=', 0,
+				GDK_KP_Equal, 0,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
   gtk_binding_entry_add_signal (binding_set,
-				'=', GDK_SHIFT_MASK,
+				GDK_equal, GDK_SHIFT_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
   gtk_binding_entry_add_signal (binding_set,
+                                GDK_KP_Equal, GDK_SHIFT_MASK,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_KP_Multiply, 0,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_asterisk, 0,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM, GTK_CTREE_EXPANSION_TOGGLE);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_KP_Multiply, GDK_CONTROL_MASK,
 				"change_focus_row_expansion", 1,
 				GTK_TYPE_ENUM,
 				GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE);
+  gtk_binding_entry_add_signal (binding_set,
+				GDK_asterisk, GDK_CONTROL_MASK,
+				"change_focus_row_expansion", 1,
+				GTK_TYPE_ENUM,
+				GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE);  
 }
 
 static void
Index: gtk/gtkdialog.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkdialog.c,v
retrieving revision 1.24
diff -u -u -r1.24 gtkdialog.c
--- gtk/gtkdialog.c	2001/04/30 23:23:52	1.24
+++ gtk/gtkdialog.c	2001/05/11 04:10:08
@@ -33,11 +33,10 @@
 #include "gdkkeysyms.h"
 #include "gtkmain.h"
 #include "gtkintl.h"
+#include "gtkbindings.h"
 
 static void gtk_dialog_class_init (GtkDialogClass *klass);
 static void gtk_dialog_init       (GtkDialog      *dialog);
-static gint gtk_dialog_key_press  (GtkWidget      *widget,
-                                   GdkEventKey    *key);                                   
 
 static void gtk_dialog_add_buttons_valist (GtkDialog   *dialog,
                                            const gchar *first_button_text,
@@ -58,6 +57,8 @@
 static void gtk_dialog_style_set         (GtkWidget        *widget,
                                           GtkStyle         *prev_style);
 
+static void gtk_dialog_close             (GtkDialog        *dialog);
+
 enum {
   PROP_0,
   PROP_HAS_SEPARATOR
@@ -65,6 +66,7 @@
 
 enum {
   RESPONSE,
+  CLOSE,
   LAST_SIGNAL
 };
 
@@ -102,18 +104,20 @@
   GObjectClass *gobject_class;
   GtkObjectClass *object_class;
   GtkWidgetClass *widget_class;
-
+  GtkBindingSet *binding_set;
+  
   gobject_class = G_OBJECT_CLASS (class);
   object_class = GTK_OBJECT_CLASS (class);
   widget_class = GTK_WIDGET_CLASS (class);
-
+  
   parent_class = g_type_class_peek_parent (class);
 
   gobject_class->set_property = gtk_dialog_set_property;
   gobject_class->get_property = gtk_dialog_get_property;
   
-  widget_class->key_press_event = gtk_dialog_key_press;
   widget_class->style_set = gtk_dialog_style_set;
+
+  class->close = gtk_dialog_close;
   
   g_object_class_install_property (gobject_class,
                                    PROP_HAS_SEPARATOR,
@@ -132,6 +136,14 @@
 		    GTK_TYPE_NONE, 1,
                     GTK_TYPE_INT);
 
+  dialog_signals[CLOSE] =
+    gtk_signal_new ("close",
+                    GTK_RUN_LAST | GTK_RUN_ACTION,
+                    GTK_CLASS_TYPE (object_class),
+                    GTK_SIGNAL_OFFSET (GtkDialogClass, close),
+                    gtk_marshal_NONE__NONE,
+		    GTK_TYPE_NONE, 0);
+  
   gtk_widget_class_install_style_property (widget_class,
 					   g_param_spec_int ("content_area_border",
                                                              _("Content area border"),
@@ -157,6 +169,11 @@
                                                              G_MAXINT,
                                                              5,
                                                              G_PARAM_READABLE));
+
+  binding_set = gtk_binding_set_by_class (class);
+  
+  gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
+                                "close", 0);
 }
 
 static void
@@ -277,37 +294,32 @@
   return FALSE;
 }
 
-static gint
-gtk_dialog_key_press (GtkWidget   *widget,
-                      GdkEventKey *key)
+static void
+gtk_dialog_style_set (GtkWidget *widget,
+                      GtkStyle  *prev_style)
+{
+  update_spacings (GTK_DIALOG (widget));
+}
+
+static void
+gtk_dialog_close (GtkDialog *dialog)
 {
+  /* Synthesize delete_event to close dialog. */
+  
   GdkEventAny event;
+  GtkWidget *widget;
 
+  widget = GTK_WIDGET (dialog);
+  
   event.type = GDK_DELETE;
   event.window = widget->window;
   event.send_event = TRUE;
-
-  if (GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, key))
-    return TRUE;
-
-  if (key->keyval != GDK_Escape)
-    return FALSE;
-
-  /* Synthesize delete_event to close dialog. */
+  
   g_object_ref (G_OBJECT (event.window));
   
   gtk_main_do_event ((GdkEvent*)&event);
   
   g_object_unref (G_OBJECT (event.window));
-
-  return TRUE;
-}
-
-static void
-gtk_dialog_style_set (GtkWidget *widget,
-                      GtkStyle  *prev_style)
-{
-  update_spacings (GTK_DIALOG (widget));
 }
 
 GtkWidget*
Index: gtk/gtkdialog.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkdialog.h,v
retrieving revision 1.12
diff -u -u -r1.12 gtkdialog.h
--- gtk/gtkdialog.h	2001/03/07 21:32:51	1.12
+++ gtk/gtkdialog.h	2001/05/11 04:10:08
@@ -109,6 +109,10 @@
   GtkWindowClass parent_class;
 
   void (* response) (GtkDialog *dialog, gint response_id);
+
+  /* Keybinding signals */
+
+  void (* close)    (GtkDialog *dialog);
 };
 
 
Index: gtk/gtkentry.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
retrieving revision 1.128
diff -u -u -r1.128 gtkentry.c
--- gtk/gtkentry.c	2001/05/03 00:46:18	1.128
+++ gtk/gtkentry.c	2001/05/11 04:10:09
@@ -675,10 +675,17 @@
 				"delete_from_cursor", 2,
 				GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
 				GTK_TYPE_INT, 1);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
+				"delete_from_cursor", 2,
+				GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
+				GTK_TYPE_INT, 1);
   gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_MOD1_MASK,
 				"insert_at_cursor", 1,
 				GTK_TYPE_STRING, " ");
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
+				"insert_at_cursor", 1,
+				GTK_TYPE_STRING, " ");
+  
   gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_MOD1_MASK,
 				"delete_from_cursor", 2,
 				GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
@@ -703,6 +710,8 @@
 
   /* Overwrite */
   gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
+				"toggle_overwrite", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Insert, 0,
 				"toggle_overwrite", 0);
 }
 
Index: gtk/gtkfilesel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkfilesel.c,v
retrieving revision 1.80
diff -u -u -r1.80 gtkfilesel.c
--- gtk/gtkfilesel.c	2001/04/28 20:18:27	1.80
+++ gtk/gtkfilesel.c	2001/05/11 04:10:10
@@ -1416,7 +1416,9 @@
   g_return_val_if_fail (widget != NULL, FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
-  if (event->keyval == GDK_Tab)
+  if (event->keyval == GDK_Tab ||
+      event->keyval == GDK_ISO_Left_Tab ||
+      event->keyval == GDK_KP_Tab)
     {
       fs = GTK_FILE_SELECTION (user_data);
 #ifdef G_WITH_CYGWIN
Index: gtk/gtkimcontextsimple.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkimcontextsimple.c,v
retrieving revision 1.13
diff -u -u -r1.13 gtkimcontextsimple.c
--- gtk/gtkimcontextsimple.c	2001/03/29 00:24:57	1.13
+++ gtk/gtkimcontextsimple.c	2001/05/11 04:10:10
@@ -1153,7 +1153,9 @@
       if ((event->state & (ISO_14755_MOD_MASK)) == ISO_14755_MOD_MASK)
         {
           /* space ends the sequence, and we eat the space */
-          if (n_compose > 1 && event->keyval == GDK_space)
+          if (n_compose > 1 &&
+              (event->keyval == GDK_space ||
+               event->keyval == GDK_KP_Space))
             {
               gtk_im_context_simple_commit_char (context, context_simple->tentative_match);
               context_simple->compose_buffer[0] = 0;
Index: gtk/gtklistitem.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklistitem.c,v
retrieving revision 1.28
diff -u -u -r1.28 gtklistitem.c
--- gtk/gtklistitem.c	2001/04/16 20:33:02	1.28
+++ gtk/gtklistitem.c	2001/05/11 04:10:10
@@ -207,78 +207,152 @@
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Down, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, 0,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, 0,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Home, GDK_CONTROL_MASK,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, GDK_CONTROL_MASK,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_End, GDK_CONTROL_MASK,
 				"scroll_vertical", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0);
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
+				"scroll_vertical", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Up, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Down, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Up, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Up, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Page_Down, GDK_SHIFT_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Page_Down, GDK_SHIFT_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_PAGE_FORWARD,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_Home,
 				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home,
+				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0, GTK_TYPE_BOOL, TRUE);
   gtk_binding_entry_add_signal (binding_set, GDK_End,
 				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
 				"extend_selection", 3,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End,
+				GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+				"extend_selection", 3,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0, GTK_TYPE_BOOL, TRUE);
 
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Left, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Left, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_BACKWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Right, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Right, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_STEP_FORWARD,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_Home, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 0.0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Home, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 0.0);
   gtk_binding_entry_add_signal (binding_set, GDK_End, 0,
 				"scroll_horizontal", 2,
 				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
 				GTK_TYPE_FLOAT, 1.0);
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_End, 0,
+				"scroll_horizontal", 2,
+				GTK_TYPE_ENUM, GTK_SCROLL_JUMP,
+				GTK_TYPE_FLOAT, 1.0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Escape, 0,
 				"undo_selection", 0);
   gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
 				"toggle_focus_row", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+				"toggle_focus_row", 0);
   gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
+				"toggle_add_mode", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
 				"toggle_add_mode", 0);
-  gtk_binding_entry_add_signal (binding_set, '/', GDK_CONTROL_MASK,
+  gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
+				"select_all", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Divide, GDK_CONTROL_MASK,
 				"select_all", 0);
   gtk_binding_entry_add_signal (binding_set, '\\', GDK_CONTROL_MASK,
 				"unselect_all", 0);
Index: gtk/gtkmenu.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmenu.c,v
retrieving revision 1.62
diff -u -u -r1.62 gtkmenu.c
--- gtk/gtkmenu.c	2001/04/28 00:12:44	1.62
+++ gtk/gtkmenu.c	2001/05/11 04:10:11
@@ -187,17 +187,37 @@
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_PREV);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Up, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_PREV);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Down, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_NEXT);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Down, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_NEXT);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Left, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_PARENT);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Left, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_PARENT);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Right, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_CHILD);
+  gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Right, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_CHILD);
Index: gtk/gtkmenubar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmenubar.c,v
retrieving revision 1.24
diff -u -u -r1.24 gtkmenubar.c
--- gtk/gtkmenubar.c	2001/04/28 00:12:44	1.24
+++ gtk/gtkmenubar.c	2001/05/11 04:10:13
@@ -112,21 +112,41 @@
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_PREV);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Left, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_PREV);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Right, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_NEXT);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Right, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_NEXT);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Up, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_PARENT);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Up, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_PARENT);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_Down, 0,
 				"move_current", 1,
 				GTK_TYPE_MENU_DIRECTION_TYPE,
+				GTK_MENU_DIR_CHILD);
+  gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Down, 0,
+				"move_current", 1,
+				GTK_TYPE_MENU_DIRECTION_TYPE,
 				GTK_MENU_DIR_CHILD);
-
+  
   gtk_settings_install_property (gtk_settings_get_global (),
                                  g_param_spec_string ("gtk-menu-bar-accel",
                                                       _("Menu bar accelerator"),
Index: gtk/gtkmenushell.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmenushell.c,v
retrieving revision 1.42
diff -u -u -r1.42 gtkmenushell.c
--- gtk/gtkmenushell.c	2001/04/01 07:32:39	1.42
+++ gtk/gtkmenushell.c	2001/05/11 04:10:13
@@ -262,7 +262,17 @@
 				GTK_TYPE_BOOL,
 				TRUE);
   gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Enter, 0,
+				"activate_current", 1,
+				GTK_TYPE_BOOL,
+				TRUE);
+  gtk_binding_entry_add_signal (binding_set,
 				GDK_space, 0,
+				"activate_current", 1,
+				GTK_TYPE_BOOL,
+				FALSE);
+  gtk_binding_entry_add_signal (binding_set,
+				GDK_KP_Space, 0,
 				"activate_current", 1,
 				GTK_TYPE_BOOL,
 				FALSE);
Index: gtk/gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.88
diff -u -u -r1.88 gtknotebook.c
--- gtk/gtknotebook.c	2001/04/28 20:18:27	1.88
+++ gtk/gtknotebook.c	2001/05/11 04:10:23
@@ -384,7 +384,11 @@
                                 GDK_space, 0,
                                 "select_page", 1, 
                                 G_TYPE_BOOLEAN, FALSE);
-
+  gtk_binding_entry_add_signal (binding_set,
+                                GDK_KP_Space, 0,
+                                "select_page", 1, 
+                                G_TYPE_BOOLEAN, FALSE);
+  
   gtk_binding_entry_add_signal (binding_set,
                                 GDK_Home, 0,
                                 "focus_tab", 1, 
Index: gtk/gtkoptionmenu.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkoptionmenu.c,v
retrieving revision 1.45
diff -u -u -r1.45 gtkoptionmenu.c
--- gtk/gtkoptionmenu.c	2001/05/01 01:36:33	1.45
+++ gtk/gtkoptionmenu.c	2001/05/11 04:10:23
@@ -610,6 +610,7 @@
 
   switch (event->keyval)
     {
+    case GDK_KP_Space:
     case GDK_space:
       gtk_option_menu_remove_contents (option_menu);
       gtk_menu_popup (GTK_MENU (option_menu->menu), NULL, NULL,
Index: gtk/gtkspinbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkspinbutton.c,v
retrieving revision 1.59
diff -u -u -r1.59 gtkspinbutton.c
--- gtk/gtkspinbutton.c	2001/05/01 01:36:33	1.59
+++ gtk/gtkspinbutton.c	2001/05/11 04:10:23
@@ -1088,7 +1088,8 @@
   GtkSpinButton *spin;
   gint key;
   gboolean key_repeat = FALSE;
-
+  gboolean retval = FALSE;
+  
   g_return_val_if_fail (widget != NULL, FALSE);
   g_return_val_if_fail (GTK_IS_SPIN_BUTTON (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
@@ -1097,101 +1098,113 @@
   key = event->keyval;
 
   key_repeat = (event->time == spin->ev_time);
-
-  if (GTK_ENTRY (widget)->editable &&
-      (key == GDK_Up || key == GDK_Down || 
-       key == GDK_Page_Up || key == GDK_Page_Down))
-    gtk_spin_button_update (spin);
 
-  switch (key)
+  if (GTK_ENTRY (widget)->editable)
     {
-    case GDK_Up:
-
-      if (GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), 
-					"key_press_event");
-	  if (!key_repeat)
-	    spin->timer_step = spin->adjustment->step_increment;
-
-	 gtk_spin_button_real_spin (spin, spin->timer_step);
-
-	  if (key_repeat)
-	    {
-	      if (spin->climb_rate > 0.0 && spin->timer_step
-		  < spin->adjustment->page_increment)
-		{
-		  if (spin->timer_calls < MAX_TIMER_CALLS)
-		    spin->timer_calls++;
-		  else 
-		    {
-		      spin->timer_calls = 0;
-		      spin->timer_step += spin->climb_rate;
-		    }
-		}
-	    }
-	  return TRUE;
-	}
-      return FALSE;
-
-    case GDK_Down:
-
-      if (GTK_WIDGET_HAS_FOCUS (widget))
-	{
-	  gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), 
-					"key_press_event");
-	  if (!key_repeat)
-	    spin->timer_step = spin->adjustment->step_increment;
-
-	 gtk_spin_button_real_spin (spin, -spin->timer_step);
-
-	  if (key_repeat)
-	    {
-	      if (spin->climb_rate > 0.0 && spin->timer_step
-		  < spin->adjustment->page_increment)
-		{
-		  if (spin->timer_calls < MAX_TIMER_CALLS)
-		    spin->timer_calls++;
-		  else 
-		    {
-		      spin->timer_calls = 0;
-		      spin->timer_step += spin->climb_rate;
-		    }
-		}
-	    }
-	  return TRUE;
-	}
-      return FALSE;
-
-    case GDK_Page_Up:
-
-      if (event->state & GDK_CONTROL_MASK)
-	{
-	  gdouble diff = spin->adjustment->upper - spin->adjustment->value;
-	  if (diff > EPSILON)
-	    gtk_spin_button_real_spin (spin, diff);
-	}
-      else
-	gtk_spin_button_real_spin (spin, spin->adjustment->page_increment);
-      return TRUE;
-
-    case GDK_Page_Down:
+      switch (key)
+        {
+        case GDK_KP_Up:
+        case GDK_Up:
+
+          if (GTK_WIDGET_HAS_FOCUS (widget))
+            {
+              gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), 
+                                            "key_press_event");
+              if (!key_repeat)
+                spin->timer_step = spin->adjustment->step_increment;
+
+              gtk_spin_button_real_spin (spin, spin->timer_step);
+
+              if (key_repeat)
+                {
+                  if (spin->climb_rate > 0.0 && spin->timer_step
+                      < spin->adjustment->page_increment)
+                    {
+                      if (spin->timer_calls < MAX_TIMER_CALLS)
+                        spin->timer_calls++;
+                      else 
+                        {
+                          spin->timer_calls = 0;
+                          spin->timer_step += spin->climb_rate;
+                        }
+                    }
+                }
+              retval = TRUE;
+            }
+          break;
+
+        case GDK_KP_Down:
+        case GDK_Down:
+
+          if (GTK_WIDGET_HAS_FOCUS (widget))
+            {
+              gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), 
+                                            "key_press_event");
+              if (!key_repeat)
+                spin->timer_step = spin->adjustment->step_increment;
+
+              gtk_spin_button_real_spin (spin, -spin->timer_step);
+
+              if (key_repeat)
+                {
+                  if (spin->climb_rate > 0.0 && spin->timer_step
+                      < spin->adjustment->page_increment)
+                    {
+                      if (spin->timer_calls < MAX_TIMER_CALLS)
+                        spin->timer_calls++;
+                      else 
+                        {
+                          spin->timer_calls = 0;
+                          spin->timer_step += spin->climb_rate;
+                        }
+                    }
+                }
+              retval = TRUE;
+            }
+          break;
+
+        case GDK_KP_Page_Up:
+        case GDK_Page_Up:
+
+          if (event->state & GDK_CONTROL_MASK)
+            {
+              gdouble diff = spin->adjustment->upper - spin->adjustment->value;
+              if (diff > EPSILON)
+                gtk_spin_button_real_spin (spin, diff);
+            }
+          else
+            gtk_spin_button_real_spin (spin, spin->adjustment->page_increment);
+
+          retval = TRUE;
+          break;
+          
+        case GDK_KP_Page_Down:
+        case GDK_Page_Down:
+
+          if (event->state & GDK_CONTROL_MASK)
+            {
+              gdouble diff = spin->adjustment->value - spin->adjustment->lower;
+              if (diff > EPSILON)
+                gtk_spin_button_real_spin (spin, -diff);
+            }
+          else
+            gtk_spin_button_real_spin (spin, -spin->adjustment->page_increment);
+
+          retval = TRUE;
+          break;
+
+        default:
+          break;
+        }
+    }
 
-      if (event->state & GDK_CONTROL_MASK)
-	{
-	  gdouble diff = spin->adjustment->value - spin->adjustment->lower;
-	  if (diff > EPSILON)
-	    gtk_spin_button_real_spin (spin, -diff);
-	}
-      else
-	gtk_spin_button_real_spin (spin, -spin->adjustment->page_increment);
+  if (retval)
+    {
+      gtk_spin_button_update (spin);
       return TRUE;
-
-    default:
-      break;
     }
-
-  return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
+  else
+    return GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
 }
 
 static gint
Index: gtk/gtktext.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktext.c,v
retrieving revision 1.101
diff -u -u -r1.101 gtktext.c
--- gtk/gtktext.c	2001/04/28 20:18:27	1.101
+++ gtk/gtktext.c	2001/05/11 04:10:24
@@ -1917,23 +1917,30 @@
     {
       switch (event->keyval)
 	{
-	case GDK_Home:      
+	case GDK_Home:
+        case GDK_KP_Home:
 	  if (event->state & GDK_CONTROL_MASK)
 	    scroll_int (text, -text->vadj->value);
 	  else
 	    return_val = FALSE;
 	  break;
 	case GDK_End:
+        case GDK_KP_End:
 	  if (event->state & GDK_CONTROL_MASK)
 	    scroll_int (text, +text->vadj->upper); 
 	  else
 	    return_val = FALSE;
 	  break;
+        case GDK_KP_Page_Up:
 	case GDK_Page_Up:   scroll_int (text, -text->vadj->page_increment); break;
+        case GDK_KP_Page_Down:
 	case GDK_Page_Down: scroll_int (text, +text->vadj->page_increment); break;
+        case GDK_KP_Up:
 	case GDK_Up:        scroll_int (text, -KEY_SCROLL_PIXELS); break;
+        case GDK_KP_Down:
 	case GDK_Down:      scroll_int (text, +KEY_SCROLL_PIXELS); break;
 	case GDK_Return:
+        case GDK_KP_Enter:
 	  if (event->state & GDK_CONTROL_MASK)
 	    gtk_signal_emit_by_name (GTK_OBJECT (text), "activate");
 	  else
@@ -2017,6 +2024,7 @@
 	case GDK_Clear:
 	  gtk_text_delete_line (text);
 	  break;
+        case GDK_KP_Insert:
 	case GDK_Insert:
 	  if (event->state & GDK_SHIFT_MASK)
 	    {
@@ -2046,6 +2054,7 @@
 	  break;
 	case GDK_Tab:
         case GDK_ISO_Left_Tab:
+        case GDK_KP_Tab:
 	  position = text->point.index;
 	  gtk_editable_insert_text (GTK_EDITABLE (old_editable), "\t", 1, &position);
 	  break;
Index: gtk/gtktextview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextview.c,v
retrieving revision 1.83
diff -u -u -r1.83 gtktextview.c
--- gtk/gtktextview.c	2001/05/07 15:58:46	1.83
+++ gtk/gtktextview.c	2001/05/11 04:10:25
@@ -615,9 +615,15 @@
   add_move_binding (binding_set, GDK_Right, 0,
                     GTK_MOVEMENT_VISUAL_POSITIONS, 1);
 
+  add_move_binding (binding_set, GDK_KP_Right, 0,
+                    GTK_MOVEMENT_VISUAL_POSITIONS, 1);
+  
   add_move_binding (binding_set, GDK_Left, 0,
                     GTK_MOVEMENT_VISUAL_POSITIONS, -1);
 
+  add_move_binding (binding_set, GDK_KP_Left, 0,
+                    GTK_MOVEMENT_VISUAL_POSITIONS, -1);
+  
   add_move_binding (binding_set, GDK_f, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_LOGICAL_POSITIONS, 1);
 
@@ -627,16 +633,28 @@
   add_move_binding (binding_set, GDK_Right, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_WORDS, 1);
 
+  add_move_binding (binding_set, GDK_KP_Right, GDK_CONTROL_MASK,
+                    GTK_MOVEMENT_WORDS, 1);
+  
   add_move_binding (binding_set, GDK_Left, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_WORDS, -1);
 
+  add_move_binding (binding_set, GDK_KP_Left, GDK_CONTROL_MASK,
+                    GTK_MOVEMENT_WORDS, 1);
+  
   /* Eventually we want to move by display lines, not paragraphs */
   add_move_binding (binding_set, GDK_Up, 0,
                     GTK_MOVEMENT_DISPLAY_LINES, -1);
 
+  add_move_binding (binding_set, GDK_KP_Up, 0,
+                    GTK_MOVEMENT_DISPLAY_LINES, -1);
+  
   add_move_binding (binding_set, GDK_Down, 0,
                     GTK_MOVEMENT_DISPLAY_LINES, 1);
 
+  add_move_binding (binding_set, GDK_KP_Down, 0,
+                    GTK_MOVEMENT_DISPLAY_LINES, 1);
+  
   add_move_binding (binding_set, GDK_p, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_DISPLAY_LINES, -1);
 
@@ -658,26 +676,45 @@
   add_move_binding (binding_set, GDK_Home, 0,
                     GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
 
+  add_move_binding (binding_set, GDK_KP_Home, 0,
+                    GTK_MOVEMENT_DISPLAY_LINE_ENDS, -1);
+  
   add_move_binding (binding_set, GDK_End, 0,
                     GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
 
+  add_move_binding (binding_set, GDK_KP_End, 0,
+                    GTK_MOVEMENT_DISPLAY_LINE_ENDS, 1);
+  
   add_move_binding (binding_set, GDK_Home, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_BUFFER_ENDS, -1);
 
+  add_move_binding (binding_set, GDK_KP_Home, GDK_CONTROL_MASK,
+                    GTK_MOVEMENT_BUFFER_ENDS, -1);
+  
   add_move_binding (binding_set, GDK_End, GDK_CONTROL_MASK,
                     GTK_MOVEMENT_BUFFER_ENDS, 1);
 
+  add_move_binding (binding_set, GDK_KP_End, GDK_CONTROL_MASK,
+                    GTK_MOVEMENT_BUFFER_ENDS, 1);
+  
   add_move_binding (binding_set, GDK_Page_Up, 0,
                     GTK_MOVEMENT_PAGES, -1);
 
+  add_move_binding (binding_set, GDK_KP_Page_Up, 0,
+                    GTK_MOVEMENT_PAGES, -1);
+  
   add_move_binding (binding_set, GDK_Page_Down, 0,
                     GTK_MOVEMENT_PAGES, 1);
 
-
+  add_move_binding (binding_set, GDK_KP_Page_Down, 0,
+                    GTK_MOVEMENT_PAGES, 1);
+  
   /* Setting the cut/paste/copy anchor */
   gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_CONTROL_MASK,
                                 "set_anchor", 0);
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_CONTROL_MASK,
+                                "set_anchor", 0);
+  
   /* Deleting text */
   gtk_binding_entry_add_signal (binding_set, GDK_Delete, 0,
                                 "delete_from_cursor", 2,
@@ -733,10 +770,17 @@
                                 "delete_from_cursor", 2,
                                 GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
                                 GTK_TYPE_INT, 1);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
+                                "delete_from_cursor", 2,
+                                GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
+                                GTK_TYPE_INT, 1);
   gtk_binding_entry_add_signal (binding_set, GDK_space, GDK_MOD1_MASK,
                                 "insert_at_cursor", 1,
                                 GTK_TYPE_STRING, " ");
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, GDK_MOD1_MASK,
+                                "insert_at_cursor", 1,
+                                GTK_TYPE_STRING, " ");
+  
   gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_MOD1_MASK,
                                 "delete_from_cursor", 2,
                                 GTK_TYPE_ENUM, GTK_DELETE_WHITESPACE,
@@ -762,6 +806,8 @@
   /* Overwrite */
   gtk_binding_entry_add_signal (binding_set, GDK_Insert, 0,
                                 "toggle_overwrite", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Insert, 0,
+                                "toggle_overwrite", 0);
 }
 
 void
@@ -2974,7 +3020,10 @@
       retval = TRUE;
     }
   /* Pass through Tab as literal tab, unless Control is held down */
-  else if (event->keyval == GDK_Tab && !(event->state & GDK_CONTROL_MASK))
+  else if ((event->keyval == GDK_Tab ||
+            event->keyval == GDK_KP_Tab ||
+            event->keyval == GDK_ISO_Left_Tab) &&
+           !(event->state & GDK_CONTROL_MASK))
     {
       gtk_text_buffer_insert_interactive_at_cursor (get_buffer (text_view), "\t", 1,
                                                     text_view->editable);
Index: gtk/gtktooltips.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktooltips.c,v
retrieving revision 1.37
diff -u -u -r1.37 gtktooltips.c
--- gtk/gtktooltips.c	2001/04/18 14:05:49	1.37
+++ gtk/gtktooltips.c	2001/05/11 04:10:25
@@ -285,17 +285,6 @@
     }
 }
 
-void
-gtk_tooltips_set_colors (GtkTooltips *tooltips,
-			 GdkColor    *background,
-			 GdkColor    *foreground)
-{
-  g_return_if_fail (tooltips != NULL);
-
-  g_warning ("gtk_tooltips_set_colors is deprecated and does nothing.\n"
-	     "The colors for tooltips are now taken from the style.");
-}
-
 static gint
 gtk_tooltips_paint_window (GtkTooltips *tooltips)
 {
@@ -520,4 +509,22 @@
   tooltips->tips_data_list = g_list_remove (tooltips->tips_data_list,
 					    tooltipsdata);
   gtk_tooltips_destroy_data (tooltipsdata);
+}
+
+void
+_gtk_tooltips_show_tip (GtkWidget *widget)
+{
+  /* Showing the tip from the keyboard */
+  
+  GtkTooltipsData *tooltipsdata;
+
+  tooltipsdata = gtk_tooltips_data_get (widget);
+
+  if (tooltipsdata == NULL)
+    return;
+
+  gtk_tooltips_set_active_widget (tooltipsdata->tooltips,
+                                  widget);
+
+  gtk_tooltips_timeout (tooltipsdata->tooltips);
 }
Index: gtk/gtktooltips.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktooltips.h,v
retrieving revision 1.18
diff -u -u -r1.18 gtktooltips.h
--- gtk/gtktooltips.h	2001/03/15 19:02:23	1.18
+++ gtk/gtktooltips.h	2001/05/11 04:10:25
@@ -67,6 +67,7 @@
 
   guint   delay : 30;
   guint	  enabled : 1;
+  guint   have_grab : 1;
   gint	  timer_tag;
   gboolean use_sticky_delay;
   GTimeVal last_popdown;
@@ -88,13 +89,11 @@
 					    GtkWidget	  *widget,
 					    const gchar   *tip_text,
 					    const gchar   *tip_private);
-void		 gtk_tooltips_set_colors   (GtkTooltips   *tooltips,
-					    GdkColor	  *background,
-					    GdkColor	  *foreground);
 GtkTooltipsData* gtk_tooltips_data_get	   (GtkWidget	  *widget);
 void             gtk_tooltips_force_window (GtkTooltips   *tooltips);
 
 
+void             _gtk_tooltips_show_tip    (GtkWidget    *widget);
 
 #ifdef __cplusplus
 }
Index: gtk/gtkwidget.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwidget.c,v
retrieving revision 1.214
diff -u -u -r1.214 gtkwidget.c
--- gtk/gtkwidget.c	2001/05/03 20:11:07	1.214
+++ gtk/gtkwidget.c	2001/05/11 04:10:26
@@ -45,6 +45,7 @@
 #include "gdk/gdkkeysyms.h"
 #include "gtkintl.h"
 #include "gtkaccessible.h"
+#include "gtktooltips.h"
 
 #define WIDGET_CLASS(w)	 GTK_WIDGET_GET_CLASS (w)
 #define	INIT_PATH_SIZE	(512)
@@ -106,6 +107,8 @@
   VISIBILITY_NOTIFY_EVENT,
   WINDOW_STATE_EVENT,
   POPUP_MENU,
+  SHOW_TOOLTIP,
+  SHOW_WHATS_THIS,
   LAST_SIGNAL
 };
 
@@ -179,6 +182,8 @@
 						  GtkTextDirection   previous_direction);
 static void gtk_widget_real_grab_focus           (GtkWidget         *focus_widget);
 
+static void gtk_widget_real_show_tooltip         (GtkWidget         *widget);
+
 static GdkColormap*  gtk_widget_peek_colormap      (void);
 static GtkStyle*     gtk_widget_peek_style         (void);
 static PangoContext *gtk_widget_peek_pango_context (GtkWidget *widget);
@@ -354,6 +359,8 @@
   klass->drag_drop = NULL;
   klass->drag_data_received = NULL;
 
+  klass->show_tooltip = gtk_widget_real_show_tooltip;
+  
   /* Accessibility support */
   klass->get_accessible = gtk_widget_real_get_accessible;
 
@@ -999,6 +1006,20 @@
 		    GTK_SIGNAL_OFFSET (GtkWidgetClass, popup_menu),
                     gtk_marshal_NONE__NONE,
 		    GTK_TYPE_NONE, 0);
+  widget_signals[SHOW_TOOLTIP] =
+    gtk_signal_new ("show_tooltip",
+		    GTK_RUN_LAST | GTK_RUN_ACTION,
+		    GTK_CLASS_TYPE (object_class),
+		    GTK_SIGNAL_OFFSET (GtkWidgetClass, show_tooltip),
+                    gtk_marshal_NONE__NONE,
+		    GTK_TYPE_NONE, 0);
+  widget_signals[SHOW_WHATS_THIS] =
+    gtk_signal_new ("show_whats_this",
+		    GTK_RUN_LAST | GTK_RUN_ACTION,
+		    GTK_CLASS_TYPE (object_class),
+		    GTK_SIGNAL_OFFSET (GtkWidgetClass, show_whats_this),
+                    gtk_marshal_NONE__NONE,
+		    GTK_TYPE_NONE, 0);
   
   binding_set = gtk_binding_set_by_class (klass);
 
@@ -1008,6 +1029,16 @@
   gtk_binding_entry_add_signal (binding_set, GDK_Menu, 0,
                                 "popup_menu", 0);  
 
+  gtk_binding_entry_add_signal (binding_set, GDK_F1, GDK_CONTROL_MASK,
+                                "show_tooltip", 0);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_F1, GDK_CONTROL_MASK,
+                                "show_tooltip", 0);
+  
+  gtk_binding_entry_add_signal (binding_set, GDK_F1, GDK_SHIFT_MASK,
+                                "show_whats_this", 0);  
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_F1, GDK_SHIFT_MASK,
+                                "show_whats_this", 0);
+
   gtk_widget_class_install_style_property (klass,
 					   g_param_spec_boolean ("interior_focus",
 								 _("Interior Focus"),
@@ -3036,6 +3067,12 @@
       if (GTK_IS_WINDOW (widget))
 	gtk_window_set_focus (GTK_WINDOW (widget), focus_widget);
     }
+}
+
+static void
+gtk_widget_real_show_tooltip (GtkWidget *widget)
+{
+  _gtk_tooltips_show_tip (widget);
 }
 
 /**
Index: gtk/gtkwidget.h
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwidget.h,v
retrieving revision 1.107
diff -u -u -r1.107 gtkwidget.h
--- gtk/gtkwidget.h	2001/05/03 20:11:08	1.107
+++ gtk/gtkwidget.h	2001/05/11 04:10:26
@@ -380,7 +380,15 @@
 
   /* Signals used only for keybindings */
   void (* popup_menu)              (GtkWidget          *widget);
-  
+
+  /* If a widget has multiple tooltips/whatsthis, it should show the
+   * one for the current focus location, or if that doesn't make
+   * sense, should cycle through them showing each tip alongside
+   * whatever piece of the widget it applies to.
+   */
+  void (* show_tooltip)            (GtkWidget          *widget);
+
+  void (* show_whats_this)         (GtkWidget          *widget);
   
   /* accessibility support 
    */
Index: gtk/gtkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.119
diff -u -u -r1.119 gtkwindow.c
--- gtk/gtkwindow.c	2001/05/07 18:08:10	1.119
+++ gtk/gtkwindow.c	2001/05/11 04:10:26
@@ -467,7 +467,9 @@
 
   gtk_binding_entry_add_signal (binding_set, GDK_space, 0,
                                 "activate_focus", 0);
-
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Space, 0,
+                                "activate_focus", 0);
+  
   gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
                                 "activate_default", 0);
 
@@ -505,11 +507,17 @@
   gtk_binding_entry_add_signal (binding_set, GDK_Tab, 0,
                                 "move_focus", 1,
                                 GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, 0,
+                                "move_focus", 1,
+                                GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
   gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, 0,
                                 "move_focus", 1,
                                 GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_FORWARD);
 
   gtk_binding_entry_add_signal (binding_set, GDK_Tab, GDK_SHIFT_MASK,
+                                "move_focus", 1,
+                                GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, GDK_SHIFT_MASK,
                                 "move_focus", 1,
                                 GTK_TYPE_DIRECTION_TYPE, GTK_DIR_TAB_BACKWARD);
   gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, GDK_SHIFT_MASK,




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]