[pan2] fix a few bugzilla bugs (sorry, can't remember the numbers...)



commit f7f40e04d45a29aad3bd42fdb428f6686f6b2d62
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Fri Dec 2 16:00:30 2011 +0100

    fix a few bugzilla bugs (sorry, can't remember the numbers...)

 pan/data-impl/headers.cc          |   22 ++++++++++--------
 pan/gui/body-pane.cc              |   26 ++++++++++----------
 pan/gui/dl-headers-ui.cc          |    4 +-
 pan/gui/gui.cc                    |   45 ++++++++++++++++++-------------------
 pan/gui/header-pane.cc            |   10 ++++----
 pan/gui/pan.cc                    |    4 +-
 pan/gui/post-ui.cc                |   28 +++++++++++-----------
 pan/gui/save-ui.cc                |    4 ++-
 pan/usenet-utils/message-check.cc |   10 +++++--
 9 files changed, 80 insertions(+), 73 deletions(-)
---
diff --git a/pan/data-impl/headers.cc b/pan/data-impl/headers.cc
index 1e62c2b..868ab66 100644
--- a/pan/data-impl/headers.cc
+++ b/pan/data-impl/headers.cc
@@ -117,7 +117,7 @@ DataImpl :: GroupHeaders :: remove_articles (const quarks_t& mids)
     (*it)->_article = 0;
   _dirty = true;
 }
-  
+
 const DataImpl :: GroupHeaders*
 DataImpl :: get_group_headers (const Quark& group) const
 {
@@ -239,7 +239,7 @@ void
 DataImpl :: load_article (const Quark       & group,
                           Article           * article,
                           const StringView  & references)
-              
+
 {
 #if 0
   std::cerr << LINE_ID << " adding article "
@@ -261,7 +261,8 @@ DataImpl :: load_article (const Quark       & group,
     node = h->_nodes[mid] = &h->_node_chunk.back();
     node->_mid = mid;
   }
-  assert (!node->_article);
+  // !!INFO!! : this is bypassed for now, as it causes an abort on local cache corruptions
+  //assert (!node->_article);
   node->_article = article;
   ArticleNode * article_node = node;
 
@@ -463,7 +464,7 @@ DataImpl :: load_headers (const DataIO   & data_io,
 
       Xref::targets_t targets;
       std::vector<Xref::Target>& targets_v (targets.get_container());
-        
+
       // each article in this group...
       unsigned int expire_count (0);
       in->getline (line);
@@ -614,18 +615,19 @@ namespace
 
   struct QuarkToSymbol
   {
+    char buf[2];
+    QuarkToSymbol() { buf[1] = '\0'; }
+
     typedef Loki::AssocVector < pan::Quark, char > quark_to_symbol_t;
     quark_to_symbol_t _map;
 
-    const char* operator() (const Quark& quark) const
+    const char* operator() (const Quark& quark)
     {
-      static char buf[2];
       quark_to_symbol_t::const_iterator it (_map.find (quark));
       if (it == _map.end())
         return quark.c_str();
 
       buf[0] = it->second;
-      buf[1] = '\0';
       return buf;
     }
 
@@ -825,7 +827,7 @@ DataImpl :: save_headers (DataIO& data_io, const Quark& group) const
    const double time_elapsed (timer.get_seconds_elapsed());
    if (success)
       Log::add_info_va (
-   _("Saved %lu parts, %lu articles in \"%s\" in %.1f seconds (%.0f art/sec)"),
+   _("Saved %lu parts, %lu articles in \"%s\" in %.1f seconds (%.0f articles/sec)"),
          part_count,
          article_count,
          group.c_str(),
@@ -887,7 +889,7 @@ DataImpl :: mark_read (const Article  ** articles,
     fire_group_counts (group, g._unread_count, g._article_count);
     on_articles_changed (group, it->second, false);
   }
-  
+
   if( !newsrc_autosave_id && newsrc_autosave_timeout )
     newsrc_autosave_id = g_timeout_add_seconds( newsrc_autosave_timeout * 60, nrc_as_cb, this);
 }
@@ -1108,7 +1110,7 @@ DataImpl :: delete_articles (const unique_articles_t& articles)
 
     // remove the articles from our lookup table...
     GroupHeaders * h (get_group_headers (group));
-    if (h) 
+    if (h)
       h->remove_articles (it->second.mids);
   }
 
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index 8af0082..5069cfc 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -100,7 +100,7 @@ namespace
 
   PixbufCache& get_pixbuf_cache (gpointer gp) {
     static const char * PIXBUF_CACHE ("pixbuf-cache");
-    GObject * o (G_OBJECT (gp)); 
+    GObject * o (G_OBJECT (gp));
     PixbufCache *pc ((PixbufCache*) g_object_get_data(o, PIXBUF_CACHE));
     if (!pc) {
       pc = new PixbufCache ();
@@ -339,8 +339,8 @@ namespace
   {
     const int begin_offset (gtk_text_iter_get_offset (iter));
 
-    GdkPixbuf * original (0);    
-    GdkPixbuf * old_scaled (0);    
+    GdkPixbuf * original (0);
+    GdkPixbuf * old_scaled (0);
     if (!get_pixbuf_at_offset (buf, begin_offset, original, old_scaled))
       return;
 
@@ -559,7 +559,7 @@ namespace
       for (;;) {
         if (str == line_end)
           break;
-        else if (text_massager->is_quote_character (g_utf8_get_char (str))) 
+        else if (text_massager->is_quote_character (g_utf8_get_char (str)))
           ++depth;
         else if (!g_unichar_isspace(g_utf8_get_char(str)))
           break;
@@ -606,7 +606,7 @@ namespace
   }
 
   enum TagMode { ADD, REPLACE };
- 
+
   void
   set_section_tag (GtkTextBuffer     * buffer,
                    GtkTextIter       * start,
@@ -707,8 +707,8 @@ namespace
     int offset (0);
     if (GNKSA::find_signature_delimiter (v, offset) != GNKSA::SIG_NONE)
       sig_point = v.str + offset;
-   
-    // colorize the quoted text 
+
+    // colorize the quoted text
     GtkTextIter mark_end;
     std::string last_quote_tag;
     bool is_sig (false);
@@ -798,7 +798,7 @@ namespace
         }
       }
     }
-    
+
     // colorize urls
     if (do_urls) {
       StringView area;
@@ -838,7 +838,7 @@ namespace
       gsize bytesLeft = buffer->len;
       guchar * data = buffer->data;
 
-      // ticket #467446 - workaround gdkpixbuf <= 2.12.x's 
+      // ticket #467446 - workaround gdkpixbuf <= 2.12.x's
       // jpg loader bug (#494667) by feeding the loader in
       // smaller chunks
       while( bytesLeft > 0 )
@@ -1079,7 +1079,7 @@ BodyPane :: set_text_from_message (GMimeMessage * message)
       }
     }
   }
-  
+
   s.resize (s.size()-1); // remove trailing linefeed
   gtk_label_set_markup (GTK_LABEL(_headers), s.c_str());
 
@@ -1341,7 +1341,7 @@ BodyPane :: copy_url ()
   gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_CLIPBOARD),
                           _hover_url.c_str(), _hover_url.size());
 }
- 
+
 
 void
 BodyPane :: populate_popup_cb (GtkTextView *v, GtkMenu *m, gpointer pane)
@@ -1549,7 +1549,7 @@ namespace
   }
 
   std::string get_header (GMimeMessage * msg,
-                          const char   * key, 
+                          const char   * key,
                           const char   * fallback_charset_1,
                           const char   * fallback_charset_2)
   {
@@ -1617,6 +1617,7 @@ BodyPane :: create_followup_or_reply (bool is_reply)
     const std::string newsgroups (get_header (_message, "Newsgroups",  message_charset, group_charset));
     const std::string fup_to     (get_header (_message, "Followup-To", message_charset, group_charset));
     const std::string reply_to   (get_header (_message, "Reply-To",    message_charset, group_charset));
+
     if (is_reply || fup_to=="poster") {
       const std::string& to (reply_to.empty() ? from : reply_to);
       pan_g_mime_message_add_recipients_from_string (msg, GMIME_RECIPIENT_TYPE_TO, to.c_str());
@@ -1634,7 +1635,6 @@ BodyPane :: create_followup_or_reply (bool is_reply)
     g_mime_message_set_subject (msg, val.c_str());
 
     // attribution lines
-
     const char * cpch = g_mime_object_get_header (_message_obj, "From");
     h = header_to_utf8 (cpch, message_charset, group_charset);
     g_mime_object_append_header (msg_obj, "X-Draft-Attribution-Author", h.c_str());
diff --git a/pan/gui/dl-headers-ui.cc b/pan/gui/dl-headers-ui.cc
index 383a863..2eaaa3f 100644
--- a/pan/gui/dl-headers-ui.cc
+++ b/pan/gui/dl-headers-ui.cc
@@ -109,10 +109,10 @@ pan :: headers_dialog (Data& data, Prefs& prefs, Queue& queue,
       title += groups.begin()->c_str();
     else {
       char buf[64];
-      g_snprintf (buf, sizeof(buf), _("%d Groups"), (int)groups.size());
+      g_snprintf (buf, sizeof(buf), ngettext("%d Group","%d Groups", (int)groups.size()), (int)groups.size());
       title += buf;
     }
-    
+
     State * state = new State (data, prefs, queue);
     state->groups = groups;
     state->dialog = gtk_dialog_new_with_buttons (
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 470c556..53ec36a 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -210,7 +210,7 @@ GUI :: GUI (Data& data, Queue& queue, ArticleCache& cache, Prefs& prefs, GroupPr
   gtk_container_add (GTK_CONTAINER(item), _header_pane->create_filter_entry());
   gtk_widget_show_all (GTK_WIDGET(item));
   gtk_toolbar_insert (GTK_TOOLBAR(toolbar), item, index+1);
-  
+
   //guint merge_id = gtk_ui_manager_new_merge_id (_ui_manager);
   //gtk_ui_manager_add_ui (_ui_manager, merge_id, path, "group-pane-filter", NULL, GTK_UI_MANAGER_TOOLITEM, true);
   //GtkWidget * item = gtk_ui_manager_get_widget (_ui_manager, path);
@@ -270,7 +270,7 @@ GUI :: GUI (Data& data, Queue& queue, ArticleCache& cache, Prefs& prefs, GroupPr
   gtk_box_pack_start (GTK_BOX(status_bar), _taskbar, true, true, 0);
   gtk_widget_show_all (status_bar);
 
-  // status 
+  // status
   w = _event_log_button = gtk_button_new ();
   gtk_widget_set_tooltip_text (w, _("Open the Event Log"));
   gtk_button_set_relief (GTK_BUTTON(w), GTK_RELIEF_NONE);
@@ -311,10 +311,10 @@ GUI :: GUI (Data& data, Queue& queue, ArticleCache& cache, Prefs& prefs, GroupPr
 
   gtk_accel_map_load (get_accel_filename().c_str());
 
-  { // make sure taskbar views have the right tasks in them -- 
+  { // make sure taskbar views have the right tasks in them --
     // when Pan first starts, the active tasks are already running
     Queue::task_states_t task_states;
-    queue.get_all_task_states(task_states);    
+    queue.get_all_task_states(task_states);
     foreach(Queue::tasks_t, task_states.tasks, it) {
       Queue::TaskState s = task_states.get_state(*it);
       if (s == Queue::RUNNING || s == Queue::DECODING)
@@ -529,13 +529,13 @@ GUI :: prompt_user_for_save_path (GtkWindow * parent, const Prefs& prefs)
 std::string
 GUI :: prompt_user_for_filename (GtkWindow * parent, const Prefs& prefs)
 {
-	
+
   if (prev_path.empty())
     prev_path = prefs.get_string ("default-save-attachments-path", g_get_home_dir ());
   if (!file :: file_exists (prev_path.c_str()))
   prev_path = g_get_home_dir ();
     prev_file = std::string(_("Untitled.nzb"));
-    
+
   GtkWidget * w = gtk_file_chooser_dialog_new (_("Save NZB File as..."),
 				      parent,
 				      GTK_FILE_CHOOSER_ACTION_SAVE,
@@ -545,7 +545,7 @@ GUI :: prompt_user_for_filename (GtkWindow * parent, const Prefs& prefs)
 	gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (w), TRUE);
 	gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (w), prev_path.c_str());
 	gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (w), prev_file.c_str());
-	
+
 	std::string file;
 	const int response (gtk_dialog_run (GTK_DIALOG(w)));
 	if (response == GTK_RESPONSE_ACCEPT) {
@@ -593,11 +593,11 @@ void GUI :: do_save_articles_to_nzb ()
       std::string emptystring;
       foreach_const (std::vector<Article>, copies, it)
         tasks.push_back (new TaskArticle (_data, _data, *it, _cache, _data, 0, TaskArticle::RAW,emptystring));
-    
+
           // write them to a file
           std::ofstream tmp(file.c_str());
           if (tmp.good()) {
-            NZB :: nzb_to_xml_file (tmp, tasks); 
+            NZB :: nzb_to_xml_file (tmp, tasks);
             tmp.close();
           }
     }
@@ -643,7 +643,7 @@ namespace
     }
 
     virtual ~SaveArticlesFromNZB() {}
-    
+
     virtual void on_progress_finished (Progress&, int status)
     {
       if (status == OK) {
@@ -758,7 +758,7 @@ namespace
       gtk_container_add (GTK_CONTAINER(w), new_child);
       gtk_widget_show (new_child);
     }
-  } 
+  }
 }
 
 void GUI :: on_log_entry_added (const Log::Entry& e)
@@ -1066,7 +1066,7 @@ void GUI :: do_supersede_article ()
   // did this user post the message?
   const char * sender (g_mime_message_get_sender (message));
   const bool user_posted_this (_data.has_from_header (sender));
-  
+
   if (!user_posted_this) {
     GtkWidget * w = gtk_message_dialog_new (
       get_window(_root),
@@ -1388,7 +1388,7 @@ GUI :: notebook_page_switched_cb (GtkNotebook *, GtkNotebookPage *, gint page_nu
   }
   g_idle_add (grab_focus_idle, w);
 }
- 
+
 void GUI :: do_tabbed_layout (bool tabbed)
 {
   if (hpane) {
@@ -1520,14 +1520,12 @@ void GUI :: do_show_selected_article_info ()
     char msg[512];
     *msg = '\0';
     std::ostringstream s;
-    if (n_parts > 1) {
-      if (missing_parts.empty())
-        g_snprintf (msg, sizeof(msg), _("This article has all %d parts."), (int)n_parts);
-      else
-        g_snprintf (msg, sizeof(msg), _("This article is missing %d of its %d parts:"), (int)missing_parts.size(), (int)n_parts);
-      foreach_const (std::set<number_t>, missing_parts, it)
-        s << ' ' << *it;
-    }
+    if (missing_parts.empty())
+      g_snprintf (msg, sizeof(msg), ngettext("This article is complete with %d part.","This article has all %d parts.",(int)n_parts), (int)n_parts);
+    else
+      g_snprintf (msg, sizeof(msg), ngettext("This article is missing %d part.","This article is missing %d of its %d parts:",(int)n_parts), (int)missing_parts.size(), (int)n_parts);
+    foreach_const (std::set<number_t>, missing_parts, it)
+      s << ' ' << *it;
 
     GtkWidget * w = gtk_message_dialog_new_with_markup (
       get_window(_root),
@@ -1709,8 +1707,9 @@ GUI :: refresh_connection_label ()
   {
     g_snprintf (str, sizeof(str), _("Offline"));
 
+    int num(active+idle);
     if (active || idle)
-      g_snprintf (tip, sizeof(tip), _("Closing %d connections"), (active+idle));
+        g_snprintf (tip, sizeof(tip), ngettext("Closing %d connection","Closing %d connections", num), num);
     else
       g_snprintf (tip, sizeof(tip), _("No Connections"));
   }
@@ -1720,7 +1719,7 @@ GUI :: refresh_connection_label ()
     g_snprintf (tip, sizeof(tip), "%s", str);
   }
   else if (active || idle)
-  { 
+  {
     typedef std::vector<Queue::ServerConnectionCounts> counts_t;
     counts_t counts;
     _queue.get_full_connection_counts (counts);
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index 6f2b330..ddd3f7f 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -131,7 +131,7 @@ namespace
                       const Quark         & message_id)
   {
     int offset (ICON_EMPTY);
-      
+
     if (queue.contains (message_id))
       offset = ICON_QUEUED;
     else if (cache.contains (message_id))
@@ -319,7 +319,7 @@ HeaderPane :: create_row (const EvolutionDateMaker & e,
 
   std::pair<mid_to_row_t::iterator,bool> result (_mid_to_row.insert (row));
   g_assert (result.second);
-  
+
   return row;
 }
 
@@ -684,7 +684,7 @@ HeaderPane :: on_tree_change (const Data::ArticleTree::Diffs& diffs)
     }
     _tree_store->insert_sorted (tmp);
   }
-     
+
   // reparent...
   if (do_thread && !diffs.reparented.empty()) {
     PanTreeStore::parent_to_children_t tmp;
@@ -916,7 +916,7 @@ HeaderPane :: on_button_pressed (GtkWidget * treeview, GdkEventButton *event, gp
     GtkTreeSelection * selection = gtk_tree_view_get_selection(tv);
     GtkTreePath *path;
     if (gtk_tree_view_get_path_at_pos (tv,
-                                       (gint) event->x, 
+                                       (gint) event->x,
                                        (gint) event->y,
                                        &path, NULL, NULL, NULL))
     {
@@ -1869,7 +1869,7 @@ namespace
 }
 
 /**
-*** 
+***
 **/
 
 void
diff --git a/pan/gui/pan.cc b/pan/gui/pan.cc
index 117cb03..5f47aa0 100644
--- a/pan/gui/pan.cc
+++ b/pan/gui/pan.cc
@@ -175,7 +175,7 @@ namespace
     ~PanKiller() { q.remove_listener(this); }
 
     /** Method from Queue::Listener interface: quits program on zero sized Q*/
-    void on_queue_size_changed (Queue&, int active, int total) 
+    void on_queue_size_changed (Queue&, int active, int total)
       {  if (!active && !total) mainloop_quit();  }
 
     // all below methods from Queue::Listener interface are noops
@@ -278,7 +278,7 @@ main (int argc, char *argv[])
       nzb = true;
     else if (!strcmp (tok, "--version"))
       { std::cerr << "Pan " << VERSION << '\n'; return 0; }
-    else if (!strcmp (tok, "-o") && i<argc-1) 
+    else if (!strcmp (tok, "-o") && i<argc-1)
       nzb_output_path = argv[++i];
     else if (!memcmp (tok, "--output=", 9))
       nzb_output_path = tok+9;
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index ad4b754..f8a416e 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -135,7 +135,7 @@ PostUI :: get_body () const
   GtkTextBuffer * buf (_body_buf);
   GtkTextView * view (GTK_TEXT_VIEW(_body_view));
   const bool wrap (_prefs.get_flag ("compose-wrap-enabled", false));
-  
+
   // walk through all the complete lines...
   GtkTextIter body_start, body_end, line_start, line_end;
   gtk_text_buffer_get_bounds (buf, &body_start, &body_end);
@@ -320,7 +320,7 @@ PostUI :: rot13_selection ()
     gtk_text_buffer_insert (_body_buf, &start, str, strlen(str));
     g_free (str);
   }
-} 
+}
 
 void
 PostUI :: wrap_selection ()
@@ -421,7 +421,7 @@ PostUI :: check_charset ()
   if (charset == "UTF-8")
     return true;
 
-  // Check if body can be posted in the selected charset 
+  // Check if body can be posted in the selected charset
   const std::string body (get_body ());
   char *tmp = g_convert (body.c_str(), -1, charset.c_str(), "UTF-8", NULL, NULL, NULL);
   if (tmp) {
@@ -439,7 +439,7 @@ PostUI :: check_charset ()
   char * msg = g_strdup_printf (_("Message uses characters not specified in charset '%s' - possibly use '%s' "), charset.c_str(), tmp);
   GtkWidget * d = gtk_message_dialog_new (GTK_WINDOW(_root),
                                           GTK_DIALOG_DESTROY_WITH_PARENT,
-                                          GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE, 
+                                          GTK_MESSAGE_ERROR, GTK_BUTTONS_NONE,
 										  NULL);
   HIG :: message_dialog_set_text (GTK_MESSAGE_DIALOG(d),
                            _("There were problems with this post."),
@@ -449,7 +449,7 @@ PostUI :: check_charset ()
   gtk_widget_destroy (d);
   g_free (tmp);
   g_free (msg);
-  
+
   return false;
 }
 
@@ -601,7 +601,7 @@ PostUI :: on_progress_error (Progress&, const StringView& message)
                                           GTK_DIALOG_DESTROY_WITH_PARENT,
                                           GTK_MESSAGE_ERROR,
                                           GTK_BUTTONS_CLOSE, "%s", message.to_string().c_str());
-  g_signal_connect_swapped (d, "response", 
+  g_signal_connect_swapped (d, "response",
                             G_CALLBACK(gtk_widget_destroy), d);
   gtk_widget_show (d);
 }
@@ -691,7 +691,7 @@ PostUI :: maybe_post_message (GMimeMessage * message)
   gtk_widget_show_all (d);
   _post_task = new TaskPost (server, message);
   _post_task->add_listener (this);
-  
+
   _queue.add_task (_post_task, Queue::TOP);
 
   /**
@@ -722,7 +722,7 @@ namespace
 		char *fname;
 		PostUI *pui;
 	} se_data;
-	
+
 	void child_watch_cb(GPid pid, gint status, gpointer data)
 	{
 		se_data *d=static_cast<se_data*>(data);
@@ -837,7 +837,7 @@ PostUI :: spawn_editor ()
 void PostUI::spawn_editor_dead(char *fname)
 {
 	GtkTextBuffer * buf (_body_buf);
-	
+
   // read the file contents back in
   std::string txt;
   if (file :: get_text_file_contents (fname, txt)) {
@@ -1151,8 +1151,8 @@ PostUI :: create_body_widget (GtkTextBuffer*& buf, GtkWidget*& view, const Prefs
   pango_layout_set_text (layout, s.c_str(), s.size());
   pango_layout_get_extents (layout, &r, 0);
   gtk_widget_set_size_request (view, PANGO_PIXELS(r.width), -1 );
- 
-  // set the rest of the text view's policy 
+
+  // set the rest of the text view's policy
   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(view), GTK_WRAP_WORD);
   gtk_text_view_set_editable (GTK_TEXT_VIEW(view), true);
   GtkWidget * scrolled_window = gtk_scrolled_window_new (NULL, NULL);
@@ -1211,7 +1211,7 @@ PostUI :: update_profile_combobox ()
       sel_index = index;
     ++index;
   }
- 
+
   // ensure _something_ is selected...
   gtk_combo_box_set_active (GTK_COMBO_BOX(combo), sel_index);
 
@@ -1383,7 +1383,7 @@ PostUI :: apply_profile_to_body ()
   {
     // scrub the attribution for UTF8 cleanness
     attribution = header_to_utf8 (attribution);
- 
+
     std::string::size_type pos = body.find (old_attribution);
     if (!old_attribution.empty() && (pos != std::string::npos))
       body.replace (pos, old_attribution.size(), attribution);
@@ -1902,7 +1902,7 @@ gtk_widget_set_tooltip_text (w, _("The email account where mail replies to your
   gtk_table_attach (GTK_TABLE(t), w, 0, 2, row, row+1, GTK_FILL, GTK_FILL, 0, 0);
 
   ++row;
-  w = _message_id_check = gtk_check_button_new_with_mnemonic (_("Add \"Message-_Id header"));
+  w = _message_id_check = gtk_check_button_new_with_mnemonic (_("Add \"Message-_Id\" header"));
   b = _prefs.get_flag (MESSAGE_ID_PREFS_KEY, false);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(w), b);
   g_signal_connect (w, "toggled", G_CALLBACK(message_id_toggled_cb), &_prefs);
diff --git a/pan/gui/save-ui.cc b/pan/gui/save-ui.cc
index 121bcdb..2cf3f1a 100644
--- a/pan/gui/save-ui.cc
+++ b/pan/gui/save-ui.cc
@@ -102,9 +102,11 @@ SaveDialog :: response_cb (GtkDialog * dialog,
                            int response,
                            gpointer user_data)
 {
+
   if (response == GTK_RESPONSE_OK)
   {
     SaveDialog * self (static_cast<SaveDialog*>(user_data));
+
     bool subject_in_path = false;
 
     // set the path mode based on what widgets exist & are set
@@ -136,7 +138,7 @@ SaveDialog :: response_cb (GtkDialog * dialog,
 
     std::string sep( self->_prefs.get_string("save-subj-seperator", "-") );
 
-    // make the tasks... 
+    // make the tasks...
     Queue::tasks_t tasks;
     foreach_const (std::vector<Article>, self->_articles, it)
     {
diff --git a/pan/usenet-utils/message-check.cc b/pan/usenet-utils/message-check.cc
index 7174818..3a41605 100644
--- a/pan/usenet-utils/message-check.cc
+++ b/pan/usenet-utils/message-check.cc
@@ -194,7 +194,11 @@ namespace
 
     if (too_wide_qty) {
       char buf[1024];
-      g_snprintf (buf, sizeof(buf), _("Warning: %d lines are more than 80 characters wide."), too_wide_qty);
+      if (too_wide_qty != 1)
+        g_snprintf (buf, sizeof(buf), ngettext("Warning: %d line is more than 80 characters wide.",
+                                               "Warning: %d lines are more than 80 characters wide.", too_wide_qty), too_wide_qty);
+      else
+
       errors.insert (buf);
       goodness.raise_to_warn ();
     }
@@ -267,7 +271,7 @@ namespace
    * (2) Replace carriage returns in both the calculated attribution string
    *     and a temporary copy of the message body, so that we don't have to
    *     worry whether or not the attribution line's been wrapped.
-   * 
+   *
    * (3) Search for an occurance of the attribution string in the body.  If
    *     it's found, remove it from the temporary copy of the body so that
    *     it won't affect our line counts.
@@ -447,7 +451,7 @@ MessageCheck :: message_check (const GMimeMessage * message_const,
   }
   check_body (errors, goodness, tm, message, body, attribution);
   g_free (body);
-  
+
   // check the optional followup-to...
   bool followup_to_set (false);
   const char * cpch = g_mime_object_get_header ((GMimeObject *) message, "Followup-To");



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