aboutsummaryrefslogtreecommitdiffstats
path: root/composer/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>1999-11-17 23:35:43 +0800
committerEttore Perazzoli <ettore@src.gnome.org>1999-11-17 23:35:43 +0800
commit9663037f6c0daaf03d74c88afb002a6bb33f222b (patch)
treea6edccc1e5963511d0734e3171b97d853bf14b5c /composer/main.c
parentca7044930f42a698fd88f914c2512a20e2eeaae9 (diff)
downloadgsoc2013-evolution-9663037f6c0daaf03d74c88afb002a6bb33f222b.tar.gz
gsoc2013-evolution-9663037f6c0daaf03d74c88afb002a6bb33f222b.tar.zst
gsoc2013-evolution-9663037f6c0daaf03d74c88afb002a6bb33f222b.zip
More work:
- Fixed some Camel API naming issues. - Moved the message composer stuff to the `composer' directory. svn path=/trunk/; revision=1395
Diffstat (limited to 'composer/main.c')
-rw-r--r--composer/main.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/composer/main.c b/composer/main.c
new file mode 100644
index 0000000000..8fbf01b5e8
--- /dev/null
+++ b/composer/main.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+
+#include <gnome.h>
+
+#include <camel/camel-data-wrapper.h>
+#include <camel/camel-stream-fs.h>
+#include <camel/camel-stream.h>
+
+#include "e-msg-composer.h"
+
+static void
+send_cb (EMsgComposer *composer,
+ gpointer data)
+{
+ CamelMimeMessage *message;
+ CamelStream *stream;
+ gint stdout_dup;
+
+ message = e_msg_composer_get_message (composer);
+
+ stdout_dup = dup (1);
+ stream = camel_stream_fs_new_with_fd (stdout_dup);
+ camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message),
+ stream);
+ camel_stream_close (stream);
+
+ gtk_object_unref (GTK_OBJECT (message));
+
+#if 0
+ gtk_widget_destroy (GTK_WIDGET (composer));
+ gtk_main_quit ();
+#endif
+}
+
+int
+main (int argc, char **argv)
+{
+ GtkWidget *composer;
+
+ gnome_init ("test", "0.0", argc, argv);
+ glade_gnome_init ();
+
+ composer = e_msg_composer_new ();
+ gtk_widget_show (composer);
+
+ gtk_signal_connect (GTK_OBJECT (composer), "send",
+ GTK_SIGNAL_FUNC (send_cb), NULL);
+
+ gtk_main ();
+
+ return 0;
+}