aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/save-calendar/save-calendar.c
diff options
context:
space:
mode:
authorChenthill Palanisamy <pchen@src.gnome.org>2005-11-11 17:08:25 +0800
committerChenthill Palanisamy <pchen@src.gnome.org>2005-11-11 17:08:25 +0800
commit77af664dad6dd3fc30a99c74636404be4531b8ef (patch)
treee3a4f557866a16028c8805878daba73140062c98 /plugins/save-calendar/save-calendar.c
parent29093629727c5d91023b40580475cb0daa0c2730 (diff)
downloadgsoc2013-evolution-77af664dad6dd3fc30a99c74636404be4531b8ef.tar.gz
gsoc2013-evolution-77af664dad6dd3fc30a99c74636404be4531b8ef.tar.zst
gsoc2013-evolution-77af664dad6dd3fc30a99c74636404be4531b8ef.zip
Fixes #306673
svn path=/trunk/; revision=30596
Diffstat (limited to 'plugins/save-calendar/save-calendar.c')
-rw-r--r--plugins/save-calendar/save-calendar.c50
1 files changed, 13 insertions, 37 deletions
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index b2b6d88b4c..2abdd54951 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -116,7 +116,6 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
GtkTreeIter iter;
GtkWidget *dialog = NULL;
char *dest_uri = NULL;
- gboolean proceed = FALSE;
GList *format_handlers = NULL;
@@ -202,48 +201,25 @@ ask_destination_and_save (EPlugin *ep, ECalPopupTargetSource *target, ECalSource
tmp = strstr (dest_uri, handler->filename_ext);
- if (tmp && *(tmp + strlen (handler->filename_ext)) == '\0') {
-
- proceed = TRUE;
-
- } else {
-
- GtkWidget *warning =
- gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_YES_NO,
- _("The suggested filename extension of this filetype (%s)"
- " is unused in the chosen filename. Do you want to "
- "continue?"), handler->filename_ext);
-
- if (gtk_dialog_run (GTK_DIALOG (warning)) == GTK_RESPONSE_YES)
- proceed = TRUE;
-
- gtk_widget_destroy (warning);
+ if (!(tmp && *(tmp + strlen (handler->filename_ext)) == '\0')) {
+ char *temp;
+ temp = g_strconcat (dest_uri, handler->filename_ext, NULL);
+ g_free (dest_uri);
+ dest_uri = temp;
}
- if (proceed) {
- handler->save (handler, ep, target, type, dest_uri);
- /* Free the handlers */
- g_list_foreach (format_handlers, format_handlers_foreach_free, NULL);
- g_list_free (format_handlers);
+ handler->save (handler, ep, target, type, dest_uri);
+ }
- /* Now we can destroy it */
- gtk_widget_destroy (dialog);
- g_free (dest_uri);
- }
+ /* Free the handlers */
+ g_list_foreach (format_handlers, format_handlers_foreach_free, NULL);
+ g_list_free (format_handlers);
- } else {
- /* Free the handlers */
- g_list_foreach (format_handlers, format_handlers_foreach_free, NULL);
- g_list_free (format_handlers);
+ /* Now we can destroy it */
+ gtk_widget_destroy (dialog);
+ g_free (dest_uri);
- /* Now we can destroy it */
- gtk_widget_destroy (dialog);
- g_free (dest_uri);
- }
}
void