diff options
author | Not Zed <NotZed@Ximian.com> | 2002-11-19 12:58:22 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2002-11-19 12:58:22 +0800 |
commit | 6cd18c10d9cba6b73c2b962f00e922bea21b9b37 (patch) | |
tree | f3bce332ed38278868242349ec3acbb9faedd07c /composer/e-msg-composer.c | |
parent | de63e5c5e35d0a52dcdfa160ac22b9217608c42a (diff) | |
download | gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.gz gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.zst gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.zip |
dont unref after destroy. duh.
2002-11-19 Not Zed <NotZed@Ximian.com>
* e-msg-composer-attachment-bar.c (add_from_file): dont unref
after destroy. duh.
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_to): Add type
code to set_property call.
(e_msg_composer_hdrs_set_cc): "
(e_msg_composer_hdrs_set_bcc): "
(e_msg_composer_hdrs_get_to): Do the same for get_property calls.
(init): ref/sink the tooltip object.
(e_msg_composer_hdrs_get_type): fix return type.
* e-msg-composer.c (GNOME_GTKHTML_EDITOR_CONTROL_ID): we want
version 3.0 not 1.1.
(create_composer): Add type code to set property call.
(autosave_manager_query_load_orphans): my bad, we dont unref
dialog's once we've destroyed 'em.
(build_message): "
(get_file_content): "
(save): "
(do_exit): "
(composer_dispose): moved the autosave shutdown here.
svn path=/trunk/; revision=18836
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 17dd1fb466..ee8887a140 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -100,7 +100,7 @@ #include "Editor.h" #include "listener.h" -#define GNOME_GTKHTML_EDITOR_CONTROL_ID "OAFIID:GNOME_GtkHTML_Editor:1.1" +#define GNOME_GTKHTML_EDITOR_CONTROL_ID "OAFIID:GNOME_GtkHTML_Editor:3.0" #define d(x) x @@ -755,7 +755,6 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) "%s", camel_exception_get_description (&ex)); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); - g_object_unref(dialog); camel_exception_clear (&ex); } @@ -787,7 +786,6 @@ get_file_content (EMsgComposer *composer, const char *file_name, gboolean want_h file_name, g_strerror (errno)); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); - g_object_unref(dialog); } return g_strdup (""); } @@ -1166,7 +1164,6 @@ save (EMsgComposer *composer, const char *file_name) _("File exists, overwrite?")); resp = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); - g_object_unref(dialog); if (resp != GTK_RESPONSE_YES) { g_free(my_file_name); return; @@ -1380,7 +1377,6 @@ autosave_manager_query_load_orphans (AutosaveManager *am, EMsgComposer *composer "Would you like to try to recover them?")); load = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_YES; gtk_widget_destroy(dialog); - g_object_unref(dialog); } while (match != NULL) { @@ -1546,7 +1542,6 @@ do_exit (EMsgComposer *composer) gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES); button = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); - g_object_unref(dialog); switch(button) { case GTK_RESPONSE_YES: @@ -2309,7 +2304,7 @@ from_changed_cb (EMsgComposerHdrs *hdrs, void *data) } -/* GtkObject methods. */ +/* GObject methods. */ static void composer_finalise (GObject *object) @@ -2340,17 +2335,22 @@ composer_finalise (GObject *object) g_free (composer->mime_body); if (composer->redirect) - camel_object_unref (CAMEL_OBJECT (composer->redirect)); - + camel_object_unref (composer->redirect); +} + +static void +composer_dispose(GObject *object) +{ /* When destroy() is called, the contents of the window * (including the remote editor control) will already have * been destroyed, so we have to do this here. */ autosave_manager_unregister (am, E_MSG_COMPOSER (object)); - if (G_OBJECT_CLASS (parent_class)->finalize != NULL) - (* G_OBJECT_CLASS (parent_class)->finalize) (object); + if (G_OBJECT_CLASS (parent_class)->dispose != NULL) + (* G_OBJECT_CLASS (parent_class)->dispose) (object); } +/* GtkObject methods */ static void destroy (GtkObject *object) { @@ -2542,6 +2542,7 @@ class_init (EMsgComposerClass *klass) widget_class = GTK_WIDGET_CLASS (klass); gobject_class->finalize = composer_finalise; + gobject_class->dispose = composer_dispose; object_class->destroy = destroy; widget_class->delete_event = delete_event; @@ -2843,7 +2844,7 @@ create_composer (int visible_mask) /* let the editor know which mode we are in */ bonobo_widget_set_property (BONOBO_WIDGET (composer->editor), - "FormatHTML", composer->send_html, + "FormatHTML", TC_CORBA_boolean, composer->send_html, NULL); editor_server = bonobo_widget_get_objref (BONOBO_WIDGET (composer->editor)); @@ -4190,8 +4191,9 @@ e_msg_composer_set_send_html (EMsgComposer *composer, "state", composer->send_html ? "1" : "0", NULL); /* let the editor know which mode we are in */ - bonobo_widget_set_property (BONOBO_WIDGET (composer->editor), "FormatHTML", - composer->send_html, NULL); + bonobo_widget_set_property (BONOBO_WIDGET (composer->editor), + "FormatHTML", TC_CORBA_boolean, composer->send_html, + NULL); set_config (composer, "FormatHTML", composer->send_html); GNOME_GtkHTML_Editor_Engine_runCommand (composer->editor_engine, "unblock-redraw", &ev); |