[vte/vte-next: 108/114] vteapp: Derive from VteTerminal



commit c3cc7f183ad4a09fcb90c9efdf33abc799560a64
Author: Christian Persch <chpe gnome org>
Date:   Sat May 28 13:17:48 2011 +0200

    vteapp: Derive from VteTerminal

 src/vteapp.c |   36 +++++++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index 7c6f0d7..a677a95 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -486,6 +486,40 @@ terminal_notify_cb(GObject *object,
   g_value_unset(&value);
 }
 
+/* Derived terminal class */
+
+typedef struct _VteappTerminal      VteappTerminal;
+typedef struct _VteappTerminalClass VteappTerminalClass;
+
+struct _VteappTerminalClass {
+        VteTerminalClass parent_class;
+};
+struct _VteappTerminal {
+        VteTerminal parent_instance;
+};
+
+static GType vteapp_terminal_get_type(void);
+
+G_DEFINE_TYPE(VteappTerminal, vteapp_terminal, VTE_TYPE_TERMINAL)
+
+static void
+vteapp_terminal_class_init(VteappTerminalClass *klass)
+{
+}
+
+static void
+vteapp_terminal_init(VteappTerminal *terminal)
+{
+}
+
+static GtkWidget *
+vteapp_terminal_new(void)
+{
+        return g_object_new(vteapp_terminal_get_type(), NULL);
+}
+
+/* Command line options */
+
 static int
 parse_enum(GType type,
 	   const char *string)
@@ -910,7 +944,7 @@ main(int argc, char **argv)
 	}
 
 	/* Create the terminal widget and add it to the scrolling shell. */
-	widget = vte_terminal_new();
+	widget = vteapp_terminal_new();
 	terminal = VTE_TERMINAL (widget);
         if (!dbuffer) {
 		gtk_widget_set_double_buffered(widget, dbuffer);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]