From 8696d98d2f8aad98e3f38d4eb1a0106d0a2f7355 Mon Sep 17 00:00:00 2001 From: Balamurali Viswanathan Date: Mon, 2 Jun 2003 12:54:18 +0000 Subject: [PATCH] Give an error dialog if the users clicks on OK button when the MIME type 2003-06-02 Balamurali Viswanathan * mime-edit-dialog.c: (validate_data): Give an error dialog if the users clicks on OK button when the MIME type is not entered Fixes bug #113963 --- capplets/file-types/ChangeLog | 6 ++++++ capplets/file-types/mime-edit-dialog.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog index 4584dedb5..99199c413 100644 --- a/capplets/file-types/ChangeLog +++ b/capplets/file-types/ChangeLog @@ -1,3 +1,9 @@ +2003-06-02 Balamurali Viswanathan + + * mime-edit-dialog.c: (validate_data): Give an error dialog if the + users clicks on OK button when the MIME type is not entered + Fixes bug #113963 + 2003-05-07 Jody Goldberg * Release 2.3.1 diff --git a/capplets/file-types/mime-edit-dialog.c b/capplets/file-types/mime-edit-dialog.c index c3c89cce4..65bcbbe97 100644 --- a/capplets/file-types/mime-edit-dialog.c +++ b/capplets/file-types/mime-edit-dialog.c @@ -861,6 +861,13 @@ validate_data (MimeEditDialog *dialog) GTK_BUTTONS_OK_CANCEL, _("A MIME type with that name already exists, overwrite ?.")); } + } else { + err_dialog = gtk_message_dialog_new ( + GTK_WINDOW (dialog->p->dialog_win), + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, + GTK_BUTTONS_CANCEL, + _("Please enter a valid MIME type. It should be of the form " + "class/type and may not contain any spaces.")); } if (err_dialog) {