mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Windows tools: assorted '-demo' options.
Using a new screenshot-taking module I just added in windows/utils, these new options allow me to start up one of the tools with demonstration window contents and automatically save a .BMP screenshot to disk. This will allow me to keep essentially the same set of demo images and update them easily to keep pace with the current appearance of the real tools as PuTTY - and Windows itself - both evolve.
This commit is contained in:
18
settings.c
18
settings.c
@ -1307,6 +1307,8 @@ static int sessioncmp(const void *av, const void *bv)
|
||||
return strcmp(a, b); /* otherwise, compare normally */
|
||||
}
|
||||
|
||||
bool sesslist_demo_mode = false;
|
||||
|
||||
void get_sesslist(struct sesslist *list, bool allocate)
|
||||
{
|
||||
int i;
|
||||
@ -1316,12 +1318,18 @@ void get_sesslist(struct sesslist *list, bool allocate)
|
||||
if (allocate) {
|
||||
strbuf *sb = strbuf_new();
|
||||
|
||||
if ((handle = enum_settings_start()) != NULL) {
|
||||
while (enum_settings_next(handle, sb))
|
||||
put_byte(sb, '\0');
|
||||
enum_settings_finish(handle);
|
||||
if (sesslist_demo_mode) {
|
||||
put_asciz(sb, "demo-server");
|
||||
put_asciz(sb, "demo-server-2");
|
||||
} else {
|
||||
if ((handle = enum_settings_start()) != NULL) {
|
||||
while (enum_settings_next(handle, sb))
|
||||
put_byte(sb, '\0');
|
||||
enum_settings_finish(handle);
|
||||
}
|
||||
put_byte(sb, '\0');
|
||||
}
|
||||
put_byte(sb, '\0');
|
||||
|
||||
list->buffer = strbuf_to_str(sb);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user