Close On Exit and Warn On Close fixes: (a) pty_reconfig needs to
[u/mdw/putty] / unix / pterm.c
index 70317d5..f2e8b12 100644 (file)
@@ -152,17 +152,6 @@ void ldisc_update(void *frontend, int echo, int edit)
      */
 }
 
-int askappend(void *frontend, Filename filename)
-{
-    /*
-     * Logging in an xterm-alike is liable to be something you only
-     * do at serious diagnostic need. Hence, I'm going to take the
-     * easy option for now and assume we always want to overwrite
-     * log files. I can always make it properly configurable later.
-     */
-    return 2;
-}
-
 int from_backend(void *frontend, int is_stderr, const char *data, int len)
 {
     struct gui_data *inst = (struct gui_data *)frontend;
@@ -353,7 +342,7 @@ char *get_window_title(void *frontend, int icon)
 gint delete_window(GtkWidget *widget, GdkEvent *event, gpointer data)
 {
     struct gui_data *inst = (struct gui_data *)data;
-    if (inst->cfg.warn_on_close) {
+    if (!inst->exited && inst->cfg.warn_on_close) {
        if (!reallyclose(inst))
            return TRUE;
     }