~ubuntu-branches/ubuntu/quantal/kdevplatform/quantal-proposed

« back to all changes in this revision

Viewing changes to sublime/document.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Bhargav Mangipudi
  • Date: 2010-12-16 19:31:23 UTC
  • mfrom: (0.3.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20101216193123-xe2keh5754zwsn1t
Tags: 1.1.80-0ubuntu1
* New upstream release
  - kdevplatform2-libs is now kdevplatform3-libs due to ABI changes
  - Update kdevplatform3-libs.install to include l10n files
  - Update kdevplatform-dev.install
* Removed localization packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
    emit statusIconChanged(this);
124
124
}
125
125
 
126
 
 
127
126
QIcon Document::statusIcon() const
128
127
{
129
128
    return d->statusIcon;
130
129
}
131
130
 
132
 
bool Document::uniqueView(Area *area, View *view, bool sameWorkingset)
133
 
{
134
 
    if (!sameWorkingset)
135
 
        return (views().count() > 1);
136
 
  
137
 
    bool uniqueView = true;
138
 
    
139
 
    int viewCnt = 0;  
140
 
     
141
 
  // two or more views in current area
142
 
    foreach(Sublime::View *testView, views())
143
 
        if (area->views().contains(testView))
144
 
              viewCnt++;
145
 
    if (viewCnt > 1)
146
 
        uniqueView = false;
147
 
            
148
 
   foreach(Sublime::Area *testArea, controller()->allAreas())
149
 
        foreach(Sublime::View *testView, views())
150
 
            if (testArea->views().contains(testView) &&
151
 
                view->document() == testView->document() 
152
 
                && testArea->workingSet() != area->workingSet())
153
 
                uniqueView = false;
154
 
            
155
 
    return uniqueView;
156
 
}
157
 
 
158
131
bool Document::closeDocument()
159
132
{
160
133
    foreach (Sublime::Area *area, controller()->allAreas())