tag 585783 patch
thanks

Hi,

Attached patch addresses this bug.


Thijs
diff -Nur kingston-update-notifier-1.0.orig/src/notifier.cpp kingston-update-notifier-1.0/src/notifier.cpp
--- kingston-update-notifier-1.0.orig/src/notifier.cpp	2010-05-02 13:48:59.000000000 +0200
+++ kingston-update-notifier-1.0/src/notifier.cpp	2010-06-27 12:03:23.000000000 +0200
@@ -49,12 +49,32 @@
   } else {
     QPixmap px;
     if(security_updates==0) {
-      show_update_notification( "It is recommended to update your system", QString("There is %1 updates available").arg(updates), "dialog-information");
+      if(updates==1) {
+        show_update_notification( "It is recommended to update your system", QString("There is %1 update available").arg(updates), "dialog-information");
+      } else {
+        show_update_notification( "It is recommended to update your system", QString("There are %1 updates available").arg(updates), "dialog-information");
+      }
     } else {
       if(updates==0) {
-        show_update_notification( "You should update your system", QString("There is %1 security updates available").arg(security_updates), "dialog-warning");
+        if(security_updates==1){
+          show_update_notification( "You should update your system", QString("There is %1 security update available").arg(security_updates), "dialog-warning");
+        } else {
+          show_update_notification( "You should update your system", QString("There are %1 security updates available").arg(security_updates), "dialog-warning");
+        }
       } else {
-        show_update_notification( "You should update your system", QString("There is %1 updates and %2 security updates available").arg(updates).arg(security_updates), "dialog-warning" );
+        if(updates==1) {
+          if(security_updates==1) {
+            show_update_notification( "You should update your system", QString("There is %1 update and %2 security update available").arg(updates).arg(security_updates), "dialog-warning" );
+          } else {
+            show_update_notification( "You should update your system", QString("There are %1 update and %2 security updates available").arg(updates).arg(security_updates), "dialog-warning" );
+          }
+        } else {
+          if(security_updates==1) {
+            show_update_notification( "You should update your system", QString("There are %1 updates and %2 security update available").arg(updates).arg(security_updates), "dialog-warning" );
+          } else {
+            show_update_notification( "You should update your system", QString("There are %1 updates and %2 security updates available").arg(updates).arg(security_updates), "dialog-warning" );
+          }
+        }
       }
     }
       

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to