~ubuntu-branches/ubuntu/utopic/kile/utopic

« back to all changes in this revision

Viewing changes to src/documentinfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-05-13 12:24:49 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20100513122449-krjybyi5lk5nejll
Tags: 1:2.1.0~svn1112278beta4-1ubuntu1
* Merge from Debian unstable (LP: #579884), remaining changes:
  - debian/control: Recommend firefox instead of iceweasel to have it look
    like (konqueror | firefox); on default Ubuntu kile will then no longer
    install konqueror. (LP: #452079)
  - debain/control: Don't suggest kile-i18n
  - debian/kile-doc.install: Install to /usr/share/doc/kde/HTML
* Remove revert-rev1086758.diff, replaced by
  00_root_document_not_detected_kde_bug_233667.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    begin                : Sun Jul 20 2003
3
3
    copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
4
4
                           (C) 2005-2007 by Holger Danielsson (holger.danielsson@versanet.de)
5
 
                           (C) 2006-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
 
5
                           (C) 2006-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
6
6
 *********************************************************************************************/
7
7
 
8
8
/***************************************************************************
169
169
        return newURL;
170
170
}
171
171
 
172
 
Info::Info() :
173
 
 m_bIsRoot(false),
174
 
 m_dirty(false),
175
 
 m_config(KGlobal::config().data()),
176
 
 documentTypePromotionAllowed(true)
 
172
Info::Info() : m_bIsRoot(false), m_config(KGlobal::config().data()), documentTypePromotionAllowed(true)
177
173
{
178
174
        updateStructLevelInfo();
179
175
}
237
233
        documentTypePromotionAllowed = b;
238
234
}
239
235
 
240
 
bool Info::isDirty() const
241
 
{
242
 
        return m_dirty;
243
 
}
244
 
 
245
 
void Info::setDirty(bool b)
246
 
{
247
 
KILE_DEBUG() << b;
248
 
        m_dirty = b;
249
 
}
250
 
 
251
236
KUrl Info::url()
252
237
{
253
238
        return KUrl();
406
391
 
407
392
void Info::slotCompleted()
408
393
{
409
 
        setDirty(true);
410
394
        emit completed(this);
411
395
}
412
396
 
476
460
                connect(m_doc, SIGNAL(documentNameChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged()));
477
461
                connect(m_doc, SIGNAL(documentUrlChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged()));
478
462
                connect(m_doc, SIGNAL(completed()), this, SLOT(slotCompleted()));
479
 
                connect(m_doc, SIGNAL(modifiedChanged(KTextEditor::Document*)), this, SLOT(makeDirtyIfModified()));
480
463
                // this could be a KatePart bug, and as "work-around" we manually set the highlighting mode again
481
464
                connect(m_doc, SIGNAL(completed()), this, SLOT(activateDefaultMode()));
482
465
                setMode(m_defaultMode);
497
480
        m_doc = NULL;
498
481
}
499
482
 
500
 
void TextInfo::makeDirtyIfModified()
501
 
{
502
 
        if(m_doc && m_doc->isModified()) {
503
 
                setDirty(true);
504
 
        }
505
 
}
506
 
 
507
483
const long* TextInfo::getStatistics(KTextEditor::View *view)
508
484
{
509
485
        /* [0] = #c in words, [1] = #c in latex commands and environments,
1360
1336
        emit(doneUpdating());
1361
1337
        emit(isrootChanged(isLaTeXRoot()));
1362
1338
        emit(parsingCompleted());
1363
 
        setDirty(false);
1364
1339
}
1365
1340
 
1366
1341
void LaTeXInfo::checkChangedDeps()
1471
1446
        }
1472
1447
        emit(parsingCompleted());
1473
1448
        emit(doneUpdating());
1474
 
        setDirty(false);
1475
1449
}
1476
1450
 
1477
1451
Type BibInfo::getType()