Commit 8c171941 authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Correctly set theme

parent a1e8efe4
...@@ -16,7 +16,7 @@ typedef struct ...@@ -16,7 +16,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 5, .Minor = 5,
.Patch = 60 .Patch = 61
}; };
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c // TODO(matt): Copy in the DB 3 stuff from cinera_working.c
...@@ -3031,15 +3031,22 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen ...@@ -3031,15 +3031,22 @@ HMMLToBuffers(buffers *CollationBuffers, template **BespokeTemplate, char *Filen
HaveErrors = TRUE; HaveErrors = TRUE;
} }
if(!HMML.metadata.project && !StringsDiffer(CollationBuffers->Theme, "")) if(!StringsDiffer(CollationBuffers->Theme, ""))
{ {
fprintf(stderr, "Unable to determine which theme to apply to the HTML\n" if(HMML.metadata.project)
"Please set at least one of:\n" {
"\t1. project attribute in the [video] node of your .hmml file\n" CopyStringNoFormat(CollationBuffers->Theme, sizeof(CollationBuffers->Theme), HMML.metadata.project);
"\t2. ProjectID on the command line with -p\n" }
"\t3. Style on the command line with -s\n" else
); {
HaveErrors = TRUE; fprintf(stderr, "Unable to determine which theme to apply to the HTML\n"
"Please set at least one of:\n"
"\t1. project attribute in the [video] node of your .hmml file\n"
"\t2. ProjectID on the command line with -p\n"
"\t3. Style on the command line with -s\n"
);
HaveErrors = TRUE;
}
} }
if(!HMML.metadata.id) if(!HMML.metadata.id)
...@@ -6490,7 +6497,7 @@ main(int ArgC, char **Args) ...@@ -6490,7 +6497,7 @@ main(int ArgC, char **Args)
CopyStringNoFormat(CollationBuffers.ProjectID, sizeof(CollationBuffers.ProjectID), Config.ProjectID); CopyStringNoFormat(CollationBuffers.ProjectID, sizeof(CollationBuffers.ProjectID), Config.ProjectID);
if(!StringsDiffer(Config.Theme, "")) if(!StringsDiffer(Config.Theme, ""))
{ {
CopyStringNoFormat(Config.Theme, sizeof(Config.Theme), Config.ProjectID); Config.Theme = Config.ProjectID;
} }
CopyStringNoFormat(CollationBuffers.Theme, sizeof(CollationBuffers.Theme), Config.Theme); CopyStringNoFormat(CollationBuffers.Theme, sizeof(CollationBuffers.Theme), Config.Theme);
if(StringsDiffer(ProjectInfo[ProjectInfoIndex].FullName, "")) if(StringsDiffer(ProjectInfo[ProjectInfoIndex].FullName, ""))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment