diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2000-03-02 19:19:39 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2000-03-02 19:19:39 +0800 |
commit | d932fda48b3724f516fa5012b80c329644d72bdf (patch) | |
tree | a9b50d4dd3902ad79230b9b14e70b4034d590344 /composer/main.c | |
parent | da08b761fb9afadf60b4705ec8a310f83f031188 (diff) | |
download | gsoc2013-evolution-d932fda48b3724f516fa5012b80c329644d72bdf.tar.gz gsoc2013-evolution-d932fda48b3724f516fa5012b80c329644d72bdf.tar.zst gsoc2013-evolution-d932fda48b3724f516fa5012b80c329644d72bdf.zip |
Bonobization of the message composer, part 1.
svn path=/trunk/; revision=2012
Diffstat (limited to 'composer/main.c')
-rw-r--r-- | composer/main.c | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/composer/main.c b/composer/main.c index 8fbf01b5e8..9a29e95666 100644 --- a/composer/main.c +++ b/composer/main.c @@ -1,6 +1,10 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ #include <gnome.h> +#include <libgnorba/gnorba.h> +#include <bonobo.h> + +#include <glade/glade.h> #include <camel/camel-data-wrapper.h> #include <camel/camel-stream-fs.h> @@ -32,21 +36,41 @@ send_cb (EMsgComposer *composer, #endif } +static guint +create_composer (void) +{ + GtkWidget *composer; + + composer = e_msg_composer_new (); + gtk_widget_show (composer); + + gtk_signal_connect (GTK_OBJECT (composer), "send", GTK_SIGNAL_FUNC (send_cb), NULL); + + return FALSE; +} + int main (int argc, char **argv) { - GtkWidget *composer; + CORBA_Environment ev; + CORBA_ORB orb; + + CORBA_exception_init (&ev); + gnome_CORBA_init ("evolution-test-msg-composer", "0.0", &argc, argv, 0, &ev); + CORBA_exception_free (&ev); + + orb = gnome_CORBA_ORB (); - gnome_init ("test", "0.0", argc, argv); glade_gnome_init (); - composer = e_msg_composer_new (); - gtk_widget_show (composer); + if (bonobo_init (orb, NULL, NULL) == FALSE) + g_error ("Could not initialize Bonobo\n"); - gtk_signal_connect (GTK_OBJECT (composer), "send", - GTK_SIGNAL_FUNC (send_cb), NULL); + /* We can't make any CORBA calls unless we're in the main loop. So we + delay creating the container here. */ + gtk_idle_add ((GtkFunction) create_composer, NULL); - gtk_main (); + bonobo_main (); return 0; } |