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. r2650 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
2. r2651 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
3. r2652 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
4. r2653 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
5. r2654 - in
trunk/src/target/OM-2007.2/applications/openmoko-dialer2: . src
([EMAIL PROTECTED])
6. r2655 - in
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2: .
src ([EMAIL PROTECTED])
--- Begin Message ---
Author: njp
Date: 2007-08-06 17:02:56 +0200 (Mon, 06 Aug 2007)
New Revision: 2650
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
* src/moko-notify.c: (moko_notify_start_ringtone):
Try and use the simple commandline gst parser.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 14:41:01 UTC (rev 2649)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 15:02:56 UTC (rev 2650)
@@ -1,5 +1,10 @@
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+ * src/moko-notify.c: (moko_notify_start_ringtone):
+ Try and use the simple commandline gst parser.
+
+2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+
* data/Makefile.am:
Added a default ringtone (until sound themes are finished).
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 14:41:01 UTC (rev 2649)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 15:02:56 UTC (rev 2650)
@@ -70,10 +70,29 @@
{
MokoNotifyPrivate *priv;
GstElement *bin, *filesrc, *decoder, *aconvert, *aresample, *asink;
+ gchar *pipeline;
+ GError *err = NULL;
g_return_if_fail (MOKO_IS_NOTIFY (notify));
priv = notify->priv;
+ pipeline = g_strdup_printf ("filesrc location=%s ! decodebin ! audioconvert
!audioresample ! alsasink", PKGDATADIR DEFAULT_RINGTONE);
+ g_print ("%s\n", PKGDATADIR DEFAULT_RINGTONE);
+ bin = gst_parse_launch (pipeline, &err);
+ if (err)
+ {
+ g_error ("err->message");
+ priv->bin = NULL;
+ g_free (pipeline);
+ return;
+ }
+ priv->bin = bin;
+
+ /* Start playing */
+ gst_element_set_state (bin, GST_STATE_PLAYING);
+ g_free (pipeline);
+ return;
+
/* Create a bin to hold elements */
bin = gst_pipeline_new ("pipeline");
g_assert (bin);
@@ -84,7 +103,7 @@
g_object_set (G_OBJECT (filesrc),
"location", PKGDATADIR DEFAULT_RINGTONE,
NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos",
+ g_signal_connect (G_OBJECT (bin), "eos",
G_CALLBACK (on_filesrc_eos), (gpointer)notify);
/* Decoder */
--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-06 18:03:45 +0200 (Mon, 06 Aug 2007)
New Revision: 2651
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
* src/moko-notify.c: (on_bin_eos), (moko_notify_start_ringtone):
Added intial support for looping the ringtone.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 15:02:56 UTC (rev 2650)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:03:45 UTC (rev 2651)
@@ -1,5 +1,10 @@
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+ * src/moko-notify.c: (on_bin_eos), (moko_notify_start_ringtone):
+ Added intial support for looping the ringtone.
+
+2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+
* src/moko-notify.c: (moko_notify_start_ringtone):
Try and use the simple commandline gst parser.
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 15:02:56 UTC (rev 2650)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:03:45 UTC (rev 2651)
@@ -59,9 +59,24 @@
static void
-on_filesrc_eos (GstElement *element, MokoNotify *notify)
+on_bin_eos (GstElement *element, MokoNotify *notify)
{
+ MokoNotifyPrivate *priv;
+
+ g_return_if_fail (MOKO_IS_NOTIFY (notify));
+ g_return_if_fail (GST_IS_ELEMENT (notify->priv->bin));
+ priv = notify->priv;
+
/* Rewind and play again */
+ gst_element_set_state (priv->bin, GST_STATE_PAUSED);
+
+ /* Seek to 0 */
+ if (!gst_element_seek_simple (priv->bin, GST_FORMAT_TIME, 0, 0))
+ g_error ("Seek error\n");
+ return;
+
+ gst_element_set_state (priv->bin, GST_STATE_PLAYING);
+
g_print ("Audio finished\n");
}
@@ -69,15 +84,20 @@
moko_notify_start_ringtone (MokoNotify *notify)
{
MokoNotifyPrivate *priv;
- GstElement *bin, *filesrc, *decoder, *aconvert, *aresample, *asink;
+ GstElement *bin;
gchar *pipeline;
GError *err = NULL;
g_return_if_fail (MOKO_IS_NOTIFY (notify));
priv = notify->priv;
-
- pipeline = g_strdup_printf ("filesrc location=%s ! decodebin ! audioconvert
!audioresample ! alsasink", PKGDATADIR DEFAULT_RINGTONE);
+
+ /* Create the pipeline */
+ pipeline = g_strdup_printf (
+ "filesrc location=%s ! decodebin ! audioconvert !audioresample ! alsasink",
+ PKGDATADIR DEFAULT_RINGTONE);
g_print ("%s\n", PKGDATADIR DEFAULT_RINGTONE);
+
+ /* Try and gstreamer to parse it */
bin = gst_parse_launch (pipeline, &err);
if (err)
{
@@ -89,66 +109,11 @@
priv->bin = bin;
/* Start playing */
- gst_element_set_state (bin, GST_STATE_PLAYING);
- g_free (pipeline);
- return;
-
- /* Create a bin to hold elements */
- bin = gst_pipeline_new ("pipeline");
- g_assert (bin);
-
- /* Disk reader */
- filesrc = gst_element_factory_make ("filesrc", "source");
- g_assert (filesrc);
- g_object_set (G_OBJECT (filesrc),
- "location", PKGDATADIR DEFAULT_RINGTONE,
- NULL);
g_signal_connect (G_OBJECT (bin), "eos",
- G_CALLBACK (on_filesrc_eos), (gpointer)notify);
-
- /* Decoder */
- decoder = gst_element_factory_make ("decodebin", "decode");
- if (!decoder)
- {
- g_warning ("Could not load 'decodebin'");
- return;
- }
-
- /* Audio convert */
- aconvert = gst_element_factory_make ("audioconvert", NULL);
- if (!aconvert)
- {
- g_warning ("Could not load 'audioconvert'");
- return;
- }
-
- /* Audio resample */
- aresample = gst_element_factory_make ("audioresample", NULL);
- if (!aresample)
- {
- g_warning ("Could not load 'audioresample'");
- return;
- }
-
- /* Audio sink */
- asink = gst_element_factory_make ("alsasink", "play_audio");
- if (!asink)
- {
- g_warning ("Could not load 'alsasink'");
- return;
- }
-
- /* Add objects to the bin */
- gst_bin_add_many (GST_BIN (bin), filesrc, decoder,
- aconvert, aresample, asink, NULL);
-
- /* Link the elements */
- gst_element_link_many (filesrc, decoder, aconvert, aresample, asink, NULL);
-
- priv->bin = bin;
-
- /* Start playing */
+ G_CALLBACK (on_bin_eos), (gpointer)notify);
gst_element_set_state (bin, GST_STATE_PLAYING);
+
+ g_free (pipeline);
}
static void
--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-06 18:33:24 +0200 (Mon, 06 Aug 2007)
New Revision: 2652
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
* src/moko-notify.c: (on_bus_message),
(moko_notify_start_ringtone):
Some more looping fixes.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:03:45 UTC (rev 2651)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:33:24 UTC (rev 2652)
@@ -1,5 +1,11 @@
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+ * src/moko-notify.c: (on_bus_message),
+ (moko_notify_start_ringtone):
+ Some more looping fixes.
+
+2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+
* src/moko-notify.c: (on_bin_eos), (moko_notify_start_ringtone):
Added intial support for looping the ringtone.
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:03:45 UTC (rev 2651)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:33:24 UTC (rev 2652)
@@ -59,14 +59,17 @@
static void
-on_bin_eos (GstElement *element, MokoNotify *notify)
+on_bus_message (GstBus *bus, GstMessage *message, MokoNotify *notify)
{
MokoNotifyPrivate *priv;
g_return_if_fail (MOKO_IS_NOTIFY (notify));
g_return_if_fail (GST_IS_ELEMENT (notify->priv->bin));
priv = notify->priv;
-
+
+ if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_EOS)
+ return;
+
/* Rewind and play again */
gst_element_set_state (priv->bin, GST_STATE_PAUSED);
@@ -108,9 +111,11 @@
}
priv->bin = bin;
+ /* Connect to eos signal to repeat the ringtone */
+ gst_bus_add_watch (gst_element_get_bus (bin),
+ (GstBusFunc)on_bus_message, (gpointer)notify);
+
/* Start playing */
- g_signal_connect (G_OBJECT (bin), "eos",
- G_CALLBACK (on_bin_eos), (gpointer)notify);
gst_element_set_state (bin, GST_STATE_PLAYING);
g_free (pipeline);
--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-06 18:39:09 +0200 (Mon, 06 Aug 2007)
New Revision: 2653
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
* src/moko-notify.c: (on_bus_message):
Connect to the right signals!
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:33:24 UTC (rev 2652)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:39:09 UTC (rev 2653)
@@ -1,5 +1,10 @@
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+ * src/moko-notify.c: (on_bus_message):
+ Connect to the right signals!
+
+2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+
* src/moko-notify.c: (on_bus_message),
(moko_notify_start_ringtone):
Some more looping fixes.
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:33:24 UTC (rev 2652)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:39:09 UTC (rev 2653)
@@ -58,17 +58,19 @@
*/
-static void
+static gboolean
on_bus_message (GstBus *bus, GstMessage *message, MokoNotify *notify)
{
MokoNotifyPrivate *priv;
- g_return_if_fail (MOKO_IS_NOTIFY (notify));
- g_return_if_fail (GST_IS_ELEMENT (notify->priv->bin));
+ g_return_val_if_fail (MOKO_IS_NOTIFY (notify), TRUE);
+ g_return_val_if_fail (GST_IS_ELEMENT (notify->priv->bin), TRUE);
priv = notify->priv;
+ g_print (".");
+
if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_EOS)
- return;
+ return TRUE;
/* Rewind and play again */
gst_element_set_state (priv->bin, GST_STATE_PAUSED);
@@ -76,7 +78,7 @@
/* Seek to 0 */
if (!gst_element_seek_simple (priv->bin, GST_FORMAT_TIME, 0, 0))
g_error ("Seek error\n");
- return;
+ return TRUE;
gst_element_set_state (priv->bin, GST_STATE_PLAYING);
--- End Message ---
--- Begin Message ---
Author: njp
Date: 2007-08-06 19:00:47 +0200 (Mon, 06 Aug 2007)
New Revision: 2654
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
Log:
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
* src/moko-notify.c: (on_bus_eos), (moko_notify_start_ringtone):
More loop deugging.
Modified: trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 16:39:09 UTC (rev 2653)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/ChangeLog
2007-08-06 17:00:47 UTC (rev 2654)
@@ -1,5 +1,10 @@
2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+ * src/moko-notify.c: (on_bus_eos), (moko_notify_start_ringtone):
+ More loop deugging.
+
+2007-08-06 Neil J. Patel <[EMAIL PROTECTED]>
+
* src/moko-notify.c: (on_bus_message):
Connect to the right signals!
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 16:39:09 UTC (rev 2653)
+++ trunk/src/target/OM-2007.2/applications/openmoko-dialer2/src/moko-notify.c
2007-08-06 17:00:47 UTC (rev 2654)
@@ -58,32 +58,28 @@
*/
-static gboolean
-on_bus_message (GstBus *bus, GstMessage *message, MokoNotify *notify)
+static void
+on_bus_eos (GstBus *bus, GstMessage *message, MokoNotify *notify)
{
MokoNotifyPrivate *priv;
- g_return_val_if_fail (MOKO_IS_NOTIFY (notify), TRUE);
- g_return_val_if_fail (GST_IS_ELEMENT (notify->priv->bin), TRUE);
+ g_return_if_fail (MOKO_IS_NOTIFY (notify));
+ g_return_if_fail (GST_IS_ELEMENT (notify->priv->bin));
priv = notify->priv;
g_print (".");
-
- if (GST_MESSAGE_TYPE (message) != GST_MESSAGE_EOS)
- return TRUE;
-
/* Rewind and play again */
gst_element_set_state (priv->bin, GST_STATE_PAUSED);
/* Seek to 0 */
if (!gst_element_seek_simple (priv->bin, GST_FORMAT_TIME, 0, 0))
g_error ("Seek error\n");
- return TRUE;
+ return ;
gst_element_set_state (priv->bin, GST_STATE_PLAYING);
g_print ("Audio finished\n");
-}
+ }
static void
moko_notify_start_ringtone (MokoNotify *notify)
@@ -113,10 +109,13 @@
}
priv->bin = bin;
- /* Connect to eos signal to repeat the ringtone */
+ g_signal_connect (gst_element_get_bus (bin), "message::eos",
+ G_CALLBACK (on_bus_eos), (gpointer)notify);
+
+ /* Connect to eos signal to repeat the ringtone
gst_bus_add_watch (gst_element_get_bus (bin),
(GstBusFunc)on_bus_message, (gpointer)notify);
-
+ */
/* Start playing */
gst_element_set_state (bin, GST_STATE_PLAYING);
--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2007-08-06 22:19:27 +0200 (Mon, 06 Aug 2007)
New Revision: 2655
Added:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-marshal.list
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/ChangeLog
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/configure.ac
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/Makefile.am
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-item-view.c
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-selection-view.c
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/main.c
Log:
2007-08-06 Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Make the Backward and Forward button sensitive/unsensitive depending on
if
one can go backward/forward.
The backward/forward signals are not yet connected.
* configure.ac: Search for genmarshal
* src/Makefile.am: build the custom marshaler
* src/feed-item-view.c: when asked to highlight text, change the entry
as well
(feed_item_view_highlight):
* src/feed-marshal.list: Added.
* src/feed-selection-view.c: Emit the new signal with
can_go_backward/_forward
(treeview_selection_changed):
(feed_selection_view_class_init):
* src/main.c:
(feed_selection_changed): Use the two booleans and pass it on to
item-view
Modified: trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/ChangeLog
2007-08-06 17:00:47 UTC (rev 2654)
+++ trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/ChangeLog
2007-08-06 20:19:27 UTC (rev 2655)
@@ -1,5 +1,22 @@
2007-08-06 Holger Hans Peter Freyther <[EMAIL PROTECTED]>
+ Make the Backward and Forward button sensitive/unsensitive depending
on if
+ one can go backward/forward.
+ The backward/forward signals are not yet connected.
+
+ * configure.ac: Search for genmarshal
+ * src/Makefile.am: build the custom marshaler
+ * src/feed-item-view.c: when asked to highlight text, change the entry
as well
+ (feed_item_view_highlight):
+ * src/feed-marshal.list: Added.
+ * src/feed-selection-view.c: Emit the new signal with
can_go_backward/_forward
+ (treeview_selection_changed):
+ (feed_selection_view_class_init):
+ * src/main.c:
+ (feed_selection_changed): Use the two booleans and pass it on to
item-view
+
+2007-08-06 Holger Hans Peter Freyther <[EMAIL PROTECTED]>
+
Blind compile fix for GNU libc.
* src/feed-data.c:
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/configure.ac
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/configure.ac
2007-08-06 17:00:47 UTC (rev 2654)
+++ trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/configure.ac
2007-08-06 20:19:27 UTC (rev 2655)
@@ -43,6 +43,10 @@
PKG_CHECK_MODULES(GTHREAD, gthread-2.0 )
PKG_CHECK_MODULES(WEBKITGTK, WebKitGdk)
+# glib-genmarshal
+GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
+AC_SUBST(GLIB_GENMARSHAL)
+
# output stuff
AC_OUTPUT([
Makefile
Property changes on:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src
___________________________________________________________________
Name: svn:ignore
- *.*swp
*.swp
Makefile.in
Makefile
.libs
.deps
openmoko-feedreader22
+ *.*swp
*.swp
Makefile.in
Makefile
.libs
.deps
openmoko-feedreader2
.gdb_*
*feed-marshal.h
*feed-marshal.c
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/Makefile.am
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/Makefile.am
2007-08-06 17:00:47 UTC (rev 2654)
+++
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/Makefile.am
2007-08-06 20:19:27 UTC (rev 2655)
@@ -3,12 +3,32 @@
-DRSSREADER_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
-AM_CFLAGS = -Wall -Werror -pedantic -std=c99 @OPENMOKO_CFLAGS@ @MRSS_CFLAGS@
@WEBKITGTK_CFLAGS@
+AM_CFLAGS = -Wall -Werror -std=c99 @OPENMOKO_CFLAGS@ @MRSS_CFLAGS@
@WEBKITGTK_CFLAGS@
bin_PROGRAMS = openmoko-feedreader2
EXTRA_DIST = rfcdate.h moko_cache.h feed-configuration.h feed-data.h
feed-item-view.h feed-selection-view.h application-data.h
-openmoko_feedreader2_SOURCES = feed-configuration.c feed-item-view.c
feed-selection-view.c feed-data.c rfcdate.c moko_cache.c main.c
+built_sources = feed-marshal.h feed-marshal.c
+stamp_files = stamp-feed-marshal.h stamp-feed-marshal.c
+
+$(openmoko_feedreader2_OBJECTS): $(built_sources)
+openmoko_feedreader2_SOURCES = feed-configuration.c feed-item-view.c
feed-selection-view.c feed-data.c rfcdate.c moko_cache.c main.c $(built_sources)
openmoko_feedreader2_LDADD = @OPENMOKO_LIBS@ @MRSS_LIBS@ @GTHREAD_LIBS@
@WEBKITGTK_LIBS@
+feed-marshal.c: stamp-feed-marshal.c
+ @true
+stamp-feed-marshal.c: feed-marshal.list
+ $(GLIB_GENMARSHAL) --prefix=feed_marshal $(srcdir)/feed-marshal.list
--header --body > feed-marshal.c \
+ && echo timestamp >$(@F)
+
+feed-marshal.h: stamp-feed-marshal.h
+ @true
+
+stamp-feed-marshal.h:
+ $(GLIB_GENMARSHAL) --prefix=feed_marshal $(srcdir)/feed-marshal.list
--header >feed-marshal.h \
+ && echo timestamp >$(@F)
+
+CLEANFILES = $(stamp_files) $(built_sources)
+DISTCLEANFILES = $(stamp_files) $(built_sources)
+MAINTAINERCLEANFILES = $(stamp_files) $(built_sources)
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-item-view.c
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-item-view.c
2007-08-06 17:00:47 UTC (rev 2654)
+++
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-item-view.c
2007-08-06 20:19:27 UTC (rev 2655)
@@ -192,5 +192,6 @@
void
feed_item_view_highlight (FeedItemView* view, const gchar* search_string)
{
+ gtk_entry_set_text (GTK_ENTRY(view->search_entry), search_string);
do_highlight (view, search_string);
}
Added:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-marshal.list
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-marshal.list
2007-08-06 17:00:47 UTC (rev 2654)
+++
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-marshal.list
2007-08-06 20:19:27 UTC (rev 2655)
@@ -0,0 +1 @@
+VOID:STRING,BOOLEAN,BOOLEAN
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-selection-view.c
===================================================================
---
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-selection-view.c
2007-08-06 17:00:47 UTC (rev 2654)
+++
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/feed-selection-view.c
2007-08-06 20:19:27 UTC (rev 2655)
@@ -27,6 +27,7 @@
#include "config.h"
#include "feed-selection-view.h"
#include "feed-configuration.h"
+#include "feed-marshal.h"
#include <moko-finger-scroll.h>
#include <glib/gi18n.h>
@@ -46,15 +47,26 @@
GtkTreeIter iter;
gboolean has_selection = gtk_tree_selection_get_selected (selection,
&model, &iter);
gchar* message = 0;
+ gboolean backward, forward;
+ backward = forward = FALSE;
if (has_selection) {
gtk_tree_model_get (model, &iter, RSS_READER_COLUMN_TEXT, &message, -1
);
if (!message)
message = g_strdup (_("Failed to read the text."));
+
+ /*
+ * check if we can go backward/forward in the model
+ */
+ GtkTreePath *previous = gtk_tree_model_get_path (model, &iter);
+ backward = gtk_tree_path_prev (previous);
+ forward = gtk_tree_model_iter_next (model, &iter);
+ gtk_tree_path_free (previous);
} else
message = g_strdup (_("Please select a feed."));
- g_signal_emit (view, feed_selection_view_signals[ITEM_CHANGED], 0,
message);
+
+ g_signal_emit (view, feed_selection_view_signals[ITEM_CHANGED], 0,
message, backward, forward);
g_free (message);
}
@@ -197,8 +209,8 @@
0,
NULL,
NULL,
- g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
+ feed_marshal_VOID__STRING_BOOLEAN_BOOLEAN,
+ G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
}
Modified:
trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/main.c
2007-08-06 17:00:47 UTC (rev 2654)
+++ trunk/src/target/OM-2007.2/applications/openmoko-feedreader2/src/main.c
2007-08-06 20:19:27 UTC (rev 2655)
@@ -45,9 +45,12 @@
}
static void
-feed_selection_changed (FeedSelectionView* view, const gchar* text, struct
ApplicationData* data)
+feed_selection_changed (FeedSelectionView* view, const gchar* text, const
gboolean backward, const gboolean forward, struct ApplicationData* data)
{
feed_item_view_display (data->view, text ? text : _("Failed to read the
text."));
+ feed_item_view_set_can_go_back (data->view, backward);
+ feed_item_view_set_can_go_forward (data->view, forward);
+
if (feed_selection_view_get_search_string (view))
feed_item_view_highlight (data->view,
feed_selection_view_get_search_string (view));
}
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog