~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for an alternative mechanism for displaying wide characters
[sgt/putty]
/
unix
/
gtkwin.c
diff --git
a/unix/gtkwin.c
b/unix/gtkwin.c
index
cd8c715
..
5aeeaf0
100644
(file)
--- a/
unix/gtkwin.c
+++ b/
unix/gtkwin.c
@@
-155,6
+155,8
@@
Filename platform_default_filename(const char *name)
char *platform_default_s(const char *name)
{
char *platform_default_s(const char *name)
{
+ if (!strcmp(name, "SerialLine"))
+ return dupstr("/dev/ttyS0");
return NULL;
}
return NULL;
}
@@
-1996,12
+1998,18
@@
void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len,
wcs[i] = text[i];
}
wcs[i] = text[i];
}
+ if (inst->fonts[fontid] == NULL && (fontid & 2)) {
+ /*
+ * We've been given ATTR_WIDE, but have no wide font.
+ * Fall back to the non-wide font.
+ */
+ fontid &= ~2;
+ }
+
if (inst->fonts[fontid] == NULL) {
/*
if (inst->fonts[fontid] == NULL) {
/*
- * The font for this contingency does not exist.
- * Typically this means we've been given ATTR_WIDE
- * character and have no wide font. So we display
- * nothing at all; such is life.
+ * The font for this contingency does not exist. So we
+ * display nothing at all; such is life.
*/
} else if (inst->fontinfo[fontid].is_wide) {
/*
*/
} else if (inst->fontinfo[fontid].is_wide) {
/*
@@
-3386,6
+3394,8
@@
static void start_backend(struct gui_data *inst)
set_icon(inst, title);
sfree(title);
}
set_icon(inst, title);
sfree(title);
}
+ sfree(realhost);
+
inst->back->provide_logctx(inst->backhandle, inst->logctx);
term_provide_resize_fn(inst->term, inst->back->size, inst->backhandle);
inst->back->provide_logctx(inst->backhandle, inst->logctx);
term_provide_resize_fn(inst->term, inst->back->size, inst->backhandle);
@@
-3442,7
+3452,7
@@
int pt_main(int argc, char **argv)
cmdline_run_saved(&inst->cfg);
cmdline_run_saved(&inst->cfg);
- if (!
*inst->cfg.host
&& !cfgbox(&inst->cfg))
+ if (!
cfg_launchable(&inst->cfg)
&& !cfgbox(&inst->cfg))
exit(0); /* config box hit Cancel */
}
exit(0); /* config box hit Cancel */
}