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

« back to all changes in this revision

Viewing changes to debian/patches/revert-rev1086758.diff

  • 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:
1
 
Index: b/src/kiledocmanager.cpp
2
 
===================================================================
3
 
--- a/src/kiledocmanager.cpp    2010-04-08 01:30:11.000000000 +0200
4
 
+++ b/src/kiledocmanager.cpp    2010-04-09 10:13:09.000000000 +0200
5
 
@@ -1,6 +1,6 @@
6
 
 /*****************************************************************************
7
 
 *   Copyright (C) 2004 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)      *
8
 
-*             (C) 2006-2010 by Michel Ludwig (michel.ludwig@kdemail.net)     *
9
 
+*             (C) 2006-2009 by Michel Ludwig (michel.ludwig@kdemail.net)     *
10
 
 *             (C) 2007 by Holger Danielsson (holger.danielsson@versanet.de)  *
11
 
 ******************************************************************************/
12
 
 
13
 
@@ -469,7 +469,7 @@
14
 
 
15
 
        removeTextDocumentInfo(oldinfo);
16
 
 
17
 
-       emit(updateStructure(false, newinfo));
18
 
+       emit(updateStructure(true, newinfo));
19
 
 }
20
 
 
21
 
 bool Manager::removeTextDocumentInfo(TextInfo *docinfo, bool closingproject /* = false */)
22
 
@@ -605,6 +605,7 @@
23
 
        KTextEditor::Document *doc = createDocument(url, docinfo, encoding, mode, highlight);
24
 
 
25
 
        m_ki->structureWidget()->clean(docinfo);
26
 
+       m_ki->structureWidget()->update(docinfo, true);
27
 
 
28
 
        if(!text.isEmpty()) {
29
 
                doc->setText(text);
30
 
@@ -831,6 +832,11 @@
31
 
        m_ki->texKonsole()->sync();
32
 
 
33
 
        emit(documentModificationStatusChanged(doc, doc->isModified(), KTextEditor::ModificationInterface::OnDiskUnmodified));
34
 
+
35
 
+       //updatestructure if active document changed from modified to unmodified (typically after a save)
36
 
+       if (!doc->isModified()) {
37
 
+               emit(updateStructure(true, textInfoFor(doc)));
38
 
+       }
39
 
 }
40
 
 
41
 
 bool Manager::fileSaveAll(bool amAutoSaving, bool disUntitled)
42
 
@@ -925,7 +931,7 @@
43
 
         This may look superfluos but actually it is not, in the case of multiple modified docs it ensures that the structure view keeps synchronized with the currentTextView
44
 
         And if we only have one masterdoc or none nothing goes wrong.
45
 
        */
46
 
-       emit(updateStructure(false, NULL));
47
 
+       emit(updateStructure(false,NULL));
48
 
        m_currentlySavingAll = false;
49
 
        return !oneSaveFailed;
50
 
 }
51
 
@@ -967,7 +973,7 @@
52
 
                item->loadDocumentAndViewSettings();
53
 
        }
54
 
 
55
 
-       emit(updateStructure(false, NULL));
56
 
+       emit(updateStructure(true, 0L));
57
 
        emit(updateModeStatus());
58
 
        // update undefined references in this file
59
 
        emit(updateReferences(textInfoFor(realurl.toLocalFile())));
60
 
@@ -989,7 +995,6 @@
61
 
        }
62
 
        else {
63
 
                bool ret = view->document()->documentSave();
64
 
-               emit(updateStructure(false, textInfoFor(view->document())));
65
 
                return ret;
66
 
        }
67
 
 }
68
 
@@ -1270,7 +1275,7 @@
69
 
                                mapItem(docinfo, item);
70
 
 
71
 
                                //docinfo->updateStruct(m_kwStructure->level());
72
 
-                               emit(updateStructure(false, docinfo));
73
 
+                               emit(updateStructure(true, docinfo));
74
 
                        }
75
 
                }
76
 
 
77
 
@@ -1502,7 +1507,7 @@
78
 
        kp->buildProjectTree();
79
 
        addProject(kp);
80
 
 
81
 
-       emit(updateStructure(false, NULL));
82
 
+       emit(updateStructure(false, 0L));
83
 
        emit(updateModeStatus());
84
 
        // update undefined references in all project files
85
 
        updateProjectReferences(kp);
86
 
@@ -2155,7 +2160,7 @@
87
 
 
88
 
        //ok, we have a project and an existing file
89
 
        KILE_DEBUG() << "\tadd file: " << filename;
90
 
-       m_ki->viewManager()->updateStructure(false);
91
 
+       m_ki->viewManager()->updateStructure(true);
92
 
 
93
 
        KUrl url;
94
 
        url.setPath(filename);
95
 
Index: b/src/documentinfo.cpp
96
 
===================================================================
97
 
--- a/src/documentinfo.cpp      2010-03-01 00:00:13.000000000 +0100
98
 
+++ b/src/documentinfo.cpp      2010-04-09 10:12:23.000000000 +0200
99
 
@@ -2,7 +2,7 @@
100
 
     begin                : Sun Jul 20 2003
101
 
     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
102
 
                            (C) 2005-2007 by Holger Danielsson (holger.danielsson@versanet.de)
103
 
-                           (C) 2006-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
104
 
+                           (C) 2006-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
105
 
  *********************************************************************************************/
106
 
 
107
 
 /***************************************************************************
108
 
@@ -169,11 +169,7 @@
109
 
        return newURL;
110
 
 }
111
 
 
112
 
-Info::Info() :
113
 
- m_bIsRoot(false),
114
 
- m_dirty(false),
115
 
- m_config(KGlobal::config().data()),
116
 
- documentTypePromotionAllowed(true)
117
 
+Info::Info() : m_bIsRoot(false), m_config(KGlobal::config().data()), documentTypePromotionAllowed(true)
118
 
 {
119
 
        updateStructLevelInfo();
120
 
 }
121
 
@@ -237,17 +233,6 @@
122
 
        documentTypePromotionAllowed = b;
123
 
 }
124
 
 
125
 
-bool Info::isDirty() const
126
 
-{
127
 
-       return m_dirty;
128
 
-}
129
 
-
130
 
-void Info::setDirty(bool b)
131
 
-{
132
 
-KILE_DEBUG() << b;
133
 
-       m_dirty = b;
134
 
-}
135
 
-
136
 
 KUrl Info::url()
137
 
 {
138
 
        return KUrl();
139
 
@@ -406,7 +391,6 @@
140
 
 
141
 
 void Info::slotCompleted()
142
 
 {
143
 
-       setDirty(true);
144
 
        emit completed(this);
145
 
 }
146
 
 
147
 
@@ -476,7 +460,6 @@
148
 
                connect(m_doc, SIGNAL(documentNameChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged()));
149
 
                connect(m_doc, SIGNAL(documentUrlChanged(KTextEditor::Document*)), this, SLOT(slotFileNameChanged()));
150
 
                connect(m_doc, SIGNAL(completed()), this, SLOT(slotCompleted()));
151
 
-               connect(m_doc, SIGNAL(modifiedChanged(KTextEditor::Document*)), this, SLOT(makeDirtyIfModified()));
152
 
                // this could be a KatePart bug, and as "work-around" we manually set the highlighting mode again
153
 
                connect(m_doc, SIGNAL(completed()), this, SLOT(activateDefaultMode()));
154
 
                setMode(m_defaultMode);
155
 
@@ -497,13 +480,6 @@
156
 
        m_doc = NULL;
157
 
 }
158
 
 
159
 
-void TextInfo::makeDirtyIfModified()
160
 
-{
161
 
-       if(m_doc && m_doc->isModified()) {
162
 
-               setDirty(true);
163
 
-       }
164
 
-}
165
 
-
166
 
 const long* TextInfo::getStatistics(KTextEditor::View *view)
167
 
 {
168
 
        /* [0] = #c in words, [1] = #c in latex commands and environments,
169
 
@@ -1360,7 +1336,6 @@
170
 
        emit(doneUpdating());
171
 
        emit(isrootChanged(isLaTeXRoot()));
172
 
        emit(parsingCompleted());
173
 
-       setDirty(false);
174
 
 }
175
 
 
176
 
 void LaTeXInfo::checkChangedDeps()
177
 
@@ -1471,7 +1446,6 @@
178
 
        }
179
 
        emit(parsingCompleted());
180
 
        emit(doneUpdating());
181
 
-       setDirty(false);
182
 
 }
183
 
 
184
 
 Type BibInfo::getType()
185
 
Index: b/src/widgets/structurewidget.cpp
186
 
===================================================================
187
 
--- a/src/widgets/structurewidget.cpp   2010-02-07 22:46:31.000000000 +0100
188
 
+++ b/src/widgets/structurewidget.cpp   2010-04-09 10:12:23.000000000 +0200
189
 
@@ -2,7 +2,7 @@
190
 
     begin                : Sun Dec 28 2003
191
 
     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net
192
 
                                2005-2007 by Holger Danielsson (holger.danielsson@versanet.de)
193
 
-                               2008-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
194
 
+                               2008 by Michel Ludwig (michel.ludwig@kdemail.net)
195
 
  *************************************************************************************************/
196
 
 
197
 
 /***************************************************************************
198
 
@@ -948,10 +948,10 @@
199
 
 
200
 
        void StructureWidget::update(KileDocument::Info *docinfo)
201
 
        {
202
 
-               update(docinfo, false);
203
 
+               update(docinfo, true);
204
 
        }
205
 
 
206
 
-       void StructureWidget::update(KileDocument::Info *docinfo, bool forceParsing, bool activate /* =true */)
207
 
+       void StructureWidget::update(KileDocument::Info *docinfo, bool parse, bool activate /* =true */)
208
 
        {
209
 
                KILE_DEBUG() << "==KileWidget::StructureWidget::update(" << docinfo << ")=============";
210
 
 
211
 
@@ -961,24 +961,18 @@
212
 
                }
213
 
 
214
 
                m_docinfo = docinfo;
215
 
-               bool needParsing = forceParsing || m_docinfo->isDirty() || !viewExistsFor(docinfo);
216
 
+
217
 
+               bool needParsing = parse || ( ! viewExistsFor(m_docinfo) );
218
 
 
219
 
                //find structview-item for this docinfo
220
 
                StructureView *view = viewFor(m_docinfo);
221
 
-               if(!view) {
222
 
-                       m_default->activate();
223
 
-                       return;
224
 
-               }
225
 
 
226
 
                if(needParsing) { //need to reparse the doc
227
 
                        int xtop = view->horizontalScrollBar()->value();
228
 
                        int ytop = view->verticalScrollBar()->value();
229
 
                        //KILE_DEBUG() << "\tStructure::update parsing doc";
230
 
-                       // avoid flickering when parsing
231
 
-                       view->setUpdatesEnabled(false);
232
 
                        view->cleanUp();
233
 
                        m_docinfo->updateStruct();
234
 
-                       view->setUpdatesEnabled(true);
235
 
                        view->showReferences(m_ki);
236
 
                        view->horizontalScrollBar()->setValue(xtop);
237
 
                        view->verticalScrollBar()->setValue(ytop);
238
 
Index: b/src/widgets/structurewidget.h
239
 
===================================================================
240
 
--- a/src/widgets/structurewidget.h     2010-02-07 22:46:31.000000000 +0100
241
 
+++ b/src/widgets/structurewidget.h     2010-04-09 10:12:23.000000000 +0200
242
 
@@ -2,7 +2,7 @@
243
 
     begin                : Sun Dec 28 2003
244
 
     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
245
 
                                2005-2007 by Holger Danielsson (holger.danielsson@versanet.de)
246
 
-                               2008-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
247
 
+                               2008 by Michel Ludwig (michel.ludwig@kdemail.net)
248
 
  **************************************************************************************************/
249
 
 
250
 
 /***************************************************************************
251
 
Index: b/src/documentinfo.h
252
 
===================================================================
253
 
--- a/src/documentinfo.h        2010-02-07 22:46:31.000000000 +0100
254
 
+++ b/src/documentinfo.h        2010-04-09 10:12:23.000000000 +0200
255
 
@@ -1,7 +1,7 @@
256
 
 /*************************************************************************************
257
 
     begin                : Sun Jul 20 2003
258
 
     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
259
 
-                           (C) 2006-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
260
 
+                           (C) 2006 by Michel Ludwig (michel.ludwig@kdemail.net)
261
 
  *************************************************************************************/
262
 
 
263
 
 /***************************************************************************
264
 
@@ -159,12 +159,6 @@
265
 
        virtual bool isDocumentTypePromotionAllowed();
266
 
        void setDocumentTypePromotionAllowed(bool b);
267
 
 
268
 
-       /**
269
 
-        * Returns true iff new parsing is required.
270
 
-        **/
271
 
-       bool isDirty() const;
272
 
-       void setDirty(bool b);
273
 
-
274
 
 public Q_SLOTS:
275
 
        /**
276
 
         * Never call this function directly, use KileWidget::Structure::update(KileDocument::Info *, bool) instead
277
 
@@ -197,7 +191,6 @@
278
 
        };
279
 
 
280
 
        bool                                            m_bIsRoot;
281
 
-       bool                                            m_dirty;
282
 
        QStringList                                     m_labels;
283
 
        QStringList                                     m_bibItems;
284
 
        QStringList                                     m_deps, m_depsPrev;
285
 
@@ -295,11 +288,8 @@
286
 
        void slotViewDestroyed(QObject *object);
287
 
        void activateDefaultMode();
288
 
 
289
 
-       void makeDirtyIfModified();
290
 
-
291
 
 protected:
292
 
        KTextEditor::Document                           *m_doc;
293
 
-       bool                                            m_dirty;
294
 
        long                                            *m_arStatistics;
295
 
        QString                                         m_defaultMode;
296
 
        QHash<KTextEditor::View*, QList<QObject*> >     m_eventFilterHash;
297
 
Index: b/src/kile.cpp
298
 
===================================================================
299
 
--- a/src/kile.cpp      2010-04-04 18:56:54.000000000 +0200
300
 
+++ b/src/kile.cpp      2010-04-09 10:12:23.000000000 +0200
301
 
@@ -1,7 +1,7 @@
302
 
 /****************************************************************************************
303
 
     begin                : sam jui 13 09:50:06 CEST 2002
304
 
     copyright            : (C) 2003 by Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)
305
 
-                           (C) 2007-2010 by Michel Ludwig (michel.ludwig@kdemail.net)
306
 
+                           (C) 2007-2009 by Michel Ludwig (michel.ludwig@kdemail.net)
307
 
                            (C) 2007 Holger Danielsson (holger.danielsson@versanet.de)
308
 
                            (C) 2009 Thomas Braun (thomas.braun@virtuell-zuhause.de)
309
 
  ****************************************************************************************/