r3077 - in trunk/src/target/OM-2007.2/applications/openmoko-today2: . src
chris at sita.openmoko.org
chris at sita.openmoko.org
Thu Oct 4 12:16:50 CEST 2007
Author: chris
Date: 2007-10-04 12:16:48 +0200 (Thu, 04 Oct 2007)
New Revision: 3077
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-pim-journal.c
Log:
* src/today-pim-journal.c:
Fix bug #901, thanks to Roman Moravcik
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-10-04 10:04:00 UTC (rev 3076)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog 2007-10-04 10:16:48 UTC (rev 3077)
@@ -1,3 +1,10 @@
+2007-10-04 Chris Lord <chris at openedhand.com>
+
+ * src/today-pim-journal.c: (today_pim_journal_entry_changed),
+ (today_pim_journal_entry_added_cb),
+ (today_pim_journal_entry_removed_cb):
+ Fix bug #901, thanks to Roman Moravcik
+
2007-10-04 Thomas Wood <thomas at openedhand.com>
* src/today-pim-summary.c:
Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-pim-journal.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-pim-journal.c 2007-10-04 10:04:00 UTC (rev 3076)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-pim-journal.c 2007-10-04 10:16:48 UTC (rev 3077)
@@ -39,19 +39,27 @@
}
static void
-today_pim_journal_entry_added_cb (MokoJournal *journal,
- MokoJournalEntry *entry,
- TodayData *data)
+today_pim_journal_entry_changed (MokoJournal *journal,
+ MokoJournalEntry *entry,
+ TodayData *data,
+ gint added)
{
+ MessageDirection dir;
+
switch (moko_journal_entry_get_entry_type (entry)) {
case SMS_JOURNAL_ENTRY :
case EMAIL_JOURNAL_ENTRY :
- data->n_unread_messages ++;
+ data->n_unread_messages += added;
today_pim_journal_update_messages (data);
break;
case VOICE_JOURNAL_ENTRY :
- data->n_missed_calls ++;
- today_pim_journal_update_messages (data);
+ moko_journal_entry_get_direction (entry, &dir);
+ if (dir == DIRECTION_IN) {
+ if (moko_journal_voice_info_get_was_missed (entry)) {
+ data->n_missed_calls += added;
+ today_pim_journal_update_messages (data);
+ }
+ }
break;
default :
break;
@@ -59,23 +67,19 @@
}
static void
+today_pim_journal_entry_added_cb (MokoJournal *journal,
+ MokoJournalEntry *entry,
+ TodayData *data)
+{
+ today_pim_journal_entry_changed (journal, entry, data, 1);
+}
+
+static void
today_pim_journal_entry_removed_cb (MokoJournal *journal,
MokoJournalEntry *entry,
TodayData *data)
{
- switch (moko_journal_entry_get_entry_type (entry)) {
- case SMS_JOURNAL_ENTRY :
- case EMAIL_JOURNAL_ENTRY :
- data->n_unread_messages --;
- today_pim_journal_update_messages (data);
- break;
- case VOICE_JOURNAL_ENTRY :
- data->n_missed_calls --;
- today_pim_journal_update_messages (data);
- break;
- default :
- break;
- }
+ today_pim_journal_entry_changed (journal, entry, data, -1);
}
static void
More information about the commitlog
mailing list