Changeset 2171
- Timestamp:
- 06/06/07 11:39:52 (6 years ago)
- Location:
- trunk/src/target/OM-2007/applications/openmoko-dialer/src
- Files:
-
- 2 edited
-
dialer-window-history.c (modified) (4 diffs)
-
dialer-window-outgoing.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
r2169 r2171 727 727 } 728 728 729 /* Sort two entries by date */ 730 static gint 731 sort_by_date (MokoJournalEntry *a, MokoJournalEntry *b) 732 { 733 const MokoTime *at, *bt; 734 time_t ta, tb; 735 736 at = moko_journal_entry_get_dtstart (a); 737 bt = moko_journal_entry_get_dtstart (b); 738 739 ta = moko_time_as_timet (at); 740 tb = moko_time_as_timet (bt); 741 742 return (gint)difftime (ta, tb); 743 } 744 729 745 730 746 /** … … 750 766 int i = 0, j =0, n_entries; 751 767 MokoJournalEntry *j_entry; 768 GList *entries = NULL, *e; 752 769 //DBG_ENTER(); 753 770 … … 834 851 835 852 i = j = 0; 836 for (i = 0; i < n_entries && j < HISTORY_MAX_ENTRIES; i++)853 for (i = 0; i < n_entries; i++) 837 854 { 838 855 moko_journal_get_entry_at (p_dialer_data->journal, i, &j_entry); … … 840 857 /* We're not interested in anything other than voice entrys */ 841 858 if (moko_journal_entry_get_type (j_entry) != VOICE_JOURNAL_ENTRY) 842 {843 859 continue; 844 } 860 861 entries = g_list_insert_sorted (entries, 862 (gpointer)j_entry, 863 (GCompareFunc)sort_by_date); 864 } 865 for (e = entries; e != NULL && j < HISTORY_MAX_ENTRIES; e = e->next) 866 { 845 867 if (history_add_entry (list_store, j_entry)) 846 868 j++; -
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-outgoing.c
r2168 r2171 154 154 moko_journal_entry_get_voice_info (entry, &info); 155 155 moko_journal_entry_set_dtstart (entry, moko_time_new_today ()); 156 moko_journal_voice_info_set_distant_number (info, number); 156 157 moko_journal_add_entry (data->journal, entry); 157 moko_journal_voice_info_set_distant_number (info, number); 158 /* FIXME: We should be able to associate a number with a number, and add that 159 info to the entry */ 158 /* FIXME: We should be able to associate a number with a contact uid, and 159 add that info to the entry */ 160 160 161 161 /* connect our handler to track call progress */
Note: See TracChangeset
for help on using the changeset viewer.
