diff -r -b -B -C 4 gimp-1.2.3/app/edit_selection.c gimp-1.2.3a/app/edit_selection.c *** gimp-1.2.3/app/edit_selection.c Tue Nov 13 16:19:10 2001 --- gimp-1.2.3a/app/edit_selection.c Wed Feb 12 05:51:31 2003 *************** *** 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 -r -b -B -C 4 gimp-1.2.3/app/edit_selection.h gimp-1.2.3a/app/edit_selection.h *** gimp-1.2.3/app/edit_selection.h Mon Oct 23 20:05:43 2000 --- gimp-1.2.3a/app/edit_selection.h Wed Feb 12 05:52:00 2003 *************** *** 52,58 **** --- 52,59 ---- 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 -r -b -B -C 4 gimp-1.2.3/app/scroll.c gimp-1.2.3a/app/scroll.c *** gimp-1.2.3/app/scroll.c Sun Dec 17 08:36:55 2000 --- gimp-1.2.3a/app/scroll.c Wed Feb 12 05:51:02 2003 *************** *** 20,27 **** --- 20,28 ---- #include #include + #include #include "apptypes.h" #include "appenv.h" *************** *** 40,47 **** --- 41,104 ---- /* 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 -r -b -B -C 4 gimp-1.2.3/app/scroll.h gimp-1.2.3a/app/scroll.h *** gimp-1.2.3/app/scroll.h Fri Aug 13 08:21:02 1999 --- gimp-1.2.3a/app/scroll.h Wed Feb 12 05:51:02 2003 *************** *** 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 -r -b -B -C 4 gimp-1.2.3/app/tools.c gimp-1.2.3a/app/tools.c *** gimp-1.2.3/app/tools.c Sun Dec 17 08:36:55 2000 --- gimp-1.2.3a/app/tools.c Wed Feb 12 05:51:02 2003 *************** *** 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;