aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c19
2 files changed, 14 insertions, 11 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2b44ab0f2e..37aa3dc2de 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,8 +1,8 @@
2002-06-03 Jeffrey Stedfast <fejj@ximian.com>
- * e-msg-composer.c (e_msg_composer_guess_mime_type): Use
- gnome_vfs_file_info_clear() instead of gnome_vfs_file_info_unref()
- so that we don't try and free static data.
+ * e-msg-composer.c (e_msg_composer_guess_mime_type): Allocate a
+ new FileInfo struct here rather than using and unref it when we're
+ finished with it.
2002-05-30 Not Zed <NotZed@Ximian.com>
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 6966bee83c..4524efe7f2 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1350,7 +1350,7 @@ do_exit (EMsgComposer *composer)
gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer));
gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
+
switch (button) {
case 0: /* Save */
gtk_signal_emit (GTK_OBJECT (composer), signals[SAVE_DRAFT], TRUE);
@@ -4214,20 +4214,23 @@ e_msg_composer_get_view_replyto (EMsgComposer *composer)
gchar *
e_msg_composer_guess_mime_type (const gchar *file_name)
{
- GnomeVFSFileInfo info;
+ GnomeVFSFileInfo *info;
GnomeVFSResult result;
-
- result = gnome_vfs_get_file_info (file_name, &info,
+
+ info = gnome_vfs_file_info_new ();
+ result = gnome_vfs_get_file_info (file_name, info,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
if (result == GNOME_VFS_OK) {
gchar *type;
-
- type = g_strdup (gnome_vfs_file_info_get_mime_type (&info));
- gnome_vfs_file_info_clear (&info);
+
+ type = g_strdup (gnome_vfs_file_info_get_mime_type (info));
+ gnome_vfs_file_info_unref (info);
return type;
- } else
+ } else {
+ gnome_vfs_file_info_unref (info);
return NULL;
+ }
}
/**