[balsa/gtk3] Libbalsa_conf_foreach_group passes an encoded URL
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Libbalsa_conf_foreach_group passes an encoded URL
- Date: Fri, 15 Mar 2013 13:32:28 +0000 (UTC)
commit db2d01bcde3246104fd93c933803e29845bcad9a
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Mar 15 09:31:22 2013 -0400
Libbalsa_conf_foreach_group passes an encoded URL
* src/balsa-app.c (append_url_if_open):
* libbalsa_conf_foreach_group passes an encoded URL.
* src/mailbox-node.c (check_url_func): ditto.
ChangeLog | 6 ++++++
src/balsa-app.c | 10 ++++++++--
src/mailbox-node.c | 14 +++++++++++---
3 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f8f3072..8d56e21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-15 Peter Bloomfield
+
+ * src/balsa-app.c (append_url_if_open): libbalsa_conf_foreach
+ passes an encoded URL.
+ * src/mailbox-node.c (check_url_func): ditto.
+
2013-03-14 Peter Bloomfield
Streamline handling of LibBalsaMailboxView
diff --git a/src/balsa-app.c b/src/balsa-app.c
index 406d2ce..9e3e4fe 100644
--- a/src/balsa-app.c
+++ b/src/balsa-app.c
@@ -496,11 +496,17 @@ update_timer(gboolean update, guint minutes)
*/
static gboolean
-append_url_if_open(const gchar * group, const gchar * url,
+append_url_if_open(const gchar * group, const gchar * encoded_url,
GPtrArray * array)
{
+ gchar *url;
+
+ url = libbalsa_urldecode(encoded_url);
+
if (config_mailbox_was_open(url))
- g_ptr_array_add(array, g_strdup(url));
+ g_ptr_array_add(array, url);
+ else
+ g_free(url);
return FALSE;
}
diff --git a/src/mailbox-node.c b/src/mailbox-node.c
index 78c0106..1b266e5 100644
--- a/src/mailbox-node.c
+++ b/src/mailbox-node.c
@@ -326,16 +326,24 @@ struct _CheckPathInfo {
};
static gboolean
-check_url_func(const gchar * group, const gchar * url, CheckPathInfo * cpi)
+check_url_func(const gchar * group, const gchar * encoded_url,
+ CheckPathInfo * cpi)
{
- if (!cpi->must_scan && g_str_has_prefix(url, cpi->url)
+ gchar *url;
+
+ url = libbalsa_urldecode(encoded_url);
+
+ if (g_str_has_prefix(url, cpi->url)
&& (config_mailbox_was_exposed(url)
|| (balsa_app.remember_open_mboxes
&& config_mailbox_was_open(url)))
)
cpi->must_scan = TRUE;
- return FALSE;
+ g_free(url);
+
+ /* stop checking if we already know we must scan deeper */
+ return cpi->must_scan;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]