~ubuntu-branches/ubuntu/precise/kdenetwork/precise-proposed

« back to all changes in this revision

Viewing changes to kopete/protocols/wlm/wlmchatsession.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2012-09-07 16:48:10 UTC
  • mfrom: (1.1.71)
  • Revision ID: package-import@ubuntu.com-20120907164810-3u0sf7udlhekzrck
Tags: 4:4.8.5-0ubuntu0.1
New upstream bugfix release (LP: #1047417)

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
        m_pendingInvitations.append (contact->contactId ());
463
463
}
464
464
 
 
465
static void
 
466
printGifErrorMessage()
 
467
{
 
468
#ifdef HAVE_GIFLIB
 
469
#ifdef HAVE_GIF_ERROR_STRING // giflib 4.2.0+
 
470
        const char * errorString = GifErrorString();
 
471
        if (errorString)
 
472
            fprintf(stderr, "GIF-LIB error: %s\n", errorString);
 
473
        else
 
474
            fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
 
475
#else // older giflib versions, libungif
 
476
        PrintGifError();
 
477
#endif // HAVE_GIF_ERROR_STRING
 
478
#endif // HAVE_GIFLIB
 
479
}
 
480
 
465
481
/* stolen from kpaint write_to_gif() */
466
482
void
467
483
WlmChatSession::convertToGif( const QPixmap & ink, QString filename)
546
562
    }
547
563
 
548
564
    if (status != GIF_OK) {
549
 
        PrintGifError();
 
565
        printGifErrorMessage();
550
566
        EGifCloseFile(GifFile);
551
567
        return;
552
568
    }
553
569
 
554
570
    if (EGifCloseFile(GifFile) != GIF_OK) {
555
 
        PrintGifError();
 
571
        printGifErrorMessage();
556
572
        return;
557
573
    }
558
574
    return;