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. r1708 - trunk/src/target/OM-2007/devel/scripts
      ([EMAIL PROTECTED])
   2. r1709 -
      trunk/src/target/OM-2007/applications/openmoko-rssreader/src
      ([EMAIL PROTECTED])
   3. r1710 -
      trunk/src/target/OM-2007/applications/openmoko-rssreader/src
      ([EMAIL PROTECTED])
   4. r1711 - in
      trunk/src/target/OM-2007/applications/openmoko-rssreader: . m4
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-04-08 01:16:08 +0200 (Sun, 08 Apr 2007)
New Revision: 1708

Modified:
   trunk/src/target/OM-2007/devel/scripts/launch-xoo
Log:
devel/scripts: launch more applets


Modified: trunk/src/target/OM-2007/devel/scripts/launch-xoo
===================================================================
--- trunk/src/target/OM-2007/devel/scripts/launch-xoo   2007-04-07 23:15:48 UTC 
(rev 1707)
+++ trunk/src/target/OM-2007/devel/scripts/launch-xoo   2007-04-07 23:16:08 UTC 
(rev 1708)
@@ -8,12 +8,11 @@
 #
 SERVER=Xephyr
 #SERVER=Xnest
-SVN_TRUNK=/local/pkg/openmoko/
-export PATH=$SVN_TRUNK/OM-2007/bin:$PATH
-export LD_LIBRARY_PATH=$SVN_TRUNK/OM-2007/lib:/usr/local/lib
+export PATH=$OPENMOKODIR/bin:$PATH
+export LD_LIBRARY_PATH=$OPENMOKODIR/lib:/usr/local/lib
 
 xoo -xo '-dpi 104 -ac' -xd :1 -xn `which $SERVER` -t 'OpenMoko running on FIC 
GTA01' -d \
-$SVN_TRUNK/oe/packages/xoo/files/gta01.xml &
+$OEDIR/packages/xoo/files/gta01.xml &
 
 sleep 2
 
@@ -32,11 +31,13 @@
                  --icon-padding 60 \
                  --font sans-16 \
                  --titlefont sans-20:bold --bg \
-img-tiled:/local/pkg/openmoko/OM-2007/artwork/themes/openmoko-standard/gtk-2.0/mokopanedwindow-upper-enclosing.png
 &
+img-tiled:$OPENMOKODIR/artwork/themes/openmoko-standard/gtk-2.0/mokopanedwindow-upper-enclosing.png
 &
 
 sleep 2
 
-matchbox-panel --geometry=480x44 --end-applets=clock &
+matchbox-panel --geometry=480x44 \
+  --start-applets=openmoko-panel-mainmenu,systray \
+  
--end-applets=openmoko-panel-battery,openmoko-panel-gsm,openmoko-panel-gps,openmoko-panel-clock
 &
 
 sleep 2
 




--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-04-08 02:23:57 +0200 (Sun, 08 Apr 2007)
New Revision: 1709

Modified:
   trunk/src/target/OM-2007/applications/openmoko-rssreader/src/rfcdate.c
Log:
openmoko-rssreader: There is still something wrong with formating dates
    Somehow I get funny dates such as 29th of February or 31st of
    April. I don't know where they come from, this somehow looks like
    a off by one in month name calculation. This might come from mrss
    and the atom->RSS date conversion.


Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/src/rfcdate.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/rfcdate.c      
2007-04-07 23:16:08 UTC (rev 1708)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/rfcdate.c      
2007-04-08 00:23:57 UTC (rev 1709)
@@ -187,6 +187,21 @@
     self->timeval.tv_sec  = hour*60*60 + minute*60 + second;
     self->timeval.tv_usec = 0;
     g_date_set_dmy ( self->date, day, rss_month_number (month_name), year);
+
+
+    /*
+     * broken software? The 29th February and 31st April simply doesn't exist
+     * What should we do with these dates? round to the nearest legal date?
+     */
+    if ( !g_date_valid (self->date) ) {
+        g_print ("Setting RFC Date failed: '%s' %d %d %s %d  %ld\n",
+                        rfc822date,
+                        day,
+                        rss_month_number(month_name),
+                        month_name,
+                        year,
+                        self->timeval.tv_sec);
+    }
 }
 
 /*




--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-04-08 02:26:43 +0200 (Sun, 08 Apr 2007)
New Revision: 1710

Modified:
   
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/application-data.h
   trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
   trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
Log:
openmoko-rssreader: Replace the string representation of the date with 
RSSRFCDate
    Using a GObject for the date allows us to decouple representation to
    the user (locale aware, shortened to Today) and sorting.
    Use the sort_model for the TreeView and set a dedicated data_func and
    sort func for the date column.
    dates are sorted by zsort, and even z doesn't understand the logic
    behind this sorting.


Modified: 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/application-data.h
===================================================================
--- 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/application-data.h 
    2007-04-08 00:23:57 UTC (rev 1709)
+++ 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/application-data.h 
    2007-04-08 00:26:43 UTC (rev 1710)
@@ -68,7 +68,6 @@
     RSS_READER_COLUMN_AUTHOR,
     RSS_READER_COLUMN_SUBJECT,
     RSS_READER_COLUMN_DATE,
-    RSS_READER_COLUMN_DATE_GDATE,/* The date as GDate representation used for 
sorting     */
     RSS_READER_COLUMN_LINK,     /* Is this something like spiegel.de and only 
has a link */
     RSS_READER_COLUMN_TEXT,     /* Either link is NULL, or this contains the 
article     */
     RSS_READER_COLUMN_TEXT_TYPE,/* The Text Type of Atom feeds HTML, plain...  
          */

Modified: 
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-04-08 00:23:57 UTC (rev 1709)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c    
2007-04-08 00:26:43 UTC (rev 1710)
@@ -28,6 +28,7 @@
 #include <glib/gi18n.h>
 
 #include "callbacks.h"
+#include "rfcdate.h"
 
 #include <mrss.h>
 #include <string.h>
@@ -139,12 +140,14 @@
             /*
              * update the model here
              */
+            RSSRFCDate *date = RSS_RFC_DATE(rss_rfc_date_new ());
+            rss_rfc_date_set (date, item->pubDate);
             gdk_threads_enter();
             gtk_list_store_append( data->feed_data, &iter );
             gtk_list_store_set   ( data->feed_data, &iter,
                                    RSS_READER_COLUMN_AUTHOR, g_strdup( 
item->author  ),
                                    RSS_READER_COLUMN_SUBJECT,g_strdup( 
item->title   ),
-                                   RSS_READER_COLUMN_DATE,   g_strdup( 
item->pubDate ),
+                                   RSS_READER_COLUMN_DATE,   date,
                                    RSS_READER_COLUMN_LINK,   g_strdup( 
item->link    ),
                                    RSS_READER_COLUMN_TEXT,   g_strdup( 
description   ),
                                    RSS_READER_COLUMN_TEXT_TYPE, content_type   
       ,

Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c 
2007-04-08 00:23:57 UTC (rev 1709)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c 
2007-04-08 00:26:43 UTC (rev 1710)
@@ -28,6 +28,7 @@
 
 #include "application-data.h"
 #include "callbacks.h"
+#include "rfcdate.h"
 
 #include <libmokoui/moko-details-window.h>
 
@@ -36,6 +37,34 @@
 #define ASSERT_X(x, error) assert(x)
 
 /*
+ * sort the dates according to zsort. Ideally they should sort ascending
+ */
+static gint
+rss_sort_dates (GtkTreeModel *model, GtkTreeIter *_left, GtkTreeIter *_right, 
gpointer that)
+{
+    RSSRFCDate *left, *right;
+    gtk_tree_model_get (model, _left,  RSS_READER_COLUMN_DATE, &left,  -1);
+    gtk_tree_model_get (model, _right, RSS_READER_COLUMN_DATE, &right, -1);
+
+    if ( left == NULL )
+        return -1;
+    else if ( right == NULL )
+        return 1;
+    else
+        return rss_rfc_date_compare (left, right);
+}
+
+static void
+rss_cell_data_func (GtkTreeViewColumn *tree_column, GtkCellRenderer *renderer, 
GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
+{
+    RSSRFCDate *date;
+    gtk_tree_model_get (tree_model, iter, RSS_READER_COLUMN_DATE, &date, -1);
+
+    g_assert (date);
+    g_object_set ( G_OBJECT(renderer), "text", rss_rfc_date_as_string(date), 
NULL);
+}
+
+/*
  * setup the toolbar
  */
 static void setup_toolbar( struct RSSReaderData *data ) {
@@ -69,8 +98,7 @@
     data->feed_data = gtk_list_store_new( RSS_READER_NUM_COLS,
                                           G_TYPE_STRING /* Author    */,
                                           G_TYPE_STRING /* Subject   */,
-                                          G_TYPE_STRING /* The actual string 
*/,
-                                          G_TYPE_DATE   /* Date GDate*/,
+                                          RSS_TYPE_RFC_DATE /* Date  */,
                                           G_TYPE_STRING /* Link      */,
                                           G_TYPE_STRING /* Text      */,
                                           G_TYPE_INT    /* Text_Type */,
@@ -86,10 +114,10 @@
      * Allow sorting of the base model
      */
     data->sort_model = GTK_TREE_MODEL_SORT(gtk_tree_model_sort_new_with_model( 
GTK_TREE_MODEL(data->filter_model) ));
-    gtk_tree_sortable_set_sort_column_id( GTK_TREE_SORTABLE(data->sort_model), 
RSS_READER_COLUMN_SUBJECT, GTK_SORT_ASCENDING );
     gtk_tree_sortable_set_sort_column_id( GTK_TREE_SORTABLE(data->sort_model), 
RSS_READER_COLUMN_DATE,    GTK_SORT_ASCENDING );
+    gtk_tree_sortable_set_sort_func ( GTK_TREE_SORTABLE(data->sort_model), 
RSS_READER_COLUMN_DATE, rss_sort_dates, NULL, NULL);
 
-    data->treeView = 
MOKO_TREE_VIEW(moko_tree_view_new_with_model(GTK_TREE_MODEL(data->feed_data)));
+    data->treeView = 
MOKO_TREE_VIEW(moko_tree_view_new_with_model(GTK_TREE_MODEL(data->sort_model)));
     moko_paned_window_set_upper_pane( MOKO_PANED_WINDOW(data->window), 
GTK_WIDGET(moko_tree_view_put_into_scrolled_window(data->treeView)) );
 
     /*
@@ -105,7 +133,9 @@
     moko_tree_view_append_column( MOKO_TREE_VIEW(data->treeView), column );
 
     ren = GTK_CELL_RENDERER(gtk_cell_renderer_text_new());
-    column = GTK_TREE_VIEW_COLUMN(gtk_tree_view_column_new_with_attributes( 
_("Date"), ren, "text", RSS_READER_COLUMN_DATE, NULL));
+    column = GTK_TREE_VIEW_COLUMN(gtk_tree_view_column_new_with_attributes( 
_("Date"), ren, NULL));
+
+    gtk_tree_view_column_set_cell_data_func (column, ren, rss_cell_data_func, 
NULL, NULL);
     gtk_tree_view_column_set_expand( column, TRUE );
     gtk_tree_view_column_set_sizing( column, GTK_TREE_VIEW_COLUMN_FIXED );
     gtk_tree_view_column_set_sort_column_id( column, RSS_READER_COLUMN_DATE );
@@ -120,7 +150,6 @@
     GtkWidget *search_entry = 
GTK_WIDGET(moko_tool_box_get_entry(MOKO_TOOL_BOX(data->box)));
     g_signal_connect( G_OBJECT(data->treeView), "key_press_event", 
G_CALLBACK(cb_treeview_keypress_event), data );
     g_signal_connect( G_OBJECT(search_entry),   "changed", 
G_CALLBACK(cb_search_entry_changed), data );
-
 }
 
 static void create_details_area( struct RSSReaderData* data ) {




--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-04-08 02:42:26 +0200 (Sun, 08 Apr 2007)
New Revision: 1711

Added:
   trunk/src/target/OM-2007/applications/openmoko-rssreader/m4/
   trunk/src/target/OM-2007/applications/openmoko-rssreader/m4/check.m4
Modified:
   trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
Log:
openmoko-rssreader: include check.m4 to make autoreconf work on systems without 
installed check
    Check is used for the unit tests and is an optional depedency,
    include the check.m4 to make sure autoreconf will not fail.


Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh 
2007-04-08 00:26:43 UTC (rev 1710)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh 
2007-04-08 00:42:26 UTC (rev 1711)
@@ -5,6 +5,7 @@
 test -z "$srcdir" && srcdir=.
 REQUIRED_AUTOMAKE_VERSION=1.8
 PKG_NAME=openmoko-rssreader
+ACLOCAL_FLAGS="-I m4"
 
 (test -f $srcdir/configure.ac \
   && test -f $srcdir/src/main.c) || {

Added: trunk/src/target/OM-2007/applications/openmoko-rssreader/m4/check.m4
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/m4/check.m4        
2007-04-08 00:26:43 UTC (rev 1710)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/m4/check.m4        
2007-04-08 00:42:26 UTC (rev 1711)
@@ -0,0 +1,132 @@
+dnl AM_PATH_CHECK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for check, and define CHECK_CFLAGS and CHECK_LIBS
+dnl
+
+AC_DEFUN([AM_PATH_CHECK],
+[
+  AC_MSG_WARN([A@&[EMAIL PROTECTED]() is deprecated])
+  AC_MSG_WARN([[use P@&[EMAIL PROTECTED]([CHECK], [check >= 0.9.4]) instead]])
+  AC_ARG_WITH([check],
+  [  --with-check=PATH       prefix where check is installed [default=auto]])
+ 
+  min_check_version=ifelse([$1], ,0.8.2,$1)
+
+  AC_MSG_CHECKING(for check - version >= $min_check_version)
+
+  if test x$with_check = xno; then
+    AC_MSG_RESULT(disabled)
+    ifelse([$3], , AC_MSG_ERROR([disabling check is not supported]), [$3])
+  else
+    if test "x$with_check" != x; then
+      CHECK_CFLAGS="-I$with_check/include"
+      CHECK_LIBS="-L$with_check/lib -lcheck"
+    else
+      CHECK_CFLAGS=""
+      CHECK_LIBS="-lcheck"
+    fi
+
+    ac_save_CFLAGS="$CFLAGS"
+    ac_save_LIBS="$LIBS"
+
+    CFLAGS="$CFLAGS $CHECK_CFLAGS"
+    LIBS="$CHECK_LIBS $LIBS"
+
+    rm -f conf.check-test
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([])
+#include <check.h>
+
+int main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.check-test");
+
+  /* HP/UX 9 ([EMAIL PROTECTED]) writes to sscanf strings */
+  tmp_version = strdup("$min_check_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_check_version");
+     return 1;
+   }
+    
+  if ((CHECK_MAJOR_VERSION != check_major_version) ||
+      (CHECK_MINOR_VERSION != check_minor_version) ||
+      (CHECK_MICRO_VERSION != check_micro_version))
+    {
+      printf("\n*** The check header file (version %d.%d.%d) does not match\n",
+            CHECK_MAJOR_VERSION, CHECK_MINOR_VERSION, CHECK_MICRO_VERSION);
+      printf("*** the check library (version %d.%d.%d).\n",
+            check_major_version, check_minor_version, check_micro_version);
+      return 1;
+    }
+
+  if ((check_major_version > major) ||
+      ((check_major_version == major) && (check_minor_version > minor)) ||
+      ((check_major_version == major) && (check_minor_version == minor) && 
(check_micro_version >= micro)))
+    {
+      return 0;
+    }
+  else
+    {
+      printf("\n*** An old version of check (%d.%d.%d) was found.\n",
+             check_major_version, check_minor_version, check_micro_version);
+      printf("*** You need a version of check being at least %d.%d.%d.\n", 
major, minor, micro);
+      printf("***\n"); 
+      printf("*** If you have already installed a sufficiently new version, 
this error\n");
+      printf("*** probably means that the wrong copy of the check library and 
header\n");
+      printf("*** file is being found. Rerun configure with the 
--with-check=PATH option\n");
+      printf("*** to specify the prefix where the correct version was 
installed.\n");
+    }
+
+  return 1;
+}
+])],, no_check=yes, [echo $ac_n "cross compiling; assumed OK... $ac_c"])
+
+    CFLAGS="$ac_save_CFLAGS"
+    LIBS="$ac_save_LIBS"
+
+    if test "x$no_check" = x ; then
+      AC_MSG_RESULT(yes)
+      ifelse([$2], , :, [$2])
+    else
+      AC_MSG_RESULT(no)
+      if test -f conf.check-test ; then
+        :
+      else
+        echo "*** Could not run check test program, checking why..."
+        CFLAGS="$CFLAGS $CHECK_CFLAGS"
+        LIBS="$CHECK_LIBS $LIBS"
+        AC_TRY_LINK([
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <check.h>
+], ,  [ echo "*** The test program compiled, but did not run. This usually 
means"
+        echo "*** that the run-time linker is not finding check. You'll need 
to set your"
+        echo "*** LD_LIBRARY_PATH environment variable, or edit 
/etc/ld.so.conf to point"
+        echo "*** to the installed location  Also, make sure you have run 
ldconfig if that"
+        echo "*** is required on your system"
+       echo "***"
+        echo "*** If you have an old version installed, it is best to remove 
it, although"
+        echo "*** you may also be able to get things to work by modifying 
LD_LIBRARY_PATH"],
+      [ echo "*** The test program failed to compile or link. See the file 
config.log for"
+        echo "*** the exact error that occured." ])
+      
+        CFLAGS="$ac_save_CFLAGS"
+        LIBS="$ac_save_LIBS"
+      fi
+
+      CHECK_CFLAGS=""
+      CHECK_LIBS=""
+
+      rm -f conf.check-test
+      ifelse([$3], , AC_MSG_ERROR([check not found]), [$3])
+    fi
+
+    AC_SUBST(CHECK_CFLAGS)
+    AC_SUBST(CHECK_LIBS)
+
+    rm -f conf.check-test
+
+  fi
+])




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

Reply via email to