aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-seekable-substream.c
diff options
context:
space:
mode:
authorBertrand Guiheneuf <bertrand@src.gnome.org>2000-02-22 08:10:22 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>2000-02-22 08:10:22 +0800
commitd28c85dd04ba77b30232c8c5dc1c5db3d4c14753 (patch)
tree19698fb20e5eb5ddf398bf9ffe023e30eea563d7 /camel/camel-seekable-substream.c
parent3b3a08b1de601f1ec9fd0d8f210b0ec49bfba1a1 (diff)
downloadgsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar.gz
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar.bz2
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar.lz
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar.xz
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.tar.zst
gsoc2013-evolution-d28c85dd04ba77b30232c8c5dc1c5db3d4c14753.zip
A lot of changes in the way the parsing works. I am too lazy
to find all the changes. Important notice, I added uggly hacks to camel-formatter.c and message-browser so that I could test b64 decoding. Saving streams works. Have to implement qp now. svn path=/trunk/; revision=1893
Diffstat (limited to 'camel/camel-seekable-substream.c')
-rw-r--r--camel/camel-seekable-substream.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/camel/camel-seekable-substream.c b/camel/camel-seekable-substream.c
index 2b4b7d2917..5e7bb72d21 100644
--- a/camel/camel-seekable-substream.c
+++ b/camel/camel-seekable-substream.c
@@ -182,6 +182,14 @@ _set_bounds (CamelSeekableSubstream *seekable_substream, guint32 inf_bound, gint
CAMEL_LOG_FULL_DEBUG ("CamelSeekableSubstream::_set_bounds Leaving\n");
}
+static void
+_reemit_parent_signal (CamelStream *parent_stream, gpointer user_data)
+{
+ CamelSeekableSubstream *seekable_substream = CAMEL_SEEKABLE_SUBSTREAM (user_data);
+
+ gtk_signal_emit_by_name (GTK_OBJECT (seekable_substream), "data_available");
+
+}
static void
@@ -201,6 +209,20 @@ _init_with_seekable_stream_and_bounds (CamelSeekableSubstream *seekable_substre
/* set the bound of the substream */
_set_bounds (seekable_substream, inf_bound, sup_bound);
+
+ /*
+ * connect to the parent stream "data_available"
+ * stream so that we can reemit the signal on the
+ * seekable substream in case some data would
+ * be available for us
+ */
+ gtk_signal_connect (GTK_OBJECT (parent_stream),
+ "data_available",
+ _reemit_parent_signal,
+ seekable_substream);
+
+ gtk_signal_emit_by_name (GTK_OBJECT (seekable_substream), "data_available");
+
}
@@ -454,7 +476,7 @@ _seek (CamelSeekableStream *stream, gint offset, CamelStreamSeekPolicy policy)
seekable_stream->cur_pos = MIN (real_offset, substream_len);
} else
seekable_stream->cur_pos = 0;
- printf ("** set in substream %p, offset=%d\n", stream, real_offset);
+ printf ("** set in substream %p, offset=%lld\n", stream, real_offset);
}