Send commitlog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:
1. r2096 - trunk/oe/packages ([EMAIL PROTECTED])
2. r2097 - trunk/oe/conf/machine ([EMAIL PROTECTED])
3. r2098 - trunk/oe/packages/linux ([EMAIL PROTECTED])
4. r2099 - in trunk/src/target/OM-2007/openmoko-libs: .
libmokoui ([EMAIL PROTECTED])
5. r2100 - in trunk/oe/packages/openmoko-base: . files
([EMAIL PROTECTED])
6. r2101 -
trunk/src/target/OM-2007/applications/openmoko-dialer/src
([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-05-29 21:58:43 +0200 (Tue, 29 May 2007)
New Revision: 2096
Removed:
trunk/oe/packages/linux-qemu/
Log:
oe: yank linux-qemu since we now have a 'real' neo1973ified qemu
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-05-29 23:48:19 +0200 (Tue, 29 May 2007)
New Revision: 2097
Modified:
trunk/oe/conf/machine/fic-gta01.conf
Log:
oe: include asoc modules for Neo1973 in rootfs
Modified: trunk/oe/conf/machine/fic-gta01.conf
===================================================================
--- trunk/oe/conf/machine/fic-gta01.conf 2007-05-29 19:58:43 UTC (rev
2096)
+++ trunk/oe/conf/machine/fic-gta01.conf 2007-05-29 21:48:19 UTC (rev
2097)
@@ -18,7 +18,13 @@
kernel-module-s3cmci \
kernel-module-gta01-pm-bt \
kernel-module-gta01-pm-gps \
- kernel-module-gta01-pm-gsm"
+ kernel-module-gta01-pm-gsm \
+ kernel-module-snd-soc-neo1973-wm8753 \
+ kernel-module-snd-soc-smdk2440 \
+ kernel-module-vfat \
+ kernel-module-nls-iso8859-1 \
+ kernel-module-nls-cp437 \
+ "
MACHINE_TASK_PROVIDER = "task-base"
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-05-29 23:51:32 +0200 (Tue, 29 May 2007)
New Revision: 2098
Modified:
trunk/oe/packages/linux/linux-gta01.inc
trunk/oe/packages/linux/linux-gta01_2.6.20.10.bb
trunk/oe/packages/linux/linux-gta01_2.6.20.2.bb
trunk/oe/packages/linux/linux-gta01_2.6.20.3.bb
trunk/oe/packages/linux/linux-gta01_2.6.20.4.bb
trunk/oe/packages/linux/linux-gta01_2.6.20.5.bb
trunk/oe/packages/linux/linux-gta01_2.6.20.7.bb
trunk/oe/packages/linux/linux-gta01_2.6.21.1.bb
trunk/oe/packages/linux/linux-gta01_2.6.21.3.bb
Log:
oe/linux-gta01*: autoload kernel-module-snd-soc-neo1973-wm8753
Modified: trunk/oe/packages/linux/linux-gta01.inc
===================================================================
--- trunk/oe/packages/linux/linux-gta01.inc 2007-05-29 21:48:19 UTC (rev
2097)
+++ trunk/oe/packages/linux/linux-gta01.inc 2007-05-29 21:51:32 UTC (rev
2098)
@@ -40,8 +40,7 @@
#
module_autoload_ohci-hcd = "ohci-hcd"
module_autoload_g_ether = "g_ether"
-#module_autoload_snd-pcm-oss = "snd-pcm-oss"
-#module_autoload_snd-soc-corgi_c7x0 = "snd-soc-s3c24xx"
+module_autoload_snd-soc-neo1973-wm8753 = "snd-soc-neo1973-wm8753"
do_prepatch() {
mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.10.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.10.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.10.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http"
MOKOR = "moko9"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.20.10"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.2.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.2.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.2.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http"
MOKOR = "moko8"
-PR = "${MOKOR}-r2"
+PR = "${MOKOR}-r3"
VANILLA_VERSION = "2.6.20.2"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.3.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.3.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.3.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http"
MOKOR = "moko8"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.20.3"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.4.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.4.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.4.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -1,7 +1,7 @@
require linux-gta01.inc
MOKOR = "moko8"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.20.4"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.5.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.5.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.5.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http"
MOKOR = "moko8"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.20.5"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.7.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.7.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.7.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/branches/src/target/kernel/2.6.20.x;module=patches;proto=http"
MOKOR = "moko9"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.20.7"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.21.1.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.21.1.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.21.1.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http"
MOKOR = "moko10"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.21.1"
Modified: trunk/oe/packages/linux/linux-gta01_2.6.21.3.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.21.3.bb 2007-05-29 21:48:19 UTC
(rev 2097)
+++ trunk/oe/packages/linux/linux-gta01_2.6.21.3.bb 2007-05-29 21:51:32 UTC
(rev 2098)
@@ -3,7 +3,7 @@
SRC_URI +=
"svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http"
MOKOR = "moko10"
-PR = "${MOKOR}-r0"
+PR = "${MOKOR}-r1"
VANILLA_VERSION = "2.6.21.3"
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-05-30 10:15:38 +0200 (Wed, 30 May 2007)
New Revision: 2099
Modified:
trunk/src/target/OM-2007/openmoko-libs/ChangeLog
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
Log:
* libmokoui/moko-application.c:
* libmokoui/moko-application.h:
Remove moko_application_get_style_pixmap_dir()
* libmokoui/moko-finger-tool-box.c: (cb_configure): Don't use
moko_applicatoin_get_style_pixmap () as it uses some false assumptions.
Modified: trunk/src/target/OM-2007/openmoko-libs/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/ChangeLog 2007-05-29 21:51:32 UTC
(rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/ChangeLog 2007-05-30 08:15:38 UTC
(rev 2099)
@@ -1,3 +1,12 @@
+2007-05-30 Thomas Wood <[EMAIL PROTECTED]>
+
+ * libmokoui/moko-application.c:
+ * libmokoui/moko-application.h:
+ Remove moko_application_get_style_pixmap_dir()
+
+ * libmokoui/moko-finger-tool-box.c: (cb_configure): Don't use
+ moko_applicatoin_get_style_pixmap () as it uses some false assumptions.
+
2007-05-29 Thomas Wood <[EMAIL PROTECTED]>
Patch by: Neil J Patel <[EMAIL PROTECTED]>
Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.c
2007-05-30 08:15:38 UTC (rev 2099)
@@ -422,18 +422,6 @@
}
/**
- * moko_application_get_style_pixmap_dir:
- *
- * @returns the style pixmap directory
- * @note this is not necessarily $GTK_DATA_DIR/themes/$THEME_NAME/gtk-2.0/
- **/
-gchar* moko_application_get_style_pixmap_dir()
-{
- GtkStyle* style = gtk_rc_get_style_by_paths( gtk_settings_get_default(),
"GtkWidget", "GtkWidget", GTK_TYPE_WIDGET );
- return g_path_get_dirname(
style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL] );
-}
-
-/**
* moko_application_add_stock_icons:
*
* register a number of stock icons given by name
Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-application.h
2007-05-30 08:15:38 UTC (rev 2099)
@@ -53,7 +53,6 @@
GtkWidget* moko_application_get_main_window(MokoApplication* self);
void moko_application_add_window (MokoApplication *self, MokoWindow *window);
-gchar* moko_application_get_style_pixmap_dir();
void moko_application_add_stock_icons(MokoApplication* self, ...);
GtkWidget* moko_application_execute_dialog(MokoApplication* self, const gchar*
title, GtkWidget* contents);
Modified:
trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
2007-05-29 21:51:32 UTC (rev 2098)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
2007-05-30 08:15:38 UTC (rev 2099)
@@ -190,7 +190,14 @@
{
gchar *filename;
if (filename = style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL])
- priv->background_pixbuf = gdk_pixbuf_new_from_file(
style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL], NULL);
+ {
+ priv->background_pixbuf = gdk_pixbuf_new_from_file( filename, NULL);
+ if (!priv->background_pixbuf)
+ {
+ g_warning ("moko_finger_tool_box: could not load pixbuf for the
finger tool box: %s", filename);
+ return;
+ }
+ }
else
{
g_warning ("moko_finger_tool_box: theme does not specify a
background image for the finger tool box");
@@ -199,9 +206,6 @@
}
GdkPixbuf* pixbuf = gdk_pixbuf_scale_simple( priv->background_pixbuf,
a->width, a->height, GDK_INTERP_BILINEAR );
-
- if ( !priv->button_pixbuf )
- priv->button_pixbuf = gdk_pixbuf_new_from_file( g_build_filename(
moko_application_get_style_pixmap_dir(), "btn_type03.png", NULL ), NULL );
guint w = gdk_pixbuf_get_width( priv->button_pixbuf );
guint h = gdk_pixbuf_get_height( priv->button_pixbuf );
guint x = padding_left - 1;
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-05-30 11:24:01 +0200 (Wed, 30 May 2007)
New Revision: 2100
Modified:
trunk/oe/packages/openmoko-base/files/session
trunk/oe/packages/openmoko-base/openmoko-session_svn.bb
Log:
oe/openmoko-base: start openmoko-today instead of matchbox-desktop
Modified: trunk/oe/packages/openmoko-base/files/session
===================================================================
--- trunk/oe/packages/openmoko-base/files/session 2007-05-30 08:15:38 UTC
(rev 2099)
+++ trunk/oe/packages/openmoko-base/files/session 2007-05-30 09:24:01 UTC
(rev 2100)
@@ -2,13 +2,6 @@
SHOWCURSOR="no"
-matchbox-desktop --icon-size 96 \
- --icon-padding 60 \
- --font sans-16 \
- --titlefont sans-20:bold \
- --bg
img-tiled:/usr/share/themes/openmoko-standard/gtk-2.0/mokopanedwindow-upper-enclosing.png
&
-
-
matchbox-panel \
--start-applets=openmoko-panel-mainmenu,systray,openmoko-panel-startup \
--end-applets=openmoko-panel-battery,openmoko-panel-gsm,openmoko-panel-gps,openmoko-panel-usb,openmoko-panel-bt,openmoko-panel-clock
&
@@ -17,6 +10,8 @@
mbinputmgr &
openmoko-footer &
+openmoko-today --desktop &
openmoko-dialer &
+
exec matchbox-window-manager -use_titlebar no -use_cursor $SHOWCURSOR $@
Modified: trunk/oe/packages/openmoko-base/openmoko-session_svn.bb
===================================================================
--- trunk/oe/packages/openmoko-base/openmoko-session_svn.bb 2007-05-30
08:15:38 UTC (rev 2099)
+++ trunk/oe/packages/openmoko-base/openmoko-session_svn.bb 2007-05-30
09:24:01 UTC (rev 2100)
@@ -1,8 +1,8 @@
DESCRIPTION = "Matchbox session files for OpenMoko"
SECTION = "openmoko/base"
RDEPENDS = "matchbox-panel-2 matchbox-wm gconf"
-PV = "0.0+svn${SRCDATE}"
-PR = "r10"
+PV = "0.1+svn${SRCDATE}"
+PR = "r0"
inherit openmoko-base
@@ -24,6 +24,5 @@
exit 1
fi
-#FIXME might add openmoko theme here as default!?
-#gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults
--direct --type string --set /desktop/openmoko/interface/theme Clearlooks
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults
--direct --type string --set /desktop/openmoko/interface/theme openmoko-standard
}
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-05-30 11:28:23 +0200 (Wed, 30 May 2007)
New Revision: 2101
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.h
Log:
Patch by: Neil J Patel <[EMAIL PROTECTED]>
* Cleans up code to have only one function to insert entries into the
list-store.
* Adds a 'sorting' model on top of the filtered model, so that entries
are sorted from most recent first.
* Pressing the delete key on a number will popup a dialog asking if you
are sure you want to delete the call.
* Deleting will also delete form the MokoJournal.
* Changed the delete function to work with the new sorted model.
* The call button will now initiate a call.
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
2007-05-30 09:24:01 UTC (rev 2100)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.c
2007-05-30 09:28:23 UTC (rev 2101)
@@ -21,6 +21,7 @@
#include <libmokoui/moko-finger-wheel.h>
#include <libmokoui/moko-pixmap-button.h>
#include <libmokojournal/moko-journal.h>
+#include <libmokoui/moko-ui.h>
#include <gtk/gtk.h>
#include <string.h>
@@ -30,6 +31,7 @@
#include "dialer-main.h"
#include "moko-dialer-status.h"
#include "dialer-window-history.h"
+#include "dialer-window-outgoing.h"
/* call types */
typedef enum {
@@ -203,13 +205,20 @@
cb_tool_button_history_delete_clicked (GtkButton * button,
MokoDialerData * appdata)
{
+ GtkWidget *dialog;
GtkTreeIter iter; //iter of the filter store
- GtkTreeIter iter0; //iter of the back store
+ GtkTreeIter iter0;
+ GtkTreeIter iter1; //iter of the back store
GtkTreeModel *model;
GtkTreeModel *model0;
+ GtkTreeModel *model1;
GtkTreeSelection *selection;
GtkTreeView *treeview;
GtkTreePath *path;
+ MokoJournalEntry *entry = NULL;
+ const gchar *uid;
+ gint result = 0;
+
treeview = GTK_TREE_VIEW (appdata->treeview_history);
selection = gtk_tree_view_get_selection (treeview);
@@ -218,29 +227,54 @@
{
return;
}
-
- /*if (appdata->g_currentselected)
+
+ gtk_tree_model_get (model, &iter, HISTORY_ENTRY_POINTER, &entry, -1);
+
+ if (!(uid = moko_journal_entry_get_uid (entry)))
{
- DBG_MESSAGE ("to delete %s", appdata->g_currentselected->number);
- history_delete_entry (&(appdata->g_historylist),
- appdata->g_currentselected);
- }*/
+ g_print ("Unable to get entry\n");
+ return;
+ }
+ /* We need to show a dialog to make sure this is what the user wants */
+ dialog = moko_message_dialog_new ();
+
+ moko_message_dialog_set_message (MOKO_MESSAGE_DIALOG (dialog),
+ "%s",
+ "Are you sure you want to permenantly remove this
call?");
+ moko_message_dialog_set_image_from_stock (MOKO_MESSAGE_DIALOG (dialog),
+ GTK_STOCK_DIALOG_QUESTION);
+
+ gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+ "Don't Delete", GTK_RESPONSE_CANCEL,
+ GTK_STOCK_DELETE, GTK_RESPONSE_YES,
+ NULL);
+ result = gtk_dialog_run (GTK_DIALOG (dialog));
+ switch (result) {
+ case GTK_RESPONSE_YES:
+ break;
+ default:
+ gtk_widget_destroy (dialog);
+ break;
+ }
+
+ /* Remove the entry from the journal & commit the change */
+ if (moko_journal_remove_entry_by_uid (appdata->journal, uid))
+ moko_journal_write_to_storage (appdata->journal);
+
+
+ /* The user wants to delete, so delete */
path = gtk_tree_model_get_path (model, &iter);
-
-
- model0 = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
-
-
- gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER
- (model), &iter0, &iter);
-
+ model1 = gtk_tree_model_filter_get_model (GTK_TREE_MODEL_FILTER (model));
+
gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(model),
+ &iter1, &iter);
+ model0 = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (model1));
+ gtk_tree_model_sort_convert_iter_to_child_iter(GTK_TREE_MODEL_SORT(model1),
+ &iter0, &iter1);
+
gtk_list_store_remove (GTK_LIST_STORE (model0), &iter0);
-
-
gtk_tree_view_set_cursor (treeview, path, 0, 0);
-
-
+
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
{
if (!gtk_tree_path_prev (path))
@@ -258,7 +292,8 @@
}
gtk_tree_path_free (path);
-
+ gtk_widget_destroy (dialog);
+
return;
DBG_ENTER ();
@@ -268,10 +303,27 @@
cb_tool_button_history_call_clicked (GtkButton * button,
MokoDialerData * appdata)
{
- DBG_ENTER ();
+ GtkTreeSelection *selection;
+ GtkTreeView *treeview;
+ GtkTreeIter iter;
+ GtkTreeModel *model;
+ gchar *number;
+
+ treeview = GTK_TREE_VIEW (appdata->treeview_history);
+ selection = gtk_tree_view_get_selection (treeview);
+ model = gtk_tree_view_get_model (treeview);
-
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ {
+ return;
+ }
+
+ gtk_tree_model_get (model, &iter, HISTORY_NUMBER_COLUMN, &number, -1);
+
+ window_outgoing_dial (appdata, number);
+
+ g_free (number);
}
static void
@@ -582,7 +634,73 @@
}
+static gboolean
+history_add_entry (GtkListStore *store, MokoJournalEntry *j_entry)
+{
+ const gchar *uid, *number;
+ gchar *icon_name;
+ const gchar *display_text;
+ time_t dstart;
+ enum MessageDirection direction;
+ gboolean was_missed;
+ const MokoTime *time;
+ MokoJournalVoiceInfo *info = NULL;
+ CallFilter type;
+
+ /* We're not interested in anything other than voice entrys */
+ if (moko_journal_entry_get_type (j_entry) != VOICE_JOURNAL_ENTRY)
+ {
+ return FALSE;
+ }
+
+ uid = moko_journal_entry_get_contact_uid (j_entry);
+ moko_journal_entry_get_direction (j_entry, &direction);
+ time = moko_journal_entry_get_dtstart (j_entry);
+ dstart = moko_time_as_timet (time);
+ moko_journal_entry_get_voice_info (j_entry, &info);
+ was_missed = moko_journal_voice_info_get_was_missed (info);
+ number = moko_journal_voice_info_get_distant_number (info);
+
+ /* If the number is null, the number may have been stored in the summary*/
+ if (strcmp (number, "NULL") == 0)
+ number = moko_journal_entry_get_summary (j_entry);
+
+ /* Load the correct icon */
+ if (direction == DIRECTION_OUT)
+ {
+ icon_name = HISTORY_CALL_OUTGOING_ICON;
+ type = OUTGOING;
+ }
+ else
+ {
+ if (was_missed)
+ {
+ icon_name = HISTORY_CALL_MISSED_ICON;
+ type = MISSED;
+ }
+ else
+ {
+ icon_name = HISTORY_CALL_INCOMING_ICON;
+ type = INCOMING;
+ }
+ }
+ /* display text should be either the contact name, or the number if the
+ * contact name is not know */
+ /* FIXME: look up uid */
+ display_text = number;
+
+ gtk_list_store_insert_with_values (store, NULL, 0,
+ HISTORY_NUMBER_COLUMN, number,
+ HISTORY_DSTART_COLUMN, dstart,
+ HISTORY_ICON_NAME_COLUMN, icon_name,
+ HISTORY_DISPLAY_TEXT_COLUMN, display_text,
+ HISTORY_CALL_TYPE_COLUMN, type,
+ HISTORY_ENTRY_POINTER, (gpointer)j_entry,
+ -1);
+ return TRUE;
+}
+
/**
* @brief find the treeview in the window, fill-in the data and show it on the
screen.
*
@@ -599,16 +717,15 @@
history_build_history_list_view (MokoDialerData * p_dialer_data)
{
GtkListStore *list_store;
-
+ GtkTreeModel *sorted;
GtkTreeViewColumn *col;
GtkCellRenderer *renderer;
-
GtkWidget *contactview = NULL;
-
+ int i = 0, j =0;
+ MokoJournalEntry *j_entry;
//DBG_ENTER();
//DBG_TRACE();
- //p_dialer_data->g_history_filter_type = ALL;
contactview = p_dialer_data->treeview_history;
if (contactview == NULL)
@@ -620,48 +737,52 @@
renderer = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (col, renderer, FALSE);
gtk_tree_view_column_set_attributes (col, renderer,
- "icon-name", HISTORY_ICON_NAME_COLUMN,
NULL);
+ "icon-name", HISTORY_ICON_NAME_COLUMN,
+ NULL);
renderer = gtk_cell_renderer_text_new ();
gtk_tree_view_column_pack_start (col, renderer, TRUE);
gtk_tree_view_column_set_attributes (col, renderer,
- "text", HISTORY_DISPLAY_TEXT_COLUMN,
NULL);
+ "text", HISTORY_DISPLAY_TEXT_COLUMN,
+ NULL);
gtk_tree_view_append_column (GTK_TREE_VIEW (contactview), col);
/* Set up a list store for the history items */
/* UID, DSTART, MISSED, DIRECTION */
- list_store = gtk_list_store_new (5, G_TYPE_STRING,
+ list_store = gtk_list_store_new (6, G_TYPE_STRING,
G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_STRING,
- G_TYPE_INT);
+ G_TYPE_INT,
+ G_TYPE_POINTER);
p_dialer_data->g_list_store = list_store;
-
+
+ /* We setup the sorting model */
+ sorted = gtk_tree_model_sort_new_with_model (GTK_TREE_MODEL (list_store));
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (sorted),
+ HISTORY_DSTART_COLUMN,
+ GTK_SORT_DESCENDING);
+
/* We setup the default filter */
p_dialer_data->g_history_filter_type = ALL;
//we will use a filter to facilitate the filtering in treeview without
rebuilding the database. p_dialer_data->g_list_store_filter =
p_dialer_data->g_list_store_filter =
- gtk_tree_model_filter_new (GTK_TREE_MODEL (list_store), NULL);
+ gtk_tree_model_filter_new (GTK_TREE_MODEL (sorted), NULL);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER
(p_dialer_data->
g_list_store_filter),
history_view_filter_visible_function,
p_dialer_data, NULL);
- //load the three icons to memory.
gtk_tree_view_set_model (GTK_TREE_VIEW (contactview),
GTK_TREE_MODEL (p_dialer_data->
g_list_store_filter));
- /* add the initial contents of the list store */
- int i = 0;
- MokoJournalEntry *j_entry;
-
/* if there aren't any entries in the journal, we don't need to do any more
* here
*/
@@ -684,71 +805,16 @@
while (moko_journal_get_entry_at (p_dialer_data->journal, i, &j_entry))
{
- const gchar *uid, *number;
- gchar *icon_name;
- const gchar *display_text;
- time_t dstart;
- enum MessageDirection direction;
- gboolean was_missed;
- const MokoTime *time;
- MokoJournalVoiceInfo *info = NULL;
- CallFilter type;
-
/* We're not interested in anything other than voice entrys */
if (moko_journal_entry_get_type (j_entry) != VOICE_JOURNAL_ENTRY)
{
i++;
continue;
}
-
- uid = moko_journal_entry_get_contact_uid (j_entry);
- moko_journal_entry_get_direction (j_entry, &direction);
- time = moko_journal_entry_get_dtstart (j_entry);
- dstart = moko_time_as_timet (time);
- moko_journal_entry_get_voice_info (j_entry, &info);
- was_missed = moko_journal_voice_info_get_was_missed (info);
- number = moko_journal_voice_info_get_distant_number (info);
-
- /* If the number is null, the number may have been stored in the summary*/
- if (strcmp (number, "NULL") == 0)
- number = moko_journal_entry_get_summary (j_entry);
-
- /* Load the correct icon */
- if (direction == DIRECTION_OUT)
- {
- icon_name = HISTORY_CALL_OUTGOING_ICON;
- type = OUTGOING;
- }
- else
- {
- if (was_missed)
- {
- icon_name = HISTORY_CALL_MISSED_ICON;
- type = MISSED;
- }
- else
- {
- icon_name = HISTORY_CALL_INCOMING_ICON;
- type = INCOMING;
- }
- }
- /* display text should be either the contact name, or the number if the
- * contact name is not know */
- /* FIXME: look up uid */
- display_text = number;
-
- gtk_list_store_insert_with_values (list_store, NULL, 0,
- HISTORY_NUMBER_COLUMN, number,
- HISTORY_DSTART_COLUMN, dstart,
- HISTORY_ICON_NAME_COLUMN, icon_name,
- HISTORY_DISPLAY_TEXT_COLUMN, display_text,
- HISTORY_CALL_TYPE_COLUMN, type,
- -1);
+ if (history_add_entry (list_store, j_entry))
+ j++;
i++;
}
-
-
-
return 1;
}
@@ -913,69 +979,18 @@
MokoDialerData * p_dialer_data)
{
GtkListStore *list_store;
- const gchar *uid, *number;
- gchar *icon_name;
- const gchar *display_text;
- time_t dstart;
- enum MessageDirection direction;
- gboolean was_missed;
- const MokoTime *time;
- MokoJournalVoiceInfo *info = NULL;
- CallFilter type;
g_return_if_fail (p_dialer_data);
+
/* We're not interested in anything other than voice entrys */
if (moko_journal_entry_get_type (j_entry) != VOICE_JOURNAL_ENTRY)
{
return;
}
+
/* Get the list store*/
list_store = p_dialer_data->g_list_store;
-
- uid = moko_journal_entry_get_contact_uid (j_entry);
- moko_journal_entry_get_direction (j_entry, &direction);
- time = moko_journal_entry_get_dtstart (j_entry);
- dstart = moko_time_as_timet (time);
- moko_journal_entry_get_voice_info (j_entry, &info);
- was_missed = moko_journal_voice_info_get_was_missed (info);
- number = moko_journal_voice_info_get_distant_number (info);
-
- /* If the number is null, the number may have been stored in the summary*/
- if (strcmp (number, "NULL") == 0)
- number = moko_journal_entry_get_summary (j_entry);
-
- /* Load the correct icon */
- if (direction == DIRECTION_OUT)
- {
- icon_name = HISTORY_CALL_OUTGOING_ICON;
- type = OUTGOING;
- }
- else
- {
- if (was_missed)
- {
- icon_name = HISTORY_CALL_MISSED_ICON;
- type = MISSED;
- }
- else
- {
- icon_name = HISTORY_CALL_INCOMING_ICON;
- type = INCOMING;
- }
- }
-
- /* display text should be either the contact name, or the number if the
- * contact name is not know */
- /* FIXME: look up uid */
- display_text = number;
-
- gtk_list_store_insert_with_values (list_store, NULL, 0,
- HISTORY_NUMBER_COLUMN, number,
- HISTORY_DSTART_COLUMN, dstart,
- HISTORY_ICON_NAME_COLUMN, icon_name,
- HISTORY_DISPLAY_TEXT_COLUMN, display_text,
- HISTORY_CALL_TYPE_COLUMN, type,
- -1);
+ history_add_entry (list_store, j_entry);
}
Modified:
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.h
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.h
2007-05-30 09:24:01 UTC (rev 2100)
+++
trunk/src/target/OM-2007/applications/openmoko-dialer/src/dialer-window-history.h
2007-05-30 09:28:23 UTC (rev 2101)
@@ -25,7 +25,8 @@
HISTORY_DSTART_COLUMN, /* call time, used for sorting */
HISTORY_ICON_NAME_COLUMN, /* icon name for display */
HISTORY_DISPLAY_TEXT_COLUMN, /* name or number for display */
- HISTORY_CALL_TYPE_COLUMN /* Used for identifying the type of call */
+ HISTORY_CALL_TYPE_COLUMN, /* Used for identifying the type of call */
+ HISTORY_ENTRY_POINTER /* needed for deletes */
};
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog