improved layout
authorStefan Schubert <schubi@suse.de>
Tue, 4 Dec 2007 09:56:07 +0000 (09:56 +0000)
committerStefan Schubert <schubi@suse.de>
Tue, 4 Dec 2007 09:56:07 +0000 (09:56 +0000)
zypp/solver/detail/ProblemSolutionCombi.cc
zypp/solver/detail/ProblemSolutionCombi.h

index 31287b7..3facc6e 100644 (file)
@@ -53,26 +53,28 @@ ProblemSolutionCombi::ProblemSolutionCombi( ResolverProblem_Ptr parent)
     _details = "";
 }
 
-void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action,
-                                           const std::string description)
+void ProblemSolutionCombi::addSingleAction( PoolItem_Ref item, const TransactionKind action)
 {
-    TransactionSolutionAction  *actionTransact = new TransactionSolutionAction(item, action);
-    addAction (actionTransact);
-
-    if (description.size() == 0) {
-       ostringstream details;
-       details << *actionTransact;
-       _details += details.str();
-    } else {
-       _details += description;
-    }
+    addAction (new TransactionSolutionAction(item, action));
 }
 
 void ProblemSolutionCombi::addDescription( const std::string description)
 {
-    if ( _description.size() > 0)
-       _description += "\n";
-    _description += description;
+    if ( _description.size() == 0
+        && _details.size() == 0) {
+        // first entry
+       _description = description;
+    } else {
+       if ( _description.size() > 0
+            && _details.size() == 0) {
+           // second entry
+           _details = _description;
+           _description = _("Following actions will be done:");
+       }
+       // all other
+       _details += "\n";
+       _details += description;        
+    }
 }
 
       ///////////////////////////////////////////////////////////////////
index f055b30..ba71bed 100644 (file)
@@ -53,7 +53,7 @@ namespace zypp
            /**
             * Add a single action
             */
-           void addSingleAction( PoolItem_Ref item, const TransactionKind action, const std::string description = "");
+           void addSingleAction( PoolItem_Ref item, const TransactionKind action);
            /**
             * Set description text
             */