From b6e3db4ce3a777841c1da68fb110682f99eac23d Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Sat, 14 Aug 2021 19:05:46 +0000 Subject: renamed udisks2 plugin to udisks git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@10199 90c681e8-e032-0410-971d-27865f9a5e38 --- CMakeLists.txt | 2 +- README | 8 +- README.RUS | 8 +- README.UKR | 12 +- qmmp.pri | 2 +- src/plugins/General/CMakeLists.txt | 2 +- src/plugins/General/General.pro | 4 +- src/plugins/General/udisks/CMakeLists.txt | 36 +++ src/plugins/General/udisks/settingsdialog.cpp | 55 +++++ src/plugins/General/udisks/settingsdialog.h | 45 ++++ src/plugins/General/udisks/settingsdialog.ui | 122 ++++++++++ .../General/udisks/translations/translations.qrc | 33 +++ .../udisks/translations/udisks_plugin_bg.ts | 83 +++++++ .../udisks/translations/udisks_plugin_cs.ts | 83 +++++++ .../udisks/translations/udisks_plugin_de.ts | 83 +++++++ .../udisks/translations/udisks_plugin_el.ts | 83 +++++++ .../udisks/translations/udisks_plugin_en.ts | 83 +++++++ .../udisks/translations/udisks_plugin_es.ts | 83 +++++++ .../udisks/translations/udisks_plugin_fi.ts | 83 +++++++ .../udisks/translations/udisks_plugin_fr.ts | 83 +++++++ .../udisks/translations/udisks_plugin_gl_ES.ts | 83 +++++++ .../udisks/translations/udisks_plugin_he.ts | 83 +++++++ .../udisks/translations/udisks_plugin_hu.ts | 83 +++++++ .../udisks/translations/udisks_plugin_id.ts | 83 +++++++ .../udisks/translations/udisks_plugin_it.ts | 83 +++++++ .../udisks/translations/udisks_plugin_ja.ts | 83 +++++++ .../udisks/translations/udisks_plugin_kk.ts | 83 +++++++ .../udisks/translations/udisks_plugin_ko.ts | 83 +++++++ .../udisks/translations/udisks_plugin_lt.ts | 83 +++++++ .../udisks/translations/udisks_plugin_nl.ts | 83 +++++++ .../udisks/translations/udisks_plugin_pl_PL.ts | 83 +++++++ .../udisks/translations/udisks_plugin_pt.ts | 83 +++++++ .../udisks/translations/udisks_plugin_pt_BR.ts | 83 +++++++ .../udisks/translations/udisks_plugin_ru.ts | 83 +++++++ .../udisks/translations/udisks_plugin_sk.ts | 83 +++++++ .../udisks/translations/udisks_plugin_sr_BA.ts | 83 +++++++ .../udisks/translations/udisks_plugin_sr_RS.ts | 83 +++++++ .../udisks/translations/udisks_plugin_tr.ts | 83 +++++++ .../udisks/translations/udisks_plugin_uk_UA.ts | 83 +++++++ .../udisks/translations/udisks_plugin_zh_CN.ts | 83 +++++++ .../udisks/translations/udisks_plugin_zh_TW.ts | 83 +++++++ src/plugins/General/udisks/udisks.pro | 26 +++ src/plugins/General/udisks/udisksdevice.cpp | 118 ++++++++++ src/plugins/General/udisks/udisksdevice.h | 91 ++++++++ src/plugins/General/udisks/udisksfactory.cpp | 59 +++++ src/plugins/General/udisks/udisksfactory.h | 44 ++++ src/plugins/General/udisks/udisksmanager.cpp | 91 ++++++++ src/plugins/General/udisks/udisksmanager.h | 59 +++++ src/plugins/General/udisks/udisksplugin.cpp | 253 +++++++++++++++++++++ src/plugins/General/udisks/udisksplugin.h | 65 ++++++ src/plugins/General/udisks2/CMakeLists.txt | 36 --- src/plugins/General/udisks2/settingsdialog.cpp | 55 ----- src/plugins/General/udisks2/settingsdialog.h | 45 ---- src/plugins/General/udisks2/settingsdialog.ui | 122 ---------- .../General/udisks2/translations/translations.qrc | 33 --- .../udisks2/translations/udisks2_plugin_bg.ts | 83 ------- .../udisks2/translations/udisks2_plugin_cs.ts | 83 ------- .../udisks2/translations/udisks2_plugin_de.ts | 83 ------- .../udisks2/translations/udisks2_plugin_el.ts | 83 ------- .../udisks2/translations/udisks2_plugin_en.ts | 83 ------- .../udisks2/translations/udisks2_plugin_es.ts | 83 ------- .../udisks2/translations/udisks2_plugin_fi.ts | 83 ------- .../udisks2/translations/udisks2_plugin_fr.ts | 83 ------- .../udisks2/translations/udisks2_plugin_gl_ES.ts | 83 ------- .../udisks2/translations/udisks2_plugin_he.ts | 83 ------- .../udisks2/translations/udisks2_plugin_hu.ts | 83 ------- .../udisks2/translations/udisks2_plugin_id.ts | 83 ------- .../udisks2/translations/udisks2_plugin_it.ts | 83 ------- .../udisks2/translations/udisks2_plugin_ja.ts | 83 ------- .../udisks2/translations/udisks2_plugin_kk.ts | 83 ------- .../udisks2/translations/udisks2_plugin_ko.ts | 83 ------- .../udisks2/translations/udisks2_plugin_lt.ts | 83 ------- .../udisks2/translations/udisks2_plugin_nl.ts | 83 ------- .../udisks2/translations/udisks2_plugin_pl_PL.ts | 83 ------- .../udisks2/translations/udisks2_plugin_pt.ts | 83 ------- .../udisks2/translations/udisks2_plugin_pt_BR.ts | 83 ------- .../udisks2/translations/udisks2_plugin_ru.ts | 83 ------- .../udisks2/translations/udisks2_plugin_sk.ts | 83 ------- .../udisks2/translations/udisks2_plugin_sr_BA.ts | 83 ------- .../udisks2/translations/udisks2_plugin_sr_RS.ts | 83 ------- .../udisks2/translations/udisks2_plugin_tr.ts | 83 ------- .../udisks2/translations/udisks2_plugin_uk_UA.ts | 83 ------- .../udisks2/translations/udisks2_plugin_zh_CN.ts | 83 ------- .../udisks2/translations/udisks2_plugin_zh_TW.ts | 83 ------- src/plugins/General/udisks2/udisks2.pro | 26 --- src/plugins/General/udisks2/udisks2device.cpp | 118 ---------- src/plugins/General/udisks2/udisks2device.h | 91 -------- src/plugins/General/udisks2/udisks2factory.cpp | 59 ----- src/plugins/General/udisks2/udisks2factory.h | 44 ---- src/plugins/General/udisks2/udisks2manager.cpp | 91 -------- src/plugins/General/udisks2/udisks2manager.h | 59 ----- src/plugins/General/udisks2/udisks2plugin.cpp | 253 --------------------- src/plugins/General/udisks2/udisks2plugin.h | 65 ------ 93 files changed, 3523 insertions(+), 3523 deletions(-) create mode 100644 src/plugins/General/udisks/CMakeLists.txt create mode 100644 src/plugins/General/udisks/settingsdialog.cpp create mode 100644 src/plugins/General/udisks/settingsdialog.h create mode 100644 src/plugins/General/udisks/settingsdialog.ui create mode 100644 src/plugins/General/udisks/translations/translations.qrc create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_bg.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_cs.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_de.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_el.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_en.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_es.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_fi.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_fr.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_gl_ES.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_he.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_hu.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_id.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_it.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_ja.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_kk.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_ko.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_lt.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_nl.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_pl_PL.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_pt.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_pt_BR.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_ru.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_sk.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_sr_BA.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_sr_RS.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_tr.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_uk_UA.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_zh_CN.ts create mode 100644 src/plugins/General/udisks/translations/udisks_plugin_zh_TW.ts create mode 100644 src/plugins/General/udisks/udisks.pro create mode 100644 src/plugins/General/udisks/udisksdevice.cpp create mode 100644 src/plugins/General/udisks/udisksdevice.h create mode 100644 src/plugins/General/udisks/udisksfactory.cpp create mode 100644 src/plugins/General/udisks/udisksfactory.h create mode 100644 src/plugins/General/udisks/udisksmanager.cpp create mode 100644 src/plugins/General/udisks/udisksmanager.h create mode 100644 src/plugins/General/udisks/udisksplugin.cpp create mode 100644 src/plugins/General/udisks/udisksplugin.h delete mode 100644 src/plugins/General/udisks2/CMakeLists.txt delete mode 100644 src/plugins/General/udisks2/settingsdialog.cpp delete mode 100644 src/plugins/General/udisks2/settingsdialog.h delete mode 100644 src/plugins/General/udisks2/settingsdialog.ui delete mode 100644 src/plugins/General/udisks2/translations/translations.qrc delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_bg.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_cs.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_de.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_el.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_en.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_es.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_fi.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_fr.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_gl_ES.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_he.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_hu.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_id.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_it.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_ja.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_kk.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_ko.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_lt.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_nl.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_pl_PL.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_pt.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_pt_BR.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_ru.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_sk.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_sr_BA.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_sr_RS.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_tr.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_uk_UA.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_zh_CN.ts delete mode 100644 src/plugins/General/udisks2/translations/udisks2_plugin_zh_TW.ts delete mode 100644 src/plugins/General/udisks2/udisks2.pro delete mode 100644 src/plugins/General/udisks2/udisks2device.cpp delete mode 100644 src/plugins/General/udisks2/udisks2device.h delete mode 100644 src/plugins/General/udisks2/udisks2factory.cpp delete mode 100644 src/plugins/General/udisks2/udisks2factory.h delete mode 100644 src/plugins/General/udisks2/udisks2manager.cpp delete mode 100644 src/plugins/General/udisks2/udisks2manager.h delete mode 100644 src/plugins/General/udisks2/udisks2plugin.cpp delete mode 100644 src/plugins/General/udisks2/udisks2plugin.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cbcd8ba6..fe0b4cb8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,7 +219,7 @@ PRINT_SUMMARY ("Tray support .........................." USE_STATICON 1) PRINT_SUMMARY ("Notifier support ......................" USE_NOTIFIER 1) PRINT_SUMMARY ("Lyrics support ........................" USE_LYRICS 1) PRINT_SUMMARY ("HAL support ..........................." USE_HAL Qt5DBus_FOUND) -PRINT_SUMMARY ("UDisks2 support ......................." USE_UDISKS2 Qt5DBus_FOUND) +PRINT_SUMMARY ("UDisks support ........................" USE_UDISKS Qt5DBus_FOUND) PRINT_SUMMARY ("Global hotkey support ................." USE_HOTKEY X11_FOUND AND XCB_H_FOUND AND Qt5X11Extras_FOUND) PRINT_SUMMARY ("GNOME/Cinnamon hotkey support ........." USE_GNOMEHOTKEY Qt5DBus_FOUND) PRINT_SUMMARY ("File operations ......................." USE_FILEOPS 1) diff --git a/README b/README index 45e0248b8..8b615214d 100644 --- a/README +++ b/README @@ -143,7 +143,7 @@ Available options: - USE_SOXR, USE_BS2B, USE_LADSPA, USE_CROSSFADE, USE_STEREO, USE_FILEWRITER, USE_MONOTOSTEREO (effects); - USE_ANALYZER, USE_PROJECTM (visualization); - USE_MPRIS, USE_SCROBBLER, USE_LISTENBRAINZ, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_FILEOPS, - USE_COVER, USE_KDENOTIFY, USE_UDISKS2, USE_CONVERTER, USE_SB, USE_RGSCAN, USE_TRACKCHANGE, USE_COPYPASTE, + USE_COVER, USE_KDENOTIFY, USE_UDISKS, USE_CONVERTER, USE_SB, USE_RGSCAN, USE_TRACKCHANGE, USE_COPYPASTE, USE_GNOMEHOTKEY, USE_LIBRARY (general plugins); - USE_QMMP_DIALOG, USE_TWO_PANEL_DIALOG (file dialogs); - USE_ENCA (automatic charset detection); @@ -165,9 +165,9 @@ OSS3 support. OSS3 plugin is deprecated and disabled by default. To enable it, run 'cmake ./ -DUSE_OSS:BOOL=TRUE' before compilation. -UDisks2 support and FreeBSD. -Under FreeBSD you are able to use UDisks2 plugin. Also, you should install port sysutils/bsdisks. -Bsdisks is an implementation of UDisks2 service for FreeBSD. +UDisks support and FreeBSD. +Under FreeBSD you are able to use UDisks plugin. Also, you should install port sysutils/bsdisks. +Bsdisks is an implementation of UDisks service for FreeBSD. In some cases, you can use qmake for building and installation. diff --git a/README.RUS b/README.RUS index 0be1b13d7..91988f5c5 100644 --- a/README.RUS +++ b/README.RUS @@ -141,7 +141,7 @@ cmake ./ -DUSE_JACK:BOOL=FALSE - USE_SOXR, USE_BS2B, USE_LADSPA, USE_CROSSFADE, USE_STEREO, USE_FILEWRITER, USE_MONOTOSTEREO (эффекты); - USE_ANALYZER, USE_PROJECTM (визуализация); - USE_MPRIS, USE_SCROBBLER, USE_LISTENBRAINZ, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_FILEOPS, - USE_COVER, USE_KDENOTIFY, USE_UDISKS2, USE_CONVERTER, USE_RGSCAN, USE_SB, USE_TRACKCHANGE, USE_COPYPASTE, + USE_COVER, USE_KDENOTIFY, USE_UDISKS, USE_CONVERTER, USE_RGSCAN, USE_SB, USE_TRACKCHANGE, USE_COPYPASTE, USE_GNOMEHOTKEY, USE_LIBRARY (модули общего назначения); - USE_QMMP_DIALOG, USE_TWO_PANEL_DIALOG (файловые диалоги); - USE_ENCA (автоматическое определение кодировки); @@ -163,9 +163,9 @@ https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html Модуль OSS3 устарел и отключён по умолчанию. Для его включения выполните 'cmake ./ -DUSE_OSS:BOOL=TRUE' перед сборкой. -Поддержка UDisks2 и FreeBSD. -Под FreeBSD есть возможность использовать модуль Udisks2. Для этого вы также должны установить порт -sysutils/bsdisks. Bsdisks является реализацией сервиса UDisks2 для FreeBSD. +Поддержка UDisks и FreeBSD. +Под FreeBSD есть возможность использовать модуль Udisks. Для этого вы также должны установить порт +sysutils/bsdisks. Bsdisks является реализацией сервиса UDisks для FreeBSD. В некоторых случаях вы можете использовать qmake для сборки и установки. diff --git a/README.UKR b/README.UKR index 36e021b79..004f232d6 100644 --- a/README.UKR +++ b/README.UKR @@ -126,7 +126,7 @@ cmake ./ -DUSE_JACK:BOOL=FALSE - USE_SOXR, USE_BS2B, USE_LADSPA, USE_CROSSFADE, USE_STEREO, USE_FILEWRITER, USE_MONOTOSTEREO (ефекти); - USE_ANALYZER, USE_PROJECTM (візуалізація); - USE_MPRIS, USE_SCROBBLER, USE_LISTENBRAINZ, USE_STATICON, USE_NOTIFIER, USE_LYRICS, USE_HAL, USE_HOTKEY, USE_FILEOPS, - USE_COVER, USE_KDENOTIFY, USE_UDISKS2, USE_CONVERTER, USE_RGSCAN, USE_TRACKCHANGE, USE_COPYPASTE, + USE_COVER, USE_KDENOTIFY, USE_UDISKS, USE_CONVERTER, USE_RGSCAN, USE_TRACKCHANGE, USE_COPYPASTE, USE_GNOMEHOTKEY, USE_LIBRARY (модулі загального призначення); - USE_QMMP_DIALOG (файловий діалог); - USE_ENCA (автоматичне визначення кодування); @@ -140,14 +140,14 @@ cmake ./ -DUSE_JACK:BOOL=FALSE cmake ./ -DCMAKE_INSTALL_PREFIX=інший_шлях Підтримка OSS3 та Udisks. -Модулі OSS3 та UDisks2 застаріли і вимкнені за замовчанням. -Для їх увімкнення виконайте 'cmake ./ -DUSE_OSS:BOOL=TRUE' чи 'cmake ./ -DUSE_OSS:UDISKS2=TRUE' перед компіляцією. +Модулі OSS3 та UDisks застаріли і вимкнені за замовчанням. +Для їх увімкнення виконайте 'cmake ./ -DUSE_OSS:BOOL=TRUE' чи 'cmake ./ -DUSE_OSS:UDISKS=TRUE' перед компіляцією. -Підтримка HAL та UDisks2. +Підтримка HAL та UDisks. Більшість дистрибутивів Linux більше не підтримують HAL. Для відключення модуля HAL виконайте перед компіляцією наступну команду: cmake ./ -DUSE_HAL:BOOL=FALSE -Проект UDisks не підтримує FreeBSD, тому під FreeBSD рекомендується вимикати модуль Udisks2 з компіляції наступною командою: -cmake ./ -DUSE_UDISKS2:BOOL=FALSE +Проект UDisks не підтримує FreeBSD, тому під FreeBSD рекомендується вимикати модуль Udisks з компіляції наступною командою: +cmake ./ -DUSE_UDISKS:BOOL=FALSE У деяких випадках ви можете використовувати qmake для компіляції та встановлення. diff --git a/qmmp.pri b/qmmp.pri index e3aa3ff92..dc4f86295 100644 --- a/qmmp.pri +++ b/qmmp.pri @@ -84,7 +84,7 @@ CONFIG += SOXR_PLUGIN CONFIG += LADSPA_PLUGIN CONFIG += FILEWRITER_PLUGIN CONFIG += PROJECTM_PLUGIN -CONFIG += UDISKS2_PLUGIN +CONFIG += UDISKS_PLUGIN CONFIG += HAL_PLUGIN CONFIG += SID_PLUGIN CONFIG += QTMULTIMEDIA_PLUGIN diff --git a/src/plugins/General/CMakeLists.txt b/src/plugins/General/CMakeLists.txt index 69c034ff2..d9d815639 100644 --- a/src/plugins/General/CMakeLists.txt +++ b/src/plugins/General/CMakeLists.txt @@ -5,7 +5,7 @@ SET(USE_STATICON TRUE CACHE BOOL "enable/disable status icon plugin") SET(USE_NOTIFIER TRUE CACHE BOOL "enable/disable notifier plugin") SET(USE_LYRICS TRUE CACHE BOOL "enable/disable lyrics version") SET(USE_HAL (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") CACHE BOOL "enable/disable hal plugin") -SET(USE_UDISKS2 TRUE CACHE BOOL "enable/disable udisks2 plugin") +SET(USE_UDISKS TRUE CACHE BOOL "enable/disable udisks plugin") SET(USE_HOTKEY TRUE CACHE BOOL "enable/disable global hotkey plugin") SET(USE_GNOMEHOTKEY TRUE CACHE BOOL "enable/disable gnome hotkey plugin") SET(USE_FILEOPS TRUE CACHE BOOL "enable/disable fileops plugin") diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro index 7286b1426..010e02525 100644 --- a/src/plugins/General/General.pro +++ b/src/plugins/General/General.pro @@ -19,8 +19,8 @@ unix:SUBDIRS += mpris \ converter \ gnomehotkey -contains(CONFIG, UDISKS2_PLUGIN){ - unix:SUBDIRS += udisks2 +contains(CONFIG, UDISKS_PLUGIN){ + unix:SUBDIRS += udisks } contains(CONFIG, HAL_PLUGIN){ diff --git a/src/plugins/General/udisks/CMakeLists.txt b/src/plugins/General/udisks/CMakeLists.txt new file mode 100644 index 000000000..95209cca3 --- /dev/null +++ b/src/plugins/General/udisks/CMakeLists.txt @@ -0,0 +1,36 @@ +project(libudisks) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +# libqmmpui & libqmmp +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) + +SET(libudisks_SRCS + udisksfactory.cpp + udisksmanager.cpp + udisksplugin.cpp + udisksdevice.cpp + settingsdialog.cpp +) + +SET(libudisks_RCCS translations/translations.qrc) + +QT5_ADD_RESOURCES(libudisks_RCC_SRCS ${libudisks_RCCS}) + +# user interface + +SET(libudisks_UIS + settingsdialog.ui +) + +QT5_WRAP_UI(libudisks_UIS_H ${libudisks_UIS}) +# Don't forget to include output directory, otherwise +# the UI file won't be wrapped! +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +ADD_LIBRARY(udisks MODULE ${libudisks_SRCS} ${libudisks_UIS_H} ${libudisks_RCC_SRCS}) +add_dependencies(udisks libqmmpui) +target_link_libraries(udisks Qt5::Widgets Qt5::DBus libqmmpui libqmmp) +install(TARGETS udisks DESTINATION ${PLUGIN_DIR}/General) diff --git a/src/plugins/General/udisks/settingsdialog.cpp b/src/plugins/General/udisks/settingsdialog.cpp new file mode 100644 index 000000000..b051cec0b --- /dev/null +++ b/src/plugins/General/udisks/settingsdialog.cpp @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include +#include +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + m_ui.setupUi(this); + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.beginGroup("UDisks"); + m_ui.cdGroupBox->setChecked(settings.value("cda", true).toBool()); + m_ui.addTracksCheckBox->setChecked(settings.value("add_tracks", false).toBool()); + m_ui.removeTracksCheckBox->setChecked(settings.value("remove_tracks", false).toBool()); + m_ui.removableGroupBox->setChecked(settings.value("removable", true).toBool()); + m_ui.addFilesCheckBox->setChecked(settings.value("add_files", false).toBool()); + m_ui.removeFilesCheckBox->setChecked(settings.value("remove_files", false).toBool()); + settings.endGroup(); +} + + +SettingsDialog::~SettingsDialog() +{} + +void SettingsDialog::accept() +{ + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.beginGroup("UDisks"); + settings.setValue("cda", m_ui.cdGroupBox->isChecked()); + settings.setValue("add_tracks", m_ui.addTracksCheckBox->isChecked()); + settings.setValue("remove_tracks", m_ui.removeTracksCheckBox->isChecked()); + settings.setValue("removable", m_ui.removableGroupBox->isChecked()); + settings.setValue("add_files", m_ui.addFilesCheckBox->isChecked()); + settings.setValue("remove_files", m_ui.removeFilesCheckBox->isChecked()); + settings.endGroup(); + QDialog::accept(); +} diff --git a/src/plugins/General/udisks/settingsdialog.h b/src/plugins/General/udisks/settingsdialog.h new file mode 100644 index 000000000..10fb8814f --- /dev/null +++ b/src/plugins/General/udisks/settingsdialog.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = nullptr); + + ~SettingsDialog(); + + +public slots: + virtual void accept() override; + +private: + Ui::SettingsDialog m_ui; +}; + +#endif diff --git a/src/plugins/General/udisks/settingsdialog.ui b/src/plugins/General/udisks/settingsdialog.ui new file mode 100644 index 000000000..5b039a88c --- /dev/null +++ b/src/plugins/General/udisks/settingsdialog.ui @@ -0,0 +1,122 @@ + + + SettingsDialog + + + + 0 + 0 + 348 + 247 + + + + UDisks Plugin Settings + + + + 6 + + + 6 + + + 6 + + + + + CD Audio Detection + + + true + + + + + + Add tracks to playlist automatically + + + + + + + Remove tracks from playlist automatically + + + + + + + + + + Removable Device Detection + + + true + + + + + + Add files to playlist automatically + + + + + + + Remove files from playlist automatically + + + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + SettingsDialog + accept() + + + 199 + 221 + + + 22 + 242 + + + + + buttonBox + rejected() + SettingsDialog + reject() + + + 247 + 225 + + + 273 + 229 + + + + + diff --git a/src/plugins/General/udisks/translations/translations.qrc b/src/plugins/General/udisks/translations/translations.qrc new file mode 100644 index 000000000..8c398ef67 --- /dev/null +++ b/src/plugins/General/udisks/translations/translations.qrc @@ -0,0 +1,33 @@ + + + + udisks_plugin_ru.qm + udisks_plugin_uk_UA.qm + udisks_plugin_zh_CN.qm + udisks_plugin_zh_TW.qm + udisks_plugin_tr.qm + udisks_plugin_cs.qm + udisks_plugin_pt_BR.qm + udisks_plugin_pt.qm + udisks_plugin_de.qm + udisks_plugin_pl_PL.qm + udisks_plugin_fr.qm + udisks_plugin_it.qm + udisks_plugin_kk.qm + udisks_plugin_ko.qm + udisks_plugin_lt.qm + udisks_plugin_hu.qm + udisks_plugin_nl.qm + udisks_plugin_ja.qm + udisks_plugin_sk.qm + udisks_plugin_es.qm + udisks_plugin_he.qm + udisks_plugin_gl_ES.qm + udisks_plugin_sr_BA.qm + udisks_plugin_sr_RS.qm + udisks_plugin_bg.qm + udisks_plugin_el.qm + udisks_plugin_id.qm + udisks_plugin_fi.qm + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_bg.ts b/src/plugins/General/udisks/translations/udisks_plugin_bg.ts new file mode 100644 index 000000000..f6c63b44a --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_bg.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + + + + + Remove tracks from playlist automatically + + + + + Removable Device Detection + + + + + Add files to playlist automatically + + + + + Remove files from playlist automatically + + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_cs.ts b/src/plugins/General/udisks/translations/udisks_plugin_cs.ts new file mode 100644 index 000000000..655ea9c84 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_cs.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Nastavení modulu UDisks + + + + CD Audio Detection + Detekce zvukových CD + + + + Add tracks to playlist automatically + Automaticky přidat stopy do seznamu skladeb + + + + Remove tracks from playlist automatically + Automaticky odebrat stopy ze seznamu skladeb + + + + Removable Device Detection + Detekce odpojitelných zařízení + + + + Add files to playlist automatically + Automaticky přidat soubory do seznamu skladeb + + + + Remove files from playlist automatically + Automaticky odebrat stopy ze seznamu skladeb + + + + UDisks2Factory + + + UDisks2 Plugin + Modul UDisks2 + + + + About UDisks2 Plugin + O modulu UDisks2 + + + + Qmmp UDisks2 Plugin + Modul Qmmp UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Tento modul poskytuje detekci výměnných médií pomocí UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + Přidat CD „%1“ + + + + Add Volume "%1" + Přidat svazek „%1“ + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_de.ts b/src/plugins/General/udisks/translations/udisks_plugin_de.ts new file mode 100644 index 000000000..42dd34174 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_de.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Einstellungen UDisks-Modul + + + + CD Audio Detection + CD-Audio-Erkennung + + + + Add tracks to playlist automatically + Titel automatisch zur Wiedergabeliste hinzufügen + + + + Remove tracks from playlist automatically + Titel automatisch von der Wiedergabeliste entfernen + + + + Removable Device Detection + Wechsellaufwerkerkennung + + + + Add files to playlist automatically + Dateien automatisch zur Wiedergabeliste hinzufügen + + + + Remove files from playlist automatically + Dateien automatisch von der Wiedergabeliste entfernen + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2-Modul + + + + About UDisks2 Plugin + Über UDisks2-Modul + + + + Qmmp UDisks2 Plugin + Qmmp UDisks2-Modul + + + + This plugin provides removable devices detection using UDisks2 + Dieses Modul bietet Wechsellaufwerkerkennung unter Verwendung von UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Geschrieben von: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + CD „%1“ hinzufügen + + + + Add Volume "%1" + Datenträger „%1“ hinzufügen + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_el.ts b/src/plugins/General/udisks/translations/udisks_plugin_el.ts new file mode 100644 index 000000000..eb41b22fb --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_el.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Ρυθμίσεις πρόσθετου UDisks + + + + CD Audio Detection + Ανίχνευση CD ήχου + + + + Add tracks to playlist automatically + Προσθήκη των κομματιών αυτόματα στη λίστα αναπαραγωγής + + + + Remove tracks from playlist automatically + Αφαίρεση των κομματιών αυτόματα από τη λίστα αναπαραγωγής + + + + Removable Device Detection + Ανίχνευση αφαιρούμενης συσκευής + + + + Add files to playlist automatically + Προσθήκη αρχείων αυτόματα στη λίστα αναπαραγωγής + + + + Remove files from playlist automatically + Αφαίρεση των αρχείων από τη λίστα αναπαραγωγής αυτόματα + + + + UDisks2Factory + + + UDisks2 Plugin + Πρόσθετο UDisks2 + + + + About UDisks2 Plugin + Σχετικά με το πρόσθετο UDisks2 + + + + Qmmp UDisks2 Plugin + Qmmp πρόσθετο UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Αυτό το πρόσθετο παρέχει την ανίχνευση αφαιρούμενων συσκευών μέσω UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Γράφτηκε από τον: Ilya Kotov <forkotov02@hotmail.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Προσθήκη CD «%1» + + + + Add Volume "%1" + Προσθήκη Έντασης «%1» + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_en.ts b/src/plugins/General/udisks/translations/udisks_plugin_en.ts new file mode 100644 index 000000000..5e44b7b87 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_en.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + + + + + Remove tracks from playlist automatically + + + + + Removable Device Detection + + + + + Add files to playlist automatically + + + + + Remove files from playlist automatically + + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_es.ts b/src/plugins/General/udisks/translations/udisks_plugin_es.ts new file mode 100644 index 000000000..907d8805d --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_es.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Configuración del módulo UDisks + + + + CD Audio Detection + Detección de audio CD + + + + Add tracks to playlist automatically + Añadir pistas a la lista de reproducción automáticamente + + + + Remove tracks from playlist automatically + Eliminar pistas de la lista de reproducción automáticamente + + + + Removable Device Detection + Detectar dispositivos extraibles + + + + Add files to playlist automatically + Añadir archivos a la lista de reproducción automáticamente + + + + Remove files from playlist automatically + Eliminar archivos de la lista de reproducción automáticamente + + + + UDisks2Factory + + + UDisks2 Plugin + Módulo UDisks2 + + + + About UDisks2 Plugin + Acerca del Módulo UDisks2 + + + + Qmmp UDisks2 Plugin + Módulo UDisks2 de Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Este módulo proporciona detección de dispositivos extraíbles mediante UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Escrito por: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Añadir CD "%1" + + + + Add Volume "%1" + Añadir volumen "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_fi.ts b/src/plugins/General/udisks/translations/udisks_plugin_fi.ts new file mode 100644 index 000000000..cf41107dd --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_fi.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + UDisks-liitännäisen asetukset + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + Lisää kappaleet soittolistaan automaattisesti + + + + Remove tracks from playlist automatically + Poista kappaleet soittolistalta automaattisesti + + + + Removable Device Detection + Irrotettavan laitteen havaitseminen + + + + Add files to playlist automatically + Lisää tiedostot soittolistaan automaattisesti + + + + Remove files from playlist automatically + Poista tiedostot soittolistasta automaattisesti + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2-liitännäinen + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + Qmmp:n UDisks2-liitännäinen + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Toteuttanut: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Lisää CD "%1" + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_fr.ts b/src/plugins/General/udisks/translations/udisks_plugin_fr.ts new file mode 100644 index 000000000..5efce0a69 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_fr.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Configuration du greffon UDisks + + + + CD Audio Detection + Détection de CD audio + + + + Add tracks to playlist automatically + Ajouter automatiquement les pistes à la liste + + + + Remove tracks from playlist automatically + Enlever automatiquement les pistes de la liste + + + + Removable Device Detection + Détection de périphérique amovible + + + + Add files to playlist automatically + Ajouter automatiquement les fichiers à la liste + + + + Remove files from playlist automatically + Enlever automatiquement les fichiers à la liste + + + + UDisks2Factory + + + UDisks2 Plugin + Greffon UDisks2 + + + + About UDisks2 Plugin + À propos du greffon UDisks2 + + + + Qmmp UDisks2 Plugin + Greffon UDisks2 pour Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Ce greffon fournit une détection de périphériques amovibles en utilisant UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Écrit par : Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Ajouter CD « %1 » + + + + Add Volume "%1" + Ajouter volume « %1 » + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_gl_ES.ts b/src/plugins/General/udisks/translations/udisks_plugin_gl_ES.ts new file mode 100644 index 000000000..f95311746 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_gl_ES.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Preferencias do engadido UDisks + + + + CD Audio Detection + Detección de CD de audio + + + + Add tracks to playlist automatically + Engadir pistas á lista de reprodución automaticamente + + + + Remove tracks from playlist automatically + Eliminar pistas da lista de reprodución automaticamente + + + + Removable Device Detection + Detección de dispositivos extraíbles + + + + Add files to playlist automatically + Engadir ficheiros á lista de reprodución automaticamente + + + + Remove files from playlist automatically + Eliminar ficheiros da lista de reprodución automaticamente + + + + UDisks2Factory + + + UDisks2 Plugin + Engadido UDisks2 + + + + About UDisks2 Plugin + Sobre o engadido UDisks2 + + + + Qmmp UDisks2 Plugin + Engadido UDisks2 de Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Este engadido provén detección de dispositivos extraíbles usando UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Escrito por: LLya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Engadir CD "%1" + + + + Add Volume "%1" + Engadir volume "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_he.ts b/src/plugins/General/udisks/translations/udisks_plugin_he.ts new file mode 100644 index 000000000..755a13f49 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_he.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + הגדרות תוסף UDisks + + + + CD Audio Detection + איתור אוטומטי של תקליטור שמע + + + + Add tracks to playlist automatically + הוסף רצועות אוטומטית לתוך רשימת נגינה + + + + Remove tracks from playlist automatically + הסר רצועות אוטומטית מתוך רשימת נגינה + + + + Removable Device Detection + איתור התקנים נשלפים + + + + Add files to playlist automatically + הוסף קבצים אוטומטית לתוך רשימת נגינה + + + + Remove files from playlist automatically + הסר קבצים אוטומטית מתוך רשימת נגינה + + + + UDisks2Factory + + + UDisks2 Plugin + תוסף UDisks2 + + + + About UDisks2 Plugin + אודות תוסף UDisks2 + + + + Qmmp UDisks2 Plugin + תוסף UDisks2 של Qmmp + + + + This plugin provides removable devices detection using UDisks2 + תוסף זה מספק איתור התקנים ברי הזזה באמצעות UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + הוסף תקליטור "%1" + + + + Add Volume "%1" + הוסף כרך "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_hu.ts b/src/plugins/General/udisks/translations/udisks_plugin_hu.ts new file mode 100644 index 000000000..94f6b2dfd --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_hu.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + + + + + Remove tracks from playlist automatically + + + + + Removable Device Detection + + + + + Add files to playlist automatically + + + + + Remove files from playlist automatically + + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_id.ts b/src/plugins/General/udisks/translations/udisks_plugin_id.ts new file mode 100644 index 000000000..ce56e2aa6 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_id.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Setelan Plugin UDisks + + + + CD Audio Detection + Deteksi Audio CD + + + + Add tracks to playlist automatically + Tambah track ke daftarmain secara otomatis + + + + Remove tracks from playlist automatically + Buang track dari daftarmain secara otomatis + + + + Removable Device Detection + Deteksi Perangkat Dapat-dilepas + + + + Add files to playlist automatically + Tambah file ke daftarmain secara otomatis + + + + Remove files from playlist automatically + Buang file dari daftarmain secara otomatis + + + + UDisks2Factory + + + UDisks2 Plugin + Plugin UDisks + + + + About UDisks2 Plugin + Tentang Plugin UDisks + + + + Qmmp UDisks2 Plugin + Plugin UDisks Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Plugin ini menyediakan deteksi perangkat dapat-dilepas menggunakan UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Ditulis oleh: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Tambah CD "%1" + + + + Add Volume "%1" + Tambah Volume "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_it.ts b/src/plugins/General/udisks/translations/udisks_plugin_it.ts new file mode 100644 index 000000000..56b6f4140 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_it.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Impostazioni dell'estensione UDisks + + + + CD Audio Detection + Rilevamento CD Audio + + + + Add tracks to playlist automatically + Aggiungi automaticamente le tracce alla scaletta + + + + Remove tracks from playlist automatically + Rimuovi automaticamente i titoli dalla scaletta + + + + Removable Device Detection + Rilevamento dispositivi rimovibili + + + + Add files to playlist automatically + Aggiungi automaticamente i file alla scaletta + + + + Remove files from playlist automatically + Rimuovi automaticamente i file dalla scaletta + + + + UDisks2Factory + + + UDisks2 Plugin + Estensione UDisks2 + + + + About UDisks2 Plugin + Informazioni sull'estensione UDisks2 + + + + Qmmp UDisks2 Plugin + Estensione UDisks2 per Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Estensione che permette il rilevamento di dispositivi rimovibili utilizzando UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Autori: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Aggiungi CD «%1» + + + + Add Volume "%1" + Aggiungi volume «%1» + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_ja.ts b/src/plugins/General/udisks/translations/udisks_plugin_ja.ts new file mode 100644 index 000000000..6b226722d --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_ja.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + UDisks プラグイン設定 + + + + CD Audio Detection + 音楽 CD 検知 + + + + Add tracks to playlist automatically + プレイリストにトラックを自動追加 + + + + Remove tracks from playlist automatically + プレイリストからトラックを自動除去 + + + + Removable Device Detection + 着脱可能なデバイスの検知 + + + + Add files to playlist automatically + プレイリストにファイルを自動追加 + + + + Remove files from playlist automatically + プレイリストからファイルを自動除去 + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2 プラグイン + + + + About UDisks2 Plugin + UDisks2 プラグインについて + + + + Qmmp UDisks2 Plugin + QMMP UDisks2 プラグイン + + + + This plugin provides removable devices detection using UDisks2 + このプラグインは着脱可能なデバイスの検知を UDisks2 により行ないます + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + 制作: Илья Котов (Ilya Kotov) <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + CD "%1" を追加 + + + + Add Volume "%1" + 量目 "%1" を追加 + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_kk.ts b/src/plugins/General/udisks/translations/udisks_plugin_kk.ts new file mode 100644 index 000000000..336c9269d --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_kk.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + + + + + Remove tracks from playlist automatically + + + + + Removable Device Detection + + + + + Add files to playlist automatically + + + + + Remove files from playlist automatically + + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_ko.ts b/src/plugins/General/udisks/translations/udisks_plugin_ko.ts new file mode 100644 index 000000000..3ffaba282 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_ko.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + UDisks 플러그인 설정 + + + + CD Audio Detection + CD 오디오 감지 + + + + Add tracks to playlist automatically + 자동으로 재생목록에 트랙 추가 + + + + Remove tracks from playlist automatically + 자동으로 재생목록에 트랙 제거 + + + + Removable Device Detection + 이동식 장치 감지 + + + + Add files to playlist automatically + 자동으로 재생목록에 파일 추가 + + + + Remove files from playlist automatically + 자동으로 재생목록에서 파일 제거 + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2 플러그인 + + + + About UDisks2 Plugin + UDisks2 플러그인 정보 + + + + Qmmp UDisks2 Plugin + Qmmp UDisks2 플러그인 + + + + This plugin provides removable devices detection using UDisks2 + 이 플러그인은 UDisks2를 사용하여 이동식 디바이스 감지 기능을 제공합니다 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + 작성자: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + CD "%1" 추가 + + + + Add Volume "%1" + 볼륨 "%1" 추가 + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_lt.ts b/src/plugins/General/udisks/translations/udisks_plugin_lt.ts new file mode 100644 index 000000000..e1b6c1ca8 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_lt.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Udisks įskiepio nustatymai + + + + CD Audio Detection + Audio CD aptikimas + + + + Add tracks to playlist automatically + Įdėti takelius į grojaraštį automatiškai + + + + Remove tracks from playlist automatically + Pašalinti takelius iš grojaraščio automatiškai + + + + Removable Device Detection + Išorinių įrenginių aptikimas + + + + Add files to playlist automatically + Įdėti takelius į grojaratį automatiškai + + + + Remove files from playlist automatically + Pašalinti takelius iš grojaraščio automatiškai + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2 Įskiepis + + + + About UDisks2 Plugin + Apie UDisks2 Įskiepį + + + + Qmmp UDisks2 Plugin + Qmmp UDisks2 Įskiepis + + + + This plugin provides removable devices detection using UDisks2 + Šis įskiepis aptinka prijungiamus įrenginius naudodamas UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Sukūrė: Ilya Kotov + + + + UDisks2Plugin + + + Add CD "%1" + Pridėti CD "%1" + + + + Add Volume "%1" + Pridėti tomą "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_nl.ts b/src/plugins/General/udisks/translations/udisks_plugin_nl.ts new file mode 100644 index 000000000..95fe9937b --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_nl.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Instellingen + + + + CD Audio Detection + CD-audiodetectie + + + + Add tracks to playlist automatically + Nummers automatisch toevoegen aan afspeellijst + + + + Remove tracks from playlist automatically + Nummers automatisch verwijderen van afspeellijst + + + + Removable Device Detection + Detectie van verwisselbare apparaten + + + + Add files to playlist automatically + Bestanden automatisch toevoegen aan afspeellijst + + + + Remove files from playlist automatically + Bestanden automatisch verwijderen van afspeellijst + + + + UDisks2Factory + + + UDisks2 Plugin + UDisks2-plug-in + + + + About UDisks2 Plugin + Over de UDisks2-plug-in + + + + Qmmp UDisks2 Plugin + UDisks2-plug-in voor Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Deze plug-in faciliteert detectie van verwisselbare apparaten via UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Auteur: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + CD "%1" toevoegen + + + + Add Volume "%1" + Apparaat "%1" toevoegen + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_pl_PL.ts b/src/plugins/General/udisks/translations/udisks_plugin_pl_PL.ts new file mode 100644 index 000000000..d37d92e72 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_pl_PL.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Ustawienia wtyczki UDisks + + + + CD Audio Detection + Detekcja płyt CD Audio + + + + Add tracks to playlist automatically + Automatycznie dodaj utwory do listy + + + + Remove tracks from playlist automatically + Automatycznie usuń utwory z listy + + + + Removable Device Detection + Detekcja urządzeń przenośnych + + + + Add files to playlist automatically + Automatycznie dodaj pliki do listy + + + + Remove files from playlist automatically + Automatycznie usuń pliki z listy + + + + UDisks2Factory + + + UDisks2 Plugin + Wtyczka UDisks2 + + + + About UDisks2 Plugin + O wtyczce UDisks2 + + + + Qmmp UDisks2 Plugin + Wtyczka UDisks2 dla Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Ta wtyczka pozwala na wykrywanie urządzeń przy użyciu UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Napisana przez: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Dodaj CD "%1" + + + + Add Volume "%1" + Dodaj głośność "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_pt.ts b/src/plugins/General/udisks/translations/udisks_plugin_pt.ts new file mode 100644 index 000000000..de7b41eb2 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_pt.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Definições + + + + CD Audio Detection + Deteção de CD áudio + + + + Add tracks to playlist automatically + Adicionar faixas à lista de reprodução + + + + Remove tracks from playlist automatically + Remover faixas da lista de reprodução + + + + Removable Device Detection + Deteção de discos amovíveis + + + + Add files to playlist automatically + Adicionar ficheiros à lista de reprodução + + + + Remove files from playlist automatically + Remover ficheiros da lista de reprodução + + + + UDisks2Factory + + + UDisks2 Plugin + Suplemento UDisks2 + + + + About UDisks2 Plugin + Acerca de suplemento UDisks2 + + + + Qmmp UDisks2 Plugin + Suplemento Qmmp UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Este suplemento permite a deteção de discos amovíveis através do serviço UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Desenvolvido por: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Adicionar CD %1 + + + + Add Volume "%1" + Adicionar volume %1 + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_pt_BR.ts b/src/plugins/General/udisks/translations/udisks_plugin_pt_BR.ts new file mode 100644 index 000000000..a62d4d5c5 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_pt_BR.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Preferências do plugin UDisks + + + + CD Audio Detection + Detecção de áudio de CD + + + + Add tracks to playlist automatically + Adicionar faixas à lista de reprodução + + + + Remove tracks from playlist automatically + Remover faixas da lista de reprodução + + + + Removable Device Detection + Detecção de dispositivos removíveis + + + + Add files to playlist automatically + Adicionar arquivos à lista de reprodução + + + + Remove files from playlist automatically + Remover arquivos da lista de reprodução + + + + UDisks2Factory + + + UDisks2 Plugin + Plugin UDisks2 + + + + About UDisks2 Plugin + Sobre o plugin UDisks2 + + + + Qmmp UDisks2 Plugin + Plugin Qmmp UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Este plugin permite a detecção de dispositivos removíveis através do serviço UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + Adicionar CD %1 + + + + Add Volume "%1" + Adicionar volume %1 + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_ru.ts b/src/plugins/General/udisks/translations/udisks_plugin_ru.ts new file mode 100644 index 000000000..c04130e85 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_ru.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Настройки модуля UDisks + + + + CD Audio Detection + Автоопределение аудио-CD + + + + Add tracks to playlist automatically + Автоматически добавлять треки в список + + + + Remove tracks from playlist automatically + Автоматически удалять треки из списка + + + + Removable Device Detection + Автоопределение съёмных устройств + + + + Add files to playlist automatically + Автоматически добавлять треки в список + + + + Remove files from playlist automatically + Автоматически удалять треки из списка + + + + UDisks2Factory + + + UDisks2 Plugin + Модуль UDisks2 + + + + About UDisks2 Plugin + О модуле UDisks2 + + + + Qmmp UDisks2 Plugin + Модуль UDisks2 для Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Это модуль отслеживает съёмные устройства с помощью UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Разработчик: Илья Котов <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Добавить CD "%1" + + + + Add Volume "%1" + Добавить том "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_sk.ts b/src/plugins/General/udisks/translations/udisks_plugin_sk.ts new file mode 100644 index 000000000..a8fcd692b --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_sk.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + + + + + Add tracks to playlist automatically + + + + + Remove tracks from playlist automatically + + + + + Removable Device Detection + + + + + Add files to playlist automatically + + + + + Remove files from playlist automatically + + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + + + + + Add Volume "%1" + + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_sr_BA.ts b/src/plugins/General/udisks/translations/udisks_plugin_sr_BA.ts new file mode 100644 index 000000000..bf430d5e8 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_sr_BA.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Поставке за Удискс2 + + + + CD Audio Detection + Откривање музичког диска + + + + Add tracks to playlist automatically + Аутоматски додај нумере на листу + + + + Remove tracks from playlist automatically + Аутоматски уклони нумере са листе + + + + Removable Device Detection + Откривање уклоњивих уређаја + + + + Add files to playlist automatically + Аутоматски додај фајлове на листу + + + + Remove files from playlist automatically + Аутоматски уклони фајлове са листе + + + + UDisks2Factory + + + UDisks2 Plugin + Удискс2 + + + + About UDisks2 Plugin + О прикључку за UDisks2 + + + + Qmmp UDisks2 Plugin + Кумп прикључак за UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Омогућује откривање уклоњивих уређаја користећи UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Аутор: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Додај диск „%1“ + + + + Add Volume "%1" + Додај складишни простор „%1“ + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_sr_RS.ts b/src/plugins/General/udisks/translations/udisks_plugin_sr_RS.ts new file mode 100644 index 000000000..ff03960bc --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_sr_RS.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Поставке за Удискс2 + + + + CD Audio Detection + Откривање музичког диска + + + + Add tracks to playlist automatically + Аутоматски додај нумере на листу + + + + Remove tracks from playlist automatically + Аутоматски уклони нумере са листе + + + + Removable Device Detection + Откривање уклоњивих уређаја + + + + Add files to playlist automatically + Аутоматски додај фајлове на листу + + + + Remove files from playlist automatically + Аутоматски уклони фајлове са листе + + + + UDisks2Factory + + + UDisks2 Plugin + Удискс2 + + + + About UDisks2 Plugin + О прикључку за UDisks2 + + + + Qmmp UDisks2 Plugin + Кумп прикључак за UDisks2 + + + + This plugin provides removable devices detection using UDisks2 + Омогућује откривање уклоњивих уређаја користећи UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Аутор: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Додај диск „%1“ + + + + Add Volume "%1" + Додај складишни простор „%1“ + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_tr.ts b/src/plugins/General/udisks/translations/udisks_plugin_tr.ts new file mode 100644 index 000000000..2031a0af3 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_tr.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + + + + + CD Audio Detection + CD Ses Algılama + + + + Add tracks to playlist automatically + Parçaları listeye otomatik olarka ekle + + + + Remove tracks from playlist automatically + Parçaları listeden otomatik olarak kaldır + + + + Removable Device Detection + Çıkarılabilir Aygıt Algılama + + + + Add files to playlist automatically + Dosyaları listeye otomatik olarak ekle + + + + Remove files from playlist automatically + Dosyaları listeden otomatik olarak kaldır + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Yazan: Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + CD "%1" Ekle + + + + Add Volume "%1" + "%1" Aygıtını Ekle + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_uk_UA.ts b/src/plugins/General/udisks/translations/udisks_plugin_uk_UA.ts new file mode 100644 index 000000000..d43c066cc --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_uk_UA.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + Налаштування модуля UDisks + + + + CD Audio Detection + Автовизначення аудіо-CD + + + + Add tracks to playlist automatically + Автоматично додавати треки до списку + + + + Remove tracks from playlist automatically + Автоматично видаляти треки зі списку + + + + Removable Device Detection + Виявлення змінних пристроїв + + + + Add files to playlist automatically + Автоматично додавати файли до списку + + + + Remove files from playlist automatically + Автоматично видаляти файли зі списку + + + + UDisks2Factory + + + UDisks2 Plugin + Модуль UDisks2 + + + + About UDisks2 Plugin + Про модуль UDisks2 + + + + Qmmp UDisks2 Plugin + Модуль UDisks2 для Qmmp + + + + This plugin provides removable devices detection using UDisks2 + Цей модуль відстежує з'ємні пристрої за допомогою UDisks2 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + Розробник: Ілля Котов <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + Додати CD "%1" + + + + Add Volume "%1" + Додати том "%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_zh_CN.ts b/src/plugins/General/udisks/translations/udisks_plugin_zh_CN.ts new file mode 100644 index 000000000..c281c0f79 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_zh_CN.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + UDisks 插件设置 + + + + CD Audio Detection + CD 音频检测 + + + + Add tracks to playlist automatically + 自动添加音轨到播放列表 + + + + Remove tracks from playlist automatically + 自动从播放列表删除音轨 + + + + Removable Device Detection + 可移动设备检测 + + + + Add files to playlist automatically + 自动添加文件到播放列表 + + + + Remove files from playlist automatically + 自动从播放列表删除文件 + + + + UDisks2Factory + + + UDisks2 Plugin + UDisk2插件 + + + + About UDisks2 Plugin + 关于UDisk2插件 + + + + Qmmp UDisks2 Plugin + Qmmp播放器UDisk2插件 + + + + This plugin provides removable devices detection using UDisks2 + 本插件使用UDisk2提供对移动设备的探测功能 + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + + + + + UDisks2Plugin + + + Add CD "%1" + 增加CD"%1" + + + + Add Volume "%1" + 增加音量"%1" + + + diff --git a/src/plugins/General/udisks/translations/udisks_plugin_zh_TW.ts b/src/plugins/General/udisks/translations/udisks_plugin_zh_TW.ts new file mode 100644 index 000000000..adc7ed488 --- /dev/null +++ b/src/plugins/General/udisks/translations/udisks_plugin_zh_TW.ts @@ -0,0 +1,83 @@ + + + + + SettingsDialog + + + UDisks Plugin Settings + UDisks 插件設定 + + + + CD Audio Detection + CD 音頻檢測 + + + + Add tracks to playlist automatically + 自動添加音軌到播放清單 + + + + Remove tracks from playlist automatically + 自動從播放清單刪除音軌 + + + + Removable Device Detection + 可移動設備檢測 + + + + Add files to playlist automatically + 自動添加檔案到播放清單 + + + + Remove files from playlist automatically + 自動從播放清單刪除檔案 + + + + UDisks2Factory + + + UDisks2 Plugin + + + + + About UDisks2 Plugin + + + + + Qmmp UDisks2 Plugin + + + + + This plugin provides removable devices detection using UDisks2 + + + + + Written by: Ilya Kotov <forkotov02@ya.ru> + 撰寫:Ilya Kotov <forkotov02@ya.ru> + + + + UDisks2Plugin + + + Add CD "%1" + 添加 CD "%1" + + + + Add Volume "%1" + 添加卷 "%1" + + + diff --git a/src/plugins/General/udisks/udisks.pro b/src/plugins/General/udisks/udisks.pro new file mode 100644 index 000000000..ca99c7a5e --- /dev/null +++ b/src/plugins/General/udisks/udisks.pro @@ -0,0 +1,26 @@ +include(../../plugins.pri) + +TARGET = $$PLUGINS_PREFIX/General/udisks + +QT += dbus + +HEADERS += udisksfactory.h \ + udisksplugin.h \ + udisksmanager.h \ + udisksdevice.h \ + settingsdialog.h + +SOURCES += udisksfactory.cpp \ + udisksplugin.cpp \ + udisksmanager.cpp \ + udisksdevice.cpp \ + settingsdialog.cpp + +FORMS += settingsdialog.ui + +RESOURCES = translations/translations.qrc + +LIBS += $$QMMPUI_LIB + +target.path = $$PLUGIN_DIR/General +INSTALLS += target diff --git a/src/plugins/General/udisks/udisksdevice.cpp b/src/plugins/General/udisks/udisksdevice.cpp new file mode 100644 index 000000000..544d5a8a0 --- /dev/null +++ b/src/plugins/General/udisks/udisksdevice.cpp @@ -0,0 +1,118 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include +#include +#include +#include +#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) //qAsConst template +#include +#endif +#include "udisksdevice.h" + +UDisksDevice::UDisksDevice(QDBusObjectPath o, QObject *parent) : QObject(parent) +{ + m_block_interface = new QDBusInterface("org.freedesktop.UDisks2", o.path(), + "org.freedesktop.UDisks2.Block", QDBusConnection::systemBus(), + this); + + QDBusObjectPath drive_object = property("Drive").value(); + + QDBusConnection::systemBus().connect("org.freedesktop.UDisks2", o.path(), + "org.freedesktop.DBus.Properties","PropertiesChanged", + this, SIGNAL(changed())); + + m_drive_interface = new QDBusInterface("org.freedesktop.UDisks2", drive_object.path(), + "org.freedesktop.UDisks2.Drive", QDBusConnection::systemBus(), + this); + m_path = o; +} + +UDisksDevice::~UDisksDevice() +{ +} + +QVariant UDisksDevice::property(const QString &key) const +{ + return m_block_interface->property(key.toLatin1().data()); +} + +bool UDisksDevice::isRemovable() const +{ + return m_drive_interface->property("Removable").toBool(); +} + +bool UDisksDevice::isMediaRemovable() const +{ + return m_drive_interface->property("MediaRemovable").toBool(); +} + +bool UDisksDevice::isAudio() const +{ + return m_drive_interface->property("OpticalNumAudioTracks").toInt() > 0; +} + +bool UDisksDevice::isMounted() const +{ + return !mountPoints().isEmpty(); +} + +bool UDisksDevice::isOptical() const +{ + return m_drive_interface->property("Optical").toBool(); +} + +QStringList UDisksDevice::mountPoints() const +{ + QStringList points; + QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.UDisks2", m_path.path(), + "org.freedesktop.DBus.Properties", "Get"); + + QList arguments; + arguments << "org.freedesktop.UDisks2.Filesystem" << "MountPoints"; + message.setArguments(arguments); + + QDBusMessage reply = QDBusConnection::systemBus().call(message); + + const QList args = reply.arguments(); + + for(const QVariant &arg : qAsConst(args)) + { + QByteArrayList list; + QDBusArgument a = arg.value().variant().value(); + if(a.currentType() != QDBusArgument::ArrayType) + continue; + a >> list; + + for(const QByteArray &p : qAsConst(list)) + points.append(p); + } + return points; +} + +QString UDisksDevice::deviceFile() const +{ + return QString::fromLatin1(m_block_interface->property("Device").toByteArray()); +} + +QDBusObjectPath UDisksDevice::objectPath() const +{ + return m_path; +} diff --git a/src/plugins/General/udisks/udisksdevice.h b/src/plugins/General/udisks/udisksdevice.h new file mode 100644 index 000000000..e027cd2be --- /dev/null +++ b/src/plugins/General/udisks/udisksdevice.h @@ -0,0 +1,91 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef UDISKS2DEVICE_H +#define UDISKS2DEVICE_H + +#include +#include +#include +#include +#include +#include +#include + +class QDBusInterface; + +typedef QList QByteArrayList; +Q_DECLARE_METATYPE(QByteArrayList) + +inline const QDBusArgument &operator>>(const QDBusArgument &arg, QByteArrayList &list) +{ + arg.beginArray(); + list.clear(); + + while (!arg.atEnd()) + { + QByteArray element; + arg >> element; + list.append( element ); + } + arg.endArray(); + return arg; +} + +inline QDBusArgument &operator<<(QDBusArgument &arg, const QByteArrayList &list) +{ + arg.beginArray(qMetaTypeId()); + for (int i = 0; i < list.count(); ++i) + arg << list[i]; + arg.endArray(); + return arg; +} + + +/** + @author Ilya Kotov +*/ +class UDisksDevice : public QObject +{ + Q_OBJECT +public: + UDisksDevice(QDBusObjectPath o, QObject *parent = nullptr); + + ~UDisksDevice(); + + QVariant property(const QString &key) const; + bool isRemovable() const; + bool isMediaRemovable() const; + bool isAudio() const; + bool isMounted() const; + bool isOptical() const; + QStringList mountPoints() const; + QString deviceFile() const; + QDBusObjectPath objectPath() const; + +signals: + void changed(); + +private: + QDBusInterface *m_block_interface; + QDBusInterface *m_drive_interface; + QDBusObjectPath m_path; +}; + +#endif diff --git a/src/plugins/General/udisks/udisksfactory.cpp b/src/plugins/General/udisks/udisksfactory.cpp new file mode 100644 index 000000000..c9237f65a --- /dev/null +++ b/src/plugins/General/udisks/udisksfactory.cpp @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include +#include +#include "settingsdialog.h" +#include "udisksplugin.h" +#include "udisksfactory.h" + +GeneralProperties UDisksFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("UDisks Plugin"); + properties.shortName = "udisks"; + properties.hasAbout = true; + properties.hasSettings = true; + properties.visibilityControl = false; + return properties; +} + +QObject *UDisksFactory::create(QObject *parent) +{ + return new UDisksPlugin(parent); +} + +QDialog *UDisksFactory::createConfigDialog(QWidget *parent) +{ + return new SettingsDialog(parent); +} + +void UDisksFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About UDisks Plugin"), + tr("Qmmp UDisks Plugin") + "\n" + + tr("This plugin provides removable devices detection using UDisks") + "\n" + + tr("Written by: Ilya Kotov ")); +} + +QString UDisksFactory::translation() const +{ + return QLatin1String(":/udisks_plugin_"); +} diff --git a/src/plugins/General/udisks/udisksfactory.h b/src/plugins/General/udisks/udisksfactory.h new file mode 100644 index 000000000..ceba73de5 --- /dev/null +++ b/src/plugins/General/udisks/udisksfactory.h @@ -0,0 +1,44 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef UDISKS2FACTORY_H +#define UDISKS2FACTORY_H + +/** + @author Ilya Kotov +*/ +#include + +#include +#include + +class UDisksFactory : public QObject, public GeneralFactory +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") +Q_INTERFACES(GeneralFactory) +public: + GeneralProperties properties() const override; + QObject *create(QObject *parent) override; + QDialog *createConfigDialog(QWidget *parent) override; + void showAbout(QWidget *parent) override; + QString translation() const override; +}; + +#endif diff --git a/src/plugins/General/udisks/udisksmanager.cpp b/src/plugins/General/udisks/udisksmanager.cpp new file mode 100644 index 000000000..749f36ab1 --- /dev/null +++ b/src/plugins/General/udisks/udisksmanager.cpp @@ -0,0 +1,91 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "udisksmanager.h" + +UDisksManager::UDisksManager(QObject *parent) + : QObject(parent) +{ + m_interface = new QDBusInterface("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", + "org.freedesktop.DBus.ObjectManager", + QDBusConnection::systemBus(), this); + + m_interface->connection().connect("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", + "org.freedesktop.DBus.ObjectManager", "InterfacesAdded", + this, SLOT(onInterfacesAdded(QDBusObjectPath,QVariantMapMap))); + + m_interface->connection().connect("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", + "org.freedesktop.DBus.ObjectManager", "InterfacesRemoved", + this, SIGNAL(onInterfacesRemoved(QDBusObjectPath, QStringList))); +} + + +UDisksManager::~UDisksManager() +{ +} + +QList UDisksManager::findAllDevices() +{ + QList paths; + QDBusMessage call = QDBusMessage::createMethodCall("org.freedesktop.UDisks2", + "/org/freedesktop/UDisks2/block_devices", + "org.freedesktop.DBus.Introspectable", + "Introspect"); + QDBusPendingReply reply = QDBusConnection::systemBus().call(call); + + + if (!reply.isValid()) + { + qWarning("UDisks2Manager: error: %s", qPrintable(reply.error().name())); + return paths; + } + QXmlStreamReader xml(reply.value()); + while (!xml.atEnd()) + { + xml.readNext(); + if (xml.tokenType() == QXmlStreamReader::StartElement && xml.name().toString() == "node" ) + { + QString name = xml.attributes().value("name").toString(); + if(!name.isEmpty()) + paths << QDBusObjectPath("/org/freedesktop/UDisks2/block_devices/" + name); + } + } + return paths; +} + +void UDisksManager::onInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &) +{ + if(object_path.path().startsWith("/org/freedesktop/UDisks2/jobs")) + return; + emit deviceAdded(object_path); +} + +void UDisksManager::onInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &) +{ + if(object_path.path().startsWith("/org/freedesktop/UDisks2/jobs")) + return; + emit deviceRemoved(object_path); +} diff --git a/src/plugins/General/udisks/udisksmanager.h b/src/plugins/General/udisks/udisksmanager.h new file mode 100644 index 000000000..9e8fc14d2 --- /dev/null +++ b/src/plugins/General/udisks/udisksmanager.h @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef UDISKS2MANAGER_H +#define UDISKS2MANAGER_H + +#include +#include +#include +#include + +class QDBusInterface; + +typedef QMap QVariantMapMap; +Q_DECLARE_METATYPE(QVariantMapMap) + +/** + @author Ilya Kotov +*/ +class UDisksManager : public QObject +{ +Q_OBJECT +public: + UDisksManager(QObject *parent = nullptr); + + ~UDisksManager(); + + QList findAllDevices(); + +signals: + void deviceAdded(QDBusObjectPath); + void deviceRemoved(QDBusObjectPath); + +private slots: + void onInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &); + void onInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &); + +private: + QDBusInterface *m_interface; + +}; + +#endif diff --git a/src/plugins/General/udisks/udisksplugin.cpp b/src/plugins/General/udisks/udisksplugin.cpp new file mode 100644 index 000000000..ac1559270 --- /dev/null +++ b/src/plugins/General/udisks/udisksplugin.cpp @@ -0,0 +1,253 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "udisksdevice.h" +#include "udisksmanager.h" +#include "udisksplugin.h" + +UDisksPlugin::UDisksPlugin(QObject *parent) : QObject(parent) +{ + qDBusRegisterMetaType(); + qDBusRegisterMetaType(); + + m_manager = new UDisksManager(this); + m_actions = new QActionGroup(this); + connect(m_manager,SIGNAL(deviceAdded(QDBusObjectPath)), SLOT(addDevice(QDBusObjectPath))); + connect(m_manager,SIGNAL(deviceRemoved(QDBusObjectPath)), SLOT(removeDevice(QDBusObjectPath))); + connect(m_actions,SIGNAL(triggered (QAction *)), SLOT(processAction(QAction *))); + //load settings + QSettings settings(Qmmp::configFile(), QSettings::IniFormat); + settings.beginGroup("UDisks2"); + m_detectCDA = settings.value("cda", true).toBool(); + m_detectRemovable = settings.value("removable", true).toBool(); + m_addTracks = false; //do not load tracks on startup + m_addFiles = false; + //find existing devices + const QList devs = m_manager->findAllDevices(); + for(const QDBusObjectPath &o : qAsConst(devs)) + addDevice(o); + //load remaining settings + m_addTracks = settings.value("add_tracks", false).toBool(); + m_removeTracks = settings.value("remove_tracks", false).toBool(); + m_addFiles = settings.value("add_files", false).toBool(); + m_removeFiles = settings.value("remove_files", false).toBool(); + settings.endGroup(); +} + +UDisksPlugin::~UDisksPlugin() +{ +} + +void UDisksPlugin::removeDevice(QDBusObjectPath o) +{ + QList::iterator it = m_devices.begin(); + while(it != m_devices.end()) + { + if((*it)->objectPath() == o) + { + delete (*it); + it = m_devices.erase(it); + qDebug("UDisksPlugin: removed device: \"%s\"", qPrintable(o.path())); + updateActions(); + break; + } + else + { + ++it; + } + } +} + +void UDisksPlugin::addDevice(QDBusObjectPath o) +{ + for(const UDisksDevice *device : qAsConst(m_devices)) //is it already exists? + { + if (device->objectPath() == o) + return; + } + UDisksDevice *device = new UDisksDevice(o, this); + + if(device->isRemovable()) //detect removable devices only + { + qDebug("UDisksPlugin: added device: \"%s\"", qPrintable(o.path())); + m_devices << device; + updateActions(); + connect(device, SIGNAL(changed()), SLOT(updateActions())); + } + else + delete device; +} + +void UDisksPlugin::updateActions() +{ + // add action for cd audio or mounted volume + for(const UDisksDevice *device : qAsConst(m_devices)) + { + QString dev_path; + if (m_detectCDA && device->isAudio()) //cd audio + { + dev_path = "cdda://" + device->deviceFile(); + } + else if (m_detectRemovable && device->isMounted() && + device->property("Size").toLongLong() < 40000000000LL && + (device->property("IdType").toString() == "vfat" || + device->property("IdType").toString() == "iso9660" || + device->property("IdType").toString() == "udf" || + device->property("IdType").toString() == "ext2")) //mounted volume + { + dev_path = device->mountPoints().first(); + } + else + continue; + + if (!findAction(dev_path)) + { + QAction *action = new QAction(this); + QString actionText; + if (device->isAudio()) + { + actionText = QString(tr("Add CD \"%1\"")).arg(device->deviceFile()); + } + else + { + QString name = device->property("IdLabel").toString(); + if (name.isEmpty()) + name = dev_path; + + actionText = QString(tr("Add Volume \"%1\"")).arg(name); + } + + if (device->isOptical()) + { + if(device->property("IdType").toString() == "iso9660") + action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveDVDIcon)); + else + action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveCDIcon)); + } + else + action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveHDIcon)); + + qDebug("UDisksPlugin: added menu item: \"%s\"", qPrintable(dev_path)); + + action->setText(actionText); + action->setData(dev_path); + m_actions->addAction(action); + UiHelper::instance()->addAction(action, UiHelper::ADD_MENU); + addPath(dev_path); + } + } + // remove action if device is unmounted/removed + for(QAction *action : m_actions->actions()) + { + if (!findDevice(action)) + { + qDebug("UDisksPlugin: removed menu item: \"%s\"", qPrintable(action->data().toString())); + m_actions->removeAction(action); + UiHelper::instance()->removeAction(action); + removePath(action->data().toString()); + action->deleteLater(); + } + } +} + +void UDisksPlugin::processAction(QAction *action) +{ + qDebug("UDisksPlugin: action triggered: %s", qPrintable(action->data().toString())); + QString path = action->data().toString(); + PlayListManager::instance()->selectedPlayList()->add(path); +} + +QAction *UDisksPlugin::findAction(const QString &dev_path) +{ + for(QAction *action : m_actions->actions()) + { + if (action->data().toString() == dev_path) + return action; + } + return nullptr; +} + +UDisksDevice *UDisksPlugin::findDevice(QAction *action) +{ + for(UDisksDevice *device : qAsConst(m_devices)) + { + QString dev_path; + if (device->isAudio()) + { + dev_path = "cdda://" + device->deviceFile(); + if (dev_path == action->data().toString()) + return device; + } + if (device->isMounted()) + { + dev_path = device->mountPoints().first(); + if (dev_path == action->data().toString()) + return device; + } + } + return nullptr; +} + +void UDisksPlugin::addPath(const QString &path) +{ + PlayListModel *model = PlayListManager::instance()->selectedPlayList(); + + for(PlayListItem *item : model->items()) // Is it already exist? + { + if(item->isGroup()) + continue; + if (dynamic_cast(item)->path().startsWith(path)) + return; + } + + if (path.startsWith("cdda://") && m_addTracks) + { + PlayListManager::instance()->selectedPlayList()->add(path); + return; + } + else if (!path.startsWith("cdda://") && m_addFiles) + PlayListManager::instance()->selectedPlayList()->add(path); +} + +void UDisksPlugin::removePath(const QString &path) +{ + if ((path.startsWith("cdda://") && !m_removeTracks) || + (!path.startsWith("cdda://") && !m_removeFiles)) //process settings + return; + + PlayListModel *model = PlayListManager::instance()->selectedPlayList(); + + int i = 0; + while (model->count() > 0 && i < model->count()) + { + if (model->isTrack(i) && model->track(i)->path().startsWith(path)) + model->removeTrack(i); + else + ++i; + } +} diff --git a/src/plugins/General/udisks/udisksplugin.h b/src/plugins/General/udisks/udisksplugin.h new file mode 100644 index 000000000..66727d941 --- /dev/null +++ b/src/plugins/General/udisks/udisksplugin.h @@ -0,0 +1,65 @@ +/*************************************************************************** + * Copyright (C) 2013-2021 by Ilya Kotov * + * forkotov02@ya.ru * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef UDISKS2PLUGIN_H +#define UDISKS2PLUGIN_H + +#include +#include + +class UDisksManager; +class UDisksDevice; +class QActionGroup; +class QAction; + +/** + @author Ilya Kotov +*/ + +class UDisksPlugin : public QObject +{ +Q_OBJECT +public: + UDisksPlugin(QObject *parent = nullptr); + + ~UDisksPlugin(); + +private slots: + void removeDevice(QDBusObjectPath); + void addDevice(QDBusObjectPath); + void processAction(QAction *action); + void updateActions(); + +private: + QAction *findAction(const QString &dev_path); + UDisksDevice *findDevice(QAction *action); + void addPath(const QString &path); + void removePath(const QString &path); + UDisksManager *m_manager; + QList m_devices; + QActionGroup *m_actions; + bool m_detectCDA; + bool m_addTracks; + bool m_removeTracks; + bool m_detectRemovable; + bool m_addFiles; + bool m_removeFiles; +}; + +#endif //UDISKS2PLUGIN_H diff --git a/src/plugins/General/udisks2/CMakeLists.txt b/src/plugins/General/udisks2/CMakeLists.txt deleted file mode 100644 index c767c824d..000000000 --- a/src/plugins/General/udisks2/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -project(libudisks2) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -# libqmmpui & libqmmp -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../) -link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) -link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) - -SET(libudisks2_SRCS - udisks2factory.cpp - udisks2manager.cpp - udisks2plugin.cpp - udisks2device.cpp - settingsdialog.cpp -) - -SET(libudisks2_RCCS translations/translations.qrc) - -QT5_ADD_RESOURCES(libudisks2_RCC_SRCS ${libudisks2_RCCS}) - -# user interface - -SET(libudisks2_UIS - settingsdialog.ui -) - -QT5_WRAP_UI(libudisks2_UIS_H ${libudisks2_UIS}) -# Don't forget to include output directory, otherwise -# the UI file won't be wrapped! -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -ADD_LIBRARY(udisks2 MODULE ${libudisks2_SRCS} ${libudisks2_UIS_H} ${libudisks2_RCC_SRCS}) -add_dependencies(udisks2 libqmmpui) -target_link_libraries(udisks2 Qt5::Widgets Qt5::DBus libqmmpui libqmmp) -install(TARGETS udisks2 DESTINATION ${PLUGIN_DIR}/General) diff --git a/src/plugins/General/udisks2/settingsdialog.cpp b/src/plugins/General/udisks2/settingsdialog.cpp deleted file mode 100644 index 6961318f0..000000000 --- a/src/plugins/General/udisks2/settingsdialog.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include -#include -#include "settingsdialog.h" - -SettingsDialog::SettingsDialog(QWidget *parent) - : QDialog(parent) -{ - m_ui.setupUi(this); - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("UDisks2"); - m_ui.cdGroupBox->setChecked(settings.value("cda", true).toBool()); - m_ui.addTracksCheckBox->setChecked(settings.value("add_tracks", false).toBool()); - m_ui.removeTracksCheckBox->setChecked(settings.value("remove_tracks", false).toBool()); - m_ui.removableGroupBox->setChecked(settings.value("removable", true).toBool()); - m_ui.addFilesCheckBox->setChecked(settings.value("add_files", false).toBool()); - m_ui.removeFilesCheckBox->setChecked(settings.value("remove_files", false).toBool()); - settings.endGroup(); -} - - -SettingsDialog::~SettingsDialog() -{} - -void SettingsDialog::accept() -{ - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("UDisks2"); - settings.setValue("cda", m_ui.cdGroupBox->isChecked()); - settings.setValue("add_tracks", m_ui.addTracksCheckBox->isChecked()); - settings.setValue("remove_tracks", m_ui.removeTracksCheckBox->isChecked()); - settings.setValue("removable", m_ui.removableGroupBox->isChecked()); - settings.setValue("add_files", m_ui.addFilesCheckBox->isChecked()); - settings.setValue("remove_files", m_ui.removeFilesCheckBox->isChecked()); - settings.endGroup(); - QDialog::accept(); -} diff --git a/src/plugins/General/udisks2/settingsdialog.h b/src/plugins/General/udisks2/settingsdialog.h deleted file mode 100644 index 4364df4ed..000000000 --- a/src/plugins/General/udisks2/settingsdialog.h +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef SETTINGSDIALOG_H -#define SETTINGSDIALOG_H - -#include -#include "ui_settingsdialog.h" - -/** - @author Ilya Kotov -*/ -class SettingsDialog : public QDialog -{ -Q_OBJECT -public: - SettingsDialog(QWidget *parent = nullptr); - - ~SettingsDialog(); - - -public slots: - virtual void accept() override; - -private: - Ui::SettingsDialog m_ui; -}; - -#endif diff --git a/src/plugins/General/udisks2/settingsdialog.ui b/src/plugins/General/udisks2/settingsdialog.ui deleted file mode 100644 index 5b039a88c..000000000 --- a/src/plugins/General/udisks2/settingsdialog.ui +++ /dev/null @@ -1,122 +0,0 @@ - - - SettingsDialog - - - - 0 - 0 - 348 - 247 - - - - UDisks Plugin Settings - - - - 6 - - - 6 - - - 6 - - - - - CD Audio Detection - - - true - - - - - - Add tracks to playlist automatically - - - - - - - Remove tracks from playlist automatically - - - - - - - - - - Removable Device Detection - - - true - - - - - - Add files to playlist automatically - - - - - - - Remove files from playlist automatically - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - buttonBox - accepted() - SettingsDialog - accept() - - - 199 - 221 - - - 22 - 242 - - - - - buttonBox - rejected() - SettingsDialog - reject() - - - 247 - 225 - - - 273 - 229 - - - - - diff --git a/src/plugins/General/udisks2/translations/translations.qrc b/src/plugins/General/udisks2/translations/translations.qrc deleted file mode 100644 index 9e07b55b2..000000000 --- a/src/plugins/General/udisks2/translations/translations.qrc +++ /dev/null @@ -1,33 +0,0 @@ - - - - udisks2_plugin_ru.qm - udisks2_plugin_uk_UA.qm - udisks2_plugin_zh_CN.qm - udisks2_plugin_zh_TW.qm - udisks2_plugin_tr.qm - udisks2_plugin_cs.qm - udisks2_plugin_pt_BR.qm - udisks2_plugin_pt.qm - udisks2_plugin_de.qm - udisks2_plugin_pl_PL.qm - udisks2_plugin_fr.qm - udisks2_plugin_it.qm - udisks2_plugin_kk.qm - udisks2_plugin_ko.qm - udisks2_plugin_lt.qm - udisks2_plugin_hu.qm - udisks2_plugin_nl.qm - udisks2_plugin_ja.qm - udisks2_plugin_sk.qm - udisks2_plugin_es.qm - udisks2_plugin_he.qm - udisks2_plugin_gl_ES.qm - udisks2_plugin_sr_BA.qm - udisks2_plugin_sr_RS.qm - udisks2_plugin_bg.qm - udisks2_plugin_el.qm - udisks2_plugin_id.qm - udisks2_plugin_fi.qm - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_bg.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_bg.ts deleted file mode 100644 index f6c63b44a..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_bg.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - - - - - Remove tracks from playlist automatically - - - - - Removable Device Detection - - - - - Add files to playlist automatically - - - - - Remove files from playlist automatically - - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_cs.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_cs.ts deleted file mode 100644 index 655ea9c84..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_cs.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Nastavení modulu UDisks - - - - CD Audio Detection - Detekce zvukových CD - - - - Add tracks to playlist automatically - Automaticky přidat stopy do seznamu skladeb - - - - Remove tracks from playlist automatically - Automaticky odebrat stopy ze seznamu skladeb - - - - Removable Device Detection - Detekce odpojitelných zařízení - - - - Add files to playlist automatically - Automaticky přidat soubory do seznamu skladeb - - - - Remove files from playlist automatically - Automaticky odebrat stopy ze seznamu skladeb - - - - UDisks2Factory - - - UDisks2 Plugin - Modul UDisks2 - - - - About UDisks2 Plugin - O modulu UDisks2 - - - - Qmmp UDisks2 Plugin - Modul Qmmp UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Tento modul poskytuje detekci výměnných médií pomocí UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - Přidat CD „%1“ - - - - Add Volume "%1" - Přidat svazek „%1“ - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_de.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_de.ts deleted file mode 100644 index 42dd34174..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_de.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Einstellungen UDisks-Modul - - - - CD Audio Detection - CD-Audio-Erkennung - - - - Add tracks to playlist automatically - Titel automatisch zur Wiedergabeliste hinzufügen - - - - Remove tracks from playlist automatically - Titel automatisch von der Wiedergabeliste entfernen - - - - Removable Device Detection - Wechsellaufwerkerkennung - - - - Add files to playlist automatically - Dateien automatisch zur Wiedergabeliste hinzufügen - - - - Remove files from playlist automatically - Dateien automatisch von der Wiedergabeliste entfernen - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2-Modul - - - - About UDisks2 Plugin - Über UDisks2-Modul - - - - Qmmp UDisks2 Plugin - Qmmp UDisks2-Modul - - - - This plugin provides removable devices detection using UDisks2 - Dieses Modul bietet Wechsellaufwerkerkennung unter Verwendung von UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Geschrieben von: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - CD „%1“ hinzufügen - - - - Add Volume "%1" - Datenträger „%1“ hinzufügen - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_el.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_el.ts deleted file mode 100644 index eb41b22fb..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_el.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Ρυθμίσεις πρόσθετου UDisks - - - - CD Audio Detection - Ανίχνευση CD ήχου - - - - Add tracks to playlist automatically - Προσθήκη των κομματιών αυτόματα στη λίστα αναπαραγωγής - - - - Remove tracks from playlist automatically - Αφαίρεση των κομματιών αυτόματα από τη λίστα αναπαραγωγής - - - - Removable Device Detection - Ανίχνευση αφαιρούμενης συσκευής - - - - Add files to playlist automatically - Προσθήκη αρχείων αυτόματα στη λίστα αναπαραγωγής - - - - Remove files from playlist automatically - Αφαίρεση των αρχείων από τη λίστα αναπαραγωγής αυτόματα - - - - UDisks2Factory - - - UDisks2 Plugin - Πρόσθετο UDisks2 - - - - About UDisks2 Plugin - Σχετικά με το πρόσθετο UDisks2 - - - - Qmmp UDisks2 Plugin - Qmmp πρόσθετο UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Αυτό το πρόσθετο παρέχει την ανίχνευση αφαιρούμενων συσκευών μέσω UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Γράφτηκε από τον: Ilya Kotov <forkotov02@hotmail.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Προσθήκη CD «%1» - - - - Add Volume "%1" - Προσθήκη Έντασης «%1» - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_en.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_en.ts deleted file mode 100644 index 5e44b7b87..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_en.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - - - - - Remove tracks from playlist automatically - - - - - Removable Device Detection - - - - - Add files to playlist automatically - - - - - Remove files from playlist automatically - - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_es.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_es.ts deleted file mode 100644 index 907d8805d..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_es.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Configuración del módulo UDisks - - - - CD Audio Detection - Detección de audio CD - - - - Add tracks to playlist automatically - Añadir pistas a la lista de reproducción automáticamente - - - - Remove tracks from playlist automatically - Eliminar pistas de la lista de reproducción automáticamente - - - - Removable Device Detection - Detectar dispositivos extraibles - - - - Add files to playlist automatically - Añadir archivos a la lista de reproducción automáticamente - - - - Remove files from playlist automatically - Eliminar archivos de la lista de reproducción automáticamente - - - - UDisks2Factory - - - UDisks2 Plugin - Módulo UDisks2 - - - - About UDisks2 Plugin - Acerca del Módulo UDisks2 - - - - Qmmp UDisks2 Plugin - Módulo UDisks2 de Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Este módulo proporciona detección de dispositivos extraíbles mediante UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Escrito por: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Añadir CD "%1" - - - - Add Volume "%1" - Añadir volumen "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_fi.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_fi.ts deleted file mode 100644 index cf41107dd..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_fi.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - UDisks-liitännäisen asetukset - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - Lisää kappaleet soittolistaan automaattisesti - - - - Remove tracks from playlist automatically - Poista kappaleet soittolistalta automaattisesti - - - - Removable Device Detection - Irrotettavan laitteen havaitseminen - - - - Add files to playlist automatically - Lisää tiedostot soittolistaan automaattisesti - - - - Remove files from playlist automatically - Poista tiedostot soittolistasta automaattisesti - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2-liitännäinen - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - Qmmp:n UDisks2-liitännäinen - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Toteuttanut: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Lisää CD "%1" - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_fr.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_fr.ts deleted file mode 100644 index 5efce0a69..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_fr.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Configuration du greffon UDisks - - - - CD Audio Detection - Détection de CD audio - - - - Add tracks to playlist automatically - Ajouter automatiquement les pistes à la liste - - - - Remove tracks from playlist automatically - Enlever automatiquement les pistes de la liste - - - - Removable Device Detection - Détection de périphérique amovible - - - - Add files to playlist automatically - Ajouter automatiquement les fichiers à la liste - - - - Remove files from playlist automatically - Enlever automatiquement les fichiers à la liste - - - - UDisks2Factory - - - UDisks2 Plugin - Greffon UDisks2 - - - - About UDisks2 Plugin - À propos du greffon UDisks2 - - - - Qmmp UDisks2 Plugin - Greffon UDisks2 pour Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Ce greffon fournit une détection de périphériques amovibles en utilisant UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Écrit par : Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Ajouter CD « %1 » - - - - Add Volume "%1" - Ajouter volume « %1 » - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_gl_ES.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_gl_ES.ts deleted file mode 100644 index f95311746..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_gl_ES.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Preferencias do engadido UDisks - - - - CD Audio Detection - Detección de CD de audio - - - - Add tracks to playlist automatically - Engadir pistas á lista de reprodución automaticamente - - - - Remove tracks from playlist automatically - Eliminar pistas da lista de reprodución automaticamente - - - - Removable Device Detection - Detección de dispositivos extraíbles - - - - Add files to playlist automatically - Engadir ficheiros á lista de reprodución automaticamente - - - - Remove files from playlist automatically - Eliminar ficheiros da lista de reprodución automaticamente - - - - UDisks2Factory - - - UDisks2 Plugin - Engadido UDisks2 - - - - About UDisks2 Plugin - Sobre o engadido UDisks2 - - - - Qmmp UDisks2 Plugin - Engadido UDisks2 de Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Este engadido provén detección de dispositivos extraíbles usando UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Escrito por: LLya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Engadir CD "%1" - - - - Add Volume "%1" - Engadir volume "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_he.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_he.ts deleted file mode 100644 index 755a13f49..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_he.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - הגדרות תוסף UDisks - - - - CD Audio Detection - איתור אוטומטי של תקליטור שמע - - - - Add tracks to playlist automatically - הוסף רצועות אוטומטית לתוך רשימת נגינה - - - - Remove tracks from playlist automatically - הסר רצועות אוטומטית מתוך רשימת נגינה - - - - Removable Device Detection - איתור התקנים נשלפים - - - - Add files to playlist automatically - הוסף קבצים אוטומטית לתוך רשימת נגינה - - - - Remove files from playlist automatically - הסר קבצים אוטומטית מתוך רשימת נגינה - - - - UDisks2Factory - - - UDisks2 Plugin - תוסף UDisks2 - - - - About UDisks2 Plugin - אודות תוסף UDisks2 - - - - Qmmp UDisks2 Plugin - תוסף UDisks2 של Qmmp - - - - This plugin provides removable devices detection using UDisks2 - תוסף זה מספק איתור התקנים ברי הזזה באמצעות UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - הוסף תקליטור "%1" - - - - Add Volume "%1" - הוסף כרך "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_hu.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_hu.ts deleted file mode 100644 index 94f6b2dfd..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_hu.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - - - - - Remove tracks from playlist automatically - - - - - Removable Device Detection - - - - - Add files to playlist automatically - - - - - Remove files from playlist automatically - - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_id.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_id.ts deleted file mode 100644 index ce56e2aa6..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_id.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Setelan Plugin UDisks - - - - CD Audio Detection - Deteksi Audio CD - - - - Add tracks to playlist automatically - Tambah track ke daftarmain secara otomatis - - - - Remove tracks from playlist automatically - Buang track dari daftarmain secara otomatis - - - - Removable Device Detection - Deteksi Perangkat Dapat-dilepas - - - - Add files to playlist automatically - Tambah file ke daftarmain secara otomatis - - - - Remove files from playlist automatically - Buang file dari daftarmain secara otomatis - - - - UDisks2Factory - - - UDisks2 Plugin - Plugin UDisks - - - - About UDisks2 Plugin - Tentang Plugin UDisks - - - - Qmmp UDisks2 Plugin - Plugin UDisks Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Plugin ini menyediakan deteksi perangkat dapat-dilepas menggunakan UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Ditulis oleh: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Tambah CD "%1" - - - - Add Volume "%1" - Tambah Volume "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_it.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_it.ts deleted file mode 100644 index 56b6f4140..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_it.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Impostazioni dell'estensione UDisks - - - - CD Audio Detection - Rilevamento CD Audio - - - - Add tracks to playlist automatically - Aggiungi automaticamente le tracce alla scaletta - - - - Remove tracks from playlist automatically - Rimuovi automaticamente i titoli dalla scaletta - - - - Removable Device Detection - Rilevamento dispositivi rimovibili - - - - Add files to playlist automatically - Aggiungi automaticamente i file alla scaletta - - - - Remove files from playlist automatically - Rimuovi automaticamente i file dalla scaletta - - - - UDisks2Factory - - - UDisks2 Plugin - Estensione UDisks2 - - - - About UDisks2 Plugin - Informazioni sull'estensione UDisks2 - - - - Qmmp UDisks2 Plugin - Estensione UDisks2 per Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Estensione che permette il rilevamento di dispositivi rimovibili utilizzando UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Autori: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Aggiungi CD «%1» - - - - Add Volume "%1" - Aggiungi volume «%1» - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_ja.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_ja.ts deleted file mode 100644 index 6b226722d..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_ja.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - UDisks プラグイン設定 - - - - CD Audio Detection - 音楽 CD 検知 - - - - Add tracks to playlist automatically - プレイリストにトラックを自動追加 - - - - Remove tracks from playlist automatically - プレイリストからトラックを自動除去 - - - - Removable Device Detection - 着脱可能なデバイスの検知 - - - - Add files to playlist automatically - プレイリストにファイルを自動追加 - - - - Remove files from playlist automatically - プレイリストからファイルを自動除去 - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2 プラグイン - - - - About UDisks2 Plugin - UDisks2 プラグインについて - - - - Qmmp UDisks2 Plugin - QMMP UDisks2 プラグイン - - - - This plugin provides removable devices detection using UDisks2 - このプラグインは着脱可能なデバイスの検知を UDisks2 により行ないます - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - 制作: Илья Котов (Ilya Kotov) <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - CD "%1" を追加 - - - - Add Volume "%1" - 量目 "%1" を追加 - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_kk.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_kk.ts deleted file mode 100644 index 336c9269d..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_kk.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - - - - - Remove tracks from playlist automatically - - - - - Removable Device Detection - - - - - Add files to playlist automatically - - - - - Remove files from playlist automatically - - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_ko.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_ko.ts deleted file mode 100644 index 3ffaba282..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_ko.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - UDisks 플러그인 설정 - - - - CD Audio Detection - CD 오디오 감지 - - - - Add tracks to playlist automatically - 자동으로 재생목록에 트랙 추가 - - - - Remove tracks from playlist automatically - 자동으로 재생목록에 트랙 제거 - - - - Removable Device Detection - 이동식 장치 감지 - - - - Add files to playlist automatically - 자동으로 재생목록에 파일 추가 - - - - Remove files from playlist automatically - 자동으로 재생목록에서 파일 제거 - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2 플러그인 - - - - About UDisks2 Plugin - UDisks2 플러그인 정보 - - - - Qmmp UDisks2 Plugin - Qmmp UDisks2 플러그인 - - - - This plugin provides removable devices detection using UDisks2 - 이 플러그인은 UDisks2를 사용하여 이동식 디바이스 감지 기능을 제공합니다 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - 작성자: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - CD "%1" 추가 - - - - Add Volume "%1" - 볼륨 "%1" 추가 - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_lt.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_lt.ts deleted file mode 100644 index e1b6c1ca8..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_lt.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Udisks įskiepio nustatymai - - - - CD Audio Detection - Audio CD aptikimas - - - - Add tracks to playlist automatically - Įdėti takelius į grojaraštį automatiškai - - - - Remove tracks from playlist automatically - Pašalinti takelius iš grojaraščio automatiškai - - - - Removable Device Detection - Išorinių įrenginių aptikimas - - - - Add files to playlist automatically - Įdėti takelius į grojaratį automatiškai - - - - Remove files from playlist automatically - Pašalinti takelius iš grojaraščio automatiškai - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2 Įskiepis - - - - About UDisks2 Plugin - Apie UDisks2 Įskiepį - - - - Qmmp UDisks2 Plugin - Qmmp UDisks2 Įskiepis - - - - This plugin provides removable devices detection using UDisks2 - Šis įskiepis aptinka prijungiamus įrenginius naudodamas UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Sukūrė: Ilya Kotov - - - - UDisks2Plugin - - - Add CD "%1" - Pridėti CD "%1" - - - - Add Volume "%1" - Pridėti tomą "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_nl.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_nl.ts deleted file mode 100644 index 95fe9937b..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_nl.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Instellingen - - - - CD Audio Detection - CD-audiodetectie - - - - Add tracks to playlist automatically - Nummers automatisch toevoegen aan afspeellijst - - - - Remove tracks from playlist automatically - Nummers automatisch verwijderen van afspeellijst - - - - Removable Device Detection - Detectie van verwisselbare apparaten - - - - Add files to playlist automatically - Bestanden automatisch toevoegen aan afspeellijst - - - - Remove files from playlist automatically - Bestanden automatisch verwijderen van afspeellijst - - - - UDisks2Factory - - - UDisks2 Plugin - UDisks2-plug-in - - - - About UDisks2 Plugin - Over de UDisks2-plug-in - - - - Qmmp UDisks2 Plugin - UDisks2-plug-in voor Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Deze plug-in faciliteert detectie van verwisselbare apparaten via UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Auteur: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - CD "%1" toevoegen - - - - Add Volume "%1" - Apparaat "%1" toevoegen - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_pl_PL.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_pl_PL.ts deleted file mode 100644 index d37d92e72..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_pl_PL.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Ustawienia wtyczki UDisks - - - - CD Audio Detection - Detekcja płyt CD Audio - - - - Add tracks to playlist automatically - Automatycznie dodaj utwory do listy - - - - Remove tracks from playlist automatically - Automatycznie usuń utwory z listy - - - - Removable Device Detection - Detekcja urządzeń przenośnych - - - - Add files to playlist automatically - Automatycznie dodaj pliki do listy - - - - Remove files from playlist automatically - Automatycznie usuń pliki z listy - - - - UDisks2Factory - - - UDisks2 Plugin - Wtyczka UDisks2 - - - - About UDisks2 Plugin - O wtyczce UDisks2 - - - - Qmmp UDisks2 Plugin - Wtyczka UDisks2 dla Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Ta wtyczka pozwala na wykrywanie urządzeń przy użyciu UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Napisana przez: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Dodaj CD "%1" - - - - Add Volume "%1" - Dodaj głośność "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_pt.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_pt.ts deleted file mode 100644 index de7b41eb2..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_pt.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Definições - - - - CD Audio Detection - Deteção de CD áudio - - - - Add tracks to playlist automatically - Adicionar faixas à lista de reprodução - - - - Remove tracks from playlist automatically - Remover faixas da lista de reprodução - - - - Removable Device Detection - Deteção de discos amovíveis - - - - Add files to playlist automatically - Adicionar ficheiros à lista de reprodução - - - - Remove files from playlist automatically - Remover ficheiros da lista de reprodução - - - - UDisks2Factory - - - UDisks2 Plugin - Suplemento UDisks2 - - - - About UDisks2 Plugin - Acerca de suplemento UDisks2 - - - - Qmmp UDisks2 Plugin - Suplemento Qmmp UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Este suplemento permite a deteção de discos amovíveis através do serviço UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Desenvolvido por: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Adicionar CD %1 - - - - Add Volume "%1" - Adicionar volume %1 - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_pt_BR.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_pt_BR.ts deleted file mode 100644 index a62d4d5c5..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_pt_BR.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Preferências do plugin UDisks - - - - CD Audio Detection - Detecção de áudio de CD - - - - Add tracks to playlist automatically - Adicionar faixas à lista de reprodução - - - - Remove tracks from playlist automatically - Remover faixas da lista de reprodução - - - - Removable Device Detection - Detecção de dispositivos removíveis - - - - Add files to playlist automatically - Adicionar arquivos à lista de reprodução - - - - Remove files from playlist automatically - Remover arquivos da lista de reprodução - - - - UDisks2Factory - - - UDisks2 Plugin - Plugin UDisks2 - - - - About UDisks2 Plugin - Sobre o plugin UDisks2 - - - - Qmmp UDisks2 Plugin - Plugin Qmmp UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Este plugin permite a detecção de dispositivos removíveis através do serviço UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - Adicionar CD %1 - - - - Add Volume "%1" - Adicionar volume %1 - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_ru.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_ru.ts deleted file mode 100644 index c04130e85..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_ru.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Настройки модуля UDisks - - - - CD Audio Detection - Автоопределение аудио-CD - - - - Add tracks to playlist automatically - Автоматически добавлять треки в список - - - - Remove tracks from playlist automatically - Автоматически удалять треки из списка - - - - Removable Device Detection - Автоопределение съёмных устройств - - - - Add files to playlist automatically - Автоматически добавлять треки в список - - - - Remove files from playlist automatically - Автоматически удалять треки из списка - - - - UDisks2Factory - - - UDisks2 Plugin - Модуль UDisks2 - - - - About UDisks2 Plugin - О модуле UDisks2 - - - - Qmmp UDisks2 Plugin - Модуль UDisks2 для Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Это модуль отслеживает съёмные устройства с помощью UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Разработчик: Илья Котов <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Добавить CD "%1" - - - - Add Volume "%1" - Добавить том "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_sk.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_sk.ts deleted file mode 100644 index a8fcd692b..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_sk.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - - - - - Add tracks to playlist automatically - - - - - Remove tracks from playlist automatically - - - - - Removable Device Detection - - - - - Add files to playlist automatically - - - - - Remove files from playlist automatically - - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - - - - - Add Volume "%1" - - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_sr_BA.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_sr_BA.ts deleted file mode 100644 index bf430d5e8..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_sr_BA.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Поставке за Удискс2 - - - - CD Audio Detection - Откривање музичког диска - - - - Add tracks to playlist automatically - Аутоматски додај нумере на листу - - - - Remove tracks from playlist automatically - Аутоматски уклони нумере са листе - - - - Removable Device Detection - Откривање уклоњивих уређаја - - - - Add files to playlist automatically - Аутоматски додај фајлове на листу - - - - Remove files from playlist automatically - Аутоматски уклони фајлове са листе - - - - UDisks2Factory - - - UDisks2 Plugin - Удискс2 - - - - About UDisks2 Plugin - О прикључку за UDisks2 - - - - Qmmp UDisks2 Plugin - Кумп прикључак за UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Омогућује откривање уклоњивих уређаја користећи UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Аутор: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Додај диск „%1“ - - - - Add Volume "%1" - Додај складишни простор „%1“ - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_sr_RS.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_sr_RS.ts deleted file mode 100644 index ff03960bc..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_sr_RS.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Поставке за Удискс2 - - - - CD Audio Detection - Откривање музичког диска - - - - Add tracks to playlist automatically - Аутоматски додај нумере на листу - - - - Remove tracks from playlist automatically - Аутоматски уклони нумере са листе - - - - Removable Device Detection - Откривање уклоњивих уређаја - - - - Add files to playlist automatically - Аутоматски додај фајлове на листу - - - - Remove files from playlist automatically - Аутоматски уклони фајлове са листе - - - - UDisks2Factory - - - UDisks2 Plugin - Удискс2 - - - - About UDisks2 Plugin - О прикључку за UDisks2 - - - - Qmmp UDisks2 Plugin - Кумп прикључак за UDisks2 - - - - This plugin provides removable devices detection using UDisks2 - Омогућује откривање уклоњивих уређаја користећи UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Аутор: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Додај диск „%1“ - - - - Add Volume "%1" - Додај складишни простор „%1“ - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_tr.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_tr.ts deleted file mode 100644 index 2031a0af3..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_tr.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - - - - - CD Audio Detection - CD Ses Algılama - - - - Add tracks to playlist automatically - Parçaları listeye otomatik olarka ekle - - - - Remove tracks from playlist automatically - Parçaları listeden otomatik olarak kaldır - - - - Removable Device Detection - Çıkarılabilir Aygıt Algılama - - - - Add files to playlist automatically - Dosyaları listeye otomatik olarak ekle - - - - Remove files from playlist automatically - Dosyaları listeden otomatik olarak kaldır - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Yazan: Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - CD "%1" Ekle - - - - Add Volume "%1" - "%1" Aygıtını Ekle - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_uk_UA.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_uk_UA.ts deleted file mode 100644 index d43c066cc..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_uk_UA.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - Налаштування модуля UDisks - - - - CD Audio Detection - Автовизначення аудіо-CD - - - - Add tracks to playlist automatically - Автоматично додавати треки до списку - - - - Remove tracks from playlist automatically - Автоматично видаляти треки зі списку - - - - Removable Device Detection - Виявлення змінних пристроїв - - - - Add files to playlist automatically - Автоматично додавати файли до списку - - - - Remove files from playlist automatically - Автоматично видаляти файли зі списку - - - - UDisks2Factory - - - UDisks2 Plugin - Модуль UDisks2 - - - - About UDisks2 Plugin - Про модуль UDisks2 - - - - Qmmp UDisks2 Plugin - Модуль UDisks2 для Qmmp - - - - This plugin provides removable devices detection using UDisks2 - Цей модуль відстежує з'ємні пристрої за допомогою UDisks2 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - Розробник: Ілля Котов <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - Додати CD "%1" - - - - Add Volume "%1" - Додати том "%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_zh_CN.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_zh_CN.ts deleted file mode 100644 index c281c0f79..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_zh_CN.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - UDisks 插件设置 - - - - CD Audio Detection - CD 音频检测 - - - - Add tracks to playlist automatically - 自动添加音轨到播放列表 - - - - Remove tracks from playlist automatically - 自动从播放列表删除音轨 - - - - Removable Device Detection - 可移动设备检测 - - - - Add files to playlist automatically - 自动添加文件到播放列表 - - - - Remove files from playlist automatically - 自动从播放列表删除文件 - - - - UDisks2Factory - - - UDisks2 Plugin - UDisk2插件 - - - - About UDisks2 Plugin - 关于UDisk2插件 - - - - Qmmp UDisks2 Plugin - Qmmp播放器UDisk2插件 - - - - This plugin provides removable devices detection using UDisks2 - 本插件使用UDisk2提供对移动设备的探测功能 - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - - - - - UDisks2Plugin - - - Add CD "%1" - 增加CD"%1" - - - - Add Volume "%1" - 增加音量"%1" - - - diff --git a/src/plugins/General/udisks2/translations/udisks2_plugin_zh_TW.ts b/src/plugins/General/udisks2/translations/udisks2_plugin_zh_TW.ts deleted file mode 100644 index adc7ed488..000000000 --- a/src/plugins/General/udisks2/translations/udisks2_plugin_zh_TW.ts +++ /dev/null @@ -1,83 +0,0 @@ - - - - - SettingsDialog - - - UDisks Plugin Settings - UDisks 插件設定 - - - - CD Audio Detection - CD 音頻檢測 - - - - Add tracks to playlist automatically - 自動添加音軌到播放清單 - - - - Remove tracks from playlist automatically - 自動從播放清單刪除音軌 - - - - Removable Device Detection - 可移動設備檢測 - - - - Add files to playlist automatically - 自動添加檔案到播放清單 - - - - Remove files from playlist automatically - 自動從播放清單刪除檔案 - - - - UDisks2Factory - - - UDisks2 Plugin - - - - - About UDisks2 Plugin - - - - - Qmmp UDisks2 Plugin - - - - - This plugin provides removable devices detection using UDisks2 - - - - - Written by: Ilya Kotov <forkotov02@ya.ru> - 撰寫:Ilya Kotov <forkotov02@ya.ru> - - - - UDisks2Plugin - - - Add CD "%1" - 添加 CD "%1" - - - - Add Volume "%1" - 添加卷 "%1" - - - diff --git a/src/plugins/General/udisks2/udisks2.pro b/src/plugins/General/udisks2/udisks2.pro deleted file mode 100644 index 8b49d9dc5..000000000 --- a/src/plugins/General/udisks2/udisks2.pro +++ /dev/null @@ -1,26 +0,0 @@ -include(../../plugins.pri) - -TARGET = $$PLUGINS_PREFIX/General/udisks2 - -QT += dbus - -HEADERS += udisks2factory.h \ - udisks2plugin.h \ - udisks2manager.h \ - udisks2device.h \ - settingsdialog.h - -SOURCES += udisks2factory.cpp \ - udisks2plugin.cpp \ - udisks2manager.cpp \ - udisks2device.cpp \ - settingsdialog.cpp - -FORMS += settingsdialog.ui - -RESOURCES = translations/translations.qrc - -LIBS += $$QMMPUI_LIB - -target.path = $$PLUGIN_DIR/General -INSTALLS += target diff --git a/src/plugins/General/udisks2/udisks2device.cpp b/src/plugins/General/udisks2/udisks2device.cpp deleted file mode 100644 index e48de99fe..000000000 --- a/src/plugins/General/udisks2/udisks2device.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013-2021 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include -#include -#include -#include -#if (QT_VERSION < QT_VERSION_CHECK(5, 7, 0)) //qAsConst template -#include -#endif -#include "udisks2device.h" - -UDisks2Device::UDisks2Device(QDBusObjectPath o, QObject *parent) : QObject(parent) -{ - m_block_interface = new QDBusInterface("org.freedesktop.UDisks2", o.path(), - "org.freedesktop.UDisks2.Block", QDBusConnection::systemBus(), - this); - - QDBusObjectPath drive_object = property("Drive").value(); - - QDBusConnection::systemBus().connect("org.freedesktop.UDisks2", o.path(), - "org.freedesktop.DBus.Properties","PropertiesChanged", - this, SIGNAL(changed())); - - m_drive_interface = new QDBusInterface("org.freedesktop.UDisks2", drive_object.path(), - "org.freedesktop.UDisks2.Drive", QDBusConnection::systemBus(), - this); - m_path = o; -} - -UDisks2Device::~UDisks2Device() -{ -} - -QVariant UDisks2Device::property(const QString &key) const -{ - return m_block_interface->property(key.toLatin1().data()); -} - -bool UDisks2Device::isRemovable() const -{ - return m_drive_interface->property("Removable").toBool(); -} - -bool UDisks2Device::isMediaRemovable() const -{ - return m_drive_interface->property("MediaRemovable").toBool(); -} - -bool UDisks2Device::isAudio() const -{ - return m_drive_interface->property("OpticalNumAudioTracks").toInt() > 0; -} - -bool UDisks2Device::isMounted() const -{ - return !mountPoints().isEmpty(); -} - -bool UDisks2Device::isOptical() const -{ - return m_drive_interface->property("Optical").toBool(); -} - -QStringList UDisks2Device::mountPoints() const -{ - QStringList points; - QDBusMessage message = QDBusMessage::createMethodCall("org.freedesktop.UDisks2", m_path.path(), - "org.freedesktop.DBus.Properties", "Get"); - - QList arguments; - arguments << "org.freedesktop.UDisks2.Filesystem" << "MountPoints"; - message.setArguments(arguments); - - QDBusMessage reply = QDBusConnection::systemBus().call(message); - - const QList args = reply.arguments(); - - for(const QVariant &arg : qAsConst(args)) - { - QByteArrayList list; - QDBusArgument a = arg.value().variant().value(); - if(a.currentType() != QDBusArgument::ArrayType) - continue; - a >> list; - - for(const QByteArray &p : qAsConst(list)) - points.append(p); - } - return points; -} - -QString UDisks2Device::deviceFile() const -{ - return QString::fromLatin1(m_block_interface->property("Device").toByteArray()); -} - -QDBusObjectPath UDisks2Device::objectPath() const -{ - return m_path; -} diff --git a/src/plugins/General/udisks2/udisks2device.h b/src/plugins/General/udisks2/udisks2device.h deleted file mode 100644 index 4b0e9543c..000000000 --- a/src/plugins/General/udisks2/udisks2device.h +++ /dev/null @@ -1,91 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef UDISKS2DEVICE_H -#define UDISKS2DEVICE_H - -#include -#include -#include -#include -#include -#include -#include - -class QDBusInterface; - -typedef QList QByteArrayList; -Q_DECLARE_METATYPE(QByteArrayList) - -inline const QDBusArgument &operator>>(const QDBusArgument &arg, QByteArrayList &list) -{ - arg.beginArray(); - list.clear(); - - while (!arg.atEnd()) - { - QByteArray element; - arg >> element; - list.append( element ); - } - arg.endArray(); - return arg; -} - -inline QDBusArgument &operator<<(QDBusArgument &arg, const QByteArrayList &list) -{ - arg.beginArray(qMetaTypeId()); - for (int i = 0; i < list.count(); ++i) - arg << list[i]; - arg.endArray(); - return arg; -} - - -/** - @author Ilya Kotov -*/ -class UDisks2Device : public QObject -{ - Q_OBJECT -public: - UDisks2Device(QDBusObjectPath o, QObject *parent = nullptr); - - ~UDisks2Device(); - - QVariant property(const QString &key) const; - bool isRemovable() const; - bool isMediaRemovable() const; - bool isAudio() const; - bool isMounted() const; - bool isOptical() const; - QStringList mountPoints() const; - QString deviceFile() const; - QDBusObjectPath objectPath() const; - -signals: - void changed(); - -private: - QDBusInterface *m_block_interface; - QDBusInterface *m_drive_interface; - QDBusObjectPath m_path; -}; - -#endif diff --git a/src/plugins/General/udisks2/udisks2factory.cpp b/src/plugins/General/udisks2/udisks2factory.cpp deleted file mode 100644 index 721ff275f..000000000 --- a/src/plugins/General/udisks2/udisks2factory.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include -#include -#include "settingsdialog.h" -#include "udisks2plugin.h" -#include "udisks2factory.h" - -GeneralProperties UDisks2Factory::properties() const -{ - GeneralProperties properties; - properties.name = tr("UDisks2 Plugin"); - properties.shortName = "udisks2"; - properties.hasAbout = true; - properties.hasSettings = true; - properties.visibilityControl = false; - return properties; -} - -QObject *UDisks2Factory::create(QObject *parent) -{ - return new UDisks2Plugin(parent); -} - -QDialog *UDisks2Factory::createConfigDialog(QWidget *parent) -{ - return new SettingsDialog(parent); -} - -void UDisks2Factory::showAbout(QWidget *parent) -{ - QMessageBox::about (parent, tr("About UDisks2 Plugin"), - tr("Qmmp UDisks2 Plugin") + "\n" + - tr("This plugin provides removable devices detection using UDisks2") + "\n" + - tr("Written by: Ilya Kotov ")); -} - -QString UDisks2Factory::translation() const -{ - return QLatin1String(":/udisks2_plugin_"); -} diff --git a/src/plugins/General/udisks2/udisks2factory.h b/src/plugins/General/udisks2/udisks2factory.h deleted file mode 100644 index fecfa6268..000000000 --- a/src/plugins/General/udisks2/udisks2factory.h +++ /dev/null @@ -1,44 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef UDISKS2FACTORY_H -#define UDISKS2FACTORY_H - -/** - @author Ilya Kotov -*/ -#include - -#include -#include - -class UDisks2Factory : public QObject, public GeneralFactory -{ -Q_OBJECT -Q_PLUGIN_METADATA(IID "org.qmmp.qmmpui.GeneralFactoryInterface.1.0") -Q_INTERFACES(GeneralFactory) -public: - GeneralProperties properties() const override; - QObject *create(QObject *parent) override; - QDialog *createConfigDialog(QWidget *parent) override; - void showAbout(QWidget *parent) override; - QString translation() const override; -}; - -#endif diff --git a/src/plugins/General/udisks2/udisks2manager.cpp b/src/plugins/General/udisks2/udisks2manager.cpp deleted file mode 100644 index 4bcbc275c..000000000 --- a/src/plugins/General/udisks2/udisks2manager.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include "udisks2manager.h" - -UDisks2Manager::UDisks2Manager(QObject *parent) - : QObject(parent) -{ - m_interface = new QDBusInterface("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", - "org.freedesktop.DBus.ObjectManager", - QDBusConnection::systemBus(), this); - - m_interface->connection().connect("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", - "org.freedesktop.DBus.ObjectManager", "InterfacesAdded", - this, SLOT(onInterfacesAdded(QDBusObjectPath,QVariantMapMap))); - - m_interface->connection().connect("org.freedesktop.UDisks2", "/org/freedesktop/UDisks2", - "org.freedesktop.DBus.ObjectManager", "InterfacesRemoved", - this, SIGNAL(onInterfacesRemoved(QDBusObjectPath, QStringList))); -} - - -UDisks2Manager::~UDisks2Manager() -{ -} - -QList UDisks2Manager::findAllDevices() -{ - QList paths; - QDBusMessage call = QDBusMessage::createMethodCall("org.freedesktop.UDisks2", - "/org/freedesktop/UDisks2/block_devices", - "org.freedesktop.DBus.Introspectable", - "Introspect"); - QDBusPendingReply reply = QDBusConnection::systemBus().call(call); - - - if (!reply.isValid()) - { - qWarning("UDisks2Manager: error: %s", qPrintable(reply.error().name())); - return paths; - } - QXmlStreamReader xml(reply.value()); - while (!xml.atEnd()) - { - xml.readNext(); - if (xml.tokenType() == QXmlStreamReader::StartElement && xml.name().toString() == "node" ) - { - QString name = xml.attributes().value("name").toString(); - if(!name.isEmpty()) - paths << QDBusObjectPath("/org/freedesktop/UDisks2/block_devices/" + name); - } - } - return paths; -} - -void UDisks2Manager::onInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &) -{ - if(object_path.path().startsWith("/org/freedesktop/UDisks2/jobs")) - return; - emit deviceAdded(object_path); -} - -void UDisks2Manager::onInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &) -{ - if(object_path.path().startsWith("/org/freedesktop/UDisks2/jobs")) - return; - emit deviceRemoved(object_path); -} diff --git a/src/plugins/General/udisks2/udisks2manager.h b/src/plugins/General/udisks2/udisks2manager.h deleted file mode 100644 index 2b4e705fe..000000000 --- a/src/plugins/General/udisks2/udisks2manager.h +++ /dev/null @@ -1,59 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef UDISKS2MANAGER_H -#define UDISKS2MANAGER_H - -#include -#include -#include -#include - -class QDBusInterface; - -typedef QMap QVariantMapMap; -Q_DECLARE_METATYPE(QVariantMapMap) - -/** - @author Ilya Kotov -*/ -class UDisks2Manager : public QObject -{ -Q_OBJECT -public: - UDisks2Manager(QObject *parent = nullptr); - - ~UDisks2Manager(); - - QList findAllDevices(); - -signals: - void deviceAdded(QDBusObjectPath); - void deviceRemoved(QDBusObjectPath); - -private slots: - void onInterfacesAdded(const QDBusObjectPath &object_path, const QVariantMapMap &); - void onInterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &); - -private: - QDBusInterface *m_interface; - -}; - -#endif diff --git a/src/plugins/General/udisks2/udisks2plugin.cpp b/src/plugins/General/udisks2/udisks2plugin.cpp deleted file mode 100644 index d83c8cd04..000000000 --- a/src/plugins/General/udisks2/udisks2plugin.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013-2021 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "udisks2device.h" -#include "udisks2manager.h" -#include "udisks2plugin.h" - -UDisks2Plugin::UDisks2Plugin(QObject *parent) : QObject(parent) -{ - qDBusRegisterMetaType(); - qDBusRegisterMetaType(); - - m_manager = new UDisks2Manager(this); - m_actions = new QActionGroup(this); - connect(m_manager,SIGNAL(deviceAdded(QDBusObjectPath)), SLOT(addDevice(QDBusObjectPath))); - connect(m_manager,SIGNAL(deviceRemoved(QDBusObjectPath)), SLOT(removeDevice(QDBusObjectPath))); - connect(m_actions,SIGNAL(triggered (QAction *)), SLOT(processAction(QAction *))); - //load settings - QSettings settings(Qmmp::configFile(), QSettings::IniFormat); - settings.beginGroup("UDisks2"); - m_detectCDA = settings.value("cda", true).toBool(); - m_detectRemovable = settings.value("removable", true).toBool(); - m_addTracks = false; //do not load tracks on startup - m_addFiles = false; - //find existing devices - const QList devs = m_manager->findAllDevices(); - for(const QDBusObjectPath &o : qAsConst(devs)) - addDevice(o); - //load remaining settings - m_addTracks = settings.value("add_tracks", false).toBool(); - m_removeTracks = settings.value("remove_tracks", false).toBool(); - m_addFiles = settings.value("add_files", false).toBool(); - m_removeFiles = settings.value("remove_files", false).toBool(); - settings.endGroup(); -} - -UDisks2Plugin::~UDisks2Plugin() -{ -} - -void UDisks2Plugin::removeDevice(QDBusObjectPath o) -{ - QList::iterator it = m_devices.begin(); - while(it != m_devices.end()) - { - if((*it)->objectPath() == o) - { - delete (*it); - it = m_devices.erase(it); - qDebug("UDisks2Plugin: removed device: \"%s\"", qPrintable(o.path())); - updateActions(); - break; - } - else - { - ++it; - } - } -} - -void UDisks2Plugin::addDevice(QDBusObjectPath o) -{ - for(const UDisks2Device *device : qAsConst(m_devices)) //is it already exists? - { - if (device->objectPath() == o) - return; - } - UDisks2Device *device = new UDisks2Device(o, this); - - if(device->isRemovable()) //detect removable devices only - { - qDebug("UDisks2Plugin: added device: \"%s\"", qPrintable(o.path())); - m_devices << device; - updateActions(); - connect(device, SIGNAL(changed()), SLOT(updateActions())); - } - else - delete device; -} - -void UDisks2Plugin::updateActions() -{ - // add action for cd audio or mounted volume - for(const UDisks2Device *device : qAsConst(m_devices)) - { - QString dev_path; - if (m_detectCDA && device->isAudio()) //cd audio - { - dev_path = "cdda://" + device->deviceFile(); - } - else if (m_detectRemovable && device->isMounted() && - device->property("Size").toLongLong() < 40000000000LL && - (device->property("IdType").toString() == "vfat" || - device->property("IdType").toString() == "iso9660" || - device->property("IdType").toString() == "udf" || - device->property("IdType").toString() == "ext2")) //mounted volume - { - dev_path = device->mountPoints().first(); - } - else - continue; - - if (!findAction(dev_path)) - { - QAction *action = new QAction(this); - QString actionText; - if (device->isAudio()) - { - actionText = QString(tr("Add CD \"%1\"")).arg(device->deviceFile()); - } - else - { - QString name = device->property("IdLabel").toString(); - if (name.isEmpty()) - name = dev_path; - - actionText = QString(tr("Add Volume \"%1\"")).arg(name); - } - - if (device->isOptical()) - { - if(device->property("IdType").toString() == "iso9660") - action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveDVDIcon)); - else - action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveCDIcon)); - } - else - action->setIcon(qApp->style()->standardIcon(QStyle::SP_DriveHDIcon)); - - qDebug("UDisks2Plugin: added menu item: \"%s\"", qPrintable(dev_path)); - - action->setText(actionText); - action->setData(dev_path); - m_actions->addAction(action); - UiHelper::instance()->addAction(action, UiHelper::ADD_MENU); - addPath(dev_path); - } - } - // remove action if device is unmounted/removed - for(QAction *action : m_actions->actions()) - { - if (!findDevice(action)) - { - qDebug("UDisks2Plugin: removed menu item: \"%s\"", qPrintable(action->data().toString())); - m_actions->removeAction(action); - UiHelper::instance()->removeAction(action); - removePath(action->data().toString()); - action->deleteLater(); - } - } -} - -void UDisks2Plugin::processAction(QAction *action) -{ - qDebug("UDisks2Plugin: action triggered: %s", qPrintable(action->data().toString())); - QString path = action->data().toString(); - PlayListManager::instance()->selectedPlayList()->add(path); -} - -QAction *UDisks2Plugin::findAction(const QString &dev_path) -{ - for(QAction *action : m_actions->actions()) - { - if (action->data().toString() == dev_path) - return action; - } - return nullptr; -} - -UDisks2Device *UDisks2Plugin::findDevice(QAction *action) -{ - for(UDisks2Device *device : qAsConst(m_devices)) - { - QString dev_path; - if (device->isAudio()) - { - dev_path = "cdda://" + device->deviceFile(); - if (dev_path == action->data().toString()) - return device; - } - if (device->isMounted()) - { - dev_path = device->mountPoints().first(); - if (dev_path == action->data().toString()) - return device; - } - } - return nullptr; -} - -void UDisks2Plugin::addPath(const QString &path) -{ - PlayListModel *model = PlayListManager::instance()->selectedPlayList(); - - for(PlayListItem *item : model->items()) // Is it already exist? - { - if(item->isGroup()) - continue; - if (dynamic_cast(item)->path().startsWith(path)) - return; - } - - if (path.startsWith("cdda://") && m_addTracks) - { - PlayListManager::instance()->selectedPlayList()->add(path); - return; - } - else if (!path.startsWith("cdda://") && m_addFiles) - PlayListManager::instance()->selectedPlayList()->add(path); -} - -void UDisks2Plugin::removePath(const QString &path) -{ - if ((path.startsWith("cdda://") && !m_removeTracks) || - (!path.startsWith("cdda://") && !m_removeFiles)) //process settings - return; - - PlayListModel *model = PlayListManager::instance()->selectedPlayList(); - - int i = 0; - while (model->count() > 0 && i < model->count()) - { - if (model->isTrack(i) && model->track(i)->path().startsWith(path)) - model->removeTrack(i); - else - ++i; - } -} diff --git a/src/plugins/General/udisks2/udisks2plugin.h b/src/plugins/General/udisks2/udisks2plugin.h deleted file mode 100644 index a5d428220..000000000 --- a/src/plugins/General/udisks2/udisks2plugin.h +++ /dev/null @@ -1,65 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Ilya Kotov * - * forkotov02@ya.ru * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef UDISKS2PLUGIN_H -#define UDISKS2PLUGIN_H - -#include -#include - -class UDisks2Manager; -class UDisks2Device; -class QActionGroup; -class QAction; - -/** - @author Ilya Kotov -*/ - -class UDisks2Plugin : public QObject -{ -Q_OBJECT -public: - UDisks2Plugin(QObject *parent = nullptr); - - ~UDisks2Plugin(); - -private slots: - void removeDevice(QDBusObjectPath); - void addDevice(QDBusObjectPath); - void processAction(QAction *action); - void updateActions(); - -private: - QAction *findAction(const QString &dev_path); - UDisks2Device *findDevice(QAction *action); - void addPath(const QString &path); - void removePath(const QString &path); - UDisks2Manager *m_manager; - QList m_devices; - QActionGroup *m_actions; - bool m_detectCDA; - bool m_addTracks; - bool m_removeTracks; - bool m_detectRemovable; - bool m_addFiles; - bool m_removeFiles; -}; - -#endif //UDISKS2PLUGIN_H -- cgit v1.2.3-13-gbd6f