From: Richard Kettlewell DisOrder
- version @version@ - select and play digital
- audio files Copyright © 2003-2008 Richard Kettlewell Portions extracted from
- MPG321,
- Copyright © 2001 Joe Drew,
- Copyright © 2000-2001 Robert Leslie DisOrder version @version
+ - software Jukebox This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version. Copyright © 2003-2008 Richard Kettlewell This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details. Portions extracted from MPG321, Copyright © 2001 Joe
+ Drew, Copyright © 2000-2001 Robert Leslie You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU
+ General Public License as published by the Free Software Foundation;
+ either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details. You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc., 59
+ Temple Place, Suite 330, Boston, MA 02111-1307 USA
- A |
- B |
- C |
- D |
- E |
- F |
- G |
- H |
- I |
- J |
- K |
- L |
- M |
- N |
- O |
- P |
- Q |
- R |
- S |
- T |
- U |
- V |
- W |
- X |
- Y |
- Z |
- *
-
- DisOrder
- version @version
- © 2003-2008 Richard Kettlewell et al
- @label{error.@label:error@}@ @label:error.generic@ @label{error.@error} @label{error.generic}"
# this is kind of painful using only BREs
@@ -67,7 +67,7 @@ nroff -Tascii -man "$1" | ${GNUSED} \
s!\([bi]\)><\1>!!g'
echo "
"
if $stdhead; then
- echo "@include{topbarend}@"
+ echo "@credits"
fi
echo " "
echo ""
diff --git a/server/actions.c b/server/actions.c
index aca4db0..c0a8cb4 100644
--- a/server/actions.c
+++ b/server/actions.c
@@ -171,7 +171,9 @@ static const struct action {
*/
void dcgi_expand(const char *name) {
const char *p;
-
+
+ /* Parse macros first */
+ mx_expand_file("macros.tmpl", sink_discard(), 0);
/* For unknown actions check that they aren't evil */
for(p = name; *p && isalnum((unsigned char)*p); ++p)
;
@@ -220,12 +222,8 @@ void dcgi_action(const char *action) {
}
/** @brief Generate an error page */
-void dcgi_error(const char *msg, ...) {
- va_list ap;
-
- va_start(ap, msg);
- byte_xvasprintf(&dcgi_error_string, msg, ap);
- va_end(ap);
+void dcgi_error(const char *key) {
+ dcgi_error_string = xstrdup(key);
dcgi_expand("error");
}
diff --git a/server/disorder-cgi.h b/server/disorder-cgi.h
index 95b36c6..b3aa4aa 100644
--- a/server/disorder-cgi.h
+++ b/server/disorder-cgi.h
@@ -62,7 +62,7 @@ extern char *dcgi_error_string;
void dcgi_expand(const char *name);
void dcgi_action(const char *action);
-void dcgi_error(const char *msg, ...);
+void dcgi_error(const char *key);
void dcgi_login(void);
void dcgi_lookup(unsigned want);
void dcgi_lookup_reset(void);
diff --git a/server/login.c b/server/login.c
index 5144934..891ebe1 100644
--- a/server/login.c
+++ b/server/login.c
@@ -132,7 +132,7 @@ void dcgi_login(void) {
dcgi_client = disorder_new(0);
/* Reconnect */
if(disorder_connect_cookie(dcgi_client, dcgi_cookie)) {
- dcgi_error("Cannot connect to server");
+ dcgi_error("connect");
exit(0);
}
/* If there was a cookie but it went bad, we forget it */
diff --git a/server/macros-disorder.c b/server/macros-disorder.c
index b35ad24..13276e9 100644
--- a/server/macros-disorder.c
+++ b/server/macros-disorder.c
@@ -734,7 +734,7 @@ static int exp_error(int attribute((unused)) nargs,
char attribute((unused)) **args,
struct sink *output,
void attribute((unused)) *u) {
- return sink_writes(output, cgi_sgmlquote(dcgi_error_string)) < 0 ? -1 : 0;
+ return sink_writes(output, dcgi_error_string) < 0 ? -1 : 0;
}
/* @image{NAME}
diff --git a/templates/Makefile.am b/templates/Makefile.am
index 93f8692..16bc70a 100644
--- a/templates/Makefile.am
+++ b/templates/Makefile.am
@@ -18,11 +18,10 @@
# USA
#
-pkgdata_DATA=about.tmpl choose.tmpl credits.tmpl playing.tmpl recent.tmpl \
- stdhead.tmpl stylesheet.tmpl search.tmpl about.tmpl volume.tmpl \
- prefs.tmpl help.tmpl choosealpha.tmpl topbar.tmpl \
- topbarend.tmpl error.tmpl new.tmpl login.tmpl \
- options options.labels \
+pkgdata_DATA=about.tmpl choose.tmpl playing.tmpl recent.tmpl \
+ search.tmpl about.tmpl prefs.tmpl help.tmpl error.tmpl \
+ new.tmpl login.tmpl macros.tmpl \
+ options options.labels \
options.columns
static_DATA=disorder.css
staticdir=${pkgdatadir}/static
diff --git a/templates/about.tmpl b/templates/about.tmpl
index 93d0d11..d153bef 100644
--- a/templates/about.tmpl
+++ b/templates/about.tmpl
@@ -20,60 +20,55 @@ USA
-->
-@include:stdhead@
- Copyright
+@stdmenu{about}
-
- Portions copyright © 2007 Ross Younger
- Portions copyright © 2007 Mark WoodingCopyright
-
Portions
+ copyright © 2007 Ross Younger
+ Portions copyright © 2007, 2008 Mark Wooding@label:choose.title@
@#{always have the first-letter bar, if choosealpha enabled}@
@@ -146,15 +145,16 @@ USA
}@
-@include{topbarend}@
+@credits
-@@
-
+}@#
diff --git a/templates/choosealpha.tmpl b/templates/choosealpha.tmpl
deleted file mode 100644
index 4027834..0000000
--- a/templates/choosealpha.tmpl
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-@include:stdhead@
- @label:choose.title@
-
- @label:error.title@
+@stdmenu{error}
+ @label{error.title}
@label{help.title}@
Introduction
@@ -48,8 +47,8 @@ USA
being listed first.) Where possible, estimated start times are
given.
Each track has a
+
Each track has a
button next to it. For the currently playing track this can be
used to stop playing the track before it has finished; this is
called “scratching”. For a track in the queue it
@@ -76,32 +75,32 @@ USA
Below this is the same table of current and queued tracks as for
the main playing screen, but with extra buttons for managing the
queue.
- The and
buttons on each track move that
+ The
and
buttons on each track move that
track around in the queue. Similarly the
and
buttons move each track to the head or
+ src="@image{upall}" title="@label{playing.upall}"
+ alt="@label{playing.upall}"> and
buttons move each track to the head or
tail of the queue.
If you are not logged in, or if your user has limited rights, @@ -133,15 +132,15 @@ USA
This screen displays recently played tracks, most recent first.
- The
+ The
button can be used to edit the details for a track; see Editing Preferences below.
The number of tracks remembered is controlled by the server configuration. See the history option in disorder_config(5) for + href="@url?action=disorder_config.5">disorder_config(5) for more details.
This screen displays tracks recently added to the database,
most recent first. The button can be used to edit the details
+ src="@image{edit}" title="@label{choose.prefs}"
+ alt="@label{choose.prefs}"> button can be used to edit the details
for a track; see Editing Preferences below,
and clicking on the track title will add it to the queue.
The time tracks are remembered for is controlled by the server configuration. See the noticed_history option in disorder_config(5) for + href="@url?action=disorder_config.5">disorder_config(5) for more details.
@@ -177,9 +176,9 @@ USAThis screen has two forms: choose, which give + href="@url?action=choose">choose, which give you all the top-level directories at once, and choosealpha, + href="@url?action=choosealpha">choosealpha, which breaks them down by initial letter.
This screen will may not be available if you are not logged in @@ -244,7 +243,7 @@ USA
Some keywords, known as “stopwords”, are excluded from the search, and will never match. See the stopword option in disorder_config(5) for + href="@url?action=disorder_config.5">disorder_config(5) for further details about this.
This screen will may not be available if you are not logged in @@ -312,37 +311,38 @@ USA
disorder_config(5) - configuration
-disorder(1) - command line +
disorder(1) - command line client
-disobedience(1) - GTK+ +
disobedience(1) - GTK+ client
-disorderd(8) - server
+disorderd(8) - server
-disorder-dump(8) - +
disorder-dump(8) - dump/restore preferences database
-disorder(3) - C API
+disorder(3) - C API
-disorder_protocol(5) - DisOrder control protocol
+ DisOrder + version @version + © 2003-2008 Richard Kettlewell et al +
} @# Expand to the time that @id will be played @# @what is the section @@ -111,4 +171,3 @@ USA width=@width height=@height title="@label{playing.@q{@dir}verbose}" alt="@label{playing.@dir}">}} -}@# diff --git a/templates/new.tmpl b/templates/new.tmpl index 73eea2d..2185c4b 100644 --- a/templates/new.tmpl +++ b/templates/new.tmpl @@ -20,11 +20,10 @@ USA --> -@include:stdhead@ -