=== modified file 'src/vte-private.h'
--- src/vte-private.h	2008-12-02 17:59:11 +0000
+++ src/vte-private.h	2008-12-04 05:58:51 +0000
@@ -1,4 +1,4 @@
-/*
+/* -*- tab-width: 8; c-basic-offset: 8; indent-tabs-mode: t; -*-
  * Copyright (C) 2001-2004 Red Hat, Inc.
  *
  * This is free software; you can redistribute it and/or modify it under
@@ -92,6 +92,9 @@
 
 #define VTE_UTF8_BPC                    (6) /* Maximum number of bytes used per UTF-8 character */
 
+#define VTE_MEDIACTRL_PRINT_START	5
+#define VTE_MEDIACTRL_PRINT_END		4
+
 #define I_(string) (g_intern_static_string(string))
 
 
@@ -428,6 +431,9 @@
 	glong line_thickness;
 	glong underline_position;
 	glong strikethrough_position;
+
+	/* Media copy support. */
+	gboolean media_copy_enabled;
 };
 
 

=== modified file 'src/vteseq-n.gperf'
--- src/vteseq-n.gperf	2008-12-01 01:00:19 +0000
+++ src/vteseq-n.gperf	2008-12-04 00:14:49 +0000
@@ -34,7 +34,7 @@
 "scroll-up", VTE_SEQUENCE_HANDLER(vte_sequence_handler_scroll_up)
 "tab-clear", VTE_SEQUENCE_HANDLER(vte_sequence_handler_tab_clear)
 "full-reset", VTE_SEQUENCE_HANDLER(vte_sequence_handler_full_reset)
-#"media-copy", VTE_SEQUENCE_HANDLER_NULL
+"media-copy", VTE_SEQUENCE_HANDLER(vte_sequence_handler_media_copy)
 "reset-mode", VTE_SEQUENCE_HANDLER(vte_sequence_handler_reset_mode)
 "soft-reset", VTE_SEQUENCE_HANDLER(vte_sequence_handler_soft_reset)
 "cursor-down", VTE_SEQUENCE_HANDLER(vte_sequence_handler_DO)

=== modified file 'src/vteseq.c'
--- src/vteseq.c	2008-12-02 15:40:12 +0000
+++ src/vteseq.c	2008-12-04 06:45:53 +0000
@@ -1,4 +1,4 @@
-/*
+/* -*- tab-width: 8; c-basic-offset: 8; indent-tabs-mode: t; -*-
  * Copyright (C) 2001-2004 Red Hat, Inc.
  *
  * This is free software; you can redistribute it and/or modify it under
@@ -3288,6 +3288,25 @@
 	}
 }
 
+/* Media copy support, takes a single parameter (a glong). */
+static void
+vte_sequence_handler_media_copy (VteTerminal *terminal, GValueArray *params)
+{
+	glong mc_param = g_value_get_long(g_value_array_get_nth(params, 0));
+
+	switch(mc_param) {
+	case VTE_MEDIACTRL_PRINT_START:
+		terminal->pvt->media_copy_enabled = TRUE;
+		break;
+	case VTE_MEDIACTRL_PRINT_END:
+		terminal->pvt->media_copy_enabled = FALSE;
+		break;
+	default:
+		_vte_debug_print(VTE_DEBUG_MISC,
+				 "unimplemented MC sequence `%d' received.\n",
+				 mc_param);
+	}
+}
 
 /* Lookup tables */
 

