diff options
author | pawel <pawel@FreeBSD.org> | 2012-07-13 22:09:00 +0800 |
---|---|---|
committer | pawel <pawel@FreeBSD.org> | 2012-07-13 22:09:00 +0800 |
commit | 4780762957f625bffbfa033b88a344228b3a348d (patch) | |
tree | 7bde0d7795d37919e5c7ef1aff1f576b479b539e /x11-fm | |
parent | aef1b521275bd85371a55bcbdc8e04d5a131177b (diff) | |
download | freebsd-ports-graphics-4780762957f625bffbfa033b88a344228b3a348d.tar.gz freebsd-ports-graphics-4780762957f625bffbfa033b88a344228b3a348d.tar.zst freebsd-ports-graphics-4780762957f625bffbfa033b88a344228b3a348d.zip |
Update to version 5.5
Changes: http://www.qtfm.org/home/changelog
PR: ports/169795
Submitted by: Zhihao Yuan <lichray@gmail.com> (maintainer)
Diffstat (limited to 'x11-fm')
-rw-r--r-- | x11-fm/qtfm/Makefile | 3 | ||||
-rw-r--r-- | x11-fm/qtfm/distinfo | 4 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_bookmarks.cpp | 10 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_mymodel.cpp | 99 | ||||
-rw-r--r-- | x11-fm/qtfm/files/patch-src_mymodel.h | 12 | ||||
-rw-r--r-- | x11-fm/qtfm/pkg-plist | 1 |
6 files changed, 85 insertions, 44 deletions
diff --git a/x11-fm/qtfm/Makefile b/x11-fm/qtfm/Makefile index 7535f1a989d..2013fbe9a08 100644 --- a/x11-fm/qtfm/Makefile +++ b/x11-fm/qtfm/Makefile @@ -6,8 +6,7 @@ # PORTNAME= qtfm -DISTVERSION= 5.4 -PORTREVISION= 1 +DISTVERSION= 5.5 CATEGORIES= x11-fm MASTER_SITES= http://www.qtfm.org/ diff --git a/x11-fm/qtfm/distinfo b/x11-fm/qtfm/distinfo index b5bdbd42ae3..e3df48bbd93 100644 --- a/x11-fm/qtfm/distinfo +++ b/x11-fm/qtfm/distinfo @@ -1,2 +1,2 @@ -SHA256 (qtfm-5.4.tar.gz) = 8ef4c2464502959944e1b2476aa635b2a889d2859ba62dd61d8f591779c6fd0d -SIZE (qtfm-5.4.tar.gz) = 147293 +SHA256 (qtfm-5.5.tar.gz) = 845fc43800d12483fa1993c56a8c965ff8dc917b97f03d9ce2e24318806fb211 +SIZE (qtfm-5.5.tar.gz) = 149667 diff --git a/x11-fm/qtfm/files/patch-src_bookmarks.cpp b/x11-fm/qtfm/files/patch-src_bookmarks.cpp index faa4e3c2607..bf6a24322ae 100644 --- a/x11-fm/qtfm/files/patch-src_bookmarks.cpp +++ b/x11-fm/qtfm/files/patch-src_bookmarks.cpp @@ -1,5 +1,5 @@ ---- src/bookmarks.cpp.orig 2012-03-08 04:46:39.000000000 -0600 -+++ src/bookmarks.cpp 2012-04-30 14:20:26.157046128 -0500 +--- src/bookmarks.cpp.orig 2012-07-11 18:10:56.065528820 -0500 ++++ src/bookmarks.cpp 2012-07-11 18:19:42.041677562 -0500 @@ -22,6 +22,11 @@ #ifndef BOOKMARKS_CPP #define BOOKMARKS_CPP @@ -12,7 +12,7 @@ #include <QtGui> #include "bookmarkmodel.h" #include "icondlg.h" -@@ -80,42 +85,74 @@ void MainWindow::mountWatcherTriggered() +@@ -80,44 +85,74 @@ void MainWindow::mountWatcherTriggered() } //--------------------------------------------------------------------------- @@ -74,11 +74,12 @@ - mtab.close(); + mntsize = getmntinfo(&mntbuf, MNT_NOWAIT); +- QStringList sysMounts = QStringList() << "/dev" << "/sys" << "/pro" << "/tmp" << "/run"; QStringList dontShowList = settings->value("hideBookmarks",0).toStringList(); mounts.clear(); - foreach(QString item, mtabMounts) -- if(item[0] == '/') +- if(!sysMounts.contains(item.split(" ").at(1).left(4))) + for (mnt = mntbuf; mntsize > 0; mntsize--, mnt++) + // XXX zpool name does not start with / + if (mnt->f_mntfromname[0] == '/' or !strcmp(mnt->f_fstypename, "zfs")) @@ -94,6 +95,7 @@ + //add a new auto bookmark if it doesn't exist + if(!autoBookmarks.contains(mnt->f_mntonname)) { +- autoBookmarks.append(path); - if(item.split(" ").at(2) == "iso9660") modelBookmarks->addBookmark(path,path,"1","drive-optical"); - else if(item.split(" ").at(2).contains("fat")) modelBookmarks->addBookmark(path,path,"1","drive-removable-media"); - else modelBookmarks->addBookmark(path,path,"1","drive-harddisk"); diff --git a/x11-fm/qtfm/files/patch-src_mymodel.cpp b/x11-fm/qtfm/files/patch-src_mymodel.cpp index 29b675cc107..5671e6779e9 100644 --- a/x11-fm/qtfm/files/patch-src_mymodel.cpp +++ b/x11-fm/qtfm/files/patch-src_mymodel.cpp @@ -1,5 +1,5 @@ ---- src/mymodel.cpp.orig 2012-03-09 05:00:54.000000000 -0600 -+++ src/mymodel.cpp 2012-04-29 16:13:57.725169164 -0500 +--- src/mymodel.cpp.orig 2012-07-11 18:21:24.302333223 -0500 ++++ src/mymodel.cpp 2012-07-11 18:59:06.428956406 -0500 @@ -21,7 +21,6 @@ #include <mainwindow.h> @@ -8,19 +8,20 @@ #include <unistd.h> #include <sys/ioctl.h> -@@ -63,9 +62,8 @@ myModel::myModel(bool realMime) +@@ -63,10 +62,8 @@ myModel::myModel(bool realMime) iconFactory = new QFileIconProvider(); - inotifyFD = inotify_init(); - notifier = new QSocketNotifier(inotifyFD, QSocketNotifier::Read, this); - connect(notifier, SIGNAL(activated(int)), this, SLOT(notifyChange())); +- connect(&eventTimer,SIGNAL(timeout()),this,SLOT(eventTimeout())); + watcher = new QFileSystemWatcher(this); + connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(notifyChange(QString))); realMimeTypes = realMime; } -@@ -188,28 +186,9 @@ QString myModel::getMimeType(const QMode +@@ -189,62 +186,9 @@ QString myModel::getMimeType(const QMode } //--------------------------------------------------------------------------------------- @@ -44,38 +45,72 @@ - - int w = event->wd; - -- if(watchers.contains(w)) +- if(eventTimer.isActive()) - { -- myModelItem *parent = rootItem->matchPath(watchers.value(w).split(SEPARATOR)); -+ myModelItem *parent = rootItem->matchPath(path.split(SEPARATOR)); - - if(parent) - { -@@ -230,9 +209,7 @@ void myModel::notifyChange() - //must of been deleted, remove from model - if(child->fileInfo().isDir()) - { -- int wd = watchers.key(child->absoluteFilePath()); -- inotify_rm_watch(inotifyFD,wd); -- watchers.remove(wd); -+ watcher->removePath(child->absoluteFilePath()); - } - beginRemoveRows(index(parent->absoluteFilePath()),child->childNumber(),child->childNumber()); - parent->removeChild(child); -@@ -249,23 +226,17 @@ void myModel::notifyChange() - } - else - { -- inotify_rm_watch(inotifyFD,w); -- watchers.remove(w); -+ watcher->removePath(path); - } +- if(w == lastEventID) +- eventTimer.start(40); +- else +- { +- eventTimer.stop(); +- notifyProcess(lastEventID); +- lastEventID = w; +- eventTimer.start(40); +- } +- } +- else +- { +- lastEventID = w; +- eventTimer.start(40); - } - - at += sizeof(inotify_event) + event->len; - } - - notifier->setEnabled(1); +-} +- +-//--------------------------------------------------------------------------------------- +-void myModel::eventTimeout() +-{ +- notifyProcess(lastEventID); +- eventTimer.stop(); +-} +- +-//--------------------------------------------------------------------------------------- +-void myModel::notifyProcess(int eventID) +-{ +- if(watchers.contains(eventID)) +- { +- myModelItem *parent = rootItem->matchPath(watchers.value(eventID).split(SEPARATOR)); ++ myModelItem *parent = rootItem->matchPath(path.split(SEPARATOR)); + + if(parent) + { +@@ -265,9 +209,7 @@ void myModel::notifyProcess(int eventID) + //must of been deleted, remove from model + if(child->fileInfo().isDir()) + { +- int wd = watchers.key(child->absoluteFilePath()); +- inotify_rm_watch(inotifyFD,wd); +- watchers.remove(wd); ++ watcher->removePath(child->absoluteFilePath()); + } + beginRemoveRows(index(parent->absoluteFilePath()),child->childNumber(),child->childNumber()); + parent->removeChild(child); +@@ -282,20 +224,19 @@ void myModel::notifyProcess(int eventID) + endInsertRows(); + } + } +- } +- else +- { +- inotify_rm_watch(inotifyFD,eventID); +- watchers.remove(eventID); +- } ++ else ++ { ++ watcher->removePath(path); ++ } } //--------------------------------------------------------------------------------- @@ -90,7 +125,7 @@ item->watched = 1; item = item->parent(); } -@@ -278,7 +249,7 @@ bool myModel::setRootPath(const QString& +@@ -308,7 +249,7 @@ bool myModel::setRootPath(const QString& myModelItem *item = rootItem->matchPath(path.split(SEPARATOR)); @@ -99,7 +134,7 @@ if(item->walked == 0) { -@@ -352,10 +323,7 @@ void myModel::refresh() +@@ -382,10 +323,7 @@ void myModel::refresh() { myModelItem *item = rootItem->matchPath(QStringList("/")); @@ -111,7 +146,7 @@ beginResetModel(); item->clearAll(); -@@ -811,9 +779,7 @@ bool myModel::remove(const QModelIndex & +@@ -840,9 +778,7 @@ bool myModel::remove(const QModelIndex & QFileInfo info(children.at(i)); if(info.isDir()) { diff --git a/x11-fm/qtfm/files/patch-src_mymodel.h b/x11-fm/qtfm/files/patch-src_mymodel.h index 6711931f81b..d5b5fd1a5ba 100644 --- a/x11-fm/qtfm/files/patch-src_mymodel.h +++ b/x11-fm/qtfm/files/patch-src_mymodel.h @@ -1,23 +1,27 @@ ---- src/mymodel.h.orig 2012-03-09 00:47:45.000000000 -0600 -+++ src/mymodel.h 2012-04-29 13:59:45.508571462 -0500 -@@ -83,8 +83,8 @@ public: +--- src/mymodel.h.orig 2012-07-11 19:01:59.919235618 -0500 ++++ src/mymodel.h 2012-07-11 19:03:41.246365243 -0500 +@@ -84,10 +84,8 @@ public: bool realMimeTypes; public slots: - void notifyChange(); +- void notifyProcess(int eventID); +- void eventTimeout(); - void addWatcher(myModelItem* path); + void notifyChange(QString const& path); + void addToWatcher(myModelItem* path); signals: void dragDropPaste(const QMimeData * data, QString newPath, QStringList cutList); -@@ -113,9 +113,7 @@ private: +@@ -116,11 +114,7 @@ private: QString currentRootPath; QFileIconProvider* iconFactory; - int inotifyFD; - QSocketNotifier *notifier; - QHash<int, QString> watchers; +- QTimer eventTimer; +- int lastEventID; + QFileSystemWatcher *watcher; }; diff --git a/x11-fm/qtfm/pkg-plist b/x11-fm/qtfm/pkg-plist index 479ef71a36f..1a2b15250fb 100644 --- a/x11-fm/qtfm/pkg-plist +++ b/x11-fm/qtfm/pkg-plist @@ -9,6 +9,7 @@ share/pixmaps/qtfm.png %%DATADIR%%/qtfm_pl.qm %%DATADIR%%/qtfm_ru.qm %%DATADIR%%/qtfm_sr.qm +%%DATADIR%%/qtfm_sv.qm %%DATADIR%%/qtfm_zh.qm %%DATADIR%%/qtfm_zh_TW.qm @dirrm %%DATADIR%% |