From 9658f71e0e7d73761ad5ac7f029d62388cb2bab7 Mon Sep 17 00:00:00 2001 From: Harish Krishnaswamy Date: Sun, 22 Jan 2006 05:48:53 +0000 Subject: Fix twenty odd compiler warnings and style oddness. 2006-01-22 Harish Krishnaswamy * icsimporter.c (get_menu_type), (dialog_response_cb), (dialog_close_cb), (get_icalcomponent_from_file): Fix twenty odd compiler warnings and style oddness. svn path=/trunk/; revision=31262 --- plugins/import-ics-attachments/ChangeLog | 6 ++++++ plugins/import-ics-attachments/icsimporter.c | 31 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 15 deletions(-) (limited to 'plugins') diff --git a/plugins/import-ics-attachments/ChangeLog b/plugins/import-ics-attachments/ChangeLog index 96a551455e..35fbc52e90 100644 --- a/plugins/import-ics-attachments/ChangeLog +++ b/plugins/import-ics-attachments/ChangeLog @@ -1,3 +1,9 @@ +2006-01-22 Harish Krishnaswamy + + * icsimporter.c (get_menu_type), (dialog_response_cb), + (dialog_close_cb), (get_icalcomponent_from_file): + Fix twenty odd compiler warnings and style oddness. + 2006-01-17 Harish Krishnaswamy * import-ics-attachments : Initial commits. Plugin written and submitted by diff --git a/plugins/import-ics-attachments/icsimporter.c b/plugins/import-ics-attachments/icsimporter.c index 9556b7c3f0..577a5af7ca 100644 --- a/plugins/import-ics-attachments/icsimporter.c +++ b/plugins/import-ics-attachments/icsimporter.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "e-attachment-bar.h" #include #include "e-util/e-error.h" @@ -45,6 +46,7 @@ #include #include #include +#include typedef struct { ECal *client; @@ -78,12 +80,12 @@ popup_free (EPopup *ep, GSList *items, void *data) static EPopupItem popup_calendar_items[] = { { E_POPUP_BAR, "25.display.00"}, - { E_POPUP_ITEM, "25.display.01", N_("_Import to Calendar"), import_ics, NULL, "stock_mail-import"} + { E_POPUP_ITEM, "25.display.01", N_("_Import to Calendar"), (EPopupActivateFunc)import_ics, NULL, "stock_mail-import"} }; static EPopupItem popup_tasks_items[] = { { E_POPUP_BAR, "25.display.00"}, - { E_POPUP_ITEM, "25.display.01", N_("_Import to Tasks"), import_ics, NULL, "stock_mail-import"} + { E_POPUP_ITEM, "25.display.01", N_("_Import to Tasks"), (EPopupActivateFunc)import_ics, NULL, "stock_mail-import"} }; @@ -138,7 +140,6 @@ get_menu_type (void *data) { CamelMimePart *part; char *path; - gint i=0; icalcomponent *icalcomp, *subcomp; icalcomponent_kind kind; EPopupTarget *target = (EPopupTarget *) data; @@ -160,7 +161,7 @@ get_menu_type (void *data) } else if ( kind == ICAL_VEVENT_COMPONENT) { return ICAL_VEVENT_COMPONENT; } - printf ("completed add_menu_type\n"); + return ICAL_NO_COMPONENT; } static void @@ -273,21 +274,21 @@ static void dialog_response_cb (GtkDialog *dialog, gint response_id, ICalImporterData *icidata) { switch (response_id) { - case GTK_RESPONSE_OK : - import_items(icidata); - break; - - case GTK_RESPONSE_CANCEL : - case GTK_RESPONSE_DELETE_EVENT : - gtk_signal_emit_by_name (dialog, "close"); - break; + case GTK_RESPONSE_OK : + import_items(icidata); + break; + + case GTK_RESPONSE_CANCEL : + case GTK_RESPONSE_DELETE_EVENT : + gtk_signal_emit_by_name ((GtkObject *)dialog, "close"); + break; } } static void dialog_close_cb (GtkDialog *dialog, ICalImporterData *icidata) { - gtk_widget_destroy (dialog); + gtk_widget_destroy ((GtkWidget *)dialog); } /* This removes all components except VEVENTs and VTIMEZONEs from the toplevel */ @@ -423,11 +424,11 @@ get_icalcomponent_from_file(char *filename) char *contents; icalcomponent *icalcomp; - g_return_if_fail (filename != NULL); + g_return_val_if_fail (filename != NULL, NULL); if (!g_file_get_contents (filename, &contents, NULL, NULL)) { g_free (filename); - return; + return NULL; } g_free (filename); -- cgit