Ticket #8916: 0001-Patch-to-fix-BNotification-construct-from-BMessage.patch

File 0001-Patch-to-fix-BNotification-construct-from-BMessage.patch, 1.3 KB (added by Prodito, 12 years ago)
  • src/kits/app/Notification.cpp

    From 16f71402c40a539ce24f5b62f77f859d020860b5 Mon Sep 17 00:00:00 2001
    From: Prodito <prodito@live.com>
    Date: Fri, 24 Aug 2012 06:46:18 -0300
    Subject: [PATCH] Patch to fix BNotification construct from BMessage.
    
    ---
     src/kits/app/Notification.cpp |   12 +++++++++++-
     1 file changed, 11 insertions(+), 1 deletion(-)
    
    diff --git a/src/kits/app/Notification.cpp b/src/kits/app/Notification.cpp
    index cc0fc31..9f9687c 100644
    a b BNotification::BNotification(BMessage* archive)  
    7575    if (archive->FindRef("_onClickFile", &onClickFile) == B_OK)
    7676        SetOnClickFile(&onClickFile);
    7777
     78    entry_ref onClickRef;
     79    int32 index = 0;
     80    while (archive->FindRef("_onClickRef", index++, &onClickRef) == B_OK)
     81        AddOnClickRef(&onClickRef);
     82
     83    BString onClickArgv;
     84    index = 0;
     85    while (archive->FindString("_onClickArgv", index++, &onClickArgv) == B_OK)
     86        AddOnClickArg(onClickArgv);
     87
    7888    status_t ret = B_OK;
    7989    BMessage icon;
    8090    if ((ret = archive->FindMessage("_icon", &icon)) == B_OK) {
    BNotification::Instantiate(BMessage* archive)  
    131141/*! \brief Archives the BNotification in the BMessages @archive.
    132142
    133143    \sa BArchivable::Archive(), Instantiate() static function.
    134     \return 
     144    \return
    135145    - \c B_OK: Everything went fine.
    136146    - \c Other errors: Archiving has failed.
    137147*/