* Syncded debian foo with experimental * Bump compat to 10 * Removed --parallel from rules, standard compat 10 * Bumped Standards to 3.9.8, no changes needed * Bump minimum version debhelper (>= 10) * Bump minimum version libqt5xdg-dev (>= 2.0.0) * Re-introduce build dependency liblxqt0-dev (>= 0.11.0) * Added build dependency libqt5svg5-dev * Added Recommends libfm-qt-l10n * Exported LC_ALL=C.UTF-8 - define language settings for reproducible builds * Hard override translation control * Use DCMAKE_BUILD_TYPE=RelWithDebInfo * Fixed copyright Format field, using https * Fixed copyrights, removed obsolete files * Fixed libfm-qt3.install, don't install translationsubuntu/cosmic debian/0.11.1-2
parent
f2b1f23fdf
commit
5b9cc02532
@ -0,0 +1,344 @@
|
||||
|
||||
libfm-qt-0.11.1 / 2016-09-24
|
||||
============================
|
||||
|
||||
* Bump version to 0.11.1 (#39)
|
||||
* Fix Custom Actions Submenu (#38)
|
||||
* Extend README.md
|
||||
* Add C++ wrappers for libfm C APIs.
|
||||
* Correct positioning of small icons in icon/thumbnail mode (#32)
|
||||
* Silence new compiler warnings (#36)
|
||||
* Adapt to QT_USE_QSTRINGBUILDER macro
|
||||
* Fixes xcb linking error
|
||||
* Use LXQtCompilerSettings cmake module
|
||||
* Replaces deprecated QStyleOptionViewItemV4
|
||||
* Fix item text direction with RTL layout (#33)
|
||||
* Set tabstops for mount operation password dialog (#31)
|
||||
* Fix memory leak in file open menu (#29)
|
||||
* Fixes https://github.com/lxde/pcmanfm-qt/issues/351. (#27)
|
||||
* build: Use external translations
|
||||
* ts-file removal (#26)
|
||||
* Fix memory leaks in file menu (#25)
|
||||
* Merge pull request #24 from philippwiesemann/fix-folder-menu-leak
|
||||
* translations: fix four typos in messages (#23)
|
||||
* Fix memory leak if restoring files from trash
|
||||
* Fix rename dialog displaying source info twice
|
||||
* Enable renaming in Properties dialog Fixes https://github.com/lxde/pcmanfm-qt/issues/324.
|
||||
* Cancel indexing job when closing filepropsdialog
|
||||
* Bump year
|
||||
|
||||
0.11.0 / 2016-02-27
|
||||
===================
|
||||
|
||||
* Bump version number and ABI version and preparing for the initial release.
|
||||
* Redirect focus operation on the folderview to the actual widget
|
||||
* Use grid layout to have proper properties alignment
|
||||
* Focus automatically on the first field of the filesearch dialog
|
||||
* Add (folder) custom actions to foldermenu.
|
||||
* Update czech translation (by Petr Balíček <pbalicek@seznam.cz>)
|
||||
* Fix compiling with Qt < 5.4
|
||||
* Add supports for freedesktop Xdnd direct save (XDS) protocol (closes #pcmanfm-qt/298). * Move Xdnd workarounds from pcmanfm-qt to libfm-qt.
|
||||
* Protected FolderView methods for getting and setting item delegate margins
|
||||
* Perform auto-completion for the path bar when the user press Tab key. This closes pcmanfm-qt/#201.
|
||||
* Disable unused options in file search dialog
|
||||
* Let the style engine draw the text selection rectangle.
|
||||
* Fix file search with smaller than option
|
||||
* Fix target language in Lithuanian translation file
|
||||
* Fix memory leak if reading stream for image failed
|
||||
* Update German translation
|
||||
* Polish translation updated
|
||||
* Polish translation updated
|
||||
* Add a missing type casting to fix a compiler warning.
|
||||
* Relicense libfm-qt to LGPL v.2.1.
|
||||
* Avoid using blocking calls when initializing the trash can to speed up startup.
|
||||
* Updated Russian translation Removed ru_RU file
|
||||
* Create DnD menu with supported actions only
|
||||
* make createAction public so can be hidden from view
|
||||
* Adds Runtime and Devel install COMPONENT
|
||||
* Quote everything that could break due to whitespaces
|
||||
* Use CMake GenerateExportHeader to generate ABI header file
|
||||
* Use no exceptions also with Clang
|
||||
* Uses CMAKE_VISIBILITY and CMAKE_CXX_VISIBILITY flags
|
||||
* Use QString() instead of ""
|
||||
* Fix duplicated mtp mounts in the side pane by adding workarounds for potential bugs of gvfs.
|
||||
* Replace g_io_scheduler which is deprecated with QThread in Fm::PathEdit. * Fix compiler warnings.
|
||||
* Adds .gitignore
|
||||
* Makes Release the default BUILD_TYPE
|
||||
* Adds INSTALL package configuration file
|
||||
* Removes XCB from the dependencies
|
||||
* Adds target_include_directories() for the INSTALL_INTERFACE.
|
||||
* Removes CMAKE_CURRENT_BINARY_DIR usage
|
||||
* Removes QTX_INCLUDE_DIRS
|
||||
* Removes Qt Creator .user file
|
||||
* Updates libraries dependencies
|
||||
* Adds REQUIRED_PACKAGE_VERSION variables
|
||||
* Adds generation of TARGETS CMake file
|
||||
* Creates and installs an package version file
|
||||
* Renames and moves LIBRARY_NAME variable to the top CMakeLists
|
||||
* Removes sub-project
|
||||
* Rename the library to libfm-qt and fix installed header files.
|
||||
* Split pcmanfm-qt into two parts and move libfm-qt to its own repository.
|
||||
* Update French translation
|
||||
* Italian translation updates
|
||||
* Fix a crash triggered when unmounting a volume from the side pane.
|
||||
* Avoid duplicated volumes and mounts in the side panel. (This fixes the mtp:// problem.)
|
||||
* Fix missing null pointer check in Fm::Path::parent() and use nullptr instead of NULL in path.h.
|
||||
* Code cleanup, «using» directive only if necessary
|
||||
* Upgrade of pcmanfm-qt to C++11
|
||||
* hu translations updated
|
||||
* Fixed several problems with item selection and alignment
|
||||
* Remove unnecessary qDebug traces
|
||||
* Update translations.
|
||||
* The signal QAbstractItemView::iconSizeChanged is only available after Qt 5.5. Add workarounds for older Qt versions.
|
||||
* Add more null pointer checks in the thumbnail loader to avoid crashes caused by older versions of libfm.
|
||||
* Update translations
|
||||
* Avoid the column resizing tricks for the detailed list view when the view contains no columns.
|
||||
* Improve the column width computation for the detailed view
|
||||
* PlacesView: activate on click on the second column
|
||||
* SidePane: reduce size of button's column width
|
||||
* Added a filterbar + Handle virtually hidden files
|
||||
* Russian translation update
|
||||
* Update cs_CZ translation with the strings provided by petrbal in pull request #218.
|
||||
* Allow adding or removing paths in the file search dialog. Fix bugs in searching for documents.
|
||||
* Try to implement file searching by using the new Fm::FileSearchDialog class.
|
||||
* Fix a incorrecy free() in fm_search_free() API.
|
||||
* Add Fm::Path::take() API to take the ownership of a raw FmPath pointer.
|
||||
* Add class Fm::FileSearchDialog used to show a dialog for searching files.
|
||||
* Add FmSearch API which is used to build a search:// URI. (implemented in C and might become part of libfm later).
|
||||
* Fix #195 - Crash when rightclick on item in trash.
|
||||
* Add a null check for FmFileInfo in Fm::ProxyFolderModel::lessThan(). This closes #205.
|
||||
* Fix (workaround) for right-click crash in placesview.
|
||||
* Russian translation: update
|
||||
* Italian translation: add desktop entry files, adjust TS files
|
||||
* placesview: middle-click correct item to activate (fix of segfault)
|
||||
* Check for null pointers.
|
||||
* Select the folder from where we have gone up.
|
||||
* Paste into folder from its context menu.
|
||||
* libfm-qt: updated german translation
|
||||
* libfm-qt: lupdated translation files
|
||||
* Add Greek (el) translation
|
||||
* added support for mouse back/forward buttons
|
||||
* Update German translation
|
||||
* Add new signal prepareFileMenu() to Fm::SidePane and Fm::DirTree so there's a chance to customize the file menu before its shown.
|
||||
* Port some missing config options from the gtk+ version of pcmanfm.
|
||||
* Also show hidden dirs in the directory tree when the "Show Hidden" option in the menu is turned on.
|
||||
* Fix #190 - Column layout is not always updated.
|
||||
* Create New menu actions, context menu in tree side pane, #163.
|
||||
* Store side pane mode setting, #157.
|
||||
* Fixes an translation regression
|
||||
* Updates translations
|
||||
* Uses LXQt lxqt_translate_ts() to handle translations
|
||||
* Fix lxde/lxqt#447 - missing actions in Places' context menus
|
||||
* Remove trailing whitespaces
|
||||
* polishing German translation
|
||||
* Add menu items and shortcuts for new folder and blank file, fixes #163.
|
||||
* Display folders first when active and sort order descending, fixes #179.
|
||||
* Avoid space wasted by incorrect decoration in detailed view columns, fixes #177.
|
||||
* Avoid flickering column header while resizing manually, fixes #176.
|
||||
* Hungarian translation
|
||||
* Fix #627 - long startup time. (This blocking is caused by checking the availability of "network:///".)
|
||||
* Enable text selection in file properties dialog
|
||||
* Fix some memory leaks reported by valgrind.
|
||||
* Fix warnings reported by cppcheck.
|
||||
* Fix warnings reported by scan-build.
|
||||
* Sort indicators in detailed view, store column and order in settings, fixes #109.
|
||||
* Fix lxde/lxqt#512 - pcmanfm-qt: cannot delete to trash.
|
||||
* Polish translations added
|
||||
* Use 'user-trash' icon for 'Move to Trash'
|
||||
* The "Custom" option in the application chooser combo box inside file properties dialog is broken. Fix by preventing recursive signal handler invocation.
|
||||
* The file property dialog does not show correct default applications. Fix a bug in AppChooserComboBox::setMimeType() that does incorrect app comparison.
|
||||
* When converting an UID or GID to its name, show the number as string when the user or group does not exists.
|
||||
* Add more null checks.
|
||||
* Portuguese update
|
||||
* Add very basic "remaining time" display to the progress dialog. Fix lxde/lxqt#463 - Progress dialog of pcmanfm-qt does not show remaining time.
|
||||
* Fix lxde/pcmanfm-qt#120 - Foucs "Rename" button when file name changed.
|
||||
* Remove unnecessary '\n' charactor from the translated strings.
|
||||
* Fix translations (the newly added string comes from the translation of libfm).
|
||||
* Improve trash can handling: provide an option to delete the files if moving to trashcan fails.
|
||||
* Fix broken filenames of translation files.
|
||||
* More migration to Qt5 new signal/slot syntax for better type safety & speed.
|
||||
* Migrade to new Qt5 signal/slot syntax for better type safety and speed.
|
||||
* Fix the broken sorting option.
|
||||
* Fix lxde/lxqt#448 - PCmanFM-QT renaming place bookmarks does nothing.
|
||||
* Support linguistic sorting of file names. This fixes #105.
|
||||
* Update the folder model & view after files are changed.
|
||||
* Open folders in new tabs by middle clicking on items in the side pane.
|
||||
* Portuguese update
|
||||
* Fix a crash of the context menu of places view caused by change of items.
|
||||
* Save the result of "Edit bookmarks" to gtk+3 bookmarks file instead of the deprecated ~/.gtkbookmarks file. This fixes bug #112 partially.
|
||||
* Add spanish translations
|
||||
* Update Japanese translation
|
||||
* Add German translation
|
||||
* add Japanese translation
|
||||
* Implement "UnTrash" for files in trash:/// and close lxde/lxqt#136.
|
||||
* Add Russian translation
|
||||
* Drop Qt4 support in code
|
||||
* Clean up CMakeLists.txt and drop Qt4 support
|
||||
* New files added from LXDE Pootle server based on templates
|
||||
* Commit from LXDE Pootle server by user Julius22.: 1007 of 1008 strings translated (2 need review).
|
||||
* Commit from LXDE Pootle server by user Julius22.: 709 of 1008 strings translated (2 need review).
|
||||
* Commit from LXDE Pootle server by user mbouzada.: 364 of 364 strings translated (0 need review).
|
||||
* New files added from LXDE Pootle server based on templates
|
||||
* Add cs_CZ translation for libfm-qt.
|
||||
* Commit from LXDE Pootle server by user dforsi.: 364 of 364 strings translated (0 need review).
|
||||
* Commit from LXDE Pootle server by user dforsi.: 358 of 364 strings translated (0 need review).
|
||||
* Bump package version number and library soversion to prepare for 0.2 release.
|
||||
* Fix #85 - Scrolling doesn't work in compact view.
|
||||
* Hide UI elements that are not usable and disable trash can when gvfs is not available. * Add new API Fm::isUriSchemeSupported().
|
||||
* Avoid showing the popup menu when moving desktop items.
|
||||
* Improve handling of file selection and fixing FolderView::selectAll(), which is reported in #45. Delay the handling of selectionChanged() signal to avoid too frequent UI updates.
|
||||
* Little adjustment for the grid of the folder view to decrease unnecessary margins.
|
||||
* Use a new way to optimize the size of filename display based on current view mode and font size. This also fixes lxde/lxde-qt #198 - PCmanFM-qt incorrectly displays 256x256 Thumbnails.
|
||||
* Fully support single click activation and auto-selection with associated options added to the preference dialog.
|
||||
* Add single click and auto-selection on hover support to Fm::FolderView.
|
||||
* New files added from LXDE Pootle server based on templates
|
||||
* New files added from LXDE Pootle server based on templates
|
||||
* Improve update of translations to avoid unnecessary regeneration of ts files.
|
||||
* Improve handling of fallback icons. This closes bug #57.
|
||||
* Translations are lost accidentally in a previous commit. Restore them all.
|
||||
* Fix a crash in Fm::PlacesModel when gvfs is not available. This closes bug #35 - Ctrl+W closes all windows.
|
||||
* Do not detect filename extension and select the whole filename by default while renaming directories. This closes bug #71 - Don't try to detect extensions on directories. * API changed: Fm::renameFile() now accepect FmFileInfo as its first parameter.
|
||||
* Fix bug #80 - make execute in context menu doesn't do change permissions.
|
||||
* Revert "fixed selection issue #45" This patch breaks copying files by DND in icon view mode and moving desktop icons.
|
||||
* Use qss instead of QPalette to set the background color of ColorButton. This fixed bug #192 of lxde-qt.
|
||||
* Rename the library from libfm-qt to libfm-qt5 when built with Qt5.
|
||||
* fixed selection issue #45
|
||||
* Fix middle click position calculation in detailed view mode
|
||||
* Fix crash when context menu is requested but selection is empty
|
||||
* Activate view items only if clicked with left mouse button
|
||||
* Do not emit activated signal when keyboard modifiers are on.
|
||||
* Splits the checks for needed libraries
|
||||
* Removes duplicated include_directories() entry
|
||||
* Make sure clang compiler does not complain
|
||||
* Install pkgconfig file of libfm-qt to correct location in FreeBSD
|
||||
* Fix missing return values in several methods.
|
||||
* Avoid endless popups of error dialogs when there are errors launching files.
|
||||
* Save thumbnails as png files correctly.
|
||||
* Remember custom positions for desktop icons and fix #29.
|
||||
* Add template support to the folder context menus and fix #39.
|
||||
* Show "owner" in the detailed list view mode. * Fix a crash when switching to detailed list mode in qt5.
|
||||
* Use xcb to set EWMH window type hint to the desktop window in Qt5. * Some more cleanup for the CMakeList.txt files
|
||||
* Add initial support for Qt5.
|
||||
* Try to fix #36 again.
|
||||
* Fix a seg fault caused by the widget being deleted during glib signal handling.
|
||||
* Code cleanup, removing unnecessary header inclusion to speed up compilation.
|
||||
* Avoid further handling of MountOperation in the gio finished callback if the object is deleted.
|
||||
* Use modeless dialogs for app chooser and error reporting in Fm::FileLauncher and Fm::FileMenu.
|
||||
* Add an small emblem for symlinks (using icon name "emblem-symbolic-link"). Fix bug #27.
|
||||
* Add missing file to git.
|
||||
* Move internal implementation details to private headers which are not installed to the system.
|
||||
* Implement Fm::AppChooserDialog and Fm::AppMenuView classes. * Add <Open with...>/<Other Applications> menu item to Fm::FileMenu. * Add custom app to Fm::AppChooserComboBox.
|
||||
* Add Fm::AppChooserComboBox and use it in Fm::FilePropsDialog.
|
||||
* Redesign Fm::FileLauncher APIs to make it more usable. * Add Fm::FileMenu::setFileLauncher() and Fm::FolderView::setFileLauncher() APIs. * Move PCManFM::View::onFileClick() and other popup menu handling to Fm::FolderView.
|
||||
* Improve Fm::FileLaucher to make it easy to derive subclasses. * Implement a special dialog for opening executable files (Fix bug #13 - it does not launch executables)
|
||||
* Fix bug #28 - Tash can icon does not refresh when the trash can changes its empty/full status
|
||||
* Load autocompletion list for Fm::PathEdit only when the widget has the keyboard focus to avoid unnecessary I/O.
|
||||
* Add proper popup menu items for selected folders and fix #20 and #19. * Some code refactors, adding openFolders() and openFolderInTerminal() to Application class.
|
||||
* Fix #25 - Amount of items in the folder is not refreshed when the folder content changes. * Update status bar text properly on switching tab pages, selection changes, and folder content changes.
|
||||
* Fix the broken compiler definitions caused by previous commit.
|
||||
* Fix bug #22 - Do not select file extension by default on file rename. * Avoid installing private headers (*_p.h files)
|
||||
* Setup pcmanfm-qt to support optional Custom Actions Menubar detects if libfm was built with vala or not if so a fm-actions.h will exist and support will be compiled in if not, will still compile with no actions menu
|
||||
* Allow installation path configuration with standard CMake X_INSTALL_DIR
|
||||
* Support reordering bookmark items in the places view with DND.
|
||||
* Support adding bookmarks to the places view using drag and drop
|
||||
* Preparing for implementing dnd for places view.
|
||||
* Improve the usability of icon view mode, fixing github bug #24.
|
||||
* Fix crashes caused by invalid pointer access.
|
||||
* Switch current dir of the folder view correctly with dir tree view in the side pane.
|
||||
* Finish chdir operation for Fm::DirTreeView.
|
||||
* Support hiding hidden folders from DirTreeModel.
|
||||
* Move some methods from DirTreeModel to DirTreeModelItem and fix some row updating problems.
|
||||
* Implement dynamic folder loading/unloading when expanding or collapsing dir tree nodes. * Enable horizontal scrollbar of dir tree view.
|
||||
* Move some code from Fm::DirTreeModel to Fm::DirTreeModelItem.
|
||||
* Partially implement Fm::DirTreeView and Fm::DirTreeModel. (not finished yet)
|
||||
* Fix an invalid pointer
|
||||
* Implment different modes for Fm::SidePane, matching libfm-qtk design. * Add basic skeleton for dir tree view/model.
|
||||
* Fix the cosmetic defect introduced by the eject buttons in the places view.
|
||||
* Add eject buttons to mounted volumes in the places side pane.
|
||||
* Add a wrapper class Fm::Path for FmPath C struct.
|
||||
* Initialize icon_ member of PlacesModelItem correctly.
|
||||
* Fix fallback icon when a platform plugin is abscent. * Make Fm::IconTheme::checkUpdate() a static function.
|
||||
* Remove xsettings support. Use a cleaner way to detect config changes by monitor StyleChange events. * Add Fm::IconTheme::changed() signal which is emitted when the icon theme name is changed. * Replace nested Fm::PlacesModel::Item and related classes with their own separate toplevel classes.
|
||||
* Fix the icon for files of unknown mime types, again.
|
||||
* Fix the icon for files of unknown mime types.
|
||||
* Add DES-EMA custom actions to the popup menus.
|
||||
* Make it safe to create multiple Fm::LibFmQt objects and only initialize libfm once.
|
||||
* Fix incorrect export symbols and use GNUInstallDirs for installation destination
|
||||
* Use the latest libfm thumbnailer APIs.
|
||||
* Fix #3614873 - Thumbnails in icon view shown upside down for some jpegs.
|
||||
* Adopt recent changes of libfm. FmIcon is essentially identical to GIcon now.
|
||||
* Add a UI file for application chooser dialog.
|
||||
* Correctly handle display names of folders in path entry auto-completion.
|
||||
* Add a global header and add proper definition for LIBFM_QT_API macro.
|
||||
* Add "Empty trash" and fix a memory leak.
|
||||
* Fix memory leaks for bookmarks. Fix the broken "Network" item in places.
|
||||
* Reduce memory usage: Paint the folder items with our own code instead of using a dirty hacks duplicating pixmaps.
|
||||
* Reduce of size of QPixmapCache in the hope of decreasing memory usage.
|
||||
* Add fallback icons for places item "applications" and "network".
|
||||
* Add class Fm::CachedFolderModel, a convinient way to share Fm::FolderModel objects and reduce memory usage.
|
||||
* Resize the columns of detailed list view when items are inserted or removed.
|
||||
* Optimize column widths in detailed list mode when the view is resized.
|
||||
* Only show thumbnails for the first column in detailed list mode.
|
||||
* Use new "automoc" feature of cmake 2.8.6 and remove cumbersome #include "*.moc" code.
|
||||
* Trivial fix.
|
||||
* Add additional custom filter support to ProxyFolderModel.
|
||||
* Fix some memory leaks.
|
||||
* Fix some compiler errors and update translations.
|
||||
* Support the latest libfm trunk. Remove -fpermissive compiler flag and fix compiler errors/warnings.
|
||||
* Adopt new libfm thumbnail APIs.
|
||||
* Add soname 0.0.0 for libfm-qt, preparing for 0.1 release.
|
||||
* Fix crashes caused by incorrect deletion of dialog objects.
|
||||
* Enable thumbnail related settings.
|
||||
* Update zh_TW translations and translation templates.
|
||||
* Add Portuguese translation (pt).
|
||||
* Add Lithuanian translation (lt_LT).
|
||||
* Adopt the latest thumbnail API in libfm (thumbnail branch) to speed up loading.
|
||||
* Workardound incorrect thumbnail painting caused by bug of QStyledItemDelegate. :-(
|
||||
* Fix a crash caused by accessing data for invalid model index.
|
||||
* Fix a crash caused by accessing data for invalid model index.
|
||||
* Add basic thumbnail support (need the latest thumbnail branch of libfm).
|
||||
* Add archiver integration for file context menus.
|
||||
* Add archiver integration to file context menus.
|
||||
* Add mnemonics for menu items. Make confirm dialog before delete and trash can optional.
|
||||
* Update side pane according to current dir. Little fix.
|
||||
* Implement "Open in Terminal" and "Open as Root".
|
||||
* Implement "Auto Run" for newly inserted removable devices.
|
||||
* Add "Edit Bookmarks" dialog.
|
||||
* Implement "Invert Selection". Little fix of UI, add a Tool menu to main window.
|
||||
* Implement "Create New" menu in the folder popup menu.
|
||||
* Modify make rules for translations. Avoid deleting generated ts files when "make clean". Fix a small error in zh_TW translation.
|
||||
* Add auto-completion to path entry bar.
|
||||
* Rename Fm::Application to Fm::LibFmQt to decrease confusion. Set required Qt version to 4.6.
|
||||
* Load translation files correctly for pcmanfm-qt and libfm-qt.
|
||||
* Add basic skeleton for i18n (using Qt QTranslator & Qt Linguist).
|
||||
* Add separate CMakeLists.txt files for pcmanfm and libfm-qt. Hide more implementation details from libfm-qt headers.
|
||||
* Fix copyright notice in all source files.
|
||||
* Install a pkgconfig file for libfm-qt for use in other projects.
|
||||
* Fix a memory error caused by incorrect array size. Fix incorrect spacing of icons.
|
||||
* Finish chown and chmod supports.
|
||||
* Try to add file opermission settings UI.
|
||||
* Implement very basic drag and drop support.
|
||||
* Supress the incorrect default dnd handling of QListView.
|
||||
* Try to implement Dnd.
|
||||
* Finish desktop preferences.
|
||||
* Improve desktop preferences and apply settings (partially done).
|
||||
* Add desktop preferences dialog.
|
||||
* Apply side pane icon size correctly. Add basic skeleton for archiver integration.
|
||||
* Set shortcuts for frequently used menu options. Implement "rename file" support. Hide tabs when there is only one tab left (optional).
|
||||
* Delete windows properly when they're closed with setAttribute(Qt::WA_DeleteOnClose); Apply settings to windows after clicking OK in the preference dialog.
|
||||
* Improve preferences dialog. Change base class of SidePane to QWidget.
|
||||
* Sync the state of folder popup menu and main menu bar.
|
||||
* Implement sort options for main window.
|
||||
* Fix file sorting options for Fm::FolderMenu.
|
||||
* Correctly implement browse history and fix crashes.
|
||||
* Add very simple browse history (back/forward) handling.
|
||||
* Apply gcc visiblility attributes to export less symbols.
|
||||
* Correctly handle file rename/overwrite during file operations.
|
||||
* Exclude unnecessary files from CPack.
|
||||
* Improve folder popup menu.
|
||||
* Add folder popup menu. Some UI polishing.
|
||||
* Fix a little crash.
|
||||
* Fix crashes when turning off desktop manager.
|
||||
* Show popup menu for blank area of folders.
|
||||
* Do some refactor to make Fm::FolderView cleaner. Add PCManFM::View to do file manager-specific operations.
|
||||
* Move files for libfm-qt and pcmanfm-qt to separate subdirs.
|
@ -1,21 +1,27 @@
|
||||
# libfm-qt
|
||||
|
||||
Includes libfm-qt, the Qt port of the libfm - a library providing components to
|
||||
build desktop file managers.
|
||||
## Overview
|
||||
|
||||
Issue tracker:
|
||||
https://github.com/lxde/pcmanfm-qt/issues
|
||||
libfm-qt is the Qt port of libfm, a library providing components to build desktop file managers which belongs to [LXDE](http://lxde.org).
|
||||
|
||||
LXQt website:
|
||||
http://lxqt.org
|
||||
libfm-qt is licensed under the terms of the [LGPLv2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) or any later version. See file LICENSE for its full text.
|
||||
|
||||
LXDE website:
|
||||
http://lxde.org
|
||||
## Installation
|
||||
|
||||
### Compiling source code
|
||||
|
||||
# License
|
||||
Runtime dependencies are qtx11extras and libfm ≥ 1,2 (not all features are provided by libfm-qt yet).
|
||||
Additional build dependencies are CMake and optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information.
|
||||
|
||||
libfm-qt is licensed under the terms of the
|
||||
[LGPLv2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) or any later version.
|
||||
Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems, depending on the way library paths are dealt with on 64bit systems variables like `CMAKE_INSTALL_LIBDIR` may have to be set as well.
|
||||
|
||||
See the LICENSE file for the full text of the license.
|
||||
To build run `make`, to install `make install` which accepts variable `DESTDIR` as usual.
|
||||
|
||||
### Binary packages
|
||||
|
||||
Official binary packages are available in Arch Linux, Debian (as of Debian stretch) and openSUSE (Leap 42.1 and Tumbleweed).
|
||||
The library is still missing in Fedora which is providing version 0.10.0 of PCManFM-Qt only so far. This version was still including the code outsourced into libfm-qt later so libfm-qt will have to be provided by Fedora, too, as soon as the distribution upgrades to PCManFM-Qt ≥ 0.10.1.
|
||||
|
||||
## Development
|
||||
|
||||
Issues should go to the tracker of PCManFM-Qt at https://github.com/lxde/pcmanfm-qt/issues.
|
||||
|
@ -0,0 +1,53 @@
|
||||
#.rst:
|
||||
# FindXCB
|
||||
# -------
|
||||
#
|
||||
# Find XCB libraries
|
||||
#
|
||||
# Tries to find xcb libraries on unix systems.
|
||||
#
|
||||
# - Be sure to set the COMPONENTS to the components you want to link to
|
||||
# - The XCB_LIBRARIES variable is set ONLY to your COMPONENTS list
|
||||
# - To use only a specific component check the XCB_LIBRARIES_${COMPONENT} variable
|
||||
#
|
||||
# The following values are defined
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# XCB_FOUND - True if xcb is available
|
||||
# XCB_INCLUDE_DIRS - Include directories for xcb
|
||||
# XCB_LIBRARIES - List of libraries for xcb
|
||||
# XCB_DEFINITIONS - List of definitions for xcb
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright (c) 2015 Jari Vetoniemi
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(XCB PROPERTIES
|
||||
URL "http://xcb.freedesktop.org/"
|
||||
DESCRIPTION "X protocol C-language Binding")
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_XCB QUIET xcb ${XCB_FIND_COMPONENTS})
|
||||
|
||||
find_library(XCB_LIBRARIES xcb HINTS ${PC_XCB_LIBRARY_DIRS})
|
||||
find_path(XCB_INCLUDE_DIRS xcb/xcb.h PATH_SUFFIXES xcb HINTS ${PC_XCB_INCLUDE_DIRS})
|
||||
|
||||
foreach(COMPONENT ${XCB_FIND_COMPONENTS})
|
||||
find_library(XCB_LIBRARIES_${COMPONENT} ${COMPONENT} HINTS ${PC_XCB_LIBRARY_DIRS})
|
||||
list(APPEND XCB_LIBRARIES ${XCB_LIBRARIES_${COMPONENT}})
|
||||
mark_as_advanced(XCB_LIBRARIES_${COMPONENT})
|
||||
endforeach(COMPONENT ${XCB_FIND_COMPONENTS})
|
||||
|
||||
set(XCB_DEFINITIONS ${PC_XCB_CFLAGS_OTHER})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS)
|
||||
mark_as_advanced(XCB_INCLUDE_DIRS XCB_LIBRARIES XCB_DEFINITIONS)
|
@ -1,107 +0,0 @@
|
||||
#=============================================================================
|
||||
# The lxqt_translate_desktop() function was copied from the the
|
||||
# LXQt LxQtTranste.cmake
|
||||
#
|
||||
# Original Author: Alexander Sokolov <sokoloff.a@gmail.com>
|
||||
#
|
||||
# funtion lxqt_translate_desktop(_RESULT
|
||||
# SOURCES <sources>
|
||||
# [TRANSLATION_DIR] translation_directory
|
||||
# )
|
||||
# Output:
|
||||
# _RESULT The generated .desktop (.desktop) files
|
||||
#
|
||||
# Input:
|
||||
#
|
||||
# SOURCES List of input desktop files (.destktop.in) to be translated
|
||||
# (merged), relative to the CMakeList.txt.
|
||||
#
|
||||
# TRANSLATION_DIR Optional path to the directory with the .ts files,
|
||||
# relative to the CMakeList.txt. Defaults to
|
||||
# "translations".
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
function(lxqt_translate_desktop _RESULT)
|
||||
# Parse arguments ***************************************
|
||||
set(oneValueArgs TRANSLATION_DIR)
|
||||
set(multiValueArgs SOURCES)
|
||||
|
||||
cmake_parse_arguments(_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
# check for unknown arguments
|
||||
set(_UNPARSED_ARGS ${_ARGS_UNPARSED_ARGUMENTS})
|
||||
if (NOT ${_UNPARSED_ARGS} STREQUAL "")
|
||||
MESSAGE(FATAL_ERROR
|
||||
"Unknown arguments '${_UNPARSED_ARGS}'.\n"
|
||||
"See lxqt_translate_desktop() documenation for more information.\n"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED _ARGS_SOURCES)
|
||||
set(${_RESULT} "" PARENT_SCOPE)
|
||||
return()
|
||||
else()
|
||||
set(_sources ${_ARGS_SOURCES})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED _ARGS_TRANSLATION_DIR)
|
||||
set(_translationDir "translations")
|
||||
else()
|
||||
set(_translationDir ${_ARGS_TRANSLATION_DIR})
|
||||
endif()
|
||||
|
||||
|
||||
get_filename_component (_translationDir ${_translationDir} ABSOLUTE)
|
||||
|
||||
foreach (_inFile ${_sources})
|
||||
get_filename_component(_inFile ${_inFile} ABSOLUTE)
|
||||
get_filename_component(_fileName ${_inFile} NAME_WE)
|
||||
#Extract the real extension ............
|
||||
get_filename_component(_fileExt ${_inFile} EXT)
|
||||
string(REPLACE ".in" "" _fileExt ${_fileExt})
|
||||
#.......................................
|
||||
set(_outFile "${CMAKE_CURRENT_BINARY_DIR}/${_fileName}${_fileExt}")
|
||||
|
||||
file(GLOB _translations
|
||||
${_translationDir}/${_fileName}_*${_fileExt}
|
||||
${_translationDir}/local/${_fileName}_*${_fileExt}
|
||||
)
|
||||
|
||||
set(_pattern "'\\[.*]\\s*='")
|
||||
if (_translations)
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(OUTPUT ${_outFile}
|
||||
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
|
||||
COMMENT "Generating ${_fileName}${_fileExt}"
|
||||
)
|
||||
endif()
|
||||
|
||||
set(__result ${__result} ${_outFile})
|
||||
|
||||
|
||||
# TX file ***********************************************
|
||||
set(_txFile "${CMAKE_BINARY_DIR}/tx/${_fileName}${_fileExt}.tx.sh")
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_translationDir ${_translationDir})
|
||||
string(REPLACE "${CMAKE_SOURCE_DIR}/" "" _tx_inFile ${_inFile})
|
||||
string(REPLACE "." "" _fileType ${_fileExt})
|
||||
|
||||
file(WRITE ${_txFile}
|
||||
"[ -f ${_inFile} ] || exit 0\n"
|
||||
"echo '[lxde-qt.${_fileName}_${_fileType}]'\n"
|
||||
"echo 'type = DESKTOP'\n"
|
||||
"echo 'source_lang = en'\n"
|
||||
"echo 'source_file = ${_tx_inFile}'\n"
|
||||
"echo 'file_filter = ${_tx_translationDir}/${_fileName}_<lang>${_fileExt}'\n"
|
||||
"echo ''\n"
|
||||
)
|
||||
|
||||
endforeach()
|
||||
|
||||
set(${_RESULT} ${__result} PARENT_SCOPE)
|
||||
endfunction(lxqt_translate_desktop)
|
@ -1,131 +0,0 @@
|
||||
#=============================================================================
|
||||
# Copyright 2014 Luís Pereira <luis.artur.pereira@gmail.com>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. The name of the author may not be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
#
|
||||
# funtion lxqt_translate_ts(qmFiles
|
||||
# [USE_QT5 [Yes | No]]
|
||||
# [UPDATE_TRANSLATIONS [Yes | No]]
|
||||
# SOURCES <sources>
|
||||
# [TEMPLATE] translation_template
|
||||
# [TRANSLATION_DIR] translation_directory
|
||||
# [INSTALL_DIR] install_directory
|
||||
# )
|
||||
# Output:
|
||||
# qmFiles The generated compiled translations (.qm) files
|
||||
#
|
||||
# Input:
|
||||
# USE_QT5 Optional flag to choose between Qt4 and Qt5. Defaults to Qt5
|
||||
#
|
||||
# UPDATE_TRANSLATIONS Optional flag. Setting it to Yes, extracts and
|
||||
# compiles the translations. Setting it No, only
|
||||
# compiles them.
|
||||
#
|
||||
# TEMPLATE Optional translations files base name. Defaults to
|
||||
# ${PROJECT_NAME}. An .ts extensions is added.
|
||||
#
|
||||
# TRANSLATION_DIR Optional path to the directory with the .ts files,
|
||||
# relative to the CMakeList.txt. Defaults to
|
||||
# "translations".
|
||||
#
|
||||
# INSTALL_DIR Optional destination of the file compiled files (qmFiles).
|
||||
# If not present no installation is performed
|
||||
|
||||
|
||||
|
||||
# CMake v2.8.3 needed to use the CMakeParseArguments module
|
||||
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
|
||||
|
||||
# We use our patched version to round a annoying bug.
|
||||
include(Qt5PatchedLinguistToolsMacros)
|
||||
|
||||
function(lxqt_translate_ts qmFiles)
|
||||
set(oneValueArgs USE_QT5 UPDATE_TRANSLATIONS TEMPLATE TRANSLATION_DIR INSTALL_DIR)
|
||||
set(multiValueArgs SOURCES)
|
||||
cmake_parse_arguments(TR "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
|
||||
if (NOT DEFINED TR_UPDATE_TRANSLATIONS)
|
||||
set(TR_UPDATE_TRANSLATIONS "No")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED TR_USE_QT5)
|
||||
set(TR_USE_QT5 "Yes")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED TR_TEMPLATE)
|
||||
set(TR_TEMPLATE "${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED TR_TRANSLATION_DIR)
|
||||
set(TR_TRANSLATION_DIR "translations")
|
||||
endif()
|
||||
|
||||
file(GLOB tsFiles "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}_*.ts")
|
||||
set(templateFile "${TR_TRANSLATION_DIR}/${TR_TEMPLATE}.ts")
|
||||
|
||||
if(TR_USE_QT5)
|
||||
# Qt5
|
||||
if (TR_UPDATE_TRANSLATIONS)
|
||||
qt5_patched_create_translation(QMS
|
||||
${TR_SOURCES}
|
||||
${templateFile}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
qt5_patched_create_translation(QM
|
||||
${TR_SOURCES}
|
||||
${tsFiles}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
else()
|
||||
qt5_patched_add_translation(QM ${tsFiles})
|
||||
endif()
|
||||
else()
|
||||
# Qt4
|
||||
if(TR_UPDATE_TRANSLATIONS)
|
||||
qt4_create_translation(QMS
|
||||
${TR_SOURCES}
|
||||
${templateFile}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
qt4_create_translation(QM
|
||||
${TR_SOURCES}
|
||||
${tsFiles}
|
||||
OPTIONS -locations absolute
|
||||
)
|
||||
else()
|
||||
qt4_add_translation(QM ${tsFiles})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(TR_UPDATE_TRANSLATIONS)
|
||||
add_custom_target("update_${TR_TEMPLATE}_ts" ALL DEPENDS ${QMS})
|
||||
endif()
|
||||
|
||||
if(DEFINED TR_INSTALL_DIR)
|
||||
install(FILES ${QM} DESTINATION ${TR_INSTALL_DIR})
|
||||
endif()
|
||||
|
||||
set(${qmFiles} ${QM} PARENT_SCOPE)
|
||||
endfunction()
|
@ -1,112 +0,0 @@
|
||||
#=============================================================================
|
||||
# Copyright 2005-2011 Kitware, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of Kitware, Inc. nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#=============================================================================
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
function(QT5_PATCHED_CREATE_TRANSLATION _qm_files)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs OPTIONS)
|
||||
|
||||
cmake_parse_arguments(_LUPDATE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
set(_lupdate_files ${_LUPDATE_UNPARSED_ARGUMENTS})
|
||||
set(_lupdate_options ${_LUPDATE_OPTIONS})
|
||||
|
||||
set(_my_sources)
|
||||
set(_my_tsfiles)
|
||||
foreach(_file ${_lupdate_files})
|
||||
get_filename_component(_ext ${_file} EXT)
|
||||
get_filename_component(_abs_FILE ${_file} ABSOLUTE)
|
||||
if(_ext MATCHES "ts")
|
||||
list(APPEND _my_tsfiles ${_abs_FILE})
|
||||
else()
|
||||
list(APPEND _my_sources ${_abs_FILE})
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(_ts_file ${_my_tsfiles})
|
||||
if(_my_sources)
|
||||
# make a list file to call lupdate on, so we don't make our commands too
|
||||
# long for some systems
|
||||
# get_filename_component(_ts_name ${_ts_file} NAME_WE)
|
||||
|
||||
get_filename_component(_name ${_ts_file} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" _ts_name ${_name})
|
||||
|
||||
set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file")
|
||||
set(_lst_file_srcs)
|
||||
foreach(_lst_file_src ${_my_sources})
|
||||
set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}")
|
||||
endforeach()
|
||||
|
||||
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
|
||||
foreach(_pro_include ${_inc_DIRS})
|
||||
get_filename_component(_abs_include "${_pro_include}" ABSOLUTE)
|
||||
set(_lst_file_srcs "-I${_pro_include}\n${_lst_file_srcs}")
|
||||
endforeach()
|
||||
|
||||
file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${_ts_file}
|
||||
COMMAND ${Qt5_LUPDATE_EXECUTABLE}
|
||||
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
|
||||
DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM)
|
||||
endforeach()
|
||||
qt5_patched_add_translation(${_qm_files} ${_my_tsfiles})
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(QT5_PATCHED_ADD_TRANSLATION _qm_files)
|
||||
foreach(_current_FILE ${ARGN})
|
||||
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
# get_filename_component(qm ${_abs_FILE} NAME_WE)
|
||||
|
||||
get_filename_component(_name ${_abs_FILE} NAME)
|
||||
string(REGEX REPLACE "^(.+)(\\.[^.]+)$" "\\1" qm ${_name})
|
||||
|
||||
get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION)
|
||||
if(output_location)
|
||||
file(MAKE_DIRECTORY "${output_location}")
|
||||
set(qm "${output_location}/${qm}.qm")
|
||||
else()
|
||||
set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${qm}
|
||||
COMMAND ${Qt5_LRELEASE_EXECUTABLE}
|
||||
ARGS ${_abs_FILE} -qm ${qm}
|
||||
DEPENDS ${_abs_FILE} VERBATIM
|
||||
)
|
||||
list(APPEND ${_qm_files} ${qm})
|
||||
endforeach()
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
@ -1 +1 @@
|
||||
9
|
||||
10
|
||||
|
@ -1,9 +1,16 @@
|
||||
#!/usr/bin/make -f
|
||||
#DH_VERBOSE = 1
|
||||
# export DH_VERBOSE = 1
|
||||
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
export LC_ALL=C.UTF-8
|
||||
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
%:
|
||||
dh ${@} --buildsystem cmake \
|
||||
--parallel
|
||||
--fail-missing
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DPULL_TRANSLATIONS=OFF \
|
||||
-DUPDATE_TRANSLATIONS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
@ -1,63 +1,50 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v2.0.22 (GNU/Linux)
|
||||
|
||||
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
|
||||
=fF8P
|
||||
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
|
||||
=h7ww
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
@ -1,3 +1,3 @@
|
||||
version=3
|
||||
version=4
|
||||
opts="pgpsigurlmangle=s/$/.asc/" \
|
||||
https://github.com/lxde/libfm-qt/releases .*/([\d\.]+).tar.gz
|
||||
https://github.com/lxde/libfm-qt/releases .*/libfm-qt-([\d\.]+).tar.xz
|
||||
|
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_ARCHIVER_H__
|
||||
#define __LIBFM_QT_FM_ARCHIVER_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Archiver {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Archiver() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Archiver(Archiver&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmArchiver*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~Archiver() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Archiver wrapPtr(FmArchiver* dataPtr) {
|
||||
Archiver obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmArchiver*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmArchiver* takeDataPtr() {
|
||||
FmArchiver* data = reinterpret_cast<FmArchiver*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmArchiver* dataPtr() {
|
||||
return reinterpret_cast<FmArchiver*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmArchiver*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// move assignment
|
||||
Archiver& operator=(Archiver&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmArchiver*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void setDefault(void) {
|
||||
fm_archiver_set_default(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static Archiver getDefault( ) {
|
||||
return wrapPtr(fm_archiver_get_default());
|
||||
}
|
||||
|
||||
|
||||
bool extractArchivesTo(GAppLaunchContext* ctx, FmPathList* files, FmPath* dest_dir) {
|
||||
return fm_archiver_extract_archives_to(dataPtr(), ctx, files, dest_dir);
|
||||
}
|
||||
|
||||
|
||||
bool extractArchives(GAppLaunchContext* ctx, FmPathList* files) {
|
||||
return fm_archiver_extract_archives(dataPtr(), ctx, files);
|
||||
}
|
||||
|
||||
|
||||
bool createArchive(GAppLaunchContext* ctx, FmPathList* files) {
|
||||
return fm_archiver_create_archive(dataPtr(), ctx, files);
|
||||
}
|
||||
|
||||
|
||||
bool isMimeTypeSupported(const char* type) {
|
||||
return fm_archiver_is_mime_type_supported(dataPtr(), type);
|
||||
}
|
||||
|
||||
|
||||
// the wrapped object cannot be copied.
|
||||
private:
|
||||
Archiver(const Archiver& other) = delete;
|
||||
Archiver& operator=(const Archiver& other) = delete;
|
||||
|
||||
|
||||
private:
|
||||
FmArchiver* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_ARCHIVER_H__
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_BOOKMARKS_H__
|
||||
#define __LIBFM_QT_FM_BOOKMARKS_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Bookmarks {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Bookmarks() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Bookmarks(FmBookmarks* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Bookmarks(const Bookmarks& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Bookmarks(Bookmarks&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Bookmarks() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Bookmarks wrapPtr(FmBookmarks* dataPtr) {
|
||||
Bookmarks obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmBookmarks* takeDataPtr() {
|
||||
FmBookmarks* data = reinterpret_cast<FmBookmarks*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmBookmarks* dataPtr() {
|
||||
return reinterpret_cast<FmBookmarks*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmBookmarks*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Bookmarks& operator=(const Bookmarks& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Bookmarks& operator=(Bookmarks&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
GList* getAll(void) {
|
||||
return fm_bookmarks_get_all(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void rename(FmBookmarkItem* item, const char* new_name) {
|
||||
fm_bookmarks_rename(dataPtr(), item, new_name);
|
||||
}
|
||||
|
||||
|
||||
void reorder(FmBookmarkItem* item, int pos) {
|
||||
fm_bookmarks_reorder(dataPtr(), item, pos);
|
||||
}
|
||||
|
||||
|
||||
void remove(FmBookmarkItem* item) {
|
||||
fm_bookmarks_remove(dataPtr(), item);
|
||||
}
|
||||
|
||||
|
||||
FmBookmarkItem* insert(FmPath* path, const char* name, int pos) {
|
||||
return fm_bookmarks_insert(dataPtr(), path, name, pos);
|
||||
}
|
||||
|
||||
|
||||
static Bookmarks dup(void ) {
|
||||
return Bookmarks::wrapPtr(fm_bookmarks_dup());
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_BOOKMARKS_H__
|
@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_CONFIG_H__
|
||||
#define __LIBFM_QT_FM_CONFIG_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Config {
|
||||
public:
|
||||
|
||||
|
||||
Config(void ) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_config_new());
|
||||
}
|
||||
|
||||
|
||||
Config(FmConfig* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Config(const Config& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Config(Config&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Config() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Config wrapPtr(FmConfig* dataPtr) {
|
||||
Config obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmConfig* takeDataPtr() {
|
||||
FmConfig* data = reinterpret_cast<FmConfig*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmConfig* dataPtr() {
|
||||
return reinterpret_cast<FmConfig*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmConfig*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Config& operator=(const Config& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Config& operator=(Config&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void emitChanged(const char* changed_key) {
|
||||
fm_config_emit_changed(dataPtr(), changed_key);
|
||||
}
|
||||
|
||||
|
||||
void save(const char* name) {
|
||||
fm_config_save(dataPtr(), name);
|
||||
}
|
||||
|
||||
|
||||
void loadFromKeyFile(GKeyFile* kf) {
|
||||
fm_config_load_from_key_file(dataPtr(), kf);
|
||||
}
|
||||
|
||||
|
||||
void loadFromFile(const char* name) {
|
||||
fm_config_load_from_file(dataPtr(), name);
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_CONFIG_H__
|
@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_DEEP_COUNT_JOB_H__
|
||||
#define __LIBFM_QT_FM_DEEP_COUNT_JOB_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
#include "job.h"
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API DeepCountJob: public Job {
|
||||
public:
|
||||
|
||||
|
||||
DeepCountJob(FmPathList* paths, FmDeepCountJobFlags flags) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_deep_count_job_new(paths, flags));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
DeepCountJob() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
DeepCountJob(FmDeepCountJob* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
DeepCountJob(const DeepCountJob& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
DeepCountJob(DeepCountJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static DeepCountJob wrapPtr(FmDeepCountJob* dataPtr) {
|
||||
DeepCountJob obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmDeepCountJob* takeDataPtr() {
|
||||
FmDeepCountJob* data = reinterpret_cast<FmDeepCountJob*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmDeepCountJob* dataPtr() {
|
||||
return reinterpret_cast<FmDeepCountJob*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmDeepCountJob*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
DeepCountJob& operator=(const DeepCountJob& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
DeepCountJob& operator=(DeepCountJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void setDest(dev_t dev, const char* fs_id) {
|
||||
fm_deep_count_job_set_dest(dataPtr(), dev, fs_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_DEEP_COUNT_JOB_H__
|
@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_DIR_LIST_JOB_H__
|
||||
#define __LIBFM_QT_FM_DIR_LIST_JOB_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
#include "job.h"
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API DirListJob: public Job {
|
||||
public:
|
||||
|
||||
|
||||
DirListJob(FmPath* path, gboolean dir_only) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_dir_list_job_new(path, dir_only));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
DirListJob() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
DirListJob(FmDirListJob* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
DirListJob(const DirListJob& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
DirListJob(DirListJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static DirListJob wrapPtr(FmDirListJob* dataPtr) {
|
||||
DirListJob obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmDirListJob* takeDataPtr() {
|
||||
FmDirListJob* data = reinterpret_cast<FmDirListJob*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmDirListJob* dataPtr() {
|
||||
return reinterpret_cast<FmDirListJob*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmDirListJob*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
DirListJob& operator=(const DirListJob& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
DirListJob& operator=(DirListJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void addFoundFile(FmFileInfo* file) {
|
||||
fm_dir_list_job_add_found_file(dataPtr(), file);
|
||||
}
|
||||
|
||||
|
||||
void setIncremental(gboolean set) {
|
||||
fm_dir_list_job_set_incremental(dataPtr(), set);
|
||||
}
|
||||
|
||||
|
||||
FmFileInfoList* getFiles(void) {
|
||||
return fm_dir_list_job_get_files(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static DirListJob newForGfile(GFile* gf) {
|
||||
return DirListJob::wrapPtr(fm_dir_list_job_new_for_gfile(gf));
|
||||
}
|
||||
|
||||
|
||||
static DirListJob new2(FmPath* path, FmDirListJobFlags flags) {
|
||||
return DirListJob::wrapPtr(fm_dir_list_job_new2(path, flags));
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_DIR_LIST_JOB_H__
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_DUMMY_MONITOR_H__
|
||||
#define __LIBFM_QT_FM_DUMMY_MONITOR_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_DUMMY_MONITOR_H__
|
@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FILE_H__
|
||||
#define __LIBFM_QT_FM_FILE_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API File {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
File() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
File(FmFile* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
File(const File& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
File(File&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~File() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static File wrapPtr(FmFile* dataPtr) {
|
||||
File obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFile* takeDataPtr() {
|
||||
FmFile* data = reinterpret_cast<FmFile*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFile* dataPtr() {
|
||||
return reinterpret_cast<FmFile*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFile*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
File& operator=(const File& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
File& operator=(File&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
static GFile* newForCommandlineArg(const char* arg) {
|
||||
return fm_file_new_for_commandline_arg(arg);
|
||||
}
|
||||
|
||||
|
||||
static GFile* newForUri(const char* uri) {
|
||||
return fm_file_new_for_uri(uri);
|
||||
}
|
||||
|
||||
|
||||
static bool wantsIncremental(GFile* file) {
|
||||
return fm_file_wants_incremental(file);
|
||||
}
|
||||
|
||||
|
||||
static void addVfs(const char* name, FmFileInitTable* init) {
|
||||
fm_file_add_vfs(name, init);
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FILE_H__
|
@ -0,0 +1,511 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FILE_INFO_H__
|
||||
#define __LIBFM_QT_FM_FILE_INFO_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API FileInfoList {
|
||||
public:
|
||||
|
||||
|
||||
FileInfoList( ) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfoList*>(fm_file_info_list_new());
|
||||
}
|
||||
|
||||
|
||||
FileInfoList(FmFileInfoList* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmFileInfoList*>(fm_list_ref(FM_LIST(dataPtr))) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
FileInfoList(const FileInfoList& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmFileInfoList*>(fm_list_ref(FM_LIST(other.dataPtr_))) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
FileInfoList(FileInfoList&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfoList*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~FileInfoList() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_list_unref(FM_LIST(dataPtr_));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static FileInfoList wrapPtr(FmFileInfoList* dataPtr) {
|
||||
FileInfoList obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmFileInfoList*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFileInfoList* takeDataPtr() {
|
||||
FmFileInfoList* data = reinterpret_cast<FmFileInfoList*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFileInfoList* dataPtr() {
|
||||
return reinterpret_cast<FmFileInfoList*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFileInfoList*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
FileInfoList& operator=(const FileInfoList& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_list_unref(FM_LIST(dataPtr_));
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmFileInfoList*>(fm_list_ref(FM_LIST(other.dataPtr_))) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
FileInfoList& operator=(FileInfoList&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfoList*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
bool isSameFs(void) {
|
||||
return fm_file_info_list_is_same_fs(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isSameType(void) {
|
||||
return fm_file_info_list_is_same_type(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isEmpty() {
|
||||
return fm_file_info_list_is_empty(dataPtr());
|
||||
}
|
||||
|
||||
unsigned int getLength() {
|
||||
return fm_file_info_list_get_length(dataPtr());
|
||||
}
|
||||
|
||||
FmFileInfo* peekHead() {
|
||||
return fm_file_info_list_peek_head(dataPtr());
|
||||
}
|
||||
|
||||
GList* peekHeadLink() {
|
||||
return fm_file_info_list_peek_head_link(dataPtr());
|
||||
}
|
||||
|
||||
void pushTail(FmFileInfo* d) {
|
||||
fm_file_info_list_push_tail(dataPtr(), d);
|
||||
}
|
||||
|
||||
void pushTailLink(GList* d) {
|
||||
fm_file_info_list_push_tail_link(dataPtr(), d);
|
||||
}
|
||||
|
||||
FmFileInfo* popHead(){
|
||||
return fm_file_info_list_pop_head(dataPtr());
|
||||
}
|
||||
|
||||
void deleteLink(GList* _l) {
|
||||
fm_file_info_list_delete_link(dataPtr(), _l);
|
||||
}
|
||||
|
||||
void clear() {
|
||||
fm_file_info_list_clear(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
FmFileInfoList* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class LIBFM_QT_API FileInfo {
|
||||
public:
|
||||
|
||||
|
||||
FileInfo( ) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfo*>(fm_file_info_new());
|
||||
}
|
||||
|
||||
|
||||
FileInfo(FmFileInfo* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmFileInfo*>(fm_file_info_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
FileInfo(const FileInfo& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmFileInfo*>(fm_file_info_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
FileInfo(FileInfo&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfo*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~FileInfo() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_file_info_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static FileInfo wrapPtr(FmFileInfo* dataPtr) {
|
||||
FileInfo obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmFileInfo*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFileInfo* takeDataPtr() {
|
||||
FmFileInfo* data = reinterpret_cast<FmFileInfo*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFileInfo* dataPtr() {
|
||||
return reinterpret_cast<FmFileInfo*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFileInfo*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
FileInfo& operator=(const FileInfo& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_file_info_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmFileInfo*>(fm_file_info_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
FileInfo& operator=(FileInfo&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFileInfo*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
bool canSetHidden(void) {
|
||||
return fm_file_info_can_set_hidden(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool canSetIcon(void) {
|
||||
return fm_file_info_can_set_icon(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool canSetName(void) {
|
||||
return fm_file_info_can_set_name(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool canThumbnail(void) {
|
||||
return fm_file_info_can_thumbnail(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
dev_t getDev(void) {
|
||||
return fm_file_info_get_dev(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
gid_t getGid(void) {
|
||||
return fm_file_info_get_gid(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
uid_t getUid(void) {
|
||||
return fm_file_info_get_uid(dataPtr());
|
||||
}
|
||||
|
||||
const char* getDispGroup() {
|
||||
return fm_file_info_get_disp_group(dataPtr());
|
||||
}
|
||||
|
||||
const char* getFsId() {
|
||||
return fm_file_info_get_fs_id(dataPtr());
|
||||
}
|
||||
|
||||
FmIcon* getIcon(void) {
|
||||
return fm_file_info_get_icon(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
time_t getCtime(void) {
|
||||
return fm_file_info_get_ctime(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
time_t getAtime(void) {
|
||||
return fm_file_info_get_atime(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
time_t getMtime(void) {
|
||||
return fm_file_info_get_mtime(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
const char* getTarget() {
|
||||
return fm_file_info_get_target(dataPtr());
|
||||
}
|
||||
|
||||
const char* getCollateKey() {
|
||||
return fm_file_info_get_collate_key(dataPtr());
|
||||
}
|
||||
|
||||
const char* getCollateKeyNoCaseFold() {
|
||||
return fm_file_info_get_collate_key_nocasefold(dataPtr());
|
||||
}
|
||||
|
||||
const char* getDesc() {
|
||||
return fm_file_info_get_desc(dataPtr());
|
||||
}
|
||||
|
||||
const char* getDispMtime() {
|
||||
return fm_file_info_get_disp_mtime(dataPtr());
|
||||
}
|
||||
|
||||
bool isWritableDirectory(void) {
|
||||
return fm_file_info_is_writable_directory(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isAccessible(void) {
|
||||
return fm_file_info_is_accessible(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isExecutableType(void) {
|
||||
return fm_file_info_is_executable_type(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isBackup(void) {
|
||||
return fm_file_info_is_backup(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isHidden(void) {
|
||||
return fm_file_info_is_hidden(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isUnknownType(void) {
|
||||
return fm_file_info_is_unknown_type(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isDesktopEntry(void) {
|
||||
return fm_file_info_is_desktop_entry(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isText(void) {
|
||||
return fm_file_info_is_text(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isImage(void) {
|
||||
return fm_file_info_is_image(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isMountable(void) {
|
||||
return fm_file_info_is_mountable(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isShortcut(void) {
|
||||
return fm_file_info_is_shortcut(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isSymlink(void) {
|
||||
return fm_file_info_is_symlink(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isDir(void) {
|
||||
return fm_file_info_is_dir(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmMimeType* getMimeType(void) {
|
||||
return fm_file_info_get_mime_type(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isNative(void) {
|
||||
return fm_file_info_is_native(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
mode_t getMode(void) {
|
||||
return fm_file_info_get_mode(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
goffset getBlocks(void) {
|
||||
return fm_file_info_get_blocks(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
goffset getSize(void) {
|
||||
return fm_file_info_get_size(dataPtr());
|
||||
}
|
||||
|
||||
const char* getDispSize() {
|
||||
return fm_file_info_get_disp_size(dataPtr());
|
||||
}
|
||||
|
||||
void setIcon(GIcon* icon) {
|
||||
fm_file_info_set_icon(dataPtr(), icon);
|
||||
}
|
||||
|
||||
|
||||
void setDispName(const char* name) {
|
||||
fm_file_info_set_disp_name(dataPtr(), name);
|
||||
}
|
||||
|
||||
|
||||
void setPath(FmPath* path) {
|
||||
fm_file_info_set_path(dataPtr(), path);
|
||||
}
|
||||
|
||||
|
||||
const char* getName() {
|
||||
return fm_file_info_get_name(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
const char* getDispName() {
|
||||
return fm_file_info_get_disp_name(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmPath* getPath(void) {
|
||||
return fm_file_info_get_path(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void update(FmFileInfo* src) {
|
||||
fm_file_info_update(dataPtr(), src);
|
||||
}
|
||||
|
||||
|
||||
static FileInfo newFromNativeFile(FmPath* path, const char* path_str, GError** err) {
|
||||
return FileInfo::wrapPtr(fm_file_info_new_from_native_file(path, path_str, err));
|
||||
}
|
||||
|
||||
|
||||
bool setFromNativeFile(const char* path, GError** err) {
|
||||
return fm_file_info_set_from_native_file(dataPtr(), path, err);
|
||||
}
|
||||
|
||||
|
||||
void setFromMenuCacheItem(struct _MenuCacheItem* item) {
|
||||
fm_file_info_set_from_menu_cache_item(dataPtr(), item);
|
||||
}
|
||||
|
||||
|
||||
static FileInfo newFromMenuCacheItem(FmPath* path, struct _MenuCacheItem* item) {
|
||||
return FileInfo::wrapPtr(fm_file_info_new_from_menu_cache_item(path, item));
|
||||
}
|
||||
|
||||
|
||||
void setFromGFileData(GFile* gf, GFileInfo* inf) {
|
||||
fm_file_info_set_from_g_file_data(dataPtr(), gf, inf);
|
||||
}
|
||||
|
||||
|
||||
static FileInfo newFromGFileData(GFile* gf, GFileInfo* inf, FmPath* path) {
|
||||
return FileInfo::wrapPtr(fm_file_info_new_from_g_file_data(gf, inf, path));
|
||||
}
|
||||
|
||||
|
||||
void setFromGfileinfo(GFileInfo* inf) {
|
||||
fm_file_info_set_from_gfileinfo(dataPtr(), inf);
|
||||
}
|
||||
|
||||
|
||||
static FileInfo newFromGfileinfo(FmPath* path, GFileInfo* inf) {
|
||||
return FileInfo::wrapPtr(fm_file_info_new_from_gfileinfo(path, inf));
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
FmFileInfo* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FILE_INFO_H__
|
@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FILE_INFO_JOB_H__
|
||||
#define __LIBFM_QT_FM_FILE_INFO_JOB_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
#include "job.h"
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API FileInfoJob: public Job {
|
||||
public:
|
||||
|
||||
|
||||
FileInfoJob(FmPathList* files_to_query, FmFileInfoJobFlags flags) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_file_info_job_new(files_to_query, flags));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
FileInfoJob() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
FileInfoJob(FmFileInfoJob* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
FileInfoJob(const FileInfoJob& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
FileInfoJob(FileInfoJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static FileInfoJob wrapPtr(FmFileInfoJob* dataPtr) {
|
||||
FileInfoJob obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFileInfoJob* takeDataPtr() {
|
||||
FmFileInfoJob* data = reinterpret_cast<FmFileInfoJob*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFileInfoJob* dataPtr() {
|
||||
return reinterpret_cast<FmFileInfoJob*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFileInfoJob*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
FileInfoJob& operator=(const FileInfoJob& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
FileInfoJob& operator=(FileInfoJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
FmPath* getCurrent(void) {
|
||||
return fm_file_info_job_get_current(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void addGfile(GFile* gf) {
|
||||
fm_file_info_job_add_gfile(dataPtr(), gf);
|
||||
}
|
||||
|
||||
|
||||
void add(FmPath* path) {
|
||||
fm_file_info_job_add(dataPtr(), path);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FILE_INFO_JOB_H__
|
@ -0,0 +1,193 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FILE_OPS_JOB_H__
|
||||
#define __LIBFM_QT_FM_FILE_OPS_JOB_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
#include "job.h"
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API FileOpsJob: public Job {
|
||||
public:
|
||||
|
||||
|
||||
FileOpsJob(FmFileOpType type, FmPathList* files) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_file_ops_job_new(type, files));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
FileOpsJob() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
FileOpsJob(FmFileOpsJob* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
FileOpsJob(const FileOpsJob& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
FileOpsJob(FileOpsJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static FileOpsJob wrapPtr(FmFileOpsJob* dataPtr) {
|
||||
FileOpsJob obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFileOpsJob* takeDataPtr() {
|
||||
FmFileOpsJob* data = reinterpret_cast<FmFileOpsJob*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFileOpsJob* dataPtr() {
|
||||
return reinterpret_cast<FmFileOpsJob*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFileOpsJob*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
FileOpsJob& operator=(const FileOpsJob& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
FileOpsJob& operator=(FileOpsJob&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
FmFileOpOption getOptions(void) {
|
||||
return fm_file_ops_job_get_options(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmFileOpOption askRename(GFile* src, GFileInfo* src_inf, GFile* dest, GFile** new_dest) {
|
||||
return fm_file_ops_job_ask_rename(dataPtr(), src, src_inf, dest, new_dest);
|
||||
}
|
||||
|
||||
|
||||
void emitPercent(void) {
|
||||
fm_file_ops_job_emit_percent(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void emitCurFile(const char* cur_file) {
|
||||
fm_file_ops_job_emit_cur_file(dataPtr(), cur_file);
|
||||
}
|
||||
|
||||
|
||||
void emitPrepared(void) {
|
||||
fm_file_ops_job_emit_prepared(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void setTarget(const char* url) {
|
||||
fm_file_ops_job_set_target(dataPtr(), url);
|
||||
}
|
||||
|
||||
|
||||
void setHidden(gboolean hidden) {
|
||||
fm_file_ops_job_set_hidden(dataPtr(), hidden);
|
||||
}
|
||||
|
||||
|
||||
void setIcon(GIcon* icon) {
|
||||
fm_file_ops_job_set_icon(dataPtr(), icon);
|
||||
}
|
||||
|
||||
|
||||
void setDisplayName(const char* name) {
|
||||
fm_file_ops_job_set_display_name(dataPtr(), name);
|
||||
}
|
||||
|
||||
|
||||
void setChown(gint uid, gint gid) {
|
||||
fm_file_ops_job_set_chown(dataPtr(), uid, gid);
|
||||
}
|
||||
|
||||
|
||||
void setChmod(mode_t new_mode, mode_t new_mode_mask) {
|
||||
fm_file_ops_job_set_chmod(dataPtr(), new_mode, new_mode_mask);
|
||||
}
|
||||
|
||||
|
||||
void setRecursive(gboolean recursive) {
|
||||
fm_file_ops_job_set_recursive(dataPtr(), recursive);
|
||||
}
|
||||
|
||||
|
||||
FmPath* getDest(void) {
|
||||
return fm_file_ops_job_get_dest(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void setDest(FmPath* dest) {
|
||||
fm_file_ops_job_set_dest(dataPtr(), dest);
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FILE_OPS_JOB_H__
|
@ -0,0 +1,228 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FOLDER_H__
|
||||
#define __LIBFM_QT_FM_FOLDER_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Folder {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Folder() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Folder(FmFolder* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Folder(const Folder& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Folder(Folder&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Folder() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Folder wrapPtr(FmFolder* dataPtr) {
|
||||
Folder obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFolder* takeDataPtr() {
|
||||
FmFolder* data = reinterpret_cast<FmFolder*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFolder* dataPtr() {
|
||||
return reinterpret_cast<FmFolder*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFolder*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Folder& operator=(const Folder& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Folder& operator=(Folder&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
bool makeDirectory(const char* name, GError** error) {
|
||||
return fm_folder_make_directory(dataPtr(), name, error);
|
||||
}
|
||||
|
||||
|
||||
void queryFilesystemInfo(void) {
|
||||
fm_folder_query_filesystem_info(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool getFilesystemInfo(guint64* total_size, guint64* free_size) {
|
||||
return fm_folder_get_filesystem_info(dataPtr(), total_size, free_size);
|
||||
}
|
||||
|
||||
|
||||
void reload(void) {
|
||||
fm_folder_reload(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isIncremental(void) {
|
||||
return fm_folder_is_incremental(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isValid(void) {
|
||||
return fm_folder_is_valid(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isLoaded(void) {
|
||||
return fm_folder_is_loaded(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmFileInfo* getFileByName(const char* name) {
|
||||
return fm_folder_get_file_by_name(dataPtr(), name);
|
||||
}
|
||||
|
||||
|
||||
bool isEmpty(void) {
|
||||
return fm_folder_is_empty(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmFileInfoList* getFiles(void) {
|
||||
return fm_folder_get_files(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmPath* getPath(void) {
|
||||
return fm_folder_get_path(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmFileInfo* getInfo(void) {
|
||||
return fm_folder_get_info(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void unblockUpdates(void) {
|
||||
fm_folder_unblock_updates(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void blockUpdates(void) {
|
||||
fm_folder_block_updates(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static Folder findByPath(FmPath* path) {
|
||||
return Folder::wrapPtr(fm_folder_find_by_path(path));
|
||||
}
|
||||
|
||||
|
||||
static Folder fromUri(const char* uri) {
|
||||
return Folder::wrapPtr(fm_folder_from_uri(uri));
|
||||
}
|
||||
|
||||
|
||||
static Folder fromPathName(const char* path) {
|
||||
return Folder::wrapPtr(fm_folder_from_path_name(path));
|
||||
}
|
||||
|
||||
|
||||
static Folder fromGfile(GFile* gf) {
|
||||
return Folder::wrapPtr(fm_folder_from_gfile(gf));
|
||||
}
|
||||
|
||||
|
||||
static Folder fromPath(FmPath* path) {
|
||||
return Folder::wrapPtr(fm_folder_from_path(path));
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FOLDER_H__
|
@ -0,0 +1,198 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_FOLDER_CONFIG_H__
|
||||
#define __LIBFM_QT_FM_FOLDER_CONFIG_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API FolderConfig {
|
||||
public:
|
||||
|
||||
|
||||
FolderConfig(FmPath* path) {
|
||||
dataPtr_ = reinterpret_cast<FmFolderConfig*>(fm_folder_config_open(path));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
FolderConfig() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
FolderConfig(FolderConfig&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFolderConfig*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~FolderConfig() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_folder_config_close(dataPtr_, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static FolderConfig wrapPtr(FmFolderConfig* dataPtr) {
|
||||
FolderConfig obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmFolderConfig*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmFolderConfig* takeDataPtr() {
|
||||
FmFolderConfig* data = reinterpret_cast<FmFolderConfig*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmFolderConfig* dataPtr() {
|
||||
return reinterpret_cast<FmFolderConfig*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmFolderConfig*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// move assignment
|
||||
FolderConfig& operator=(FolderConfig&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmFolderConfig*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
static void saveCache(void ) {
|
||||
fm_folder_config_save_cache();
|
||||
}
|
||||
|
||||
|
||||
void purge(void) {
|
||||
fm_folder_config_purge(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void removeKey(const char* key) {
|
||||
fm_folder_config_remove_key(dataPtr(), key);
|
||||
}
|
||||
|
||||
|
||||
void setStringList(const char* key, const gchar * const list[], gsize length) {
|
||||
fm_folder_config_set_string_list(dataPtr(), key, list, length);
|
||||
}
|
||||
|
||||
|
||||
void setString(const char* key, const char* string) {
|
||||
fm_folder_config_set_string(dataPtr(), key, string);
|
||||
}
|
||||
|
||||
|
||||
void setBoolean(const char* key, gboolean val) {
|
||||
fm_folder_config_set_boolean(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
void setDouble(const char* key, gdouble val) {
|
||||
fm_folder_config_set_double(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
void setUint64(const char* key, guint64 val) {
|
||||
fm_folder_config_set_uint64(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
void setInteger(const char* key, gint val) {
|
||||
fm_folder_config_set_integer(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
char** getStringList(const char* key, gsize* length) {
|
||||
return fm_folder_config_get_string_list(dataPtr(), key, length);
|
||||
}
|
||||
|
||||
|
||||
char* getString(const char* key) {
|
||||
return fm_folder_config_get_string(dataPtr(), key);
|
||||
}
|
||||
|
||||
|
||||
bool getBoolean(const char* key, gboolean* val) {
|
||||
return fm_folder_config_get_boolean(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
bool getDouble(const char* key, gdouble* val) {
|
||||
return fm_folder_config_get_double(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
bool getUint64(const char* key, guint64* val) {
|
||||
return fm_folder_config_get_uint64(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
bool getInteger(const char* key, gint* val) {
|
||||
return fm_folder_config_get_integer(dataPtr(), key, val);
|
||||
}
|
||||
|
||||
|
||||
bool isEmpty(void) {
|
||||
return fm_folder_config_is_empty(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
// the wrapped object cannot be copied.
|
||||
private:
|
||||
FolderConfig(const FolderConfig& other) = delete;
|
||||
FolderConfig& operator=(const FolderConfig& other) = delete;
|
||||
|
||||
|
||||
private:
|
||||
FmFolderConfig* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_FOLDER_CONFIG_H__
|
@ -0,0 +1,168 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_ICON_H__
|
||||
#define __LIBFM_QT_FM_ICON_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Icon {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Icon() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Icon(FmIcon* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmIcon*>(fm_icon_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Icon(const Icon& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmIcon*>(fm_icon_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Icon(Icon&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmIcon*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~Icon() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_icon_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Icon wrapPtr(FmIcon* dataPtr) {
|
||||
Icon obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmIcon*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmIcon* takeDataPtr() {
|
||||
FmIcon* data = reinterpret_cast<FmIcon*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmIcon* dataPtr() {
|
||||
return reinterpret_cast<FmIcon*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmIcon*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Icon& operator=(const Icon& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_icon_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmIcon*>(fm_icon_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Icon& operator=(Icon&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmIcon*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
static void unloadCache( ) {
|
||||
fm_icon_unload_cache();
|
||||
}
|
||||
|
||||
|
||||
static void resetUserDataCache(GQuark quark) {
|
||||
fm_icon_reset_user_data_cache(quark);
|
||||
}
|
||||
|
||||
|
||||
static void unloadUserDataCache( ) {
|
||||
fm_icon_unload_user_data_cache();
|
||||
}
|
||||
|
||||
|
||||
static void setUserDataDestroy(GDestroyNotify func) {
|
||||
fm_icon_set_user_data_destroy(func);
|
||||
}
|
||||
|
||||
|
||||
void setUserData(gpointer user_data) {
|
||||
fm_icon_set_user_data(dataPtr(), user_data);
|
||||
}
|
||||
|
||||
|
||||
gpointer getUserData(void) {
|
||||
return fm_icon_get_user_data(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static Icon fromName(const char* name) {
|
||||
return Icon::wrapPtr(fm_icon_from_name(name));
|
||||
}
|
||||
|
||||
|
||||
static Icon fromGicon(GIcon* gicon) {
|
||||
return Icon::wrapPtr(fm_icon_from_gicon(gicon));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
FmIcon* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_ICON_H__
|
@ -0,0 +1,225 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_JOB_H__
|
||||
#define __LIBFM_QT_FM_JOB_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Job {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Job() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Job(FmJob* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Job(const Job& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Job(Job&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Job() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Job wrapPtr(FmJob* dataPtr) {
|
||||
Job obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmJob* takeDataPtr() {
|
||||
FmJob* data = reinterpret_cast<FmJob*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmJob* dataPtr() {
|
||||
return reinterpret_cast<FmJob*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmJob*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Job& operator=(const Job& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Job& operator=(Job&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void resume(void) {
|
||||
fm_job_resume(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool pause(void) {
|
||||
return fm_job_pause(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
int askValist(const char* question, va_list options) {
|
||||
return fm_job_ask_valist(dataPtr(), question, options);
|
||||
}
|
||||
|
||||
|
||||
int askv(const char* question, gchar* const* options) {
|
||||
return fm_job_askv(dataPtr(), question, options);
|
||||
}
|
||||
|
||||
|
||||
int ask(const char* question, ... ) {
|
||||
|
||||
int ret;
|
||||
va_list args;
|
||||
va_start (args, question);
|
||||
ret = fm_job_ask_valist(dataPtr(), question, args);
|
||||
va_end (args);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
|
||||
FmJobErrorAction emitError(GError* err, FmJobErrorSeverity severity) {
|
||||
return fm_job_emit_error(dataPtr(), err, severity);
|
||||
}
|
||||
|
||||
|
||||
void finish(void) {
|
||||
fm_job_finish(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void setCancellable(GCancellable* cancellable) {
|
||||
fm_job_set_cancellable(dataPtr(), cancellable);
|
||||
}
|
||||
|
||||
|
||||
GCancellable* getCancellable(void) {
|
||||
return fm_job_get_cancellable(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void initCancellable(void) {
|
||||
fm_job_init_cancellable(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
gpointer callMainThread(FmJobCallMainThreadFunc func, gpointer user_data) {
|
||||
return fm_job_call_main_thread(dataPtr(), func, user_data);
|
||||
}
|
||||
|
||||
|
||||
void cancel(void) {
|
||||
fm_job_cancel(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool runSyncWithMainloop(void) {
|
||||
return fm_job_run_sync_with_mainloop(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool runSync(void) {
|
||||
return fm_job_run_sync(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool runAsync(void) {
|
||||
return fm_job_run_async(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isRunning(void) {
|
||||
return fm_job_is_running(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool isCancelled(void) {
|
||||
return fm_job_is_cancelled(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_JOB_H__
|
@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_LIST_H__
|
||||
#define __LIBFM_QT_FM_LIST_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API List {
|
||||
public:
|
||||
|
||||
|
||||
List(FmListFuncs* funcs) {
|
||||
dataPtr_ = reinterpret_cast<FmList*>(fm_list_new(funcs));
|
||||
}
|
||||
|
||||
|
||||
// default constructor
|
||||
List() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
List(FmList* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmList*>(fm_list_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
List(const List& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmList*>(fm_list_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
List(List&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmList*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~List() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_list_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static List wrapPtr(FmList* dataPtr) {
|
||||
List obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmList*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmList* takeDataPtr() {
|
||||
FmList* data = reinterpret_cast<FmList*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmList* dataPtr() {
|
||||
return reinterpret_cast<FmList*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmList*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
List& operator=(const List& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_list_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmList*>(fm_list_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
List& operator=(List&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmList*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void deleteLink(GList* l_) {
|
||||
fm_list_delete_link(dataPtr(), l_);
|
||||
}
|
||||
|
||||
|
||||
void removeAll(gpointer data) {
|
||||
fm_list_remove_all(dataPtr(), data);
|
||||
}
|
||||
|
||||
|
||||
void remove(gpointer data) {
|
||||
fm_list_remove(dataPtr(), data);
|
||||
}
|
||||
|
||||
|
||||
void clear(void) {
|
||||
fm_list_clear(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
FmList* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_LIST_H__
|
@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_MIME_TYPE_H__
|
||||
#define __LIBFM_QT_FM_MIME_TYPE_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API MimeType {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
MimeType() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
MimeType(FmMimeType* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmMimeType*>(fm_mime_type_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
MimeType(const MimeType& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmMimeType*>(fm_mime_type_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
MimeType(MimeType&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmMimeType*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~MimeType() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_mime_type_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static MimeType wrapPtr(FmMimeType* dataPtr) {
|
||||
MimeType obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmMimeType*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmMimeType* takeDataPtr() {
|
||||
FmMimeType* data = reinterpret_cast<FmMimeType*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmMimeType* dataPtr() {
|
||||
return reinterpret_cast<FmMimeType*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmMimeType*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
MimeType& operator=(const MimeType& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_mime_type_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmMimeType*>(fm_mime_type_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
MimeType& operator=(MimeType&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmMimeType*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void removeThumbnailer(gpointer thumbnailer) {
|
||||
fm_mime_type_remove_thumbnailer(dataPtr(), thumbnailer);
|
||||
}
|
||||
|
||||
|
||||
void addThumbnailer(gpointer thumbnailer) {
|
||||
fm_mime_type_add_thumbnailer(dataPtr(), thumbnailer);
|
||||
}
|
||||
|
||||
|
||||
GList* getThumbnailersList(void) {
|
||||
return fm_mime_type_get_thumbnailers_list(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmIcon* getIcon(void) {
|
||||
return fm_mime_type_get_icon(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static MimeType fromName(const char* type) {
|
||||
return MimeType::wrapPtr(fm_mime_type_from_name(type));
|
||||
}
|
||||
|
||||
|
||||
static MimeType fromNativeFile(const char* file_path, const char* base_name, struct stat* pstat) {
|
||||
return MimeType::wrapPtr(fm_mime_type_from_native_file(file_path, base_name, pstat));
|
||||
}
|
||||
|
||||
|
||||
static MimeType fromFileName(const char* ufile_name) {
|
||||
return MimeType::wrapPtr(fm_mime_type_from_file_name(ufile_name));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
FmMimeType* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_MIME_TYPE_H__
|
@ -0,0 +1,192 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_NAV_HISTORY_H__
|
||||
#define __LIBFM_QT_FM_NAV_HISTORY_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API NavHistory {
|
||||
public:
|
||||
|
||||
|
||||
NavHistory(void ) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(fm_nav_history_new());
|
||||
}
|
||||
|
||||
|
||||
NavHistory(FmNavHistory* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
NavHistory(const NavHistory& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
NavHistory(NavHistory&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~NavHistory() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static NavHistory wrapPtr(FmNavHistory* dataPtr) {
|
||||
NavHistory obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmNavHistory* takeDataPtr() {
|
||||
FmNavHistory* data = reinterpret_cast<FmNavHistory*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmNavHistory* dataPtr() {
|
||||
return reinterpret_cast<FmNavHistory*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmNavHistory*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
NavHistory& operator=(const NavHistory& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
NavHistory& operator=(NavHistory&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
void setMax(guint num) {
|
||||
fm_nav_history_set_max(dataPtr(), num);
|
||||
}
|
||||
|
||||
|
||||
void clear(void) {
|
||||
fm_nav_history_clear(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void chdir(FmPath* path, gint old_scroll_pos) {
|
||||
fm_nav_history_chdir(dataPtr(), path, old_scroll_pos);
|
||||
}
|
||||
|
||||
|
||||
bool canBack(void) {
|
||||
return fm_nav_history_can_back(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
int getScrollPos(void) {
|
||||
return fm_nav_history_get_scroll_pos(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmPath* goTo(guint n, gint old_scroll_pos) {
|
||||
return fm_nav_history_go_to(dataPtr(), n, old_scroll_pos);
|
||||
}
|
||||
|
||||
|
||||
FmPath* getNthPath(guint n) {
|
||||
return fm_nav_history_get_nth_path(dataPtr(), n);
|
||||
}
|
||||
|
||||
|
||||
unsigned int getCurIndex(void) {
|
||||
return fm_nav_history_get_cur_index(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void jump(GList* l, int old_scroll_pos) {
|
||||
fm_nav_history_jump(dataPtr(), l, old_scroll_pos);
|
||||
}
|
||||
|
||||
|
||||
void forward(int old_scroll_pos) {
|
||||
fm_nav_history_forward(dataPtr(), old_scroll_pos);
|
||||
}
|
||||
|
||||
|
||||
bool canForward(void) {
|
||||
return fm_nav_history_can_forward(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
void back(int old_scroll_pos) {
|
||||
fm_nav_history_back(dataPtr(), old_scroll_pos);
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_NAV_HISTORY_H__
|
@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_TEMPLATES_H__
|
||||
#define __LIBFM_QT_FM_TEMPLATES_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Template {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Template() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Template(FmTemplate* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Template(const Template& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Template(Template&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Template() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Template wrapPtr(FmTemplate* dataPtr) {
|
||||
Template obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmTemplate* takeDataPtr() {
|
||||
FmTemplate* data = reinterpret_cast<FmTemplate*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmTemplate* dataPtr() {
|
||||
return reinterpret_cast<FmTemplate*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmTemplate*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Template& operator=(const Template& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Template& operator=(Template&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
bool createFile(GFile* path, GError** error, gboolean run_default) {
|
||||
return fm_template_create_file(dataPtr(), path, error, run_default);
|
||||
}
|
||||
|
||||
|
||||
bool isDirectory(void) {
|
||||
return fm_template_is_directory(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmIcon* getIcon(void) {
|
||||
return fm_template_get_icon(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
FmMimeType* getMimeType(void) {
|
||||
return fm_template_get_mime_type(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
static GList* listAll(gboolean user_only) {
|
||||
return fm_template_list_all(user_only);
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_TEMPLATES_H__
|
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_TERMINAL_H__
|
||||
#define __LIBFM_QT_FM_TERMINAL_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Terminal {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Terminal() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Terminal(FmTerminal* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<GObject*>(g_object_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Terminal(const Terminal& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Terminal(Terminal&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
virtual ~Terminal() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Terminal wrapPtr(FmTerminal* dataPtr) {
|
||||
Terminal obj;
|
||||
obj.dataPtr_ = reinterpret_cast<GObject*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmTerminal* takeDataPtr() {
|
||||
FmTerminal* data = reinterpret_cast<FmTerminal*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmTerminal* dataPtr() {
|
||||
return reinterpret_cast<FmTerminal*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmTerminal*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Terminal& operator=(const Terminal& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
g_object_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<GObject*>(g_object_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Terminal& operator=(Terminal&& other) {
|
||||
dataPtr_ = reinterpret_cast<GObject*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
static bool launch(const gchar* dir, GError** error) {
|
||||
return fm_terminal_launch(dir, error);
|
||||
}
|
||||
|
||||
|
||||
static Terminal dupDefault(GError** error) {
|
||||
return Terminal::wrapPtr(fm_terminal_dup_default(error));
|
||||
}
|
||||
|
||||
|
||||
// automatic type casting for GObject
|
||||
operator GObject*() {
|
||||
return reinterpret_cast<GObject*>(dataPtr_);
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
GObject* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_TERMINAL_H__
|
@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Copyright (C) 2016 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LIBFM_QT_FM_THUMBNAILER_H__
|
||||
#define __LIBFM_QT_FM_THUMBNAILER_H__
|
||||
|
||||
#include <libfm/fm.h>
|
||||
#include <QObject>
|
||||
#include <QtGlobal>
|
||||
#include "libfmqtglobals.h"
|
||||
|
||||
|
||||
namespace Fm {
|
||||
|
||||
|
||||
class LIBFM_QT_API Thumbnailer {
|
||||
public:
|
||||
|
||||
|
||||
// default constructor
|
||||
Thumbnailer() {
|
||||
dataPtr_ = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Thumbnailer(FmThumbnailer* dataPtr){
|
||||
dataPtr_ = dataPtr != nullptr ? reinterpret_cast<FmThumbnailer*>(fm_thumbnailer_ref(dataPtr)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// copy constructor
|
||||
Thumbnailer(const Thumbnailer& other) {
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmThumbnailer*>(fm_thumbnailer_ref(other.dataPtr_)) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
// move constructor
|
||||
Thumbnailer(Thumbnailer&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmThumbnailer*>(other.takeDataPtr());
|
||||
}
|
||||
|
||||
|
||||
// destructor
|
||||
~Thumbnailer() {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_thumbnailer_unref(dataPtr_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// create a wrapper for the data pointer without increasing the reference count
|
||||
static Thumbnailer wrapPtr(FmThumbnailer* dataPtr) {
|
||||
Thumbnailer obj;
|
||||
obj.dataPtr_ = reinterpret_cast<FmThumbnailer*>(dataPtr);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// disown the managed data pointer
|
||||
FmThumbnailer* takeDataPtr() {
|
||||
FmThumbnailer* data = reinterpret_cast<FmThumbnailer*>(dataPtr_);
|
||||
dataPtr_ = nullptr;
|
||||
return data;
|
||||
}
|
||||
|
||||
// get the raw pointer wrapped
|
||||
FmThumbnailer* dataPtr() {
|
||||
return reinterpret_cast<FmThumbnailer*>(dataPtr_);
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator FmThumbnailer*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
// automatic type casting
|
||||
operator void*() {
|
||||
return dataPtr();
|
||||
}
|
||||
|
||||
|
||||
// copy assignment
|
||||
Thumbnailer& operator=(const Thumbnailer& other) {
|
||||
if(dataPtr_ != nullptr) {
|
||||
fm_thumbnailer_unref(dataPtr_);
|
||||
}
|
||||
dataPtr_ = other.dataPtr_ != nullptr ? reinterpret_cast<FmThumbnailer*>(fm_thumbnailer_ref(other.dataPtr_)) : nullptr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// move assignment
|
||||
Thumbnailer& operator=(Thumbnailer&& other) {
|
||||
dataPtr_ = reinterpret_cast<FmThumbnailer*>(other.takeDataPtr());
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool isNull() {
|
||||
return (dataPtr_ == nullptr);
|
||||
}
|
||||
|
||||
// methods
|
||||
|
||||
static void checkUpdate( ) {
|
||||
fm_thumbnailer_check_update();
|
||||
}
|
||||
|
||||
|
||||
void free(void) {
|
||||
fm_thumbnailer_free(dataPtr());
|
||||
}
|
||||
|
||||
|
||||
bool launchForUri(const char* uri, const char* output_file, guint size) {
|
||||
return fm_thumbnailer_launch_for_uri(dataPtr(), uri, output_file, size);
|
||||
}
|
||||
|
||||
|
||||
GPid launchForUriAsync(const char* uri, const char* output_file, guint size, GError** error) {
|
||||
return fm_thumbnailer_launch_for_uri_async(dataPtr(), uri, output_file, size, error);
|
||||
}
|
||||
|
||||
|
||||
char* commandForUri(const char* uri, const char* output_file, guint size) {
|
||||
return fm_thumbnailer_command_for_uri(dataPtr(), uri, output_file, size);
|
||||
}
|
||||
|
||||
|
||||
static Thumbnailer newFromKeyfile(const char* id, GKeyFile* kf) {
|
||||
return Thumbnailer::wrapPtr(fm_thumbnailer_new_from_keyfile(id, kf));
|
||||
}
|
||||
|
||||
|
||||
|
||||
private:
|
||||
FmThumbnailer* dataPtr_; // data pointer for the underlying C struct
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // __LIBFM_QT_FM_THUMBNAILER_H__
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue