aboutsummaryrefslogtreecommitdiffstats
path: root/composer/listener.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-11-08 14:49:14 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-11-08 14:49:14 +0800
commit234540a383de150f0a79df466aa76dae4096d09c (patch)
treece8697e153cefd8ce95644370392c874c443b33a /composer/listener.c
parentab44fe3e1d962e7876693929c940121e2954379d (diff)
downloadgsoc2013-evolution-234540a383de150f0a79df466aa76dae4096d09c.tar.gz
gsoc2013-evolution-234540a383de150f0a79df466aa76dae4096d09c.tar.zst
gsoc2013-evolution-234540a383de150f0a79df466aa76dae4096d09c.zip
Fix bonobo object setup.
2002-11-08 Not Zed <NotZed@Ximian.com> * listener.c: Fix bonobo object setup. * e-msg-composer-hdrs.c: Remove oaf stuff, fix destroy to be multi-call safe. * e-msg-composer-attachment.c (e_msg_composer_attachment_new): Remove utf8 from locale conversions, & glib api changes. (ok_cb): " * e-msg-composer-attachment-bar.c (add_from_file): gtk message dialog. (pixbuf_for_mime_type): glib,gnome-vfs api changes. (init): Estimate the icon_height based on the pango font description size, this is probably not correct. (properties_cb): (remove_cb): Changed signature for gnomeui callbacks. (popup_icon_context_menu): (popup_context_menu): popup_menu api change (destroy): Protect from multiple calls. (e_msg_composer_attachment_bar_new): Remove push/pop visual/colormap stuff. * composer-marshal.list: The list of marshallers used by the composer. * Makefile.am (composer-marshal.h): Added composer marshal builder. * evolution-composer.c (class_init): bonobo object epv setup change. (factory_fn): Fix changes to factory callback. * e-icon-list.c: (icon_get_height): Use bounding box to calc height. (icon_event): drop gtk_selection_extended. (e_icon_list_remove): " (select_icon): (unselect_icon): " * e-msg-composer.c (autosave_save_draft): Dup fd rather than poke camel_stream_fd's data. Also, use camel_stream_close() rather than flush. (autosave_manager_query_load_orphans): Port to gtk dialog. (autosave_query_cb): Removed, redundant. (save): Port to gtkdialog. (prepare_engine): Fix bonobo-object-client code. (get_file_content): gtk dialog (do_exit): gtk dialog. (setup_signatures_menu): dump gtkutf8 stuff. (marshal_NONE__NONE_INT): What WAS jeff thinking? Removed :) (class_init): g object setup. (e_msg_composer_get_type): " (create_composer): remove bonobo_window_construct, use create property instead. g_signal stuff. bonobo stuff. (is_special_header): Use ascii_strncasecmp (e_msg_composer_set_pending_body): gtk->g_object_get/set_data. (e_msg_composer_set_body): use ascii_strncasecmp (e_msg_composer_add_inline_image_from_mime_part): make cid const. (autosave_manager_register): (autosave_manager_unregister): Use g_path_get_basename() & account for differences. (composer_shutdown): rename to finalise/etc. (class_init): Use object:finalize instead of shutdown. (e_msg_composer_set_body): Use _() rather than U_(). (build_message): gtk dialog. 2002-11-06 Not Zed <NotZed@Ximian.com> * e-msg-composer-attachment-bar.c (pixbuf_for_mime_type): Add error return to gdk_pixbuf_new_from_file(). svn path=/trunk/; revision=18659
Diffstat (limited to 'composer/listener.c')
-rw-r--r--composer/listener.c96
1 files changed, 10 insertions, 86 deletions
diff --git a/composer/listener.c b/composer/listener.c
index 9f609c3fd3..2e04623f1c 100644
--- a/composer/listener.c
+++ b/composer/listener.c
@@ -184,7 +184,7 @@ impl_event (PortableServer_Servant _servant,
gchar *url;
if ((url = resolve_image_url (l, BONOBO_ARG_GET_STRING (arg)))) {
- rv = bonobo_arg_new (TC_string);
+ rv = bonobo_arg_new (BONOBO_ARG_STRING);
BONOBO_ARG_SET_STRING (rv, url);
/* printf ("new url: %s\n", url); */
g_free (url);
@@ -233,98 +233,29 @@ impl_event (PortableServer_Servant _servant,
bonobo_stream_client_write (e->stream, ba->data, ba->len, ev);
- camel_object_unref (CAMEL_OBJECT (cstream));
+ camel_object_unref (cstream);
}
return rv ? rv : get_any_null ();
}
-POA_GNOME_GtkHTML_Editor_Listener__epv *
-listener_get_epv (void)
+static void
+listener_class_init (EditorListenerClass *klass)
{
POA_GNOME_GtkHTML_Editor_Listener__epv *epv;
- epv = g_new0 (POA_GNOME_GtkHTML_Editor_Listener__epv, 1);
+ listener_parent_class = g_type_class_ref(bonobo_object_get_type ());
+ epv = &klass->epv;
epv->event = impl_event;
-
- return epv;
}
static void
-init_listener_corba_class (void)
+listener_init(EditorListener *object)
{
- listener_vepv.Bonobo_Unknown_epv = bonobo_object_get_epv ();
- listener_vepv.GNOME_GtkHTML_Editor_Listener_epv = listener_get_epv ();
-}
-
-static void
-listener_class_init (EditorListenerClass *klass)
-{
- listener_parent_class = gtk_type_class (bonobo_object_get_type ());
-
- init_listener_corba_class ();
}
-GtkType
-listener_get_type (void)
-{
- static GtkType type = 0;
-
- if (!type){
- GtkTypeInfo info = {
- "EditorListener",
- sizeof (EditorListener),
- sizeof (EditorListenerClass),
- (GtkClassInitFunc) listener_class_init,
- (GtkObjectInitFunc) NULL,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
- };
-
- type = gtk_type_unique (bonobo_object_get_type (), &info);
- }
-
- return type;
-}
-
-EditorListener *
-listener_construct (EditorListener *listener, GNOME_GtkHTML_Editor_Listener corba_listener)
-{
- g_return_val_if_fail (listener != NULL, NULL);
- g_return_val_if_fail (IS_EDITOR_LISTENER (listener), NULL);
- g_return_val_if_fail (corba_listener != CORBA_OBJECT_NIL, NULL);
-
- if (!bonobo_object_construct (BONOBO_OBJECT (listener), (CORBA_Object) corba_listener))
- return NULL;
-
- return listener;
-}
-
-static GNOME_GtkHTML_Editor_Listener
-create_listener (BonoboObject *listener)
-{
- POA_GNOME_GtkHTML_Editor_Listener *servant;
- CORBA_Environment ev;
-
- servant = (POA_GNOME_GtkHTML_Editor_Listener *) g_new0 (BonoboObjectServant, 1);
- servant->vepv = &listener_vepv;
-
- CORBA_exception_init (&ev);
- POA_GNOME_GtkHTML_Editor_Listener__init ((PortableServer_Servant) servant, &ev);
- ORBIT_OBJECT_KEY(servant->_private)->object = NULL;
-
- if (ev._major != CORBA_NO_EXCEPTION){
- g_free (servant);
- CORBA_exception_free (&ev);
- return CORBA_OBJECT_NIL;
- }
-
- CORBA_exception_free (&ev);
-
- return (GNOME_GtkHTML_Editor_Listener) bonobo_object_activate_servant (listener, servant);
-}
+BONOBO_TYPE_FUNC_FULL(EditorListener, GNOME_GtkHTML_Editor_Listener, BONOBO_TYPE_OBJECT, listener);
EditorListener *
listener_new (EMsgComposer *composer)
@@ -332,15 +263,8 @@ listener_new (EMsgComposer *composer)
EditorListener *listener;
GNOME_GtkHTML_Editor_Listener corba_listener;
- listener = gtk_type_new (EDITOR_LISTENER_TYPE);
+ listener = g_object_new (EDITOR_LISTENER_TYPE, NULL);
listener->composer = composer;
-
- corba_listener = create_listener (BONOBO_OBJECT (listener));
-
- if (corba_listener == CORBA_OBJECT_NIL) {
- bonobo_object_unref (BONOBO_OBJECT (listener));
- return NULL;
- }
- return listener_construct (listener, corba_listener);
+ return listener;
}