diff options
author | Chris Toshok <toshok@ximian.com> | 2004-02-18 15:30:06 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-02-18 15:30:06 +0800 |
commit | 88f39730dd7b2615ab78dbc53f7218a2a15787e0 (patch) | |
tree | 7715bb0ac99d7320566ce1bef958af26bfd22c53 /addressbook/gui/contact-list-editor | |
parent | 6e0ff07291e87dcd216aa2d39e33857ea5b45088 (diff) | |
download | gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar.gz gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar.bz2 gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar.lz gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar.xz gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.tar.zst gsoc2013-evolution-88f39730dd7b2615ab78dbc53f7218a2a15787e0.zip |
add image_set slot.
2004-02-17 Chris Toshok <toshok@ximian.com>
* gui/contact-list-editor/e-contact-list-editor.h (struct
_EContactListEditor): add image_set slot.
* gui/contact-list-editor/e-contact-list-editor.c
(list_image_changed_cb): set image_set = TRUE.
(e_contact_list_editor_init): init image_set = FALSE
(extract_info): only set the LOGO attribute if image_set = TRUE.
* gui/contact-editor/e-contact-editor.h (struct _EContactEditor):
add image_set slot.
* gui/contact-editor/e-contact-editor.c (extract_info): only set
the PHOTO attribute if image_set == TRUE.
(image_chooser_changed): new function, set image_set = TRUE and
call widget_changed.
(e_contact_editor_init): init image_set to FALSE.
(_address_arrow_pressed): quiet compiler.
svn path=/trunk/; revision=24771
Diffstat (limited to 'addressbook/gui/contact-list-editor')
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.c | 11 | ||||
-rw-r--r-- | addressbook/gui/contact-list-editor/e-contact-list-editor.h | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index c8df169c70..84b6a769ea 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -9,7 +9,7 @@ * * 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 +* 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 @@ -220,6 +220,7 @@ e_contact_list_editor_init (EContactListEditor *editor) editor->contact = NULL; editor->changed = FALSE; + editor->image_set = FALSE; editor->editable = TRUE; editor->in_async_call = FALSE; editor->is_new_list = FALSE; @@ -775,6 +776,7 @@ list_name_changed_cb (GtkWidget *w, EContactListEditor *editor) static void list_image_changed_cb (GtkWidget *w, EContactListEditor *editor) { + editor->image_set = TRUE; editor->changed = TRUE; command_state_changed (editor); } @@ -970,9 +972,10 @@ extract_info(EContactListEditor *editor) g_list_foreach (email_list, (GFunc) g_free, NULL); g_list_free (email_list); - if (e_image_chooser_get_image_data (E_IMAGE_CHOOSER (editor->list_image), - &image_data, - &image_data_len)) { + if (editor->image_set + && e_image_chooser_get_image_data (E_IMAGE_CHOOSER (editor->list_image), + &image_data, + &image_data_len)) { EContactPhoto photo; photo.data = image_data; diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.h b/addressbook/gui/contact-list-editor/e-contact-list-editor.h index f9293116b6..574f9a5b55 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.h +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.h @@ -68,6 +68,9 @@ struct _EContactListEditor /* Whether we are editing a new contact or an existing one */ guint is_new_list : 1; + /* Whether the image chooser widget has been changed. */ + guint image_set : 1; + /* Whether the contact has been changed since bringing up the contact editor */ guint changed : 1; |