Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 401205 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-3 / +14 lines)
Line  Link Here
0
-- mupdf-0.9/apps/pdfapp.c
0
++ mupdf-0.9/apps/pdfapp.c
Lines 817-827 Link Here
817
		break;
817
		break;
818
818
819
	case 'j':
819
	case 'j':
820
		if (app->pany + app->image->h <= app->winh)
821
			goto pagedown;
820
		app->pany -= app->image->h / 10;
822
		app->pany -= app->image->h / 10;
821
		pdfapp_showpage(app, 0, 0, 1);
823
		pdfapp_showpage(app, 0, 0, 1);
822
		break;
824
		break;
823
825
824
	case 'k':
826
	case 'k':
827
		if (app->pany >= 0)
828
			goto pageup;
825
		app->pany += app->image->h / 10;
829
		app->pany += app->image->h / 10;
826
		pdfapp_showpage(app, 0, 0, 1);
830
		pdfapp_showpage(app, 0, 0, 1);
827
		break;
831
		break;
Lines 885-890 Link Here
885
	 */
889
	 */
886
890
887
	case ',':
891
	case ',':
892
		pageup:
888
		panto = PAN_TO_BOTTOM;
893
		panto = PAN_TO_BOTTOM;
889
		if (app->numberlen > 0)
894
		if (app->numberlen > 0)
890
			app->pageno -= atoi(app->number);
895
			app->pageno -= atoi(app->number);
Lines 893-898 Link Here
893
		break;
898
		break;
894
899
895
	case '.':
900
	case '.':
901
		pagedown:
896
		panto = PAN_TO_TOP;
902
		panto = PAN_TO_TOP;
897
		if (app->numberlen > 0)
903
		if (app->numberlen > 0)
898
			app->pageno += atoi(app->number);
904
			app->pageno += atoi(app->number);
Lines 902-908 Link Here
902
	case 'b':
908
	case 'b':
903
	case '\b': //backspace
909
	case '\b': //backspace
904
		panto = DONT_PAN;
910
		panto = PAN_TO_TOP;
905
		if (app->numberlen > 0)
911
		if (app->numberlen > 0)
906
			app->pageno -= atoi(app->number);
912
			app->pageno -= atoi(app->number);
907
		else
913
		else
908
				int isx = (modifiers & (1<<0));
914
				int isx = (modifiers & (1<<0));
909
				int xstep = isx ? 20 * dir : 0;
915
				int xstep = isx ? 20 * dir : 0;
910
				int ystep = !isx ? 20 * dir : 0;
916
				int ystep = !isx ? 20 * dir : 0;
911
				pdfapp_panview(app, app->panx + xstep, app->pany + ystep);
917
 				if (!isx && dir < 0 && app->pany + app->image->h <= app->winh)
918
 					pdfapp_onkey(app, 'j');
919
 				else if (!isx && dir > 0 && app->pany >= 0)
920
 					pdfapp_onkey(app, 'k');
921
 				else
922
 					pdfapp_panview(app, app->panx + xstep, app->pany + ystep);
912
			}
923
			}
913
		}
924
		}
914
	}
925
	}

Return to bug 401205