aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>1999-11-06 07:06:09 +0800
committerEttore Perazzoli <ettore@src.gnome.org>1999-11-06 07:06:09 +0800
commitb681ec2b9a98684ef821f9b6fbdb9a231a58d4b5 (patch)
tree6dc964528b9db296aa1dfedde9a2b2122fd0db8e /tests
parentc8fce201dc8b14505f2e0387689947922e08f956 (diff)
downloadgsoc2013-evolution-b681ec2b9a98684ef821f9b6fbdb9a231a58d4b5.tar.gz
gsoc2013-evolution-b681ec2b9a98684ef821f9b6fbdb9a231a58d4b5.tar.zst
gsoc2013-evolution-b681ec2b9a98684ef821f9b6fbdb9a231a58d4b5.zip
Here is my initial Evolution work: message composition widget and some
installation fixes for Camel. svn path=/trunk/; revision=1369
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/ui-tests/.cvsignore1
-rw-r--r--tests/ui-tests/Makefile.am26
-rw-r--r--tests/ui-tests/msg-composer-test.c52
4 files changed, 68 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index be6523dfbd..85ee40b3a1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
# process this file with automake to create Makefile.in
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir)/camel \
+INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir) -I$(top_srcdir)/camel \
-I$(includedir) -I$(top_srcdir)/camel/providers/MH
LDADD = \
$(top_builddir)/camel/libcamel.la \
diff --git a/tests/ui-tests/.cvsignore b/tests/ui-tests/.cvsignore
index be569b9c4c..10c9ca5909 100644
--- a/tests/ui-tests/.cvsignore
+++ b/tests/ui-tests/.cvsignore
@@ -3,3 +3,4 @@ Makefile
.deps
.libs
store_listing
+msg-composer-test
diff --git a/tests/ui-tests/Makefile.am b/tests/ui-tests/Makefile.am
index c4849e7c3c..24d62047db 100644
--- a/tests/ui-tests/Makefile.am
+++ b/tests/ui-tests/Makefile.am
@@ -1,17 +1,19 @@
# process this file with automake to create Makefile.in
-INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir)/camel \
- -I$(includedir) -I$(top_srcdir)/camel/providers/MH \
+INCLUDES = \
+ -I$(top_srcdir)/intl \
+ -I$(top_srcdir)/camel \
+ -I$(includedir) \
+ -I$(top_srcdir)/camel/providers/MH \
+ -I$(top_srcdir)/widgets \
$(EXTRA_GNOME_CFLAGS)
-LDADD = \
- $(top_builddir)/camel/libcamel.la \
- $(top_builddir)/camel/providers/MH/libcamelmh.la \
- $(INTLLIBS) $(EXTRA_GNOME_LIBS) $(PTHREAD_LIB)
+LDADD = \
+ $(top_builddir)/widgets/libevolutionwidgets.la \
+ $(top_builddir)/camel/libcamel.la \
+ $(INTLLIBS) \
+ $(EXTRA_GNOME_LIBS) \
+ $(PTHREAD_LIB)
-
-
-
-
-noinst_PROGRAMS = \
- store_listing \ No newline at end of file
+noinst_PROGRAMS = \
+ msg-composer-test \ No newline at end of file
diff --git a/tests/ui-tests/msg-composer-test.c b/tests/ui-tests/msg-composer-test.c
new file mode 100644
index 0000000000..8fbf01b5e8
--- /dev/null
+++ b/tests/ui-tests/msg-composer-test.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;
+}