[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(mgp-users 00622) Re: code patches
- To: mgp-users@mew.org
- Subject: (mgp-users 00622) Re: code patches
- From: Guido Socher <guido@bearix.oche.de>
- Date: Sat, 23 Jun 2001 17:57:04 +0900
- In-reply-to: <>; from itojun@itojun.org on Fri, Jun 22, 2001 at 08:34:07AM +0900
- Posted: Sat, 23 Jun 2001 10:52:34 +0200
- References: <> <>
- Reply-to: guido@linuxfocus.org
Ok, here the code patches:
The problem:
As a vi user I am always tempted to press 4G instead of 4g (capital G = shift g)
to go to the fourth page. This crashes magicpoint (I have tested
this bug in several versions of magicpoint 1.06a to 1.08a).
Therefore I think it would be good to change the keybinding such that
4G and 4g are identical.
I understand that the G should have displayed information about the
page before and after. In the code below I have totally removed that
function as it just crashes magicpoint but if it needs to be added then
I suggest to use Crtl-g (again for cosistency with vi, less and others...).
It took me as well some time to figure out all the keybindings. I suggest
therefore to add the following chapter to the begining of the SYSTAX file:
Key bindings:
------------
f,j,n,ArrowDown,NextPage,Space : Go to the next page
q,Escape : Quit magicpoint
b,k,p,ArrowUp,PageUp,Backspace,Delete: Go to previous page
x : Switch to drawing mode, you can
draw with the mouse on your slides.
Press x again to exit drawing mode.
shift x : change pen color for drawing mode
l : Erase drawing
r : read source file again and redraw page
number g or number shift g : jump to given page. E.g 4g or 4G goes
to the fourth page.
Crtl : This will display the page numbers
with title at the bottom and you can
jump to a given page by clicking on
the number.
During editing you do not need to restart mgp to display any changes
that you made. Example:
Start magicpoint with: mgp -g 800x600 mypresent.mgp
At the same time load mypresent.mgp into a text editor. Change something.
now press r in magicpoint and observe the changes on the screen.
Magicpoint keywords
-------------------
.... rest of SYNTAX file continues here....
Here is the code patch against magicpoint-1.08a:
The changes are: remove number = 0 from the XK_Shift action and
remove the if(shift) from XK_g.
--- mgp.c.orig Thu Jun 21 22:57:27 2001
+++ mgp.c Sat Jun 23 09:47:36 2001
@@ -953,7 +953,6 @@
case XK_Shift_L:
case XK_Shift_R:
shift = 1;
- number = 0;
break;
case XK_r:
@@ -985,25 +984,17 @@
}
break;
- case XK_g:
- if (shift) {
- pg_mode = 1 - pg_mode;
- if (pg_mode) {
- pg_on();
- pg_draw(&state);
- } else
- pg_off();
- } else {
- if (number == 0)
- number = maxpage;
- if (number <= maxpage && number > 0) {
- state_goto(&state, number, 0);
- state_newpage(&state);
- state_init(&state);
- } else
- beep();
- }
- number = 0;
+ case XK_g: /* 4 g or 4 shift g will go to the 4th
+ page. This is for compatibility with
+ vi, less and other programs */
+ if (number == 0)
+ number = maxpage;
+ if (number <= maxpage && number > 0) {
+ state_goto(&state, number, 0);
+ state_newpage(&state);
+ state_init(&state);
+ } else
+ beep();
break;
case XK_0:
On Fri, Jun 22, 2001, itojun@itojun.org (Jun-ichiro itojun Hagino) wrote:
>
> >Hello,
> >does anybody know the e-mail address of the current maintainer
> >of Magicpoint. I can not find it anywhere.
> >I have a few code patches and corrections for bugs in mgp.
>
> just send it off to the list (mgp-users).
> all developers are reading this mailing list.
>
> itojun
--
The place for Linux documentation in your own language.
http://www.linuxfocus.org