From c5152171a104a8607952c07bfd99d434970eb80a Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 23 Jan 2003 21:56:10 +0000 Subject: Fixes some trivial, but distracting, warnings. 2003-01-23 Hans Petter Jansson Fixes some trivial, but distracting, warnings. * gui/calendar-config.c (on_timezone_set): Fix constness. * gui/e-timezone-entry.c (on_button_clicked): Fix constness. * gui/dialogs/event-page.c (contacts_changed_cb): Fix constness. * gui/dialogs/task-page.c (contacts_changed_cb): Fix constness. * gui/e-itip-control.c (start_default_server): Cast callback with G_CALLBACK (). * gui/dialogs/schedule-page.c (init_widgets): Cast callback with G_CALLBACK (). * gui/calendar-offline-handler.c (impl_dispose): Takes GObject, not GtkObject. (impl_finalize): Ditto. * gui/calendar-view.c (calendar_view_edit): Now takes parent window as second arg. * gui/e-meeting-model.c (select_names_ok_cb): Fix constness. (get_select_name_dialog): Cast callback to BonoboListenerCallbackFn. * gui/e-meeting-time-sel.c (e_meeting_time_selector_options_menu_position_callback): Add the push_in arg to arg list. This was crash-prone before. (e_meeting_time_selector_autopick_menu_position_callback): Ditto. * gui/alarm-notify/alarm-notify-dialog.c: Include e-unicode.h. svn path=/trunk/; revision=19605 --- calendar/ChangeLog | 35 +++++++++++++++++++++++++ calendar/gui/alarm-notify/alarm-notify-dialog.c | 1 + calendar/gui/calendar-config.c | 2 +- calendar/gui/calendar-offline-handler.c | 4 +-- calendar/gui/calendar-view.c | 4 +-- calendar/gui/dialogs/event-page.c | 4 +-- calendar/gui/dialogs/schedule-page.c | 2 +- calendar/gui/dialogs/task-page.c | 4 +-- calendar/gui/e-itip-control.c | 2 +- calendar/gui/e-meeting-model.c | 10 +++---- calendar/gui/e-meeting-time-sel.c | 4 +++ calendar/gui/e-timezone-entry.c | 11 +++++--- 12 files changed, 63 insertions(+), 20 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 94df1a82ff..98f0be66d2 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,38 @@ +2003-01-23 Hans Petter Jansson + + Fixes some trivial, but distracting, warnings. + + * gui/calendar-config.c (on_timezone_set): Fix constness. + + * gui/e-timezone-entry.c (on_button_clicked): Fix constness. + + * gui/dialogs/event-page.c (contacts_changed_cb): Fix constness. + + * gui/dialogs/task-page.c (contacts_changed_cb): Fix constness. + + * gui/e-itip-control.c (start_default_server): Cast callback with + G_CALLBACK (). + + * gui/dialogs/schedule-page.c (init_widgets): Cast callback with + G_CALLBACK (). + + * gui/calendar-offline-handler.c (impl_dispose): Takes GObject, + not GtkObject. + (impl_finalize): Ditto. + + * gui/calendar-view.c (calendar_view_edit): Now takes parent window + as second arg. + + * gui/e-meeting-model.c (select_names_ok_cb): Fix constness. + (get_select_name_dialog): Cast callback to BonoboListenerCallbackFn. + + * gui/e-meeting-time-sel.c + (e_meeting_time_selector_options_menu_position_callback): Add the + push_in arg to arg list. This was crash-prone before. + (e_meeting_time_selector_autopick_menu_position_callback): Ditto. + + * gui/alarm-notify/alarm-notify-dialog.c: Include e-unicode.h. + 2003-01-23 Ettore Perazzoli * gui/Makefile.am (componentdir): Removed definition; this is now diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 3198dd6ab7..013e9620a5 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index c2ecfe78fe..9ba4d2e5db 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -675,7 +675,7 @@ on_timezone_set (GnomeDialog *dialog, int button, ETimezoneDialog *etd) { - char *display_name; + const char *display_name; icaltimezone *zone; e_timezone_dialog_get_timezone (etd, &display_name); diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c index c6c61ef3d1..88c497ac14 100644 --- a/calendar/gui/calendar-offline-handler.c +++ b/calendar/gui/calendar-offline-handler.c @@ -212,7 +212,7 @@ impl_goOnline (PortableServer_Servant servant, /* GObject methods. */ static void -impl_dispose (GtkObject *object) +impl_dispose (GObject *object) { CalendarOfflineHandler *offline_handler; CalendarOfflineHandlerPrivate *priv; @@ -233,7 +233,7 @@ impl_dispose (GtkObject *object) } static void -impl_finalize (GtkObject *object) +impl_finalize (GObject *object) { CalendarOfflineHandler *offline_handler; CalendarOfflineHandlerPrivate *priv; diff --git a/calendar/gui/calendar-view.c b/calendar/gui/calendar-view.c index f46f3cc117..894cca807e 100644 --- a/calendar/gui/calendar-view.c +++ b/calendar/gui/calendar-view.c @@ -41,7 +41,7 @@ static void calendar_view_class_init (CalendarViewClass *class); static void calendar_view_init (CalendarView *cview); static void calendar_view_destroy (GtkObject *object); -static void calendar_view_edit (GalView *view); +static void calendar_view_edit (GalView *view, GtkWindow *parent_window); static void calendar_view_load (GalView *view, const char *filename); static void calendar_view_save (GalView *view, const char *filename); static const char *calendar_view_get_title (GalView *view); @@ -120,7 +120,7 @@ calendar_view_destroy (GtkObject *object) /* edit method of the calendar view */ static void -calendar_view_edit (GalView *view) +calendar_view_edit (GalView *view, GtkWindow *parent_window) { /* nothing */ } diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 4556e9c46b..adf6e3033f 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -420,8 +420,8 @@ clear_widgets (EventPage *epage) static void contacts_changed_cb (BonoboListener *listener, - char *event_name, - CORBA_any *arg, + const char *event_name, + const CORBA_any *arg, CORBA_Environment *ev, gpointer data) { diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index d3ad165c70..f3b553e178 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -379,7 +379,7 @@ init_widgets (SchedulePage *spage) priv = spage->priv; g_signal_connect((priv->sel), - "changed", times_changed_cb, spage); + "changed", G_CALLBACK (times_changed_cb), spage); return TRUE; diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index 177c100b8b..89edfd935f 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -264,8 +264,8 @@ classification_get (GtkWidget *widget) static void contacts_changed_cb (BonoboListener *listener, - char *event_name, - CORBA_any *arg, + const char *event_name, + const CORBA_any *arg, CORBA_Environment *ev, gpointer data) { diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 44cfa99fd0..938fb3a504 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -170,7 +170,7 @@ start_default_server (gboolean tasks) client = cal_client_new (); - g_signal_connect (client, "cal_opened", start_calendar_server_cb, &success); + g_signal_connect (client, "cal_opened", G_CALLBACK (start_calendar_server_cb), &success); if (tasks) { if (!cal_client_open_default_tasks (client, FALSE)) diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c index 0dde3a6850..9e8969ef17 100644 --- a/calendar/gui/e-meeting-model.c +++ b/calendar/gui/e-meeting-model.c @@ -122,8 +122,8 @@ static gboolean refresh_busy_periods (gpointer data); static void attendee_changed_cb (EMeetingAttendee *ia, gpointer data); static void select_names_ok_cb (BonoboListener *listener, - char *event_name, - CORBA_any *arg, + const char *event_name, + const CORBA_any *arg, CORBA_Environment *ev, gpointer data); @@ -1705,7 +1705,7 @@ get_select_name_dialog (EMeetingModel *im) add_section (priv->corba_select_names, sections[i]); bonobo_event_source_client_add_listener (priv->corba_select_names, - select_names_ok_cb, + (BonoboListenerCallbackFn) select_names_ok_cb, "GNOME/Evolution:ok:dialog", NULL, im); @@ -1767,8 +1767,8 @@ process_section (EMeetingModel *im, EDestination **destv, icalparameter_role rol static void select_names_ok_cb (BonoboListener *listener, - char *event_name, - CORBA_any *arg, + const char *event_name, + const CORBA_any *arg, CORBA_Environment *ev, gpointer data) { diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index ad52ecc5bf..935afff97a 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -144,6 +144,7 @@ static void e_meeting_time_selector_on_options_button_clicked (GtkWidget *button static void e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data); static void e_meeting_time_selector_on_zoomed_out_toggled (GtkWidget *button, EMeetingTimeSelector *mts); @@ -161,6 +162,7 @@ static void e_meeting_time_selector_on_autopick_button_clicked (GtkWidget *butto static void e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data); static void e_meeting_time_selector_on_autopick_option_toggled (GtkWidget *button, EMeetingTimeSelector *mts); @@ -1406,6 +1408,7 @@ static void e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data) { EMeetingTimeSelector *mts; @@ -1453,6 +1456,7 @@ static void e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer user_data) { EMeetingTimeSelector *mts; diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 5365820dcf..8f85cbff2e 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -199,17 +199,20 @@ on_button_clicked (GtkWidget *widget, ETimezoneEntryPrivate *priv; ETimezoneDialog *timezone_dialog; GtkWidget *dialog; - char *tzid = NULL, *display_name, *old_display_name; + char *tzid = NULL; + const gchar *old_display_name; + const gchar *display_name; priv = tentry->priv; - display_name = gtk_entry_get_text (GTK_ENTRY (priv->entry)); if (priv->zone) tzid = icaltimezone_get_tzid (priv->zone); timezone_dialog = e_timezone_dialog_new (); - e_timezone_dialog_set_timezone (timezone_dialog, tzid, display_name); + + /* e_timezone_dialog_set_timezone() should really take (const gchar *) */ + e_timezone_dialog_set_timezone (timezone_dialog, tzid, (gchar *) display_name); dialog = e_timezone_dialog_get_toplevel (timezone_dialog); @@ -245,7 +248,7 @@ icaltimezone* e_timezone_entry_get_timezone (ETimezoneEntry *tentry) { ETimezoneEntryPrivate *priv; - char *display_name; + const char *display_name; g_return_val_if_fail (E_IS_TIMEZONE_ENTRY (tentry), NULL); -- cgit v1.2.3