diff options
author | Kjartan Maraas <kmaraas@gnome.org> | 2007-10-24 22:10:02 +0800 |
---|---|---|
committer | Kjartan Maraas <kmaraas@src.gnome.org> | 2007-10-24 22:10:02 +0800 |
commit | a1fb36c15210deac4ca989703587060c549c6e51 (patch) | |
tree | aad1cc8f64bd5763c4f84dd71ac8e9f82a9286ea /calendar/gui | |
parent | 6aac3505d7e99b866fc8d884c8c4615330f9d131 (diff) | |
download | gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.gz gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.zst gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.zip |
Warning fixes: - NULL vs 0 vs FALSE/TRUE - ANSIfication of declarations -
2007-10-23 Kjartan Maraas <kmaraas@gnome.org>
* gui/alarm-notify/alarm-notify-dialog.c:
* gui/alarm-notify/alarm-notify.c:
* gui/alarm-notify/alarm-queue.c:
* gui/alarm-notify/config-data.c:
* gui/cal-search-bar.c:
* gui/calendar-commands.c:
* gui/calendar-config.c:
* gui/dialogs/alarm-dialog.c:
* gui/dialogs/alarm-list-dialog.c:
* gui/dialogs/cal-prefs-dialog.c:
* gui/dialogs/comp-editor.c:
* gui/dialogs/event-page.c:
* gui/dialogs/recurrence-page.c:
* gui/e-alarm-list.c:
* gui/e-cal-config.c:
* gui/e-cal-event.c:
* gui/e-cal-menu.c:
* gui/e-cal-popup.c:
* gui/e-calendar-table.c:
* gui/e-calendar-view.c:
* gui/e-date-time-list.c:
* gui/e-day-view-main-item.c:
* gui/e-day-view-time-item.c:
* gui/e-day-view.c:
* gui/e-itip-control.c:
* gui/e-meeting-list-view.c:
* gui/e-memo-table.c:
* gui/e-select-names-editable.c:
* gui/e-week-view-event-item.c:
* gui/e-week-view.c:
* gui/goto.c:
* gui/migration.c:
* gui/print.c:
* gui/tasks-control.c:
* importers/icalendar-importer.c:
Warning fixes:
- NULL vs 0 vs FALSE/TRUE
- ANSIfication of declarations
- mixing declarations and code
- mark some code static
- remove use of some deprecated Gtk+ apis
svn path=/trunk/; revision=34420
Diffstat (limited to 'calendar/gui')
34 files changed, 102 insertions, 116 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify-dialog.c b/calendar/gui/alarm-notify/alarm-notify-dialog.c index 90db23060d..eab6b95606 100644 --- a/calendar/gui/alarm-notify/alarm-notify-dialog.c +++ b/calendar/gui/alarm-notify/alarm-notify-dialog.c @@ -99,10 +99,6 @@ edit_pressed_cb (GtkButton *button, gpointer user_data); static void snooze_pressed_cb (GtkButton *button, gpointer user_data); -AlarmNotify *an = NULL; -gboolean have_one = FALSE; - - static void an_update_minutes_label (GtkSpinButton *sb, gpointer data) { @@ -147,9 +143,9 @@ dialog_response_cb (GtkDialog *dialog, guint response_id, gpointer user_data) } if (!funcinfo) { - GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (an->treeview)); - gtk_tree_model_get_iter_first (model, &iter); - gtk_tree_model_get (model, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1); + GtkTreeModel *treemodel = gtk_tree_view_get_model (GTK_TREE_VIEW (an->treeview)); + gtk_tree_model_get_iter_first (treemodel, &iter); + gtk_tree_model_get (treemodel, &iter, ALARM_FUNCINFO_COLUMN, &funcinfo, -1); } g_return_if_fail (funcinfo); switch (response_id) { diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c index bc86a42abc..9044f2d5d6 100644 --- a/calendar/gui/alarm-notify/alarm-notify.c +++ b/calendar/gui/alarm-notify/alarm-notify.c @@ -371,8 +371,8 @@ alarm_notify_new (void) alarm_channel_setup(&alarm_reply_port, &alarm_reply_channel, alarm_msgport_replied); alarm_operation_thread = e_thread_new(E_THREAD_QUEUE); - e_thread_set_msg_destroy(alarm_operation_thread, alarm_msg_destroy, 0); - e_thread_set_msg_received(alarm_operation_thread, alarm_msg_received, 0); + e_thread_set_msg_destroy(alarm_operation_thread, alarm_msg_destroy, NULL); + e_thread_set_msg_received(alarm_operation_thread, alarm_msg_received, NULL); e_thread_set_reply_port(alarm_operation_thread, alarm_reply_port); an = g_object_new (TYPE_ALARM_NOTIFY, diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 5c74332d42..5a086266b8 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1165,7 +1165,7 @@ tray_list_remove_async(EThread *e, AlarmMsg *msg, void *data) } static void -tray_list_remove_icons () +tray_list_remove_icons (void) { AlarmMsg *msg; diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index a3787915dc..c35d2b4a6c 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -254,19 +254,19 @@ config_data_get_notify_with_tray (void) void config_data_set_last_notification_time (time_t t) { - GConfClient *conf_client; + GConfClient *client; time_t current_t; g_return_if_fail (t != -1); - if (!(conf_client = config_data_get_conf_client ())) + if (!(client = config_data_get_conf_client ())) return; /* we only store the new notification time if it is bigger than the already stored one */ - current_t = gconf_client_get_int (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL); + current_t = gconf_client_get_int (client, KEY_LAST_NOTIFICATION_TIME, NULL); if (t > current_t) - gconf_client_set_int (conf_client, KEY_LAST_NOTIFICATION_TIME, t, NULL); + gconf_client_set_int (client, KEY_LAST_NOTIFICATION_TIME, t, NULL); } /** @@ -279,13 +279,13 @@ config_data_set_last_notification_time (time_t t) time_t config_data_get_last_notification_time (void) { - GConfClient *conf_client; GConfValue *value; + GConfClient *client; - if (!(conf_client = config_data_get_conf_client ())) + if (!(client = config_data_get_conf_client ())) return -1; - value = gconf_client_get_without_default (conf_client, KEY_LAST_NOTIFICATION_TIME, NULL); + value = gconf_client_get_without_default (client, KEY_LAST_NOTIFICATION_TIME, NULL); if (value) return (time_t) gconf_value_get_int (value); @@ -301,15 +301,15 @@ config_data_get_last_notification_time (void) void config_data_save_blessed_program (const char *program) { - GConfClient *conf_client; + GConfClient *client; GSList *l; - if (!(conf_client = config_data_get_conf_client ())) + if (!(client = config_data_get_conf_client ())) return; - l = gconf_client_get_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL); + l = gconf_client_get_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL); l = g_slist_append (l, g_strdup (program)); - gconf_client_set_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, l, NULL); + gconf_client_set_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, l, NULL); g_slist_foreach (l, (GFunc) g_free, NULL); g_slist_free (l); } @@ -325,14 +325,14 @@ config_data_save_blessed_program (const char *program) gboolean config_data_is_blessed_program (const char *program) { - GConfClient *conf_client; + GConfClient *client; GSList *l, *n; gboolean found = FALSE; - if (!(conf_client = config_data_get_conf_client ())) + if (!(client = config_data_get_conf_client ())) return FALSE; - l = gconf_client_get_list (conf_client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL); + l = gconf_client_get_list (client, KEY_PROGRAMS, GCONF_VALUE_STRING, NULL); while (l) { n = l->next; if (!found) diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index dbb046aea2..7c498b79ef 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -626,7 +626,7 @@ make_suboptions (CalSearchBar *cal_search) subitems[2].search.text = NULL; subitems[2].search.id = 0; - subitems[2].image = 0; + subitems[2].image = NULL; subitems[3].search.text = _("Next 7 Days' Tasks"); subitems[3].search.id = N_DAY_TASK; @@ -688,7 +688,7 @@ make_suboptions (CalSearchBar *cal_search) subitems[2].search.text = NULL; subitems[2].search.id = 0; - subitems[2].image = 0; + subitems[2].image = NULL; subitems[3].search.text = _("Active Appointments"); subitems[3].search.id = ACTIVE_APPONTMENT; diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index 4e2ccc64d9..b16a6991f4 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -385,7 +385,7 @@ static struct _sensitize_item calendar_sensitize_table[] = { { "Delete", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_NONRECURRING }, { "DeleteOccurrence", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_RECURRING }, { "DeleteAllOccurrences", E_CAL_MENU_SELECT_EDITABLE|E_CAL_MENU_SELECT_RECURRING }, - { 0 } + { NULL } }; /* Sensitizes the UI Component menu/toolbar calendar commands based on the @@ -445,7 +445,7 @@ static struct _sensitize_item taskpad_sensitize_table[] = { { "Copy", E_CAL_MENU_SELECT_ANY }, { "Paste", E_CAL_MENU_SELECT_EDITABLE }, { "Delete", E_CAL_MENU_SELECT_EDITABLE }, - { 0 } + { NULL } }; /* Sensitizes the UI Component menu/toolbar tasks commands based on the number diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index ab007bfa2d..46714ec324 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -1241,7 +1241,7 @@ calendar_config_set_confirm_purge (gboolean confirm) } void -calendar_config_check_timezone_set () +calendar_config_check_timezone_set (void) { ETimezoneDialog *timezone_dialog; GtkWidget *dialog; diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 34d5a8e3a2..342f8be472 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -881,8 +881,8 @@ setup_select_names (Dialog *dialog) gtk_widget_show (dialog->malarm_addresses); gtk_box_pack_end_defaults (GTK_BOX (dialog->malarm_address_group), dialog->malarm_addresses); - gtk_signal_connect (GTK_OBJECT (dialog->malarm_addressbook), "clicked", - GTK_SIGNAL_FUNC (addressbook_clicked_cb), dialog); + g_signal_connect (G_OBJECT (dialog->malarm_addressbook), "clicked", + G_CALLBACK (addressbook_clicked_cb), dialog); name_selector_dialog = e_name_selector_peek_dialog (dialog->name_selector); g_signal_connect (name_selector_dialog, "response", diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 63d4cb6baf..de59361519 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -336,12 +336,12 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) if (!dialog->xml) { g_message (G_STRLOC ": Could not load the Glade XML file!"); - return FALSE; + return NULL; } if (!get_widgets (dialog)) { g_object_unref(dialog->xml); - return FALSE; + return NULL; } init_widgets (dialog); diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 028c771caf..afea9a8df2 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -321,7 +321,7 @@ alarms_selection_changed (ESourceSelector *selector, CalendarPrefsDialog *prefs) GSList *l; GSList *groups; ESource *source; - gchar *alarm; + const gchar *alarm; /* first we clear all the alarm flags from all sources */ g_message ("Clearing selection"); @@ -331,7 +331,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 = (gchar *)e_source_get_property (source, "alarm"); + alarm = e_source_get_property (source, "alarm"); if (alarm && !g_ascii_strcasecmp (alarm, "never")) continue; diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 27555145d8..030d07b111 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -179,12 +179,12 @@ static struct { GdkAtom atom; guint32 actions; } drag_info[] = { - { "message/rfc822", 0, GDK_ACTION_COPY }, - { "x-uid-list", 0, GDK_ACTION_ASK|GDK_ACTION_MOVE|GDK_ACTION_COPY }, - { "text/uri-list", 0, GDK_ACTION_COPY }, - { "_NETSCAPE_URL", 0, GDK_ACTION_COPY }, - { "text/x-vcard", 0, GDK_ACTION_COPY }, - { "text/calendar", 0, GDK_ACTION_COPY }, + { "message/rfc822", NULL, GDK_ACTION_COPY }, + { "x-uid-list", NULL, GDK_ACTION_ASK|GDK_ACTION_MOVE|GDK_ACTION_COPY }, + { "text/uri-list", NULL, GDK_ACTION_COPY }, + { "_NETSCAPE_URL", NULL, GDK_ACTION_COPY }, + { "text/x-vcard", NULL, GDK_ACTION_COPY }, + { "text/calendar", NULL, GDK_ACTION_COPY }, }; enum { diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index ed8f1ddb93..b9b354f017 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -507,8 +507,7 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD if (all_day_event) start_zone = calendar_config_get_icaltimezone (); - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), - epage); + g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); e_date_edit_set_date (E_DATE_EDIT (priv->start_time), start_tt->year, @@ -521,15 +520,12 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time), end_tt->hour, end_tt->minute); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), - epage); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), - epage); + g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); /* Set the timezones, and set sync_timezones to TRUE if both timezones are the same. */ - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_timezone), - epage); + g_signal_handlers_block_matched (priv->start_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); g_signal_handlers_block_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); if (start_zone) @@ -543,9 +539,8 @@ update_time (EventPage *epage, ECalComponentDateTime *start_date, ECalComponentD /*unblock the endtimezone widget*/ g_signal_handlers_unblock_matched (priv->end_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_unblock_matched (priv->start_timezone, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_timezone), - epage); priv->sync_timezones = TRUE; update_end_time_selector (epage); @@ -565,17 +560,14 @@ clear_widgets (EventPage *epage) gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (priv->description)), "", 0); /* Start and end times */ - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), - epage); + g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); e_date_edit_set_time (E_DATE_EDIT (priv->start_time), 0); e_date_edit_set_time (E_DATE_EDIT (priv->end_time), 0); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), - epage); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), - epage); + g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); epage->priv->all_day_event = FALSE; set_all_day (epage, FALSE); @@ -2165,10 +2157,8 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day) } event_page_set_show_timezone (epage, calendar_config_get_show_timezone() & !all_day); - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->start_time), - epage); - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->end_time), - epage); + g_signal_handlers_block_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_block_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); e_date_edit_set_date (E_DATE_EDIT (priv->start_time), start_tt.year, start_tt.month, start_tt.day); @@ -2180,10 +2170,8 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day) e_date_edit_set_time_of_day (E_DATE_EDIT (priv->end_time), end_tt.hour, end_tt.minute); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->start_time), - epage); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->end_time), - epage); + g_signal_handlers_unblock_matched (priv->start_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); + g_signal_handlers_unblock_matched (priv->end_time, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, epage); /* Notify upstream */ notify_dates_changed (epage, &start_tt, &end_tt); diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index d24374991c..93a9fd05ba 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -1603,9 +1603,9 @@ recurrence_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) if (!e_cal_component_has_rdates (comp) && !e_cal_component_has_rrules (comp) && !e_cal_component_has_exrules (comp)) { - gtk_signal_handler_block_by_data (GTK_OBJECT (priv->recurs), rpage); + g_signal_handlers_block_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); e_dialog_toggle_set (priv->recurs, FALSE); - gtk_signal_handler_unblock_by_data (GTK_OBJECT (priv->recurs), rpage); + g_signal_handlers_unblock_matched (priv->recurs, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); sensitize_buttons (rpage); preview_recur (rpage); diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c index 2014e48866..e3d9ece911 100644 --- a/calendar/gui/e-alarm-list.c +++ b/calendar/gui/e-alarm-list.c @@ -43,7 +43,7 @@ static void e_alarm_list_init (EAlarmList *file_list) static void e_alarm_list_class_init (EAlarmListClass *class); static void e_alarm_list_tree_model_init (GtkTreeModelIface *iface); static void e_alarm_list_finalize (GObject *object); -static guint e_alarm_list_get_flags (GtkTreeModel *tree_model); +static GtkTreeModelFlags e_alarm_list_get_flags (GtkTreeModel *tree_model); static gint e_alarm_list_get_n_columns (GtkTreeModel *tree_model); static GType e_alarm_list_get_column_type (GtkTreeModel *tree_model, gint index); @@ -229,7 +229,7 @@ e_alarm_list_finalize (GObject *object) } /* Fulfill the GtkTreeModel requirements */ -static guint +static GtkTreeModelFlags e_alarm_list_get_flags (GtkTreeModel *tree_model) { g_return_val_if_fail (E_IS_ALARM_LIST (tree_model), 0); diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c index 3066d4f911..13ad4eb6ac 100644 --- a/calendar/gui/e-cal-config.c +++ b/calendar/gui/e-cal-config.c @@ -138,7 +138,7 @@ e_cal_config_get_type (void) ECalConfig * e_cal_config_new (int type, const char *menuid) { - ECalConfig *ecp = g_object_new (e_cal_config_get_type(), 0); + ECalConfig *ecp = g_object_new (e_cal_config_get_type(), NULL); e_config_construct (&ecp->config, type, menuid); return ecp; } @@ -167,13 +167,13 @@ e_cal_config_target_new_prefs (ECalConfig *ecp, struct _GConfClient *gconf) } static const EConfigHookTargetMask ecph_no_masks[] = { - { 0 } + { NULL } }; static const EConfigHookTargetMap ecph_targets[] = { { "source", EC_CONFIG_TARGET_SOURCE, ecph_no_masks }, { "prefs", EC_CONFIG_TARGET_PREFS, ecph_no_masks }, - { 0 }, + { NULL }, }; static void diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index d104bc0865..25ccf624c0 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -85,7 +85,7 @@ e_cal_event_peek (void) { static ECalEvent *e_cal_event = NULL; if (!e_cal_event) { - e_cal_event = g_object_new (e_cal_event_get_type (), 0); + e_cal_event = g_object_new (e_cal_event_get_type (), NULL); e_event_construct (&e_cal_event->event, "org.gnome.evolution.calendar.events"); } return e_cal_event; @@ -108,12 +108,12 @@ static void *eceh_parent_class; static const EEventHookTargetMask eceh_component_masks[] = { { "migration", E_CAL_EVENT_COMPONENT_MIGRATION }, - { 0 }, + { NULL }, }; static const EEventHookTargetMap eceh_targets[] = { { "component", E_CAL_EVENT_TARGET_COMPONENT, eceh_component_masks }, - { 0 }, + { NULL }, }; static void diff --git a/calendar/gui/e-cal-menu.c b/calendar/gui/e-cal-menu.c index f1fd79cd8f..554500a0a7 100644 --- a/calendar/gui/e-cal-menu.c +++ b/calendar/gui/e-cal-menu.c @@ -99,7 +99,7 @@ e_cal_menu_get_type(void) ECalMenu *e_cal_menu_new(const char *menuid) { - ECalMenu *emp = g_object_new(e_cal_menu_get_type(), 0); + ECalMenu *emp = g_object_new(e_cal_menu_get_type(), NULL); e_menu_construct(&emp->menu, menuid); @@ -243,12 +243,12 @@ static const EMenuHookTargetMask ecalph_select_masks[] = { { "assignable", E_CAL_MENU_SELECT_ASSIGNABLE }, { "hasurl", E_CAL_MENU_SELECT_HASURL }, { "not-complete", E_CAL_MENU_SELECT_NOTCOMPLETE }, - { 0 } + { NULL } }; static const EMenuHookTargetMap ecalph_targets[] = { { "select", E_CAL_MENU_TARGET_SELECT, ecalph_select_masks }, - { 0 } + { NULL } }; static void @@ -267,7 +267,7 @@ ecalph_class_init(EPluginHookClass *klass) ((GObjectClass *)klass)->finalize = ecalph_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.bonobomenu:1.0"; - for (i=0;ecalph_targets[i].type;i++) + for (i = 0; ecalph_targets[i].type; i++) e_menu_hook_class_add_target_map((EMenuHookClass *)klass, &ecalph_targets[i]); /* FIXME: leaks parent set class? */ diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 5a398f6818..983f922958 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -454,7 +454,7 @@ e_cal_popup_get_type(void) ECalPopup *e_cal_popup_new(const char *menuid) { - ECalPopup *eabp = g_object_new(e_cal_popup_get_type(), 0); + ECalPopup *eabp = g_object_new(e_cal_popup_get_type(), NULL); e_popup_construct(&eabp->popup, menuid); @@ -825,7 +825,7 @@ static const EPopupHookTargetMask ecalph_select_masks[] = { { "not-complete", E_CAL_POPUP_SELECT_NOTCOMPLETE }, { "no-save-schedules", E_CAL_POPUP_SELECT_NOSAVESCHEDULES }, { "complete" , E_CAL_POPUP_SELECT_COMPLETE}, - { 0 } + { NULL } }; static const EPopupHookTargetMask ecalph_source_masks[] = { @@ -837,7 +837,7 @@ static const EPopupHookTargetMask ecalph_source_masks[] = { { "delete", E_CAL_POPUP_SOURCE_DELETE}, { "no-delete", E_CAL_POPUP_SOURCE_NO_DELETE}, - { 0 } + { NULL } }; static const EPopupHookTargetMask ecalph_attachments_masks[] = { @@ -846,14 +846,14 @@ static const EPopupHookTargetMask ecalph_attachments_masks[] = { { "modify", E_CAL_POPUP_ATTACHMENTS_MODIFY }, { "multiple", E_CAL_POPUP_ATTACHMENTS_MULTIPLE }, { "image", E_CAL_POPUP_ATTACHMENTS_IMAGE }, - { 0 } + { NULL } }; static const EPopupHookTargetMap ecalph_targets[] = { { "select", E_CAL_POPUP_TARGET_SELECT, ecalph_select_masks }, { "source", E_CAL_POPUP_TARGET_SOURCE, ecalph_source_masks }, { "attachments", E_CAL_POPUP_TARGET_ATTACHMENTS, ecalph_attachments_masks }, - { 0 } + { NULL } }; static void diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 742820e46a..a2f54fb2e6 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -122,7 +122,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static const char* icon_names[E_CALENDAR_MODEL_NUM_ICONS] = { "stock_task", "stock_task-recurring", "stock_task-assigned", "stock_task-assigned-to" }; -static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { 0 }; +static GdkPixbuf* icon_pixbufs[E_CALENDAR_MODEL_NUM_ICONS] = { NULL }; static GdkAtom clipboard_atom = GDK_NONE; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 79b9e5d711..23f391a1fb 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -462,7 +462,7 @@ e_calendar_view_set_model (ECalendarView *cal_view, ECalModel *model) if (cal_view->priv->model) { g_signal_handlers_disconnect_matched (cal_view->priv->model, G_SIGNAL_MATCH_DATA, - 0, 0, 0, NULL, cal_view); + 0, 0, NULL, NULL, cal_view); g_object_unref (cal_view->priv->model); } diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c index 110147aec3..702219860a 100644 --- a/calendar/gui/e-date-time-list.c +++ b/calendar/gui/e-date-time-list.c @@ -41,7 +41,7 @@ static void e_date_time_list_init (EDateTimeList *file_l static void e_date_time_list_class_init (EDateTimeListClass *class); static void e_date_time_list_tree_model_init (GtkTreeModelIface *iface); static void e_date_time_list_finalize (GObject *object); -static guint e_date_time_list_get_flags (GtkTreeModel *tree_model); +static GtkTreeModelFlags e_date_time_list_get_flags (GtkTreeModel *tree_model); static gint e_date_time_list_get_n_columns (GtkTreeModel *tree_model); static GType e_date_time_list_get_column_type (GtkTreeModel *tree_model, gint index); @@ -227,7 +227,7 @@ e_date_time_list_finalize (GObject *object) } /* Fulfill the GtkTreeModel requirements */ -static guint +static GtkTreeModelFlags e_date_time_list_get_flags (GtkTreeModel *tree_model) { g_return_val_if_fail (E_IS_DATE_TIME_LIST (tree_model), 0); diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index 8aa27efdfc..6b6ffef8a9 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -1939,6 +1939,7 @@ e_day_view_main_item_draw_day_event (EDayViewMainItem *dvmitem, e_cal_component_free_categories_list (categories_list); } + g_free (text); g_object_unref (comp); cairo_destroy (cr); } diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c index 6dc908d341..56642db245 100644 --- a/calendar/gui/e-day-view-time-item.c +++ b/calendar/gui/e-day-view-time-item.c @@ -869,7 +869,7 @@ e_day_view_time_item_on_button_press (EDayViewTimeItem *dvtmitem, if (gdk_pointer_grab (GTK_LAYOUT (canvas)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->button.time) == 0) { + NULL, NULL, event->button.time) == 0) { e_day_view_start_selection (day_view, -1, row); dvtmitem->dragging_selection = TRUE; } diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index e43c71bf7f..43a56944ee 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -3436,7 +3436,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget, if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { + NULL, NULL, event->time) == 0) { if (event->time - day_view->bc_event_time > 250) e_day_view_get_selected_time_range ((ECalendarView *) day_view, &day_view->before_click_dtstart, &day_view->before_click_dtend); day_view->bc_event_time = event->time; @@ -3576,7 +3576,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget, if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { + NULL, NULL, event->time) == 0) { if (event->time - day_view->bc_event_time > 250) e_day_view_get_selected_time_range ((ECalendarView *) day_view, &day_view->before_click_dtstart, &day_view->before_click_dtend); day_view->bc_event_time = event->time; @@ -3838,7 +3838,7 @@ e_day_view_on_long_event_click (EDayView *day_view, if (gdk_pointer_grab (GTK_LAYOUT (day_view->top_canvas)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, bevent->time) == 0) { + NULL, NULL, bevent->time) == 0) { day_view->resize_event_day = E_DAY_VIEW_LONG_EVENT; day_view->resize_event_num = event_num; @@ -3904,7 +3904,7 @@ e_day_view_on_event_click (EDayView *day_view, if (gdk_pointer_grab (GTK_LAYOUT (day_view->main_canvas)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, bevent->time) == 0) { + NULL, NULL, bevent->time) == 0) { day_view->resize_event_day = day; day_view->resize_event_num = event_num; diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 2a082c7ba3..651aae31bd 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -1230,19 +1230,19 @@ get_request_options (void) } static char* -get_request_fb_options () +get_request_fb_options (void) { return g_strdup_printf ("<object classid=\"itip:freebusy_options\"></object>"); } static char* -get_reply_options () +get_reply_options (void) { return g_strdup_printf ("<object classid=\"itip:reply_options\"></object>"); } static char* -get_refresh_options () +get_refresh_options (void) { return g_strdup_printf ("<object classid=\"itip:refresh_options\"></object>"); } diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index b645c70c21..6cf9d24073 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -158,7 +158,7 @@ e_meeting_list_view_init (EMeetingListView *view) } static GList * -get_type_strings () +get_type_strings (void) { GList *strings = NULL; @@ -172,7 +172,7 @@ get_type_strings () } static GList * -get_role_strings () +get_role_strings (void) { GList *strings = NULL; @@ -186,7 +186,7 @@ get_role_strings () } static GList * -get_rsvp_strings () +get_rsvp_strings (void) { GList *strings = NULL; @@ -197,7 +197,7 @@ get_rsvp_strings () } static GList * -get_status_strings () +get_status_strings (void) { GList *strings = NULL; diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 50d02e7758..5c80b158c4 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -118,7 +118,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; static const char* icon_names[E_MEMO_MODEL_NUM_ICONS] = { "stock_notes", "stock_insert-note" }; -static GdkPixbuf* icon_pixbufs[E_MEMO_MODEL_NUM_ICONS] = { 0 }; +static GdkPixbuf* icon_pixbufs[E_MEMO_MODEL_NUM_ICONS] = { NULL }; static GdkAtom clipboard_atom = GDK_NONE; diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c index 1a9c7c9968..74f4e16d50 100644 --- a/calendar/gui/e-select-names-editable.c +++ b/calendar/gui/e-select-names-editable.c @@ -97,7 +97,7 @@ e_select_names_editable_get_type (void) } ESelectNamesEditable * -e_select_names_editable_new () +e_select_names_editable_new (void) { ESelectNamesEditable *esne = g_object_new (E_TYPE_SELECT_NAMES_EDITABLE, NULL); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 16fa41102d..8ac563191a 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -1111,6 +1111,7 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, cairo_save (cr); gdk_cairo_set_source_color (cr, &week_view->colors[E_WEEK_VIEW_COLOR_EVENT_BORDER]); cairo_set_line_width (cr, 0.7); + /* rect_x2 is used uninitialized here */ cairo_move_to (cr, rect_x2, y2); cairo_line_to (cr, rect_x2, y2); cairo_stroke (cr); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 6dfd47e331..c6115d8852 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2091,7 +2091,7 @@ e_week_view_on_button_press (GtkWidget *widget, if (gdk_pointer_grab (GTK_LAYOUT (widget)->bin_window, FALSE, GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK, - FALSE, NULL, event->time) == 0) { + NULL, NULL, event->time) == 0) { if (event->time - week_view->bc_event_time > 250) e_calendar_view_get_selected_time_range ((ECalendarView *) week_view, &week_view->before_click_dtstart, &week_view->before_click_dtend); week_view->bc_event_time = event->time; diff --git a/calendar/gui/goto.c b/calendar/gui/goto.c index c58612875f..c8cd424d8e 100644 --- a/calendar/gui/goto.c +++ b/calendar/gui/goto.c @@ -41,7 +41,7 @@ typedef struct } GoToDialog; -GoToDialog *dlg = NULL; +static GoToDialog *dlg = NULL; /* Callback used when the year adjustment is changed */ static void diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c index 27ddee0384..f6b977bbe9 100644 --- a/calendar/gui/migration.c +++ b/calendar/gui/migration.c @@ -81,7 +81,7 @@ static e_gconf_map_t calendar_display_map[] = { { "CompressWeekend", "calendar/display/compress_weekend", E_GCONF_MAP_BOOL }, { "ShowEventEndTime", "calendar/display/show_event_end", E_GCONF_MAP_BOOL }, { "WorkingDays", "calendar/display/working_days", E_GCONF_MAP_INT }, - { 0 }, + { NULL }, }; static e_gconf_map_t calendar_tasks_map[] = { @@ -89,7 +89,7 @@ static e_gconf_map_t calendar_tasks_map[] = { { "HideCompletedTasks", "calendar/tasks/hide_completed", E_GCONF_MAP_BOOL }, { "HideCompletedTasksUnits", "calendar/tasks/hide_completed_units", E_GCONF_MAP_STRING }, { "HideCompletedTasksValue", "calendar/tasks/hide_completed_value", E_GCONF_MAP_INT }, - { 0 }, + { NULL }, }; static e_gconf_map_t calendar_tasks_colours_map[] = { @@ -97,7 +97,7 @@ static e_gconf_map_t calendar_tasks_colours_map[] = { { "TasksDueToday", "calendar/tasks/colors/due_today", E_GCONF_MAP_STRING }, { "TasksOverDue", "calendar/tasks/colors/overdue", E_GCONF_MAP_STRING }, { "TasksDueToday", "calendar/tasks/colors/due_today", E_GCONF_MAP_STRING }, - { 0 }, + { NULL }, }; static e_gconf_map_t calendar_other_map[] = { @@ -107,13 +107,13 @@ static e_gconf_map_t calendar_other_map[] = { { "UseDefaultReminder", "calendar/other/use_default_reminder", E_GCONF_MAP_BOOL }, { "DefaultReminderInterval", "calendar/other/default_reminder_interval", E_GCONF_MAP_INT }, { "DefaultReminderUnits", "calendar/other/default_reminder_units", E_GCONF_MAP_STRING }, - { 0 }, + { NULL }, }; static e_gconf_map_t calendar_datenavigator_map[] = { /* /Calendar/DateNavigator */ { "ShowWeekNumbers", "calendar/date_navigator/show_week_numbers", E_GCONF_MAP_BOOL }, - { 0 }, + { NULL }, }; static e_gconf_map_t calendar_alarmnotify_map[] = { @@ -121,25 +121,25 @@ static e_gconf_map_t calendar_alarmnotify_map[] = { { "LastNotificationTime", "calendar/notify/last_notification_time", E_GCONF_MAP_INT }, { "CalendarToLoad%i", "calendar/notify/calendars", E_GCONF_MAP_STRING|E_GCONF_MAP_LIST }, { "BlessedProgram%i", "calendar/notify/programs", E_GCONF_MAP_STRING|E_GCONF_MAP_LIST }, - { 0 }, + { NULL }, }; -e_gconf_map_list_t calendar_remap_list[] = { +static e_gconf_map_list_t calendar_remap_list[] = { { "/Calendar/Display", calendar_display_map }, { "/Calendar/Other/Map", calendar_other_map }, { "/Calendar/DateNavigator", calendar_datenavigator_map }, { "/Calendar/AlarmNotify", calendar_alarmnotify_map }, - { 0 }, + { NULL }, }; -e_gconf_map_list_t task_remap_list[] = { +static e_gconf_map_list_t task_remap_list[] = { { "/Calendar/Tasks", calendar_tasks_map }, { "/Calendar/Tasks/Colors", calendar_tasks_colours_map }, - { 0 }, + { NULL }, }; static GtkWidget *window; diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 84b5931e47..80b7e42355 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -630,7 +630,7 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month, /* get month days */ tm = *convert_timet_to_struct_tm (month, zone); - build_month (tm.tm_mon, tm.tm_year + 1900, days, 0, 0); + build_month (tm.tm_mon, tm.tm_year + 1900, days, NULL, NULL); font_normal = get_font_for_size (font_size, PANGO_WEIGHT_NORMAL); font_bold = get_font_for_size (font_size, PANGO_WEIGHT_BOLD); diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index ff0460cf4b..dda57aad74 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -177,7 +177,7 @@ static struct _tasks_sensitize_item tasks_sensitize_table[] = { { "TasksPurge", E_CAL_MENU_SELECT_EDITABLE }, { "TasksAssign", E_CAL_MENU_SELECT_ONE | E_CAL_MENU_SELECT_EDITABLE | E_CAL_MENU_SELECT_ASSIGNABLE }, { "TasksForward", E_CAL_MENU_SELECT_ONE }, - { 0 } + { NULL } }; /* Sensitizes the UI Component menu/toolbar commands based on the number of |