aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-11-19 12:58:22 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-11-19 12:58:22 +0800
commit6cd18c10d9cba6b73c2b962f00e922bea21b9b37 (patch)
treef3bce332ed38278868242349ec3acbb9faedd07c
parentde63e5c5e35d0a52dcdfa160ac22b9217608c42a (diff)
downloadgsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar
gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.gz
gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.bz2
gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.lz
gsoc2013-evolution-6cd18c10d9cba6b73c2b962f00e922bea21b9b37.tar.xz
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
-rw-r--r--composer/ChangeLog24
-rw-r--r--composer/e-icon-list.c3
-rw-r--r--composer/e-msg-composer-attachment-bar.c1
-rw-r--r--composer/e-msg-composer-hdrs.c19
-rw-r--r--composer/e-msg-composer.c30
5 files changed, 53 insertions, 24 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index a05743485f..53ad7cf34b 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,27 @@
+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.
+
2002-11-18 Not Zed <NotZed@Ximian.com>
* e-msg-composer.c (create_composer): Remove check for
diff --git a/composer/e-icon-list.c b/composer/e-icon-list.c
index 0712b1bb18..561cd3f81f 100644
--- a/composer/e-icon-list.c
+++ b/composer/e-icon-list.c
@@ -1981,8 +1981,11 @@ eil_init (Eil *eil)
eil->_priv->selection_mode = GTK_SELECTION_SINGLE;
eil->_priv->dirty = TRUE;
+#if 0
+ /* FIXME: This needs to be moved into a constructor because of gtklayout changes? */
gnome_canvas_set_scroll_region (GNOME_CANVAS (eil), 0.0, 0.0, 1000000.0, 1000000.0);
gnome_canvas_scroll_to (GNOME_CANVAS (eil), 0, 0);
+#endif
}
/**
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 870b2f2248..7f51203b15 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -180,7 +180,6 @@ add_from_file (EMsgComposerAttachmentBar *bar,
"%s", camel_exception_get_description (&ex));
gtk_dialog_run(GTK_DIALOG(dialog));
gtk_widget_destroy(dialog);
- g_object_unref(dialog);
camel_exception_clear (&ex);
}
}
diff --git a/composer/e-msg-composer-hdrs.c b/composer/e-msg-composer-hdrs.c
index 13cc49cf59..6dc091f913 100644
--- a/composer/e-msg-composer-hdrs.c
+++ b/composer/e-msg-composer-hdrs.c
@@ -33,7 +33,6 @@
#include <gtk/gtkoptionmenu.h>
#include <gtk/gtktooltips.h>
#include <libgnomeui/gnome-uidefs.h>
-/*#include <liboaf/liboaf.h>*/
#include "Composer.h"
@@ -665,12 +664,14 @@ init (EMsgComposerHdrs *hdrs)
priv = g_new0 (EMsgComposerHdrsPrivate, 1);
priv->tooltips = gtk_tooltips_new ();
-
+ g_object_ref(priv->tooltips);
+ gtk_object_sink((GtkObject *)priv->tooltips);
+
hdrs->priv = priv;
}
-GtkType
+GType
e_msg_composer_hdrs_get_type (void)
{
static GType type = 0;
@@ -938,7 +939,7 @@ e_msg_composer_hdrs_set_to (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
str = e_destination_exportv (to_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", str, NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", TC_CORBA_string, str, NULL);
g_free (str);
}
@@ -951,7 +952,7 @@ e_msg_composer_hdrs_set_cc (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
str = e_destination_exportv (cc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", str, NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", TC_CORBA_string, str, NULL);
if (str && *str)
set_pair_visibility (hdrs, &hdrs->priv->cc, TRUE);
g_free (str);
@@ -966,7 +967,7 @@ e_msg_composer_hdrs_set_bcc (EMsgComposerHdrs *hdrs,
g_return_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs));
str = e_destination_exportv (bcc_destv);
- bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", str, NULL);
+ bonobo_widget_set_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", TC_CORBA_string, str, NULL);
if (str && *str)
set_pair_visibility (hdrs, &hdrs->priv->bcc, TRUE);
g_free (str);
@@ -1045,7 +1046,7 @@ e_msg_composer_hdrs_get_to (EMsgComposerHdrs *hdrs)
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", &str, NULL);
+ bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->to.entry), "destinations", TC_CORBA_string, &str, NULL);
if (str != NULL) {
destv = e_destination_importv (str);
@@ -1063,7 +1064,7 @@ e_msg_composer_hdrs_get_cc (EMsgComposerHdrs *hdrs)
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", &str, NULL);
+ bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->cc.entry), "destinations", TC_CORBA_string, &str, NULL);
if (str != NULL) {
destv = e_destination_importv (str);
@@ -1081,7 +1082,7 @@ e_msg_composer_hdrs_get_bcc (EMsgComposerHdrs *hdrs)
g_return_val_if_fail (E_IS_MSG_COMPOSER_HDRS (hdrs), NULL);
- bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", &str, NULL);
+ bonobo_widget_get_property (BONOBO_WIDGET (hdrs->priv->bcc.entry), "destinations", TC_CORBA_string, &str, NULL);
if (str != NULL) {
destv = e_destination_importv (str);
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);