diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-01-01 15:30:41 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-01-01 15:30:41 +0000 |
commit | eba710a9e4a9a4422668c17c1b1ceb7b23c0ee82 (patch) | |
tree | 63697fff998cdc161069f180bb22aeff3d99e0a0 | |
parent | 1594f13a8e2316dea6b8901140d1bb14d92006c9 (diff) |
xedit 1.1.2
-rw-r--r-- | app/xedit/ChangeLog | 60 | ||||
-rw-r--r-- | app/xedit/Makefile.am | 27 | ||||
-rw-r--r-- | app/xedit/Makefile.in | 38 | ||||
-rw-r--r-- | app/xedit/Xedit-sample | 233 | ||||
-rw-r--r-- | app/xedit/app-defaults/Xedit-color.ad (renamed from app/xedit/Xedit-color.ad) | 0 | ||||
-rw-r--r-- | app/xedit/app-defaults/Xedit-noxprint.ad (renamed from app/xedit/Xedit-noxprint.ad) | 0 | ||||
-rw-r--r-- | app/xedit/app-defaults/Xedit-xprint.ad (renamed from app/xedit/Xedit-xprint.ad) | 0 | ||||
-rw-r--r-- | app/xedit/commands.c | 125 | ||||
-rw-r--r-- | app/xedit/configure | 20 | ||||
-rw-r--r-- | app/xedit/configure.ac | 2 | ||||
-rw-r--r-- | app/xedit/xedit.c | 4 |
11 files changed, 157 insertions, 352 deletions
diff --git a/app/xedit/ChangeLog b/app/xedit/ChangeLog index 1b8750af2..da4f7e831 100644 --- a/app/xedit/ChangeLog +++ b/app/xedit/ChangeLog @@ -1,3 +1,63 @@ +commit 0d133999449ce7c5db19d46680430ab16e81e4fd +Author: Peter Breitenlohner <peb@mppmu.mpg.de> +Date: Thu Nov 6 21:19:56 2008 +0100 + + enabled VPATH build + +commit f5edc6424b6553d58e271f64471cef32e063dd19 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Oct 8 19:21:28 2008 -0300 + + Rewrite double click confirmation code. + + Remove the double_click global boolean, and change dc_state to a bit + field, instead of a single state variable. + The old code was the xedit original code with minimal changes, but was + a bit confusing when two confirmations would be required. + Also, this patch moves the check for file overwriting before + MaybeCreateFile() as it can actually call creat(), what means that it + can no longer ask for confirmations, as the file has been just backed up, + and a zero sized one created. + +commit d96491aad5542f052b722b94d86f0ce7661ae98b +Merge: cc7cb04... f1efec7... +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Sep 26 17:47:32 2008 -0300 + + Merge branch 'master' of ssh://pcpa@git.freedesktop.org/git/xorg/app/xedit + +commit cc7cb041c4144f1401fd520f05018028c0e0c87e +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Fri Sep 26 17:34:50 2008 -0300 + + Proper implementation of AddDoubleClickCallback + + I tracked it down to + http://cvsweb.xfree86.org/cvsweb/xc/programs/xedit/commands.c?rev=1.5&content-type=text/vnd.viewcvs-markup + After my patches to libXaw. Instead of checking for + "if (XtIsSubclass(w, asciiSrcObjectClass)) {" it should really + do something like "if (isXaw7orNewer) {". But I believe only XFree86 + and Xorg versions of Xaw have the XawVersion macro in XawInit.h... + + This corrects the problem described in + http://bugs.freedesktop.org/show_bug.cgi?id=17726 + + And the main reason is that xedit always default'ed to use a 8 bits + iso8859-x locale, while in Xorg it was modified to use multibyte by + default. + +commit f1efec76814500a14acf7c64184ebef1a28e264d +Author: Jeremy Huddleston <jeremyhu@freedesktop.org> +Date: Mon Aug 4 13:22:52 2008 -0700 + + Fixed filename conflict during compilation on case-insensitive file systems. + +commit dc857b78c00432de6d57124ca2e060ef0a76684f +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Thu Jul 31 14:17:17 2008 -0300 + + Correct make dist and update to xedit-1.1.1. + commit bc470a831ee3c8d5aa254661122187048f245c92 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Jul 30 18:52:32 2008 -0300 diff --git a/app/xedit/Makefile.am b/app/xedit/Makefile.am index db9a4e7c5..1a327980d 100644 --- a/app/xedit/Makefile.am +++ b/app/xedit/Makefile.am @@ -164,26 +164,29 @@ lisp_re_tests_SOURCES = lisp/re/tests.c # App default files (*.ad) APPDEFAULTFILES = \ - Xedit-color \ - Xedit + app-defaults/Xedit-color \ + app-defaults/Xedit if USE_XPRINT -Xedit.ad: - cp $(top_srcdir)/Xedit-xprint.ad Xedit.ad +app-defaults/Xedit.ad: + test -d app-defaults || mkdir app-defaults + cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad else -Xedit.ad: - cp $(top_srcdir)/Xedit-noxprint.ad Xedit.ad +app-defaults/Xedit.ad: + test -d app-defaults || mkdir app-defaults + cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad endif SUFFIXES = .ad .ad: + test -d app-defaults || mkdir app-defaults cp $< $@ appdefaultdir = @appdefaultdir@ appdefault_DATA = $(APPDEFAULTFILES) -CLEANFILES = $(APPDEFAULTFILES) Xedit.ad +CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad lispdir = $(LISPDIR) dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \ @@ -213,10 +216,10 @@ dist_progmodes_DATA = \ appman_PRE = xedit.man EXTRA_DIST = \ - Xedit-color.ad \ - Xedit-xprint.ad \ - Xedit-noxprint.ad \ - Xedit-sample \ + app-defaults/Xedit-color.ad \ + app-defaults/Xedit-xprint.ad \ + app-defaults/Xedit-noxprint.ad \ + app-defaults/Xedit-sample \ lisp/README \ lisp/TODO \ lisp/compile.c \ @@ -275,6 +278,6 @@ MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) dist-hook: ChangeLog diff --git a/app/xedit/Makefile.in b/app/xedit/Makefile.in index 6fe8af7e0..e929bc678 100644 --- a/app/xedit/Makefile.in +++ b/app/xedit/Makefile.in @@ -371,12 +371,12 @@ lisp_re_tests_SOURCES = lisp/re/tests.c # App default files (*.ad) APPDEFAULTFILES = \ - Xedit-color \ - Xedit + app-defaults/Xedit-color \ + app-defaults/Xedit SUFFIXES = .ad .$(APP_MAN_SUFFIX) .man appdefault_DATA = $(APPDEFAULTFILES) -CLEANFILES = $(APPDEFAULTFILES) Xedit.ad $(appman_DATA) +CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad $(appman_DATA) lispdir = $(LISPDIR) dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \ ${srcdir}/lisp/modules/xedit.lsp \ @@ -403,14 +403,15 @@ dist_progmodes_DATA = \ ${srcdir}/lisp/modules/progmodes/xrdb.lsp appman_PRE = xedit.man -EXTRA_DIST = Xedit-color.ad Xedit-xprint.ad Xedit-noxprint.ad \ - Xedit-sample lisp/README lisp/TODO lisp/compile.c lisp/env.c \ - lisp/mathimp.c lisp/modules/psql.c lisp/modules/x11.c \ - lisp/modules/xaw.c lisp/modules/xt.c lisp/re/README \ - lisp/re/tests.txt lisp/test/hello.lsp lisp/test/list.lsp \ - lisp/test/math.lsp lisp/test/psql-1.lsp lisp/test/psql-2.lsp \ - lisp/test/psql-3.lsp lisp/test/regex.lsp lisp/test/stream.lsp \ - lisp/test/widgets.lsp $(appman_PRE) ChangeLog +EXTRA_DIST = app-defaults/Xedit-color.ad app-defaults/Xedit-xprint.ad \ + app-defaults/Xedit-noxprint.ad app-defaults/Xedit-sample \ + lisp/README lisp/TODO lisp/compile.c lisp/env.c lisp/mathimp.c \ + lisp/modules/psql.c lisp/modules/x11.c lisp/modules/xaw.c \ + lisp/modules/xt.c lisp/re/README lisp/re/tests.txt \ + lisp/test/hello.lsp lisp/test/list.lsp lisp/test/math.lsp \ + lisp/test/psql-1.lsp lisp/test/psql-2.lsp lisp/test/psql-3.lsp \ + lisp/test/regex.lsp lisp/test/stream.lsp lisp/test/widgets.lsp \ + $(appman_PRE) ChangeLog appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) SED = sed @@ -1360,7 +1361,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/${srcdir}/lisp/modules $(distdir)/${srcdir}/lisp/modules/progmodes $(distdir)/lisp $(distdir)/lisp/modules $(distdir)/lisp/re $(distdir)/lisp/test + $(mkdir_p) $(distdir)/${srcdir}/lisp/modules $(distdir)/${srcdir}/lisp/modules/progmodes $(distdir)/app-defaults $(distdir)/lisp $(distdir)/lisp/modules $(distdir)/lisp/re $(distdir)/lisp/test @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -1597,12 +1598,15 @@ uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \ uninstall-dist_progmodesDATA uninstall-info-am -@USE_XPRINT_TRUE@Xedit.ad: -@USE_XPRINT_TRUE@ cp $(top_srcdir)/Xedit-xprint.ad Xedit.ad -@USE_XPRINT_FALSE@Xedit.ad: -@USE_XPRINT_FALSE@ cp $(top_srcdir)/Xedit-noxprint.ad Xedit.ad +@USE_XPRINT_TRUE@app-defaults/Xedit.ad: +@USE_XPRINT_TRUE@ test -d app-defaults || mkdir app-defaults +@USE_XPRINT_TRUE@ cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad +@USE_XPRINT_FALSE@app-defaults/Xedit.ad: +@USE_XPRINT_FALSE@ test -d app-defaults || mkdir app-defaults +@USE_XPRINT_FALSE@ cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad .ad: + test -d app-defaults || mkdir app-defaults cp $< $@ .man.$(APP_MAN_SUFFIX): @@ -1611,7 +1615,7 @@ uninstall-am: uninstall-appdefaultDATA uninstall-appmanDATA \ .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) dist-hook: ChangeLog # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/app/xedit/Xedit-sample b/app/xedit/Xedit-sample deleted file mode 100644 index cd4786abb..000000000 --- a/app/xedit/Xedit-sample +++ /dev/null @@ -1,233 +0,0 @@ -! $XFree86: xc/programs/xedit/Xedit-sample,v 1.7 1999/06/06 08:49:13 dawes Exp $ - -Xedit*insertFile*text.width: 150 -Xedit*search*searchText.width: 192 -Xedit*search*replaceText.width: 192 -Xedit*search*case.horizDistance: 14 -Xedit*Text.autoFill: false -Xedit*cursorColor: red -Xedit.geometry: 600x400 -Xedit*font: -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1 -Xedit*Text.?.font: -*-courier-medium-r-*-*-12-*-*-*-*-*-*-1 -Xedit*Text.rightMargin: 0 -Xedit*filename.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*filename.topMargin: 3 -Xedit*messageWindow.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*editWindow.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*editWindow.wrap: Never -Xedit*formWindow*font: -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1 -Xedit*formWindow*background: rgb:9/0/2 -Xedit*formWindow*foreground: rgb:d/c/8 -Xedit*formWindow*backgroundPixmap: XtUnspecifiedPixmap -Xedit*formWindow.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*bc_label.background: rgb:9/0/2 -Xedit*bc_label.foreground: rgb:d/c/8 -Xedit*bc_label.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*Scrollbar.background: rgb:e/c/c -Xedit*Scrollbar.foreground: rgb:a/7/7 -Xedit*Scrollbar.borderColor: rgb:9/8/8 -Xedit*vScrollbar.thumb: hlines2 -Xedit*hScrollbar.thumb: vlines2 -Xedit*Scrollbar.width: 12 -Xedit*Scrollbar.height: 12 -Xedit*Scrollbar.backgroundPixmap: gray3?background=rgb:c/a/a&foreground=rgb:d/b/b -Xedit*Scrollbar.displayList:\ -foreground rgb:7/4/4;\ -draw-lines +0,-1,-1,-1,-1,+0;\ -foreground rgb:4/2/2;\ -draw-lines -2,+0,+0,+0,+0,-2 -Xedit*Paned.internalBorderColor: rgb:9/8/8 -Xedit*buttons.internalBorderColor: rgb:8/7/7 -Xedit*Grip.width: 10 -Xedit*Grip.height: 10 -Xedit*Grip.foreground: IndianRed3 -Xedit*Grip.displayList:\ -foreground IndianRed1;\ -draw-rect +0,+0,-2,-2;\ -foreground IndianRed4;\ -draw-lines +1,-1,-1,-1,-1,+1 -Xedit*Command.internalWidth: 8 -Xedit*Command.internalHeight: 2 -Xedit*Command.borderWidth: 0 -Xedit*Command.background: rgb:9/0/2 -Xedit*Command.foreground: rgb:d/c/8 -Xedit*Command.highlightThickness: 0 -Xedit*Command.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*Toggle.borderWidth: 1 -Xedit*Toggle.borderColor: rgb:a/9/9 -Xedit*Toggle.background: rgb:f/e/e -Xedit*Toggle.foreground: rgb:9/0/2 -Xedit*Toggle.highlightThickness: 1 -Xedit*Toggle.internalWidth: 10 -Xedit*Toggle.internalHeight: 2 -Xedit*Toggle.justify: left -Xedit*Toggle.displayList:\ -foreground rgb:6/0/1;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:d/2/3;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*Form.background: rgb:f/e/e -Xedit*Form.Label.background: rgb:f/e/e -Xedit*Form.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*Form.Label.backgroundPixmap: ParentRelative -Xedit*Form*Text.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:dc/cc/cc&end=rgb:ec/dc/dc -Xedit*Form.Text.leftMargin: 5 -Xedit*Form.Text.rightMargin: 4 -Xedit*Form.Text.topMargin: 2 -Xedit*Form.Text.bottomMargin: 2 -Xedit*Form.Text.borderWidth: 2 -Xedit*Form.Text.borderColor: rgb:9/0/2 -Xedit*Form.Text.displayList:\ -foreground gray50;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground gray80;\ -draw-rect +1,+1,-1,-1 -Xedit*Form.Label.font: fixed -Xedit*Form.Command.internalWidth: 8 -Xedit*Form.Command.internalHeight: 4 -Xedit*Form.Command.borderWidth: 0 -Xedit*Form.Command.background: rgb:9/0/2 -Xedit*Form.Command.foreground: rgb:d/c/8 -Xedit*Form.Command.highlightThickness: 0 -Xedit*Form.Command.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:d/0/3;\ -draw-lines -2,+1,+1,+1,+1,-2;\ -foreground rgb:b/2/3;\ -draw-lines +3,-3,-3,-3,-3,+3;\ -foreground rgb:8/0/1;\ -draw-lines -3,+2,+2,+2,+2,-3;\ -foreground rgb:9/8/8;\ -draw-lines +2,-1,-1,-1,-1,+2;\ -foreground rgb:f/e/e;\ -draw-lines -1,+1,-1,+0,+0,+0,+0,-1,+1,-1 -Xedit*SimpleMenu.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2;\ -foreground rgb:a/1/3;\ -fill-rect +3,+4,-4,+22;\ -foreground rgb:b/a/6;\ -draw-line +4,+4,-5,+4;\ -draw-line +4,+22,-5,+22 -Xedit*SimpleMenu.VerticalMargins: 2 -Xedit*SimpleMenu.HorizontalMargins: 2 -Xedit*SimpleMenu.borderWidth: 0 -Xedit*SimpleMenu.?.foreground: rgb:d/c/8 -Xedit*SimpleMenu.background: rgb:9/0/2 -Xedit*dirlabel*font: -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1 -Xedit*dirlabel*background: rgb:9/0/2 -Xedit*dirlabel*foreground: rgb:d/c/8 -Xedit*dirlabel*backgroundPixmap: XtUnspecifiedPixmap -Xedit*dirlabel.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*dirwindow*font: -*-courier-bold-r-*-*-12-*-*-*-*-*-*-1 -Xedit*dirwindow*foreground: rgb:9/0/2 -Xedit*dirwindow.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*viewport*Scrollbar.thumb: hlines2 -Xedit*ispell*text.width: 192 -Xedit*ispell.form.defaultDistance: 4 -Xedit*ispell*commands.Command.vertDistance: 0 -Xedit*ispell*commands.Command.height: 22 -Xedit*ispell*commands.check.vertDistance: 3 -Xedit*ispell*commands.look.vertDistance: 3 -Xedit*ispell*replaceAll.width: 39 -Xedit*ispell*ignoreAll.width: 39 -Xedit*ispell*check.width: 54 -Xedit*ispell*look.width: 50 -Xedit*ispell*undo.width: 104 -Xedit*ispell*add.width: 52 -Xedit*ispell*addUncap.width: 52 -Xedit*ispell*suspend.width: 60 -Xedit*ispell*suspend.internalWidth: 0 -Xedit*ispell*cancel.width: 44 -Xedit*ispell*cancel.internalWidth: 0 -Xedit*ispell*terse.width: 101 -Xedit*ispell*terse.height: 18 -Xedit*ispell*terse.vertDistance: 2 -Xedit*ispell*replace.internalWidth: 0 -Xedit*ispell*viewport.height: 139 -Xedit*ispell*list.foreground: rgb:9/0/2 -Xedit*ispell*list.backgroundPixmap: gradient:vertical?dimension=3&start=rgb:e/d/d&end=rgb:f/e/e -Xedit*ispell*borderColor: rgb:9/0/2 -Xedit*ispell*word.font: -*-courier-medium-r-*-*-12-*-*-*-*-*-*-1 -Xedit*ispell*word.displayList: -Xedit*ispell*word.foreground: black -Xedit*ispell*word.background: rgb:f/e/e -Xedit*ispell*word.borderWidth: 1 -Xedit*ispell*word.height: 18 -Xedit*SimpleMenu.SimpleMenu.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*columns*Label.width: 84 -Xedit*columns.minWidth: 130 -Xedit*columns.minHeight: 80 -Xedit*columns.maxWidth: 130 -Xedit*columns.maxHeight: 80 -Xedit*columns*cancel.horizDistance: 6 -Xedit*ispell*SimpleMenu.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*ispell*MenuButton.borderColor: rgb:f/e/e -Xedit*ispell*MenuButton.background: rgb:9/0/2 -Xedit*ispell*MenuButton.foreground: rgb:d/c/8 -Xedit*ispell*MenuButton.highlightThickness: 0 -Xedit*ispell*MenuButton.displayList:\ -foreground rgb:3/0/1;\ -draw-lines +1,-1,-1,-1,-1,+1;\ -foreground rgb:d/0/3;\ -draw-lines -1,+0,+0,+0,+0,-1;\ -foreground rgb:b/2/3;\ -draw-lines +2,-2,-2,-2,-2,+2;\ -foreground rgb:8/0/1;\ -draw-lines -2,+1,+1,+1,+1,-2 -Xedit*tip.background: yellow diff --git a/app/xedit/Xedit-color.ad b/app/xedit/app-defaults/Xedit-color.ad index da811b9a1..da811b9a1 100644 --- a/app/xedit/Xedit-color.ad +++ b/app/xedit/app-defaults/Xedit-color.ad diff --git a/app/xedit/Xedit-noxprint.ad b/app/xedit/app-defaults/Xedit-noxprint.ad index b626bf34a..b626bf34a 100644 --- a/app/xedit/Xedit-noxprint.ad +++ b/app/xedit/app-defaults/Xedit-noxprint.ad diff --git a/app/xedit/Xedit-xprint.ad b/app/xedit/app-defaults/Xedit-xprint.ad index 34ed4e918..34ed4e918 100644 --- a/app/xedit/Xedit-xprint.ad +++ b/app/xedit/app-defaults/Xedit-xprint.ad diff --git a/app/xedit/commands.c b/app/xedit/commands.c index 6940d732b..44612189d 100644 --- a/app/xedit/commands.c +++ b/app/xedit/commands.c @@ -73,44 +73,22 @@ static char *makeBackupName(String, String, unsigned); extern void _XawTextShowPosition(TextWidget); extern Widget scratch, texts[3], labels[3]; -static Boolean double_click = FALSE; - -#define DC_UNSAVED 1 -#define DC_LOADED 2 -#define DC_CLOBBER 3 -#define DC_KILL 4 -#define DC_SAVE 5 -#define DC_NEWER 6 + +#define DC_UNSAVED (1 << 0) +#define DC_LOADED (1 << 1) +#define DC_CLOBBER (1 << 2) +#define DC_KILL (1 << 3) +#define DC_SAVE (1 << 4) +#define DC_NEWER (1 << 5) static int dc_state; -/* Function Name: AddDoubleClickCallback(w) - * Description: Adds a callback that will reset the double_click flag - * to false when the text is changed. - * Arguments: w - widget to set callback upon. - * state - If true add the callback, else remove it. - * Returns: none. - */ static void AddDoubleClickCallback(Widget w, Bool state) { - Arg args[1]; - static XtCallbackRec cb[] = { {NULL, NULL}, {NULL, NULL} }; - - if (XtIsSubclass(w, asciiSrcObjectClass)) { - if (state) - XtAddCallback(w, XtNcallback, ResetDC, NULL); - else - XtRemoveCallback(w, XtNcallback, ResetDC, NULL); - } - else { - if (state) - cb[0].callback = ResetDC; - else - cb[0].callback = NULL; - - XtSetArg(args[0], XtNcallback, cb); - XtSetValues(w, args, ONE); - } + if (state) + XtAddCallback(w, XtNcallback, ResetDC, NULL); + else + XtRemoveCallback(w, XtNcallback, ResetDC, NULL); } /* Function Name: ResetDC @@ -124,9 +102,7 @@ AddDoubleClickCallback(Widget w, Bool state) static void ResetDC(Widget w, XtPointer junk, XtPointer garbage) { - double_click = FALSE; - - AddDoubleClickCallback(w, FALSE); + AddDoubleClickCallback(w, FALSE); } /*ARGSUSED*/ @@ -143,14 +119,14 @@ DoQuit(Widget w, XtPointer client_data, XtPointer call_data) unsigned i; Bool source_changed = False; - if (!double_click || (dc_state && dc_state != DC_UNSAVED)) { + if (!(dc_state & DC_UNSAVED)) { for (i = 0; i < flist.num_itens; i++) if (flist.itens[i]->flags & CHANGED_BIT) { source_changed = True; break; } } - if(!source_changed) { + if (!source_changed) { #ifndef __UNIXOS2__ XeditLispCleanUp(); #endif @@ -159,8 +135,7 @@ DoQuit(Widget w, XtPointer client_data, XtPointer call_data) XeditPrintf("Unsaved changes. Save them, or Quit again.\n"); Feep(); - double_click = TRUE; - dc_state = DC_UNSAVED; + dc_state |= DC_UNSAVED; AddDoubleClickCallback(XawTextGetSource(textwindow), True); } @@ -254,34 +229,33 @@ DoSave(Widget w, XtPointer client_data, XtPointer call_data) item = FindTextSource(NULL, filename); if (item != NULL && item->source != source) { - if (!double_click || (dc_state && dc_state != DC_LOADED)) { + if (!(dc_state & DC_LOADED)) { XmuSnprintf(buffer, sizeof(buffer), "%s%s%s%s", "Save: file ", name, " is already loaded, " "Save again to unload it", nothing_saved); Feep(); - double_click = TRUE; - dc_state = DC_LOADED; + dc_state |= DC_LOADED; AddDoubleClickCallback(XawTextGetSource(textwindow), True); goto error; } - KillTextSource(item); - item = FindTextSource(source = XawTextGetSource(textwindow), NULL); - double_click = FALSE; - dc_state = 0; + else { + KillTextSource(item); + item = FindTextSource(source = XawTextGetSource(textwindow), NULL); + dc_state &= ~DC_LOADED; + } } else if (item && !(item->flags & CHANGED_BIT)) { - if (!double_click || (dc_state && dc_state != DC_SAVE)) { + if (!(dc_state & DC_SAVE)) { XmuSnprintf(buffer, sizeof(buffer), "%s%s", "Save: No changes need to be saved, " "save again to override", nothing_saved); Feep(); - double_click = TRUE; - dc_state = DC_SAVE; + dc_state |= DC_SAVE; AddDoubleClickCallback(XawTextGetSource(textwindow), True); goto error; } - double_click = FALSE; - dc_state = 0; + else + dc_state &= ~DC_SAVE; } file_access = CheckFilePermissions(filename, &exists); @@ -301,23 +275,36 @@ DoSave(Widget w, XtPointer client_data, XtPointer call_data) if (!item || strcmp(item->filename, filename)) { if (file_access == WRITE_OK && exists) { - if (!double_click || (dc_state && dc_state != DC_CLOBBER)) { + if (!(dc_state & DC_CLOBBER)) { XmuSnprintf(buffer, sizeof(buffer), "%s%s%s%s", "Save: file ", name, " already exists, " "save again to override", nothing_saved); Feep(); - double_click = TRUE; - dc_state = DC_CLOBBER; + dc_state |= DC_CLOBBER; AddDoubleClickCallback(XawTextGetSource(textwindow), True); goto error; } - double_click = FALSE; - dc_state = 0; + else + dc_state &= ~DC_CLOBBER; } if (!item) item = FindTextSource(source, NULL); } + if (item && item->mtime && exists && item->mtime < st.st_mtime) { + if (!(dc_state & DC_NEWER)) { + XmuSnprintf(buffer, sizeof(buffer), "%s%s", + "Save: Newer file exists, " + "save again to override", nothing_saved); + Feep(); + dc_state |= DC_NEWER; + AddDoubleClickCallback(XawTextGetSource(textwindow), True); + goto error; + } + else + dc_state &= DC_NEWER; + } + if (app_resources.enableBackups && exists) { char backup_file[BUFSIZ]; @@ -334,21 +321,6 @@ DoSave(Widget w, XtPointer client_data, XtPointer call_data) Feep(); break; case WRITE_OK: - if (item && item->mtime && exists && item->mtime < st.st_mtime) { - if (!double_click || (dc_state && dc_state != DC_NEWER)) { - XmuSnprintf(buffer, sizeof(buffer), "%s%s", - "Save: Newer file exists, " - "save again to override", nothing_saved); - Feep(); - double_click = TRUE; - dc_state = DC_NEWER; - AddDoubleClickCallback(XawTextGetSource(textwindow), True); - goto error; - } - double_click = FALSE; - dc_state = 0; - } - if (XawAsciiSaveAsFile(source, filename)) { int i; Arg args[1]; @@ -715,7 +687,6 @@ ResetSourceChanged(xedit_flist_item *item) XtSetValues(item->sme, args, num_args); dc_state = 0; - double_click = FALSE; for (i = 0; i < 3; i++) { if (XawTextGetSource(texts[i]) == item->source) XtSetValues(labels[i], args, num_args); @@ -741,16 +712,14 @@ KillFile(Widget w, XEvent *event, String *params, Cardinal *num_params) } if (item->flags & CHANGED_BIT) { - if (!double_click || (dc_state && dc_state != DC_KILL)) { + if (!(dc_state & DC_KILL)) { XeditPrintf("Kill: Unsaved changes. Kill again to override.\n"); Feep(); - double_click = TRUE; - dc_state = DC_KILL; + dc_state |= DC_KILL; AddDoubleClickCallback(XawTextGetSource(textwindow), True); return; } - double_click = FALSE; - dc_state = 0; + dc_state &= ~DC_KILL; } KillTextSource(item); } diff --git a/app/xedit/configure b/app/xedit/configure index 35b281797..8a64e1589 100644 --- a/app/xedit/configure +++ b/app/xedit/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xedit 1.1.1. +# Generated by GNU Autoconf 2.59 for xedit 1.1.2. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xedit' PACKAGE_TARNAME='xedit' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='xedit 1.1.1' +PACKAGE_VERSION='1.1.2' +PACKAGE_STRING='xedit 1.1.2' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB PKG_CONFIG ac_pt_PKG_CONFIG USE_XPRINT_TRUE USE_XPRINT_FALSE PKGDEPS_CFLAGS PKGDEPS_LIBS LISPDIR NEED_REALPATH_TRUE NEED_REALPATH_FALSE NEED_STRCASECMP_TRUE NEED_STRCASECMP_FALSE NEED_UNSETENV_TRUE NEED_UNSETENV_FALSE APPDEFS_CFLAGS APPDEFS_LIBS appdefaultdir build build_cpu build_vendor build_os host host_cpu host_vendor host_os APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS' @@ -758,7 +758,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xedit 1.1.1 to adapt to many kinds of systems. +\`configure' configures xedit 1.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -824,7 +824,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xedit 1.1.1:";; + short | recursive ) echo "Configuration of xedit 1.1.2:";; esac cat <<\_ACEOF @@ -961,7 +961,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -xedit configure 1.1.1 +xedit configure 1.1.2 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -975,7 +975,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xedit $as_me 1.1.1, which was +It was created by xedit $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1573,7 +1573,7 @@ fi # Define the identity of the package. PACKAGE='xedit' - VERSION='1.1.1' + VERSION='1.1.2' cat >>confdefs.h <<_ACEOF @@ -4471,7 +4471,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by xedit $as_me 1.1.1, which was +This file was extended by xedit $as_me 1.1.2, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4534,7 +4534,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xedit config.status 1.1.1 +xedit config.status 1.1.2 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/app/xedit/configure.ac b/app/xedit/configure.ac index 165eb338e..64fc0b18b 100644 --- a/app/xedit/configure.ac +++ b/app/xedit/configure.ac @@ -22,7 +22,7 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.57]) -AC_INIT(xedit,[1.1.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xedit) +AC_INIT(xedit,[1.1.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xedit) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE diff --git a/app/xedit/xedit.c b/app/xedit/xedit.c index 7917d23fe..0b49226b6 100644 --- a/app/xedit/xedit.c +++ b/app/xedit/xedit.c @@ -279,8 +279,10 @@ main(int argc, char *argv[]) flags, file_access); XtAddCallback(item->source, XtNcallback, SourceChanged, (XtPointer)item); - if (exists && file_access == WRITE_OK) + if (exists && file_access == WRITE_OK) { item->mode = st.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); + item->mtime = st.st_mtime; + } if (!num_loaded) SwitchTextSource(item); ++num_loaded; |