Put up an error dialog if there's an error while saving. If the person
2001-10-22 Christopher James Lahey <clahey@ximian.com> * gui/contact-editor/e-contact-save-as.c (save_it): Put up an error dialog if there's an error while saving. If the person hits cancel on the "file exists" dialog, don't close the file selection dialog. Fixes Ximian bug #7055. svn path=/trunk/; revision=13865
This commit is contained in:

committed by
Chris Lahey

parent
f22daae8e6
commit
5e0bf55717
@ -1,9 +1,19 @@
|
|||||||
|
2001-10-22 Christopher James Lahey <clahey@ximian.com>
|
||||||
|
|
||||||
|
* gui/contact-editor/e-contact-save-as.c (save_it): Put up an
|
||||||
|
error dialog if there's an error while saving. If the person hits
|
||||||
|
cancel on the "file exists" dialog, don't close the file selection
|
||||||
|
dialog. Fixes Ximian bug #7055.
|
||||||
|
|
||||||
2001-10-21 Christopher James Lahey <clahey@ximian.com>
|
2001-10-21 Christopher James Lahey <clahey@ximian.com>
|
||||||
|
|
||||||
* gui/widgets/e-addressbook-reflow-adapter.c
|
* gui/widgets/e-addressbook-reflow-adapter.c
|
||||||
(model_and_selection_free): right_click_up here when we let go of
|
(model_and_selection_free): right_click_up here when we let go of
|
||||||
the popup.
|
the popup.
|
||||||
|
|
||||||
|
* gui/widgets/e-minicard-view.c (e_minicard_view_selection_event):
|
||||||
|
right_click_up here.
|
||||||
|
|
||||||
2001-10-21 Christopher James Lahey <clahey@ximian.com>
|
2001-10-21 Christopher James Lahey <clahey@ximian.com>
|
||||||
|
|
||||||
* gui/component/select-names/e-select-names.c
|
* gui/component/select-names/e-select-names.c
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include <libgnome/gnome-i18n.h>
|
#include <libgnome/gnome-i18n.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <libgnomeui/gnome-messagebox.h>
|
||||||
|
#include <libgnomeui/gnome-stock.h>
|
||||||
|
|
||||||
static int file_exists(GtkFileSelection *filesel, const char *filename);
|
static int file_exists(GtkFileSelection *filesel, const char *filename);
|
||||||
|
|
||||||
@ -58,8 +60,21 @@ save_it(GtkWidget *widget, SaveAsInfo *info)
|
|||||||
e_write_file(filename, info->vcard, O_WRONLY | O_CREAT | O_TRUNC);
|
e_write_file(filename, info->vcard, O_WRONLY | O_CREAT | O_TRUNC);
|
||||||
break;
|
break;
|
||||||
case 1 : /* cancel */
|
case 1 : /* cancel */
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (error != 0) {
|
||||||
|
GtkWidget *dialog;
|
||||||
|
char *str;
|
||||||
|
|
||||||
|
str = g_strdup_printf ("Error saving %s: %s", filename, strerror(errno));
|
||||||
|
dialog = gnome_message_box_new (str, GNOME_MESSAGE_BOX_ERROR, GNOME_STOCK_BUTTON_OK, NULL);
|
||||||
|
g_free (str);
|
||||||
|
|
||||||
|
gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (info->filesel));
|
||||||
|
|
||||||
|
gtk_widget_show (dialog);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (info->vcard);
|
g_free (info->vcard);
|
||||||
|
Reference in New Issue
Block a user