From 0e39518ba7b473c1524e47a0b2618b503e116326 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 12 Aug 2002 21:00:58 +0000 Subject: Set the file-selection window icon. Fixes the mailer part of bug #7368. 2002-08-12 Jeffrey Stedfast * e-msg-composer-select-file.c (create_file_selection): Set the file-selection window icon. Fixes the mailer part of bug #7368. * e-msg-composer-attachment.c (e_msg_composer_attachment_new): Don't call new_from_mime_part() since that function now does some copying of the mime part rather than simply reffing it. (e_msg_composer_attachment_new_from_mime_part): Make a copy of the MIME part so that if the message that this part belongs to gets deleted from the the remote store, the composer will still have a copy of it. Fixes bug #20308. svn path=/trunk/; revision=17763 --- composer/e-msg-composer-select-file.c | 49 ++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'composer/e-msg-composer-select-file.c') diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index e46c4ad2be..46bbc28b3a 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -1,26 +1,27 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ -/* e-msg-composer-select-file.c +/* + * Authors: Ettore Perazzoli + * Jeffrey Stedfast * - * Copyright (C) 2000 Ximian, Inc. + * Copyright 2002 Ximian, Inc. (www.ximian.com) * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * published by the Free Software Foundation; either version 2 of the - * License as published by the Free Software Foundation. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. * - * Author: Ettore Perazzoli */ + #ifdef HAVE_CONFIG_H #include #endif @@ -31,6 +32,11 @@ #include #include #include + +#include +#include +#include + #include "e-msg-composer-select-file.h" @@ -48,7 +54,7 @@ confirm (FileSelectionInfo *info) int i; file_list = e_file_selection_get_filenames (E_FILE_SELECTION (info->widget)); - + if (!info->selected_files) info->selected_files = g_ptr_array_new (); @@ -130,15 +136,16 @@ create_file_selection (EMsgComposer *composer, gboolean multiple) info = g_new (FileSelectionInfo, 1); widget = e_file_selection_new (NULL); + gtk_window_set_wmclass (GTK_WINDOW (widget), "fileselection", + "Evolution:composer"); + gnome_window_icon_set_from_file (GTK_WINDOW (widget), EVOLUTION_DATADIR + "/images/evolution/compose-message.png"); + path = g_strdup_printf ("%s/", g_get_home_dir ()); gtk_file_selection_set_filename (GTK_FILE_SELECTION (widget), path); g_free (path); - gtk_window_set_wmclass (GTK_WINDOW (widget), "fileselection", - "Evolution:composer"); - gtk_object_set (GTK_OBJECT (widget), - "multiple", multiple, - NULL); + gtk_object_set (GTK_OBJECT (widget), "multiple", multiple, NULL); ok_button = GTK_FILE_SELECTION (widget)->ok_button; cancel_button = GTK_FILE_SELECTION (widget)->cancel_button; -- cgit v1.2.3