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/alarm-notify | |
parent | 6aac3505d7e99b866fc8d884c8c4615330f9d131 (diff) | |
download | gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.gz gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.bz2 gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.lz gsoc2013-evolution-a1fb36c15210deac4ca989703587060c549c6e51.tar.xz 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/alarm-notify')
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify-dialog.c | 10 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-notify.c | 4 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/alarm-queue.c | 2 | ||||
-rw-r--r-- | calendar/gui/alarm-notify/config-data.c | 28 |
4 files changed, 20 insertions, 24 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) |