From: Wichert Akkerman Date: Wed, 22 Dec 1999 12:21:17 +0000 (+0000) Subject: debian/dpkg-doc.postrm: Use doc-name instead of file-name X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d96f65430b135ccf42952391016773a0b3e6ed73;p=dpkg debian/dpkg-doc.postrm: Use doc-name instead of file-name dselect/pkgdisplay.cc: Replace empty string for eflags to a space so gettext doesn't use the translation-info po/update.sh: Generate dselect/helpmsgs.{cc,h} so we can translate them. po/POTFILES.in: add dselect/helpmsgs.cc dselect/pkgtop.cc: use ACS_HLINE instead of `-' dselect/baselist.cc: change colour of column headings dselect: add a new --export mode which suppresses the display of the helpscreen --- diff --git a/ChangeLog b/ChangeLog index 5aae3980..d5cbee61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +Wed Dec 22 12:07:40 CET 1999 Wichert Akkerman + + * debian/dpkg-doc.postrm: Use doc-name instead of file-name (probably + need to change the filename, but I'll be lazy now :) + * dselect/pkgdisplay.cc: Replace empty string for eflags to a space + so gettext doesn't use the translation-info + * po/update.sh: Generate dselect/helpmsgs.{cc,h} so we can translate them. + * po/POTFILES.in: add dselect/helpmsgs.cc + * dselect/Makefile.in: put helpmsgs.{cc,h} in $(srcdir), since gettext + will barf on us if we put them in the builddir. (The real issue here is + that when we generate the .po-files we don't know what the builddir will + be and gettext can't handle VPATH). + * dselect patches from Dan Gohman : + + dselect/pkgtop.cc: use ACS_HLINE instead of `-' + + dselect/baselist.cc: change colour of column headings + + dselect: add a new --export mode which suppresses the display of the + helpscreen + Tue Dec 21 15:59:35 CET 1999 Wichert Akkerman * scripts/dpkg-scansoures.pl: don't use \z since that is perl5.005-specific. diff --git a/debian/changelog b/debian/changelog index e395a869..47829816 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,9 @@ dpkg (1.6.5) unstable; urgency=low * Don't use \z in dpkg-scansources, Closes: Bug# 53182 + * Correctly unregister internals manual, Closes: Bug# 53200 + * dselect helpessages can be translated now, Closes: Bug# 51381 + * dselect UI tweaks, including a new --expert mode -- Wichert Akkerman UNRELEASED diff --git a/debian/dpkg-doc.prerm b/debian/dpkg-doc.prerm index b967c90d..fe9bbdde 100755 --- a/debian/dpkg-doc.prerm +++ b/debian/dpkg-doc.prerm @@ -12,7 +12,7 @@ case "$1" in remove|deconfigure|upgrade) if command -v install-docs >/dev/null 2>&1; then echo -n "Unregistering DPKG documentation..." - install-docs -r dpkg-doc || true + install-docs -r dpkg-internals || true echo "done." fi ;; diff --git a/dselect/.cvsignore b/dselect/.cvsignore index 70845e08..8773694e 100644 --- a/dselect/.cvsignore +++ b/dselect/.cvsignore @@ -1 +1,4 @@ Makefile.in +helpmsgs.cc +helpmsgs.h +curkeys.h diff --git a/dselect/Makefile.in b/dselect/Makefile.in index c83c4550..6f656198 100644 --- a/dselect/Makefile.in +++ b/dselect/Makefile.in @@ -12,7 +12,8 @@ CXX_SOURCES = basecmds.cc baselist.cc basetop.cc bindings.cc curkeys.cc \ MAN8PAGES = dselect.8 OBJECTS = $(patsubst %.cc, %.o, $(CXX_SOURCES)) -GENFILES = $(OBJECTS) dselect helpmsgs.h +GENFILES = $(OBJECTS) dselect helpmsgs.h curkeys.h \ + $(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc .PHONY: all all:: dselect @@ -50,8 +51,8 @@ dselect: $(OBJECTS) ../lib/libdpkg.a basecmds.o: helpmsgs.h curkeys.o: curkeys.h -helpmsgs.h helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl - perl $(srcdir)/mkhelpmsgs.pl $< +$(srcdir)/helpmsgs.h $(srcdir)/helpmsgs.cc: helpmsgs.src $(srcdir)/mkhelpmsgs.pl + cd $(srcdir) ; perl $(srcdir)/mkhelpmsgs.pl $< curkeys.h: keyoverride $(srcdir)/mkcurkeys.pl cursesfile=`echo '#include ' | \ diff --git a/dselect/baselist.cc b/dselect/baselist.cc index 5e208ae3..b4d13a17 100644 --- a/dselect/baselist.cc +++ b/dselect/baselist.cc @@ -121,6 +121,7 @@ void baselist::startdisplay() { thisstate_attr= COLOR_PAIR(3); selstate_attr= list_attr|A_BOLD; selstatesel_attr= listsel_attr|A_BOLD; + colheads_attr= COLOR_PAIR(3); } else { title_attr= A_REVERSE; thisstate_attr= A_STANDOUT; @@ -128,10 +129,11 @@ void baselist::startdisplay() { listsel_attr= A_STANDOUT; selstate_attr= A_BOLD; selstatesel_attr= A_STANDOUT; + colheads_attr= A_BOLD; } query_attr= title_attr; info_attr= list_attr; - colheads_attr= info_headattr= A_BOLD; + info_headattr= A_BOLD; whatinfo_attr= thisstate_attr; // set up windows and pads, based on screen size diff --git a/dselect/dselect.h b/dselect/dselect.h index f8242727..838d167e 100644 --- a/dselect/dselect.h +++ b/dselect/dselect.h @@ -149,6 +149,7 @@ void cursesoff(); extern const char *admindir; extern FILE *debug; +extern int expertmode; enum urqresult { urqr_normal, urqr_fail, urqr_quitmenu }; enum quitaction { qa_noquit, qa_quitchecksave, qa_quitnochecksave }; diff --git a/dselect/main.cc b/dselect/main.cc index 2ab579c1..a1637ef2 100644 --- a/dselect/main.cc +++ b/dselect/main.cc @@ -53,6 +53,7 @@ const char printforhelp[]= N_("Type dselect --help for help."); modstatdb_rw readwrite; const char *admindir= ADMINDIR; FILE *debug; +int expertmode = 0; static keybindings packagelistbindings(packagelist_kinterps,packagelist_korgbindings); @@ -93,7 +94,7 @@ static void usage(void) { _("Usage: dselect [options]\n" " dselect [options] action ...\n" "Options: --admindir (default is /var/lib/dpkg)\n" - " --help --version --licence --debug | -D | -D\n" + " --help --version --licence --expert --debug | -D | -D\n" "Actions: access update select install config remove quit menu\n"), stdout)) werr("stdout"); } @@ -140,11 +141,16 @@ extern "C" { setvbuf(debug,0,_IONBF,0); } + static void setexpert() { + expertmode = 1; + } + } /* End of extern "C" */ static const struct cmdinfo cmdinfos[]= { { "admindir", 0, 1, 0, &admindir, 0 }, { "debug", 'D', 1, 0, 0, setdebug }, + { "expert", 'E', 0, 0, 0, setexpert }, { "help", 'h', 0, 0, 0, helponly }, { "version", 0, 0, 0, 0, versiononly }, { "licence", 0, 0, 0, 0, showcopyright }, /* UK spelling */ diff --git a/dselect/pkgdisplay.cc b/dselect/pkgdisplay.cc index 8de5332b..18fe4757 100644 --- a/dselect/pkgdisplay.cc +++ b/dselect/pkgdisplay.cc @@ -41,8 +41,10 @@ const char N_("remove"), N_("purge"), 0 }, - - *const eflagstrings[]= { N_(""), +/* WTA: the space is a trick to work aroung gettext which uses the empty + * string to store information about the translation + */ + *const eflagstrings[]= { N_(" "), N_("REINSTALL"), 0 }, diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc index c429983c..ac493a6c 100644 --- a/dselect/pkglist.cc +++ b/dselect/pkglist.cc @@ -491,6 +491,8 @@ pkginfo **packagelist::display() { setupsigwinch(); startdisplay(); + + if (!expertmode) displayhelp(helpmenulist(),'i'); if (debug) fprintf(debug,"packagelist[%p]::display() entering loop\n",this); diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc index e984b309..1b5420ac 100644 --- a/dselect/pkgtop.cc +++ b/dselect/pkgtop.cc @@ -235,9 +235,9 @@ void packagelist::redraw1itemsel(int index, int selected) { indent= describemany(buf,priority,section,pkg->clientdata); mvwaddstr(listpad,index,0, " "); - i= total_width-6; + i= total_width-7; j= (indent<<1) + 1; - while (j-- >0) { waddch(listpad,'-'); i--; } + while (j-- >0) { waddch(listpad,ACS_HLINE); i--; } waddch(listpad,' '); wattrset(listpad, selected ? selstatesel_attr : selstate_attr); @@ -247,7 +247,7 @@ void packagelist::redraw1itemsel(int index, int selected) { waddch(listpad,' '); j= (indent<<1) + 1; - while (j-- >0) { waddch(listpad,'-'); i--; } + while (j-- >0) { waddch(listpad,ACS_HLINE); i--; } delete[] buf; diff --git a/po/POTFILES.in b/po/POTFILES.in index 8f7b3257..996ff816 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -57,3 +57,4 @@ dselect/pkglist.cc dselect/pkgsublist.cc dselect/pkgtop.cc +dselect/helpmsgs.cc diff --git a/po/update.sh b/po/update.sh index 406edcd8..441fa811 100755 --- a/po/update.sh +++ b/po/update.sh @@ -1,10 +1,17 @@ #!/bin/sh +# We need to generate helpmsgs.cc so we can translate the +# strings in it + +( cd ../dselect ; perl mkhelpmsgs.pl helpmsgs.src ) + xgettext --default-domain=dpkg --directory=.. \ --add-comments --keyword=_ --keyword=N_ \ --files-from=POTFILES.in && test ! -f dpkg.po \ || ( rm -f dpkg.pot && mv dpkg.po dpkg.pot ) +# Moving along.. + catalogs=`ls *.po` for cat in $catalogs; do if [ "$cat" = "dpkg.po" ] ; then continue ; fi