~ubuntu-branches/debian/stretch/psi-plus/stretch

« back to all changes in this revision

Viewing changes to src/msgmle.cpp

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2013-10-23 02:42:20 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20131023024220-bk2hyoenqkwfhpgw
Tags: 0.16.242-1
* New upstream release:
  fixed the problem of initialization of private conversation when both
  sides use libotr 4.0.x. (Closes: #724880)
* Update debian/watch: sources were moved.
* Delete psi-plus-content-downloader package and update all related files.
  This plugin is in psi-plus-plugins package now.
* Update debian/control:
  - remove all currently unneeded Replaces and Breaks fields
  - add build dependency on libidn11-dev
* Update debian/rules: simplify get-orig-source section.
* Update debian/copyright:
  - update Source field due to changes in sources location
  - remove copyright holders whose code was deleted from source tree
    (bundled libidn library was removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
{
303
303
/*      if(e->key() == Qt::Key_Escape || (e->key() == Qt::Key_W && e->modifiers() & Qt::ControlModifier))
304
304
                e->ignore();
305
 
        else if(e->key() == Qt::Key_Return && 
306
 
               ((e->modifiers() & Qt::ControlModifier) 
 
305
        else if(e->key() == Qt::Key_Return &&
 
306
               ((e->modifiers() & Qt::ControlModifier)
307
307
#ifndef Q_OS_MAC
308
 
               || (e->modifiers() & Qt::AltModifier) 
 
308
               || (e->modifiers() & Qt::AltModifier)
309
309
#endif
310
310
               ))
311
311
                e->ignore();
335
335
}
336
336
 
337
337
/**
338
 
 * Work around Qt bug, that QTextEdit doesn't accept() the 
 
338
 * Work around Qt bug, that QTextEdit doesn't accept() the
339
339
 * event, so it could result in another context menu popping
340
340
 * out after the first one.
341
341
 */
342
 
void ChatEdit::contextMenuEvent(QContextMenuEvent *e) 
 
342
void ChatEdit::contextMenuEvent(QContextMenuEvent *e)
343
343
{
344
344
        last_click_ = e->pos();
345
345
        if (check_spelling_ && textCursor().selectedText().isEmpty() && SpellChecker::instance()->available()) {
380
380
/*!
381
381
 * \brief handles a click on a suggestion
382
382
 * \param the action is just the container which holds the suggestion.
383
 
 * 
 
383
 *
384
384
 * This method is called by the framework whenever a user clicked on the child popupmenu
385
385
 * to select a suggestion for a missspelled word. It exchanges the missspelled word with the
386
386
 * suggestion which is the text of the QAction parameter.
389
389
{
390
390
        QAction* act_suggestion = (QAction*) sender();
391
391
        int current_position = textCursor().position();
392
 
        
 
392
 
393
393
        // Replace the word
394
394
        QTextCursor     tc = cursorForPosition(last_click_);
395
395
        tc.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
407
407
/*!
408
408
 * \brief handles a click on the add2dict action of the parent popupmenu
409
409
 * \param Never used bool parameter
410
 
 * 
 
410
 *
411
411
 * The method sets the cursor to the last mouseclick position and looks for the word which is placed there.
412
412
 * This word is than added to the dictionary of aspell.
413
413
 */
420
420
        tc.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
421
421
        tc.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
422
422
        SpellChecker::instance()->add(tc.selectedText());
423
 
        
 
423
 
424
424
        // Put the cursor where it belongs
425
425
        tc.clearSelection();
426
426
        tc.setPosition(current_position);
540
540
        html = html.mid(index, lastIndex-index);
541
541
        QDomDocument doc;
542
542
        if(!doc.setContent(html))
543
 
                return elem;    
 
543
                return elem;
544
544
        QDomElement htmlElem = doc.firstChildElement("body");
545
545
        QDomElement p = htmlElem.firstChildElement("p");
546
546
        QDomElement body = doc.createElementNS("http://www.w3.org/1999/xhtml", "body");