[pan2: 72/268] * Added 'Post to Newsgroups' to Header Pane Popup * Modified log-ui.cc for multi-entries



commit 5568eeb561bd3cabf3e1b1061d87c4986e652970
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Tue Jun 21 08:02:35 2011 +0200

    * Added 'Post to Newsgroups' to Header Pane Popup
    * Modified log-ui.cc for multi-entries

 pan/gui/log-ui.cc |   16 ++++++++++++++++
 pan/gui/pan.ui.h  |    2 ++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/pan/gui/log-ui.cc b/pan/gui/log-ui.cc
index 2a0b5cd..47aeef7 100644
--- a/pan/gui/log-ui.cc
+++ b/pan/gui/log-ui.cc
@@ -33,6 +33,8 @@ extern "C" {
 
 using namespace pan;
 
+///TODO : perhaps implement a tooltip for right-click?
+
 namespace
 {
   enum { COL_HIDDEN, COL_SEVERITY, COL_DATE, COL_MESSAGE, N_COLS };
@@ -57,6 +59,20 @@ namespace
                           COL_SEVERITY, (e.severity & Log::PAN_SEVERITY_ERROR),
                           COL_DATE, (unsigned long)e.date,
                           COL_MESSAGE, &e, -1);
+       if (!e.messages.empty())
+       {
+        GtkTreeIter child;
+
+        foreach_const (Log::entries_t, e.messages, lit)
+        {
+          gtk_tree_store_prepend (myStore, &child, &iter );
+          gtk_tree_store_set (myStore, &child,
+                          COL_HIDDEN, "",
+                          COL_SEVERITY, (lit->severity & Log::PAN_SEVERITY_ERROR),
+                          COL_DATE, (unsigned long)lit->date,
+                          COL_MESSAGE, &*lit, -1);
+        }
+      }
     }
 
     virtual void on_log_cleared () {
diff --git a/pan/gui/pan.ui.h b/pan/gui/pan.ui.h
index 7284308..b2f8479 100644
--- a/pan/gui/pan.ui.h
+++ b/pan/gui/pan.ui.h
@@ -202,6 +202,8 @@ const char * fallback_ui_file =
 "    <menuitem action='get-new-headers-in-selected-groups' />\n"
 "    <menuitem action='get-new-headers-in-subscribed-groups'/>\n"
 "    <separator />\n"
+"    <menuitem action='post' />\n"
+"    <separator />\n"
 "    <menuitem action='show-group-preferences-dialog' />\n"
 "    <separator />\n"
 "    <menuitem action='subscribe' />\n"



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