Revision 280,
935 bytes
checked in by yasumichi, 14 years ago
(diff) |
first import
|
Line | |
---|
1 | |
---|
2 | #include "rpackagelistactor.h" |
---|
3 | #include "rpackagelister.h" |
---|
4 | #include "i18n.h" |
---|
5 | |
---|
6 | #include <apt-pkg/error.h> |
---|
7 | #include <apt-pkg/tagfile.h> |
---|
8 | #include <apt-pkg/strutl.h> |
---|
9 | #include <apt-pkg/configuration.h> |
---|
10 | #include <algorithm> |
---|
11 | #include <fnmatch.h> |
---|
12 | |
---|
13 | void RPackageListActor::notifyPostFilteredChange() |
---|
14 | { |
---|
15 | vector<RPackage *> removedList; |
---|
16 | vector<RPackage *> insertedList; |
---|
17 | |
---|
18 | const vector<RPackage *> ¤tList = _lister->getViewPackages(); |
---|
19 | |
---|
20 | removedList = _lastDisplayList; |
---|
21 | |
---|
22 | vector<RPackage *>::iterator I; |
---|
23 | for (unsigned int i = 0; i < currentList.size(); i++) { |
---|
24 | I = find(removedList.begin(), removedList.end(), currentList[i]); |
---|
25 | if (I != removedList.end()) |
---|
26 | removedList.erase(I); |
---|
27 | else |
---|
28 | insertedList.push_back(currentList[i]); |
---|
29 | } |
---|
30 | |
---|
31 | if (removedList.empty() == false) |
---|
32 | run(removedList, PKG_REMOVED); |
---|
33 | if (insertedList.empty() == false) |
---|
34 | run(insertedList, PKG_ADDED); |
---|
35 | } |
---|
36 | |
---|
37 | // vim:ts=3:sw=3:et |
---|
Note: See
TracBrowser
for help on using the repository browser.