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. r1485 -
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/data
([EMAIL PROTECTED])
2. r1486 - in
trunk/src/target/OM-2007/applications/openmoko-today: . src
([EMAIL PROTECTED])
3. r1487 - in
trunk/src/target/OM-2007/applications/openmoko-today: . src
([EMAIL PROTECTED])
4. r1488 - in
trunk/src/target/OM-2007/applications/openmoko-today: . src
([EMAIL PROTECTED])
5. r1489 - trunk/oe/conf/distro/include ([EMAIL PROTECTED])
6. r1490 -
trunk/src/target/OM-2007/applications/openmoko-rssreader
([EMAIL PROTECTED])
7. r1491 - in
trunk/src/target/OM-2007/applications/openmoko-rssreader: . po
src ([EMAIL PROTECTED])
--- Begin Message ---
Author: mickey
Date: 2007-03-22 14:34:20 +0100 (Thu, 22 Mar 2007)
New Revision: 1485
Added:
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/data/SignalStrength_00.png
Log:
openmoko-panel-gsm: add missing picture
Added:
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/data/SignalStrength_00.png
===================================================================
(Binary files differ)
Property changes on:
trunk/src/target/OM-2007/panel-plugins/openmoko-panel-gsm/data/SignalStrength_00.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-03-22 16:40:10 +0100 (Thu, 22 Mar 2007)
New Revision: 1486
Added:
trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
Modified:
trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-today/src/Makefile.am
trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
Log:
* src/Makefile.am:
* src/today-main.c: (today_update_date), (today_setup_events_area),
(create_ui):
* src/xutil.c:
* src/xutil.h:
Add --enable-desktop option
Modified: trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 13:34:20 UTC (rev 1485)
+++ trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 15:40:10 UTC (rev 1486)
@@ -1,3 +1,13 @@
+Thu, 22 Mar 2007 15:36:29 +0000 Thomas Wood
+
+ * src/Makefile.am:
+ * src/today-main.c: (today_update_date), (today_setup_events_area),
+ (create_ui):
+ * src/xutil.c:
+ * src/xutil.h:
+
+ Add --enable-desktop option
+
Thu, 22 Mar 2007 12:59:43 +0000 Thomas Wood
* src/today-main.c: (create_ui): Set window title to keep hrw happy
Modified: trunk/src/target/OM-2007/applications/openmoko-today/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/Makefile.am
2007-03-22 13:34:20 UTC (rev 1485)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/Makefile.am
2007-03-22 15:40:10 UTC (rev 1486)
@@ -10,7 +10,7 @@
today_SOURCES = today-main.c \
today-events-area.h today-events-area.c \
-today-utils.h today-utils.c
+today-utils.h today-utils.c xutil.c
today_LDADD = @TODAY_LIBS@
Modified: trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
2007-03-22 13:34:20 UTC (rev 1485)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/today-main.c
2007-03-22 15:40:10 UTC (rev 1486)
@@ -30,6 +30,7 @@
#include <libmokoui/moko-pixmap-button.h>
#include "today-events-area.h"
#include "today-utils.h"
+#include "xutil.h"
#define LOG_ERROR \
g_warning ("Got error '%s', code '%d'", \
@@ -37,6 +38,22 @@
#define FREE_ERROR g_error_free (error) ; error = NULL ;
+/*** configuration options ***/
+/* default to false, although this might want to be reversed in the future */
+static gboolean enable_desktop = FALSE;
+
+static GOptionEntry option_entries[] =
+{
+ { "enable-desktop", 'd', 0, G_OPTION_ARG_NONE, &enable_desktop, "Set as
desktop window", NULL},
+ { NULL }
+};
+
+
+/**
+ * today_update_date ()
+ *
+ * Update the specified GtkLabel with the current date
+ */
static void
today_update_date (GtkLabel * label)
{
@@ -59,6 +76,11 @@
}
+/**
+ * today_update_time ()
+ *
+ * Update the specified GtkLabel with the current time
+ */
static void
today_update_time (GtkLabel * label)
{
@@ -216,6 +238,18 @@
gtk_widget_set_name (window, "today-application-window");
gtk_window_set_title (GTK_WINDOW (window), "Today");
+ if (enable_desktop)
+ {
+ gint x, y, w, h;
+ gtk_window_set_type_hint (GTK_WINDOW (window),
GDK_WINDOW_TYPE_HINT_DESKTOP);
+ gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
+ if (x_get_workarea (&x, &y, &w, &h))
+ {
+ gtk_window_set_default_size (GTK_WINDOW (window), w, h);
+ gtk_window_move (GTK_WINDOW (window), x, y);
+ }
+ }
+
vbox = gtk_vbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -293,8 +327,20 @@
int
main (int argc, char **argv)
{
+ GError *error = NULL;
+ GOptionContext *context;
+
gtk_init (&argc, &argv);
+
+ /* parse command line options */
+ context = g_option_context_new ("- OpenMoko Today Application");
+ g_option_context_add_main_entries (context, option_entries, NULL);
+ g_option_context_add_group (context, gtk_get_option_group (TRUE));
+ g_option_context_parse (context, &argc, &argv, &error);
+
+ /* create the UI and run */
create_ui ();
gtk_main ();
+
return 0;
}
Added: trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
2007-03-22 13:34:20 UTC (rev 1485)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
2007-03-22 15:40:10 UTC (rev 1486)
@@ -0,0 +1,52 @@
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+
+char *
+x_strerror (int code)
+{
+#define BUFFER_SIZE 255
+ char *s;
+
+ s = g_malloc (BUFFER_SIZE);
+
+ XGetErrorText (GDK_DISPLAY (), code, s, BUFFER_SIZE);
+
+ return s;
+}
+
+
+gboolean
+x_get_workarea (int *x, int *y, int *w, int *h)
+{
+ Atom real_type;
+ int result, xres, real_format;
+ unsigned long items_read, items_left;
+ long *coords;
+
+ Atom workarea_atom = XInternAtom (GDK_DISPLAY (), "_NET_WORKAREA", False);
+
+ gdk_error_trap_push ();
+ result = XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
+ workarea_atom, 0L, 4L, False,
+ XA_CARDINAL, &real_type, &real_format,
+ &items_read, &items_left,
+ (unsigned char **) (void*)&coords);
+ if ((xres = gdk_error_trap_pop ()) != 0) {
+ char *s = x_strerror (xres);
+ g_warning ("Cannot get property: %s", s);
+ g_free (s);
+ return FALSE;
+ }
+
+ if (result == Success && items_read) {
+ *x = coords[0];
+ *y = coords[1];
+ *w = coords[2];
+ *h = coords[3];
+ XFree(coords);
+ return TRUE;
+ }
+ return FALSE;
+}
Added: trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
2007-03-22 13:34:20 UTC (rev 1485)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
2007-03-22 15:40:10 UTC (rev 1486)
@@ -0,0 +1,3 @@
+char * x_strerror (int code);
+
+gboolean x_get_workarea (int *x, int *y, int *w, int *h);
--- End Message ---
--- Begin Message ---
Author: thomas
Date: 2007-03-22 16:55:56 +0100 (Thu, 22 Mar 2007)
New Revision: 1487
Modified:
trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
Log:
* src/xutil.c:
* src/xutil.h:
Add license headers. These files were taken from matchbox-panel-2.
Modified: trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 15:40:10 UTC (rev 1486)
+++ trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 15:55:56 UTC (rev 1487)
@@ -1,3 +1,10 @@
+Thu, 22 Mar 2007 15:51:59 +0000 Thomas Wood
+
+ * src/xutil.c:
+ * src/xutil.h:
+
+ Add license headers. These files were taken from matchbox-panel-2.
+
Thu, 22 Mar 2007 15:36:29 +0000 Thomas Wood
* src/Makefile.am:
Modified: trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
2007-03-22 15:40:10 UTC (rev 1486)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.c
2007-03-22 15:55:56 UTC (rev 1487)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2007 OpenedHand Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify it
under
+ * the terms of the GNU General Public License as published by the Free
Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <gdk/gdk.h>
Modified: trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
2007-03-22 15:40:10 UTC (rev 1486)
+++ trunk/src/target/OM-2007/applications/openmoko-today/src/xutil.h
2007-03-22 15:55:56 UTC (rev 1487)
@@ -1,3 +1,21 @@
+/*
+ * Copyright (C) 2007 OpenedHand Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify it
under
+ * the terms of the GNU General Public License as published by the Free
Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
char * x_strerror (int code);
gboolean x_get_workarea (int *x, int *y, int *w, int *h);
--- End Message ---
--- Begin Message ---
Author: dodji
Date: 2007-03-22 18:29:29 +0100 (Thu, 22 Mar 2007)
New Revision: 1488
Modified:
trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
trunk/src/target/OM-2007/applications/openmoko-today/src/today-events-area.c
Log:
Make TodayEventsArea update events that get modified in e-d-s.
* applications/openmoko-today/src/today-events-area.c:
Update the widget to show (in real time) modified
events/todo items.
Modified: trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 15:55:56 UTC (rev 1487)
+++ trunk/src/target/OM-2007/applications/openmoko-today/ChangeLog
2007-03-22 17:29:29 UTC (rev 1488)
@@ -1,3 +1,9 @@
+Thu, 22 Mar 2007 18:04:50 +0100 Dodji Sekteli
+
+ * applications/openmoko-today/src/today-events-area.c:
+ Update the widget to show (in real time) modified
+ events/todo items.
+
Thu, 22 Mar 2007 15:51:59 +0000 Thomas Wood
* src/xutil.c:
Modified:
trunk/src/target/OM-2007/applications/openmoko-today/src/today-events-area.c
===================================================================
---
trunk/src/target/OM-2007/applications/openmoko-today/src/today-events-area.c
2007-03-22 15:55:56 UTC (rev 1487)
+++
trunk/src/target/OM-2007/applications/openmoko-today/src/today-events-area.c
2007-03-22 17:29:29 UTC (rev 1488)
@@ -84,17 +84,23 @@
static void reinit_area (TodayEventsArea *a_this) ;
static int get_nb_events_real (TodayEventsArea *a_this) ;
static gboolean update_paging_info (TodayEventsArea *a_this) ;
+static GList* find_event (TodayEventsArea *a_this,
+ const gchar *a_uid) ;
+static GList* find_event_from_icalcomp (TodayEventsArea *a_this,
+ const icalcomponent *a_comp) ;
static GList* select_event (TodayEventsArea *a_this,
GList *a_event) ;
static void render_event (TodayEventsArea *a_this,
GList *a_event) ;
static void render_events_page (TodayEventsArea *a_this,
GList *a_from) ;
+static gboolean is_event_visible (TodayEventsArea *a_this,
+ GList *a_event) ;
static void render_events_page_auto (TodayEventsArea *a_this) ;
static gboolean remove_event (TodayEventsArea *a_this,
GList *a_event) ;
static void set_events_view (TodayEventsArea *a_this,
- ECalView *a_view) ;
+ ECalView *a_view) ;
static void event_selected_signal (TodayEventsArea *a_this,
guint a_index) ;
static void events_added_signal (TodayEventsArea *a_this,
@@ -105,7 +111,9 @@
static void on_objects_removed_cb (ECalView *a_view,
GList *a_uids,
TodayEventsArea *a_this) ;
-
+static void on_objects_modified_cb (ECalView *a_view,
+ GList *a_objects,
+ TodayEventsArea *a_events) ;
static void get_property (GObject *a_this, guint a_prop_id,
GValue *a_val, GParamSpec *a_pspec) ;
static void set_property (GObject *a_this, guint a_prop_id,
@@ -370,6 +378,39 @@
}
static void
+on_objects_modified_cb (ECalView *a_view,
+ GList *a_objects,
+ TodayEventsArea *a_this)
+{
+ GList *cur=NULL ;
+
+ if (a_view) {/*happy compiler*/}
+
+ g_return_if_fail (a_this && TODAY_IS_EVENTS_AREA (a_this)) ;
+
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ for (cur = a_objects ; cur ; cur = cur->next)
+ {
+ GList *event=NULL ;
+ if (!cur->data)
+ continue ;
+ event = find_event_from_icalcomp (a_this, cur->data) ;
+ if (event && event->data && icalcomponent_isa_component (event->data))
+ {
+ icalcomponent_free (event->data) ;
+ event->data = icalcomponent_new_clone (cur->data) ;
+ }
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ if (event && is_event_visible (a_this, event))
+ {
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ render_events_page (a_this, a_this->priv->page_start) ;
+ }
+ }
+ gtk_widget_queue_draw (GTK_WIDGET (a_this)) ;
+}
+
+static void
get_property (GObject *a_this, guint a_prop_id,
GValue *a_val, GParamSpec *a_pspec)
{
@@ -566,6 +607,41 @@
}
static GList*
+find_event (TodayEventsArea *a_this,
+ const gchar *a_uid)
+{
+ GList *cur=NULL ;
+ int uid_len=0 ;
+
+ g_return_val_if_fail (a_this && TODAY_IS_EVENTS_AREA (a_this), NULL) ;
+ g_return_val_if_fail (a_this->priv, NULL) ;
+ g_return_val_if_fail (a_uid, NULL) ;
+
+ uid_len = strlen (a_uid) ;
+ for (cur = a_this->priv->events ; cur ; cur = cur->next)
+ {
+ if (!cur->data || !icalcomponent_isa_component (cur->data))
+ continue ;
+ if (!strncmp (a_uid, icalcomponent_get_uid (cur->data), uid_len))
+ {
+ return cur ;
+ }
+ }
+ return NULL ;
+}
+
+static GList*
+find_event_from_icalcomp (TodayEventsArea *a_this,
+ const icalcomponent *a_comp)
+{
+ g_return_val_if_fail (a_comp, NULL) ;
+ g_return_val_if_fail (icalcomponent_isa_component ((icalcomponent*)a_comp),
+ NULL) ;
+
+ return find_event (a_this, icalcomponent_get_uid ((icalcomponent*)a_comp)) ;
+}
+
+static GList*
select_event (TodayEventsArea *a_this,
GList *a_event)
{
@@ -764,6 +840,29 @@
}
}
+static gboolean
+is_event_visible (TodayEventsArea *a_this,
+ GList *a_event)
+{
+ gint event_index=-1 ;
+ g_return_val_if_fail (a_this && TODAY_IS_EVENTS_AREA (a_this),
+ FALSE) ;
+
+ event_index = g_list_position (a_this->priv->events, a_event) ;
+ g_return_val_if_fail (event_index >= 0, FALSE) ;
+
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ if (event_index >= a_this->priv->page_start_index
+ && (event_index <= a_this->priv->page_start_index
+ + a_this->priv->max_visible_events))
+ {
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ return TRUE ;
+ }
+ g_debug ("in %s:%d", __func__, __LINE__) ;
+ return FALSE ;
+}
+
static void
render_events_page_auto (TodayEventsArea *a_this)
{
@@ -894,6 +993,9 @@
g_signal_connect (G_OBJECT (a_view), "objects-removed",
G_CALLBACK (on_objects_removed_cb),
a_this) ;
+ g_signal_connect (G_OBJECT (a_view), "objects-modified",
+ G_CALLBACK (on_objects_modified_cb),
+ a_this) ;
g_object_ref (G_OBJECT (a_view)) ;
e_cal_view_start (a_view) ;
--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2007-03-22 20:16:33 +0100 (Thu, 22 Mar 2007)
New Revision: 1489
Modified:
trunk/oe/conf/distro/include/preferred-openmoko-versions.inc
trunk/oe/conf/distro/include/sane-srcdates.inc
Log:
oe/conf: add preferred srcdate for openmoko-today
Modified: trunk/oe/conf/distro/include/preferred-openmoko-versions.inc
===================================================================
--- trunk/oe/conf/distro/include/preferred-openmoko-versions.inc
2007-03-22 17:29:29 UTC (rev 1488)
+++ trunk/oe/conf/distro/include/preferred-openmoko-versions.inc
2007-03-22 19:16:33 UTC (rev 1489)
@@ -38,6 +38,7 @@
#
SRCDATE_openmoko-contacts = "now"
SRCDATE_openmoko-dates = "now"
+SRCDATE_openmoko-today = "now"
#
# Applications
Modified: trunk/oe/conf/distro/include/sane-srcdates.inc
===================================================================
--- trunk/oe/conf/distro/include/sane-srcdates.inc 2007-03-22 17:29:29 UTC
(rev 1488)
+++ trunk/oe/conf/distro/include/sane-srcdates.inc 2007-03-22 19:16:33 UTC
(rev 1489)
@@ -46,6 +46,7 @@
SRCDATE_gconf-dbus = "20070125"
SRCDATE_gnome-vfs-dbus ?= "20060119"
SRCDATE_gtkhtml2 ?= "20060323"
+SRCDATE_gtkunique = "20070210"
#Misc apps, sorted by alphabet
SRCDATE_avetanabt ?= "20060814"
--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-03-22 20:41:20 +0100 (Thu, 22 Mar 2007)
New Revision: 1490
Modified:
trunk/src/target/OM-2007/applications/openmoko-rssreader/README
Log:
openmoko-rssreader: Document the stuff I know I do wrong
Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/README
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/README
2007-03-22 19:16:33 UTC (rev 1489)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/README
2007-03-22 19:41:20 UTC (rev 1490)
@@ -6,6 +6,10 @@
-No proxy model that makes use of the filter
-No caching of images
-Storage size is not limited
-
+ -There is no way to merge feed entries from two planets... instead two
entries will be presented
+ (this is another reason for a better model)
+ -Separate MRSS, Model and CellRender allocation into a model manager class
which
+ knows the secret of the used types, the to be used cell renderer and the
sort
+
Main objective:
- -Get familiar with the joy/pain of Gtk+
\ No newline at end of file
+ -Get familiar with the joy/pain of Gtk+
--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-03-22 22:43:23 +0100 (Thu, 22 Mar 2007)
New Revision: 1491
Added:
trunk/src/target/OM-2007/applications/openmoko-rssreader/po/
trunk/src/target/OM-2007/applications/openmoko-rssreader/po/POTFILES.in
Modified:
trunk/src/target/OM-2007/applications/openmoko-rssreader/Makefile.am
trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
trunk/src/target/OM-2007/applications/openmoko-rssreader/configure.ac
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/Makefile.am
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/callbacks.h
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
Log:
openmoko-rssreader: Prepare i18n/gettext, prepare sorting, prepare filtering
Sorting works, but the date is sorted lexically. Parsing the RSS2.0
pubDate requires a RFC822 compliant parser and on top of that a small
fix to libmrss. COLUMN_DATE_GDATE will store the GDate value to allow
better and faster sorting. We create a filter model but do not filter yet.
Update autogen.sh to the stock GNOME file to call intltool for us
Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/Makefile.am
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/Makefile.am
2007-03-22 21:43:23 UTC (rev 1491)
@@ -1,2 +1,2 @@
-SUBDIRS = src data
+SUBDIRS = src data po
Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/autogen.sh
2007-03-22 21:43:23 UTC (rev 1491)
@@ -1,4 +1,22 @@
-#! /bin/sh
-autoreconf -v --install || exit 1
-glib-gettextize --force --copy || exit 1
-./configure --enable-maintainer-mode "$@"
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+REQUIRED_AUTOMAKE_VERSION=1.8
+PKG_NAME=openmoko-rssreader
+
+(test -f $srcdir/configure.ac \
+ && test -f $srcdir/src/main.c) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common from the GNOME CVS"
+ exit 1
+}
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
+
Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/configure.ac
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/configure.ac
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/configure.ac
2007-03-22 21:43:23 UTC (rev 1491)
@@ -8,6 +8,13 @@
AC_STDC_HEADERS
AC_PROG_LIBTOOL
+#i18n
+GETTEXT_PACKAGE=openmoko-rssreader
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
+AC_SUBST(GETTEXT_PACKAGE)
+AM_GLIB_GNU_GETTEXT
+
+
# base deps
PKG_CHECK_MODULES(OPENMOKO, openmoko-libs >= 0.0.1)
PKG_CHECK_MODULES(MRSS, mrss >= 0.17 )
@@ -18,4 +25,5 @@
Makefile
src/Makefile
data/Makefile
+po/Makefile.in
])
Added: trunk/src/target/OM-2007/applications/openmoko-rssreader/po/POTFILES.in
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/po/POTFILES.in
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/po/POTFILES.in
2007-03-22 21:43:23 UTC (rev 1491)
@@ -0,0 +1,2 @@
+src/callbacks.c
+src/main.c
Modified:
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/Makefile.am
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/Makefile.am
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/Makefile.am
2007-03-22 21:43:23 UTC (rev 1491)
@@ -1,8 +1,10 @@
AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \
- -DPKGDATADIR=\"$(pkgdatadir)\"
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
+ -DRSSREADER_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
-AM_CFLAGS = -Wall -Werror -pedantic -std=c99 @OPENMOKO_CFLAGS@ @MRSS_CFLAGS@
+AM_CFLAGS = -Wall -Werror -pedantic -std=c99 @OPENMOKO_CFLAGS@ @MRSS_CFLAGS@
+
bin_PROGRAMS = openmoko-rssreader
EXTRA_DIST = application-data.h callbacks.h
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-03-22 19:41:20 UTC (rev 1490)
+++
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/application-data.h
2007-03-22 21:43:23 UTC (rev 1491)
@@ -42,8 +42,14 @@
MokoPanedWindow *window;
MokoToolBox *box;
MokoMenuBox *menubox;
+
+
MokoTreeView *treeView;
GtkListStore *feed_data;
+ GtkTreeModelFilter *filter_model;
+ GtkTreeModelSort *sort_model;
+
+
GtkTextTagTable *tagTable;
GtkTextBuffer *textBuffer;
GtkTextView *textView;
@@ -62,6 +68,7 @@
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-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.c
2007-03-22 21:43:23 UTC (rev 1491)
@@ -24,23 +24,27 @@
* Current Version: $Rev$ ($Date$) [$Author$]
*/
+#include "config.h"
+#include <glib/gi18n.h>
+
#include "callbacks.h"
#include <mrss.h>
#include <string.h>
-#define _(x) (x)
-
struct FeedEntry {
gchar *category;
gchar *url;
};
-static const int NUMBER_OF_FEEDS = 2;
static struct FeedEntry s_feeds[] = {
- { "OpenMoko", "http://planet.openmoko.org/rss20.xml" },
- { "GNOME" , "http://planet.gnome.org/atom.xml" },
+ { "OpenMoko", "http://planet.openmoko.org/atom.xml" },
+ { "GNOME" , "http://planet.gnome.org/atom.xml" },
+ { "KDE", "http://planet.kde.org/rss20.xml" },
+ { "Linux Togo", "http://planet.linuxtogo.org/atom.xml" },
+ { "zecke" , "http://zecke.blogspot.com/atom.xml" },
};
+static const int NUMBER_OF_FEEDS = sizeof(s_feeds)/sizeof(s_feeds[0]);
static void remove_container_item( GtkWidget *item, GtkWidget *container ) {
gtk_container_remove(GTK_CONTAINER(container), item);
Modified:
trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.h
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.h
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/callbacks.h
2007-03-22 21:43:23 UTC (rev 1491)
@@ -52,6 +52,7 @@
void cb_treeview_selection_changed( GtkTreeSelection *selection, struct
RSSReaderData *d );
gboolean cb_treeview_keypress_event( GtkWidget *entry, GdkEventKey *key,
struct RSSReaderData *d );
void cb_search_entry_changed ( GtkWidget *entry, struct RSSReaderData *d
);
+void cb_treeview_filter_function ( GtkTreeModel *model, GtkTreeIter *iter,
struct RSSReaderData* );
#endif
Modified: trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
2007-03-22 19:41:20 UTC (rev 1490)
+++ trunk/src/target/OM-2007/applications/openmoko-rssreader/src/main.c
2007-03-22 21:43:23 UTC (rev 1491)
@@ -23,17 +23,16 @@
*
* Current Version: $Rev$ ($Date$) [$Author$]
*/
+#include "config.h"
+#include <glib/gi18n.h>
#include "application-data.h"
#include "callbacks.h"
-#include <assert.h>
#include <libmokoui/moko-details-window.h>
-/*
- * use gettext...
- */
-#define _(x) (x)
+#include <assert.h>
+
#define ASSERT_X(x, error) assert(x)
/*
@@ -70,12 +69,26 @@
data->feed_data = gtk_list_store_new( RSS_READER_NUM_COLS,
G_TYPE_STRING /* Author */,
G_TYPE_STRING /* Subject */,
- G_TYPE_STRING /* Date */,
+ G_TYPE_STRING /* The actual string
*/,
+ G_TYPE_DATE /* Date GDate*/,
G_TYPE_STRING /* Link */,
G_TYPE_STRING /* Text */,
G_TYPE_INT /* Text_Type */,
G_TYPE_STRING /* Category */,
G_TYPE_STRING /* Source */ );
+
+ /*
+ * allow to filter for a search string
+ */
+ data->filter_model =
GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(data->feed_data),NULL));
+
+ /*
+ * 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 );
+
data->treeView =
MOKO_TREE_VIEW(moko_tree_view_new_with_model(GTK_TREE_MODEL(data->feed_data)));
moko_paned_window_set_upper_pane( MOKO_PANED_WINDOW(data->window),
GTK_WIDGET(moko_tree_view_put_into_scrolled_window(data->treeView)) );
@@ -88,12 +101,14 @@
column = GTK_TREE_VIEW_COLUMN(gtk_tree_view_column_new_with_attributes(
_("Subject"), ren, "text", RSS_READER_COLUMN_SUBJECT, 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_SUBJECT
);
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));
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 );
moko_tree_view_append_column( MOKO_TREE_VIEW(data->treeView), column );
/*
@@ -165,6 +180,12 @@
*/
g_debug( "openmoko-rssreader starting up" );
+ /* i18n boiler plate */
+ bindtextdomain ( GETTEXT_PACKAGE, RSSREADER_LOCALE_DIR );
+ bind_textdomain_codeset ( GETTEXT_PACKAGE, "UTF-8" );
+ textdomain ( GETTEXT_PACKAGE );
+
+
/*
* initialize threads for fetching the RSS in the background
*/
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog