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. r3069 - in
      trunk/src/target/OM-2007.2/libraries/moko-gtk-engine: . src
      ([EMAIL PROTECTED])
   2. r3070 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   3. r3071 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
   4. r3072 - in
      trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: chris
Date: 2007-10-02 12:05:14 +0200 (Tue, 02 Oct 2007)
New Revision: 3069

Modified:
   trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog
   trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ltmain.sh
   trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c
Log:
Add 16-bit dithering for gradients


Modified: trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog      
2007-10-02 09:59:43 UTC (rev 3068)
+++ trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ChangeLog      
2007-10-02 10:05:14 UTC (rev 3069)
@@ -1,3 +1,8 @@
+2007-10-02  Chris Lord  <[EMAIL PROTECTED]>
+
+       * src/moko-draw.c: (moko_dither16), (moko_gradient):
+       Add 16-bit dithering for gradients
+
 2007-09-21  Thomas Wood  <[EMAIL PROTECTED]>
 
        * data/gtkrc: Add some gradient and border options to styles

Modified: trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ltmain.sh
===================================================================
--- trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ltmain.sh      
2007-10-02 09:59:43 UTC (rev 3068)
+++ trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/ltmain.sh      
2007-10-02 10:05:14 UTC (rev 3069)
@@ -1,8 +1,8 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun configure.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007  Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <[EMAIL PROTECTED]>, 1996
 #
 # This program is free software; you can redistribute it and/or modify
@@ -43,8 +43,8 @@
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
+TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
 
 # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
@@ -57,6 +57,8 @@
 else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
@@ -114,10 +116,10 @@
 for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 do
   eval "if test \"\${$lt_var+set}\" = set; then
-         save_$lt_var=\$$lt_var
-         $lt_var=C
-         export $lt_var
-       fi"
+         save_$lt_var=\$$lt_var
+         $lt_var=C
+         export $lt_var
+       fi"
 done
 
 # Make sure IFS has a sensible default
@@ -206,7 +208,13 @@
     if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
       $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
       win32_nmres=`eval $NM -f posix -A $1 | \
-       $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
+       $SED -n -e '1,100{
+               / I /{
+                       s,.*,import,
+                       p
+                       q
+                       }
+               }'`
       case $win32_nmres in
       import*)  win32_libid_type="x86 archive import";;
       *)        win32_libid_type="x86 archive static";;
@@ -340,11 +348,11 @@
       my_xlib_u=$my_xlib
       while :; do
         case " $extracted_archives " in
-       *" $my_xlib_u "*)
-         extracted_serial=`expr $extracted_serial + 1`
-         my_xlib_u=lt$extracted_serial-$my_xlib ;;
-       *) break ;;
-       esac
+       *" $my_xlib_u "*)
+         extracted_serial=`expr $extracted_serial + 1`
+         my_xlib_u=lt$extracted_serial-$my_xlib ;;
+       *) break ;;
+       esac
       done
       extracted_archives="$extracted_archives $my_xlib_u"
       my_xdir="$my_gentop/$my_xlib_u"
@@ -474,11 +482,12 @@
     ;;
 
   --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  
There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE."
+    echo "\
+$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
+
+Copyright (C) 2007  Free Software Foundation, Inc.
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     exit $?
     ;;
 
@@ -775,7 +784,7 @@
     *.class) xform=class ;;
     *.cpp) xform=cpp ;;
     *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
+    *.[fF][09]?) xform=[fF][09]. ;;
     *.for) xform=for ;;
     *.java) xform=java ;;
     *.obj) xform=obj ;;
@@ -1160,8 +1169,8 @@
     do
       case $arg in
       -all-static | -static | -static-libtool-libs)
-    case $arg in
-    -all-static)
+       case $arg in
+       -all-static)
          if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; 
then
            $echo "$modename: warning: complete static linking is impossible in 
this configuration" 1>&2
          fi
@@ -1170,19 +1179,19 @@
          fi
          prefer_static_libs=yes
          ;;
-    -static)
+       -static)
          if test -z "$pic_flag" && test -n "$link_static_flag"; then
            dlopen_self=$dlopen_self_static
          fi
          prefer_static_libs=built
          ;;
-    -static-libtool-libs)
-      if test -z "$pic_flag" && test -n "$link_static_flag"; then
-        dlopen_self=$dlopen_self_static
-      fi
-      prefer_static_libs=yes
-      ;;
-    esac
+       -static-libtool-libs)
+         if test -z "$pic_flag" && test -n "$link_static_flag"; then
+           dlopen_self=$dlopen_self_static
+         fi
+         prefer_static_libs=yes
+         ;;
+       esac
        build_libtool_libs=no
        build_old_libs=yes
        break
@@ -1630,7 +1639,7 @@
        continue
        ;;
 
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
        compiler_flags="$compiler_flags $arg"
        compile_command="$compile_command $arg"
        finalize_command="$finalize_command $arg"
@@ -1650,10 +1659,11 @@
       # -m* pass through architecture-specific compiler args for GCC
       # -m*, -t[45]*, -txscale* pass through architecture-specific
       # compiler args for GCC
-      # -pg pass through profiling flag for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
       # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
 
        # Unknown arguments in both finalize_command and compile_command need
        # to be aesthetically quoted because they are evaled later.
@@ -1681,9 +1691,9 @@
 
       -no-install)
        case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
          # The PATH hackery in wrapper scripts is required on Windows
-         # in order for the loader to find any dlls it needs.
+         # and Darwin in order for the loader to find any dlls it needs.
          $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
          $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
          fast_install=no
@@ -2112,7 +2122,10 @@
        case $pass in
        dlopen) libs="$dlfiles" ;;
        dlpreopen) libs="$dlprefiles" ;;
-       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+       link)
+         libs="$deplibs %DEPLIBS%"
+         test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+         ;;
        esac
       fi
       if test "$pass" = dlopen; then
@@ -2124,7 +2137,7 @@
        lib=
        found=no
        case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+       
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
          if test "$linkmode,$pass" = "prog,link"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"
@@ -2520,9 +2533,9 @@
 
        if test "$linkmode,$pass" = "prog,link"; then
          if test -n "$library_names" &&
-         { { test "$prefer_static_libs" = no ||
-             test "$prefer_static_libs,$installed" = "built,yes"; } ||
-           test -z "$old_library"; }; then
+            { { test "$prefer_static_libs" = no ||
+                test "$prefer_static_libs,$installed" = "built,yes"; } ||
+              test -z "$old_library"; }; then
            # We need to hardcode the library path
            if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
              # Make sure the rpath contains only unique directories.
@@ -3229,10 +3242,16 @@
            age="0"
            ;;
          irix|nonstopux)
-           current=`expr $number_major + $number_minor - 1`
+           current=`expr $number_major + $number_minor`
            age="$number_minor"
            revision="$number_minor"
+           lt_irix_increment=no
            ;;
+         *)
+           $echo "$modename: unknown library version type \`$version_type'" 
1>&2
+           $echo "Fatal configuration error.  See the $PACKAGE docs for more 
information." 1>&2
+           exit $EXIT_FAILURE
+           ;;
          esac
          ;;
        no)
@@ -3290,7 +3309,8 @@
          versuffix="$major.$age.$revision"
          # Darwin ld doesn't like 0 for these options...
          minor_current=`expr $current + 1`
-         verstring="${wl}-compatibility_version ${wl}$minor_current 
${wl}-current_version ${wl}$minor_current.$revision"
+         xlcverstring="${wl}-compatibility_version ${wl}$minor_current 
${wl}-current_version ${wl}$minor_current.$revision"
+         verstring="-compatibility_version $minor_current -current_version 
$minor_current.$revision"
          ;;
 
        freebsd-aout)
@@ -3304,8 +3324,11 @@
          ;;
 
        irix | nonstopux)
-         major=`expr $current - $age + 1`
-
+         if test "X$lt_irix_increment" = "Xno"; then
+           major=`expr $current - $age`
+         else
+           major=`expr $current - $age + 1`
+         fi
          case $version_type in
            nonstopux) verstring_prefix=nonstopux ;;
            *)         verstring_prefix=sgi ;;
@@ -3442,11 +3465,11 @@
       fi
 
       # Eliminate all temporary directories.
-#      for path in $notinst_path; do
-#      lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-#      deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-#      dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % 
%g"`
-#      done
+      #for path in $notinst_path; do
+      #        lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% 
$path % %g"`
+      #        deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
+      #        dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% 
-L$path % %g"`
+      #done
 
       if test -n "$xrpath"; then
        # If the user specified any rpath flags, then add them.
@@ -3547,7 +3570,7 @@
          int main() { return 0; }
 EOF
          $rm conftest
-      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+         if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
            ldd_output=`ldd conftest`
            for i in $deplibs; do
              name=`expr $i : '-l\(.*\)'`
@@ -3909,7 +3932,10 @@
             test -n "$hardcode_libdirs"; then
            libdir="$hardcode_libdirs"
            if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+             case $archive_cmds in
+             *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
+             *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
+             esac
            else
              eval dep_rpath=\"$hardcode_libdir_flag_spec\"
            fi
@@ -4275,7 +4301,7 @@
       if test -n "$convenience"; then
        if test -n "$whole_archive_flag_spec"; then
          eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | 
$Xsed -e 's|,| |g'`
+         reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | 
$Xsed -e 's|,| |g'`
        else
          gentop="$output_objdir/${obj}x"
          generated="$generated $gentop"
@@ -5295,6 +5321,8 @@
 else
   case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -6391,8 +6419,10 @@
        if test -f "$dir/$objdir/$dlname"; then
          dir="$dir/$objdir"
        else
-         $echo "$modename: cannot find \`$dlname' in \`$dir' or 
\`$dir/$objdir'" 1>&2
-         exit $EXIT_FAILURE
+         if test ! -f "$dir/$dlname"; then
+           $echo "$modename: cannot find \`$dlname' in \`$dir' or 
\`$dir/$objdir'" 1>&2
+           exit $EXIT_FAILURE
+         fi
        fi
        ;;
 
@@ -6458,12 +6488,11 @@
       # Restore saved environment variables
       for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
       do
-       eval "if test \"\${save_$lt_var+set}\" = set; then
-               $lt_var=\$save_$lt_var; export $lt_var
-             fi"
+       eval "if test \"\${save_$lt_var+set}\" = set; then
+               $lt_var=\$save_$lt_var; export $lt_var
+             fi"
       done
 
-
       # Now prepare to actually exec the command.
       exec_cmd="\$cmd$args"
     else

Modified: trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c
===================================================================
--- trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c        
2007-10-02 09:59:43 UTC (rev 3068)
+++ trunk/src/target/OM-2007.2/libraries/moko-gtk-engine/src/moko-draw.c        
2007-10-02 10:05:14 UTC (rev 3069)
@@ -48,13 +48,57 @@
   return new_gc;
 }
 
+/*
+ * moko_dither16:
+ * @dither: An 18x1, 1-bit pixmap
+ * @gc: The gc that needs to be dithered
+ * @gcd: A gc for @dither
+ * @c1: The intended colour
+ * @i: Any random number
+ *
+ * Calculates and sets the dither colour and pattern for a 16-bit drawable,
+ * given a 32-bit colour.
+ */
 static void
+moko_dither16 (GdkPixmap *dither, GdkGC *gc, GdkGC *gcd, GdkColor *c1, gint i)
+{
+  gint sum, x;
+  GdkColor c1d;
+  /* Assuming 565, so see how much of the colour is ignored and use that
+  * to decide on the dithering colour/pattern.
+  */
+  c1d.red = c1->red & 0x700;
+  c1d.green = c1->green & 0x300;
+  c1d.blue = c1->blue & 0x700;
+
+  sum = (c1d.red + c1d.green + c1d.blue) >> 8;
+  gdk_gc_set_function (gcd, GDK_SET);
+  gdk_draw_rectangle (dither, gcd, TRUE, 0, 0, 17, 1);
+  gdk_gc_set_function (gcd, GDK_CLEAR);
+  for (x = 0; x < sum; x ++) {
+    gdk_draw_point (dither, gcd, ((x+i) * 11) % 18, 0);
+  }
+
+  c1d.red = c1->red + 0x800;
+  c1d.green = c1->green + 0x400;
+  c1d.blue = c1->blue + 0x800;
+  if (c1d.red < c1->red) c1d.red = 0xFF00;
+  if (c1d.green < c1->green) c1d.green = 0xFF00;
+  if (c1d.blue < c1->blue) c1d.blue = 0xFF00;
+  gdk_gc_set_rgb_bg_color (gc, &c1d);
+
+  gdk_gc_set_fill (gc, GDK_OPAQUE_STIPPLED);
+  gdk_gc_set_stipple (gc, dither);
+}
+
+static void
 moko_gradient (GtkStyle * style, GdkWindow * window, GtkStateType state_type,
               gint x, gint y, gint width, gint height)
 {
-  gint i, rd, gd, bd;          /* rd, gd, bd - change in r g and b for 
gradient */
-  GdkColor c1, c2, c3, c4;
-  GdkGC *gc;
+  gint i, rd, gd, bd, depth;           /* rd, gd, bd - change in r g and b for 
gradient */
+  GdkColor c1, c2, c3, c4, c1d, c3d;
+  GdkPixmap *dither;
+  GdkGC *gc, *gcd;
   gc = gdk_gc_new (window);
 
   /* get the start and end colours */
@@ -67,6 +111,12 @@
   gdk_gc_set_line_attributes (gc, 1, GDK_LINE_SOLID, GDK_CAP_BUTT,
                              GDK_JOIN_MITER);
 
+  /* Get the drawable pixel depth, for dithering */
+  depth = gdk_drawable_get_depth (window);
+  if (depth == 16) {
+         dither = gdk_pixmap_new (NULL, 18, 1, 1);
+         gcd = gdk_gc_new (dither);
+  }
 
   /*** First Gradient ***/
   /* calculate the delta values */
@@ -79,6 +129,10 @@
   while (i < height / 2)
   {
     gdk_gc_set_rgb_fg_color (gc, &c1);
+    /* TODO: Handle 15-bit colour */
+    if (depth == 16) {
+      moko_dither16 (dither, gc, gcd, &c1, i);
+    }
     gdk_draw_line (window, gc, x, y + i, x + width, y + i);
     c1.red -= rd;
     c1.blue -= bd;
@@ -95,6 +149,9 @@
   i = height / 2;
   while (i < height)
   {
+    if (depth == 16) {
+      moko_dither16 (dither, gc, gcd, &c3, i);
+    }
     gdk_gc_set_rgb_fg_color (gc, &c3);
     gdk_draw_line (window, gc, x, y + i, x + width, y + i);
     c3.red -= rd;
@@ -103,7 +160,13 @@
     i++;
   }
 
+  g_object_unref (gc);
 
+  if (depth == 16) {
+    g_object_unref (gcd);
+    g_object_unref (dither);
+  }
+
 }
 
 static void




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-02 12:44:07 +0200 (Tue, 02 Oct 2007)
New Revision: 3070

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
Patch by: Roman Moravcik <[EMAIL PROTECTED]>

* src/moko-dialer.c: (moko_dialer_init): Fix the loading of moko journal,
  (on_talking_reject_call): Write journal to storage after call is rejected,
  (on_keypad_dial_clicked): Outgoing call had set wrong journal direction.


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:05:14 UTC (rev 3069)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:44:07 UTC (rev 3070)
@@ -1,5 +1,16 @@
 2007-10-02  Thomas Wood  <[EMAIL PROTECTED]>
 
+       Patch by: Roman Moravcik <[EMAIL PROTECTED]>
+
+       * src/moko-dialer.c: (moko_dialer_init):
+         Fix the loading of moko journal
+       (on_talking_reject_call):
+         Write journal to storage after call is rejected
+       (on_keypad_dial_clicked): Outgoing call had set wrong journal
+       direction.
+
+2007-10-02  Thomas Wood  <[EMAIL PROTECTED]>
+
        * src/moko-keypad.c:
        * src/moko-keypad.h: Add moko_keypad_set_display_text()
 

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-10-02 10:05:14 UTC (rev 3069)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-10-02 10:44:07 UTC (rev 3070)
@@ -286,7 +286,7 @@
   {
     priv->entry = moko_journal_entry_new (VOICE_JOURNAL_ENTRY);
     priv->time = moko_time_new_today ();
-    moko_journal_entry_set_direction (priv->entry, DIRECTION_IN);
+    moko_journal_entry_set_direction (priv->entry, DIRECTION_OUT);
     moko_journal_entry_set_dtstart (priv->entry, priv->time);
     moko_journal_entry_set_source (priv->entry, "Openmoko Dialer");
     moko_journal_voice_info_set_distant_number (priv->entry, number);
@@ -387,6 +387,7 @@
   {
     moko_journal_voice_info_set_was_missed (priv->entry, TRUE);
     moko_journal_add_entry (priv->journal, priv->entry);
+    moko_journal_write_to_storage (priv->journal);
     priv->entry = NULL;
     priv->time = NULL;
   }
@@ -834,7 +835,7 @@
 
   /* Set up the journal */
   priv->journal = moko_journal_open_default ();
-  if (!priv->journal || moko_journal_load_from_storage (priv->journal))
+  if (!priv->journal || !moko_journal_load_from_storage (priv->journal))
   {
     g_warning ("Cannot load journal");
     priv->journal = NULL;




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-02 12:47:05 +0200 (Tue, 02 Oct 2007)
New Revision: 3071

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
Log:
Patch by: Roman Moravcik <[EMAIL PROTECTED]>

* src/moko-dialer.c: (on_keypad_dial_clicked), (on_incoming_call),
  (on_network_registered): Store network information (LocationAreaCode,
  CellID) in moko journal.


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:44:07 UTC (rev 3070)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:47:05 UTC (rev 3071)
@@ -2,6 +2,14 @@
 
        Patch by: Roman Moravcik <[EMAIL PROTECTED]>
 
+       * src/moko-dialer.c: (on_keypad_dial_clicked), (on_incoming_call),
+         (on_network_registered): Store network information (LocationAreaCode,
+         CellID) in moko journal.
+
+2007-10-02  Thomas Wood  <[EMAIL PROTECTED]>
+
+       Patch by: Roman Moravcik <[EMAIL PROTECTED]>
+
        * src/moko-dialer.c: (moko_dialer_init):
          Fix the loading of moko journal
        (on_talking_reject_call):

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-10-02 10:44:07 UTC (rev 3070)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-dialer.c  
2007-10-02 10:47:05 UTC (rev 3071)
@@ -71,6 +71,7 @@
   /* Registration variables */
   guint               reg_timeout;
   MokoGsmdConnectionNetregType registered;
+  MokoGSMLocation     gsm_location;
 };
 
 enum
@@ -289,6 +290,7 @@
     moko_journal_entry_set_direction (priv->entry, DIRECTION_OUT);
     moko_journal_entry_set_dtstart (priv->entry, priv->time);
     moko_journal_entry_set_source (priv->entry, "Openmoko Dialer");
+    moko_journal_entry_set_gsm_location (priv->entry, &priv->gsm_location);
     moko_journal_voice_info_set_distant_number (priv->entry, number);
     if (entry && entry->contact->uid)
       moko_journal_entry_set_contact_uid (priv->entry, entry->contact->uid);
@@ -479,6 +481,8 @@
     case MOKO_GSMD_CONNECTION_NETREG_ROAMING:
       g_debug ("NetReg: Network registered");
       g_debug ("\tLocationAreaCode = %x\n\tCellID = %x", lac, cell);
+      priv->gsm_location.lac = lac;
+      priv->gsm_location.cid = cell;
       g_source_remove (priv->reg_timeout);
       break;
     default:
@@ -513,6 +517,7 @@
     moko_journal_entry_set_direction (priv->entry, DIRECTION_IN);
     moko_journal_entry_set_dtstart (priv->entry, priv->time);
     moko_journal_entry_set_source (priv->entry, "Openmoko Dialer");
+    moko_journal_entry_set_gsm_location (priv->entry, &priv->gsm_location);
   }
   /* Set up the user interface */
   moko_talking_incoming_call (MOKO_TALKING (priv->talking), NULL, NULL);




--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-10-02 12:58:14 +0200 (Tue, 02 Oct 2007)
New Revision: 3072

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
Log:
Patch by: Roman Moravcik <[EMAIL PROTECTED]>

* src/moko-history.c: (moko_history_load_entries): History list wasn't
corectly filled with moko journal entries,
(on_delete_clicked), (history_add_entry): Function
 moko_journal_remove_entry_by_uid need uid value instead of contact_uid,
(history_add_entry): Replace phone number with name of contact if there 
is a entry in addressbook. Display "Unknown number" if phone number is
NULL.


Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:47:05 UTC (rev 3071)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog  
2007-10-02 10:58:14 UTC (rev 3072)
@@ -2,6 +2,18 @@
 
        Patch by: Roman Moravcik <[EMAIL PROTECTED]>
 
+       * src/moko-history.c: (moko_history_load_entries): History list wasn't
+       corectly filled with moko journal entries,
+       (on_delete_clicked), (history_add_entry): Function
+        moko_journal_remove_entry_by_uid need uid value instead of contact_uid,
+       (history_add_entry): Replace phone number with name of contact if there 
+       is a entry in addressbook. Display "Unknown number" if phone number is
+       NULL.
+
+2007-10-02  Thomas Wood  <[EMAIL PROTECTED]>
+
+       Patch by: Roman Moravcik <[EMAIL PROTECTED]>
+
        * src/moko-dialer.c: (on_keypad_dial_clicked), (on_incoming_call),
          (on_network_registered): Store network information (LocationAreaCode,
          CellID) in moko journal.

Modified: 
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c 
2007-10-02 10:47:05 UTC (rev 3071)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-history.c 
2007-10-02 10:58:14 UTC (rev 3072)
@@ -21,11 +21,14 @@
 
 #include <gtk/gtk.h>
 
+#include <string.h>
+
 #include <moko-gsmd-connection.h>
 #include <moko-journal.h>
 #include <moko-stock.h>
 #include <moko-finger-scroll.h>
 
+#include "moko-contacts.h"
 #include "moko-history.h"
 
 G_DEFINE_TYPE (MokoHistory, moko_history, GTK_TYPE_VBOX)
@@ -158,9 +161,9 @@
   selection = gtk_tree_view_get_selection (treeview);
 
   if (!gtk_tree_selection_get_selected (selection, &filtered, &iter0))
-    ;
+    return;
 
-  /*gtk_tree_model_get (filtered, &iter0, ENTRY_POINTER_COLUMN, &uid, -1);*/
+  gtk_tree_model_get (filtered, &iter0, ENTRY_POINTER_COLUMN, &uid, -1);
 
   /* Create a dialog */
   dialog = gtk_message_dialog_new (GTK_WINDOW (
@@ -228,6 +231,7 @@
 {
   GtkTreeIter iter;
   const gchar *uid, *number;
+  MokoContactEntry *contacts;
   GdkPixbuf *icon = NULL;
   const gchar *display_text;
   time_t dstart;
@@ -236,7 +240,7 @@
   const MokoTime *time;
   gint type;
 
-  uid = moko_journal_entry_get_contact_uid (entry);
+  uid = moko_journal_entry_get_uid (entry);
   moko_journal_entry_get_direction (entry, &direction);
   time = moko_journal_entry_get_dtstart (entry);
   dstart = moko_time_as_timet (time);
@@ -265,10 +269,18 @@
   }
 
   /* display text should be the contact name or the number dialed */
-  /* FIXME: look up contact uid if stored */
-  display_text = number;
+  contacts = moko_contacts_lookup (moko_contacts_get_default (), number);   
+  if (contacts)
+    display_text = contacts->contact->name;
+  else
+  {
+    if (number == NULL || !strcmp(number, "") || !strcmp(number, "NULL"))
+      display_text = "Unknown number";
+    else
+      display_text = number;
+  }
 
-  if ( number == NULL || display_text == NULL || uid == NULL)
+  if (display_text == NULL || uid == NULL)
   {
     /*g_debug ("Not adding");
     return FALSE;*/
@@ -434,7 +446,7 @@
 
   for (e = entries; e != NULL; e = e->next)
   {
-    if (history_add_entry (store, entry))
+    if (history_add_entry (store, e->data))
       j++;
   }
 }




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to