aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:10:05 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 10:10:05 +0800
commita01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e (patch)
tree51415e9b150ae8e8de2db5a3d7c529f90829bd90 /calendar/gui
parent677df14504c5ad80efbb417c6ceea8d8494e583d (diff)
downloadgsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar.gz
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar.bz2
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar.lz
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar.xz
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.tar.zst
gsoc2013-evolution-a01dfc76dc4fe9374f25d7fde53a78c4cf7efd0e.zip
Fix compiler warnings in the calendar directory (#439122).
svn path=/trunk/; revision=33625
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar-component.c2
-rw-r--r--calendar/gui/dialogs/alarm-list-dialog.c2
-rw-r--r--calendar/gui/dialogs/cal-prefs-dialog.c4
-rw-r--r--calendar/gui/dialogs/calendar-setup.c2
-rw-r--r--calendar/gui/dialogs/comp-editor.c16
-rw-r--r--calendar/gui/dialogs/event-page.c4
-rw-r--r--calendar/gui/dialogs/task-page.c4
-rw-r--r--calendar/gui/e-day-view.c2
-rw-r--r--calendar/gui/e-itip-control.c14
-rw-r--r--calendar/gui/e-meeting-time-sel.c2
-rw-r--r--calendar/gui/e-memos.c3
-rw-r--r--calendar/gui/e-tasks.c4
-rw-r--r--calendar/gui/e-week-view-event-item.c2
-rw-r--r--calendar/gui/gnome-cal.c6
-rw-r--r--calendar/gui/memos-component.c2
-rw-r--r--calendar/gui/print.c2
-rw-r--r--calendar/gui/tasks-component.c2
17 files changed, 40 insertions, 33 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 416a74a006..95d67c8efd 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -1081,7 +1081,7 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source))
goto finish;
- icalcomp = icalparser_parse_string (data->data);
+ icalcomp = icalparser_parse_string ((char *)data->data);
if (icalcomp) {
char * uid;
diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c
index 97f6c02fc3..803324b949 100644
--- a/calendar/gui/dialogs/alarm-list-dialog.c
+++ b/calendar/gui/dialogs/alarm-list-dialog.c
@@ -169,7 +169,7 @@ edit_clicked_cb (GtkButton *button, gpointer data)
return;
}
- alarm = e_alarm_list_get_alarm (dialog->list_store, &iter);
+ alarm = (ECalComponentAlarm *)e_alarm_list_get_alarm (dialog->list_store, &iter);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (dialog->list_store), &iter);
if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm)) {
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c
index 665f76d2c6..159a6b4578 100644
--- a/calendar/gui/dialogs/cal-prefs-dialog.c
+++ b/calendar/gui/dialogs/cal-prefs-dialog.c
@@ -326,7 +326,7 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
for (sources = e_source_group_peek_sources (group); sources; sources = sources->next) {
source = E_SOURCE (sources->data);
- alarm = e_source_get_property (source, "alarm");
+ alarm = (gchar *)e_source_get_property (source, "alarm");
if (alarm && !g_ascii_strcasecmp (alarm, "never"))
continue;
@@ -341,7 +341,7 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs)
for (l = selection; l; l = l->next) {
source = E_SOURCE (l->data);
- alarm = e_source_get_property (source, "alarm");
+ alarm = (gchar *)e_source_get_property (source, "alarm");
if (alarm && !g_ascii_strcasecmp (alarm, "never"))
continue;
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index ab546ca2a4..e186156163 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -83,7 +83,7 @@ eccp_commit (EConfig *ec, GSList *items, void *data)
if (sdialog->original_source) {
const gchar *color_spec;
- xml = xmlNewNode (NULL, "dummy");
+ xml = xmlNewNode (NULL, (const unsigned char *)"dummy");
e_source_dump_to_xml_node (sdialog->source, xml);
e_source_update_from_xml_node (sdialog->original_source, xml->children, NULL);
xmlFreeNode (xml);
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index fe27aa1e9d..c20791eb3f 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -257,7 +257,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
d(printf ("dropping a message/rfc822\n"));
/* write the message(s) out to a CamelStream so we can use it */
stream = camel_stream_mem_new ();
- camel_stream_write (stream, selection->data, selection->length);
+ camel_stream_write (stream, (char *)selection->data, selection->length);
camel_stream_reset (stream);
msg = camel_mime_message_new ();
@@ -273,7 +273,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
case DND_TYPE_TEXT_URI_LIST:
case DND_TYPE_NETSCAPE_URL:
d(printf ("dropping a text/uri-list\n"));
- tmp = g_strndup (selection->data, selection->length);
+ tmp = g_strndup ((char *)selection->data, selection->length);
urls = g_strsplit (tmp, "\n", 0);
g_free (tmp);
@@ -319,7 +319,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
d(printf ("dropping a %s\n", content_type));
mime_part = camel_mime_part_new ();
- camel_mime_part_set_content (mime_part, selection->data, selection->length, content_type);
+ camel_mime_part_set_content (mime_part, (char *)selection->data, selection->length, content_type);
camel_mime_part_set_disposition (mime_part, "inline");
e_attachment_bar_attach_mime_part
@@ -341,8 +341,8 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
uids = g_ptr_array_new();
- inptr = selection->data;
- inend = selection->data + selection->length;
+ inptr = (char *)selection->data;
+ inend = (char *)(selection->data + selection->length);
while (inptr < inend) {
char *start = inptr;
@@ -356,7 +356,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
}
if (uids->len > 0) {
- folder = mail_tool_uri_to_folder(selection->data, 0, &ex);
+ folder = mail_tool_uri_to_folder((char *)selection->data, 0, &ex);
if (folder) {
if (uids->len == 1) {
msg = camel_folder_get_message(folder, uids->pdata[0], &ex);
@@ -419,7 +419,7 @@ drop_action(CompEditor *editor, GdkDragContext *context, guint32 action, GtkSele
camel_object_unref(folder);
} else {
e_error_run((GtkWindow *)editor, "mail-editor:attach-nomessages",
- selection->data, camel_exception_get_description(&ex), NULL);
+ (char *)selection->data, camel_exception_get_description(&ex), NULL);
}
camel_exception_clear(&ex);
@@ -2771,7 +2771,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor)
camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) mstream);
buffer = g_memdup (mstream->buffer->data, mstream->buffer->len);
- cal_mime_attach->encoded_data = buffer;
+ cal_mime_attach->encoded_data = (char *)buffer;
cal_mime_attach->length = mstream->buffer->len;
cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename
((CamelMimePart *) l->data));
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 127c741210..5ce9c90cb5 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1783,13 +1783,15 @@ remove_clicked_cb (GtkButton *btn, EventPage *epage)
GList *paths = NULL, *tmp;
GtkTreeIter iter;
GtkTreePath *path = NULL;
+ GtkTreeModel *model = NULL;
gboolean valid_iter;
char *address;
priv = epage->priv;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
- if (!(paths = gtk_tree_selection_get_selected_rows (selection, (GtkTreeModel **) &(priv->model)))) {
+ model = GTK_TREE_MODEL (priv->model);
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model ))) {
g_warning ("Could not get a selection to delete.");
return;
}
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 1a7352aab5..43a9b793eb 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1081,13 +1081,15 @@ remove_clicked_cb (GtkButton *btn, TaskPage *page)
GList *paths = NULL, *tmp;
GtkTreeIter iter;
GtkTreePath *path = NULL;
+ GtkTreeModel *model = NULL;
gboolean valid_iter;
char *address;
priv = page->priv;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->list_view));
- if (!(paths = gtk_tree_selection_get_selected_rows (selection, (GtkTreeModel **) &(priv->model)))) {
+ model = GTK_TREE_MODEL (priv->model);
+ if (!(paths = gtk_tree_selection_get_selected_rows (selection, &model))) {
g_warning ("Could not get a selection to delete.");
return;
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index c61ae63bca..0768d02106 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -8816,7 +8816,7 @@ e_day_view_on_drag_data_get (GtkWidget *widget,
comp_str = icalcomponent_as_ical_string (vcal);
if (comp_str) {
gtk_selection_data_set (selection_data, selection_data->target,
- 8, comp_str, strlen (comp_str));
+ 8, (unsigned char *)comp_str, strlen (comp_str));
}
icalcomponent_free (vcal);
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index 66d2a445f1..7fac683035 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -2153,7 +2153,7 @@ url_requested_cb (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, gpoint
}
while ((len = read (fd, buffer, 4096)) > 0) {
- gtk_html_write (html, handle, buffer, len);
+ gtk_html_write (html, handle, (char *)buffer, len);
}
if (len < 0) {
@@ -2195,17 +2195,20 @@ static void
insert_boxes (GtkHTMLEmbedded *eb, EItipControl *itip)
{
EItipControlPrivate *priv;
+ gpointer wbox;
priv = itip->priv;
+ wbox = priv->vbox;
priv->vbox = gtk_vbox_new (FALSE, 12);
- g_object_add_weak_pointer (G_OBJECT (priv->vbox), ((gpointer *)&priv->vbox));
+ g_object_add_weak_pointer (G_OBJECT (priv->vbox), &wbox);
gtk_container_add (GTK_CONTAINER (eb), priv->vbox);
gtk_widget_show (priv->vbox);
priv->hbox = gtk_hbox_new (FALSE, 6);
- g_object_add_weak_pointer (G_OBJECT (priv->hbox), ((gpointer *)&priv->hbox));
+ wbox = priv->hbox;
+ g_object_add_weak_pointer (G_OBJECT (priv->hbox), &wbox);
gtk_box_pack_start (GTK_BOX (priv->vbox), priv->hbox, FALSE, TRUE, 0);
gtk_widget_show (priv->hbox);
@@ -2260,11 +2263,12 @@ static void
insert_ok (GtkWidget *hbox, EItipControl *itip)
{
EItipControlPrivate *priv;
-
+ gpointer wbutton;
priv = itip->priv;
priv->ok = gtk_button_new_from_stock (GTK_STOCK_OK);
- g_object_add_weak_pointer (G_OBJECT (priv->ok), ((gpointer *)&priv->ok));
+ wbutton = priv->ok;
+ g_object_add_weak_pointer (G_OBJECT (priv->ok), &wbutton);
g_signal_connect (priv->ok, "clicked", G_CALLBACK (ok_clicked_cb), itip);
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 4a8406b562..d3942b450d 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -427,7 +427,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em
mts->add_attendees_button =
gtk_button_new_with_mnemonic (_("A_ttendees..."));
gtk_button_set_image (
- mts->add_attendees_button,
+ GTK_BUTTON (mts->add_attendees_button),
gtk_image_new_from_stock (
GTK_STOCK_JUMP_TO, GTK_ICON_SIZE_BUTTON));
gtk_box_pack_start (GTK_BOX (hbox), mts->add_attendees_button, TRUE, TRUE, 6);
diff --git a/calendar/gui/e-memos.c b/calendar/gui/e-memos.c
index e87761974d..e53a2644a0 100644
--- a/calendar/gui/e-memos.c
+++ b/calendar/gui/e-memos.c
@@ -371,7 +371,7 @@ table_drag_data_get (ETable *table,
comp_str = icalcomponent_as_ical_string (vcal);
if (comp_str) {
gtk_selection_data_set (selection_data, selection_data->target,
- 8, comp_str, strlen (comp_str));
+ 8, (unsigned char *)comp_str, strlen (comp_str));
}
icalcomponent_free (vcal);
}
@@ -718,7 +718,6 @@ backend_error_cb (ECal *client, const char *message, gpointer data)
{
EMemos *memos;
GtkWidget *dialog;
- char *errmsg;
char *urinopwd;
memos = E_MEMOS (data);
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 1c77ae09fa..9e00738834 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -457,7 +457,7 @@ table_drag_data_get (ETable *table,
comp_str = icalcomponent_as_ical_string (vcal);
if (comp_str) {
gtk_selection_data_set (selection_data, selection_data->target,
- 8, comp_str, strlen (comp_str));
+ 8, (unsigned char *)comp_str, strlen (comp_str));
}
icalcomponent_free (vcal);
}
@@ -1457,7 +1457,7 @@ e_tasks_open_task_id (ETasks *tasks,
return;
attendee_prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
- e_calendar_table_open_task (E_CALENDAR_TABLE (tasks->priv->tasks_view), client, icalcomp, attendee_prop);
+ e_calendar_table_open_task (E_CALENDAR_TABLE (tasks->priv->tasks_view), client, icalcomp, (gboolean)attendee_prop);
icalcomponent_free (icalcomp);
return;
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 5f0d7fc634..fd663fbe70 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -798,7 +798,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item,
GdkGC *gc;
gint x1, y1, x2, y2, time_x, time_y;
gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
- gint rect_x, rect_w, rect_x2;
+ gint rect_x, rect_w, rect_x2 = 0;
gboolean one_day_event, editing_span = FALSE;
gint start_hour, start_minute, end_hour, end_minute;
gboolean draw_start, draw_end;
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index ee049ebf6c..3c27eb3fe2 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2770,15 +2770,15 @@ backend_error_cb (ECal *client, const char *message, gpointer data)
uristr = get_uri_without_password (e_cal_get_uri (client));
- dialog = gtk_message_dialog_new (
+ dialog = GTK_DIALOG (gtk_message_dialog_new (
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_OK,
_("Error on %s:\n %s"),
- uristr, message);
+ uristr, message));
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
g_free (uristr);
}
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index d718f6b4be..e2ece2d215 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -762,7 +762,7 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source))
goto finish;
- icalcomp = icalparser_parse_string (data->data);
+ icalcomp = icalparser_parse_string ((char *)data->data);
if (icalcomp) {
char * uid;
diff --git a/calendar/gui/print.c b/calendar/gui/print.c
index 4e158121cb..df935eea32 100644
--- a/calendar/gui/print.c
+++ b/calendar/gui/print.c
@@ -2228,7 +2228,7 @@ print_calendar (GnomeCalendar *gcal, GtkPrintOperationAction action,
g_return_if_fail (gcal != NULL);
g_return_if_fail (GNOME_IS_CALENDAR (gcal));
- pcali.gcal = gcal;
+ pcali.gcal = (GnomeCalendar *)gcal;
pcali.start = start;
operation = e_print_operation_new ();
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 723c19d8a7..3965517dde 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -750,7 +750,7 @@ selector_tree_drag_data_received (GtkWidget *widget,
if (E_IS_SOURCE_GROUP (source) || e_source_get_readonly (source))
goto finish;
- icalcomp = icalparser_parse_string (data->data);
+ icalcomp = icalparser_parse_string ((char *)data->data);
if (icalcomp) {
const char * uid;