diff -b -B -C 4 -d --expand-tabs -H /usr/tmp/gimp-1.2.1/app/edit_selection.c ./edit_selection.c *** /usr/tmp/gimp-1.2.1/app/edit_selection.c Sun Dec 17 08:36:53 2000 --- ./edit_selection.c Fri Apr 27 02:45:06 2001 *************** *** 666,674 **** CURSOR_MODIFIER_MOVE, FALSE); } ! static gint process_event_queue_keys (GdkEventKey *kevent, ...) /* GdkKeyType, GdkModifierType, value ... 0 * could move this function to a more central location so it can be used --- 666,674 ---- CURSOR_MODIFIER_MOVE, FALSE); } ! gint process_event_queue_keys (GdkEventKey *kevent, ...) /* GdkKeyType, GdkModifierType, value ... 0 * could move this function to a more central location so it can be used diff -b -B -C 4 -d --expand-tabs -H /usr/tmp/gimp-1.2.1/app/edit_selection.h ./edit_selection.h *** /usr/tmp/gimp-1.2.1/app/edit_selection.h Mon Oct 23 20:05:43 2000 --- ./edit_selection.h Fri Apr 27 02:45:03 2001 *************** *** 52,58 **** --- 52,60 ---- void edit_selection_draw (Tool *tool); void edit_sel_arrow_keys_func (Tool *tool, GdkEventKey *kevent, gpointer gdisp_ptr); + + gint process_event_queue_keys (GdkEventKey *kevent, ...); #endif /* __EDIT_SELECTION_H__ */ diff -b -B -C 4 -d --expand-tabs -H /usr/tmp/gimp-1.2.1/app/scroll.c ./scroll.c *** /usr/tmp/gimp-1.2.1/app/scroll.c Sun Dec 17 08:36:55 2000 --- ./scroll.c Fri Apr 27 03:16:18 2001 *************** *** 20,27 **** --- 20,28 ---- #include #include + #include #include "apptypes.h" #include "appenv.h" *************** *** 41,48 **** --- 42,105 ---- /* STATIC variables */ /* These are the values of the initial pointer grab */ static int startx, starty; + + void + scrollbar_arrow_keys_func (Tool *tool, + GdkEventKey *kevent, + gpointer gdisp_ptr) + { + GDisplay *gdisp; + gint inc_x, inc_y, mask_inc_x, mask_inc_y; + + gdisp = (GDisplay *) gdisp_ptr; + + inc_x = + process_event_queue_keys (kevent, + GDK_Left, 0 , (gdisp->disp_width / -2), + GDK_KP_Left, 0 , (gdisp->disp_width / -2), + GDK_Left, GDK_SHIFT_MASK, -1, + GDK_Right, 0 , (gdisp->disp_width / 2), + GDK_KP_Right, 0 , (gdisp->disp_width / 2), + GDK_Right, GDK_SHIFT_MASK, 1, + 0); + inc_y = + process_event_queue_keys (kevent, + GDK_Up, 0 , (gdisp->disp_height / -2), + GDK_KP_Up, 0 , (gdisp->disp_height / -2), + GDK_Up, GDK_SHIFT_MASK, -1, + GDK_Down, 0 , (gdisp->disp_height / 2), + GDK_KP_Down, 0 , (gdisp->disp_height / 2), + GDK_Down, GDK_SHIFT_MASK, 1, + 0); + + mask_inc_x = + process_event_queue_keys (kevent, + GDK_Left, GDK_MOD1_MASK , (gdisp->disp_width / -2), + GDK_KP_Left, GDK_MOD1_MASK , (gdisp->disp_width / -2), + GDK_Left, (GDK_MOD1_MASK | GDK_SHIFT_MASK), -1, + GDK_Right, GDK_MOD1_MASK , (gdisp->disp_width / 2), + GDK_KP_Right, GDK_MOD1_MASK , (gdisp->disp_width / 2), + GDK_Right, (GDK_MOD1_MASK | GDK_SHIFT_MASK), 1, + 0); + mask_inc_y = + process_event_queue_keys (kevent, + GDK_Up, GDK_MOD1_MASK , (gdisp->disp_height / -2), + GDK_KP_Up, GDK_MOD1_MASK , (gdisp->disp_height / -2), + GDK_Up, (GDK_MOD1_MASK | GDK_SHIFT_MASK), -1, + GDK_Down, GDK_MOD1_MASK , (gdisp->disp_height / 2), + GDK_KP_Down, GDK_MOD1_MASK , (gdisp->disp_height / 2), + GDK_Down, (GDK_MOD1_MASK | GDK_SHIFT_MASK), 1, + 0); + + if (inc_x == 0 && inc_y == 0 && mask_inc_x == 0 && mask_inc_y == 0) + return; + else + scroll_display (gdisp, inc_x, inc_y); + } + + gint scrollbar_vert_update (GtkAdjustment *adjustment, gpointer data) { diff -b -B -C 4 -d --expand-tabs -H /usr/tmp/gimp-1.2.1/app/scroll.h ./scroll.h *** /usr/tmp/gimp-1.2.1/app/scroll.h Fri Aug 13 08:21:02 1999 --- ./scroll.h Fri Apr 27 02:34:44 2001 *************** *** 37,42 **** --- 37,45 ---- /* generic scroll-by-offset function */ gint scroll_display (GDisplay *, gint, gint); + /* Baird's hack to make the arrow keys default to scrolling the window */ + void scrollbar_arrow_keys_func (Tool *, GdkEventKey *, gpointer ); /* cjb */ + #endif /* __SCROLL_H__ */ diff -b -B -C 4 -d --expand-tabs -H /usr/tmp/gimp-1.2.1/app/tools.c ./tools.c *** /usr/tmp/gimp-1.2.1/app/tools.c Sun Dec 17 08:36:55 2000 --- ./tools.c Fri Apr 27 02:31:48 2001 *************** *** 57,64 **** --- 57,65 ---- /* #include "path_tool.h" */ #include "pencil.h" #include "posterize.h" #include "rect_select.h" + #include "scroll.h" #include "session.h" #include "smudge.h" /* #include "xinput_airbrush.h" */ #include "text_tool.h" *************** *** 1481,1489 **** tool->button_press_func = standard_button_press_func; tool->button_release_func = standard_button_release_func; tool->motion_func = standard_motion_func; ! tool->arrow_keys_func = standard_arrow_keys_func; tool->modifier_key_func = standard_modifier_key_func; tool->cursor_update_func = standard_cursor_update_func; tool->oper_update_func = standard_operator_update_func; tool->control_func = standard_control_func; --- 1482,1491 ---- tool->button_press_func = standard_button_press_func; tool->button_release_func = standard_button_release_func; tool->motion_func = standard_motion_func; ! tool->arrow_keys_func = scrollbar_arrow_keys_func; /* cjb */ ! /*standard_arrow_keys_func;*/ tool->modifier_key_func = standard_modifier_key_func; tool->cursor_update_func = standard_cursor_update_func; tool->oper_update_func = standard_operator_update_func; tool->control_func = standard_control_func;