diff options
author | Ushveen Kaur <kushveen@novell.com> | 2006-10-16 21:25:56 +0800 |
---|---|---|
committer | Harish Krishnaswamy <kharish@src.gnome.org> | 2006-10-16 21:25:56 +0800 |
commit | 577f912998fab89ed46e3c65646b3362bf0c5210 (patch) | |
tree | 5b3fefdfa83864e0eb9f838120402a3a57073375 /addressbook | |
parent | 9d380670b832884d236d9f3e47ec363b16355c9f (diff) | |
download | gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar.gz gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar.bz2 gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar.lz gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar.xz gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.tar.zst gsoc2013-evolution-577f912998fab89ed46e3c65646b3362bf0c5210.zip |
** Fixes bug#332908
2006-10-16 Ushveen Kaur <kushveen@novell.com>
** Fixes bug#332908
* addressbook.error.xml :
* gui/contact-editor/e-contact-editor.c : Prompt-resize dialog
options changed. Three options given now, "Resize", "Use as it is"
and "Do not save".
svn path=/trunk/; revision=32889
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 8 | ||||
-rw-r--r-- | addressbook/addressbook.error.xml | 5 | ||||
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor.c | 16 |
3 files changed, 20 insertions, 9 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 7a39fce3b2..785b463578 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,11 @@ +2006-10-16 Ushveen Kaur <kushveen@novell.com> + + ** Fixes bug#332908 + * addressbook.error.xml : + * gui/contact-editor/e-contact-editor.c : Prompt-resize dialog + options changed. Three options given now, "Resize", "Use as it is" + and "Do not save". + 2006-10-01 Kjartan Maraas <kmaraas@gnome.org> * gui/component/addressbook-component.c: Remove duplicate include. diff --git a/addressbook/addressbook.error.xml b/addressbook/addressbook.error.xml index 897c05d009..fd357cf2b3 100644 --- a/addressbook/addressbook.error.xml +++ b/addressbook/addressbook.error.xml @@ -80,8 +80,9 @@ <error type="question" id="prompt-resize" default="GTK_RESPONSE_YES"> <_primary>The image you have selected is large. Do you want to resize and store it?</_primary> - <button stock="gtk-no" response="GTK_RESPONSE_NO"/> - <button stock="gtk-yes" response="GTK_RESPONSE_YES"/> + <button _label="_Resize" response="GTK_RESPONSE_YES"/> + <button _label="_Use as it is" response="GTK_RESPONSE_NO"/> + <button _label="_Do not save" response="GTK_RESPONSE_CANCEL"/> </error> <error id="save-error" type="error"> diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index efd9b72503..367ae376ce 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2274,15 +2274,14 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (pixbuf) { - int width, height; - + int width, height, prompt_response; + g_object_ref (pixbuf); height = gdk_pixbuf_get_height (pixbuf); width = gdk_pixbuf_get_width (pixbuf); - - if ((height > 96 || width > 96) && e_error_run (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL) == GTK_RESPONSE_YES) { - + prompt_response = e_error_run (GTK_WINDOW (editor->app), "addressbook:prompt-resize", NULL); + if ((height > 96 || width > 96) && prompt_response == GTK_RESPONSE_YES){ if ( width > height) { height = height * 96 / width; width = 96; @@ -2297,9 +2296,12 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gdk_pixbuf_save_to_buffer (new, (gchar **)&photo.data.inlined.data, &photo.data.inlined.length, "jpeg", NULL, "quality", "100", NULL); g_object_unref (new); } - } - + else if (prompt_response == GTK_RESPONSE_CANCEL) { + g_object_unref (pixbuf); + g_object_unref (loader); + return; + } g_object_unref (pixbuf); } editor->image_changed = FALSE; |