printer_start_job shouldn't need to refer to cfg.printer, since it's
[sgt/putty] / unix / pterm.c
index b7e2b93..f0f71e8 100644 (file)
@@ -83,6 +83,23 @@ char *x_get_default(char *key)
     return XGetDefault(GDK_DISPLAY(), app_name, key);
 }
 
+/*
+ * Default settings that are specific to pterm.
+ */
+char *platform_default_s(char *name)
+{
+    if (!strcmp(name, "Font"))
+       return "fixed";        /* COE_NORMAL works badly in an xterm */
+    return NULL;
+}
+
+int platform_default_i(char *name, int def)
+{
+    if (!strcmp(name, "CloseOnExit"))
+       return COE_ALWAYS;             /* COE_NORMAL works badly in an xterm */
+    return def;
+}
+
 void ldisc_update(void *frontend, int echo, int edit)
 {
     /*
@@ -2394,7 +2411,8 @@ int main(int argc, char **argv)
     term_provide_logctx(inst->term, inst->logctx);
 
     inst->back = &pty_backend;
-    inst->back->init((void *)inst->term, &inst->backhandle, NULL, 0, NULL, 0);
+    inst->back->init((void *)inst->term, &inst->backhandle, &cfg,
+                    NULL, 0, NULL, 0);
     inst->back->provide_logctx(inst->backhandle, inst->logctx);
 
     term_provide_resize_fn(inst->term, inst->back->size, inst->backhandle);