[pan2: 147/268] done debugging for now...



commit 710bfdef19407dc00c3aa5d362c37c0955138b58
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Sun Jul 31 12:29:37 2011 +0200

    done debugging for now...

 pan/gui/header-pane.cc   |    8 +-------
 pan/gui/post-ui.cc       |    8 +++++---
 pan/tasks/task-upload.cc |    7 ++++---
 uulib/uudeview.h         |   16 ++++++++--------
 uulib/uuencode.c         |   12 +++++-------
 uulib/uunconc.c          |   12 ++++++------
 6 files changed, 29 insertions(+), 34 deletions(-)
---
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index 07d079a..b3fe766 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -1047,7 +1047,6 @@ HeaderPane :: rebuild_rules (bool enable)
 
   if (!enable)
   {
-    std::cerr<<"clear rules\n";
     _rules.clear();
     return;
   }
@@ -1235,15 +1234,10 @@ HeaderPane :: rules(bool enable)
   {
     _wait.watch_cursor_on ();
 
-    if (_rules._aggregates.empty()) {
+    if (_rules._aggregates.empty())
       _atree->set_rules();
-      std::cerr<<"rules, aggr empty\n";
-    }
     else
-    {
-      std::cerr<<"rules, aggr NOT empty, size "<<_rules._aggregates.size()<< "\n";
       _atree->set_rules(_show_type, &_rules);
-    }
 
     _wait.watch_cursor_off ();
   }
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 4ad9707..4b443ef 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -108,7 +108,7 @@ inline int close(int fd) {return _close(fd);}
 
   void on_inline_toggled (GtkToggleAction * toggle, gpointer)
   {
-    inline_or_bulk = gtk_toggle_action_get_active (toggle);
+//    inline_or_bulk = gtk_toggle_action_get_active (toggle);
   }
 
   void on_mr_toggled (GtkToggleAction * toggle, gpointer)
@@ -312,7 +312,6 @@ PostUI :: set_spellcheck_enabled (bool enabled)
 std::string
 PostUI :: get_body () const
 {
-  std::cerr<<"get body\n";
   std::string body;
   GtkTextBuffer * buf (_body_buf);
   GtkTextView * view (GTK_TEXT_VIEW(_body_view));
@@ -471,7 +470,7 @@ namespace
     { "wrap", GTK_STOCK_JUSTIFY_FILL, N_("_Wrap Text"), 0, N_("Wrap Text"), G_CALLBACK(do_wrap), true },
     { "always-run-editor", 0, N_("Always Run Editor"), 0, 0, G_CALLBACK(do_edit2), false },
     { "remember-charset", 0, N_("Remember Character Encoding for this Group"), 0, 0, G_CALLBACK(on_remember_charset_toggled), true },
-    { "inline-or-bulk", 0, N_("Attachments are inlined with Message"), 0, 0, G_CALLBACK(on_inline_toggled), false },
+//    { "inline-or-bulk", 0, N_("Attachments are inlined with Message"), 0, 0, G_CALLBACK(on_inline_toggled), false },
     { "master-reply", 0, N_("All Attachments are threaded replies to message"), 0, 0, G_CALLBACK(on_mr_toggled), true },
     { "spellcheck", 0, N_("Check _Spelling"), 0, 0, G_CALLBACK(on_spellcheck_toggled), true }
   };
@@ -1039,6 +1038,9 @@ PostUI :: maybe_post_message (GMimeMessage * message)
     _queue.add_task (_post_task, Queue::TOP);
   } else {
 
+    //dbg
+    inline_or_bulk = false;
+
     // prepend header for xml file (if one was chosen)
     if (!_save_file.empty())
     {
diff --git a/pan/tasks/task-upload.cc b/pan/tasks/task-upload.cc
index 9ed80a3..4deb104 100644
--- a/pan/tasks/task-upload.cc
+++ b/pan/tasks/task-upload.cc
@@ -210,14 +210,16 @@ 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);
+      g_free(all);
+    }
     else
       all = g_mime_object_get_headers ((GMimeObject *) msg);
     out << all << "\n";
     out << d;
     d = out.str();
 
-    if (_first && _queue_pos==-1) g_free(all);
     if (_first) _first = !_first;
 }
 
@@ -248,7 +250,7 @@ TaskUpload :: use_nntp (NNTP * nntp)
     if (_queue_pos != -1)
       set_status_va (_("Uploading %s - Part %d of %d"), _basename.c_str(), needed->partno, _total_parts);
     else
-      set_status_va (_("Uploading %s - Part %d of %d"), _basename.c_str(), 1, _total_parts);
+      set_status_va (_("Uploading Message body with Subject \"%s\""), _subject.c_str());
 
     std::string data;
     if (_queue_pos != -1) _cache.get_data(data,needed->message_id.c_str());
@@ -288,7 +290,6 @@ TaskUpload :: on_nntp_done (NNTP * nntp,
     }
 
   if (!found) goto _end;
-
   if (_queue_pos == -1) { _needed.erase(it); goto _end; }
 
   switch (health)
diff --git a/uulib/uudeview.h b/uulib/uudeview.h
index c47fcc8..753279d 100644
--- a/uulib/uudeview.h
+++ b/uulib/uudeview.h
@@ -163,14 +163,14 @@ typedef struct _uulist {
  */
 
 typedef struct {
-  int  action;			/* see UUACT_* definitions above           */
-  char curfile[256];		/* the file we are working on, incl. path  */
-  int  partno;			/* part we're currently decoding           */
-  int  numparts;		/* total number of parts of this file      */
-  long fsize;			/* size of the current file                */
-  int  percent;			/* % of _current part_                     */
-  long foffset;			/* file offset -- internal use only        */
-  long totsize;			/* file total size -- internal use only    */
+  int  action;			 /* see UUACT_* definitions above           */
+  char curfile[2048];/* the file we are working on, incl. path  */
+  int  partno;		 	 /* part we're currently decoding           */
+  int  numparts;		 /* total number of parts of this file      */
+  long fsize;			   /* size of the current file                */
+  int  percent;			 /* % of _current part_                     */
+  long foffset;			 /* file offset -- internal use only        */
+  long totsize;			 /* file total size -- internal use only    */
 } uuprogress;
 
 
diff --git a/uulib/uuencode.c b/uulib/uuencode.c
index c50a6b0..0f4ac43 100644
--- a/uulib/uuencode.c
+++ b/uulib/uuencode.c
@@ -1180,7 +1180,7 @@ UUEncodeMulti (FILE *outfile, FILE *infile, char *infname, int encoding,
   if (progress.fsize < 0)
     progress.fsize = -1;
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 2048);
 
   progress.partno   = 1;
   progress.numparts = 1;
@@ -1390,7 +1390,7 @@ UUEncodePartial (FILE *outfile, FILE *infile,
           theifile = infile;
         }
 
-      _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+      _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 2048);
 
       progress.totsize  = (thesize>=0) ? thesize : -1;
       progress.partno   = 1;
@@ -1677,7 +1677,7 @@ UUEncodePartial_byFSize (FILE *outfile, FILE *infile,
           theifile = infile;
         }
 
-      _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+      _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 2048);
 
       progress.totsize  = (thesize>=0) ? thesize : -1;
       progress.partno   = 1;
@@ -1768,8 +1768,6 @@ UUEncodePartial_byFSize (FILE *outfile, FILE *infile,
       else
         {
 
-          printf("parts of %s %ld\n",progress.curfile, progress.numparts);
-
           if (progress.totsize == -1)
             {
               fprintf (outfile, "=ybegin line=128 name=%s%s",
@@ -1952,7 +1950,7 @@ UUEncodeToStream (FILE *outfile, FILE *infile,
   if (progress.fsize < 0)
     progress.fsize = -1;
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 2048);
 
   progress.partno   = 1;
   progress.numparts = 1;
@@ -2179,7 +2177,7 @@ UUEncodeToFile (FILE *infile, char *infname, int encoding,
       theifile = infile;
     }
 
-  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 256);
+  _FP_strncpy (progress.curfile, (outfname)?outfname:infname, 2048);
 
   progress.totsize  = (progress.totsize<0) ? -1 : progress.totsize;
   progress.numparts = numparts;
diff --git a/uulib/uunconc.c b/uulib/uunconc.c
index 112e618..42f9753 100644
--- a/uulib/uunconc.c
+++ b/uulib/uunconc.c
@@ -1393,15 +1393,15 @@ UUDecode (uulist *data)
   progress.action = 0;
   if (data->filename != NULL) {
     _FP_strncpy (progress.curfile,
-		 (strlen(data->filename)>255)?
-		 (data->filename+strlen(data->filename)-255):data->filename,
-		 256);
+		 (strlen(data->filename)>2047)?
+		 (data->filename+strlen(data->filename)-2047):data->filename,
+		 2048);
   }
   else {
     _FP_strncpy (progress.curfile,
-		 (strlen(data->binfile)>255)?
-		 (data->binfile+strlen(data->binfile)-255):data->binfile,
-		 256);
+		 (strlen(data->binfile)>2047)?
+		 (data->binfile+strlen(data->binfile)-2047):data->binfile,
+		 2048);
   }
   progress.partno   =  0;
   progress.numparts =  0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]