diff options
38 files changed, 3036 insertions, 985 deletions
diff --git a/port-files/FreeBSD/Makefile b/port-files/FreeBSD/Makefile index dc444c31..9b86ada1 100644 --- a/port-files/FreeBSD/Makefile +++ b/port-files/FreeBSD/Makefile @@ -25,10 +25,11 @@ LIB_DEPENDS+= libxcb-ewmh.so:x11/xcb-util-wm \ CONFLICTS= lumina-devel-0* -OPTIONS_DEFINE= MULTIMEDIA TRUEOS -OPTIONS_DEFAULT= MULTIMEDIA +OPTIONS_DEFINE= MULTIMEDIA TRUEOS I18N +OPTIONS_DEFAULT= MULTIMEDIA I18N MULTIMEDIA_DESC= Install multimedia support backend (gstreamer) TRUEOS_DESC= Use the TrueOS system interface settings. +I18N_DESC= Install localization files .include <bsd.port.options.mk> @@ -53,4 +54,9 @@ GH_TAGNAME= %%GHTAG%% QMAKE_ARGS= DEFAULT_SETTINGS=TrueOS .endif +.if${PORT_OPTIONS:MI18N} +USE_QT5+= linguist_build +QMAKE_ARGS+=CONFIG+=WITH_I18N +.endif + .include <bsd.port.mk> diff --git a/port-files/FreeBSD/pkg-plist b/port-files/FreeBSD/pkg-plist index 89368d97..cc07c2e3 100644 --- a/port-files/FreeBSD/pkg-plist +++ b/port-files/FreeBSD/pkg-plist @@ -1,26 +1,26 @@ -bin/start-lumina-desktop -bin/lumina-desktop -bin/lumina-open +bin/lte bin/lumina-config +bin/lumina-desktop +bin/lumina-fileinfo bin/lumina-fm +bin/lumina-info +bin/lumina-open bin/lumina-screenshot bin/lumina-search -bin/lumina-info -bin/lumina-xconfig -bin/lumina-fileinfo bin/lumina-textedit -bin/lte -etc/luminaDesktop.conf.dist -lib/libLuminaUtils.so -lib/libLuminaUtils.so.1 -lib/libLuminaUtils.so.1.0 -lib/libLuminaUtils.so.1.0.0 -include/LuminaXDG.h -include/LuminaUtils.h -include/LuminaX11.h -include/LuminaThemes.h +bin/lumina-xconfig +bin/start-lumina-desktop +%%ETCDIR%%Desktop.conf.dist include/LuminaOS.h include/LuminaSingleApplication.h +include/LuminaThemes.h +include/LuminaUtils.h +include/LuminaX11.h +include/LuminaXDG.h +%%QT_LIBDIR%%/%%QT_LIBDIR%%LuminaUtils.so +%%QT_LIBDIR%%/%%QT_LIBDIR%%LuminaUtils.so.1 +%%QT_LIBDIR%%/%%QT_LIBDIR%%LuminaUtils.so.1.0 +%%QT_LIBDIR%%/%%QT_LIBDIR%%LuminaUtils.so.1.0.0 share/applications/lumina-config.desktop share/applications/lumina-fileinfo.desktop share/applications/lumina-fm.desktop @@ -30,37 +30,693 @@ share/applications/lumina-search.desktop share/applications/lumina-support.desktop share/applications/lumina-textedit.desktop share/applications/lumina-xconfig.desktop -share/pixmaps/Lumina-DE.png +%%DATADIR%%-desktop/Login.ogg +%%DATADIR%%-desktop/Logout.ogg +%%DATADIR%%-desktop/colors/Black.qss.colors +%%DATADIR%%-desktop/colors/Blue-Light.qss.colors +%%DATADIR%%-desktop/colors/Grey-Dark.qss.colors +%%DATADIR%%-desktop/colors/Lumina-Glass.qss.colors +%%DATADIR%%-desktop/colors/Lumina-Gold.qss.colors +%%DATADIR%%-desktop/colors/Lumina-Green.qss.colors +%%DATADIR%%-desktop/colors/Lumina-Purple.qss.colors +%%DATADIR%%-desktop/colors/Lumina-Red.qss.colors +%%DATADIR%%-desktop/colors/PCBSD10-Default.qss.colors +%%DATADIR%%-desktop/colors/Solarized-Dark.qss.colors +%%DATADIR%%-desktop/colors/Solarized-Light.qss.colors +%%DATADIR%%-desktop/compton.conf +%%DATADIR%%-desktop/desktop-background.jpg +%%DATADIR%%-desktop/fluxbox-init-rc +%%DATADIR%%-desktop/fluxbox-keys +%%DATADIR%%-desktop/globs2 +%%DATADIR%%-desktop/i18n/l-fileinfo_af.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ar.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_az.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_bg.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_bn.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_bs.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ca.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_cs.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_cy.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_da.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_de.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_el.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_en_GB.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_en_ZA.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_es.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_et.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_eu.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_fa.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_fi.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_fr.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_fr_CA.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_fur.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_gl.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_he.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_hi.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_hr.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_hu.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_id.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_is.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_it.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ja.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ka.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ko.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_lt.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_lv.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_mk.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_mn.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ms.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_mt.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_nb.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ne.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_nl.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_pa.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_pl.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_pt.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_pt_BR.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ro.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ru.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sa.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sk.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sl.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sr.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sv.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_sw.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ta.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_tg.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_th.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_tr.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_uk.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_ur.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_uz.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_vi.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_zh_CN.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_zh_HK.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_zh_TW.qm +%%DATADIR%%-desktop/i18n/l-fileinfo_zu.qm +%%DATADIR%%-desktop/i18n/l-screenshot_af.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ar.qm +%%DATADIR%%-desktop/i18n/l-screenshot_az.qm +%%DATADIR%%-desktop/i18n/l-screenshot_bg.qm +%%DATADIR%%-desktop/i18n/l-screenshot_bn.qm +%%DATADIR%%-desktop/i18n/l-screenshot_bs.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ca.qm +%%DATADIR%%-desktop/i18n/l-screenshot_cs.qm +%%DATADIR%%-desktop/i18n/l-screenshot_cy.qm +%%DATADIR%%-desktop/i18n/l-screenshot_da.qm +%%DATADIR%%-desktop/i18n/l-screenshot_de.qm +%%DATADIR%%-desktop/i18n/l-screenshot_el.qm +%%DATADIR%%-desktop/i18n/l-screenshot_en_GB.qm +%%DATADIR%%-desktop/i18n/l-screenshot_en_ZA.qm +%%DATADIR%%-desktop/i18n/l-screenshot_es.qm +%%DATADIR%%-desktop/i18n/l-screenshot_et.qm +%%DATADIR%%-desktop/i18n/l-screenshot_eu.qm +%%DATADIR%%-desktop/i18n/l-screenshot_fa.qm +%%DATADIR%%-desktop/i18n/l-screenshot_fi.qm +%%DATADIR%%-desktop/i18n/l-screenshot_fr.qm +%%DATADIR%%-desktop/i18n/l-screenshot_fr_CA.qm +%%DATADIR%%-desktop/i18n/l-screenshot_fur.qm +%%DATADIR%%-desktop/i18n/l-screenshot_gl.qm +%%DATADIR%%-desktop/i18n/l-screenshot_he.qm +%%DATADIR%%-desktop/i18n/l-screenshot_hi.qm +%%DATADIR%%-desktop/i18n/l-screenshot_hr.qm +%%DATADIR%%-desktop/i18n/l-screenshot_hu.qm +%%DATADIR%%-desktop/i18n/l-screenshot_id.qm +%%DATADIR%%-desktop/i18n/l-screenshot_is.qm +%%DATADIR%%-desktop/i18n/l-screenshot_it.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ja.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ka.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ko.qm +%%DATADIR%%-desktop/i18n/l-screenshot_lt.qm +%%DATADIR%%-desktop/i18n/l-screenshot_lv.qm +%%DATADIR%%-desktop/i18n/l-screenshot_mk.qm +%%DATADIR%%-desktop/i18n/l-screenshot_mn.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ms.qm +%%DATADIR%%-desktop/i18n/l-screenshot_mt.qm +%%DATADIR%%-desktop/i18n/l-screenshot_nb.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ne.qm +%%DATADIR%%-desktop/i18n/l-screenshot_nl.qm +%%DATADIR%%-desktop/i18n/l-screenshot_pa.qm +%%DATADIR%%-desktop/i18n/l-screenshot_pl.qm +%%DATADIR%%-desktop/i18n/l-screenshot_pt.qm +%%DATADIR%%-desktop/i18n/l-screenshot_pt_BR.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ro.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ru.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sa.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sk.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sl.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sr.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sv.qm +%%DATADIR%%-desktop/i18n/l-screenshot_sw.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ta.qm +%%DATADIR%%-desktop/i18n/l-screenshot_tg.qm +%%DATADIR%%-desktop/i18n/l-screenshot_th.qm +%%DATADIR%%-desktop/i18n/l-screenshot_tr.qm +%%DATADIR%%-desktop/i18n/l-screenshot_uk.qm +%%DATADIR%%-desktop/i18n/l-screenshot_ur.qm +%%DATADIR%%-desktop/i18n/l-screenshot_uz.qm +%%DATADIR%%-desktop/i18n/l-screenshot_vi.qm +%%DATADIR%%-desktop/i18n/l-screenshot_zh_CN.qm +%%DATADIR%%-desktop/i18n/l-screenshot_zh_HK.qm +%%DATADIR%%-desktop/i18n/l-screenshot_zh_TW.qm +%%DATADIR%%-desktop/i18n/l-screenshot_zu.qm +%%DATADIR%%-desktop/i18n/l-te_af.qm +%%DATADIR%%-desktop/i18n/l-te_ar.qm +%%DATADIR%%-desktop/i18n/l-te_az.qm +%%DATADIR%%-desktop/i18n/l-te_bg.qm +%%DATADIR%%-desktop/i18n/l-te_bn.qm +%%DATADIR%%-desktop/i18n/l-te_bs.qm +%%DATADIR%%-desktop/i18n/l-te_ca.qm +%%DATADIR%%-desktop/i18n/l-te_cs.qm +%%DATADIR%%-desktop/i18n/l-te_cy.qm +%%DATADIR%%-desktop/i18n/l-te_da.qm +%%DATADIR%%-desktop/i18n/l-te_de.qm +%%DATADIR%%-desktop/i18n/l-te_el.qm +%%DATADIR%%-desktop/i18n/l-te_en_GB.qm +%%DATADIR%%-desktop/i18n/l-te_en_ZA.qm +%%DATADIR%%-desktop/i18n/l-te_es.qm +%%DATADIR%%-desktop/i18n/l-te_et.qm +%%DATADIR%%-desktop/i18n/l-te_eu.qm +%%DATADIR%%-desktop/i18n/l-te_fa.qm +%%DATADIR%%-desktop/i18n/l-te_fi.qm +%%DATADIR%%-desktop/i18n/l-te_fr.qm +%%DATADIR%%-desktop/i18n/l-te_fr_CA.qm +%%DATADIR%%-desktop/i18n/l-te_gl.qm +%%DATADIR%%-desktop/i18n/l-te_he.qm +%%DATADIR%%-desktop/i18n/l-te_hi.qm +%%DATADIR%%-desktop/i18n/l-te_hr.qm +%%DATADIR%%-desktop/i18n/l-te_hu.qm +%%DATADIR%%-desktop/i18n/l-te_id.qm +%%DATADIR%%-desktop/i18n/l-te_is.qm +%%DATADIR%%-desktop/i18n/l-te_it.qm +%%DATADIR%%-desktop/i18n/l-te_ja.qm +%%DATADIR%%-desktop/i18n/l-te_ka.qm +%%DATADIR%%-desktop/i18n/l-te_ko.qm +%%DATADIR%%-desktop/i18n/l-te_lt.qm +%%DATADIR%%-desktop/i18n/l-te_lv.qm +%%DATADIR%%-desktop/i18n/l-te_mk.qm +%%DATADIR%%-desktop/i18n/l-te_mn.qm +%%DATADIR%%-desktop/i18n/l-te_ms.qm +%%DATADIR%%-desktop/i18n/l-te_mt.qm +%%DATADIR%%-desktop/i18n/l-te_nb.qm +%%DATADIR%%-desktop/i18n/l-te_nl.qm +%%DATADIR%%-desktop/i18n/l-te_pa.qm +%%DATADIR%%-desktop/i18n/l-te_pl.qm +%%DATADIR%%-desktop/i18n/l-te_pt.qm +%%DATADIR%%-desktop/i18n/l-te_pt_BR.qm +%%DATADIR%%-desktop/i18n/l-te_ro.qm +%%DATADIR%%-desktop/i18n/l-te_ru.qm +%%DATADIR%%-desktop/i18n/l-te_sk.qm +%%DATADIR%%-desktop/i18n/l-te_sl.qm +%%DATADIR%%-desktop/i18n/l-te_sr.qm +%%DATADIR%%-desktop/i18n/l-te_sv.qm +%%DATADIR%%-desktop/i18n/l-te_sw.qm +%%DATADIR%%-desktop/i18n/l-te_ta.qm +%%DATADIR%%-desktop/i18n/l-te_tg.qm +%%DATADIR%%-desktop/i18n/l-te_th.qm +%%DATADIR%%-desktop/i18n/l-te_tr.qm +%%DATADIR%%-desktop/i18n/l-te_uk.qm +%%DATADIR%%-desktop/i18n/l-te_uz.qm +%%DATADIR%%-desktop/i18n/l-te_vi.qm +%%DATADIR%%-desktop/i18n/l-te_zh_CN.qm +%%DATADIR%%-desktop/i18n/l-te_zh_HK.qm +%%DATADIR%%-desktop/i18n/l-te_zh_TW.qm +%%DATADIR%%-desktop/i18n/l-te_zu.qm +%%DATADIR%%-desktop/i18n/lumina-config_af.qm +%%DATADIR%%-desktop/i18n/lumina-config_ar.qm +%%DATADIR%%-desktop/i18n/lumina-config_az.qm +%%DATADIR%%-desktop/i18n/lumina-config_bg.qm +%%DATADIR%%-desktop/i18n/lumina-config_bn.qm +%%DATADIR%%-desktop/i18n/lumina-config_bs.qm +%%DATADIR%%-desktop/i18n/lumina-config_ca.qm +%%DATADIR%%-desktop/i18n/lumina-config_cs.qm +%%DATADIR%%-desktop/i18n/lumina-config_cy.qm +%%DATADIR%%-desktop/i18n/lumina-config_da.qm +%%DATADIR%%-desktop/i18n/lumina-config_de.qm +%%DATADIR%%-desktop/i18n/lumina-config_el.qm +%%DATADIR%%-desktop/i18n/lumina-config_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-config_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-config_es.qm +%%DATADIR%%-desktop/i18n/lumina-config_et.qm +%%DATADIR%%-desktop/i18n/lumina-config_eu.qm +%%DATADIR%%-desktop/i18n/lumina-config_fa.qm +%%DATADIR%%-desktop/i18n/lumina-config_fi.qm +%%DATADIR%%-desktop/i18n/lumina-config_fr.qm +%%DATADIR%%-desktop/i18n/lumina-config_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-config_fur.qm +%%DATADIR%%-desktop/i18n/lumina-config_gl.qm +%%DATADIR%%-desktop/i18n/lumina-config_he.qm +%%DATADIR%%-desktop/i18n/lumina-config_hi.qm +%%DATADIR%%-desktop/i18n/lumina-config_hr.qm +%%DATADIR%%-desktop/i18n/lumina-config_hu.qm +%%DATADIR%%-desktop/i18n/lumina-config_id.qm +%%DATADIR%%-desktop/i18n/lumina-config_is.qm +%%DATADIR%%-desktop/i18n/lumina-config_it.qm +%%DATADIR%%-desktop/i18n/lumina-config_ja.qm +%%DATADIR%%-desktop/i18n/lumina-config_ka.qm +%%DATADIR%%-desktop/i18n/lumina-config_ko.qm +%%DATADIR%%-desktop/i18n/lumina-config_lt.qm +%%DATADIR%%-desktop/i18n/lumina-config_lv.qm +%%DATADIR%%-desktop/i18n/lumina-config_mk.qm +%%DATADIR%%-desktop/i18n/lumina-config_mn.qm +%%DATADIR%%-desktop/i18n/lumina-config_ms.qm +%%DATADIR%%-desktop/i18n/lumina-config_mt.qm +%%DATADIR%%-desktop/i18n/lumina-config_nb.qm +%%DATADIR%%-desktop/i18n/lumina-config_ne.qm +%%DATADIR%%-desktop/i18n/lumina-config_nl.qm +%%DATADIR%%-desktop/i18n/lumina-config_pa.qm +%%DATADIR%%-desktop/i18n/lumina-config_pl.qm +%%DATADIR%%-desktop/i18n/lumina-config_pt.qm +%%DATADIR%%-desktop/i18n/lumina-config_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-config_ro.qm +%%DATADIR%%-desktop/i18n/lumina-config_ru.qm +%%DATADIR%%-desktop/i18n/lumina-config_sa.qm +%%DATADIR%%-desktop/i18n/lumina-config_sk.qm +%%DATADIR%%-desktop/i18n/lumina-config_sl.qm +%%DATADIR%%-desktop/i18n/lumina-config_sr.qm +%%DATADIR%%-desktop/i18n/lumina-config_sv.qm +%%DATADIR%%-desktop/i18n/lumina-config_sw.qm +%%DATADIR%%-desktop/i18n/lumina-config_ta.qm +%%DATADIR%%-desktop/i18n/lumina-config_tg.qm +%%DATADIR%%-desktop/i18n/lumina-config_th.qm +%%DATADIR%%-desktop/i18n/lumina-config_tr.qm +%%DATADIR%%-desktop/i18n/lumina-config_uk.qm +%%DATADIR%%-desktop/i18n/lumina-config_ur.qm +%%DATADIR%%-desktop/i18n/lumina-config_uz.qm +%%DATADIR%%-desktop/i18n/lumina-config_vi.qm +%%DATADIR%%-desktop/i18n/lumina-config_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-config_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-config_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-config_zu.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_af.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ar.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_az.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_bg.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_bn.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_bs.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ca.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_cs.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_cy.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_da.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_de.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_el.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_es.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_et.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_eu.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_fa.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_fi.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_fr.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_fur.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_gl.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_he.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_hi.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_hr.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_hu.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_id.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_is.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_it.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ja.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ka.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ko.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_lt.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_lv.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_mk.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_mn.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ms.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_mt.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_nb.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ne.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_nl.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_pa.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_pl.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_pt.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ro.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ru.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sa.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sk.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sl.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sr.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sv.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_sw.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ta.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_tg.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_th.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_tr.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_uk.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_ur.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_uz.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_vi.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-desktop_zu.qm +%%DATADIR%%-desktop/i18n/lumina-fm_af.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ar.qm +%%DATADIR%%-desktop/i18n/lumina-fm_az.qm +%%DATADIR%%-desktop/i18n/lumina-fm_bg.qm +%%DATADIR%%-desktop/i18n/lumina-fm_bn.qm +%%DATADIR%%-desktop/i18n/lumina-fm_bs.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ca.qm +%%DATADIR%%-desktop/i18n/lumina-fm_cs.qm +%%DATADIR%%-desktop/i18n/lumina-fm_cy.qm +%%DATADIR%%-desktop/i18n/lumina-fm_da.qm +%%DATADIR%%-desktop/i18n/lumina-fm_de.qm +%%DATADIR%%-desktop/i18n/lumina-fm_el.qm +%%DATADIR%%-desktop/i18n/lumina-fm_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-fm_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-fm_es.qm +%%DATADIR%%-desktop/i18n/lumina-fm_et.qm +%%DATADIR%%-desktop/i18n/lumina-fm_eu.qm +%%DATADIR%%-desktop/i18n/lumina-fm_fa.qm +%%DATADIR%%-desktop/i18n/lumina-fm_fi.qm +%%DATADIR%%-desktop/i18n/lumina-fm_fr.qm +%%DATADIR%%-desktop/i18n/lumina-fm_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-fm_fur.qm +%%DATADIR%%-desktop/i18n/lumina-fm_gl.qm +%%DATADIR%%-desktop/i18n/lumina-fm_he.qm +%%DATADIR%%-desktop/i18n/lumina-fm_hi.qm +%%DATADIR%%-desktop/i18n/lumina-fm_hr.qm +%%DATADIR%%-desktop/i18n/lumina-fm_hu.qm +%%DATADIR%%-desktop/i18n/lumina-fm_id.qm +%%DATADIR%%-desktop/i18n/lumina-fm_is.qm +%%DATADIR%%-desktop/i18n/lumina-fm_it.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ja.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ka.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ko.qm +%%DATADIR%%-desktop/i18n/lumina-fm_lt.qm +%%DATADIR%%-desktop/i18n/lumina-fm_lv.qm +%%DATADIR%%-desktop/i18n/lumina-fm_mk.qm +%%DATADIR%%-desktop/i18n/lumina-fm_mn.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ms.qm +%%DATADIR%%-desktop/i18n/lumina-fm_mt.qm +%%DATADIR%%-desktop/i18n/lumina-fm_nb.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ne.qm +%%DATADIR%%-desktop/i18n/lumina-fm_nl.qm +%%DATADIR%%-desktop/i18n/lumina-fm_pa.qm +%%DATADIR%%-desktop/i18n/lumina-fm_pl.qm +%%DATADIR%%-desktop/i18n/lumina-fm_pt.qm +%%DATADIR%%-desktop/i18n/lumina-fm_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ro.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ru.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sa.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sk.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sl.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sr.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sv.qm +%%DATADIR%%-desktop/i18n/lumina-fm_sw.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ta.qm +%%DATADIR%%-desktop/i18n/lumina-fm_tg.qm +%%DATADIR%%-desktop/i18n/lumina-fm_th.qm +%%DATADIR%%-desktop/i18n/lumina-fm_tr.qm +%%DATADIR%%-desktop/i18n/lumina-fm_uk.qm +%%DATADIR%%-desktop/i18n/lumina-fm_ur.qm +%%DATADIR%%-desktop/i18n/lumina-fm_uz.qm +%%DATADIR%%-desktop/i18n/lumina-fm_vi.qm +%%DATADIR%%-desktop/i18n/lumina-fm_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-fm_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-fm_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-fm_zu.qm +%%DATADIR%%-desktop/i18n/lumina-info_af.qm +%%DATADIR%%-desktop/i18n/lumina-info_ar.qm +%%DATADIR%%-desktop/i18n/lumina-info_az.qm +%%DATADIR%%-desktop/i18n/lumina-info_bg.qm +%%DATADIR%%-desktop/i18n/lumina-info_bn.qm +%%DATADIR%%-desktop/i18n/lumina-info_bs.qm +%%DATADIR%%-desktop/i18n/lumina-info_ca.qm +%%DATADIR%%-desktop/i18n/lumina-info_cs.qm +%%DATADIR%%-desktop/i18n/lumina-info_cy.qm +%%DATADIR%%-desktop/i18n/lumina-info_da.qm +%%DATADIR%%-desktop/i18n/lumina-info_de.qm +%%DATADIR%%-desktop/i18n/lumina-info_el.qm +%%DATADIR%%-desktop/i18n/lumina-info_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-info_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-info_es.qm +%%DATADIR%%-desktop/i18n/lumina-info_et.qm +%%DATADIR%%-desktop/i18n/lumina-info_eu.qm +%%DATADIR%%-desktop/i18n/lumina-info_fa.qm +%%DATADIR%%-desktop/i18n/lumina-info_fi.qm +%%DATADIR%%-desktop/i18n/lumina-info_fr.qm +%%DATADIR%%-desktop/i18n/lumina-info_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-info_fur.qm +%%DATADIR%%-desktop/i18n/lumina-info_gl.qm +%%DATADIR%%-desktop/i18n/lumina-info_he.qm +%%DATADIR%%-desktop/i18n/lumina-info_hi.qm +%%DATADIR%%-desktop/i18n/lumina-info_hr.qm +%%DATADIR%%-desktop/i18n/lumina-info_hu.qm +%%DATADIR%%-desktop/i18n/lumina-info_id.qm +%%DATADIR%%-desktop/i18n/lumina-info_is.qm +%%DATADIR%%-desktop/i18n/lumina-info_it.qm +%%DATADIR%%-desktop/i18n/lumina-info_ja.qm +%%DATADIR%%-desktop/i18n/lumina-info_ka.qm +%%DATADIR%%-desktop/i18n/lumina-info_ko.qm +%%DATADIR%%-desktop/i18n/lumina-info_lt.qm +%%DATADIR%%-desktop/i18n/lumina-info_lv.qm +%%DATADIR%%-desktop/i18n/lumina-info_mk.qm +%%DATADIR%%-desktop/i18n/lumina-info_mn.qm +%%DATADIR%%-desktop/i18n/lumina-info_ms.qm +%%DATADIR%%-desktop/i18n/lumina-info_mt.qm +%%DATADIR%%-desktop/i18n/lumina-info_nb.qm +%%DATADIR%%-desktop/i18n/lumina-info_ne.qm +%%DATADIR%%-desktop/i18n/lumina-info_nl.qm +%%DATADIR%%-desktop/i18n/lumina-info_pa.qm +%%DATADIR%%-desktop/i18n/lumina-info_pl.qm +%%DATADIR%%-desktop/i18n/lumina-info_pt.qm +%%DATADIR%%-desktop/i18n/lumina-info_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-info_ro.qm +%%DATADIR%%-desktop/i18n/lumina-info_ru.qm +%%DATADIR%%-desktop/i18n/lumina-info_sa.qm +%%DATADIR%%-desktop/i18n/lumina-info_sk.qm +%%DATADIR%%-desktop/i18n/lumina-info_sl.qm +%%DATADIR%%-desktop/i18n/lumina-info_sr.qm +%%DATADIR%%-desktop/i18n/lumina-info_sv.qm +%%DATADIR%%-desktop/i18n/lumina-info_sw.qm +%%DATADIR%%-desktop/i18n/lumina-info_ta.qm +%%DATADIR%%-desktop/i18n/lumina-info_tg.qm +%%DATADIR%%-desktop/i18n/lumina-info_th.qm +%%DATADIR%%-desktop/i18n/lumina-info_tr.qm +%%DATADIR%%-desktop/i18n/lumina-info_uk.qm +%%DATADIR%%-desktop/i18n/lumina-info_ur.qm +%%DATADIR%%-desktop/i18n/lumina-info_uz.qm +%%DATADIR%%-desktop/i18n/lumina-info_vi.qm +%%DATADIR%%-desktop/i18n/lumina-info_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-info_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-info_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-info_zu.qm +%%DATADIR%%-desktop/i18n/lumina-open_af.qm +%%DATADIR%%-desktop/i18n/lumina-open_ar.qm +%%DATADIR%%-desktop/i18n/lumina-open_az.qm +%%DATADIR%%-desktop/i18n/lumina-open_bg.qm +%%DATADIR%%-desktop/i18n/lumina-open_bn.qm +%%DATADIR%%-desktop/i18n/lumina-open_bs.qm +%%DATADIR%%-desktop/i18n/lumina-open_ca.qm +%%DATADIR%%-desktop/i18n/lumina-open_cs.qm +%%DATADIR%%-desktop/i18n/lumina-open_cy.qm +%%DATADIR%%-desktop/i18n/lumina-open_da.qm +%%DATADIR%%-desktop/i18n/lumina-open_de.qm +%%DATADIR%%-desktop/i18n/lumina-open_el.qm +%%DATADIR%%-desktop/i18n/lumina-open_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-open_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-open_es.qm +%%DATADIR%%-desktop/i18n/lumina-open_et.qm +%%DATADIR%%-desktop/i18n/lumina-open_eu.qm +%%DATADIR%%-desktop/i18n/lumina-open_fa.qm +%%DATADIR%%-desktop/i18n/lumina-open_fi.qm +%%DATADIR%%-desktop/i18n/lumina-open_fr.qm +%%DATADIR%%-desktop/i18n/lumina-open_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-open_fur.qm +%%DATADIR%%-desktop/i18n/lumina-open_gl.qm +%%DATADIR%%-desktop/i18n/lumina-open_he.qm +%%DATADIR%%-desktop/i18n/lumina-open_hi.qm +%%DATADIR%%-desktop/i18n/lumina-open_hr.qm +%%DATADIR%%-desktop/i18n/lumina-open_hu.qm +%%DATADIR%%-desktop/i18n/lumina-open_id.qm +%%DATADIR%%-desktop/i18n/lumina-open_is.qm +%%DATADIR%%-desktop/i18n/lumina-open_it.qm +%%DATADIR%%-desktop/i18n/lumina-open_ja.qm +%%DATADIR%%-desktop/i18n/lumina-open_ka.qm +%%DATADIR%%-desktop/i18n/lumina-open_ko.qm +%%DATADIR%%-desktop/i18n/lumina-open_lt.qm +%%DATADIR%%-desktop/i18n/lumina-open_lv.qm +%%DATADIR%%-desktop/i18n/lumina-open_mk.qm +%%DATADIR%%-desktop/i18n/lumina-open_mn.qm +%%DATADIR%%-desktop/i18n/lumina-open_ms.qm +%%DATADIR%%-desktop/i18n/lumina-open_mt.qm +%%DATADIR%%-desktop/i18n/lumina-open_nb.qm +%%DATADIR%%-desktop/i18n/lumina-open_ne.qm +%%DATADIR%%-desktop/i18n/lumina-open_nl.qm +%%DATADIR%%-desktop/i18n/lumina-open_pa.qm +%%DATADIR%%-desktop/i18n/lumina-open_pl.qm +%%DATADIR%%-desktop/i18n/lumina-open_pt.qm +%%DATADIR%%-desktop/i18n/lumina-open_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-open_ro.qm +%%DATADIR%%-desktop/i18n/lumina-open_ru.qm +%%DATADIR%%-desktop/i18n/lumina-open_sa.qm +%%DATADIR%%-desktop/i18n/lumina-open_sk.qm +%%DATADIR%%-desktop/i18n/lumina-open_sl.qm +%%DATADIR%%-desktop/i18n/lumina-open_sr.qm +%%DATADIR%%-desktop/i18n/lumina-open_sv.qm +%%DATADIR%%-desktop/i18n/lumina-open_sw.qm +%%DATADIR%%-desktop/i18n/lumina-open_ta.qm +%%DATADIR%%-desktop/i18n/lumina-open_tg.qm +%%DATADIR%%-desktop/i18n/lumina-open_th.qm +%%DATADIR%%-desktop/i18n/lumina-open_tr.qm +%%DATADIR%%-desktop/i18n/lumina-open_uk.qm +%%DATADIR%%-desktop/i18n/lumina-open_ur.qm +%%DATADIR%%-desktop/i18n/lumina-open_uz.qm +%%DATADIR%%-desktop/i18n/lumina-open_vi.qm +%%DATADIR%%-desktop/i18n/lumina-open_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-open_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-open_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-open_zu.qm +%%DATADIR%%-desktop/i18n/lumina-search_af.qm +%%DATADIR%%-desktop/i18n/lumina-search_ar.qm +%%DATADIR%%-desktop/i18n/lumina-search_az.qm +%%DATADIR%%-desktop/i18n/lumina-search_bg.qm +%%DATADIR%%-desktop/i18n/lumina-search_bn.qm +%%DATADIR%%-desktop/i18n/lumina-search_bs.qm +%%DATADIR%%-desktop/i18n/lumina-search_ca.qm +%%DATADIR%%-desktop/i18n/lumina-search_cs.qm +%%DATADIR%%-desktop/i18n/lumina-search_cy.qm +%%DATADIR%%-desktop/i18n/lumina-search_da.qm +%%DATADIR%%-desktop/i18n/lumina-search_de.qm +%%DATADIR%%-desktop/i18n/lumina-search_el.qm +%%DATADIR%%-desktop/i18n/lumina-search_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-search_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-search_es.qm +%%DATADIR%%-desktop/i18n/lumina-search_et.qm +%%DATADIR%%-desktop/i18n/lumina-search_eu.qm +%%DATADIR%%-desktop/i18n/lumina-search_fa.qm +%%DATADIR%%-desktop/i18n/lumina-search_fi.qm +%%DATADIR%%-desktop/i18n/lumina-search_fr.qm +%%DATADIR%%-desktop/i18n/lumina-search_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-search_fur.qm +%%DATADIR%%-desktop/i18n/lumina-search_gl.qm +%%DATADIR%%-desktop/i18n/lumina-search_he.qm +%%DATADIR%%-desktop/i18n/lumina-search_hi.qm +%%DATADIR%%-desktop/i18n/lumina-search_hr.qm +%%DATADIR%%-desktop/i18n/lumina-search_hu.qm +%%DATADIR%%-desktop/i18n/lumina-search_id.qm +%%DATADIR%%-desktop/i18n/lumina-search_is.qm +%%DATADIR%%-desktop/i18n/lumina-search_it.qm +%%DATADIR%%-desktop/i18n/lumina-search_ja.qm +%%DATADIR%%-desktop/i18n/lumina-search_ka.qm +%%DATADIR%%-desktop/i18n/lumina-search_ko.qm +%%DATADIR%%-desktop/i18n/lumina-search_lt.qm +%%DATADIR%%-desktop/i18n/lumina-search_lv.qm +%%DATADIR%%-desktop/i18n/lumina-search_mk.qm +%%DATADIR%%-desktop/i18n/lumina-search_mn.qm +%%DATADIR%%-desktop/i18n/lumina-search_ms.qm +%%DATADIR%%-desktop/i18n/lumina-search_mt.qm +%%DATADIR%%-desktop/i18n/lumina-search_nb.qm +%%DATADIR%%-desktop/i18n/lumina-search_ne.qm +%%DATADIR%%-desktop/i18n/lumina-search_nl.qm +%%DATADIR%%-desktop/i18n/lumina-search_pa.qm +%%DATADIR%%-desktop/i18n/lumina-search_pl.qm +%%DATADIR%%-desktop/i18n/lumina-search_pt.qm +%%DATADIR%%-desktop/i18n/lumina-search_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-search_ro.qm +%%DATADIR%%-desktop/i18n/lumina-search_ru.qm +%%DATADIR%%-desktop/i18n/lumina-search_sa.qm +%%DATADIR%%-desktop/i18n/lumina-search_sk.qm +%%DATADIR%%-desktop/i18n/lumina-search_sl.qm +%%DATADIR%%-desktop/i18n/lumina-search_sr.qm +%%DATADIR%%-desktop/i18n/lumina-search_sv.qm +%%DATADIR%%-desktop/i18n/lumina-search_sw.qm +%%DATADIR%%-desktop/i18n/lumina-search_ta.qm +%%DATADIR%%-desktop/i18n/lumina-search_tg.qm +%%DATADIR%%-desktop/i18n/lumina-search_th.qm +%%DATADIR%%-desktop/i18n/lumina-search_tr.qm +%%DATADIR%%-desktop/i18n/lumina-search_uk.qm +%%DATADIR%%-desktop/i18n/lumina-search_ur.qm +%%DATADIR%%-desktop/i18n/lumina-search_uz.qm +%%DATADIR%%-desktop/i18n/lumina-search_vi.qm +%%DATADIR%%-desktop/i18n/lumina-search_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-search_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-search_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-search_zu.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_af.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ar.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_az.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_bg.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_bn.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_bs.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ca.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_cs.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_cy.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_da.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_de.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_el.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_en_GB.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_en_ZA.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_es.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_et.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_eu.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_fa.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_fi.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_fr.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_fr_CA.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_fur.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_gl.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_he.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_hi.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_hr.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_hu.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_id.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_is.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_it.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ja.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ka.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ko.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_lt.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_lv.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_mk.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_mn.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ms.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_mt.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_nb.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ne.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_nl.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_pa.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_pl.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_pt.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_pt_BR.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ro.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ru.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sa.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sk.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sl.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sr.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sv.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_sw.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ta.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_tg.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_th.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_tr.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_uk.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_ur.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_uz.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_vi.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_zh_CN.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_zh_HK.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_zh_TW.qm +%%DATADIR%%-desktop/i18n/lumina-xconfig_zu.qm +%%DATADIR%%-desktop/luminaDesktop.conf +%%DATADIR%%-desktop/menu-scripts/ls.json.sh +%%DATADIR%%-desktop/themes/Glass.qss.template +%%DATADIR%%-desktop/themes/Lumina-default.qss.template +%%DATADIR%%-desktop/themes/None.qss.template share/pixmaps/Insight-FileManager.png -share/xsessions/Lumina-DE.desktop -share/lumina-desktop/compton.conf -share/lumina-desktop/desktop-background.jpg -share/lumina-desktop/luminaDesktop.conf -share/lumina-desktop/fluxbox-init-rc -share/lumina-desktop/fluxbox-keys -share/lumina-desktop/globs2 -share/lumina-desktop/Login.ogg -share/lumina-desktop/Logout.ogg -share/lumina-desktop/colors/Black.qss.colors -share/lumina-desktop/colors/Blue-Light.qss.colors -share/lumina-desktop/colors/Grey-Dark.qss.colors -share/lumina-desktop/colors/Lumina-Red.qss.colors -share/lumina-desktop/colors/Lumina-Green.qss.colors -share/lumina-desktop/colors/Lumina-Purple.qss.colors -share/lumina-desktop/colors/Lumina-Gold.qss.colors -share/lumina-desktop/colors/Lumina-Glass.qss.colors -share/lumina-desktop/colors/PCBSD10-Default.qss.colors -share/lumina-desktop/colors/Solarized-Dark.qss.colors -share/lumina-desktop/colors/Solarized-Light.qss.colors -share/lumina-desktop/themes/Glass.qss.template -share/lumina-desktop/themes/Lumina-default.qss.template -share/lumina-desktop/themes/None.qss.template -share/lumina-desktop/menu-scripts/ls.json.sh -share/wallpapers/Lumina-DE/Lumina_Wispy_gold.jpg -share/wallpapers/Lumina-DE/Lumina_Wispy_green.jpg -share/wallpapers/Lumina-DE/Lumina_Wispy_purple.jpg +share/pixmaps/Lumina-DE.png share/wallpapers/Lumina-DE/Lumina_Wispy_blue-grey-zoom.jpg share/wallpapers/Lumina-DE/Lumina_Wispy_blue-grey.jpg +share/wallpapers/Lumina-DE/Lumina_Wispy_gold.jpg +share/wallpapers/Lumina-DE/Lumina_Wispy_green.jpg share/wallpapers/Lumina-DE/Lumina_Wispy_grey-blue-zoom.jpg share/wallpapers/Lumina-DE/Lumina_Wispy_grey-blue.jpg +share/wallpapers/Lumina-DE/Lumina_Wispy_purple.jpg share/wallpapers/Lumina-DE/Lumina_Wispy_red.jpg +share/xsessions/Lumina-DE.desktop diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index b6c18cf0..03dfb771 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -15,6 +15,8 @@ #include <QPainter> #include <QPen> +#include "LuminaXDG.h" + #include <unistd.h> //Stuff necesary for Qt Cursor Reloads @@ -292,6 +294,8 @@ QStringList LTHEME::CustomEnvSettings(bool useronly){ //view all the key=value s } void LTHEME::LoadCustomEnvSettings(){ + //Also ensure that the normal XDG_* environment variables are setup (will not overwrite them if already there) + LXDG::setEnvironmentVars(); //will push the custom settings into the environment (recommended before loading the initial QApplication) QStringList info = LTHEME::CustomEnvSettings(false); //all settings if(info.isEmpty()){ diff --git a/src-qt5/core/libLumina/LuminaUtils.cpp b/src-qt5/core/libLumina/LuminaUtils.cpp index dd4c75c4..8a35be6b 100644 --- a/src-qt5/core/libLumina/LuminaUtils.cpp +++ b/src-qt5/core/libLumina/LuminaUtils.cpp @@ -214,6 +214,7 @@ QString LUtils::PathToAbsolute(QString path){ } return path; } + QString LUtils::AppToAbsolute(QString path){ if(path.startsWith("~/")){ path = path.replace("~/", QDir::homePath()+"/" ); } if(path.startsWith("/") || QFile::exists(path)){ return path; } diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index 96f77ff9..dbb70e43 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -531,6 +531,9 @@ void LFileInfo::loadExtraInfo(){ mime = LXDG::findAppMimeForFile(this->fileName()); } } +LFileInfo::LFileInfo(){ + desk = 0; +} LFileInfo::LFileInfo(QString filepath){ //overloaded contructor this->setFile(filepath); loadExtraInfo(); @@ -586,287 +589,6 @@ bool LFileInfo::isAVFile(){ //==== LXDG Functions ==== -/*XDGDesktop *LXDG::loadDesktopFile(QString filePath, bool& ok, QObject *parent){ - //Create the outputs - ok=false; - XDGDesktop *DF = new XDGDesktop(parent); - DF->isHidden=false; - DF->useTerminal=false; - DF->startupNotify=false; - DF->type = XDGDesktop::APP; - DF->filePath = filePath; - DF->lastRead = QDateTime::currentDateTime(); - DF->exec = DF->tryexec = ""; // just to make sure this is initialized - - //Get the current localization code - QString lang = QLocale::system().name(); //lang code - QString slang = lang.section("_",0,0); //short lang code - - //Read in the File - bool insection=false; - bool inaction=false; - QStringList file = LUtils::readFile(filePath); - if(file.isEmpty()){ return DF; } - //if(filePath.contains("pcbsd")){ qDebug() << "Check File:" << filePath << lang << slang; } - XDGDesktopAction CDA; //current desktop action - for(int i=0; i<file.length(); i++){ - QString line = file[i]; - //if(filePath.contains("pcbsd")){ qDebug() << " - Check Line:" << line << inaction << insection; } - //Check if this is the end of a section - if(line.startsWith("[") && inaction){ - insection=false; inaction=false; - //Add the current Action structure to the main desktop structure if appropriate - if(!CDA.ID.isEmpty()){ DF->actions << CDA; CDA = XDGDesktopAction(); } - }else if(line.startsWith("[")){ insection=false; inaction = false; } - //Now check if this is the beginning of a section - if(line=="[Desktop Entry]"){ insection=true; continue; } - else if(line.startsWith("[Desktop Action ")){ - //Grab the ID of the action out of the label - CDA.ID = line.section("]",0,0).section("Desktop Action",1,1).simplified(); - inaction = true; - continue; - }else if( (!insection && !inaction) || line.startsWith("#")){ continue; } - //Now parse out the file - line = line.simplified(); - QString var = line.section("=",0,0).simplified(); - QString loc = var.section("[",1,1).section("]",0,0).simplified(); // localization - var = var.section("[",0,0).simplified(); //remove the localization - QString val = line.section("=",1,50).simplified(); - //------------------- - if(var=="Name"){ - if(insection){ - if(DF->name.isEmpty() && loc.isEmpty()){ DF->name = val; } - else if(DF->name.isEmpty() && loc==slang){ DF->name = val; } //short locale code - else if(loc == lang){ DF->name = val; } - }else if(inaction){ - if(CDA.name.isEmpty() && loc.isEmpty()){ CDA.name = val; } - else if(CDA.name.isEmpty() && loc==slang){ CDA.name = val; } //short locale code - else if(loc == lang){ CDA.name = val; } - } - //hasName = true; - }else if(var=="GenericName" && insection){ - if(DF->genericName.isEmpty() && loc.isEmpty()){ DF->genericName = val; } - else if(DF->genericName.isEmpty() && loc==slang){ DF->genericName = val; } //short locale code - else if(loc == lang){ DF->genericName = val; } - }else if(var=="Comment" && insection){ - if(DF->comment.isEmpty() && loc.isEmpty()){ DF->comment = val; } - else if(DF->comment.isEmpty() && loc==slang){ DF->comment = val; } //short locale code - else if(loc == lang){ DF->comment = val; } - }else if(var=="Icon"){ - if(insection){ - if(DF->icon.isEmpty() && loc.isEmpty()){ DF->icon = val; } - else if(DF->icon.isEmpty() && loc==slang){ DF->icon = val; } //short locale code - else if(loc == lang){ DF->icon = val; } - }else if(inaction){ - if(CDA.icon.isEmpty() && loc.isEmpty()){ CDA.icon = val; } - else if(CDA.icon.isEmpty() && loc==slang){ CDA.icon = val; } //short locale code - else if(loc == lang){ CDA.icon = val; } - } - } - else if( (var=="TryExec") && (DF->tryexec.isEmpty()) && insection) { DF->tryexec = val; } - else if(var=="Exec"){ - if(insection && DF->exec.isEmpty() ){ DF->exec = val; } - else if(inaction && CDA.exec.isEmpty() ){ CDA.exec = val; } - } - else if( (var=="Path") && (DF->path.isEmpty() ) && insection){ DF->path = val; } - else if(var=="NoDisplay" && !DF->isHidden && insection){ DF->isHidden = (val.toLower()=="true"); } - else if(var=="Hidden" && !DF->isHidden && insection){ DF->isHidden = (val.toLower()=="true"); } - else if(var=="Categories" && insection){ DF->catList = val.split(";",QString::SkipEmptyParts); } - else if(var=="OnlyShowIn" && insection){ DF->showInList = val.split(";",QString::SkipEmptyParts); } - else if(var=="NotShowIn" && insection){ DF->notShowInList = val.split(";",QString::SkipEmptyParts); } - else if(var=="Terminal" && insection){ DF->useTerminal= (val.toLower()=="true"); } - else if(var=="Actions" && insection){ DF->actionList = val.split(";",QString::SkipEmptyParts); } - else if(var=="MimeType" && insection){ DF->mimeList = val.split(";",QString::SkipEmptyParts); } - else if(var=="Keywords" && insection){ - if(DF->keyList.isEmpty() && loc.isEmpty()){ DF->keyList = val.split(";",QString::SkipEmptyParts); } - else if(loc == lang){ DF->keyList = val.split(";",QString::SkipEmptyParts); } - } - else if(var=="StartupNotify" && insection){ DF->startupNotify = (val.toLower()=="true"); } - else if(var=="StartupWMClass" && insection){ DF->startupWM = val; } - else if(var=="URL" && insection){ DF->url = val;} - else if(var=="Type" && insection){ - if(val.toLower()=="application"){ DF->type = XDGDesktop::APP; } - else if(val.toLower()=="link"){ DF->type = XDGDesktop::LINK; } - else if(val.toLower()=="dir"){ DF->type = XDGDesktop::DIR; } - else{ DF->type = XDGDesktop::BAD; } //Unknown type - //hasType = true; - } - } //end reading file - file.clear(); //done with contents of file - //If there are OnlyShowIn desktops listed, add them to the name - if( !DF->showInList.isEmpty() && !DF->showInList.contains("Lumina", Qt::CaseInsensitive) ){ - DF->name.append(" ("+DF->showInList.join(", ")+")"); - } - //Quick fix for showing "wine" applications (which quite often don't list a category, or have other differences) - if(DF->catList.isEmpty() && filePath.contains("/wine/")){ - DF->catList << "Wine"; //Internal Lumina category only (not in XDG specs as of 11/14/14) - //Also add a fix for the location of Wine icons - if( !DF->icon.isEmpty() ){ - QStringList sizes; sizes << "256x256" << "128x128" << "64x64" << "48x48" << "32x32" << "16x16"; - QString upath = QDir::homePath()+"/.local/share/icons/hicolor/%1/apps/%2.png"; - //qDebug() << "Wine App: Check icon" << upath; - for(int i=0; i<sizes.length(); i++){ - if( QFile::exists(upath.arg(sizes[i],DF->icon)) ){ - DF->icon = upath.arg(sizes[i],DF->icon); - //qDebug() << " - Found Icon:" << DF->icon; - break; - } - } - } - } - //Return the structure - ok = true; //was able to open/read the file - validity determined later - return DF; -}*/ - -/*bool LXDG::saveDesktopFile(XDGDesktop dFile, bool merge){ - qDebug() << "Save Desktop File:" << dFile.filePath << "Merge:" << merge; - bool autofile = dFile.filePath.contains("/autostart/"); //use the "Hidden" field instead of the "NoDisplay" - int insertloc = -1; - QStringList info; - if(QFile::exists(dFile.filePath) && merge){ - //Load the existing file and merge in in any changes - info = LUtils::readFile(dFile.filePath); - //set a couple flags based on the contents before we start iterating through - // - determine if a translated field was changed (need to remove all the now-invalid translations) - bool clearName, clearComment, clearGName; - QString tmp = ""; - if(!info.filter("Name=").isEmpty()){ tmp = info.filter("Name=").first().section("=",1,50); } - clearName=(tmp!=dFile.name); - tmp.clear(); - if(!info.filter("Comment=").isEmpty()){ tmp = info.filter("Comment=").first().section("=",1,50); } - clearComment=(tmp!=dFile.comment); - tmp.clear(); - if(!info.filter("GenericName=").isEmpty()){ tmp = info.filter("GenericName=").first().section("=",1,50); } - clearGName=(tmp!=dFile.genericName); - //Now start iterating through the file and changing fields as necessary - bool insection = false; - for(int i=0; i<info.length(); i++){ - if(info[i]=="[Desktop Entry]"){ - insection = true; - continue; - }else if(info[i].startsWith("[")){ - if(insection){ insertloc = i; } //save this location for later insertions - insection = false; - continue; - } - if(!insection || info[i].isEmpty() || info[i].section("#",0,0).simplified().isEmpty()){ continue; } - QString var = info[i].section("=",0,0); - QString val = info[i].section("=",1,50).simplified(); - //NOTE: Clear the dFile variable as it is found/set in the file (to keep track of what has been used already) - // For boolian values, set them to false - // --LOCALIZED VALUES -- - if(var.startsWith("Name")){ - if(var.contains("[") && clearName){ info.removeAt(i); i--; continue;} - else if(!var.contains("[")){ info[i] = var+"="+dFile.name; dFile.name.clear(); } - }else if(var.startsWith("GenericName")){ - if(var.contains("[") && clearGName){ info.removeAt(i); i--; continue;} - else if(!var.contains("[")){ info[i] = var+"="+dFile.genericName; dFile.genericName.clear(); } - }else if(var.startsWith("Comment")){ - if(var.contains("[") && clearComment){ info.removeAt(i); i--; continue;} - else if(!var.contains("[")){ info[i] = var+"="+dFile.comment; dFile.comment.clear(); } - - // --STRING/LIST VALUES-- - }else if(var=="Exec"){ info[i] = var+"="+dFile.exec; dFile.exec.clear(); } - else if(var=="TryExec"){ info[i] = var+"="+dFile.tryexec; dFile.tryexec.clear(); } - else if(var=="Path"){ info[i] = var+"="+dFile.path; dFile.path.clear(); } - else if(var=="Icon"){ info[i] = var+"="+dFile.icon; dFile.icon.clear(); } - else if(var=="StartupWMClass"){ info[i] = var+"="+dFile.startupWM; dFile.startupWM.clear(); } - else if(var=="MimeType"){ info[i] = var+"="+dFile.mimeList.join(";"); dFile.mimeList.clear(); } - else if(var=="Categories"){ info[i] = var+"="+dFile.catList.join(";"); dFile.catList.clear(); } - else if(var=="Keywords"){ info[i] = var+"="+dFile.keyList.join(";"); dFile.keyList.clear(); } - else if(var=="Actions"){ info[i] = var+"="+dFile.actionList.join(";"); dFile.actionList.clear(); } - else if(var=="OnlyShowIn"){ info[i] = var+"="+dFile.showInList.join(";"); dFile.showInList.clear(); } - else if(var=="NotShowIn"){ info[i] = var+"="+dFile.notShowInList.join(";"); dFile.notShowInList.clear(); } - else if(var=="URL"){ info[i] = var+"="+dFile.url; dFile.url.clear(); } - - // --BOOLIAN VALUES-- - else if(var=="Hidden"){ - if(!autofile){ info.removeAt(i); i--; continue; } - else{ info[i] = var+"="+(dFile.isHidden ? "true": "false"); dFile.isHidden=false;} - }else if(var=="NoDisplay"){ - if(autofile){ info.removeAt(i); i--; continue; } - else{ info[i] = var+"="+(dFile.isHidden ? "true": "false"); dFile.isHidden=false;} - }else if(var=="Terminal"){ - info[i] = var+"="+(dFile.useTerminal ? "true": "false"); dFile.useTerminal=false; - }else if(var=="StartupNotify"){ - info[i] = var+"="+(dFile.startupNotify ? "true": "false"); dFile.startupNotify=false; - } - // Remove any lines that have been un-set or removed from the file - if(info[i].section("=",1,50).simplified().isEmpty()){ info.removeAt(i); i--; } - } - - }else{ - //Just write a new file and overwrite any old one - // (pre-set some values here which are always required) - info << "[Desktop Entry]"; - info << "Version=1.0"; - if(dFile.type==XDGDesktop::APP){ info << "Type=Application"; } - else if(dFile.type==XDGDesktop::LINK){ info << "Type=Link"; } - else if(dFile.type==XDGDesktop::DIR){ info << "Type=Dir"; } - } - - if(insertloc<0){ insertloc = info.size(); }//put it at the end - //Now add in any items that did not exist in the original file - if( !dFile.exec.isEmpty() ){ info.insert(insertloc,"Exec="+dFile.exec); } - if( !dFile.tryexec.isEmpty() ){ info.insert(insertloc,"TryExec="+dFile.tryexec); } - if( !dFile.path.isEmpty() ){ info.insert(insertloc,"Path="+dFile.path); } - if( !dFile.icon.isEmpty() ){ info.insert(insertloc,"Icon="+dFile.icon); } - if( !dFile.name.isEmpty() ){ info.insert(insertloc,"Name="+dFile.name); } - if( !dFile.genericName.isEmpty() ){ info.insert(insertloc,"GenericName="+dFile.genericName); } - if( !dFile.comment.isEmpty() ){ info.insert(insertloc,"Comment="+dFile.comment); } - if( !dFile.startupWM.isEmpty() ){ info.insert(insertloc,"StartupWMClass="+dFile.startupWM); } - if( !dFile.mimeList.isEmpty() ){ info.insert(insertloc,"MimeType="+dFile.mimeList.join(";")); } - if( !dFile.catList.isEmpty() ){ info.insert(insertloc,"Categories="+dFile.catList.join(";")); } - if( !dFile.keyList.isEmpty() ){ info.insert(insertloc,"Keywords="+dFile.keyList.join(";")); } - if( !dFile.actionList.isEmpty() ){ info.insert(insertloc,"Actions="+dFile.actionList.join(";")); } - if( !dFile.showInList.isEmpty() ){ info.insert(insertloc,"OnlyShowIn="+dFile.showInList.join(";")); } - else if( !dFile.notShowInList.isEmpty() ){ info.insert(insertloc,"NotShowIn="+dFile.notShowInList.join(";")); } - if( !dFile.url.isEmpty() ){ info.insert(insertloc,"URL="+dFile.url); } - if( dFile.isHidden && autofile ){ info.insert(insertloc,"Hidden=true"); } - else if(dFile.isHidden){ info.insert(insertloc,"NoDisplay=true"); } - if( dFile.useTerminal){ info.insert(insertloc,"Terminal=true"); } - if( dFile.startupNotify ){ info.insert(insertloc,"StartupNotify=true"); } - - //Now save the file - return LUtils::writeFile(dFile.filePath, info, true); - -}*/ - -/*bool LXDG::checkValidity(XDGDesktop dFile, bool showAll){ - bool ok=true; - bool DEBUG = false; - if(DEBUG){ qDebug() << "[LXDG] Check File validity:" << dFile.name << dFile.filePath; } - switch (dFile.type){ - case XDGDesktop::BAD: - ok=false; - if(DEBUG){ qDebug() << " - Bad file type"; } - break; - case XDGDesktop::APP: - if(!dFile.tryexec.isEmpty() && !LXDG::checkExec(dFile.tryexec)){ ok=false; if(DEBUG){ qDebug() << " - tryexec does not exist";} } - else if(dFile.exec.isEmpty() || dFile.name.isEmpty()){ ok=false; if(DEBUG){ qDebug() << " - exec or name is empty";} } - else if(!LXDG::checkExec(dFile.exec.section(" ",0,0,QString::SectionSkipEmpty)) ){ ok=false; if(DEBUG){ qDebug() << " - first exec binary does not exist";} } - break; - case XDGDesktop::LINK: - ok = !dFile.url.isEmpty(); - if(DEBUG && !ok){ qDebug() << " - Link with missing URL"; } - break; - case XDGDesktop::DIR: - ok = !dFile.path.isEmpty(); - if(DEBUG && !ok){ qDebug() << " - Dir with missing path"; } - break; - default: - ok=false; - if(DEBUG){ qDebug() << " - Unknown file type"; } - } - if(!showAll){ - if(!dFile.showInList.isEmpty()){ ok = dFile.showInList.contains("Lumina", Qt::CaseInsensitive); } - else if(!dFile.notShowInList.isEmpty()){ ok = !dFile.notShowInList.contains("Lumina",Qt::CaseInsensitive); } - else if(dFile.name.isEmpty()){ ok = false; } - } - return ok; -}*/ - bool LXDG::checkExec(QString exec){ //Return true(good) or false(bad) if(exec.startsWith("/")){ return QFile::exists(exec); } @@ -899,21 +621,6 @@ QStringList LXDG::systemApplicationDirs(){ return out; } -/*XDGDesktopList* LXDG::systemAppsList(){ - static XDGDesktopList *sysapps = 0; - if(sysapps == 0){ qDebug() << "Generating new apps list"; sysapps = new XDGDesktopList(0,true); }//set this to automatically update as needed - if(sysapps->lastCheck.isNull()){ sysapps->updateList(); } //catch the first time the class was used, and prompt for an update right now - return sysapps; -}*/ - -/*QList<XDGDesktop*> LXDG::systemDesktopFiles(bool showAll, bool showHidden){ - //If this is going to be used regularly, it is better to use a custom instance of an XDGDesktopList() which self-updates instead. - // Since this function will need to re-read the entire system app registry every time. - XDGDesktopList sysapps; - sysapps.updateList(); - return sysapps.apps(showAll, showHidden); -}*/ - QHash<QString,QList<XDGDesktop*> > LXDG::sortDesktopCats(QList<XDGDesktop*> apps){ //Sort the list of applications into their different categories (main categories only) //Create the category lists @@ -987,46 +694,6 @@ QList<XDGDesktop*> LXDG::sortDesktopNames(QList<XDGDesktop*> apps){ return out; } -/*QString LXDG::getDesktopExec(XDGDesktop app, QString ActionID){ - //Generate the executable line for the application - QString out; - QString exec = app.exec; - if( !ActionID.isEmpty() ){ - //Go through and grab the proper exec for the listed action - for(int i=0; i<app.actions.length(); i++){ - if(app.actions[i].ID == ActionID){ - exec = app.actions[i].exec; - break; - } - } - } - - if(exec.isEmpty()){ return ""; } - else if(app.useTerminal){ - //Get the currently default terminal - QString term = findDefaultAppForMime("application/terminal"); - if(!QFile::exists(term)){ term = "xterm -lc"; } - else if(term.endsWith(".desktop")){ - bool ok = false; - XDGDesktop DF = LXDG::loadDesktopFile(term, ok); - if(ok){ term = LXDG::getDesktopExec(DF); } - else{ term = "xterm -lc"; } - }else if( !LUtils::isValidBinary(term)){ term = "xterm -lc"; } - out = term+" -e "+exec; //-e is a nearly-universal flag for terminal emulators - }else{ - out =exec; - } - //Now perform any of the XDG flag substitutions as appropriate (9/2014 standards) - if(out.contains("%i") && !app.icon.isEmpty() ){ out.replace("%i", "--icon \'"+app.icon+"\'"); } - if(out.contains("%c")){ - if(!app.name.isEmpty()){ out.replace("%c", "\'"+app.name+"\'"); } - else if(!app.genericName.isEmpty()){ out.replace("%c", "\'"+app.genericName+"\'"); } - else{ out.replace("%c", "\'"+app.filePath.section("/",-1).section(".desktop",0,0)+"\'"); } - } - if(out.contains("%k")){ out.replace("%k", "\'"+app.filePath+"\'"); } - return out; -}*/ - void LXDG::setEnvironmentVars(){ //Set the default XDG environment variables if not already set setenv("XDG_DATA_HOME",QString(QDir::homePath()+"/.local/share").toUtf8(), 0); diff --git a/src-qt5/core/libLumina/LuminaXDG.h b/src-qt5/core/libLumina/LuminaXDG.h index dd9d1c67..acb688ff 100644 --- a/src-qt5/core/libLumina/LuminaXDG.h +++ b/src-qt5/core/libLumina/LuminaXDG.h @@ -125,6 +125,7 @@ private: public: //Couple overloaded contructors + LFileInfo(); LFileInfo(QString filepath); LFileInfo(QFileInfo info); ~LFileInfo(){ diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index f1b73bc0..980b3e5e 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -209,6 +209,7 @@ void LDesktop::InitDesktop(){ connect(QApplication::instance(), SIGNAL(DesktopConfigChanged()), this, SLOT(SettingsChanged()) ); connect(QApplication::instance(), SIGNAL(DesktopFilesChanged()), this, SLOT(UpdateDesktop()) ); connect(QApplication::instance(), SIGNAL(LocaleChanged()), this, SLOT(LocaleChanged()) ); + connect(QApplication::instance(), SIGNAL(WorkspaceChanged()), this, SLOT(UpdateBackground()) ); if(DEBUG){ qDebug() << "Create bgWindow"; } bgWindow = new LDesktopBackground(); @@ -478,7 +479,9 @@ void LDesktop::UpdateBackground(){ bgupdating = true; if(DEBUG){ qDebug() << " - Update Desktop Background for screen:" << desktopnumber; } //Get the list of background(s) to show - QStringList bgL = settings->value(DPREFIX+"background/filelist", QStringList()).toStringList(); + QStringList bgL = settings->value(DPREFIX+"background/filelist-workspace-"+QString::number( LSession::handle()->XCB->CurrentWorkspace()), QStringList()).toStringList(); + if(bgL.isEmpty()){ bgL = settings->value(DPREFIX+"background/filelist", QStringList()).toStringList(); } + //qDebug() << " - List:" << bgL << CBG; //Remove any invalid files for(int i=0; i<bgL.length(); i++){ @@ -495,11 +498,9 @@ void LDesktop::UpdateBackground(){ } oldBGL = bgL; //save this for later //Determine which background to use next - int index; - if(CBG.isEmpty()){ index = ( qrand() % bgL.length() ); } //random first wallpaper - else{ + int index ( qrand() % bgL.length() ); + if(index== bgL.indexOf(CBG)){ //if the current wallpaper was selected by the randomization again //Go to the next in the list - index = bgL.indexOf(CBG); if(index < 0 || index >= bgL.length()-1){ index = 0; } //if invalid or last item in the list - go to first else{ index++; } //go to next } diff --git a/src-qt5/core/lumina-desktop/LSession.h b/src-qt5/core/lumina-desktop/LSession.h index c19b3f09..d19cf70c 100644 --- a/src-qt5/core/lumina-desktop/LSession.h +++ b/src-qt5/core/lumina-desktop/LSession.h @@ -185,6 +185,7 @@ signals: void DesktopConfigChanged(); void SessionConfigChanged(); void DesktopFilesChanged(); + void WorkspaceChanged(); }; diff --git a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp index c8321c49..3c92c050 100644 --- a/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp +++ b/src-qt5/core/lumina-desktop/LXcbEventFilter.cpp @@ -46,6 +46,10 @@ bool XCBEventFilter::nativeEventFilter(const QByteArray &eventType, void *messag && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_DESKTOP_GEOMETRY) \ || (((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_WORKAREA) )){ session->RootSizeChange(); + }else if( ((xcb_property_notify_event_t*)ev)->window == QX11Info::appRootWindow() \ + && ( ( ((xcb_property_notify_event_t*)ev)->atom == session->XCB->EWMH._NET_CURRENT_DESKTOP) )){ + qDebug() << "Got Workspace Change"; + session->emit WorkspaceChanged(); }else if( SysNotifyAtoms.contains( ((xcb_property_notify_event_t*)ev)->atom ) ){ //Update the status/list of all running windows session->WindowPropertyEvent(); diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index 5f9ca6c4..937f05d0 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -95,7 +95,7 @@ void LSession::start(){ //Compositing manager QSettings settings("lumina-desktop","sessionsettings"); if(settings.value("enableCompositing",true).toBool()){ - if(LUtils::isValidBinary("compton")){ + if(LUtils::isValidBinary("compton")){ QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; if(!QFile::exists(set)){ if(QFile::exists(LOS::LuminaShare()+"/compton.conf")){ @@ -106,9 +106,21 @@ void LSession::start(){ qDebug() << "Using default compton settings"; startProcess("compositing","compton"); }else{ - startProcess("compositing","compton --config \""+set+"\"", QStringList() << set); + //Auto-detect if GLX is available on the system and turn it on/off as needed + bool startcompton = true; + if(LUtils::isValidBinary("glxinfo")){ + bool hasAccel =! LUtils::getCmdOutput("glxinfo -B").filter("direct rendering:").filter("Yes").isEmpty(); + qDebug() << "Detected GPU Acceleration:" << hasAccel; + QStringList info = LUtils::readFile(set); + for(int i=0; i<info.length(); i++){ + if(info[i].section("=",0,0).simplified()=="backend"){ info[i] = QString("backend = \"")+ (hasAccel ? "glx" : "xrender")+"\""; break; } //replace this line + } + LUtils::writeFile(set, info, true); + if( !hasAccel && settings.value("compositingWithGpuAccelOnly",true).toBool() ){ startcompton = false; } + } + if(startcompton){ startProcess("compositing","compton --config \""+set+"\"", QStringList() << set); } } - }else if(LUtils::isValidBinary("xcompmgr")){ startProcess("compositing","xcompmgr"); } + }else if(LUtils::isValidBinary("xcompmgr") && !settings.value("compositingWithGpuAccelOnly",true).toBool() ){ startProcess("compositing","xcompmgr"); } } //Desktop Next startProcess("runtime","lumina-desktop"); diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp index 2656b855..dfa1ec36 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.cpp @@ -14,7 +14,7 @@ #include <LuminaUtils.h> #include <LuminaOS.h> -LFileInfo INFO = LFileInfo(""); +//LFileInfo INFO = LFileInfo(""); MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){ ui->setupUi(this); //load the designer form @@ -22,10 +22,12 @@ MainUI::MainUI() : QDialog(), ui(new Ui::MainUI){ terminate_thread = false; UpdateIcons(); //Set all the icons in the dialog SetupConnections(); + INFO = 0; } MainUI::~MainUI(){ terminate_thread = true; + if(INFO!=0){ delete INFO; } } //============= @@ -35,54 +37,54 @@ void MainUI::LoadFile(QString path, QString type){ //Do the first file information tab qDebug() << "Load File:" << path << type; - INFO = LFileInfo(path); - if(INFO.exists()){ canwrite = INFO.isWritable(); } - else if(!INFO.filePath().isEmpty()){ + INFO = new LFileInfo(path); + if(INFO->exists()){ canwrite = INFO->isWritable(); } + else if(!INFO->filePath().isEmpty()){ //See if the containing directory can be written - QFileInfo chk(INFO.absolutePath()); + QFileInfo chk(INFO->absolutePath()); canwrite = (chk.isDir() && chk.isWritable()); }else{ canwrite = true; //no associated file yet } - if(!INFO.exists() && !type.isEmpty()){ + if(!INFO->exists() && !type.isEmpty()){ //Set the proper type flag on the shortcut - if(type=="APP"){ INFO.XDG()->type = XDGDesktop::APP; } - else if(type=="LINK"){ INFO.XDG()->type = XDGDesktop::LINK; } + if(type=="APP"){ INFO->XDG()->type = XDGDesktop::APP; } + else if(type=="LINK"){ INFO->XDG()->type = XDGDesktop::LINK; } } //First load the general file information - if(!INFO.filePath().isEmpty()){ - ui->label_file_name->setText( INFO.fileName() ); - ui->label_file_mimetype->setText( INFO.mimetype() ); - if(!INFO.isDir()){ ui->label_file_size->setText( LUtils::BytesToDisplaySize( INFO.size() ) ); } + if(!INFO->filePath().isEmpty()){ + ui->label_file_name->setText( INFO->fileName() ); + ui->label_file_mimetype->setText( INFO->mimetype() ); + if(!INFO->isDir()){ ui->label_file_size->setText( LUtils::BytesToDisplaySize( INFO->size() ) ); } else { ui->label_file_size->setText(tr("---Calculating---")); - QtConcurrent::run(this, &MainUI::GetDirSize, INFO.absoluteFilePath()); + QtConcurrent::run(this, &MainUI::GetDirSize, INFO->absoluteFilePath()); } - ui->label_file_owner->setText(INFO.owner()); - ui->label_file_group->setText(INFO.group()); - ui->label_file_created->setText( INFO.created().toString(Qt::SystemLocaleLongDate) ); - ui->label_file_modified->setText( INFO.lastModified().toString(Qt::SystemLocaleLongDate) ); + ui->label_file_owner->setText(INFO->owner()); + ui->label_file_group->setText(INFO->group()); + ui->label_file_created->setText( INFO->created().toString(Qt::SystemLocaleLongDate) ); + ui->label_file_modified->setText( INFO->lastModified().toString(Qt::SystemLocaleLongDate) ); //Get the file permissions QString perms; - if(INFO.isReadable() && INFO.isWritable()){ perms = tr("Read/Write"); } - else if(INFO.isReadable()){ perms = tr("Read Only"); } - else if(INFO.isWritable()){ perms = tr("Write Only"); } + if(INFO->isReadable() && INFO->isWritable()){ perms = tr("Read/Write"); } + else if(INFO->isReadable()){ perms = tr("Read Only"); } + else if(INFO->isWritable()){ perms = tr("Write Only"); } else{ perms = tr("No Access"); } ui->label_file_perms->setText(perms); //Now the special "type" for the file QString ftype; - if(INFO.suffix().toLower()=="desktop"){ ftype = tr("XDG Shortcut"); } - else if(INFO.isDir()){ ftype = tr("Directory"); } - else if(INFO.isExecutable()){ ftype = tr("Binary"); } - else{ ftype = INFO.suffix().toUpper(); } - if(INFO.isHidden()){ ftype = QString(tr("Hidden %1")).arg(type); } + if(INFO->suffix().toLower()=="desktop"){ ftype = tr("XDG Shortcut"); } + else if(INFO->isDir()){ ftype = tr("Directory"); } + else if(INFO->isExecutable()){ ftype = tr("Binary"); } + else{ ftype = INFO->suffix().toUpper(); } + if(INFO->isHidden()){ ftype = QString(tr("Hidden %1")).arg(type); } ui->label_file_type->setText(ftype); //Now load the icon for the file - if(INFO.isImage()){ - ui->label_file_icon->setPixmap( QPixmap(INFO.absoluteFilePath()).scaledToHeight(64) ); + if(INFO->isImage()){ + ui->label_file_icon->setPixmap( QPixmap(INFO->absoluteFilePath()).scaledToHeight(64) ); }else{ - ui->label_file_icon->setPixmap( LXDG::findIcon( INFO.iconfile(), "unknown").pixmap(QSize(64,64)) ); + ui->label_file_icon->setPixmap( LXDG::findIcon( INFO->iconfile(), "unknown").pixmap(QSize(64,64)) ); } //Now verify the tab is available in the widget if(ui->tabWidget->indexOf(ui->tab_file)<0){ @@ -94,15 +96,15 @@ void MainUI::LoadFile(QString path, QString type){ } } //Now load the special XDG desktop info - qDebug() << INFO.isDesktopFile() << type; - if(INFO.isDesktopFile() || !type.isEmpty()){ + qDebug() << INFO->isDesktopFile() << type; + if(INFO->isDesktopFile() || !type.isEmpty()){ - if(INFO.XDG()->type == XDGDesktop::APP){ - ui->line_xdg_command->setText(INFO.XDG()->exec); - ui->line_xdg_wdir->setText(INFO.XDG()->path); - ui->check_xdg_useTerminal->setChecked( INFO.XDG()->useTerminal ); - ui->check_xdg_startupNotify->setChecked( INFO.XDG()->startupNotify ); - }else if(INFO.XDG()->type==XDGDesktop::LINK){ + if(INFO->XDG()->type == XDGDesktop::APP){ + ui->line_xdg_command->setText(INFO->XDG()->exec); + ui->line_xdg_wdir->setText(INFO->XDG()->path); + ui->check_xdg_useTerminal->setChecked( INFO->XDG()->useTerminal ); + ui->check_xdg_startupNotify->setChecked( INFO->XDG()->startupNotify ); + }else if(INFO->XDG()->type==XDGDesktop::LINK){ //Hide the options that are unavailable for links //Command line (exec) ui->line_xdg_command->setVisible(false); @@ -114,13 +116,13 @@ void MainUI::LoadFile(QString path, QString type){ ui->check_xdg_startupNotify->setVisible(false); //Now load the variables for this type of shortcut ui->lblWorkingDir->setText(tr("URL:")); - ui->line_xdg_wdir->setText( INFO.XDG()->url ); + ui->line_xdg_wdir->setText( INFO->XDG()->url ); ui->tool_xdg_getDir->setVisible(false); //the dir selection button } - ui->line_xdg_name->setText(INFO.XDG()->name); - ui->line_xdg_comment->setText(INFO.XDG()->comment); - ui->push_xdg_getIcon->setWhatsThis( INFO.XDG()->icon ); + ui->line_xdg_name->setText(INFO->XDG()->name); + ui->line_xdg_comment->setText(INFO->XDG()->comment); + ui->push_xdg_getIcon->setWhatsThis( INFO->XDG()->icon ); ReloadAppIcon(); ui->push_save->setVisible(true); ui->push_save->setEnabled(false); @@ -209,6 +211,7 @@ void MainUI::GetDirSize(const QString dirname) const { void MainUI::SetupConnections(){ connect(ui->line_xdg_command, SIGNAL(editingFinished()), this, SLOT(xdgvaluechanged()) ); connect(ui->line_xdg_comment, SIGNAL(editingFinished()), this, SLOT(xdgvaluechanged()) ); + connect(ui->tool_xdg_getCommand, SIGNAL(clicked()), this, SLOT(getXdgCommand()) ); connect(ui->line_xdg_name, SIGNAL(editingFinished()), this, SLOT(xdgvaluechanged()) ); connect(ui->line_xdg_wdir, SIGNAL(editingFinished()), this, SLOT(xdgvaluechanged()) ); connect(ui->check_xdg_useTerminal, SIGNAL(clicked()), this, SLOT(xdgvaluechanged()) ); @@ -229,8 +232,8 @@ void MainUI::on_push_close_clicked(){ void MainUI::on_push_save_clicked(){ //Save all the xdg values into the structure - if( (!INFO.isDesktopFile() && !INFO.filePath().isEmpty()) || !canwrite){ return; } - if(INFO.filePath().isEmpty()){ + if( (!INFO->isDesktopFile() && !INFO->filePath().isEmpty()) || !canwrite){ return; } + if(INFO->filePath().isEmpty()){ //Need to prompt for where to save the file and what to call it QString appdir = QString(getenv("XDG_DATA_HOME"))+"/applications/"; if(!QFile::exists(appdir)){ QDir dir; dir.mkpath(appdir); } @@ -238,10 +241,10 @@ void MainUI::on_push_save_clicked(){ if(filePath.isEmpty()){ return; } if(!filePath.endsWith(".desktop")){ filePath.append(".desktop"); } //Update the file paths in the data structure - INFO.setFile(filePath); - INFO.XDG()->filePath = filePath; + INFO->setFile(filePath); + INFO->XDG()->filePath = filePath; } - XDGDesktop *XDG = INFO.XDG(); + XDGDesktop *XDG = INFO->XDG(); //Now change the structure XDG->name = ui->line_xdg_name->text(); XDG->genericName = ui->line_xdg_name->text().toLower(); @@ -266,11 +269,11 @@ void MainUI::on_push_save_clicked(){ ui->push_save->setEnabled( !saved ); if(saved){ //Re-load the file info - LoadFile(INFO.absoluteFilePath()); + LoadFile(INFO->absoluteFilePath()); } } -void MainUI::on_tool_xdg_getCommand_clicked(QString prev){ +void MainUI::getXdgCommand(QString prev){ //Find a binary to run QString dir = prev; //start with the previous attempt (if there was one) if(dir.isEmpty()){ ui->line_xdg_command->text(); }//then try current selection @@ -279,7 +282,7 @@ void MainUI::on_tool_xdg_getCommand_clicked(QString prev){ if(file.isEmpty()){ return; } //cancelled if(!LUtils::isValidBinary(file)){ QMessageBox::warning(this, tr("Error"), tr("Invalid selection: Not a valid executable")); - on_tool_xdg_getCommand_clicked(file); + getXdgCommand(file); return; } ui->line_xdg_command->setText(file); @@ -312,7 +315,7 @@ void MainUI::on_push_xdg_getIcon_clicked(){ //XDG Value Changed void MainUI::xdgvaluechanged(){ - if(INFO.isDesktopFile() || INFO.filePath().isEmpty()){ + if(INFO!=0 && (INFO->isDesktopFile() || INFO->filePath().isEmpty() ) ){ ui->push_save->setVisible(true); //Compare the current UI values to the file values ui->push_save->setEnabled(canwrite); //assume changed at this point diff --git a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.h b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.h index e17ab439..cbe23d9e 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fileinfo/MainUI.h @@ -34,6 +34,8 @@ public slots: private: Ui::MainUI *ui; + LFileInfo *INFO; + bool canwrite; bool terminate_thread; //flag for terminating the GetDirSize task void ReloadAppIcon(); @@ -49,7 +51,8 @@ private slots: //UI Buttons void on_push_close_clicked(); void on_push_save_clicked(); - void on_tool_xdg_getCommand_clicked(QString prev = ""); + void getXdgCommand(QString prev = ""); + //void on_tool_xdg_getCommand_clicked(QString prev = ""); void on_tool_xdg_getDir_clicked(); void on_push_xdg_getIcon_clicked(); diff --git a/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_el.ts b/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_el.ts index ef503357..4c92ea65 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_el.ts +++ b/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_el.ts @@ -1,227 +1,227 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="el_GR"> <context> <name>MainUI</name> <message> - <location filename="../MainUI.ui" line="14"/> - <location filename="../MainUI.ui" line="24"/> - <location filename="../MainUI.cpp" line="89"/> + <location filename="../MainUI.ui" line="14"></location> + <location filename="../MainUI.ui" line="24"></location> + <location filename="../MainUI.cpp" line="89"></location> <source>File Information</source> - <translation type="unfinished"></translation> + <translation>Πληροφορίες Αρχείου</translation> </message> <message> - <location filename="../MainUI.ui" line="56"/> + <location filename="../MainUI.ui" line="56"></location> <source>Owner:</source> - <translation type="unfinished"></translation> + <translation>Ιδιοκτήτης:</translation> </message> <message> - <location filename="../MainUI.ui" line="73"/> + <location filename="../MainUI.ui" line="73"></location> <source>Group:</source> - <translation type="unfinished"></translation> + <translation>Ομάδα:</translation> </message> <message> - <location filename="../MainUI.ui" line="90"/> + <location filename="../MainUI.ui" line="90"></location> <source>Permissions:</source> - <translation type="unfinished"></translation> + <translation>Δικαιώματα:</translation> </message> <message> - <location filename="../MainUI.ui" line="104"/> + <location filename="../MainUI.ui" line="104"></location> <source>Created:</source> - <translation type="unfinished"></translation> + <translation>Δημιουργήθηκε:</translation> </message> <message> - <location filename="../MainUI.ui" line="111"/> + <location filename="../MainUI.ui" line="111"></location> <source>Note: The time a file was created might be more recent than the time modified if the file permissions were changed recently.</source> - <translation type="unfinished"></translation> + <translation>Σημείωση: Ο χρόνος όπου ένα αρχείο δημιουργήθηκε μπορεί να είναι πιο πρόσφατος από τη στιγμή που τροποποιήθηκε, εφόσον οι άδειες αρχείων άλλαξαν πρόσφατα.</translation> </message> <message> - <location filename="../MainUI.ui" line="124"/> + <location filename="../MainUI.ui" line="124"></location> <source>Last Modified:</source> - <translation type="unfinished"></translation> + <translation>Τελευταία Τροποποίηση:</translation> </message> <message> - <location filename="../MainUI.ui" line="131"/> + <location filename="../MainUI.ui" line="131"></location> <source>Type:</source> - <translation type="unfinished"></translation> + <translation>Τύπος:</translation> </message> <message> - <location filename="../MainUI.ui" line="138"/> + <location filename="../MainUI.ui" line="138"></location> <source>MimeType:</source> - <translation type="unfinished"></translation> + <translation type="unfinished">ΤύποςMime:</translation> </message> <message> - <location filename="../MainUI.ui" line="185"/> + <location filename="../MainUI.ui" line="185"></location> <source>File Size:</source> - <translation type="unfinished"></translation> + <translation>Μέγεθος Αρχείου:</translation> </message> <message> - <location filename="../MainUI.ui" line="216"/> - <location filename="../MainUI.cpp" line="130"/> + <location filename="../MainUI.ui" line="216"></location> + <location filename="../MainUI.cpp" line="130"></location> <source>Edit Shortcut</source> - <translation type="unfinished"></translation> + <translation>Επεξεργασία Συντόμευσης</translation> </message> <message> - <location filename="../MainUI.ui" line="239"/> + <location filename="../MainUI.ui" line="239"></location> <source>Working Dir:</source> - <translation type="unfinished"></translation> + <translation>Τρέχων κατάλογος εργασίας:</translation> </message> <message> - <location filename="../MainUI.ui" line="246"/> + <location filename="../MainUI.ui" line="246"></location> <source>Use startup notification</source> - <translation type="unfinished"></translation> + <translation>Χρησιμοποιήστε ειδοποίηση εκκίνησης</translation> </message> <message> - <location filename="../MainUI.ui" line="260"/> + <location filename="../MainUI.ui" line="260"></location> <source>Icon:</source> - <translation type="unfinished"></translation> + <translation>Εικονίδιο:</translation> </message> <message> - <location filename="../MainUI.ui" line="267"/> + <location filename="../MainUI.ui" line="267"></location> <source>Command:</source> - <translation type="unfinished"></translation> + <translation>Eντολή:</translation> </message> <message> - <location filename="../MainUI.ui" line="274"/> + <location filename="../MainUI.ui" line="274"></location> <source>Comment:</source> - <translation type="unfinished"></translation> + <translation>Σχόλιο:</translation> </message> <message> - <location filename="../MainUI.ui" line="284"/> + <location filename="../MainUI.ui" line="284"></location> <source>Run in terminal</source> - <translation type="unfinished"></translation> + <translation>Τρέξτε το στην γραμμή εντολών</translation> </message> <message> - <location filename="../MainUI.ui" line="291"/> + <location filename="../MainUI.ui" line="291"></location> <source>Name:</source> - <translation type="unfinished"></translation> + <translation>Όνομα:</translation> </message> <message> - <location filename="../MainUI.ui" line="298"/> + <location filename="../MainUI.ui" line="298"></location> <source>Options</source> - <translation type="unfinished"></translation> + <translation>Επιλογές</translation> </message> <message> - <location filename="../MainUI.ui" line="336"/> + <location filename="../MainUI.ui" line="336"></location> <source>No Icon</source> - <translation type="unfinished"></translation> + <translation>Χωρίς Εικονίδιο</translation> </message> <message> - <location filename="../MainUI.ui" line="392"/> + <location filename="../MainUI.ui" line="392"></location> <source>Save</source> - <translation type="unfinished"></translation> + <translation>Αποθήκευση</translation> </message> <message> - <location filename="../MainUI.ui" line="405"/> + <location filename="../MainUI.ui" line="405"></location> <source>Close</source> - <translation type="unfinished"></translation> + <translation>Κλείσιμο</translation> </message> <message> - <location filename="../MainUI.cpp" line="59"/> + <location filename="../MainUI.cpp" line="59"></location> <source>---Calculating---</source> - <translation type="unfinished"></translation> + <translation>---Υπολογισμός---</translation> </message> <message> - <location filename="../MainUI.cpp" line="68"/> + <location filename="../MainUI.cpp" line="68"></location> <source>Read/Write</source> - <translation type="unfinished"></translation> + <translation>Ανάγνωση/Εγγραφή</translation> </message> <message> - <location filename="../MainUI.cpp" line="69"/> + <location filename="../MainUI.cpp" line="69"></location> <source>Read Only</source> - <translation type="unfinished"></translation> + <translation>Μόνο Ανάγνωση</translation> </message> <message> - <location filename="../MainUI.cpp" line="70"/> + <location filename="../MainUI.cpp" line="70"></location> <source>Write Only</source> - <translation type="unfinished"></translation> + <translation>Μόνο Εγγραφή</translation> </message> <message> - <location filename="../MainUI.cpp" line="71"/> + <location filename="../MainUI.cpp" line="71"></location> <source>No Access</source> - <translation type="unfinished"></translation> + <translation>Χωρίς Πρόσβαση</translation> </message> <message> - <location filename="../MainUI.cpp" line="75"/> + <location filename="../MainUI.cpp" line="75"></location> <source>XDG Shortcut</source> - <translation type="unfinished"></translation> + <translation>XDG Συντόμευση</translation> </message> <message> - <location filename="../MainUI.cpp" line="76"/> + <location filename="../MainUI.cpp" line="76"></location> <source>Directory</source> - <translation type="unfinished"></translation> + <translation>Κατάλογος</translation> </message> <message> - <location filename="../MainUI.cpp" line="77"/> + <location filename="../MainUI.cpp" line="77"></location> <source>Binary</source> - <translation type="unfinished"></translation> + <translation>Εκτελέσιμο</translation> </message> <message> - <location filename="../MainUI.cpp" line="79"/> + <location filename="../MainUI.cpp" line="79"></location> <source>Hidden %1</source> - <translation type="unfinished"></translation> + <translation>Κρυφό %1</translation> </message> <message> - <location filename="../MainUI.cpp" line="116"/> + <location filename="../MainUI.cpp" line="116"></location> <source>URL:</source> - <translation type="unfinished"></translation> + <translation>URL:</translation> </message> <message> - <location filename="../MainUI.cpp" line="237"/> + <location filename="../MainUI.cpp" line="237"></location> <source>Save Application File</source> - <translation type="unfinished"></translation> + <translation>Αποθήκευση Αρχείου Εφαρμογής</translation> </message> <message> - <location filename="../MainUI.cpp" line="237"/> + <location filename="../MainUI.cpp" line="237"></location> <source>Application Registrations (*.desktop)</source> - <translation type="unfinished"></translation> + <translation>Εγγραφές Εφαρμογής (* .desktop)</translation> </message> <message> - <location filename="../MainUI.cpp" line="278"/> + <location filename="../MainUI.cpp" line="278"></location> <source>Select a binary</source> - <translation type="unfinished"></translation> + <translation>Επιλέξτε ένα εκτελέσιμο</translation> </message> <message> - <location filename="../MainUI.cpp" line="281"/> + <location filename="../MainUI.cpp" line="281"></location> <source>Error</source> - <translation type="unfinished"></translation> + <translation>Σφάλμα</translation> </message> <message> - <location filename="../MainUI.cpp" line="281"/> + <location filename="../MainUI.cpp" line="281"></location> <source>Invalid selection: Not a valid executable</source> - <translation type="unfinished"></translation> + <translation>Μη έγκυρη επιλογή: Μη έγκυρο εκτελέσιμο</translation> </message> <message> - <location filename="../MainUI.cpp" line="293"/> + <location filename="../MainUI.cpp" line="293"></location> <source>Select a directory</source> - <translation type="unfinished"></translation> + <translation>Επιλέξτε έναν κατάλογο</translation> </message> <message> - <location filename="../MainUI.cpp" line="306"/> + <location filename="../MainUI.cpp" line="306"></location> <source>Select an icon</source> - <translation type="unfinished"></translation> + <translation>Επιλέξτε ένα εικονίδιο</translation> </message> <message> - <location filename="../MainUI.cpp" line="306"/> + <location filename="../MainUI.cpp" line="306"></location> <source>Images (%1);; All Files (*)</source> - <translation type="unfinished"></translation> + <translation>Εικόνες (% 1) ;; ΌλαΤαΑρχεία (*)</translation> </message> <message> - <location filename="../MainUI.cpp" line="329"/> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="329"></location> + <location filename="../MainUI.cpp" line="331"></location> <source> Folders: </source> - <translation type="unfinished"></translation> + <translation> Φάκελοι: </translation> </message> <message> - <location filename="../MainUI.cpp" line="329"/> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="329"></location> + <location filename="../MainUI.cpp" line="331"></location> <source>Files: </source> - <translation type="unfinished"></translation> + <translation>Αρχεία: </translation> </message> <message> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="331"></location> <source> Calculating...</source> - <translation type="unfinished"></translation> + <translation> Υπολογισμός...</translation> </message> </context> </TS> diff --git a/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_ja.ts b/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_ja.ts index 0ca81ab9..ecdd9a4c 100644 --- a/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_ja.ts +++ b/src-qt5/desktop-utils/lumina-fileinfo/i18n/l-fileinfo_ja.ts @@ -1,227 +1,227 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="ja"> <context> <name>MainUI</name> <message> - <location filename="../MainUI.ui" line="14"/> - <location filename="../MainUI.ui" line="24"/> - <location filename="../MainUI.cpp" line="89"/> + <location filename="../MainUI.ui" line="14"></location> + <location filename="../MainUI.ui" line="24"></location> + <location filename="../MainUI.cpp" line="89"></location> <source>File Information</source> <translation>ファイルの情報</translation> </message> <message> - <location filename="../MainUI.ui" line="56"/> + <location filename="../MainUI.ui" line="56"></location> <source>Owner:</source> <translation>所有者:</translation> </message> <message> - <location filename="../MainUI.ui" line="73"/> + <location filename="../MainUI.ui" line="73"></location> <source>Group:</source> <translation>グループ:</translation> </message> <message> - <location filename="../MainUI.ui" line="90"/> + <location filename="../MainUI.ui" line="90"></location> <source>Permissions:</source> <translation>パーミッション:</translation> </message> <message> - <location filename="../MainUI.ui" line="104"/> + <location filename="../MainUI.ui" line="104"></location> <source>Created:</source> <translation>作成日時:</translation> </message> <message> - <location filename="../MainUI.ui" line="111"/> + <location filename="../MainUI.ui" line="111"></location> <source>Note: The time a file was created might be more recent than the time modified if the file permissions were changed recently.</source> <translation>注意: パーミッション設定のため、ファイル作成日時が更新時刻より新しいことがあります。</translation> </message> <message> - <location filename="../MainUI.ui" line="124"/> + <location filename="../MainUI.ui" line="124"></location> <source>Last Modified:</source> <translation>最終更新日時:</translation> </message> <message> - <location filename="../MainUI.ui" line="131"/> + <location filename="../MainUI.ui" line="131"></location> <source>Type:</source> <translation>種類:</translation> </message> <message> - <location filename="../MainUI.ui" line="138"/> + <location filename="../MainUI.ui" line="138"></location> <source>MimeType:</source> <translation>MIME タイプ:</translation> </message> <message> - <location filename="../MainUI.ui" line="185"/> + <location filename="../MainUI.ui" line="185"></location> <source>File Size:</source> <translation>ファイルのサイズ:</translation> </message> <message> - <location filename="../MainUI.ui" line="216"/> - <location filename="../MainUI.cpp" line="130"/> + <location filename="../MainUI.ui" line="216"></location> + <location filename="../MainUI.cpp" line="130"></location> <source>Edit Shortcut</source> <translation>ショートカットを編集</translation> </message> <message> - <location filename="../MainUI.ui" line="239"/> + <location filename="../MainUI.ui" line="239"></location> <source>Working Dir:</source> <translation>作業ディレクトリー:</translation> </message> <message> - <location filename="../MainUI.ui" line="246"/> + <location filename="../MainUI.ui" line="246"></location> <source>Use startup notification</source> <translation>起動通知を行う</translation> </message> <message> - <location filename="../MainUI.ui" line="260"/> + <location filename="../MainUI.ui" line="260"></location> <source>Icon:</source> <translation>アイコン:</translation> </message> <message> - <location filename="../MainUI.ui" line="267"/> + <location filename="../MainUI.ui" line="267"></location> <source>Command:</source> <translation>コマンド:</translation> </message> <message> - <location filename="../MainUI.ui" line="274"/> + <location filename="../MainUI.ui" line="274"></location> <source>Comment:</source> <translation>コメント:</translation> </message> <message> - <location filename="../MainUI.ui" line="284"/> + <location filename="../MainUI.ui" line="284"></location> <source>Run in terminal</source> <translation>ターミナルで実行する</translation> </message> <message> - <location filename="../MainUI.ui" line="291"/> + <location filename="../MainUI.ui" line="291"></location> <source>Name:</source> <translation>名前:</translation> </message> <message> - <location filename="../MainUI.ui" line="298"/> + <location filename="../MainUI.ui" line="298"></location> <source>Options</source> <translation>オプション</translation> </message> <message> - <location filename="../MainUI.ui" line="336"/> + <location filename="../MainUI.ui" line="336"></location> <source>No Icon</source> <translation>アイコン無し</translation> </message> <message> - <location filename="../MainUI.ui" line="392"/> + <location filename="../MainUI.ui" line="392"></location> <source>Save</source> <translation>保存</translation> </message> <message> - <location filename="../MainUI.ui" line="405"/> + <location filename="../MainUI.ui" line="405"></location> <source>Close</source> <translation>閉じる</translation> </message> <message> - <location filename="../MainUI.cpp" line="59"/> + <location filename="../MainUI.cpp" line="59"></location> <source>---Calculating---</source> <translation>---計算しています---</translation> </message> <message> - <location filename="../MainUI.cpp" line="68"/> + <location filename="../MainUI.cpp" line="68"></location> <source>Read/Write</source> <translation>読み込み/書き込み</translation> </message> <message> - <location filename="../MainUI.cpp" line="69"/> + <location filename="../MainUI.cpp" line="69"></location> <source>Read Only</source> <translation>読み込み専用</translation> </message> <message> - <location filename="../MainUI.cpp" line="70"/> + <location filename="../MainUI.cpp" line="70"></location> <source>Write Only</source> <translation>書き込み専用</translation> </message> <message> - <location filename="../MainUI.cpp" line="71"/> + <location filename="../MainUI.cpp" line="71"></location> <source>No Access</source> <translation>アクセス権無し</translation> </message> <message> - <location filename="../MainUI.cpp" line="75"/> + <location filename="../MainUI.cpp" line="75"></location> <source>XDG Shortcut</source> <translation>XDG ショートカット</translation> </message> <message> - <location filename="../MainUI.cpp" line="76"/> + <location filename="../MainUI.cpp" line="76"></location> <source>Directory</source> <translation>ディレクトリー</translation> </message> <message> - <location filename="../MainUI.cpp" line="77"/> + <location filename="../MainUI.cpp" line="77"></location> <source>Binary</source> <translation>バイナリー</translation> </message> <message> - <location filename="../MainUI.cpp" line="79"/> + <location filename="../MainUI.cpp" line="79"></location> <source>Hidden %1</source> - <translatorcomment>%1 には "Directory", "File", "Link" などが入ると思われる。</translatorcomment> + <translatorcomment>%1 には "Directory", "File", "Link" などが入ると思われる。</translatorcomment> <translation>隠し %1</translation> </message> <message> - <location filename="../MainUI.cpp" line="116"/> + <location filename="../MainUI.cpp" line="116"></location> <source>URL:</source> <translation>URL:</translation> </message> <message> - <location filename="../MainUI.cpp" line="237"/> + <location filename="../MainUI.cpp" line="237"></location> <source>Save Application File</source> - <translation type="unfinished"></translation> + <translation>アプリケーションファイルを保存</translation> </message> <message> - <location filename="../MainUI.cpp" line="237"/> + <location filename="../MainUI.cpp" line="237"></location> <source>Application Registrations (*.desktop)</source> - <translation type="unfinished"></translation> + <translation>アプリケーション登録 (*.desktop)</translation> </message> <message> - <location filename="../MainUI.cpp" line="278"/> + <location filename="../MainUI.cpp" line="278"></location> <source>Select a binary</source> <translatorcomment>ファイル選択ダイアログのタイトル</translatorcomment> <translation>バイナリーを選択する</translation> </message> <message> - <location filename="../MainUI.cpp" line="281"/> + <location filename="../MainUI.cpp" line="281"></location> <source>Error</source> <translation>エラー</translation> </message> <message> - <location filename="../MainUI.cpp" line="281"/> + <location filename="../MainUI.cpp" line="281"></location> <source>Invalid selection: Not a valid executable</source> <translation>無効な選択: 有効な実行ファイルではありません</translation> </message> <message> - <location filename="../MainUI.cpp" line="293"/> + <location filename="../MainUI.cpp" line="293"></location> <source>Select a directory</source> <translation>ディレクトリーを選択</translation> </message> <message> - <location filename="../MainUI.cpp" line="306"/> + <location filename="../MainUI.cpp" line="306"></location> <source>Select an icon</source> <translation>アイコンを選択:</translation> </message> <message> - <location filename="../MainUI.cpp" line="306"/> + <location filename="../MainUI.cpp" line="306"></location> <source>Images (%1);; All Files (*)</source> <translation>画像ファイル (%1);; 全ファイル (*)</translation> </message> <message> - <location filename="../MainUI.cpp" line="329"/> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="329"></location> + <location filename="../MainUI.cpp" line="331"></location> <source> Folders: </source> <translation> フォルダー: </translation> </message> <message> - <location filename="../MainUI.cpp" line="329"/> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="329"></location> + <location filename="../MainUI.cpp" line="331"></location> <source>Files: </source> <translation>ファイル: </translation> </message> <message> - <location filename="../MainUI.cpp" line="331"/> + <location filename="../MainUI.cpp" line="331"></location> <source> Calculating...</source> <translation> 計算中...</translation> </message> diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.cpp b/src-qt5/desktop-utils/lumina-fm/Browser.cpp index 0aeb5648..7455e5ea 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.cpp +++ b/src-qt5/desktop-utils/lumina-fm/Browser.cpp @@ -6,17 +6,28 @@ //=========================================== #include "Browser.h" +#include <QStringList> +#include <QTimer> +#include <QtConcurrent> +#include <QDebug> + +#include <LuminaUtils.h> + Browser::Browser(QObject *parent) : QObject(parent){ watcher = new QFileSystemWatcher(this); connect(watcher, SIGNAL(fileChanged(const QString&)), this, SLOT(fileChanged(QString)) ); connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(dirChanged(QString)) ); showHidden = false; + imageFormats = LUtils::imageExtensions(false); //lowercase suffixes + connect(this, SIGNAL(threadDone(QString, QByteArray)), this, SLOT(futureFinished(QString, QByteArray)), Qt::QueuedConnection); //will always be between different threads } Browser::~Browser(){ watcher->deleteLater(); } +QString Browser::currentDirectory(){ return currentDir; } + void Browser::showHiddenFiles(bool show){ if(show !=showHidden){ showHidden = show; @@ -24,54 +35,104 @@ void Browser::showHiddenFiles(bool show){ } } bool Browser::showingHiddenFiles(){ - + return showHidden; } // PRIVATE -void Browser::loadItem(QFileInfo info){ - LFileInfo linfo(info); - QIcon ico; - if(linfo.isImage()){ - QPixmap pix; - if(pix.load(info.absoluteFilePath()) ){ - if(pix.height()>128){ pix = pix.scaled(128, 128, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); } - ico.addPixmap(pix); +void Browser::loadItem(QString info){ + //qDebug() << "LoadItem:" << info; + ////FileItem item; + //itemame = info; + QByteArray bytes; + if(imageFormats.contains(info.section(".",-1).toLower()) ){ + QFile file(info); + if(file.open(QIODevice::ReadOnly)){ + bytes = file.readAll(); + file.close(); } - }else if(linfo.isDirectory()){ - ico = LXDG::findIcon("folder","inode/directory"); + + /*QPixmap pix; + if(pix.load(item.info.absoluteFilePath()) ){ + if(pix.height()>128){ pix = pix.scaled(128, 128, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); } + item.icon.addPixmap(pix); + }*/ + }/*else if(item.info.isDir()){ + item.icon = LXDG::findIcon("folder","inode/directory"); } - if(ico.isNull()){ ico = LXDG::findIcon(linfo.mimetype(), "unknown"); } - emit ItemDataAvailable(ico, linfo); + if(item.icon.isNull()){ item.icon = LXDG::findIcon(item.info.mimetype(), "unknown"); }*/ + //qDebug() << " - done with item:" << info; + emit threadDone(info, bytes); + //return item; } // PRIVATE SLOTS -void Browser::fileChanged(QString){ - +void Browser::fileChanged(QString file){ + if(file.startsWith(currentDir+"/")){ QtConcurrent::run(this, &Browser::loadItem, file ); } + else if(file==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } } -void Browser::dirChanged(QString){ +void Browser::dirChanged(QString dir){ + if(dir==currentDir){ QTimer::singleShot(0, this, SLOT(loadDirectory()) ); } + else if(dir.startsWith(currentDir)){ QtConcurrent::run(this, &Browser::loadItem, dir ); } +} +void Browser::futureFinished(QString name, QByteArray icon){ + //Note: this will be called once for every item that loads + QIcon ico; + LFileInfo info(name); + if(!icon.isEmpty()){ + QPixmap pix; + if(pix.loadFromData(icon) ){ ico.addPixmap(pix); } + }else if(info.isDir()){ + ico = LXDG::findIcon("folder","inode/directory"); + } + if(ico.isNull()){ + //qDebug() << "MimeType:" << info.fileName() << info.mimetype(); + ico = LXDG::findIcon( info.iconfile(), "unknown" ); + } + this->emit itemDataAvailable( ico, info ); } // PUBLIC SLOTS -QString Browser::loadDirectory(QString dir){ +void Browser::loadDirectory(QString dir){ + //qDebug() << "Load Directory" << dir; if(dir.isEmpty()){ dir = currentDir; } //reload current directory if(dir.isEmpty()){ return; } //nothing to do - nothing previously loaded + if(currentDir != dir){ //let the main widget know to clear all current items (completely different dir) + oldFiles.clear(); + emit clearItems(); + } + currentDir = dir; //save this for later //clean up the watcher first QStringList watched; watched << watcher->files() << watcher->directories(); if(!watched.isEmpty()){ watcher->removePaths(watched); } - emit clearItems(); //let the main widget know to clear all current items - //QApplication::processEvents(); + QStringList old = oldFiles; //copy this over for the moment (both lists will change in a moment) + oldFiles.clear(); //get ready for re-creating this list // read the given directory QDir directory(dir); if(directory.exists()){ - QFileInfoList files; - if(showHidden){ files = directory.entryInfoList( QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotOrDotDot, QDir::NoSort); } - else{ files = directory.entryInfoList( QDir::Dirs | QDir::Files | QDir::NoDotOrDotDot, QDir::NoSort); } + QStringList files; + if(showHidden){ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDir::NoSort); } + else{ files = directory.entryList( QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::NoSort); } + emit itemsLoading(files.length()); + QCoreApplication::processEvents(); for(int i=0; i<files.length(); i++){ - watcher->addPath(files[i].absoluteFilePath()); - QtConcurrent::run(this, &Browser::loadDirectory, files[i]); + watcher->addPath(directory.absoluteFilePath(files[i])); + //qDebug() << "Future Starting:" << files[i]; + QString path = directory.absoluteFilePath(files[i]); + if(old.contains(path)){ old.removeAll(path); } + oldFiles << path; //add to list for next time + QtConcurrent::run(this, &Browser::loadItem, path ); + QCoreApplication::sendPostedEvents(); } watcher->addPath(directory.absolutePath()); + if(!old.isEmpty()){ + old.removeAll(directory.absolutePath()); + for(int i=0; i<old.length(); i++){ + emit itemRemoved(old[i]); + } + } + }else{ + emit itemsLoading(0); //nothing to load } } diff --git a/src-qt5/desktop-utils/lumina-fm/Browser.h b/src-qt5/desktop-utils/lumina-fm/Browser.h index 21dd7789..7b180da9 100644 --- a/src-qt5/desktop-utils/lumina-fm/Browser.h +++ b/src-qt5/desktop-utils/lumina-fm/Browser.h @@ -9,39 +9,62 @@ #ifndef _LUMINA_FM_BROWSE_BACKEND_H #define _LUMINA_FM_BROWSE_BACKEND_H +#include <QObject> +#include <QString> +#include <QFileSystemWatcher> +#include <QIcon> +//#include <QFutureWatcher> + +#include <LuminaXDG.h> +/*class FileItem{ +public: + QString name; + QByteArray icon; + + FileItem(){} + ~FileItem(){}; +};*/ + class Browser : public QObject{ Q_OBJECT public: Browser(QObject *parent = 0); ~Browser(); + QString currentDirectory(); void showHiddenFiles(bool); bool showingHiddenFiles(); + //FileItem loadItem(QString info); //this is the main loader class - multiple instances each run in a separate thread + private: QString currentDir; QFileSystemWatcher *watcher; bool showHidden; + QStringList imageFormats, oldFiles; - void loadItem(QFileInfo info); //this is the main loader class - multiple instances each run in a separate thread + void loadItem(QString info); //this is the main loader class - multiple instances each run in a separate thread private slots: void fileChanged(QString); //tied into the watcher - for file change notifications void dirChanged(QString); // tied into the watcher - for new/removed files in the current dir + void futureFinished(QString, QByteArray); + public slots: - QString loadDirectory(QString dir = ""); + void loadDirectory(QString dir = ""); signals: //Main Signals - void itemUpdated(QString item); //emitted if a file changes after the initial scan + void itemRemoved(QString item); //emitted if a file was removed from the underlying void clearItems(); //emitted when dirs change for example void itemDataAvailable(QIcon, LFileInfo); //Start/Stop signals for loading of data void itemsLoading(int); //number of items which are getting loaded - void itemsDoneLoading(); //emitted when all items are done loading + //Internal signal for the alternate threads + void threadDone(QString, QByteArray); }; #endif diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp new file mode 100644 index 00000000..e007b974 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.cpp @@ -0,0 +1,377 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "BrowserWidget.h" + +#include <QVBoxLayout> +#include <QTimer> +#include <QSettings> + +#include <LuminaUtils.h> +#include <LuminaOS.h> + +BrowserWidget::BrowserWidget(QString objID, QWidget *parent) : QWidget(parent){ + //Setup the Widget/UI + this->setLayout( new QVBoxLayout(this) ); + ID = objID; + //Setup the backend browser object + BROWSER = new Browser(this); + connect(BROWSER, SIGNAL(clearItems()), this, SLOT(clearItems()) ); + connect(BROWSER, SIGNAL(itemRemoved(QString)), this, SLOT(itemRemoved(QString)) ); + connect(BROWSER, SIGNAL(itemDataAvailable(QIcon, LFileInfo)), this, SLOT(itemDataAvailable(QIcon, LFileInfo)) ); + connect(BROWSER, SIGNAL(itemsLoading(int)), this, SLOT(itemsLoading(int)) ); + connect(this, SIGNAL(dirChange(QString)), BROWSER, SLOT(loadDirectory(QString)) ); + listWidget = 0; + treeWidget = 0; + readDateFormat(); + freshload = true; //nothing loaded yet + numItems = 0; + +} + +BrowserWidget::~BrowserWidget(){ + +} + +void BrowserWidget::changeDirectory(QString dir){ + qDebug() << "Change Directory:" << dir << historyList; + if(BROWSER->currentDirectory()==dir){ return; } //already on this directory + + if( !dir.contains("/.zfs/snapshot/") ){ + if(historyList.isEmpty() || !dir.isEmpty()){ historyList << dir; } + }else{ + //Need to remove the zfs snapshot first and ensure that it is not the same dir (just a diff snapshot) + QString cleaned = dir.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" ); + if( (historyList.isEmpty() || historyList.last()!=cleaned) && !cleaned.isEmpty() ){ historyList << cleaned; } + } + qDebug() << "History:" << historyList; + emit dirChange(dir); +} + +void BrowserWidget::showDetails(bool show){ + //Clean up widgets first + QSize iconsize; + if(show && listWidget!=0){ + //Clean up list widget + iconsize = listWidget->iconSize(); + this->layout()->removeWidget(listWidget); + listWidget->deleteLater(); + listWidget = 0; + }else if(!show && treeWidget!=0){ + iconsize = treeWidget->iconSize(); + this->layout()->removeWidget(treeWidget); + treeWidget->deleteLater(); + treeWidget = 0; + } + qDebug() << "Create Widget: details:" << show; + //Now create any new widgets + if(show && treeWidget == 0){ + treeWidget = new DDTreeWidget(this); + treeWidget->setContextMenuPolicy(Qt::CustomContextMenu); + if(!iconsize.isNull()){ treeWidget->setIconSize(iconsize); } + this->layout()->addWidget(treeWidget); + connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SIGNAL(itemsActivated()) ); + connect(treeWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SIGNAL(contextMenuRequested()) ); + connect(treeWidget, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(DataDropped(QString, QStringList)) ); + connect(treeWidget, SIGNAL(GotFocus()), this, SLOT(selectionChanged()) ); + retranslate(); + treeWidget->sortItems(0, Qt::AscendingOrder); + if(!BROWSER->currentDirectory().isEmpty()){ emit dirChange(""); } + }else if(!show && listWidget==0){ + listWidget = new DDListWidget(this); + listWidget->setContextMenuPolicy(Qt::CustomContextMenu); + if(!iconsize.isNull()){ listWidget->setIconSize(iconsize); } + this->layout()->addWidget(listWidget); + connect(listWidget, SIGNAL(itemActivated(QListWidgetItem*)), this, SIGNAL(itemsActivated()) ); + connect(listWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SIGNAL(contextMenuRequested()) ); + connect(listWidget, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(DataDropped(QString, QStringList)) ); + connect(listWidget, SIGNAL(GotFocus()), this, SLOT(selectionChanged()) ); + if(!BROWSER->currentDirectory().isEmpty()){ emit dirChange(""); } + } + qDebug() << " Done making widget"; +} + +bool BrowserWidget::hasDetails(){ + return (treeWidget!=0); +} + +void BrowserWidget::showHiddenFiles(bool show){ + BROWSER->showHiddenFiles(show); +} + +bool BrowserWidget::hasHiddenFiles(){ + return BROWSER->showingHiddenFiles(); +} + +void BrowserWidget::setThumbnailSize(int px){ + bool larger = true; + if(listWidget!=0){ + larger = listWidget->iconSize().height() < px; + listWidget->setIconSize(QSize(px,px)); + }else if(treeWidget!=0){ + larger = treeWidget->iconSize().height() < px; + treeWidget->setIconSize(QSize(px,px)); + } + //qDebug() << "Changing Icon Size:" << px << larger; + if(BROWSER->currentDirectory().isEmpty() || !larger ){ return; } //don't need to reload icons unless the new size is larger + emit dirChange(""); +} + +int BrowserWidget::thumbnailSize(){ + if(listWidget!=0){ return listWidget->iconSize().height(); } + else if(treeWidget!=0){ return treeWidget->iconSize().height(); } + return 0; +} + +void BrowserWidget::setHistory(QStringList paths){ + //NOTE: later items are used first + historyList = paths; +} + +QStringList BrowserWidget::history(){ + return historyList; +} + +void BrowserWidget::setShowActive(bool show){ + if(!show){ this->setStyleSheet("QAbstractScrollArea{ background-color: rgba(10,10,10,10); }"); } + else{ + this->setStyleSheet( "QAbstractScrollArea{ background-color: white; }"); + } +} + +// This function is only called if user changes sessionsettings. By doing so, operations like sorting by date +// are faster because the date format is already stored in DirWidget::date_format static variable +void BrowserWidget::readDateFormat() { + if(!date_format.isEmpty()) + date_format.clear(); + QSettings settings("lumina-desktop","sessionsettings"); + // If value doesn't exist or is not setted, empty string is returned + date_format << settings.value("DateFormat").toString(); + date_format << settings.value("TimeFormat").toString(); +} + + +QStringList BrowserWidget::currentSelection(){ + QStringList out; + if(listWidget!=0){ + QList<QListWidgetItem*> sel = listWidget->selectedItems(); + //qDebug() << "Selection number:" << sel.length(); + //if(sel.isEmpty() && listWidget->currentItem()!=0){ sel << listWidget->currentItem(); } + //qDebug() << "Selection number:" << sel.length(); + for(int i=0; i<sel.length(); i++){ out << sel[i]->whatsThis(); qDebug() << "Selection:" << sel[i]->text() << sel[i]->whatsThis(); } + }else if(treeWidget!=0){ + QList<QTreeWidgetItem*> sel = treeWidget->selectedItems(); + //if(sel.isEmpty() && treeWidget->currentItem()!=0){ sel << treeWidget->currentItem(); } + for(int i=0; i<sel.length(); i++){ out << sel[i]->whatsThis(0); } + } + out.removeDuplicates(); //just in case - tree widgets sometimes "select" each column as an individual item + return out; +} + +QStringList BrowserWidget::currentItems(int type){ + //type: 0=all, -1=files, +1=dirs + QStringList paths; + if(listWidget!=0){ + for(int i=0; i<listWidget->count(); i++){ + if(i<0 && (listWidget->item(i)->data(Qt::UserRole).toString()=="file") ){ //FILES + paths << listWidget->item(i)->whatsThis(); + }else if(i>0 && (listWidget->item(i)->data(Qt::UserRole).toString()=="dir")){ //DIRS + paths << listWidget->item(i)->whatsThis(); + }else if(i==0){ //ALL + paths << listWidget->item(i)->whatsThis(); + } + } + }else if(treeWidget!=0){ + for(int i=0; i<treeWidget->topLevelItemCount(); i++){ + if(i<0 && !treeWidget->topLevelItem(i)->text(1).isEmpty()){ //FILES + paths << treeWidget->topLevelItem(i)->whatsThis(0); + }else if(i>0 && treeWidget->topLevelItem(i)->text(1).isEmpty()){ //DIRS + paths << treeWidget->topLevelItem(i)->whatsThis(0); + }else if(i==0){ //ALL + paths << treeWidget->topLevelItem(i)->whatsThis(0); + } + } + } + return paths; +} + +// ================= +// PUBLIC SLOTS +// ================= +void BrowserWidget::retranslate(){ + if(listWidget!=0){ + + }else if(treeWidget!=0){ + QTreeWidgetItem *it = new QTreeWidgetItem(); + it->setText(0,tr("Name")); + it->setText(1,tr("Size")); + it->setText(2, tr("Type")); + it->setText(3, tr("Date Modified") ); + it->setText(4, tr("Date Created") ); + treeWidget->setHeaderItem(it); + //Now reset the sorting (alphabetically, dirs first) + treeWidget->sortItems(0, Qt::AscendingOrder); // sort by name + treeWidget->sortItems(1, Qt::AscendingOrder); //sort by type + } +} + +// ================= +// PRIVATE +// ================= +QString BrowserWidget::DTtoString(QDateTime dt){ + QStringList fmt = date_format; + if(fmt.isEmpty() || fmt.length()!=2 || (fmt[0].isEmpty() && fmt[1].isEmpty()) ){ + //Default formatting + return dt.toString(Qt::DefaultLocaleShortDate); + }else if(fmt[0].isEmpty()){ + //Time format only + return (dt.date().toString(Qt::DefaultLocaleShortDate)+" "+dt.time().toString(fmt[1])); + }else if(fmt[1].isEmpty()){ + //Date format only + return (dt.date().toString(fmt[0])+" "+dt.time().toString(Qt::DefaultLocaleShortDate)); + }else{ + //both date/time formats set + return dt.toString(fmt.join(" ")); + } +} + +// ================= +// PRIVATE SLOTS +// ================= +void BrowserWidget::clearItems(){ + //qDebug() << "Clear Items"; + if(listWidget!=0){ listWidget->clear(); } + else if(treeWidget!=0){ treeWidget->clear(); } + freshload = true; +} + +void BrowserWidget::itemRemoved(QString item){ + //qDebug() << "item removed" << item; + if(treeWidget!=0){ + QList<QTreeWidgetItem*> found = treeWidget->findItems(item.section("/",-1), Qt::MatchExactly, 0); //look for exact name match + if(found.isEmpty()){ return; } //no match + delete found[0]; + }else if(listWidget!=0){ + QList<QListWidgetItem*> found = listWidget->findItems(item.section("/",-1), Qt::MatchExactly); //look for exact name match + if(found.isEmpty()){ return; } + delete found[0]; + } +} + +void BrowserWidget::itemDataAvailable(QIcon ico, LFileInfo info){ + //qDebug() << "Item Data Available:" << info.fileName(); + int num = 0; + if(listWidget!=0){ + //LIST WIDGET - name and icon only + if(!listWidget->findItems(info.fileName(), Qt::MatchExactly).isEmpty()){ + //Update existing item + QListWidgetItem *it = listWidget->findItems(info.fileName(), Qt::MatchExactly).first(); + it->setText(info.fileName()); + it->setWhatsThis(info.absoluteFilePath()); + it->setIcon(ico); + }else{ + //New item + QListWidgetItem *it = new CQListWidgetItem(ico, info.fileName(), listWidget); + it->setWhatsThis(info.absoluteFilePath()); + it->setData(Qt::UserRole, (info.isDir() ? "dir" : "file")); //used for sorting + listWidget->addItem(it); + } + num = listWidget->count(); + }else if(treeWidget!=0){ + QTreeWidgetItem *it = 0; + if( ! treeWidget->findItems(info.fileName(), Qt::MatchExactly, 0).isEmpty() ){ it = treeWidget->findItems(info.fileName(), Qt::MatchExactly, 0).first(); } + else{ + it = new CQTreeWidgetItem(treeWidget); + it->setText(0, info.fileName() ); //name (0) + treeWidget->addTopLevelItem(it); + } + //Now set/update all the data + it->setIcon(0, ico); + it->setText(1, info.isDir() ? "" : LUtils::BytesToDisplaySize(info.size()) ); //size (1) + it->setText(2, info.mimetype() ); //type (2) + it->setText(3, DTtoString(info.lastModified() )); //modification date (3) + it->setText(4, DTtoString(info.created()) ); //creation date (4) + //Now all the hidden data + it->setWhatsThis(0, info.absoluteFilePath()); + it->setWhatsThis(3, info.lastModified().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually + it->setWhatsThis(4, info.created().toString("yyyyMMddhhmmsszzz") ); //sorts by this actually + num = treeWidget->topLevelItemCount(); + } + if(num < numItems){ + //Still loading items + //this->setEnabled(false); + }else{ + if(freshload && treeWidget!=0){ + //qDebug() << "Resize Tree Widget Contents"; + for(int i=0; i<treeWidget->columnCount(); i++){ treeWidget->resizeColumnToContents(i); } + } + freshload = false; //any further changes are updates - not a fresh load of a dir + //Done loading items + //this->setEnabled(true); + //Assemble any status message + QString stats = QString(tr("Capacity: %1")).arg(LOS::FileSystemCapacity(BROWSER->currentDirectory())); + int nF, nD; + double bytes = 0; + nF = nD = 0; + if(listWidget!=0){ + bytes = -1; //not supported for this widget + for(int i=0; i<listWidget->count(); i++){ + if(listWidget->item(i)->data(Qt::UserRole).toString()=="dir"){ nD++; } //directory + else{ nF++; } //file + } + }else if(treeWidget!=0){ + for(int i=0; i<treeWidget->topLevelItemCount(); i++){ + if(treeWidget->topLevelItem(i)->text(1).isEmpty()){ + nD++; //directory + }else{ + nF++; //file + bytes+=LUtils::DisplaySizeToBytes(treeWidget->topLevelItem(i)->text(1)); + } + } + } + + if( (nF+nD) >0){ + stats.prepend("\t"); + if(nF>0){ + //Has Files + if(bytes>0){ + stats.prepend( QString(tr("Files: %1 (%2)")).arg(QString::number(nF), LUtils::BytesToDisplaySize(bytes)) ); + }else{ + stats.prepend( QString(tr("Files: %1")).arg(QString::number(nF)) ); + } + } + if(nD > 0){ + //Has Dirs + if(nF>0){ stats.prepend(" / "); }//has files output already + stats.prepend( QString(tr("Dirs: %1")).arg(QString::number(nD)) ); + } + } + emit updateDirectoryStatus( stats.simplified() ); + statustip = stats.simplified(); //save for later + }//end check for finished loading items +} + +void BrowserWidget::itemsLoading(int total){ + //qDebug() << "Got number of items loading:" << total; + numItems = total; //save this for later + if(total<1){ + emit updateDirectoryStatus( tr("No Directory Contents") ); + this->setEnabled(true); + } +} + +void BrowserWidget::selectionChanged(){ + emit hasFocus(ID); //let the parent know the widget is "active" with the user +} + +void BrowserWidget::resizeEvent(QResizeEvent *ev){ + QWidget::resizeEvent(ev); //do the normal processing first + //The list widget needs to be poked to rearrange the items to fit the new size + // tree widget does this fine at the moment. + if(listWidget!=0){ + listWidget->sortItems(Qt::AscendingOrder); + } +} diff --git a/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h new file mode 100644 index 00000000..803a036d --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/BrowserWidget.h @@ -0,0 +1,92 @@ +// Lumina-DE source code +// Copyright (c) 2016, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +// This is the main browsing frontend for the file manager +//=========================================== +#ifndef _LUMINA_FM_BROWSE_FRONTEND_H +#define _LUMINA_FM_BROWSE_FRONTEND_H + +#include <QString> +#include <QWidget> +#include <QThread> + +#include "Browser.h" +#include "widgets/DDListWidgets.h" + +class BrowserWidget : public QWidget{ + Q_OBJECT +private: + Browser *BROWSER; + //QThread *bThread; //browserThread + int numItems; //used for checking if all the items have loaded yet + QString ID, statustip; + QStringList date_format, historyList; + bool freshload; + + //The drag and drop brower widgets + DDListWidget *listWidget; + DDTreeWidget *treeWidget; + + QString DTtoString(QDateTime dt); //QDateTime to string simplification routine + +public: + BrowserWidget(QString objID, QWidget *parent = 0); + ~BrowserWidget(); + + QString id(){ return ID; } + + void changeDirectory(QString dir); + QString currentDirectory(){ return BROWSER->currentDirectory(); } + + void showDetails(bool show); + bool hasDetails(); + + void showHiddenFiles(bool show); + bool hasHiddenFiles(); + + void setThumbnailSize(int px); + int thumbnailSize(); + + void setHistory(QStringList); + QStringList history(); + + void setShowActive(bool show); //used for accenting if the widget is "active" + + QString status(){ return statustip; } + + //Date format for show items + void readDateFormat(); + + //Return all the items which are currently selected + QStringList currentSelection(); + QStringList currentItems(int type = 0); //type: 0=all, -1=files, +1=dirs + +public slots: + void retranslate(); + +private slots: + //Browser connections + void clearItems(); + void itemRemoved(QString); + void itemDataAvailable(QIcon, LFileInfo); + void itemsLoading(int total); + void selectionChanged(); + +protected: + void resizeEvent(QResizeEvent *ev); + +signals: + //External signals + void itemsActivated(); + void updateDirectoryStatus(QString); + void contextMenuRequested(); + void DataDropped(QString, QStringList); + void hasFocus(QString); //ID output + + //Internal signal + void dirChange(QString); //current dir path + +}; +#endif diff --git a/src-qt5/desktop-utils/lumina-fm/DirData.h b/src-qt5/desktop-utils/lumina-fm/DirData.h index c3ace5a4..546dd6c5 100644 --- a/src-qt5/desktop-utils/lumina-fm/DirData.h +++ b/src-qt5/desktop-utils/lumina-fm/DirData.h @@ -32,6 +32,7 @@ public: QString dirpath; //directory this structure was reading QString snapdir; //base snapshot directory (if one was requested/found) bool hashidden; + QStringList mntpoints; //Access Functions LDirInfoList(QString path = ""){ @@ -39,6 +40,11 @@ public: list.clear(); fileNames.clear(); hashidden = false; + //Generate the list of all mountpoints if possible + if(LUtils::isValidBinary("zfs")){ + mntpoints = LUtils::getCmdOutput("zfs list -H -o mountpoint").filter("/"); + mntpoints.removeDuplicates(); + } } ~LDirInfoList(){} @@ -72,23 +78,21 @@ public: } void findSnapDir(){ - //Search the filesystem + //Search the filesystem if(dirpath.contains(ZSNAPDIR)){ snapdir = dirpath.section(ZSNAPDIR,0,0)+ZSNAPDIR; //no need to go looking for it + }else if(mntpoints.isEmpty()){ + snapdir.clear(); //no zfs dirs available }else{ - //Need to backtrack - QDir dir(dirpath); - bool found = false; - while(dir.canonicalPath()!="/" && !found){ - //qDebug() << " -- Checking for snapshot dir:" << dir.canonicalPath(); - if(dir.exists(".zfs/snapshot")){ - snapdir = dir.canonicalPath()+ZSNAPDIR; - found = true; - }else{ - dir.cdUp(); - } - }//end loop - } + //Only check the mountpoint associated with this directory + QString mnt; + for(int i=0; i<mntpoints.length(); i++){ + if(dirpath == mntpoints[i]){ mnt = mntpoints[i]; break; } + else if(dirpath.startsWith(mntpoints[i]) && mntpoints[i].length()>mnt.length()){ mnt = mntpoints[i]; } + } + if(QFile::exists(mnt+ZSNAPDIR)){ snapdir = mnt+ZSNAPDIR; } + else{ snapdir.clear(); } //none found + } } }; @@ -119,6 +123,7 @@ public: public slots: void GetDirData(QString ID, QString dirpath){ + return; if(pauseData){ return; } if(DIR_DEBUG){ qDebug() << "GetDirData:" << ID << dirpath; } //The ID is used when returning the info in a moment @@ -146,7 +151,7 @@ public slots: //Only check if ZFS is flagged as available if(zfsavailable){ //First find if the hash already has an entry for this directory - if(false){ //!HASH.contains(dirpath)){ + if(!HASH.contains(dirpath)){ LDirInfoList info(dirpath); HASH.insert(dirpath,info); } diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp index 59b671b5..bac365e1 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.cpp @@ -15,11 +15,11 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ //for Signal/slot we must register the Typedef of QFileInfoList - qRegisterMetaType<QFileInfoList>("QFileInfoList"); + //qRegisterMetaType<QFileInfoList>("QFileInfoList"); qRegisterMetaType< LFileInfoList >("LFileInfoList"); //just to silence/fix some Qt connect warnings in QtConcurrent - qRegisterMetaType< QVector<int> >("QVector<int>"); - qRegisterMetaType< QList<QPersistentModelIndex> >("QList<QPersistentModelIndex>"); + //qRegisterMetaType< QVector<int> >("QVector<int>"); + //qRegisterMetaType< QList<QPersistentModelIndex> >("QList<QPersistentModelIndex>"); ui->setupUi(this); @@ -27,9 +27,6 @@ MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){ if(DEBUG){ qDebug() << "Initilization:"; } settings = new QSettings( QSettings::UserScope, "lumina-desktop", "lumina-fm", this); - //syncTimer = new QTimer(this); - //syncTimer->setInterval(200); //1/5 second (collect as many signals/slots as necessary - //syncTimer->setSingleShot(true); //Reset the UI to the previously used size (if possible) QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); if(!orig.isEmpty() && orig.isValid()){ @@ -56,34 +53,29 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); workThread->setObjectName("Lumina-fm filesystem worker"); worker = new DirData(); worker->zfsavailable = LUtils::isValidBinary("zfs"); - connect(worker, SIGNAL(DirDataAvailable(QString, QString, LFileInfoList)), this, SLOT(DirDataAvailable(QString, QString, LFileInfoList)) ); + //connect(worker, SIGNAL(DirDataAvailable(QString, QString, LFileInfoList)), this, SLOT(DirDataAvailable(QString, QString, LFileInfoList)) ); connect(worker, SIGNAL(SnapshotDataAvailable(QString, QString, QStringList)), this, SLOT(SnapshotDataAvailable(QString, QString, QStringList)) ); worker->moveToThread(workThread); - //if(DEBUG){ qDebug() << " - File System Model"; } - //fsmod = new QFileSystemModel(this); - //fsmod->setRootPath(QDir::homePath()); - //dirCompleter = new QCompleter(fsmod, this); - //dirCompleter->setModelSorting( QCompleter::CaseInsensitivelySortedModel ); if(DEBUG){ qDebug() << " - Context Menu"; } contextMenu = new QMenu(this); radio_view_details = new QRadioButton(tr("Detailed List"), this); radio_view_list = new QRadioButton(tr("Basic List"), this); - radio_view_tabs = new QRadioButton(tr("Prefer Tabs"), this); - radio_view_cols = new QRadioButton(tr("Prefer Columns"), this); + //radio_view_tabs = new QRadioButton(tr("Prefer Tabs"), this); + //radio_view_cols = new QRadioButton(tr("Prefer Columns"), this); ui->menuView_Mode->clear(); - ui->menuGroup_Mode->clear(); + //ui->menuGroup_Mode->clear(); detWA = new QWidgetAction(this); detWA->setDefaultWidget(radio_view_details); listWA = new QWidgetAction(this); listWA->setDefaultWidget(radio_view_list); - tabsWA = new QWidgetAction(this); - tabsWA->setDefaultWidget(radio_view_tabs); - colsWA = new QWidgetAction(this); - colsWA->setDefaultWidget(radio_view_cols); + //tabsWA = new QWidgetAction(this); + //tabsWA->setDefaultWidget(radio_view_tabs); + //colsWA = new QWidgetAction(this); + //colsWA->setDefaultWidget(radio_view_cols); ui->menuView_Mode->addAction(detWA); ui->menuView_Mode->addAction(listWA); - ui->menuGroup_Mode->addAction(tabsWA); - ui->menuGroup_Mode->addAction(colsWA); + //ui->menuGroup_Mode->addAction(tabsWA); + //ui->menuGroup_Mode->addAction(colsWA); //Setup the pages //ui->BrowserLayout->clear(); ui->page_player->setLayout(new QVBoxLayout()); @@ -113,8 +105,6 @@ QSize orig = settings->value("preferences/MainWindowSize", QSize()).toSize(); if(DEBUG){ qDebug() << " - Devices"; } RebuildDeviceMenu(); //Make sure we start on the browser page - if(DEBUG){ qDebug() << " - Load Browser Page"; } - //goToBrowserPage(); if(DEBUG){ qDebug() << " - Done with init"; } } @@ -149,7 +139,7 @@ void MainUI::OpenDirs(QStringList dirs){ DWLIST << DW; //Connect the signals/slots for it connect(DW, SIGNAL(OpenDirectories(QStringList)), this, SLOT(OpenDirs(QStringList)) ); - connect(DW, SIGNAL(LoadDirectory(QString, QString)), worker, SLOT(GetDirData(QString, QString)) ); + //connect(DW, SIGNAL(LoadDirectory(QString, QString)), worker, SLOT(GetDirData(QString, QString)) ); connect(DW, SIGNAL(findSnaps(QString, QString)), worker, SLOT(GetSnapshotData(QString, QString)) ); connect(DW, SIGNAL(PlayFiles(LFileInfoList)), this, SLOT(OpenPlayer(LFileInfoList)) ); connect(DW, SIGNAL(ViewFiles(LFileInfoList)), this, SLOT(OpenImages(LFileInfoList)) ); @@ -161,12 +151,13 @@ void MainUI::OpenDirs(QStringList dirs){ connect(DW, SIGNAL(RemoveFiles(QStringList)), this, SLOT(RemoveFiles(QStringList)) ); connect(DW, SIGNAL(PasteFiles(QString,QStringList)), this, SLOT(PasteFiles(QString, QStringList)) ); connect(DW, SIGNAL(CloseBrowser(QString)), this, SLOT(CloseBrowser(QString)) ); + connect(DW, SIGNAL(TabNameChanged(QString,QString)), this, SLOT(TabNameChanged(QString, QString)) ); //Now create the tab for this - if(radio_view_tabs->isChecked()){ + //if(radio_view_tabs->isChecked()){ int index = tabBar->addTab( LXDG::findIcon("folder-open",""), dirs[i].section("/",-1) ); tabBar->setTabWhatsThis( index, "DW-"+QString::number(id) ); tabBar->setCurrentIndex(index); - }else{ + /*}else{ //Just make sure the browser tab is visible bool found = false; for(int i=0; i<tabBar->count() && !found; i++){ @@ -178,17 +169,11 @@ void MainUI::OpenDirs(QStringList dirs){ tabBar->setTabWhatsThis( index, "browser" ); tabBar->setCurrentIndex(index); } - } + }*/ //Initialize the widget with the proper settings - DW->setShowDetails(radio_view_details->isChecked()); - DW->setShowSidebar(ui->actionShow_Action_Buttons->isChecked()); - QList<DirWidget::DETAILTYPES> details; details <<DirWidget::NAME << DirWidget::SIZE << DirWidget::TYPE << DirWidget::DATEMOD; - DW->setDetails(details); //Which details to show and in which order (L->R) - DW->setShowThumbnails(ui->actionShow_Thumbnails->isChecked()); + DW->setShowDetails(radio_view_details->isChecked()); DW->setThumbnailSize(settings->value("iconsize", 32).toInt()); - //DW->setDirCompleter(dirCompleter); - DW->setShowCloseButton(!radio_view_tabs->isChecked()); //Now load the directory DW->ChangeDir(dirs[i]); //kick off loading the directory info } @@ -225,9 +210,6 @@ void MainUI::setupIcons(){ // View menu ui->actionRefresh->setIcon( LXDG::findIcon("view-refresh","") ); ui->menuView_Mode->setIcon( LXDG::findIcon("view-choose","") ); - ui->menuGroup_Mode->setIcon( LXDG::findIcon("tab-duplicate","") ); - ui->actionLarger_Icons->setIcon( LXDG::findIcon("zoom-in","") ); - ui->actionSmaller_Icons->setIcon( LXDG::findIcon("zoom-out", "") ); // Bookmarks menu ui->actionManage_Bookmarks->setIcon( LXDG::findIcon("bookmarks-organize","") ); @@ -253,8 +235,8 @@ void MainUI::setupConnections(){ //Radio Buttons connect(radio_view_details, SIGNAL(toggled(bool)), this, SLOT(viewModeChanged(bool)) ); connect(radio_view_list, SIGNAL(toggled(bool)), this, SLOT(viewModeChanged(bool)) ); - connect(radio_view_tabs, SIGNAL(toggled(bool)), this, SLOT(groupModeChanged(bool)) ); - connect(radio_view_cols, SIGNAL(toggled(bool)), this, SLOT(groupModeChanged(bool)) ); + //connect(radio_view_tabs, SIGNAL(toggled(bool)), this, SLOT(groupModeChanged(bool)) ); + //connect(radio_view_cols, SIGNAL(toggled(bool)), this, SLOT(groupModeChanged(bool)) ); //Special Keyboard Shortcuts connect(nextTabLShort, SIGNAL(activated()), this, SLOT( prevTab() ) ); @@ -280,25 +262,28 @@ void MainUI::togglehiddenfiles() void MainUI::loadSettings(){ //Note: make sure this is run after all the UI elements are created and connected to slots // but before the first directory gets loaded - ui->actionView_Hidden_Files->setChecked( settings->value("showhidden", false).toBool() ); + QSettings SET("lumina-desktop","lumina-fm"); + ui->actionView_Hidden_Files->setChecked( SET.value("showhidden", false).toBool() ); on_actionView_Hidden_Files_triggered(); //make sure to update the models too - ui->actionShow_Action_Buttons->setChecked(settings->value("showactions", true).toBool() ); - on_actionShow_Action_Buttons_triggered(); //make sure to update the UI - ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails", true).toBool() ); + //ui->actionShow_Action_Buttons->setChecked(settings->value("showactions", true).toBool() ); + //on_actionShow_Action_Buttons_triggered(); //make sure to update the UI + //ui->actionShow_Thumbnails->setChecked( settings->value("showthumbnails", true).toBool() ); //View Type - bool showDetails = (settings->value("viewmode","details").toString()=="details"); + //qDebug() << "View Mode:" << SET.value("viewmode","details").toString(); + bool showDetails = (SET.value("viewmode","details").toString()=="details"); if(showDetails){ radio_view_details->setChecked(true); } else{ radio_view_list->setChecked(true); } //Grouping type - bool usetabs = (settings->value("groupmode","tabs").toString()=="tabs"); - if(usetabs){ radio_view_tabs->setChecked(true); } - else{ radio_view_cols->setChecked(true); } + //bool usetabs = (SET.value("groupmode","tabs").toString()=="tabs"); + //if(usetabs){ radio_view_tabs->setChecked(true); } + // else{ radio_view_cols->setChecked(true); } } void MainUI::RebuildBookmarksMenu(){ //Create the bookmarks menu - QStringList BM = settings->value("bookmarks", QStringList()).toStringList(); + QSettings SET("lumina-desktop","lumina-fm"); + QStringList BM = SET.value("bookmarks", QStringList()).toStringList(); ui->menuBookmarks->clear(); ui->menuBookmarks->addAction(ui->actionManage_Bookmarks); ui->menuBookmarks->addAction(ui->actionAdd_Bookmark); @@ -306,18 +291,19 @@ void MainUI::RebuildBookmarksMenu(){ bool changed = false; BM.sort(); //Sort alphabetically for(int i=0; i<BM.length(); i++){ - if(QFile::exists(BM[i].section("::::",1,1)) ){ + //NOTE 9/28/16: Don't do existance checks here - if a network drive is specified it can cause the loading process to hang significantly + //if(QFile::exists(BM[i].section("::::",1,1)) ){ QAction *act = new QAction(BM[i].section("::::",0,0),this); act->setWhatsThis(BM[i].section("::::",1,1)); ui->menuBookmarks->addAction(act); - }else{ + /*}else{ //Invalid directory - remove the bookmark BM.removeAt(i); i--; changed = true; - } + }*/ } - if(changed){ settings->setValue("bookmarks",BM); } + if(changed){ SET.setValue("bookmarks",BM); } ui->actionManage_Bookmarks->setEnabled(BM.length()>0); } @@ -434,16 +420,16 @@ void MainUI::on_actionClose_triggered(){ this->close(); } -void MainUI::on_actionRename_triggered(){ +/*void MainUI::on_actionRename_triggered(){ DirWidget *dir = FindActiveBrowser(); if(DEBUG){ qDebug() << "Rename Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryRenameSelection()) ); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(renameFiles()) ); } } void MainUI::on_actionCut_Selection_triggered(){ DirWidget *dir = FindActiveBrowser(); if(DEBUG){ qDebug() << "Cut Shortcut Pressed:" << dir << dir->currentDir(); } - if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryCutSelection()) ); } + if(dir!=0){ QTimer::singleShot(0, dir, SLOT(cutFiles()) ); } } void MainUI::on_actionCopy_Selection_triggered(){ @@ -462,7 +448,7 @@ void MainUI::on_actionDelete_Selection_triggered(){ DirWidget *dir = FindActiveBrowser(); if(DEBUG){ qDebug() << "Delete Shortcut Pressed:" << dir << dir->currentDir(); } if(dir!=0){ QTimer::singleShot(0, dir, SLOT(TryDeleteSelection()) ); } -} +}*/ void MainUI::on_actionRefresh_triggered(){ DirWidget *cur = FindActiveBrowser(); @@ -473,24 +459,24 @@ void MainUI::on_actionView_Hidden_Files_triggered(){ worker->showHidden = ui->actionView_Hidden_Files->isChecked(); //Now save this setting for later settings->setValue("showhidden", ui->actionView_Hidden_Files->isChecked()); - worker->showHidden = ui->actionView_Hidden_Files->isChecked(); + //worker->showHidden = ui->actionView_Hidden_Files->isChecked(); //Re-load the current browsers - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); } + for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->showHidden( ui->actionView_Hidden_Files->isChecked() ); }//DWLIST[i]->refresh(); } } -void MainUI::on_actionShow_Action_Buttons_triggered(){ +/*void MainUI::on_actionShow_Action_Buttons_triggered(){ bool show = ui->actionShow_Action_Buttons->isChecked(); settings->setValue("showactions", show); - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowSidebar(show); } -} + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowSidebar(show); } +}*/ -void MainUI::on_actionShow_Thumbnails_triggered(){ +/*void MainUI::on_actionShow_Thumbnails_triggered(){ //Now save this setting for later bool show = ui->actionShow_Thumbnails->isChecked(); settings->setValue("showthumbnails", show); - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowThumbnails(show); } -} + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowThumbnails(show); } +}*/ void MainUI::goToBookmark(QAction *act){ if(act==ui->actionManage_Bookmarks){ @@ -529,8 +515,9 @@ void MainUI::goToDevice(QAction *act){ void MainUI::viewModeChanged(bool active){ if(!active){ return; } //on every view change, all radio buttons will call this function - only run this once though bool showDetails = radio_view_details->isChecked(); - if(showDetails){ settings->setValue("viewmode","details"); } - else{ settings->setValue("viewmode","list"); } + QSettings SET("lumina-desktop","lumina-fm"); + if(showDetails){ SET.setValue("viewmode","details"); } + else{ SET.setValue("viewmode","list"); } //Re-load the view widgets for(int i=0; i<DWLIST.length(); i++){ @@ -539,11 +526,11 @@ void MainUI::viewModeChanged(bool active){ } -void MainUI::groupModeChanged(bool active){ +/*void MainUI::groupModeChanged(bool active){ if(!active){ return; } //on every change, all radio buttons will call this function - only run this once though - bool usetabs = radio_view_tabs->isChecked(); - if(usetabs){ - settings->setValue("groupmode","tabs"); + //bool usetabs = radio_view_tabs->isChecked(); + //if(usetabs){ + //settings->setValue("groupmode","tabs"); //Now clean up all the tabs (remove the generic one and add the specific ones) for(int i=0; i<tabBar->count(); i++){ //Remove all the browser tabs @@ -557,7 +544,7 @@ void MainUI::groupModeChanged(bool active){ qDebug() << "Add specific tab:" << DWLIST[i]->currentDir() << DWLIST[i]->id(); int tab = tabBar->addTab( LXDG::findIcon("folder-open",""), DWLIST[i]->currentDir().section("/",-1) ); tabBar->setTabWhatsThis(tab, DWLIST[i]->id() ); - DWLIST[i]->setShowCloseButton(false); + //DWLIST[i]->setShowCloseButton(false); } }else{ settings->setValue("groupmode","columns"); @@ -572,12 +559,12 @@ void MainUI::groupModeChanged(bool active){ //Now create the generic "browser" tab int tab = tabBar->addTab( LXDG::findIcon("folder-open",""), tr("Browser") ); tabBar->setTabWhatsThis(tab, "browser" ); - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowCloseButton(true); } + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setShowCloseButton(true); } } if(tabBar->currentIndex()<0){ tabBar->setCurrentIndex(0); } tabBar->setVisible( tabBar->count() > 1 ); QTimer::singleShot(20, this, SLOT(tabChanged()) ); -} +}*/ void MainUI::on_actionLarger_Icons_triggered(){ int size = settings->value("iconsize", 32).toInt(); @@ -645,16 +632,16 @@ void MainUI::tabChanged(int tab){ else if(info=="#SW"){ ui->stackedWidget->setCurrentWidget(ui->page_image); } else{ ui->stackedWidget->setCurrentWidget(ui->page_browser); - if(radio_view_tabs->isChecked()){ + //if(radio_view_tabs->isChecked()){ for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setVisible(DWLIST[i]->id()==info); } - }else{ + /*}else{ //For columns, all widgets need to be visible for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->setVisible(true); } - } + }*/ } tabBar->setVisible( tabBar->count() > 1 ); } @@ -695,22 +682,6 @@ void MainUI::nextTab(){ else{ tabBar->setCurrentIndex( cur+1 ); } } -void MainUI::DirDataAvailable(QString id, QString dir, LFileInfoList list){ - for(int i=0; i<DWLIST.length(); i++){ - if(id == DWLIST[i]->id()){ - DWLIST[i]->LoadDir(dir, list); - break; - } - } - if(radio_view_tabs->isChecked()){ - //Need to update the text for the tab so it corresponds to the current directory loaded - for(int i=0; i<tabBar->count(); i++){ - if(tabBar->tabWhatsThis(i)==id){ - tabBar->setTabText(i, dir.section("/",-1)); - } - } - } -} void MainUI::SnapshotDataAvailable(QString id , QString dir, QStringList list){ for(int i=0; i<DWLIST.length(); i++){ @@ -789,7 +760,7 @@ void MainUI::CutFiles(QStringList list){ QApplication::clipboard()->clear(); QApplication::clipboard()->setMimeData(dat); //Update all the buttons to account for clipboard change - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refreshButtons(); } + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refreshButtons(); } } void MainUI::CopyFiles(QStringList list){ @@ -809,7 +780,7 @@ void MainUI::CopyFiles(QStringList list){ QApplication::clipboard()->clear(); QApplication::clipboard()->setMimeData(dat); //Update all the buttons to account for clipboard change - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refreshButtons(); } + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refreshButtons(); } } void MainUI::PasteFiles(QString dir, QStringList raw){ @@ -864,7 +835,7 @@ void MainUI::PasteFiles(QString dir, QStringList raw){ } } //Update all the buttons to account for clipboard change - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); } + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); } } void MainUI::FavoriteFiles(QStringList list){ @@ -930,13 +901,13 @@ void MainUI::RemoveFiles(QStringList list){ //Now remove the file/dir qDebug() << " - Delete: "<<paths; - worker->pauseData = true; //pause any info requests + //worker->pauseData = true; //pause any info requests FODialog dlg(this); dlg.RemoveFiles(paths); dlg.show(); dlg.exec(); - worker->pauseData = false; //resume info requests - for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); } + //worker->pauseData = false; //resume info requests + //for(int i=0; i<DWLIST.length(); i++){ DWLIST[i]->refresh(); } } void MainUI::CloseBrowser(QString ID){ @@ -959,3 +930,12 @@ void MainUI::CloseBrowser(QString ID){ OpenDirs(QStringList() << QDir::homePath()); } } + +void MainUI::TabNameChanged(QString id, QString name){ + for(int i=0; i<tabBar->count(); i++){ + if(tabBar->tabWhatsThis(i)==id){ + tabBar->setTabText(i, name); + return; + } + } +} diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.h b/src-qt5/desktop-utils/lumina-fm/MainUI.h index 19b40406..94c6f6c2 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.h +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.h @@ -55,7 +55,7 @@ #include "DirData.h" #include "widgets/MultimediaWidget.h" #include "widgets/SlideshowWidget.h" -#include "widgets/DirWidget.h" +#include "widgets/DirWidget2.h" namespace Ui{ class MainUI; @@ -79,8 +79,8 @@ private: QTabBar *tabBar; //QFileSystemModel *fsmod; QMenu *contextMenu; - QRadioButton *radio_view_details, *radio_view_list, *radio_view_tabs, *radio_view_cols; - QWidgetAction *detWA, *listWA, *tabsWA, *colsWA; + QRadioButton *radio_view_details, *radio_view_list;//, *radio_view_tabs, *radio_view_cols; + QWidgetAction *detWA, *listWA;//, *tabsWA, *colsWA; //UI Widgets QList<DirWidget*> DWLIST; @@ -116,19 +116,19 @@ private slots: void on_actionSearch_triggered(); void on_actionClose_Browser_triggered(); void on_actionClose_triggered(); - void on_actionRename_triggered(); + /*void on_actionRename_triggered(); void on_actionCut_Selection_triggered(); void on_actionCopy_Selection_triggered(); void on_actionPaste_triggered(); - void on_actionDelete_Selection_triggered(); + void on_actionDelete_Selection_triggered();*/ void on_actionRefresh_triggered(); void on_actionView_Hidden_Files_triggered(); - void on_actionShow_Action_Buttons_triggered(); - void on_actionShow_Thumbnails_triggered(); + //void on_actionShow_Action_Buttons_triggered(); + //void on_actionShow_Thumbnails_triggered(); void goToBookmark(QAction*); void goToDevice(QAction*); void viewModeChanged(bool); - void groupModeChanged(bool); + //void groupModeChanged(bool); void on_actionLarger_Icons_triggered(); void on_actionSmaller_Icons_triggered(); void CreateBookMark(); @@ -148,7 +148,7 @@ private slots: void focusDirWidget(); //Backend Info passing - void DirDataAvailable(QString, QString, LFileInfoList); + //void DirDataAvailable(QString, QString, LFileInfoList); void SnapshotDataAvailable(QString, QString, QStringList); //Dir Browser Interactions @@ -162,7 +162,8 @@ private slots: void RenameFiles(QStringList); //file selection void RemoveFiles(QStringList); //file selection void CloseBrowser(QString); //ID - + void TabNameChanged(QString, QString); // ID/name + //file info in status bar void DisplayStatusBar(QString); diff --git a/src-qt5/desktop-utils/lumina-fm/MainUI.ui b/src-qt5/desktop-utils/lumina-fm/MainUI.ui index 3c11d87e..f356eadb 100644 --- a/src-qt5/desktop-utils/lumina-fm/MainUI.ui +++ b/src-qt5/desktop-utils/lumina-fm/MainUI.ui @@ -131,23 +131,11 @@ </property> <addaction name="actionTabs"/> </widget> - <widget class="QMenu" name="menuGroup_Mode"> - <property name="title"> - <string>Group Mode</string> - </property> - <addaction name="actionTabs_2"/> - </widget> <addaction name="actionRefresh"/> <addaction name="separator"/> - <addaction name="actionShow_Thumbnails"/> <addaction name="actionView_Hidden_Files"/> - <addaction name="actionShow_Action_Buttons"/> <addaction name="separator"/> <addaction name="menuView_Mode"/> - <addaction name="menuGroup_Mode"/> - <addaction name="separator"/> - <addaction name="actionLarger_Icons"/> - <addaction name="actionSmaller_Icons"/> </widget> <widget class="QMenu" name="menuBookmarks"> <property name="title"> @@ -164,18 +152,6 @@ <addaction name="actionScan"/> <addaction name="separator"/> </widget> - <widget class="QMenu" name="menuEdit"> - <property name="title"> - <string>Edit</string> - </property> - <addaction name="actionRename"/> - <addaction name="separator"/> - <addaction name="actionCut_Selection"/> - <addaction name="actionCopy_Selection"/> - <addaction name="actionPaste"/> - <addaction name="separator"/> - <addaction name="actionDelete_Selection"/> - </widget> <widget class="QMenu" name="menuGit"> <property name="title"> <string>Git</string> @@ -184,7 +160,6 @@ <addaction name="actionClone_Repository"/> </widget> <addaction name="menuFile"/> - <addaction name="menuEdit"/> <addaction name="menuView"/> <addaction name="menuBookmarks"/> <addaction name="menuExternal_Devices"/> @@ -193,7 +168,7 @@ <widget class="QStatusBar" name="statusbar"/> <action name="actionNew_Tab"> <property name="text"> - <string>New Browser</string> + <string>New Tab</string> </property> <property name="toolTip"> <string>New Browser</string> @@ -425,7 +400,7 @@ </action> <action name="actionClose_Browser"> <property name="text"> - <string>Close Browser</string> + <string>Close Tab</string> </property> <property name="shortcut"> <string>Ctrl+W</string> diff --git a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_ca.ts b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_ca.ts index 5220de8d..30b8674d 100644 --- a/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_ca.ts +++ b/src-qt5/desktop-utils/lumina-fm/i18n/lumina-fm_ca.ts @@ -486,92 +486,92 @@ Localització nova: %2</translation> <message> <location filename="../gitWizard.ui" line="46"></location> <source>GitHub Repository Settings</source> - <translation type="unfinished"></translation> + <translation>Paràmetres del repositori GitHub</translation> </message> <message> <location filename="../gitWizard.ui" line="55"></location> <source>Organization/User</source> - <translation type="unfinished"></translation> + <translation>Organització / Usuari</translation> </message> <message> <location filename="../gitWizard.ui" line="65"></location> <source>Repository Name</source> - <translation type="unfinished"></translation> + <translation>Nom del repositori</translation> </message> <message> <location filename="../gitWizard.ui" line="75"></location> <source>Is Private Repository</source> - <translation type="unfinished"></translation> + <translation>És un repositori privat</translation> </message> <message> <location filename="../gitWizard.ui" line="89"></location> <source>Type of Access</source> - <translation type="unfinished"></translation> + <translation>Tipus d'accés</translation> </message> <message> <location filename="../gitWizard.ui" line="95"></location> <source>Use my SSH Key</source> - <translation type="unfinished"></translation> + <translation>Usa la meva clau SSH</translation> </message> <message> <location filename="../gitWizard.ui" line="105"></location> <source>Login to server</source> - <translation type="unfinished"></translation> + <translation>Entra al servidor</translation> </message> <message> <location filename="../gitWizard.ui" line="114"></location> <source>Username</source> - <translation type="unfinished"></translation> + <translation>Nom d'usuari</translation> </message> <message> <location filename="../gitWizard.ui" line="124"></location> <source>Password</source> - <translation type="unfinished"></translation> + <translation>Contrasenya</translation> </message> <message> <location filename="../gitWizard.ui" line="133"></location> <source>Anonymous (public repositories only)</source> - <translation type="unfinished"></translation> + <translation>Anònim (només repositoris públics)</translation> </message> <message> <location filename="../gitWizard.ui" line="143"></location> <source>Optional SSH Password</source> - <translation type="unfinished"></translation> + <translation>Contrasenya SSH opcional</translation> </message> <message> <location filename="../gitWizard.ui" line="153"></location> <source>Advanced Options</source> - <translation type="unfinished"></translation> + <translation>Opcions avançades</translation> </message> <message> <location filename="../gitWizard.ui" line="159"></location> <source>Custom Depth</source> - <translation type="unfinished"></translation> + <translation>Profunditat personalitzada</translation> </message> <message> <location filename="../gitWizard.ui" line="166"></location> <source>Single Branch</source> - <translation type="unfinished"></translation> + <translation>Branca simple</translation> </message> <message> <location filename="../gitWizard.ui" line="175"></location> <source>branch name</source> - <translation type="unfinished"></translation> + <translation>nom de la branca</translation> </message> <message> <location filename="../gitWizard.ui" line="232"></location> <source>Click "Next" to start downloading the repository</source> - <translation type="unfinished"></translation> + <translation>Cliqueu a "Següent" per començar a baixar el repositori</translation> </message> <message> <location filename="../gitWizard.h" line="57"></location> <source>Stop Download?</source> - <translation type="unfinished"></translation> + <translation>Voleu aturar la baixada?</translation> </message> <message> <location filename="../gitWizard.h" line="57"></location> <source>Kill the current download?</source> - <translation type="unfinished"></translation> + <translation>Voleu avortar la baixada actual?</translation> </message> </context> <context> @@ -629,7 +629,7 @@ Localització nova: %2</translation> <message> <location filename="../MainUI.ui" line="181"></location> <source>Git</source> - <translation type="unfinished"></translation> + <translation>Git</translation> </message> <message> <location filename="../MainUI.ui" line="196"></location> @@ -715,12 +715,12 @@ Localització nova: %2</translation> <message> <location filename="../MainUI.ui" line="439"></location> <source>Repo Status</source> - <translation type="unfinished"></translation> + <translation>Estat del repositori</translation> </message> <message> <location filename="../MainUI.ui" line="444"></location> <source>Clone Repository</source> - <translation type="unfinished"></translation> + <translation>Clona el repositori</translation> </message> <message> <location filename="../MainUI.ui" line="202"></location> @@ -895,7 +895,7 @@ Localització nova: %2</translation> <message> <location filename="../MainUI.cpp" line="626"></location> <source>Git Repository Status</source> - <translation type="unfinished"></translation> + <translation>Estat del repositori Git</translation> </message> <message> <location filename="../MainUI.cpp" line="732"></location> @@ -925,7 +925,7 @@ Localització nova: %2</translation> <message> <location filename="../MainUI.cpp" line="101"></location> <source>Ctrl+L</source> - <translation type="unfinished"></translation> + <translation>Ctrl+L</translation> </message> <message> <location filename="../MainUI.cpp" line="429"></location> diff --git a/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro b/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro index 91e2952c..8fb482c7 100644 --- a/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro +++ b/src-qt5/desktop-utils/lumina-fm/lumina-fm.pro @@ -15,9 +15,11 @@ SOURCES += main.cpp \ BMMDialog.cpp \ widgets/MultimediaWidget.cpp \ widgets/SlideshowWidget.cpp \ - widgets/DirWidget.cpp \ + widgets/DirWidget2.cpp \ gitCompat.cpp \ - gitWizard.cpp + gitWizard.cpp \ + Browser.cpp \ + BrowserWidget.cpp HEADERS += MainUI.h \ FODialog.h \ @@ -27,16 +29,18 @@ HEADERS += MainUI.h \ widgets/DDListWidgets.h \ widgets/MultimediaWidget.h \ widgets/SlideshowWidget.h \ - widgets/DirWidget.h \ + widgets/DirWidget2.h \ gitCompat.h \ - gitWizard.h + gitWizard.h \ + Browser.h \ + BrowserWidget.h FORMS += MainUI.ui \ FODialog.ui \ BMMDialog.ui \ widgets/MultimediaWidget.ui \ widgets/SlideshowWidget.ui \ - widgets/DirWidget.ui \ + widgets/DirWidget2.ui \ gitWizard.ui icons.files = Insight-FileManager.png diff --git a/src-qt5/desktop-utils/lumina-fm/main.cpp b/src-qt5/desktop-utils/lumina-fm/main.cpp index b05c4016..eaaf182c 100644 --- a/src-qt5/desktop-utils/lumina-fm/main.cpp +++ b/src-qt5/desktop-utils/lumina-fm/main.cpp @@ -9,6 +9,8 @@ #include <LuminaUtils.h> #include <LuminaSingleApplication.h> +#include "BrowserWidget.h" + int main(int argc, char ** argv) { LTHEME::LoadCustomEnvSettings(); @@ -28,6 +30,16 @@ int main(int argc, char ** argv) w.OpenDirs(in); w.show(); + // TESTING CODE FOR NEW BACKEND + /*QMainWindow W; + BrowserWidget B("",&W); + W.setCentralWidget( &B); + B.showDetails(false); + B.changeDirectory(in.first()); + qDebug() << "Show Window"; + W.show(); + */ + int retCode = a.exec(); return retCode; } diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DDListWidgets.h b/src-qt5/desktop-utils/lumina-fm/widgets/DDListWidgets.h index e3de9b0e..8049600e 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DDListWidgets.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DDListWidgets.h @@ -24,6 +24,8 @@ #include <QUrl> #include <QDir> +#include <LuminaUtils.h> + //============== // LIST WIDGET //============== @@ -42,14 +44,20 @@ public: this->setFlow(QListView::TopToBottom); this->setWrapping(true); this->setMouseTracking(true); - //this->setSortingEnabled(true); //This sorts *only* by name - type is not preserved + this->setSortingEnabled(true); //This sorts *only* by name - type is not preserved } ~DDListWidget(){} signals: void DataDropped(QString, QStringList); //Dir path, List of commands - + void GotFocus(); + protected: + void focusInEvent(QFocusEvent *ev){ + QListWidget::focusInEvent(ev); + emit GotFocus(); + } + void startDrag(Qt::DropActions act){ QList<QListWidgetItem*> items = this->selectedItems(); if(items.length()<1){ return; } @@ -155,8 +163,13 @@ public: signals: void DataDropped(QString, QStringList); //Dir path, List of commands - + void GotFocus(); + protected: + void focusInEvent(QFocusEvent *ev){ + QTreeWidget::focusInEvent(ev); + emit GotFocus(); + } void startDrag(Qt::DropActions act){ QList<QTreeWidgetItem*> items = this->selectedItems(); if(items.length()<1){ return; } @@ -237,4 +250,70 @@ protected: else{ QTreeWidget::mouseMoveEvent(ev); } //pass it along to the widget }*/ }; -#endif
\ No newline at end of file + +/* + * Virtual class for managing the sort of folders/files items. The problem with base class is that it only manages texts fields and + * we have dates and sizes. + * + * On this class, we overwrite the function operator<. + */ + +class CQTreeWidgetItem : public QTreeWidgetItem { +public: + CQTreeWidgetItem(int type = Type) : QTreeWidgetItem(type) {} + CQTreeWidgetItem(const QStringList & strings, int type = Type) : QTreeWidgetItem(strings, type) {} + CQTreeWidgetItem(QTreeWidget * parent, int type = Type) : QTreeWidgetItem(parent, type) {} + CQTreeWidgetItem(QTreeWidget * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {} + CQTreeWidgetItem(QTreeWidget * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {} + CQTreeWidgetItem(QTreeWidgetItem * parent, int type = Type) : QTreeWidgetItem(parent, type) {} + CQTreeWidgetItem(QTreeWidgetItem * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {} + CQTreeWidgetItem(QTreeWidgetItem * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {} + virtual ~CQTreeWidgetItem() {} + inline virtual bool operator<(const QTreeWidgetItem &tmp) const { + int column = this->treeWidget()->sortColumn(); + // We are in date text + if(column == 3 || column == 4){ + return this->whatsThis(column) < tmp.whatsThis(column); + // We are in size text + }else if(column == 1) { + QString text = this->text(column); + QString text_tmp = tmp.text(column); + double filesize, filesize_tmp; + // On folders, text is empty so we check for that + // In case we are in folders, we put -1 for differentiate of regular files with 0 bytes. + // Doing so, all folders we'll be together instead of mixing with files with 0 bytes. + if(text.isEmpty()) + filesize = -1; + else + filesize = LUtils::DisplaySizeToBytes(text); + if(text_tmp.isEmpty()) + filesize_tmp = -1; + else + filesize_tmp = LUtils::DisplaySizeToBytes(text_tmp); + return filesize < filesize_tmp; + + //Name column - still sort by type too (folders first) + }else if(column == 0 && (this->text(2).isEmpty() || tmp.text(2).isEmpty()) ){ + if(this->text(2) != tmp.text(2)){ return this->text(2).isEmpty(); } + } + // In other cases, we trust base class implementation + return QTreeWidgetItem::operator<(tmp); + } +}; + +//Item override for sorting purposes of list widget items +class CQListWidgetItem : public QListWidgetItem { +public: + CQListWidgetItem(const QIcon &icon, const QString &text, QListWidget *parent = Q_NULLPTR) : QListWidgetItem(icon,text,parent) {} + virtual ~CQListWidgetItem() {} + inline virtual bool operator<(const QListWidgetItem &tmp) const { + QString type = this->data(Qt::UserRole).toString(); + QString tmptype = tmp.data(Qt::UserRole).toString(); + //Sort by type first + if(type!=tmptype){ return (QString::compare(type,tmptype)<0); } + //Then sort by name using the normal rules + return QListWidgetItem::operator<(tmp); + } +}; + +#endif diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp index b8b4da0b..d729d608 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.cpp @@ -26,7 +26,7 @@ #define DEBUG 0 -const QString sessionsettings_config_file = QDir::homePath() + "/.lumina/LuminaDE/sessionsettings.conf"; +const QString sessionsettings_config_file = QDir::homePath() + "/.config/lumina-desktop/sessionsettings.conf"; DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){ ui->setupUi(this); //load the designer file @@ -181,7 +181,7 @@ QStringList DirWidget::getDateFormat() { void DirWidget::setDateFormat() { if(!date_format.isEmpty()) date_format.clear(); - QSettings settings("LuminaDE","sessionsettings"); + QSettings settings("lumina-desktop","sessionsettings"); // If value doesn't exist or is not setted, empty string is returned date_format << settings.value("DateFormat").toString(); date_format << settings.value("TimeFormat").toString(); diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h index 3ef9940b..fecd6180 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget.h @@ -73,7 +73,7 @@ public slots: void UpdateButtons(); //Keyboard Shortcuts triggered - void TryRenameSelection(); + void TryRenameSelection(); void TryCutSelection(); void TryCopySelection(); void TryPasteSelection(); @@ -181,49 +181,4 @@ protected: }; -/* - * Virtual class for managing the sort of folders/files items. The problem with base class is that it only manages texts fields and - * we have dates and sizes. - * - * On this class, we overwrite the function operator<. - */ - -class CQTreeWidgetItem : public QTreeWidgetItem { -public: - CQTreeWidgetItem(int type = Type) : QTreeWidgetItem(type) {} - CQTreeWidgetItem(const QStringList & strings, int type = Type) : QTreeWidgetItem(strings, type) {} - CQTreeWidgetItem(QTreeWidget * parent, int type = Type) : QTreeWidgetItem(parent, type) {} - CQTreeWidgetItem(QTreeWidget * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {} - CQTreeWidgetItem(QTreeWidget * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {} - CQTreeWidgetItem(QTreeWidgetItem * parent, int type = Type) : QTreeWidgetItem(parent, type) {} - CQTreeWidgetItem(QTreeWidgetItem * parent, const QStringList & strings, int type = Type) : QTreeWidgetItem(parent, strings, type) {} - CQTreeWidgetItem(QTreeWidgetItem * parent, QTreeWidgetItem * preceding, int type = Type) : QTreeWidgetItem(parent, preceding, type) {} - virtual ~CQTreeWidgetItem() {} - inline virtual bool operator<(const QTreeWidgetItem &tmp) const { - int column = this->treeWidget()->sortColumn(); - // We are in date text - if(column == DirWidget::DATEMOD || column == DirWidget::DATECREATE) - return this->whatsThis(column) < tmp.whatsThis(column); - // We are in size text - else if(column == DirWidget::SIZE) { - QString text = this->text(column); - QString text_tmp = tmp.text(column); - double filesize, filesize_tmp; - // On folders, text is empty so we check for that - // In case we are in folders, we put -1 for differentiate of regular files with 0 bytes. - // Doing so, all folders we'll be together instead of mixing with files with 0 bytes. - if(text.isEmpty()) - filesize = -1; - else - filesize = LUtils::DisplaySizeToBytes(text); - if(text_tmp.isEmpty()) - filesize_tmp = -1; - else - filesize_tmp = LUtils::DisplaySizeToBytes(text_tmp); - return filesize < filesize_tmp; - } - // In other cases, we trust base class implementation - return QTreeWidgetItem::operator<(tmp); - } -}; #endif diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp new file mode 100644 index 00000000..cc608b92 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.cpp @@ -0,0 +1,695 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#include "DirWidget2.h" +#include "ui_DirWidget2.h" + +#include <QMessageBox> +#include <QCursor> +#include <QClipboard> +#include <QMimeData> +#include <QTimer> +#include <QInputDialog> +#include <QScrollBar> +#include <QSettings> +#include <QtConcurrent/QtConcurrentRun> + +#include <LuminaOS.h> +#include <LuminaXDG.h> +#include <LuminaUtils.h> + +#include "../ScrollDialog.h" + +#define DEBUG 1 + +DirWidget::DirWidget(QString objID, QWidget *parent) : QWidget(parent), ui(new Ui::DirWidget){ + ui->setupUi(this); //load the designer file + ID = objID; + //Assemble the toolbar for the widget + toolbar = new QToolBar(this); + toolbar->setContextMenuPolicy(Qt::CustomContextMenu); + toolbar->setFloatable(false); + toolbar->setMovable(false); + toolbar->setOrientation(Qt::Horizontal); + toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly); + //toolbar->setIconSize(QSize(32,32)); + ui->toolbar_layout->addWidget(toolbar); + // - Add the buttons to the toolbar + toolbar->addAction(ui->actionBack); + toolbar->addAction(ui->actionUp); + toolbar->addAction(ui->actionHome); + line_dir = new QLineEdit(this); + toolbar->addWidget(line_dir); + connect(line_dir, SIGNAL(returnPressed()), this, SLOT(dir_changed()) ); + toolbar->addAction(ui->actionSingleColumn); + ui->actionSingleColumn->setChecked(true); + toolbar->addAction(ui->actionDualColumn); + toolbar->addAction(ui->actionMenu); + //Add the browser widgets + RCBW = 0; //right column browser is unavailable initially + BW = new BrowserWidget("", this); + ui->browser_layout->addWidget(BW); + connect(BW, SIGNAL(dirChange(QString)), this, SLOT(currentDirectoryChanged()) ); + connect(BW, SIGNAL(itemsActivated()), this, SLOT(runFiles()) ); + connect(BW, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(PasteFiles(QString, QStringList)) ); + connect(BW, SIGNAL(contextMenuRequested()), this, SLOT(OpenContextMenu()) ); + connect(BW, SIGNAL(updateDirectoryStatus(QString)), this, SLOT(dirStatusChanged(QString)) ); + connect(BW, SIGNAL(hasFocus(QString)), this, SLOT(setCurrentBrowser(QString)) ); + //Now update the rest of the UI + canmodify = false; //initial value + contextMenu = new QMenu(this); + cNewMenu = cOpenMenu = cFModMenu = cFViewMenu = 0; //not created yet + connect(contextMenu, SIGNAL(aboutToShow()), this, SLOT(UpdateContextMenu()) ); + + UpdateIcons(); + UpdateText(); + createMenus(); +} + +DirWidget::~DirWidget(){ + //stopload = true; //just in case another thread is still loading/running +} + +void DirWidget::setFocusLineDir() { + line_dir->setFocus(); + line_dir->selectAll(); +} + +void DirWidget::cleanup(){ + //stopload = true; //just in case another thread is still loading/running + //if(thumbThread.isRunning()){ thumbThread.waitForFinished(); } //this will stop really quickly with the flag set +} + +void DirWidget::ChangeDir(QString dirpath){ + //stopload = true; //just in case it is still loading + //emit LoadDirectory(ID, dirpath); + qDebug() << "ChangeDir:" << dirpath; + currentBrowser()->changeDirectory(dirpath); +} + +void DirWidget::setDirCompleter(QCompleter *comp){ + //line_dir->setCompleter(comp); +} + +QString DirWidget::id(){ + return ID; +} + +QString DirWidget::currentDir(){ + return currentBrowser()->currentDirectory(); +} + +void DirWidget::setShowDetails(bool show){ + BW->showDetails(show); + if(RCBW!=0){ RCBW->showDetails(show); } +} + +void DirWidget::showHidden(bool show){ + BW->showHiddenFiles(show); + if(RCBW!=0){ RCBW->showHiddenFiles(show); } +} + +void DirWidget::setThumbnailSize(int px){ + BW->setThumbnailSize(px); + if(RCBW!=0){ RCBW->setThumbnailSize(px); } + ui->tool_zoom_in->setEnabled(px < 256); //upper limit on image sizes + ui->tool_zoom_out->setEnabled(px >16); //lower limit on image sizes +} + +// ================ +// PUBLIC SLOTS +// ================ + +void DirWidget::LoadSnaps(QString basedir, QStringList snaps){ + //Save these value internally for use later + qDebug() << "ZFS Snapshots available:" << basedir << snaps; + snapbasedir = basedir; + snapshots = snaps; + //if(!snapbasedir.isEmpty()){ watcher->addPath(snapbasedir); } //add this to the watcher in case snapshots get created/removed + //Now update the UI as necessary + if(ui->tool_snap->menu()==0){ + ui->tool_snap->setMenu(new QMenu(this)); + connect(ui->tool_snap->menu(), SIGNAL(triggered(QAction*)), this, SLOT(direct_snap_selected(QAction*)) ); + } + ui->tool_snap->menu()->clear(); + for(int i=0; i<snapshots.length(); i++){ + QAction *tmp = ui->tool_snap->menu()->addAction(snapshots[i]); + tmp->setWhatsThis(snapshots[i]); + } + ui->slider_snap->setRange(0, snaps.length()); + if(currentBrowser()->currentDirectory().contains(ZSNAPDIR)){ + //The user was already within a snapshot - figure out which one and set the slider appropriately + int index = snaps.indexOf( currentBrowser()->currentDirectory().section(ZSNAPDIR,1,1).section("/",0,0) ); + if(index < 0){ index = snaps.length(); } //unknown - load the system (should never happen) + ui->slider_snap->setValue(index); + }else{ + ui->slider_snap->setValue(snaps.length()); //last item (normal system) + } + on_slider_snap_valueChanged(); + QApplication::processEvents(); //let the slider changed signal get thrown away before we re-enable the widget + ui->group_snaps->setEnabled(!snaps.isEmpty()); + ui->group_snaps->setVisible(!snaps.isEmpty()); + ui->tool_snap_newer->setEnabled(ui->slider_snap->value() < ui->slider_snap->maximum()); + ui->tool_snap_older->setEnabled(ui->slider_snap->value() > ui->slider_snap->minimum()); +} + +void DirWidget::refresh(){ + currentBrowser()->changeDirectory(""); //refresh current dir +} + +//Theme change functions +void DirWidget::UpdateIcons(){ + //Snapshot buttons + ui->tool_snap_newer->setIcon(LXDG::findIcon("go-next-view","") ); + ui->tool_snap_older->setIcon(LXDG::findIcon("go-previous-view","") ); + + //ToolBar Buttons + ui->actionBack->setIcon( LXDG::findIcon("go-previous","") ); + ui->actionUp->setIcon( LXDG::findIcon("go-up","") ); + ui->actionHome->setIcon( LXDG::findIcon("go-home","") ); + ui->actionMenu->setIcon( LXDG::findIcon("format-justify-fill","format-list-unordered") ); + ui->actionSingleColumn->setIcon(LXDG::findIcon("view-right-close","view-close") ); + ui->actionDualColumn->setIcon(LXDG::findIcon("view-right-new","view-split-left-right") ); + + ui->tool_zoom_in->setIcon(LXDG::findIcon("zoom-in","")); + ui->tool_zoom_out->setIcon(LXDG::findIcon("zoom-out","")); + +} + +void DirWidget::UpdateText(){ + ui->retranslateUi(this); + BW->retranslate(); + if(RCBW!=0){ RCBW->retranslate(); } +} + +// ================= +// PRIVATE +// ================= +void DirWidget::createMenus(){ + //Note: contextMenu already created - this is just for the sub-items + if(cNewMenu==0){ cNewMenu = new QMenu(this); } + else{ cNewMenu->clear(); } + cNewMenu->setTitle(tr("Create...") ); + cNewMenu->setIcon( LXDG::findIcon("list-add","") ); + cNewMenu->addAction(LXDG::findIcon("document-new",""), tr("File"), this, SLOT(createNewFile()) ); + cNewMenu->addAction(LXDG::findIcon("folder-new",""), tr("Directory"), this, SLOT(createNewDir()) ); + if(LUtils::isValidBinary("lumina-fileinfo")){ cNewMenu->addAction(LXDG::findIcon("system-run",""), tr("Application Launcher"), this, SLOT(createNewXDGEntry()) ); } + + if(cOpenMenu==0){ cOpenMenu = new QMenu(this); } + else{ cOpenMenu->clear(); } + cOpenMenu->setTitle(tr("Launch...")); + cOpenMenu->setIcon( LXDG::findIcon("quickopen","") ); + cOpenMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(openTerminal())); + cOpenMenu->addAction(LXDG::findIcon("view-preview",""), tr("SlideShow"), this, SLOT(openInSlideshow())); + cOpenMenu->addAction(LXDG::findIcon("view-media-lyrics","media-playback-start"), tr("Multimedia Player"), this, SLOT(openMultimedia())); + + if(cFModMenu==0){ cFModMenu = new QMenu(this); } + else{ cFModMenu->clear(); } + cFModMenu->setTitle(tr("Modify Files...")); + cFModMenu->setIcon( LXDG::findIcon("document-edit","") ); + cFModMenu->addAction(LXDG::findIcon("edit-cut",""), tr("Cut Selection"), this, SLOT(cutFiles()) ); + cFModMenu->addAction(LXDG::findIcon("edit-copy",""), tr("Copy Selection"), this, SLOT(copyFiles()) ); + cFModMenu->addSeparator(); + cFModMenu->addAction(LXDG::findIcon("edit-rename",""), tr("Rename..."), this, SLOT(renameFiles()) ); + cFModMenu->addSeparator(); + cFModMenu->addAction(LXDG::findIcon("edit-delete",""), tr("Delete Selection"), this, SLOT(removeFiles()) ); + + if(cFViewMenu==0){ cFViewMenu = new QMenu(this); } + else{ cFViewMenu->clear(); } + cFViewMenu->setTitle(tr("View Files...")); + cFViewMenu->setIcon( LXDG::findIcon("document-preview","") ); + cFViewMenu->addAction(LXDG::findIcon("document-encrypted",""), tr("Checksums"), this, SLOT(fileCheckSums()) ); + if(LUtils::isValidBinary("lumina-fileinfo")){ + cFViewMenu->addAction(LXDG::findIcon("edit-find-replace",""), tr("Properties"), this, SLOT(fileProperties()) ); + } + +} + +BrowserWidget* DirWidget::currentBrowser(){ + if(cBID.isEmpty() || RCBW==0){ return BW; } + else{ return RCBW; } +} + +QStringList DirWidget::currentDirFiles(){ + return currentBrowser()->currentItems(-1); //files only +} +// ================= +// PRIVATE SLOTS +// ================= + +//UI BUTTONS +void DirWidget::on_tool_zoom_in_clicked(){ + int size = BW->thumbnailSize(); + size += 16; + setThumbnailSize(size); + //Now Save the size value as the default for next time + QSettings SET("lumina-desktop","lumina-fm"); + SET.setValue("iconsize", size); +} + +void DirWidget::on_tool_zoom_out_clicked(){ + int size = BW->thumbnailSize(); + if(size <= 16){ return; } + size -= 16; + setThumbnailSize(size); + //Now Save the size value as the default for next time + QSettings SET("lumina-desktop","lumina-fm"); + SET.setValue("iconsize", size); +} + +// -- Top Snapshot Buttons +void DirWidget::on_tool_snap_newer_clicked(){ + ui->slider_snap->setValue( ui->slider_snap->value()+1 ); +} + +void DirWidget::on_tool_snap_older_clicked(){ + ui->slider_snap->setValue( ui->slider_snap->value()-1 ); +} + +void DirWidget::on_slider_snap_valueChanged(int val){ + bool labelsonly = false; + if(val==-1){ val = ui->slider_snap->value(); labelsonly=true; } + //Update the snapshot interface + ui->tool_snap_newer->setEnabled(val < ui->slider_snap->maximum()); + ui->tool_snap_older->setEnabled(val > ui->slider_snap->minimum()); + if(val >= snapshots.length() || val < 0){ + ui->tool_snap->setText(tr("Current")); + }else if(QFile::exists(snapbasedir+snapshots[val])){ + ui->tool_snap->setText( QFileInfo(snapbasedir+snapshots[val]).lastModified().toString(Qt::DefaultLocaleShortDate) ); + } + //Exit if a non-interactive snapshot change + if(!ui->group_snaps->isEnabled() || labelsonly){ return; } //internal change - do not try to change the actual info + //Determine which snapshot is now selected + QString dir; + if(DEBUG){ qDebug() << "Changing snapshot:" << currentBrowser()->currentDirectory() << val << snapbasedir; } + //stopload = true; //stop any currently-loading procedures + if(val >= snapshots.length() || val < 0){ //active system selected + if(DEBUG){ qDebug() << " - Load Active system:" << normalbasedir; } + dir = normalbasedir; + }else{ + dir = snapbasedir+snapshots[val]+"/"; + if(!QFile::exists(dir)){ + //This snapshot must have been removed in the background by pruning tools + // move to a newer snapshot or the current base dir as necessary + qDebug() << "Snapshot no longer available:" << dir; + qDebug() << " - Reloading available snapshots"; + emit findSnaps(ID, normalbasedir); + return; + } + //Need to figure out the relative path within the snapshot + snaprelpath = normalbasedir.section(snapbasedir.section(ZSNAPDIR,0,0), 1,1000); + if(DEBUG){ qDebug() << " - new snapshot-relative path:" << snaprelpath; } + dir.append(snaprelpath); + dir.replace("//","/"); //just in case any duplicate slashes from all the split/combining + if(DEBUG){ qDebug() << " - Load Snapshot:" << dir; } + } + //Make sure this directory exists, and back up as necessary + if(dir.isEmpty()){ return; } + //Load the newly selected snapshot + currentBrowser()->changeDirectory(dir); +} + +void DirWidget::direct_snap_selected(QAction *act){ + QString snap = act->whatsThis(); + int val = snapshots.indexOf(snap); + if(val<0){ return; } + else{ ui->slider_snap->setValue(val); } +} + +//Top Toolbar buttons +void DirWidget::on_actionBack_triggered(){ + QStringList history = currentBrowser()->history(); + if(history.length()<2){ return; } //cannot do anything + QString dir = history.takeLast(); + //qDebug() << "Go Back:" << dir << normalbasedir << history; + if(dir == normalbasedir){ + dir = history.takeLast(); + } + history << dir; //make sure the current dir is always last in the history + currentBrowser()->changeDirectory(dir); + currentBrowser()->setHistory(history); //re-write the history to account for going backwards + ui->actionBack->setEnabled(history.length()>1); +} + +void DirWidget::on_actionUp_triggered(){ + QString dir = currentBrowser()->currentDirectory().section("/",0,-2); + if(dir.isEmpty()) + dir = "/"; + //Quick check to ensure the directory exists + while(!QFile::exists(dir) && !dir.isEmpty()){ + dir = dir.section("/",0,-2); //back up one additional dir + } + currentBrowser()->changeDirectory(dir); +} + +void DirWidget::on_actionHome_triggered(){ + currentBrowser()->changeDirectory(QDir::homePath()); +} + +void DirWidget::dir_changed(){ + QString dir = line_dir->text().simplified(); + //Run the dir through the user-input checks + dir = LUtils::PathToAbsolute(dir); + //qDebug() << "Dir:" << dir; + //Quick check to ensure the directory exists + while(!QFile::exists(dir) && !dir.isEmpty()){ + dir = dir.section("/",0,-2); //back up one additional dir + } + //qDebug() << " - Now Dir:" << dir; + currentBrowser()->changeDirectory(dir); + //emit LoadDirectory(ID, dir); +} + + +void DirWidget::on_actionSingleColumn_triggered(bool checked){ + if(!checked){ return; } + ui->actionDualColumn->setChecked(false); + if(RCBW==0){ return; } //nothing to do + ui->browser_layout->removeWidget(RCBW); + RCBW->deleteLater(); + RCBW = 0; + setCurrentBrowser(""); //reset back to the remaining browser +} + +void DirWidget::on_actionDualColumn_triggered(bool checked){ + if(!checked){ return; } + ui->actionSingleColumn->setChecked(false); + if(RCBW!=0){ return; } //nothing to do + RCBW = new BrowserWidget("rc", this); + ui->browser_layout->addWidget(RCBW); + connect(RCBW, SIGNAL(dirChange(QString)), this, SLOT(currentDirectoryChanged()) ); + connect(RCBW, SIGNAL(itemsActivated()), this, SLOT(runFiles()) ); + connect(RCBW, SIGNAL(DataDropped(QString, QStringList)), this, SIGNAL(PasteFiles(QString, QStringList)) ); + connect(RCBW, SIGNAL(contextMenuRequested()), this, SLOT(OpenContextMenu()) ); + connect(RCBW, SIGNAL(updateDirectoryStatus(QString)), this, SLOT(dirStatusChanged(QString)) ); + connect(RCBW, SIGNAL(hasFocus(QString)), this, SLOT(setCurrentBrowser(QString)) ); + //Now make sure it has all the same settings as the main browser + setCurrentBrowser("rc"); + RCBW->showDetails(BW->hasDetails()); + RCBW->showHiddenFiles( BW->hasHiddenFiles()); + RCBW->setThumbnailSize( BW->thumbnailSize()); + RCBW->changeDirectory( BW->currentDirectory()); +} + +void DirWidget::on_actionMenu_triggered(){ + OpenContextMenu(); +} + + +// - Other Actions without a specific button on the side +void DirWidget::fileCheckSums(){ + QStringList files = currentBrowser()->currentSelection(); + if(files.isEmpty()){ return; } + qDebug() << "Run Checksums:" << files; + QStringList info = LOS::Checksums(files); + qDebug() << " - Info:" << info; + if(info.isEmpty() || (info.length() != files.length()) ){ return; } + for(int i=0; i<info.length(); i++){ + info[i] = QString("%2\n\t(%1)").arg(files[i].section("/",-1), info[i]); + } + ScrollDialog dlg(this); + dlg.setWindowTitle( tr("File Checksums:") ); + dlg.setWindowIcon( LXDG::findIcon("document-encrypted","") ); + dlg.setText(info.join("\n")); + dlg.exec(); +} + +void DirWidget::fileProperties(){ + QStringList sel = currentBrowser()->currentSelection(); + //qDebug() << "Open File properties:" << sel; + if(sel.isEmpty()){ return; } + if(!LUtils::isValidBinary("lumina-fileinfo")){ + //It should never get to this point due to checks earlier - but just in case... + QMessageBox::warning(this, tr("Missing Utility"), tr("The \"lumina-fileinfo\" utility could not be found on the system. Please install it first.") ); + return; + } + for(int i=0; i<sel.length(); i++){ + QProcess::startDetached("lumina-fileinfo \""+sel[i]+"\""); //use absolute paths + } +} + +void DirWidget::openTerminal(){ + emit LaunchTerminal(currentBrowser()->currentDirectory()); +} + +//Browser Functions +void DirWidget::OpenContextMenu(){ + //Now open the menu at the current cursor location + contextMenu->popup(QCursor::pos()); +} + +void DirWidget::UpdateContextMenu(){ + //First generate the context menu based on the selection + qDebug() << "Update context menu"; + QStringList sel = currentBrowser()->currentSelection(); + contextMenu->clear(); + + if(!sel.isEmpty()){ + contextMenu->addAction(LXDG::findIcon("run-build-file",""), tr("Open"), this, SLOT(runFiles()) ); + contextMenu->addAction(LXDG::findIcon("run-build-configure",""), tr("Open With..."), this, SLOT(runWithFiles()) ); + } + contextMenu->addSection(LXDG::findIcon("unknown",""), tr("File Operations")); + contextMenu->addMenu(cFModMenu); + cFModMenu->setEnabled(!sel.isEmpty() && canmodify); + contextMenu->addMenu(cFViewMenu); + cFViewMenu->setEnabled(!sel.isEmpty()); + contextMenu->addAction(LXDG::findIcon("edit-paste",""), tr("Paste"), this, SLOT(pasteFiles()) )->setEnabled(QApplication::clipboard()->mimeData()->hasFormat("x-special/lumina-copied-files") && canmodify); + //Now add the general selection options + contextMenu->addSection(LXDG::findIcon("folder","inode/directory"), tr("Directory Operations")); + if(canmodify){ + contextMenu->addMenu(cNewMenu); + } + contextMenu->addMenu(cOpenMenu); +} + +void DirWidget::currentDirectoryChanged(bool widgetonly){ + QString cur = currentBrowser()->currentDirectory(); + QFileInfo info(cur); + canmodify = info.isWritable(); + if(widgetonly){ ui->label_status->setText(currentBrowser()->status()); } + else{ ui->label_status->setText(tr("Loading...")); } + //qDebug() << "Start search for snapshots"; + if(!cur.contains("/.zfs/snapshot")){ + normalbasedir = cur; + ui->group_snaps->setVisible(false); + emit findSnaps(ID, cur); + }else{ + //Re-assemble the normalbasedir variable (in case moving around within a snapshot) + normalbasedir = cur.replace( QRegExp("/\\.zfs/snapshot/(.)+/"), "/" ); + } + ui->actionBack->setEnabled( currentBrowser()->history().length()>1 ); + line_dir->setText(normalbasedir); + emit TabNameChanged(ID, normalbasedir.section("/",-1)); +} + +void DirWidget::dirStatusChanged(QString stat){ + if(!canmodify){ stat.prepend(tr("(Limited Access) ")); } + ui->label_status->setText(stat); +} + +void DirWidget::setCurrentBrowser(QString id){ + if(id==cBID){ return; } //no change + cBID = id; + currentDirectoryChanged(true); //update all the averarching widget elements (widget only) + //Now adjust the frame/highlighting around the "active" browser + if(RCBW==0){ BW->setShowActive(true); } + else{ + BW->setShowActive( cBID.isEmpty() ); + RCBW->setShowActive( !cBID.isEmpty() ); + } +} + +//Context Menu Functions +void DirWidget::createNewFile(){ + if(!canmodify){ return; } //cannot create anything here + //Prompt for the new filename + bool ok = false; + QString newdocument = QInputDialog::getText(this, tr("New Document"), tr("Name:"), QLineEdit::Normal, "", \ + &ok, 0, Qt::ImhFormattedNumbersOnly | Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly); + if(!ok || newdocument.isEmpty()){ return; } + //Create the empty file + QString full = BW->currentDirectory(); + if(!full.endsWith("/")){ full.append("/"); } + //verify the new file does not already exist + if(QFile::exists(full+newdocument)){ + QMessageBox::warning(this, tr("Invalid Name"), tr("A file or directory with that name already exists! Please pick a different name.")); + QTimer::singleShot(0,this, SLOT(createNewFile()) ); //repeat this function + return; + } + QFile file(full+newdocument); + if(file.open(QIODevice::ReadWrite)){ + //If successfully opened, it has created a blank file + file.close(); + }else{ + QMessageBox::warning(this, tr("Error Creating Document"), tr("The document could not be created. Please ensure that you have the proper permissions.")); + } +} + +void DirWidget::createNewDir(){ + if(!canmodify){ return; } //cannot create anything here + //Prompt for the new dir name + bool ok = false; + QString newdir = QInputDialog::getText(this, tr("New Directory"), tr("Name:"), QLineEdit::Normal, "", \ + &ok, 0, Qt::ImhFormattedNumbersOnly | Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly); + if(!ok || newdir.isEmpty()){ return; } + //Now create the new dir + QString full = BW->currentDirectory(); + if(!full.endsWith("/")){ full.append("/"); } + QDir dir(full); //open the current dir + full.append(newdir); //append the new name to the current dir + //Verify that the new dir does not already exist + if(dir.exists(full)){ + QMessageBox::warning(this, tr("Invalid Name"), tr("A file or directory with that name already exists! Please pick a different name.")); + QTimer::singleShot(0,this, SLOT(createNewDir()) ); //repeat this function + }else{ + if(!dir.mkdir(newdir) ){ + QMessageBox::warning(this, tr("Error Creating Directory"), tr("The directory could not be created. Please ensure that you have the proper permissions to modify the current directory.")); + } + } +} + +void DirWidget::createNewXDGEntry(){ + if(!canmodify){ return; } //cannot create anything here + //Prompt for the new filename + bool ok = false; + QString newdocument = QInputDialog::getText(this, tr("New Document"), tr("Name:"), QLineEdit::Normal, "", \ + &ok, 0, Qt::ImhFormattedNumbersOnly | Qt::ImhUppercaseOnly | Qt::ImhLowercaseOnly); + if(!ok || newdocument.isEmpty()){ return; } + if(!newdocument.endsWith(".desktop")){ newdocument.append(".desktop"); } + //Create the empty file + QString full = BW->currentDirectory(); + if(!full.endsWith("/")){ full.append("/"); } + //Verify the file does not already exist + if(QFile::exists(full+newdocument)){ + QMessageBox::warning(this, tr("Invalid Name"), tr("A file or directory with that name already exists! Please pick a different name.")); + QTimer::singleShot(0,this, SLOT(createNewFile()) ); //repeat this function + return; + } + QProcess::startDetached("lumina-fileinfo -application \""+full+newdocument+"\""); +} + +/*void DirWidget::createNewSymlink{ + +}*/ + +// - Selected FILE operations +void DirWidget::cutFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + emit CutFiles(sel); +} + +void DirWidget::copyFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + emit CopyFiles(sel); +} + +void DirWidget::pasteFiles(){ + emit PasteFiles(currentBrowser()->currentDirectory(), QStringList() ); +} + +void DirWidget::renameFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + qDebug() << "Deleting selected Items:" << sel; + emit RenameFiles(sel); +} + +void DirWidget::favoriteFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + emit FavoriteFiles(sel); +} + +void DirWidget::removeFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + qDebug() << "Deleting selected Items:" << sel; + emit RemoveFiles(sel); +} + +void DirWidget::runFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + QStringList dirs; + for(int i=0; i<sel.length(); i++){ + if(QFileInfo(sel[i]).isDir()){ + dirs << sel[i]; + }else{ + QProcess::startDetached("lumina-open \""+sel[i]+"\""); + } + } + if(!dirs.isEmpty()){ + currentBrowser()->changeDirectory( dirs.takeFirst()); //load the first directory in this widget + } + if(!dirs.isEmpty()){ + emit OpenDirectories(dirs); //open the rest of the directories in other tabs + } +} + +void DirWidget::runWithFiles(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ return; } + QStringList dirs; + for(int i=0; i<sel.length(); i++){ + if(QFileInfo(sel[i]).isDir()){ + dirs << sel[i]; + }else{ + QProcess::startDetached("lumina-open -select \""+sel[i]+"\""); + } + } + if(!dirs.isEmpty()){ + emit OpenDirectories(dirs); //open the rest of the directories in other tabs + } +} + +/*void DirWidget::attachToNewEmail(){ + +}*/ + +// - Context-specific operations +void DirWidget::openInSlideshow(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ sel = currentDirFiles(); } + //Now turn them all into a list and emit them + LFileInfoList list; + for(int i=0; i<sel.length(); i++){ + if(sel.endsWith(".desktop")){ continue; } //simplification to make sure we don't read any files which are not needed + LFileInfo info(sel[i]); + if( info.isImage() ){ list << info; } //add to the list + } + if(!list.isEmpty()){ emit ViewFiles(list); } +} + +void DirWidget::openMultimedia(){ + QStringList sel = currentBrowser()->currentSelection(); + if(sel.isEmpty()){ sel = currentDirFiles(); } + //Now turn them all into a list and emit them + LFileInfoList list; + for(int i=0; i<sel.length(); i++){ + if(sel.endsWith(".desktop")){ continue; } //simplification to make sure we don't read any files which are not needed + LFileInfo info(sel[i]); + if( info.isAVFile() ){ list << info; } //add to the list + } + if(!list.isEmpty()){ emit PlayFiles(list); } +} + +//==================== +// PROTECTED +//==================== +void DirWidget::mouseReleaseEvent(QMouseEvent *ev){ + static Qt::MouseButtons backmap = Qt::BackButton | Qt::ExtraButton5; + //qDebug() << "Mouse Click:" << ev->button(); + if(backmap.testFlag(ev->button())){ + ev->accept(); + on_actionBack_triggered(); + //}else if(ev->button()==Qt::ForwardButton()){ + //ev->accept(); + }else{ + ev->ignore(); //not handled here + } +} diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h new file mode 100644 index 00000000..6a9bdf79 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.h @@ -0,0 +1,178 @@ +//=========================================== +// Lumina-DE source code +// Copyright (c) 2015, Ken Moore +// Available under the 3-clause BSD license +// See the LICENSE file for full details +//=========================================== +#ifndef _LUMINA_FM_DIRECTORY_BROWSER_WIDGET_H +#define _LUMINA_FM_DIRECTORY_BROWSER_WIDGET_H + +#include <QList> +#include <QWidget> +#include <QObject> +#include <QMenu> +#include <QToolBar> +#include <QLineEdit> +#include <QShortcut> +#include <QFileSystemWatcher> +#include <QTimer> +#include <QFuture> + +#include "../BrowserWidget.h" + + +#define ZSNAPDIR QString("/.zfs/snapshot/") + +namespace Ui{ + class DirWidget; +}; + +class DirWidget : public QWidget{ + Q_OBJECT +public: + enum DETAILTYPES{ NAME, SIZE, TYPE, DATEMOD, DATECREATE}; + DirWidget(QString objID, QWidget *parent = 0); //needs a unique ID (to distinguish from other DirWidgets) + ~DirWidget(); + + void cleanup(); //called before the browser is closed down + + //Directory Managment + void ChangeDir(QString dirpath); + void setDirCompleter(QCompleter *comp); + + //Information + QString id(); + QString currentDir(); + + //View Settings + void setShowDetails(bool show); + void showHidden(bool show); + void setThumbnailSize(int px); + void setFocusLineDir(); + +public slots: + //void LoadDir(QString dir, LFileInfoList list); + void LoadSnaps(QString basedir, QStringList snaps); + + //Refresh options + void refresh(); //Refresh current directory + //void refreshButtons(); //Refresh action buttons only + + //Theme change functions + void UpdateIcons(); + void UpdateText(); + + //Button updates + //void UpdateButtons(); + + //Keyboard Shortcuts triggered + /*void TryRenameSelection(); + void TryCutSelection(); + void TryCopySelection(); + void TryPasteSelection(); + void TryDeleteSelection();*/ + +private: + Ui::DirWidget *ui; + BrowserWidget *BW, *RCBW; //Main BrowserWidget and right-column browser widget + QString ID, cBID; //unique ID assigned by the parent, and currently active browser widget + QString normalbasedir, snapbasedir, snaprelpath; //for maintaining directory context while moving between snapshots + QStringList snapshots, needThumbs, tmpSel; + bool canmodify; + + //The Toolbar and associated items + QToolBar *toolbar; + QLineEdit *line_dir; + + //The context menu and associated items + QMenu *contextMenu, *cNewMenu, *cOpenMenu, *cFModMenu, *cFViewMenu; + + //Functions for internal use + void createMenus(); //on init only + + BrowserWidget* currentBrowser(); + QStringList currentDirFiles(); //all the "files" available within the current dir/browser + +private slots: + //UI BUTTONS/Actions + + // -- Bottom Action Buttons + void on_tool_zoom_in_clicked(); + void on_tool_zoom_out_clicked(); + + // -- Top Snapshot Buttons + void on_tool_snap_newer_clicked(); + void on_tool_snap_older_clicked(); + void on_slider_snap_valueChanged(int val = -1); + void direct_snap_selected(QAction*); + + //Top Toolbar buttons + void on_actionBack_triggered(); + void on_actionUp_triggered(); + void on_actionHome_triggered(); + void dir_changed(); //user manually changed the directory + void on_actionSingleColumn_triggered(bool); + void on_actionDualColumn_triggered(bool); + void on_actionMenu_triggered(); + + // - Other Actions without a specific button on the side + void fileCheckSums(); + void fileProperties(); + void openTerminal(); + + + //Browser Functions + void OpenContextMenu(); + void UpdateContextMenu(); + void currentDirectoryChanged(bool widgetonly = false); + void dirStatusChanged(QString); + void setCurrentBrowser(QString); + + //Context Menu Functions + // - DIRECTORY operations + void createNewFile(); + void createNewDir(); + void createNewXDGEntry(); + //void createNewSymlink(); + + // - Selected FILE operations + void cutFiles(); + void copyFiles(); + void pasteFiles(); + void renameFiles(); + void favoriteFiles(); + void removeFiles(); + void runFiles(); + void runWithFiles(); + //void attachToNewEmail(); + + // - Context-specific operations + void openInSlideshow(); + void openMultimedia(); + +signals: + //Directory loading/finding signals + void OpenDirectories(QStringList); //Directories to open in other tabs/columns + void findSnaps(QString, QString); //ID, dirpath (Request snapshot information for a directory) + void CloseBrowser(QString); //ID (Request that this browser be closed) + + //External App/Widget launching + void PlayFiles(LFileInfoList); //open in multimedia player + void ViewFiles(LFileInfoList); //open in slideshow + void LaunchTerminal(QString); //dirpath + + //System Interactions + void CutFiles(QStringList); //file selection + void CopyFiles(QStringList); //file selection + void PasteFiles(QString, QStringList); //current dir + void FavoriteFiles(QStringList); //file selection + void RenameFiles(QStringList); //file selection + void RemoveFiles(QStringList); //file selection + void TabNameChanged(QString, QString); //objID, new tab name + +protected: + void mouseReleaseEvent(QMouseEvent *); + +}; + +#endif diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui new file mode 100644 index 00000000..29660ad4 --- /dev/null +++ b/src-qt5/desktop-utils/lumina-fm/widgets/DirWidget2.ui @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DirWidget</class> + <widget class="QWidget" name="DirWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>350</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>350</width> + <height>0</height> + </size> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0" columnstretch="0,1"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <property name="horizontalSpacing"> + <number>1</number> + </property> + <property name="verticalSpacing"> + <number>2</number> + </property> + <item row="0" column="0" rowspan="2" colspan="2"> + <layout class="QHBoxLayout" name="toolbar_layout"/> + </item> + <item row="2" column="1"> + <layout class="QVBoxLayout" name="browser_layout_main"> + <property name="spacing"> + <number>1</number> + </property> + <item> + <widget class="QFrame" name="group_snaps"> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="leftMargin"> + <number>1</number> + </property> + <property name="topMargin"> + <number>1</number> + </property> + <property name="rightMargin"> + <number>1</number> + </property> + <property name="bottomMargin"> + <number>1</number> + </property> + <item> + <widget class="QToolButton" name="tool_snap"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true">padding-right: 5px;</string> + </property> + <property name="text"> + <string notr="true"/> + </property> + <property name="popupMode"> + <enum>QToolButton::InstantPopup</enum> + </property> + <property name="toolButtonStyle"> + <enum>Qt::ToolButtonTextOnly</enum> + </property> + </widget> + </item> + <item> + <widget class="QSlider" name="slider_snap"> + <property name="minimum"> + <number>1</number> + </property> + <property name="value"> + <number>1</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="invertedAppearance"> + <bool>false</bool> + </property> + <property name="invertedControls"> + <bool>false</bool> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksAbove</enum> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_snap_older"> + <property name="text"> + <string notr="true">...</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_snap_newer"> + <property name="text"> + <string notr="true">...</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="browser_layout"/> + </item> + </layout> + </item> + <item row="3" column="0" colspan="2"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_status"> + <property name="text"> + <string notr="true">Status</string> + </property> + <property name="wordWrap"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_zoom_in"> + <property name="toolTip"> + <string>Increase Icon Sizes</string> + </property> + <property name="text"> + <string notr="true">ZoomIn</string> + </property> + <property name="popupMode"> + <enum>QToolButton::InstantPopup</enum> + </property> + <property name="autoRaise"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="tool_zoom_out"> + <property name="toolTip"> + <string>Decrease Icon Sizes</string> + </property> + <property name="text"> + <string notr="true">ZoomOut</string> + </property> + <property name="autoRaise"> + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + <action name="actionBack"> + <property name="text"> + <string notr="true">Back</string> + </property> + <property name="iconText"> + <string>Back</string> + </property> + <property name="toolTip"> + <string>Go back to previous directory</string> + </property> + <property name="statusTip"> + <string>Go back to previous directory</string> + </property> + </action> + <action name="actionUp"> + <property name="text"> + <string notr="true">Up</string> + </property> + <property name="iconText"> + <string>Up</string> + </property> + <property name="toolTip"> + <string>Go to parent directory</string> + </property> + <property name="statusTip"> + <string>Go to parent directory</string> + </property> + </action> + <action name="actionHome"> + <property name="text"> + <string notr="true">Home</string> + </property> + <property name="iconText"> + <string>Home</string> + </property> + <property name="toolTip"> + <string>Go to home directory</string> + </property> + <property name="statusTip"> + <string>Go to home directory</string> + </property> + </action> + <action name="actionMenu"> + <property name="text"> + <string>Menu</string> + </property> + <property name="toolTip"> + <string>Select Action</string> + </property> + </action> + <action name="actionSingleColumn"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>SingleColumn</string> + </property> + <property name="toolTip"> + <string>Single column view</string> + </property> + </action> + <action name="actionDualColumn"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Dual Column</string> + </property> + <property name="toolTip"> + <string>Dual Column View</string> + </property> + </action> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts index 41c107bd..dc049e22 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts +++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_el.ts @@ -112,7 +112,7 @@ <message> <location filename="../MainUI.cpp" line="77"></location> <source>Save Screenshot</source> - <translation>Αποθήκευση Στιγμιοτύπου οθόνης</translation> + <translation>Αποθήκευση Στιγμιοτύπου Οθόνης</translation> </message> <message> <location filename="../MainUI.ui" line="309"></location> diff --git a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts index 080f9b96..615c77b4 100644 --- a/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts +++ b/src-qt5/desktop-utils/lumina-screenshot/i18n/l-screenshot_it.ts @@ -1,15 +1,15 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="it"> <context> <name>ImageEditor</name> <message> - <location filename="../ImageEditor.cpp" line="14"/> + <location filename="../ImageEditor.cpp" line="14"></location> <source>Zoom In</source> <translation>Zuma in</translation> </message> <message> - <location filename="../ImageEditor.cpp" line="15"/> + <location filename="../ImageEditor.cpp" line="15"></location> <source>Zoom Out</source> <translation>Zuma Fuori</translation> </message> @@ -17,115 +17,115 @@ <context> <name>MainUI</name> <message> - <location filename="../MainUI.ui" line="14"/> - <location filename="../MainUI.ui" line="162"/> - <location filename="../MainUI.ui" line="295"/> + <location filename="../MainUI.ui" line="14"></location> + <location filename="../MainUI.ui" line="162"></location> + <location filename="../MainUI.ui" line="295"></location> <source>Take Screenshot</source> <translation>Cattura schermata</translation> </message> <message> - <location filename="../MainUI.ui" line="37"/> + <location filename="../MainUI.ui" line="37"></location> <source>New Screenshot</source> <translation>Nuova Schermata</translation> </message> <message> - <location filename="../MainUI.ui" line="43"/> + <location filename="../MainUI.ui" line="43"></location> <source>Settings</source> <translation>Impostazioni</translation> </message> <message> - <location filename="../MainUI.ui" line="124"/> + <location filename="../MainUI.ui" line="124"></location> <source>Include Borders</source> <translation>Includi il bordo</translation> </message> <message> - <location filename="../MainUI.ui" line="149"/> + <location filename="../MainUI.ui" line="149"></location> <source> Seconds</source> <translation> Secondi</translation> </message> <message> - <location filename="../MainUI.ui" line="152"/> + <location filename="../MainUI.ui" line="152"></location> <source>Delay </source> - <translation>Ritardo</translation> + <translation>Ritardo </translation> </message> <message> - <location filename="../MainUI.ui" line="172"/> + <location filename="../MainUI.ui" line="172"></location> <source>View/Edit</source> <translation>Visualizza/Edita</translation> </message> <message> - <location filename="../MainUI.ui" line="212"/> - <location filename="../MainUI.ui" line="306"/> + <location filename="../MainUI.ui" line="212"></location> + <location filename="../MainUI.ui" line="306"></location> <source>Save As</source> <translation>Salva Come</translation> </message> <message> - <location filename="../MainUI.ui" line="222"/> + <location filename="../MainUI.ui" line="222"></location> <source>Launch Editor</source> - <translation>Avvia l'Editor</translation> + <translation>Avvia l'Editor</translation> </message> <message> - <location filename="../MainUI.ui" line="245"/> + <location filename="../MainUI.ui" line="245"></location> <source>Crop</source> <translation>Ritaglia</translation> </message> <message> - <location filename="../MainUI.ui" line="255"/> + <location filename="../MainUI.ui" line="255"></location> <source>Resize</source> <translation>Ridimensiona</translation> </message> <message> - <location filename="../MainUI.ui" line="282"/> + <location filename="../MainUI.ui" line="282"></location> <source>File</source> <translation>File</translation> </message> <message> - <location filename="../MainUI.ui" line="298"/> + <location filename="../MainUI.ui" line="298"></location> <source>Ctrl+N</source> <translation>Ctrl+N</translation> </message> <message> - <location filename="../MainUI.ui" line="322"/> + <location filename="../MainUI.ui" line="322"></location> <source>Close</source> <translation>Chiudi</translation> </message> <message> - <location filename="../MainUI.ui" line="325"/> + <location filename="../MainUI.ui" line="325"></location> <source>Esc</source> <translation>Esc</translation> </message> <message> - <location filename="../MainUI.ui" line="67"/> + <location filename="../MainUI.ui" line="67"></location> <source>Entire Session</source> <translation>Sessione Intera</translation> </message> <message> - <location filename="../MainUI.ui" line="81"/> + <location filename="../MainUI.ui" line="81"></location> <source>Single Window</source> <translation>Finestra Singola</translation> </message> <message> - <location filename="../MainUI.ui" line="74"/> + <location filename="../MainUI.ui" line="74"></location> <source>Single Screen</source> <translation>Singola Finestra</translation> </message> <message> - <location filename="../MainUI.cpp" line="77"/> + <location filename="../MainUI.cpp" line="77"></location> <source>Save Screenshot</source> <translation>Salva schermata</translation> </message> <message> - <location filename="../MainUI.ui" line="309"/> + <location filename="../MainUI.ui" line="309"></location> <source>Ctrl+S</source> <translation>Ctrl+S</translation> </message> <message> - <location filename="../MainUI.ui" line="317"/> + <location filename="../MainUI.ui" line="317"></location> <source>Quick Save</source> <translation>Salvataggio Rapido</translation> </message> <message> - <location filename="../MainUI.cpp" line="77"/> + <location filename="../MainUI.cpp" line="77"></location> <source>PNG Files (*.png);;AllFiles (*)</source> <translation>File PNG (*.png);;AllFiles (*)</translation> </message> diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts index 7a71ef9e..b25e0898 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_ca.ts @@ -1,45 +1,45 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="ca_ES"> <context> <name>TerminalWidget</name> <message> - <location filename="../TerminalWidget.cpp" line="50"/> + <location filename="../TerminalWidget.cpp" line="50"></location> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Copia la selecció</translation> </message> <message> - <location filename="../TerminalWidget.cpp" line="51"/> + <location filename="../TerminalWidget.cpp" line="51"></location> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Enganxa</translation> </message> </context> <context> <name>TrayIcon</name> <message> - <location filename="../TrayIcon.cpp" line="123"/> + <location filename="../TrayIcon.cpp" line="123"></location> <source>Trigger Terminal</source> - <translation type="unfinished"></translation> + <translation>Activa el terminal</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="125"/> + <location filename="../TrayIcon.cpp" line="125"></location> <source>Top of Screen</source> - <translation type="unfinished"></translation> + <translation>A dalt de tot de la pantalla</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="130"/> + <location filename="../TrayIcon.cpp" line="130"></location> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Tanca el terminal</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="139"/> + <location filename="../TrayIcon.cpp" line="139"></location> <source>Move To Monitor</source> - <translation type="unfinished"></translation> + <translation>Desplaça al monitor</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="142"/> + <location filename="../TrayIcon.cpp" line="142"></location> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Monitor %1</translation> </message> </context> </TS> diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts index 3d4e65ac..639d51a0 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_cs.ts @@ -1,45 +1,45 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="cs_CZ"> <context> <name>TerminalWidget</name> <message> - <location filename="../TerminalWidget.cpp" line="50"/> + <location filename="../TerminalWidget.cpp" line="50"></location> <source>Copy Selection</source> - <translation type="unfinished"></translation> + <translation>Kopírovat výběr</translation> </message> <message> - <location filename="../TerminalWidget.cpp" line="51"/> + <location filename="../TerminalWidget.cpp" line="51"></location> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Vložit</translation> </message> </context> <context> <name>TrayIcon</name> <message> - <location filename="../TrayIcon.cpp" line="123"/> + <location filename="../TrayIcon.cpp" line="123"></location> <source>Trigger Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="125"/> + <location filename="../TrayIcon.cpp" line="125"></location> <source>Top of Screen</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="130"/> + <location filename="../TrayIcon.cpp" line="130"></location> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Zavřít terminál</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="139"/> + <location filename="../TrayIcon.cpp" line="139"></location> <source>Move To Monitor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="142"/> + <location filename="../TrayIcon.cpp" line="142"></location> <source>Monitor %1</source> - <translation type="unfinished"></translation> + <translation>Obrazovka %1</translation> </message> </context> </TS> diff --git a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts index 6254e61d..b9236d74 100644 --- a/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts +++ b/src-qt5/desktop-utils/lumina-terminal/i18n/l-terminal_it.ts @@ -1,43 +1,43 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="it_IT"> <context> <name>TerminalWidget</name> <message> - <location filename="../TerminalWidget.cpp" line="50"/> + <location filename="../TerminalWidget.cpp" line="50"></location> <source>Copy Selection</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TerminalWidget.cpp" line="51"/> + <location filename="../TerminalWidget.cpp" line="51"></location> <source>Paste</source> - <translation type="unfinished"></translation> + <translation>Incolla</translation> </message> </context> <context> <name>TrayIcon</name> <message> - <location filename="../TrayIcon.cpp" line="123"/> + <location filename="../TrayIcon.cpp" line="123"></location> <source>Trigger Terminal</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="125"/> + <location filename="../TrayIcon.cpp" line="125"></location> <source>Top of Screen</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="130"/> + <location filename="../TrayIcon.cpp" line="130"></location> <source>Close Terminal</source> - <translation type="unfinished"></translation> + <translation>Chiudi terminale</translation> </message> <message> - <location filename="../TrayIcon.cpp" line="139"/> + <location filename="../TrayIcon.cpp" line="139"></location> <source>Move To Monitor</source> <translation type="unfinished"></translation> </message> <message> - <location filename="../TrayIcon.cpp" line="142"/> + <location filename="../TrayIcon.cpp" line="142"></location> <source>Monitor %1</source> <translation type="unfinished"></translation> </message> diff --git a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_ca.ts b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_ca.ts index c201ab3b..cf1aaf99 100644 --- a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_ca.ts +++ b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_ca.ts @@ -1,41 +1,41 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE TS> <TS version="2.1" language="ca"> <context> <name>ColorDialog</name> <message> - <location filename="../ColorDialog.ui" line="14"/> + <location filename="../ColorDialog.ui" line="14"></location> <source>Customize Colors</source> <translation>Personalització dels colors</translation> </message> <message> - <location filename="../ColorDialog.ui" line="24"/> + <location filename="../ColorDialog.ui" line="24"></location> <source>Item Type</source> - <translation>Tipus d'ítem</translation> + <translation>Tipus d'ítem</translation> </message> <message> - <location filename="../ColorDialog.ui" line="29"/> + <location filename="../ColorDialog.ui" line="29"></location> <source>Color</source> <translation>Color</translation> </message> <message> - <location filename="../ColorDialog.ui" line="34"/> + <location filename="../ColorDialog.ui" line="34"></location> <source>Sample</source> <translation>Exemple</translation> </message> <message> - <location filename="../ColorDialog.ui" line="44"/> - <location filename="../ColorDialog.cpp" line="55"/> + <location filename="../ColorDialog.ui" line="44"></location> + <location filename="../ColorDialog.cpp" line="55"></location> <source>Select Color</source> <translation>Seleccioneu un color</translation> </message> <message> - <location filename="../ColorDialog.ui" line="64"/> + <location filename="../ColorDialog.ui" line="64"></location> <source>Cancel</source> <translation>Cancel·la</translation> </message> <message> - <location filename="../ColorDialog.ui" line="71"/> + <location filename="../ColorDialog.ui" line="71"></location> <source>Apply</source> <translation>Aplica</translation> </message> @@ -43,252 +43,258 @@ <context> <name>MainUI</name> <message> - <location filename="../MainUI.ui" line="14"/> + <location filename="../MainUI.ui" line="14"></location> <source>MainWindow</source> <translation>Finestra principal</translation> </message> <message> - <location filename="../MainUI.ui" line="46"/> + <location filename="../MainUI.ui" line="46"></location> <source>Tab 1</source> <translation>Pestanya 1</translation> </message> <message> - <location filename="../MainUI.ui" line="81"/> + <location filename="../MainUI.ui" line="81"></location> <source>Find the previous match</source> <translation>Cerca la coincidència anterior</translation> </message> <message> - <location filename="../MainUI.ui" line="84"/> - <location filename="../MainUI.ui" line="97"/> - <location filename="../MainUI.ui" line="148"/> - <location filename="../MainUI.ui" line="161"/> - <location filename="../MainUI.ui" line="173"/> + <location filename="../MainUI.ui" line="84"></location> + <location filename="../MainUI.ui" line="97"></location> + <location filename="../MainUI.ui" line="148"></location> + <location filename="../MainUI.ui" line="161"></location> + <location filename="../MainUI.ui" line="173"></location> <source>...</source> <translation>...</translation> </message> <message> - <location filename="../MainUI.ui" line="183"/> + <location filename="../MainUI.ui" line="183"></location> <source>Find:</source> <translation>Cerca:</translation> </message> <message> - <location filename="../MainUI.ui" line="94"/> + <location filename="../MainUI.ui" line="94"></location> <source>Find the next match</source> <translation>Cerca la coincidència següent</translation> </message> <message> - <location filename="../MainUI.ui" line="104"/> + <location filename="../MainUI.ui" line="104"></location> <source>Replace:</source> <translation>Reemplaça:</translation> </message> <message> - <location filename="../MainUI.ui" line="123"/> + <location filename="../MainUI.ui" line="123"></location> <source>Match case</source> <translation>Coincidència de majúscules i minúscules</translation> </message> <message> - <location filename="../MainUI.ui" line="145"/> + <location filename="../MainUI.ui" line="145"></location> <source>Replace next match</source> <translation>Reemplaça la coincidència següent</translation> </message> <message> - <location filename="../MainUI.ui" line="158"/> + <location filename="../MainUI.ui" line="158"></location> <source>Replace all matches (to end of document)</source> <translation>Reemplaça totes les coincidències (fins al final del document)</translation> </message> <message> - <location filename="../MainUI.ui" line="170"/> + <location filename="../MainUI.ui" line="170"></location> <source>Hide the find/replace options</source> - <translation type="unfinished"></translation> + <translation>Amaga les opcions de cerca / reemplaça</translation> </message> <message> - <location filename="../MainUI.ui" line="208"/> + <location filename="../MainUI.ui" line="208"></location> <source>File</source> <translation>Fitxer</translation> </message> <message> - <location filename="../MainUI.ui" line="221"/> + <location filename="../MainUI.ui" line="221"></location> <source>View</source> <translation>Vista</translation> </message> <message> - <location filename="../MainUI.ui" line="225"/> + <location filename="../MainUI.ui" line="225"></location> <source>Syntax Highlighting</source> <translation>Realçament de la sintaxi</translation> </message> <message> - <location filename="../MainUI.ui" line="238"/> + <location filename="../MainUI.ui" line="238"></location> <source>Edit</source> <translation>Edita</translation> </message> <message> - <location filename="../MainUI.ui" line="253"/> + <location filename="../MainUI.ui" line="253"></location> <source>toolBar</source> - <translation>Barra d'eines</translation> + <translation>Barra d'eines</translation> </message> <message> - <location filename="../MainUI.ui" line="279"/> + <location filename="../MainUI.ui" line="279"></location> <source>Show Line Numbers</source> <translation>Mostra els números de les línies</translation> </message> <message> - <location filename="../MainUI.ui" line="284"/> + <location filename="../MainUI.ui" line="284"></location> <source>None</source> <translation>Cap</translation> </message> <message> - <location filename="../MainUI.ui" line="289"/> - <location filename="../MainUI.cpp" line="147"/> + <location filename="../MainUI.ui" line="289"></location> + <location filename="../MainUI.cpp" line="147"></location> <source>New File</source> <translation>Fitxer nou</translation> </message> <message> - <location filename="../MainUI.ui" line="292"/> + <location filename="../MainUI.ui" line="292"></location> <source>Ctrl+N</source> <translation>Ctrl+N</translation> </message> <message> - <location filename="../MainUI.ui" line="300"/> + <location filename="../MainUI.ui" line="300"></location> <source>Open File</source> <translation>Obre el fitxer</translation> </message> <message> - <location filename="../MainUI.ui" line="303"/> + <location filename="../MainUI.ui" line="303"></location> <source>Ctrl+O</source> <translation>Ctrl+O</translation> </message> <message> - <location filename="../MainUI.ui" line="311"/> + <location filename="../MainUI.ui" line="311"></location> <source>Save File</source> <translation>Desa el fitxer</translation> </message> <message> - <location filename="../MainUI.ui" line="314"/> + <location filename="../MainUI.ui" line="314"></location> <source>Ctrl+S</source> <translation>Ctrl+S</translation> </message> <message> - <location filename="../MainUI.ui" line="322"/> + <location filename="../MainUI.ui" line="322"></location> <source>Save File As</source> <translation>Desa el fitxer com a...</translation> </message> <message> - <location filename="../MainUI.ui" line="327"/> + <location filename="../MainUI.ui" line="327"></location> <source>Close</source> <translation>Tanca</translation> </message> <message> - <location filename="../MainUI.ui" line="330"/> + <location filename="../MainUI.ui" line="330"></location> <source>Ctrl+Q</source> <translation>Ctrl+Q</translation> </message> <message> - <location filename="../MainUI.ui" line="338"/> + <location filename="../MainUI.ui" line="338"></location> <source>Close File</source> <translation>Tanca el fitxer</translation> </message> <message> - <location filename="../MainUI.ui" line="341"/> + <location filename="../MainUI.ui" line="341"></location> <source>Ctrl+W</source> <translation>Ctrl+W</translation> </message> <message> - <location filename="../MainUI.ui" line="349"/> + <location filename="../MainUI.ui" line="349"></location> <source>Customize Colors</source> <translation>Personalització dels colors</translation> </message> <message> - <location filename="../MainUI.ui" line="360"/> + <location filename="../MainUI.ui" line="360"></location> <source>Wrap Lines</source> <translation>Ajusta les línies</translation> </message> <message> - <location filename="../MainUI.ui" line="365"/> + <location filename="../MainUI.ui" line="365"></location> <source>Find</source> <translation>Cerca</translation> </message> <message> - <location filename="../MainUI.ui" line="368"/> + <location filename="../MainUI.ui" line="368"></location> <source>Ctrl+F</source> <translation>Ctrl+F</translation> </message> <message> - <location filename="../MainUI.ui" line="376"/> + <location filename="../MainUI.ui" line="376"></location> <source>Replace</source> <translation>Reemplaça</translation> </message> <message> - <location filename="../MainUI.ui" line="379"/> + <location filename="../MainUI.ui" line="379"></location> <source>Ctrl+R</source> <translation>Ctrl+R</translation> </message> <message> - <location filename="../MainUI.cpp" line="40"/> + <location filename="../MainUI.cpp" line="40"></location> <source>Text Editor</source> <translation>Editor de text</translation> </message> <message> - <location filename="../MainUI.cpp" line="154"/> + <location filename="../MainUI.cpp" line="154"></location> <source>Open File(s)</source> <translation>Obre fitxers</translation> </message> <message> - <location filename="../MainUI.cpp" line="154"/> + <location filename="../MainUI.cpp" line="154"></location> <source>Text Files (*)</source> <translation>Fitxers de text (*)</translation> </message> <message> - <location filename="../MainUI.cpp" line="283"/> - <location filename="../MainUI.cpp" line="380"/> + <location filename="../MainUI.cpp" line="283"></location> + <location filename="../MainUI.cpp" line="380"></location> <source>Lose Unsaved Changes?</source> - <translation type="unfinished"></translation> + <translation>Es perden els canvis no desats?</translation> </message> <message> - <location filename="../MainUI.cpp" line="283"/> + <location filename="../MainUI.cpp" line="283"></location> <source>This file has unsaved changes. Do you want to close it anyway? %1</source> - <translation type="unfinished"></translation> + <translation>Aquest fitxer té canvis no desats. +El voleu tancar tanmateix? + +%1</translation> </message> <message> - <location filename="../MainUI.cpp" line="380"/> + <location filename="../MainUI.cpp" line="380"></location> <source>There are unsaved changes. Do you want to close the editor anyway? %1</source> - <translation type="unfinished"></translation> + <translation>Hi ha canvis no desats. +Voleu tancar l'editor tanmateix? + +%1</translation> </message> </context> <context> <name>PlainTextEditor</name> <message> - <location filename="../PlainTextEditor.cpp" line="94"/> + <location filename="../PlainTextEditor.cpp" line="94"></location> <source>Save File</source> <translation>Desa el fitxer</translation> </message> <message> - <location filename="../PlainTextEditor.cpp" line="94"/> + <location filename="../PlainTextEditor.cpp" line="94"></location> <source>Text File (*)</source> <translation>Fitxer de text (*)</translation> </message> <message> - <location filename="../PlainTextEditor.cpp" line="289"/> + <location filename="../PlainTextEditor.cpp" line="289"></location> <source>Row Number: %1, Column Number: %2</source> - <translation type="unfinished"></translation> + <translation>Número de fila: %1. Número de columna: %2</translation> </message> <message> - <location filename="../PlainTextEditor.cpp" line="298"/> + <location filename="../PlainTextEditor.cpp" line="298"></location> <source>The following file has been changed by some other utility. Do you want to re-load it?</source> <translation>El fitxer següent ha estat canviat per alguna altra utilitat. El voleu tornar a carregar?</translation> </message> <message> - <location filename="../PlainTextEditor.cpp" line="300"/> + <location filename="../PlainTextEditor.cpp" line="300"></location> <source>(Note: You will lose all currently-unsaved changes)</source> <translation>(Nota: perdreu tots els canvis que no estiguin desats ara mateix.)</translation> </message> <message> - <location filename="../PlainTextEditor.cpp" line="304"/> + <location filename="../PlainTextEditor.cpp" line="304"></location> <source>File Modified</source> <translation>Fitxer modificat</translation> </message> diff --git a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_el.ts b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_el.ts index aa7eeff7..0418afb4 100644 --- a/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_el.ts +++ b/src-qt5/desktop-utils/lumina-textedit/i18n/l-te_el.ts @@ -45,7 +45,7 @@ <message> <location filename="../MainUI.ui" line="14"></location> <source>MainWindow</source> - <translation type="unfinished">Κύριο Παράθυρο</translation> + <translation type="unfinished">ΚύριοΠαράθυρο</translation> </message> <message> <location filename="../MainUI.ui" line="46"></location> @@ -69,7 +69,7 @@ <message> <location filename="../MainUI.ui" line="183"></location> <source>Find:</source> - <translation>Βρές:</translation> + <translation>Βρείτε:</translation> </message> <message> <location filename="../MainUI.ui" line="94"></location> @@ -79,7 +79,7 @@ <message> <location filename="../MainUI.ui" line="104"></location> <source>Replace:</source> - <translation>Αντικατέστησε:</translation> + <translation>Αντικαταστήστε:</translation> </message> <message> <location filename="../MainUI.ui" line="123"></location> @@ -94,7 +94,7 @@ <message> <location filename="../MainUI.ui" line="158"></location> <source>Replace all matches (to end of document)</source> - <translation>Αντικατέστησε όλες τις ταυτίσεις (στο τέλος του εγγράφου)</translation> + <translation>Αντικαταστήστε όλες τις ταυτίσεις (στο τέλος του εγγράφου)</translation> </message> <message> <location filename="../MainUI.ui" line="170"></location> @@ -129,7 +129,7 @@ <message> <location filename="../MainUI.ui" line="279"></location> <source>Show Line Numbers</source> - <translation>Εμφάνισε Αριθμούς Γραμμών</translation> + <translation>Εμφανίστε Αριθμούς Γραμμών</translation> </message> <message> <location filename="../MainUI.ui" line="284"></location> @@ -170,7 +170,7 @@ <message> <location filename="../MainUI.ui" line="322"></location> <source>Save File As</source> - <translation>Αποθήκευση Αρχείου ως</translation> + <translation>Αποθήκευση Αρχείου Ως</translation> </message> <message> <location filename="../MainUI.ui" line="327"></location> |