make thumbnail bindings configureable via config.h (#167)
this allows for configuring thumbnail mode mouse bindings similar to image mode bindings. however we can't put the thumbnails bindings into the existing buttons[] array due to fallthrough. For example M3 would switch mode and then end up selecting an image. which is why thumbnail bindings have been put into it's own array `buttons_tns[]` and `buttons[]` has been renamed to `buttons_img[]` for consistency. Closes: https://github.com/nsxiv/nsxiv/issues/131
This commit is contained in:
13
config.def.h
13
config.def.h
@ -175,7 +175,7 @@ static const keymap_t keys[] = {
|
||||
};
|
||||
|
||||
/* mouse button mappings for image mode: */
|
||||
static const button_t buttons[] = {
|
||||
static const button_t buttons_img[] = {
|
||||
/* modifiers button function argument */
|
||||
{ 0, 1, i_cursor_navigate, None },
|
||||
{ ControlMask, 1, i_drag, DRAG_RELATIVE },
|
||||
@ -185,6 +185,17 @@ static const button_t buttons[] = {
|
||||
{ 0, 5, g_zoom, -1 },
|
||||
};
|
||||
|
||||
/* mouse button mappings for thumbnail mode: */
|
||||
static const button_t buttons_tns[] = {
|
||||
/* modifiers button function argument */
|
||||
{ 0, 1, t_select, None },
|
||||
{ 0, 3, t_drag_mark_image, None },
|
||||
{ 0, 4, t_scroll, DIR_UP },
|
||||
{ 0, 5, t_scroll, DIR_DOWN },
|
||||
{ ControlMask, 4, g_scroll_screen, DIR_UP },
|
||||
{ ControlMask, 5, g_scroll_screen, DIR_DOWN },
|
||||
};
|
||||
|
||||
/* true means NAV_WIDTH is relative (33%), false means absolute (33 pixels) */
|
||||
static const bool NAV_IS_REL = true;
|
||||
/* width of navigation area, 0 disables cursor navigation, */
|
||||
|
Reference in New Issue
Block a user