[pan2: 153/268] fixes to auto-download and other stuff
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2: 153/268] fixes to auto-download and other stuff
- Date: Mon, 2 Jan 2012 15:50:52 +0000 (UTC)
commit 52bcb23495c224f334c6804f8dc268269fa73cf0
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date: Thu Sep 1 18:01:27 2011 +0200
fixes to auto-download and other stuff
pan/data-impl/data-impl.h | 4 ++--
pan/data/data.h | 2 +-
pan/gui/group-prefs-dialog.cc | 2 ++
pan/gui/header-pane.cc | 1 -
pan/gui/post-ui.cc | 1 -
pan/tasks/task-upload.cc | 5 +++++
uulib/uuencode.c | 29 ++++++++++++++++-------------
7 files changed, 26 insertions(+), 18 deletions(-)
---
diff --git a/pan/data-impl/data-impl.h b/pan/data-impl/data-impl.h
index 35cebee..5225b09 100644
--- a/pan/data-impl/data-impl.h
+++ b/pan/data-impl/data-impl.h
@@ -431,7 +431,7 @@ namespace pan
public: // life cycle
MyTree (DataImpl & data_impl,
const Quark & group,
- const Quark & save_path,
+ const Quark & save_path, // for auto-download
const Data::ShowType show_type,
const FilterInfo * filter_info=0,
const RulesInfo * rules=0,
@@ -455,7 +455,7 @@ namespace pan
private: // implementation fields
const Quark _group;
- const Quark _save_path;
+ const Quark _save_path; // for auto-download
DataImpl & _data;
nodes_t _nodes;
MemChunk<ArticleNode> _node_chunk;
diff --git a/pan/data/data.h b/pan/data/data.h
index f38a37c..52ccd9a 100644
--- a/pan/data/data.h
+++ b/pan/data/data.h
@@ -480,7 +480,7 @@ namespace pan
* Get a collection of headers that match the specified filter.
*/
virtual ArticleTree* group_get_articles (const Quark & group,
- const Quark & save_path,
+ const Quark & save_path, // for auto-download
const ShowType show_type = SHOW_ARTICLES,
const FilterInfo * criteria = 0,
const RulesInfo * rules = 0,
diff --git a/pan/gui/group-prefs-dialog.cc b/pan/gui/group-prefs-dialog.cc
index 10869e6..838b452 100644
--- a/pan/gui/group-prefs-dialog.cc
+++ b/pan/gui/group-prefs-dialog.cc
@@ -63,6 +63,8 @@ GroupPrefsDialog :: save_from_gui ()
const char * pch (file_entry_get (_save_path));
foreach_const (quarks_v, _groups, it)
_group_prefs.set_string (*it, "default-group-save-path", pch);
+
+ _group_prefs.save () ;
}
void
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index cbef674..1a4943f 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -542,7 +542,6 @@ HeaderPane :: set_group (const Quark& new_group)
char * pch = g_build_filename (g_get_home_dir(), "News", NULL);
Quark path(_group_prefs.get_string (_group, "default-group-save-path", pch));
g_free(pch);
- std::cerr<<path<<std::endl;
if (!_group.empty())
{
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 8e8490d..ed86f12 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -694,7 +694,6 @@ PostUI :: close_window (bool flag)
int w(450),h(450);
gtk_window_get_size( GTK_WINDOW(_root), &w, &h);
- std::cerr<<"post ui sizes: "<<w<<" "<<h<<std::endl;
_prefs.set_int("post-ui-width", w);
_prefs.set_int("post-ui-height", h);
diff --git a/pan/tasks/task-upload.cc b/pan/tasks/task-upload.cc
index e5af38f..168324c 100644
--- a/pan/tasks/task-upload.cc
+++ b/pan/tasks/task-upload.cc
@@ -211,13 +211,18 @@ TaskUpload :: prepend_headers(GMimeMessage* msg, TaskUpload::Needed * n, std::st
char * all;
if (_first && _queue_pos==-1)
all = g_mime_object_to_string ((GMimeObject *) msg);
+ else if (_first && _queue_pos==0)
+ all = g_mime_object_to_string ((GMimeObject *) msg);
else
all = g_mime_object_get_headers ((GMimeObject *) msg);
+
out << all << "\n";
if (_first && _queue_pos == -1) g_free(all);
out << d;
d = out.str();
+// std::cerr<<d<<std::endl<<std::endl;
+
if (_first) _first = !_first;
}
diff --git a/uulib/uuencode.c b/uulib/uuencode.c
index 0f4ac43..d173002 100644
--- a/uulib/uuencode.c
+++ b/uulib/uuencode.c
@@ -1711,19 +1711,22 @@ UUEncodePartial_byFSize (FILE *outfile, FILE *infile,
* print sub-header
*/
- if (encoding != YENC_ENCODED)
- {
- fprintf (outfile, "MIME-Version: 1.0%s", eolstring);
- fprintf (outfile, "Content-Type: %s%s",
- (mimetype)?mimetype:"Application/Octet-Stream",
- eolstring);
- fprintf (outfile, "Content-Transfer-Encoding: %s%s",
- CTE_TYPE(encoding), eolstring);
- fprintf (outfile, "Content-Disposition: attachment; filename=\"%s\"%s",
- UUFNameFilter ((outfname)?outfname:infname), eolstring);
- }
-
- fprintf (outfile, "%s", eolstring);
+ // pan change (imhotep) : headers are already in the gmimemessage, so there's no need to add them
+ // to the body.
+
+// if (encoding != YENC_ENCODED)
+// {
+// fprintf (outfile, "MIME-Version: 1.0%s", eolstring);
+// fprintf (outfile, "Content-Type: %s%s",
+// (mimetype)?mimetype:"Application/Octet-Stream",
+// eolstring);
+// fprintf (outfile, "Content-Transfer-Encoding: %s%s",
+// CTE_TYPE(encoding), eolstring);
+// fprintf (outfile, "Content-Disposition: attachment; filename=\"%s\"%s",
+// UUFNameFilter ((outfname)?outfname:infname), eolstring);
+// }
+//
+// fprintf (outfile, "%s", eolstring);
/*
* for the first part of UU or XX messages, print a begin line
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]