diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b8e412..7fb957b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,121 +1,124 @@ project(smb4k) set(VERSION_MAJOR 3) set(VERSION_MINOR 0) set(VERSION_PATCH 70) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) # Minimum required CMake version cmake_minimum_required(VERSION 3.2 FATAL_ERROR) # CMake policies cmake_policy(SET CMP0037 NEW) if (POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() # Minimum required versions of Qt5 and KF5 set(QT_MIN_VERSION "5.6.0") set(KF5_MIN_VERSION "5.25.0") if(KF5_VERSION VERSION_GREATER "5.55.0") set(AUTHLIB KF5::AuthCore) else() set(AUTHLIB KF5::Auth) endif() find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake/) include(KDEInstallDirs) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) include(FeatureSummary) include(ECMInstallIcons) include(ECMSetupVersion) ecm_setup_version(${VERSION} VARIABLE_PREFIX SMB4K VERSION_HEADER smb4k_version.h) # Qt5 modules find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED) find_package(Qt5Gui ${QT_MIN_VERSION} REQUIRED) find_package(Qt5Network ${QT_MIN_VERSION} REQUIRED) find_package(Qt5PrintSupport ${QT_MIN_VERSION} REQUIRED) find_package(Qt5Qml ${QT_MIN_VERSION} REQUIRED) find_package(Qt5Test ${QT_MIN_VERSION} REQUIRED) find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED) # KF5 modules find_package(KF5Auth ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Completion ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Config ${KF5_MIN_VERSION} REQUIRED) find_package(KF5ConfigWidgets ${KF5_MIN_VERSION} REQUIRED) find_package(KF5CoreAddons ${KF5_MIN_VERSION} REQUIRED) find_package(KF5DBusAddons ${KF5_MIN_VERSION} REQUIRED) find_package(KF5DocTools ${KF5_MIN_VERSION} REQUIRED) find_package(KF5I18n ${KF5_MIN_VERSION} REQUIRED) find_package(KF5IconThemes ${KF5_MIN_VERSION} REQUIRED) find_package(KF5JobWidgets ${KF5_MIN_VERSION} REQUIRED) find_package(KF5KIO ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Notifications ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Solid ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Wallet ${KF5_MIN_VERSION} REQUIRED) find_package(KF5WidgetsAddons ${KF5_MIN_VERSION} REQUIRED) find_package(KF5WindowSystem ${KF5_MIN_VERSION} REQUIRED) find_package(KF5XmlGui ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Crash ${KF5_MIN_VERSION} REQUIRED) find_package(KF5Plasma ${KF5_MIN_VERSION}) set_package_properties(KF5Plasma PROPERTIES TYPE RUNTIME) # Find libsmbclient.h find_package(Libsmbclient REQUIRED MODULE) # Make sure that Smb4K builds when several custom targets # with the same name exist (happens in the po directory). if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON) endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") +if (EXISTS "${CMAKE_SOURCE_DIR}/.git") + add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000) +endif() # Make sure that all libraries, plugins, etc. are installed # into the right place. set(KDE_INSTALL_USE_QT_SYS_PATHS ON CACHE BOOLEAN "Use Qt system paths for installation" FORCE) # Add subdirectories add_subdirectory(core) add_subdirectory(helpers) add_subdirectory(smb4k) add_subdirectory(data) add_subdirectory(doc) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") ki18n_install(po) if(KF5DocTools_FOUND) kdoctools_install(po) endif(KF5DocTools_FOUND) endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/po") # Install the header files if desired option(INSTALL_HEADER_FILES "Install header files" OFF) if (INSTALL_HEADER_FILES) message(STATUS "Installing core header files (-DINSTALL_HEADER_FILES=false to disable)") elseif (NOT INSTALL_HEADER_FILES) message(STATUS "Not installing core header files (-DINSTALL_HEADER_FILES=true to enable)") endif(INSTALL_HEADER_FILES) # Do not install the plasmoid if not desired option(INSTALL_PLASMOID "Install the plasmoid" ON) if (INSTALL_PLASMOID) message(STATUS "Installing plasmoid (-DINSTALL_PLASMOID=false to disable)") add_subdirectory(plasmoid) elseif(NOT INSTALL_PLASMOID) message(STATUS "Not installing plasmoid (-DINSTALL_PLASMOID=true to enable)") endif(INSTALL_PLASMOID) ########### install files ############### feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/core/smb4k.notifyrc b/core/smb4k.notifyrc index dc07221..1176c12 100644 --- a/core/smb4k.notifyrc +++ b/core/smb4k.notifyrc @@ -1,1740 +1,1788 @@ [Global] IconName=smb4k Name=Smb4K Name[bs]=Smb4K Name[ca]=Smb4K Name[ca@valencia]=Smb4K Name[cs]=Smb4K Name[da]=Smb4K Name[de]=Smb4K Name[el]=Smb4K Name[en_GB]=Smb4K Name[es]=Smb4K Name[et]=Smb4K Name[fi]=Smb4K Name[fr]=Smb4K Name[gl]=Smb4K Name[hu]=Smb4K Name[ia]=SMB4K Name[it]=Smb4K Name[ko]=Smb4K Name[lt]=Smb4K Name[nds]=Smb4K Name[nl]=Smb4K Name[pl]=Smb4K Name[pt]=Smb4K Name[pt_BR]=Smb4K Name[ro]=Smb4K Name[ru]=Smb4K Name[sk]=Smb4K Name[sv]=Smb4K Name[tr]=Smb4K Name[uk]=Smb4K Name[x-test]=xxSmb4Kxx Name[zh_CN]=Smb4K Name[zh_TW]=Smb4K Comment=Advanced Network Neighborhood Browser Comment[bs]=Napredni pregledač mrežnog susjedstva Comment[ca]=Explorador avançat del veïnatge de xarxa Comment[ca@valencia]=Explorador avançat del veïnatge de xarxa Comment[cs]=Pokročilý prohlížeč síťového okolí Comment[da]=Den avancerede browser til netværksnabolag Comment[de]=Erweiterter Browser für die Netzwerkumgebung Comment[el]= περιηγητής περιοχής δικτύου Comment[en_GB]=Advanced Network Neighbourhood Browser Comment[es]=Navegador de entorno de red avanzado Comment[et]=Täiustatud võrgunaabruse sirvija Comment[fi]=Kehittynyt verkkoympäristöselain Comment[fr]=Explorateur avancé de voisinage réseau Comment[gl]=Navegador avanzado da veciñanza de rede Comment[hu]=Speciális hálózati mappa böngésző Comment[it]=Navigatore avanzato delle risorse di rete Comment[ko]=고급 네트워크 환경 탐색기 Comment[nds]=Verwiedert Nettwarkümgeven-Kieker Comment[nl]=Geavanceerde browser voor de netwerkomgeving Comment[pl]=Przeglądarka otoczenia sieciowego Comment[pt]=Navegador Avançado da Vizinhança da Rede Comment[pt_BR]=Navegador avançado da vizinhança da rede Comment[ru]=Диспетчер сетевого окружения Comment[sk]=Pokročilý prehliadač sieťového okolia Comment[sv]=Avancerad bläddrare för nätverksgrannskapet Comment[tr]=Gelişmiş Ağ Komşuları Tarayıcı Comment[uk]=Переглядач мережевого оточення з додатковими можливостями Comment[x-test]=xxAdvanced Network Neighborhood Browserxx Comment[zh_CN]=高级网上邻居浏览器 Comment[zh_TW]=進階網路芳鄰瀏覽器 Version=1 [Context/Notification] Name=Notification Name[bs]=Obavještenje Name[ca]=Notificació Name[ca@valencia]=Notificació Name[cs]=Upozornění Name[da]=Bekendtgørelse Name[de]=Benachrichtigung Name[el]=Ειδοποίηση Name[en_GB]=Notification Name[es]=Notificación Name[et]=Märguanne Name[fi]=Ilmoitus Name[fr]=Notification Name[gl]=Notificación Name[hu]=Értesítés Name[ia]=Notification Name[it]=Notifica Name[ko]=알림 Name[lt]=Pranešimas Name[nds]=Bescheed Name[nl]=Melding Name[pl]=Powiadomienie Name[pt]=Notificação Name[pt_BR]=Notificação Name[ro]=Notificare Name[ru]=Уведомление Name[sk]=Pripomienka Name[sv]=Underrättelse Name[tr]=Bildirim Name[uk]=Сповіщення Name[x-test]=xxNotificationxx Name[zh_CN]=通知 Name[zh_TW]=通知 Comment=The user is notified about an action Comment[bs]=Korisnik je obavješten o akciji Comment[ca]=L'usuari ha estat notificat quant a una acció Comment[ca@valencia]=L'usuari ha estat notificat quant a una acció Comment[cs]=Uživatel je na činnost upozorněn Comment[da]=Brugeren får besked om en handling Comment[de]=Den Benutzer über eine Aktion benachrichtigen Comment[el]=Ο χρήστης ειδοποιείται για κάποια ενέργεια Comment[en_GB]=The user is notified about an action Comment[es]=Se notifica al usuario de una acción Comment[et]=Kasutajale antakse märku toimingust Comment[fi]=Käyttäjää tiedotetaan toiminnosta Comment[fr]=L'utilisateur est notifié d'une action Comment[gl]=O usuario recibe unha notificación sobre unha acción. Comment[hu]=A felhasználót értesítették egy műveletről Comment[it]=Un'azione viene notificata all'utente Comment[ko]=사용자가 동작 알림을 받음 Comment[nds]=De Bruker kriggt Bescheed över en Akschoon Comment[nl]=De gebruiker is op de hoogte gesteld van een actie Comment[pl]=Użytkownik jest powiadamiany od działaniu Comment[pt]=O utilizador foi notificado por uma dada acção Comment[pt_BR]=O usuário é informado sobre uma ação Comment[ru]=Пользователь уведомляется о действии Comment[sk]=Používateľ je upozornený na akciu Comment[sv]=Användaren blir underrättad om en åtgärd Comment[tr]=Kullanıcı bir işlemden dolayı bilgilendirildi Comment[uk]=Користувачеві повідомлено про дію Comment[x-test]=xxThe user is notified about an actionxx Comment[zh_CN]=通知用户有关操作 Comment[zh_TW]=使用者被通知某些動作 [Context/Warning] Name=Warning Name[bs]=Upozorenje Name[ca]=Avís Name[ca@valencia]=Avís Name[cs]=Varování Name[da]=Advarsel Name[de]=Warnung Name[el]=Προειδοποίηση Name[en_GB]=Warning Name[es]=Advertencia Name[et]=Hoiatus Name[fi]=Varoitus Name[fr]=Avertissement Name[gl]=Aviso Name[hu]=Figyelmeztetés Name[ia]=Aviso Name[it]=Avviso Name[ko]=경고 Name[lt]=Perspėjimas Name[nds]=Wohrschoen Name[nl]=Waarschuwing Name[pl]=Ostrzeżenie Name[pt]=Aviso Name[pt_BR]=Aviso Name[ro]=Avertizare Name[ru]=Предупреждение Name[sk]=Upozornenie Name[sv]=Varning Name[tr]=Uyarı Name[uk]=Попередження Name[x-test]=xxWarningxx Name[zh_CN]=警告 Name[zh_TW]=警告 Comment=A warning is shown to the user Comment[bs]=Prikazana je upozoravajuća poruka korisniku Comment[ca]=Es mostra un avís a l'usuari Comment[ca@valencia]=Es mostra un avís a l'usuari Comment[cs]=Uživateli je zobrazeno varování Comment[da]=En advarselsmeddelelse vises til brugeren Comment[de]=Dem Benutzer eine Warnung anzeigen Comment[el]=Μια προειδοποίηση εμφανίζεται στον χρήστη Comment[en_GB]=A warning is shown to the user Comment[es]=Se muestra una advertencia al usuario Comment[et]=Kasutajale näidatakse hoiatust Comment[fi]=Käyttäjälle näytetään varoitus Comment[fr]=Un avertissement est affiché à l'utilisateur Comment[gl]=O usuario recibe un aviso. Comment[hu]=Egy figyelmeztetést jelenítettek meg a felhasználónak Comment[it]=Un avviso viene mostrato all'utente Comment[ko]=사용자가 경고 메시지를 받음 Comment[nds]=Den Bruker warrt en Wohrschoen wiest Comment[nl]=Er is een waarschuwing getoond aan de gebruiker Comment[pl]=Użytkownikowi jest wyświetlane ostrzeżenie Comment[pt]=Foi apresentado um aviso ao utilizador Comment[pt_BR]=Um aviso é exibido ao usuário Comment[ro]=Este afișat un mesaj de avertizare Comment[ru]=Предупреждение для пользователя Comment[sk]=Používateľovi sa zobrazí upozornenie Comment[sv]=En varning visas för användaren Comment[tr]=Kullanıcıya bir uyarı gösterildi Comment[uk]=Користувачеві показано попередження Comment[x-test]=xxA warning is shown to the userxx Comment[zh_CN]=向用户显示警告 Comment[zh_TW]=警告已顯示給使用者 [Context/Error] Name=Error Name[bs]=Greška Name[ca]=Error Name[ca@valencia]=Error Name[cs]=Chyba Name[da]=Fejl Name[de]=Fehler Name[el]=Σφάλμα Name[en_GB]=Error Name[es]=Error Name[et]=Tõrge Name[fi]=Virhe Name[fr]=Erreur Name[gl]=Erro Name[hu]=Hiba Name[ia]=Error Name[it]=Errore Name[ko]=오류 Name[lt]=Klaida Name[nds]=Fehler Name[nl]=Fout Name[pl]=Błąd Name[pt]=Erro Name[pt_BR]=Erro Name[ro]=Eroare Name[ru]=Ошибка Name[sk]=Chyba Name[sv]=Fel Name[tr]=Hata Name[uk]=Помилка Name[x-test]=xxErrorxx Name[zh_CN]=误差 Name[zh_TW]=錯誤 Comment=An error message is shown to the user Comment[bs]=Poruka greške je prikazana korisniku Comment[ca]=Es mostra un missatge d'error a l'usuari Comment[ca@valencia]=Es mostra un missatge d'error a l'usuari Comment[da]=En fejlmeddelelse vises til brugeren Comment[de]=Dem Benutzer eine Fehlermeldung anzeigen Comment[el]=Ένα μήνυμα σφάλματος εμφανίζεται στον χρήστη Comment[en_GB]=An error message is shown to the user Comment[es]=Se muestra un mensaje de error al usuario Comment[et]=Kasutajale näidatakse tõrketeadet Comment[fi]=Käyttäjälle näytetään virheilmoitus Comment[fr]=Un message d'erreur est affiché à l'utilisateur Comment[gl]=O usuario recibe unha mensaxe de erro. Comment[hu]=Egy hibaüzenetet jelenítettek meg a felhasználónak Comment[it]=Un messaggio d'errore viene mostrato all'utente Comment[ko]=사용자가 오류 메시지를 받음 Comment[nds]=Den Bruker warrt en Fehlermellen wiest Comment[nl]=Er is een foutmelding getoond aan de gebruiker Comment[pl]=Użytkownikowi jest wyświetlana wiadomość błędu Comment[pt]=Foi apresentada uma mensagem de erro ao utilizador Comment[pt_BR]=Uma mensagem de erro é exibida ao usuário Comment[ro]=Este afișat un mesaj de eroare Comment[ru]=Сообщение об ошибке для пользователя Comment[sk]=Používateľovi sa zobrazí chybová správa Comment[sv]=Ett felmeddelande visas för användaren Comment[tr]=Kullanıcıya bir hata mesajı gösterildi Comment[uk]=Користувачеві показано повідомлення про помилку Comment[x-test]=xxAn error message is shown to the userxx Comment[zh_CN]=向用户显示一条错误消息 Comment[zh_TW]=錯誤訊息已顯示給使用者 [Event/shareMounted] Name=Share mounted Name[bs]=Dijeljeni disk je montiran Name[ca]=Compartició muntada Name[ca@valencia]=Compartició muntada Name[da]=Ressource monteret Name[de]=Freigabe eingehängt Name[el]=Ο κοινός πόρος προσαρτήθηκε Name[en_GB]=Share mounted Name[es]=Recurso compartido montado +Name[et]=Ressurss ühendatud Name[fi]=Jako liitetty Name[fr]=Partage monté Name[gl]=Montouse unha compartición Name[hu]=Megosztás csatolva Name[it]=Condivisione montata Name[ko]=마운트된 공유 Name[nds]=Freegaav inhangt Name[nl]=Share aangekoppeld Name[pl]=Podpięto udział Name[pt]=Partilha montada Name[pt_BR]=Compartilhamento montado Name[ro]=Partajare montată Name[ru]=Подключена общая папка Name[sk]=Zdieľanie pripojené Name[sv]=Delad resurs monterad Name[tr]=Paylaşım bağlandı Name[uk]=Змонтовано ресурс Name[x-test]=xxShare mountedxx Name[zh_CN]=共享已挂载 Name[zh_TW]=分享資料夾已掛載 Comment=A share has been mounted Comment[bs]=Dijeljeni disk je bio montiran Comment[ca]=S'ha muntat una compartició Comment[ca@valencia]=S'ha muntat una compartició Comment[da]=En ressource er blevet monteret Comment[de]=Es wurde eine Freigaben eingehängt Comment[el]=Ένα κοινός πόρος έχει προσαρτηθεί Comment[en_GB]=A share has been mounted Comment[es]=Se ha montado un recurso compartido +Comment[et]=Jagatud ressurss ühendati Comment[fi]=Jako on liitetty Comment[fr]=Un partage a été monté Comment[gl]=Montouse unha compartición. Comment[hu]=Egy megosztás csatolva lett Comment[it]=È stata montata una condivisione Comment[ko]=공유가 마운트되었습니다 Comment[nds]=En Freegaav wöör inhangt Comment[nl]=Een gedeelde map is aangekoppeld Comment[pl]=Udział został podpięty Comment[pt]=Uma partilha foi montada Comment[pt_BR]=Um compartilhamento foi montado Comment[ro]=O partajare a fost montată Comment[ru]=Была подключена общая папка Comment[sk]=Zdieľanie bolo pripojené Comment[sv]=En delad resurs har monterats Comment[tr]=Bir paylaşım bağlandı Comment[uk]=Спільний ресурс було змонтовано Comment[x-test]=xxA share has been mountedxx Comment[zh_CN]=共享已经被挂载了 Comment[zh_TW]=分享資料夾已掛載 Contexts=Notification Action=Popup [Event/shareUnmounted] Name=Share unmounted Name[bs]=Dijeljeni disk je demontiran Name[ca]=Compartició desmuntada Name[ca@valencia]=Compartició desmuntada Name[da]=Ressource afmonteret Name[de]=Freigabe ausgehängt Name[el]=Ο κοινός πόρος αποπροσαρτήθηκε Name[en_GB]=Share unmounted Name[es]=Recurso compartido desmontado +Name[et]=Ressurss lahutatud Name[fi]=Jako irrotettu Name[fr]=Partage libéré Name[gl]=Desmontouse unha compartición Name[hu]=Megosztás leválasztva Name[it]=Condivisione smontata Name[ko]=마운트 해제된 공유 Name[nds]=Freegaav afhangt Name[nl]=Share afgekoppeld Name[pl]=Odpięto udział Name[pt]=Partilha desmontada Name[pt_BR]=Compartilhamento desmontado Name[ro]=Partajare demontată Name[ru]=Отключена общая папка Name[sk]=Zdieľanie odpojené Name[sv]=Delad resurs avmonterad Name[tr]=Paylaşım ayrıldı Name[uk]=Демонтовано ресурс Name[x-test]=xxShare unmountedxx Name[zh_CN]=共享已卸载 Name[zh_TW]=分享資料夾已卸載 Comment=A share has been unmounted Comment[bs]=Dijeljeni disk je bio demontiran Comment[ca]=S'ha desmuntat una compartició Comment[ca@valencia]=S'ha desmuntat una compartició Comment[da]=En ressource er blevet afmonteret Comment[de]=Eine Freigabe ist ausgehängt worden Comment[el]=Ένας κοινός πόρος έχει αποπροσαρτηθεί Comment[en_GB]=A share has been unmounted Comment[es]=Se ha desmontado un recurso compartido +Comment[et]=Jagatud ressurss lahutati Comment[fi]=Jako on irrotettu Comment[fr]=Un partage a été libéré Comment[gl]=Desmontouse unha compartición. Comment[hu]=Egy megosztás le lett választva Comment[it]=È stata smontata una condivisione Comment[ko]=공유가 마운트 해제되었습니다 Comment[nds]=En Freegaav wöör afhangt Comment[nl]=Een gedeelde map is afgekoppeld Comment[pl]=Udział został odpięty Comment[pt]=Uma partilha foi desmontada Comment[pt_BR]=Um compartilhamento foi desmontado Comment[ro]=O partajare a fost demontată Comment[ru]=Была отключена общая папка Comment[sk]=Zdieľanie bolo odpojené Comment[sv]=En delad resurs har avmonterats Comment[tr]=Bir paylaşım ayrıldı Comment[uk]=Спільний ресурс було демонтовано Comment[x-test]=xxA share has been unmountedxx Comment[zh_CN]=共享已经被卸载了 Comment[zh_TW]=分享資料夾已卸載 Contexts=Notification Action=Popup [Event/sharesMounted] Name=Shares mounted Name[bs]=Dijeljeni disk je montiran Name[ca]=Comparticions muntades Name[ca@valencia]=Comparticions muntades Name[da]=Ressourcer monteret Name[de]=Freigaben eingehängt Name[el]=Οι κοινοί πόροι προσαρτήθηκαν Name[en_GB]=Shares mounted Name[es]=Recursos compartidos montados +Name[et]=Ressursid ühendatud Name[fi]=Jakoja on liitetty Name[fr]=Partages montés Name[gl]=Montáronse varias comparticións Name[hu]=Megosztások csatolva Name[it]=Condivisioni montate Name[ko]=마운트된 공유 Name[nds]=Freegaven inhangt Name[nl]=Shares aangekoppeld Name[pl]=Podpięto udziały Name[pt]=Partilhas montadas Name[pt_BR]=Compartilhamentos montados Name[ro]=Partajări montate Name[ru]=Подключены общие папки Name[sk]=Zdieľania pripojené Name[sv]=Delade resurser monterade Name[tr]=Paylaşımlar bağlandı Name[uk]=Змонтовано ресурси Name[x-test]=xxShares mountedxx Name[zh_CN]=共享已挂载 Name[zh_TW]=分享資料夾已掛載 Comment=Multiple shares have been mounted Comment[bs]=Višestruka dijeljenja diska su bila montirana Comment[ca]=S'han muntat múltiples comparticions Comment[ca@valencia]=S'han muntat múltiples comparticions Comment[da]=Flere ressourcer er blevet monteret Comment[de]=Mehrere Freigaben wurden eingehängt Comment[el]=Πολλοί κοινοί πόροι έχουν προσαρτηθεί Comment[en_GB]=Multiple shares have been mounted Comment[es]=Se han montado varios recursos compartidos +Comment[et]=Mitu jagatud ressurssi ühendati Comment[fi]=Useampi jako on liitetty Comment[fr]=Plusieurs partages ont été montés Comment[gl]=Montáronse varias comparticións. Comment[hu]=Több megosztás csatolva lett Comment[it]=Sono state montate condivisioni multiple Comment[ko]=여러 공유가 마운트되었습니다 Comment[nds]=Mehr as een Freegaav wöör inhangt Comment[nl]=Meerdere gedeelde mappen zijn aangekoppeld Comment[pl]=Podpięto wiele udziałów Comment[pt]=Diversas partilhas foram montadas Comment[pt_BR]=Vários compartilhamentos foram montados Comment[ro]=Mai multe partajări au fost montate Comment[ru]=Были подключены несколько общих папок Comment[sk]=Viacero zdieľaní bolo pripojených Comment[sv]=Flera delade resurser har monterats Comment[tr]=Çoklu paylaşımlar bağlandı Comment[uk]=Змонтовано декілька спільних ресурсів Comment[x-test]=xxMultiple shares have been mountedxx Comment[zh_CN]=多个共享已经被挂载了 Comment[zh_TW]=多個分享資料夾已掛載 Contexts=Notification Action=Popup [Event/sharesUnmounted] Name=Shares unmounted Name[bs]=Dijeljenja diska su demontirana Name[ca]=Comparticions desmuntades Name[ca@valencia]=Comparticions desmuntades Name[da]=Ressourcer afmonteret Name[de]=Freigaben ausgehängt Name[el]=Οι κοινοί πόροι αποπροσαρτήθηκαν Name[en_GB]=Shares unmounted Name[es]=Recursos compartidos desmontados +Name[et]=Ressursid lahutatud Name[fi]=Jakoja irrotettu Name[fr]=Partages libérés Name[gl]=Desmontáronse varias comparticións Name[hu]=Megosztások leválasztva Name[it]=Condivisioni smontate Name[ko]=마운트 해제된 공유 Name[nds]=Freegaven afhangt Name[nl]=Shares afgekoppeld Name[pl]=Odpięto udziały Name[pt]=Partilhas desmontadas Name[pt_BR]=Compartilhamentos desmontados Name[ro]=Partajări demontate Name[ru]=Отключены общие папки Name[sk]=Zdieľania odpojené Name[sv]=Delade resurser avmonterade Name[tr]=Paylaşımlar ayrıldı Name[uk]=Демонтовано ресурси Name[x-test]=xxShares unmountedxx Name[zh_CN]=共享已卸载 Name[zh_TW]=分享資料夾已卸載 Comment=Multiple shares have been unmounted Comment[bs]=Višestruka dijeljenja su bila demontirana Comment[ca]=S'han desmuntat múltiples comparticions Comment[ca@valencia]=S'han desmuntat múltiples comparticions Comment[da]=Flere ressourcer er blevet afmonteret Comment[de]=Mehrere Freigaben wurden ausgehängt Comment[el]=Πολλοί κοινοί πόροι έχουν αποπροσαρτηθεί Comment[en_GB]=Multiple shares have been unmounted Comment[es]=Se han desmontado varios recursos compartidos +Comment[et]=Mitu jagatud ressurssi lahutati Comment[fi]=Useampi jako on irrotettu Comment[fr]=Plusieurs partages ont été libérés Comment[gl]=Desmontáronse varias comparticións. Comment[hu]=Több megosztás le lett választva Comment[it]=Sono state smontate condivisioni multiple Comment[ko]=여러 공유가 마운트 해제되었습니다 Comment[nds]=Mehr as een Freegaav wöör afhangt Comment[nl]=Meerdere gedeelde mappen zijn afgekoppeld Comment[pl]=Odpięto wiele udziałów Comment[pt]=Diversas partilhas foram desmontadas Comment[pt_BR]=Vários compartilhamentos foram desmontados Comment[ro]=Mai multe partajări au fost demontate Comment[ru]=Были отключены несколько общих папок Comment[sk]=Viacero zdieľaní bolo odpojených Comment[sv]=Flera delade resurser har avmonterats Comment[tr]=Çoklu paylaşımlar ayrıldı Comment[uk]=Демонтовано декілька спільних ресурсів Comment[x-test]=xxMultiple shares have been unmountedxx Comment[zh_CN]=多个共享已经被卸载了 Comment[zh_TW]=多個分享資料夾已卸載 Contexts=Notification Action=Popup [Event/openingWalletFailed] Name=Opening wallet failed Name[bs]=Otvaranje novčanika s lozinkama neuspješno Name[ca]=Ha fallat l'obertura de la cartera Name[ca@valencia]=Ha fallat l'obertura de la cartera Name[da]=Åbning af tegnebogen mislykkedes Name[de]=Öffnen des Passwortspeichers fehlgeschlagen Name[el]=Αποτυχία ανοίγματος πορτοφολιού Name[en_GB]=Opening wallet failed Name[es]=Fallo de apertura de la cartera +Name[et]=Turvalaeka avamine nurjus Name[fi]=Lompakon avaaminen epäonnistui Name[fr]=Échec de l'ouverture du portefeuille Name[gl]=A apertura da carteira fallou Name[hu]=A jelszótároló megnyitása nem sikerült Name[it]=Apertura del portafoglio non riuscita Name[ko]=월렛 열기 실패 Name[nds]=Opmaken vun de Knipp fehlslaan Name[nl]=Openen van de portefeuille is mislukt Name[pl]=Nieudane otwieranie portfela Name[pt]=Abertura da carteira mal-sucedida Name[pt_BR]=Falha ao abrir a carteira Name[ro]=Deschiderea portofelului a eșuat Name[ru]=Не удалось открыть бумажник Name[sk]=Otvorenie peňaženky zlyhalo Name[sv]=Misslyckades öppna plånboken Name[tr]=Cüzdan açılamadı Name[uk]=Спроба відкриття сховища паролів зазнала невдачі Name[x-test]=xxOpening wallet failedxx Name[zh_CN]=打开钱包失败 Name[zh_TW]=開啟錢包失敗 Comment=The network wallet could not be opened Comment[bs]=Mrežni novčanik s lozinkama nije se mogao otvoriti Comment[ca]=No s'ha pogut obrir la cartera de xarxa Comment[ca@valencia]=No s'ha pogut obrir la cartera de xarxa Comment[da]=Netværkstegnebogen kunne ikke åbnes Comment[de]=Der Netzwerk-Passwortspeicher kann nicht geöffnet werden Comment[el]=Αδυναμία ανοίγματος του δικτυακού πορτοφολιού Comment[en_GB]=The network wallet could not be opened Comment[es]=No se ha podido abrir la cartera de red +Comment[et]=Turvalaegast ei õnnestunud avada Comment[fi]=Verkkolompakkoa ei voi avata Comment[fr]=Impossible d'ouvrir le portefeuille réseau Comment[gl]=Non foi posíbel abrir a carteira da rede. Comment[hu]=A hálózati jelszótároló nem nyitható meg Comment[it]=Il portafoglio di rete non può essere aperto Comment[ko]=네트워크 월렛을 열 수 없습니다 Comment[nds]=De Nettwark-Knipp lett sik nich opmaken Comment[nl]=De netwerkportefeuille kon niet worden geopend Comment[pl]=Nie można otworzyć portfela sieciowego Comment[pt]=Não foi possível abrir a carteira da rede Comment[pt_BR]=Não foi possível abrir a carteira da rede Comment[ro]=Portofelul de rețea nu a putut fi deschis Comment[ru]=Не удалось открыть бумажник для браузера сетевого окружения Comment[sk]=Sieťovú peňaženku nie je možné otvoriť Comment[sv]=Nätverkets plånbok kunde inte öppnas Comment[tr]=Ağ cüzdanı açılamadı Comment[uk]=Не вдалося відкрити сховище паролів до мережі Comment[x-test]=xxThe network wallet could not be openedxx Comment[zh_CN]=无法打开网络钱包 Comment[zh_TW]=無法開啟網路錢包 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/credentialsNotAccessible] Name=Credentials not accessible Name[bs]=Dokumenti nedostupni Name[ca]=Credencials no accessibles Name[ca@valencia]=Credencials no accessibles Name[da]=Akkreditiver ikke tilgængelige Name[de]=Anmeldedaten nicht verfügbar Name[el]=Τα στοιχεία εισόδου δεν είναι προσβάσιμα Name[en_GB]=Credentials not accessible Name[es]=Credenciales inaccesibles +Name[et]=Kasutajatunnuseid pole saada Name[fi]=Valtuutustiedot eivät ole käytettävissä Name[fr]=Identifiants inaccessibles Name[gl]=Non é posíbel acceder ás credenciais Name[hu]=A hitelesítési adatok nem hozzáférhetők Name[it]=Credenziali non accessibili Name[ko]=자격 증명에 액세스할 수 없음 Name[nds]=Togriep op Anmelldaten nich mööglich Name[nl]=Credentials zijn niet toegankelijk Name[pl]=Dane poufne są niedostępne Name[pt]=Credenciais inacessíveis Name[pt_BR]=Credenciais inacessíveis Name[ro]=Acreditările nu sunt accesibile Name[ru]=Сохранённый пароль недоступен Name[sk]=Prihlasovacie údaje neprístupné Name[sv]=Behörighetsinformation ej tillgänglig Name[tr]=Kimlik bilgilerine erişilemiyor Name[uk]=Немає реєстраційних даних Name[x-test]=xxCredentials not accessiblexx Name[zh_CN]=无法访问凭据 Name[zh_TW]=無法取得帳號密碼資訊 Comment=The credentials could not be read from the wallet Comment[bs]=Dokumenti se nisu mogli pročitati iz spremnika Comment[ca]=No s'han pogut llegir les credencials des de la cartera Comment[ca@valencia]=No s'han pogut llegir les credencials des de la cartera Comment[da]=Akkreditiverne kunne ikke læses fra tegnebogen Comment[de]=Die Anmeldedaten können nicht aus dem Passwortspeicher gelesen werden Comment[el]=Αδυναμία ανάγνωσης των στοιχείων εισόδου από το πορτοφόλι Comment[en_GB]=The credentials could not be read from the wallet Comment[es]=No se ha podido leer los credenciales de la cartera +Comment[et]=Turvalaekast ei õnnestunud lugeda kasutajatunnuseid Comment[fi]=Valtuutustietoja ei voitu lukea lompakosta Comment[fr]=Impossible de lire les identifiants dans le portefeuille Comment[gl]=Non foi posíbel ler as credenciais da carteira. Comment[hu]=A hitelesítési adatokat nem sikerült beolvasni a jelszótárolóból Comment[it]=Le credenziali non possono essere lette dal portafoglio Comment[ko]=월렛에서 자격 증명을 읽을 수 없습니다 Comment[nds]=De Anmelldaten laat sik nich ut de Knipp halen Comment[nl]=De credentials konden niet uit de portefeuille worden gelezen Comment[pl]=Nie można odczytać danych poufnych z portfela Comment[pt]=Não foi possível ler as credenciais da carteira Comment[pt_BR]=Não foi possível ler as credenciais a partir da carteira Comment[ro]=Acreditările nu au putut fi citite din portofel Comment[ru]=Не удалось прочитать имя пользователя и пароль из бумажника Comment[sk]=Prihlasovacie údaje nie je možné načítať z peňaženky Comment[sv]=Behörighetsinformationen kunde inte läsas från plånboken Comment[tr]=Kimlik bilgileri cüzdandan okunamadı Comment[uk]=Не вдалося прочитати реєстраційні дані зі сховища паролів Comment[x-test]=xxThe credentials could not be read from the walletxx Comment[zh_CN]=无法从钱包中读取凭据 Comment[zh_TW]=無法從錢包中讀取帳號密碼資訊 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/mimetypeNotSupported] Name=Mimetype not supported Name[bs]=Mimetype nije podržan Name[ca]=Tipus MIME no admès Name[ca@valencia]=Tipus MIME no admés Name[da]=MIME-type ikke understøttet Name[de]=MIME-Typ wird nicht unterstützt Name[el]=Ο τύπος mime δεν υποστηρίζεται Name[en_GB]=Mimetype not supported Name[es]=Tipo MIME no soportado +Name[et]=MIME tüüp ei ole toetatud Name[fi]=MIME-tyyppiä ei tueta Name[fr]=Type MIME non pris en charge Name[gl]=O tipo MIME é incompatíbel Name[hu]=A MIME-típus nem támogatott Name[it]=Tipo MIME non supportato Name[ko]=지원되지 않는 MIME유형 Name[nds]=MIME-Typ warrt nich ünnerstütt Name[nl]=Mimetype wordt niet ondersteund Name[pl]=Typ mime nieobsługiwany Name[pt]=Tipo MIME não suportado Name[pt_BR]=Tipo MIME não suportado Name[ro]=Tipul MIME nu e susținut Name[ru]=Тип MIME не поддерживается Name[sk]=Mime typ nepodporovaný Name[sv]=Mime-typ stöds inte Name[tr]=Mime türü desteklenmiyor Name[uk]=Підтримки типу MIME не передбачено Name[x-test]=xxMimetype not supportedxx Name[zh_CN]=不支持 MIME 类型 Name[zh_TW]=MIME 型態不支援 Comment=The mimetype of the file that is to be printed is not supported Comment[bs]=Mimetype datoteke koji je trebao biti ispisan nije podržan Comment[ca]=El tipus MIME del fitxer a imprimir no està admès Comment[ca@valencia]=El tipus MIME del fitxer a imprimir no està admés Comment[da]=MIME-typen for den fil der skal udskrives, er ikke understøttet Comment[de]=Der MIME-Typ der zu druckenden Datei wird nicht unterstützt Comment[el]=Ο τύπος mime του αρχείου που πρόκειται να εκτυπωθεί δεν υποστηρίζεται Comment[en_GB]=The mimetype of the file that is to be printed is not supported Comment[es]=El tipo MIME del archivo a imprimir no está soportado +Comment[et]=Trükitava faili MIME tüüp ei ole toetatud Comment[fi]=Tulostettavan tiedoston MIME-tyyppiä ei tueta Comment[fr]=Le type MIME du fichier qui doit être imprimé n'est pas pris en charge Comment[gl]=O tipo MIME do ficheiro para imprimir non é compatíbel. Comment[hu]=A kinyomtatandó fájl MIME-típusa nem támogatott Comment[it]=Il tipo MIME del file da stampare non è supportato Comment[ko]=인쇄할 파일의 MIME유형이 지원되지 않습니다 Comment[nds]=De MIME-Typ vun de Datei, de Du drucken wullt, warrt nich ünnerstütt Comment[nl]=Het mimetype van het bestand dat afgedrukt moet worden wordt niet ondersteund Comment[pl]=Typ mime pliku, który masz zamiar wydrukować nie jest obsługiwany Comment[pt]=O tipo MIME do ficheiro a imprimir não é suportado Comment[pt_BR]=O tipo MIME do arquivo a imprimir não é suportado Comment[ru]=Не поддерживается тип MIME файла, который требуется напечатать на принтере Comment[sk]=Mime typ súboru na tlač nie je podporované Comment[sv]=Mime-typen för filen som ska skrivas ut stöds inte Comment[tr]=Bu mime türünde bir dosyanın yazdırılması desteklenmiyor Comment[uk]=Підтримки друку файлів з таким типом MIME не передбачено Comment[x-test]=xxThe mimetype of the file that is to be printed is not supportedxx Comment[zh_CN]=需打印文件的 MIME 类型不被支持 Comment[zh_TW]=要列印的檔案 MIME 型態未被支援 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/bookmarkExists] Name=Bookmark exists Name[bs]=Zabilješka postoji Name[ca]=L'adreça d'interès ja existeix Name[ca@valencia]=L'adreça d'interés ja existeix Name[da]=Bogmærket findes Name[de]=Lesezeichen vorhanden Name[el]=Ο σελιδοδείκτης υπάρχει Name[en_GB]=Bookmark exists Name[es]=Marcador existente +Name[et]=Järjehoidja on olemas Name[fi]=Kirjanmerkki on jo olemassa Name[fr]=Signet existant Name[gl]=O marcador existe Name[hu]=A könyvjelző létezik Name[it]=Segnalibro esistente Name[ko]=책갈피가 있음 Name[nds]=Gifft Leesteken al Name[nl]=Bladwijzer bestaat al Name[pl]=Zakładka istnieje Name[pt]=O favorito existe Name[pt_BR]=Favorito já existe Name[ro]=Semn de carte existent Name[ru]=Закладка существует Name[sk]=Záložka existuje Name[sv]=Bokmärke finns Name[tr]=Yer imi mevcut Name[uk]=Така закладка вже існує Name[x-test]=xxBookmark existsxx Name[zh_CN]=书签存在 Name[zh_TW]=書籤已存在 Comment=The bookmark exists Comment[bs]=Zabilješka postoji Comment[ca]=L'adreça d'interès ja existeix Comment[ca@valencia]=L'adreça d'interés ja existeix Comment[da]=Bogmærket findes Comment[de]=Das Lesezeichen ist bereits vorhanden Comment[el]=Ο σελιδοδείκτης υπάρχει Comment[en_GB]=The bookmark exists Comment[es]=El marcador ya existe +Comment[et]=Järjehoidja on olemas Comment[fi]=Kirjanmerkki on jo olemassa Comment[fr]=Ce signet existe déjà Comment[gl]=O marcador xa existe. Comment[hu]=A könyvjelző létezik Comment[it]=Il segnalibro esiste Comment[ko]=책갈피가 존재합니다 Comment[nds]=Dat gifft dat Leesteken al Comment[nl]=De bladwijzer bestaat al Comment[pl]=Zakładka istnieje Comment[pt]=O favorito existe Comment[pt_BR]=O favorito já existe Comment[ro]=Semnul de carte există Comment[ru]=Такая закладка уже существует Comment[sk]=Záložka existuje Comment[sv]=Bokmärket finns Comment[tr]=Bu yer imi mevcut Comment[uk]=Закладка вже існує Comment[x-test]=xxThe bookmark existsxx Comment[zh_CN]=书签存在 Comment[zh_TW]=書籤已存在 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/bookmarkLabelInUse] Name=Bookmark label in use Name[bs]=Oznaka zabilješke u upotrebi Name[ca]=L'etiqueta per a l'adreça d'interès s'està emprant Name[ca@valencia]=L'etiqueta per a l'adreça d'interés s'està emprant Name[da]=Bogmærke-etiketten er i brug Name[de]=Beschriftung des Lesezeichens wird bereits verwendet Name[el]=Ετικέτα σελιδοδείκτη σε χρήση Name[en_GB]=Bookmark label in use Name[es]=Etiqueta de marcador en uso +Name[et]=Järjehoidja nimi on kasutusel Name[fi]=Kirjanmerkin nimiö on jo käytössä Name[fr]=Étiquette de signet utilisé Name[gl]=A etiqueta de marcador xa existe Name[hu]=A könyvjelzőcímke használatban van Name[it]=L'etichetta del segnalibro è in uso Name[ko]=사용 중인 책갈피 레이블 Name[nds]=Leesteken-Beteker in Bruuk Name[nl]=Bladwijzerlabel is in gebruik Name[pl]=Etykieta zakładki w użyciu Name[pt]=Legenda do favorito existente Name[pt_BR]=Legenda do favorito em uso Name[ro]=Etichetă pentru semn de carte în uz Name[ru]=Название закладки уже используется Name[sk]=Názov záložky sa používa Name[sv]=Bokmärkesbeteckning används Name[tr]=Yer imi etiketi kullanımda Name[uk]=Мітку закладки вже використано Name[x-test]=xxBookmark label in usexx Name[zh_CN]=正在使用的书签标签 Name[zh_TW]=書籤標記已在使用中 Comment=The label for the bookmark already exists Comment[bs]=Oznaka za zabilješku već postoji Comment[ca]=L'etiqueta per a l'adreça d'interès ja existeix Comment[ca@valencia]=L'etiqueta per a l'adreça d'interés ja existeix Comment[da]=Etiketten for bogmærket findes allerede Comment[de]=Es existiert bereits ein Lesezeichen mit diesem Namen Comment[el]=Η ετικέτα για το σελιδοδείκτη ήδη υπάρχει Comment[en_GB]=The label for the bookmark already exists Comment[es]=La etiqueta del marcador ya existe +Comment[et]=Sellise nimega järjehoidja on juba olemas Comment[fi]=Kirjanmerkin nimiö on jo olemassa Comment[fr]=L'étiquette du signet existe déjà Comment[gl]=A etiqueta para o marcador xa existe. Comment[hu]=A könyvjelző címkéje már létezik Comment[it]=L'etichetta del segnalibro esiste già Comment[ko]=책갈피의 레이블이 이미 있습니다 Comment[nds]=Dat gifft den Beteker för't Leesteken al Comment[nl]=Het label voor de bladwijzer bestaat al Comment[pl]=Etykieta dla zakładki już istnieje Comment[pt]=Já existe a legenda para o favorito Comment[pt_BR]=Já existe a legenda para o favorito Comment[ro]=Eticheta pentru semnul de carte există deja Comment[ru]=Выбранное название для закладки уже существует Comment[sk]=Názov pre záložku už existuje Comment[sv]=Beteckningen för bokmärket finns redan Comment[tr]=Bu yer imi için etiket zaten kullanılıyor Comment[uk]=Мітка для закладки вже існує Comment[x-test]=xxThe label for the bookmark already existsxx Comment[zh_CN]=书签的标签已存在 Comment[zh_TW]=書籤的標記已存在 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/sambaConfigFileMissing] Name=Configuration file for Samba missing Name[bs]=Konfiguracijska datoteka za Samba-u nedostaje Name[ca]=Falta el fitxer de configuració per a Samba Name[ca@valencia]=Falta el fitxer de configuració per a Samba Name[da]=Konfigurationsfil til Samba mangler Name[de]=Die Konfigurationsdatei für Samba fehlt Name[el]=Λείπει το αρχείο διαμόρφωσης για τη Samba Name[en_GB]=Configuration file for Samba missing Name[es]=Falta el archivo de configuración de Samba +Name[et]=Samba seadistusfail puudub Name[fi]=Samban asetustiedosto puuttuu Name[fr]=Fichier de configuration Samba manquant Name[gl]=Falta o ficheiro de configuración de Samba Name[hu]=A Samba beállítófájlja hiányzik Name[it]=File di configurazione per Samba mancante Name[ko]=Samba에 대한 환경설정 파일 누락 Name[nds]=Instellendatei för Samba fehlt Name[nl]=Configuratiebestand voor Samba ontbreekt Name[pl]=Brakuje pliku ustawień dla Samby Name[pt]=Falta o ficheiro de configuração do Samba Name[pt_BR]=Falta o arquivo de configuração do Samba Name[sk]=Konfiguračný súbor pre Sambu chyba Name[sv]=Inställningsfil för Samba saknas Name[tr]=Samba için yapılandırma dosyası eksik Name[uk]=Не вистачає файла налаштувань Samba Name[x-test]=xxConfiguration file for Samba missingxx Name[zh_CN]=缺少 Samba 的配置文件 Name[zh_TW]=Samba 設定檔遺失 Comment=The configuration file for the Samba suite is missing Comment[bs]=Konfiguracijska datoteka za Samba paket nedostaje Comment[ca]=Falta el fitxer de configuració per a la suite Samba Comment[ca@valencia]=Falta el fitxer de configuració per a la suite Samba Comment[da]=Konfigurationsfilen for Samba-suiten mangler Comment[de]=Die Konfigurationsdatei der Samba-Suite fehlt Comment[el]=Το αρχείο διαμόρφωσης για τη Samba λείπει Comment[en_GB]=The configuration file for the Samba suite is missing Comment[es]=Falta el archivo de configuración para la suite Samba +Comment[et]=Samba seadistusfail puudub Comment[fi]=Samba-ohjelmiston asetustiedosto puuttuu Comment[fr]=Le fichier de configuration pour la suite Samba est manquant Comment[gl]=Falta o ficheiro de configuración da colección de software Samba. Comment[hu]=A Samba alkalmazáscsomag beállítófájlja hiányzik Comment[it]=Il file di configurazione per la suite Samba è mancante Comment[ko]=Samba 제품군의 환경설정 파일이 누락되었습니다 Comment[nds]=De Instellendatei för de Samba-Programmsammeln fehlt Comment[nl]=Het configuratiebestand voor de Samba-suite ontbreekt Comment[pl]=Brakuje pliku ustawień dla pakietu Samby Comment[pt]=Falta o ficheiro de configuração do pacote Samba Comment[pt_BR]=Falta o arquivo de configuração do pacote Samba Comment[sk]=Konfiguračný súbor pre Sambu chýba Comment[sv]=Inställningsfilen för Samba-sviten saknas Comment[tr]=Samba paketi için yapılandırma dosyası eksik Comment[uk]=Не вистачає файла налаштувань для комплекту програм Samba Comment[x-test]=xxThe configuration file for the Samba suite is missingxx Comment[zh_CN]=缺少 Samba 套件的配置文件 Comment[zh_TW]=Smaba 套件的設定檔遺失 Contexts=Warning Sound=Oxygen-Sys-Warning.ogg Action=Popup|Sound [Event/mountingFailed] Name=Mounting failed Name[bs]=Montiranje neuspješno Name[ca]=Ha fallat el muntatge Name[ca@valencia]=Ha fallat el muntatge Name[cs]=Připojení selhalo Name[da]=Montering mislykkedes Name[de]=Einhängen fehlgeschlagen Name[el]=Αποτυχία προσάρτησης Name[en_GB]=Mounting failed Name[es]=Montaje fallido +Name[et]=Ühendamine nurjus Name[fi]=Liittäminen epäonnistui Name[fr]=Échec du montage Name[gl]=A montaxe fallou Name[hu]=A csatolás nem sikerült Name[it]=Montaggio non riuscito Name[ko]=마운트 실패 Name[nds]=Inhangen fehlslaan Name[nl]=Aankoppelen is mislukt Name[pl]=Nieudane podpinanie Name[pt]=Montagem mal-sucedida Name[pt_BR]=Falha na montagem Name[ro]=Montarea a eșuat Name[ru]=Ошибка подключения Name[sk]=Pripojenie zlyhalo Name[sv]=Montering misslyckades Name[tr]=Bağlama başarısız oldu Name[uk]=Невдала спроба монтування Name[x-test]=xxMounting failedxx Name[zh_CN]=挂载失败 Name[zh_TW]=掛載失敗 Comment=Mounting a share failed Comment[bs]=Montiranje dijela neuspješno Comment[ca]=Ha fallat el muntatge d'una compartició Comment[ca@valencia]=Ha fallat el muntatge d'una compartició Comment[da]=Montering af en ressource mislykkedes Comment[de]=Das Einhängen einer Freigabe ist fehlgeschlagen Comment[el]=Αποτυχία προσάρτησης ενός κοινού πόρου Comment[en_GB]=Mounting a share failed Comment[es]=El montaje de un recurso compartido ha fallado +Comment[et]=Jagatud ressursi ühendamine nurjus Comment[fi]=Jaon liittäminen epäonnistui Comment[fr]=Le montage d'un partage a échoué Comment[gl]=A montaxe dunha compartición fallou. Comment[hu]=Egy megosztás csatolása nem sikerült Comment[it]=Montaggio di una condivisione non riuscito Comment[ko]=공유 마운트 실패 Comment[nds]=Dat Inhangen vun en Freegaav is fehlslaan Comment[nl]=Aankoppelen van een gedeelde map is mislukt Comment[pl]=Nieudane podpinanie udziału Comment[pt]=A montagem de uma partilha foi mal-sucedida Comment[pt_BR]=Falha na montagem de um compartilhamento Comment[ro]=Montarea unei partajări a eșuat Comment[ru]=Не удалось подключить общую папку Comment[sk]=Pripojenie zdieľania zlyhalo Comment[sv]=Montering av en delad katalog misslyckades Comment[tr]=Bir paylaşımın bağlanması başarısız oldu Comment[uk]=Спроба монтування спільного ресурсу зазнала невдачі Comment[x-test]=xxMounting a share failedxx Comment[zh_CN]=挂载共享失败 Comment[zh_TW]=掛載分享資料夾失敗 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/unmountingFailed] Name=Unmounting failed Name[bs]=Demontiranje neuspješno Name[ca]=Ha fallat el desmuntatge Name[ca@valencia]=Ha fallat el desmuntatge Name[cs]=Odpojení neúspěšné Name[da]=Afmontering mislykkedes Name[de]=Aushängen fehlgeschlagen Name[el]=Αποτυχία αποπροσάρτησης Name[en_GB]=Unmounting failed Name[es]=Desmontaje fallido +Name[et]=Lahutamine nurjus Name[fi]=Irrottaminen epäonnistui Name[fr]=Échec de la libération Name[gl]=A desmontaxe fallou Name[hu]=A leválasztás nem sikerült Name[it]=Smontaggio non riuscito Name[ko]=마운트 해제 실패 Name[nds]=Afhangen fehlslaan Name[nl]=Afkoppelen is mislukt. Name[pl]=Nieudane odpinanie Name[pt]=A desmontagem foi mal-sucedida Name[pt_BR]=Falha na desmontagem Name[ro]=Demontarea a eșuat Name[ru]=Ошибка отключения Name[sk]=Odpojenie zlyhalo Name[sv]=Avmontering misslyckades Name[tr]=Ayırma işlemi başarısız oldu Name[uk]=Помилка демонтування Name[x-test]=xxUnmounting failedxx Name[zh_CN]=卸载失败 Name[zh_TW]=卸載失敗 Comment=Unmounting a share failed Comment[bs]=Demontiranje dijela neuspješno Comment[ca]=Ha fallat el desmuntatge d'una compartició Comment[ca@valencia]=Ha fallat el desmuntatge d'una compartició Comment[da]=Afmontering af en ressource mislykkedes Comment[de]=Das Aushängen einer Freigabe ist fehlgeschlagen Comment[el]=Αποτυχία αποπροσάρτησης ενός κοινού πόρου Comment[en_GB]=Unmounting a share failed Comment[es]=El desmontaje de un recurso compartido ha fallado +Comment[et]=Jagatud ressursi lahutamine nurjus Comment[fi]=Jaon irrottaminen epäonnistui Comment[fr]=La libération d'un partage a échoué Comment[gl]=A desmontaxe dunha compartición fallou. Comment[hu]=Egy megosztás leválasztása nem sikerült Comment[it]=Smontaggio di una condivisione non riuscito Comment[ko]=공유 마운트 해제 실패 Comment[nds]=Dat Afhangen vun en Freegaav is fehlslaan Comment[nl]=Afkoppelen van een gedeelde map is mislukt Comment[pl]=Nieudane odpinanie udziału Comment[pt]=A desmontagem de uma partilha foi mal-sucedida Comment[pt_BR]=Falha na desmontagem de um compartilhamento Comment[ro]=Demontarea unei partajări a eșuat Comment[ru]=Не удалось отключить общую папку Comment[sk]=Odpojenie zdieľania zlyhalo Comment[sv]=Avmontering av en delad katalog misslyckades Comment[tr]=Bir paylaşımın ayrılması başarısız oldu Comment[uk]=Помилка демонтування ресурсу Comment[x-test]=xxUnmounting a share failedxx Comment[zh_CN]=卸载共享失败 Comment[zh_TW]=卸載分享資料夾失敗 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/unmountingNotAllowed] Name=Unmounting not allowed Name[bs]=Demontiranje nije dozvoljeno Name[ca]=No s'ha permès el desmuntatge Name[ca@valencia]=No s'ha permés el desmuntatge Name[da]=Afmontering er ikke tilladt Name[de]=Aushängen nicht erlaubt Name[el]=Η αποπροσάρτηση δεν επιτρέπεται Name[en_GB]=Unmounting not allowed Name[es]=Desmontaje no permitido +Name[et]=Lahutamine ei ole lubatud Name[fi]=Irrottamista ei sallita Name[fr]=Libération non autorisée Name[gl]=Non ten permiso para desmontar Name[hu]=A leválasztás nem engedélyezett Name[it]=Smontaggio non permesso Name[ko]=마운트 해제 불가 Name[nds]=Afhangen nich tolaten Name[nl]=Afkoppelen niet toegestaan Name[pl]=Odpinanie niedozwolone Name[pt]=Desmontagem não permitida Name[pt_BR]=Desmontagem não permitida Name[ro]=Demontarea nu este permisă Name[ru]=Отключение не разрешено Name[sk]=Odpojenie nie je povolené Name[sv]=Avmontering tillåts inte Name[tr]=Ayırmaya izin verilmiyor Name[uk]=Демонтування заборонено Name[x-test]=xxUnmounting not allowedxx Name[zh_CN]=不允许卸载 Name[zh_TW]=不允許卸載 Comment=The unmounting of a certain share is not allowed Comment[bs]=Demontiranje određenog dijela nije dozvoljeno Comment[ca]=No s'ha permès el desmuntatge d'una compartició concreta Comment[ca@valencia]=No s'ha permés el desmuntatge d'una compartició concreta Comment[da]=Afmontering af en bestemt ressource er ikke tilladt Comment[de]=Das Aushängen einer bestimmten Freigabe ist nicht erlaubt Comment[el]=Η αποπροσάρτηση ενός ορισμένου κοινού πόρου δεν επιτρέπεται Comment[en_GB]=The unmounting of a certain share is not allowed Comment[es]=El desmontaje de un cierto recurso compartido no está permitido +Comment[et]=Jagatud ressursi lahutamine ei ole lubatud Comment[fi]=Määräjaon irrottamista ei sallita Comment[fr]=La libération d'un certain partage n'est pas autorisée Comment[gl]=Non ten permiso para desmontar unha das comparticións. Comment[hu]=Egy bizonyos megosztás leválasztása nem engedélyezett Comment[it]=Lo smontaggio di certe condivisioni non è permesso Comment[ko]=특정 공유의 마운트 해제는 허용 되지 않습니다 Comment[nds]=Du muttst en wiss Freegaav nich afhangen Comment[nl]=Het afkoppelen van een bepaalde gedeelde map is niet toegestaan Comment[pl]=Odpinanie niektórych udziałów jest niedozwolone Comment[pt]=A desmontagem de uma dada partilha não é permitida Comment[pt_BR]=A desmontagem de uma determinado compartilhamento não é permitida Comment[ro]=Demontarea unei anumite partajări nu este permisă Comment[ru]=Отключение определённой общей папки не разрешено Comment[sk]=Odpojenie určitého zdieľania je je povolené Comment[sv]=Avmontering av en viss delad resurs är inte tillåten Comment[tr]=Belirli bir paylaşımın ayrılmasına izin verilmiyor Comment[uk]=Демонтування певного ресурсу заборонено Comment[x-test]=xxThe unmounting of a certain share is not allowedxx Comment[zh_CN]=不允许卸载某个共享 Comment[zh_TW]=不允許卸載特定分享資料夾 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/synchronizationFailed] Name=Synchronization failed Name[bs]=Sinhronizacija nije uspjela Name[ca]=Ha fallat la sincronització Name[ca@valencia]=Ha fallat la sincronització Name[cs]=Synchronizace selhala Name[da]=Synkronisering mislykkedes Name[de]=Abgleich fehlgeschlagen Name[el]=Αποτυχία συγχρονισμού Name[en_GB]=Synchronisation failed Name[es]=Sincronización fallida +Name[et]=Sünkroonimine nurjus Name[fi]=Synkronointi epäonnistui Name[fr]=Échec de la synchronisation Name[gl]=A sincronización fallou Name[hu]=A szinkronizálás nem sikerült Name[it]=Sincronizzazione non riuscita Name[ko]=동기화 실패 Name[nds]=Synkroniseren fehlslaan Name[nl]=Synchronisatie mislukt Name[pl]=Nieudane synchronizowanie Name[pt]=Sincronização mal-sucedida Name[pt_BR]=Falha na sincronização Name[ru]=Ошибка синхронизации Name[sk]=Synchronizácia zlyhala Name[sv]=Synkronisering misslyckades Name[tr]=Eşleme başarısız oldu Name[uk]=Невдала спроба синхронізації Name[x-test]=xxSynchronization failedxx Name[zh_CN]=同步失败 Name[zh_TW]=同步失敗 Comment=The synchronization of a share and a local copy failed Comment[bs]=Sinhronizacija dijela i lokalne kopije nije uspjela Comment[ca]=Ha fallat la sincronització d'una compartició amb una còpia local Comment[ca@valencia]=Ha fallat la sincronització d'una compartició amb una còpia local Comment[da]=Synkronisering af en ressource og en lokal kopi mislykkedes Comment[de]=Der Abgleich zwischen einer Freigabe und der lokalen Kopie ist fehlgeschlagen Comment[el]=Αποτυχία συγχρονισμού ενός κοινού πόρου με ένα τοπικό αντίγραφο Comment[en_GB]=The synchronisation of a share and a local copy failed Comment[es]=La sincronización de un recurso compartido y una copia local ha fallado +Comment[et]=Jagatud ressursi ja kohaliku koopia sünkroonimine nurjus Comment[fi]=Jaon ja paikallisen kopion synkronointi epäonnistui Comment[fr]=La synchronisation d'un partage et d'une copie locale a échoué Comment[gl]=A sincronización dunha das comparticións cunha copia local fallou. Comment[hu]=Egy megosztás és egy helyi másolat szinkronizálása nem sikerült Comment[it]=La sincronizzazione tra una condivisione ed una copia locale non è riuscita Comment[ko]=공유 및 로컬 복사본의 동기화 실패 Comment[nds]=Dat Synkroniseren vun en Freegaav un en lokaal Kopie is fehlslaan Comment[nl]=De synchronisatie van een gedeelde map met een lokale kopie is mislukt Comment[pl]=Nieudane synchronizowanie udziału i kopii lokalnej Comment[pt]=A sincronização entre uma partilha e uma cópia local foi mal-sucedida Comment[pt_BR]=Falha na sincronização de um compartilhamento com uma cópia local Comment[ru]=Не удалось синхронизовать общую папку и её копию на этом компьютере Comment[sk]=Synchronizácia zdieľania a miestnej kópie zlyhala Comment[sv]=Synkronisering av en delad resurs och en lokal kopia misslyckades Comment[tr]=Bir paylaşım ile yerel kopyanın eşlenmesi başarısız oldu Comment[uk]=Спроба виконання синхронізації між спільним ресурсом і локальною копією зазнала невдачі Comment[x-test]=xxThe synchronization of a share and a local copy failedxx Comment[zh_CN]=共享和本地副本的同步失败 Comment[zh_TW]=將分享資源與本地端複本同步失敗 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/commandNotFound] Name=Command not found Name[bs]=Naredba nije nađena Name[ca]=No s'ha trobat l'ordre Name[ca@valencia]=No s'ha trobat l'ordre Name[da]=Kommando ikke fundet Name[de]=Befehl nicht gefunden Name[el]=Η εντολή δεν βρέθηκε Name[en_GB]=Command not found Name[es]=Orden no encontrada +Name[et]=Käsku ei leitud Name[fi]=Komentoa ei löydy Name[fr]=Commande introuvable Name[gl]=Non se atopou unha orde Name[hu]=A parancs nem található Name[ia]=Commando non trovate Name[it]=Comando non trovato Name[ko]=명령을 찾을 수 없음 Name[nds]=Befehl nich funnen Name[nl]=Commando niet gevonden Name[pl]=Nie znaleziono polecenia Name[pt]=Comando não encontrado Name[pt_BR]=Comando não encontrado Name[ru]=Команда не найдена Name[sk]=Príkaz nenájdený Name[sv]=Kommandot hittades inte Name[tr]=Komut bulunamadı Name[uk]=Команду не знайдено Name[x-test]=xxCommand not foundxx Name[zh_CN]=找不到命令 Name[zh_TW]=找不到指令 Comment=A required command could not be found Comment[bs]=Tražena komanda nije pronađena Comment[ca]=No s'ha pogut trobar l'ordre requerida Comment[ca@valencia]=No s'ha pogut trobar l'ordre requerida Comment[da]=En påkrævet kommando kunne ikke findes Comment[de]=Ein erforderlicher Befehl wurde nicht gefunden Comment[el]=Η απαιτούμενη εντολή δεν βρέθηκε Comment[en_GB]=A required command could not be found Comment[es]=No se ha podido encontrar una orden necesaria +Comment[et]=Nõutavat käsku ei leitud Comment[fi]=Pyydettyä komentoa ei löydy Comment[fr]=Impossible de trouver une commande nécessaire Comment[gl]=Non se atopou unha orde necesaria. Comment[hu]=A szükséges parancs nem található Comment[it]=Un comando richiesto non è stato trovato Comment[ko]=필요한 명령을 찾을 수 없음 Comment[nds]=En Befehl, de noot deit, lett sik nich finnen Comment[nl]=Een vereist commando is niet gevonden Comment[pl]=Nie można znaleźć wymaganego polecenia Comment[pt]=Não foi possível encontrar um comando necessário Comment[pt_BR]=Não foi possível encontrar um comando necessário Comment[ru]=Необходимая команда не была найдена Comment[sk]=Požadovaný príkaz nie je možné nájsť Comment[sv]=Ett nödvändigt kommando kunde inte hittas Comment[tr]=Girilen komut bulunamadı Comment[uk]=Не вдалося знайти потрібної вам команди Comment[x-test]=xxA required command could not be foundxx Comment[zh_CN]=找不到所需的命令 Comment[zh_TW]=找不到需要的指令 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/cannotBookmarkPrinter] Name=Cannot bookmark printer Name[bs]=Ne može zabilježiti printer Name[ca]=No s'ha pogut afegir una adreça d'interès per a la impressora Name[ca@valencia]=No s'ha pogut afegir una adreça d'interés per a la impressora Name[da]=Kan ikke sætte bogmærke ved printer Name[de]=Lesezeichen für Drucker kann nicht angelegt werden Name[el]=Αδυναμία εισαγωγής εκτυπωτή στους σελιδοδείκτες Name[en_GB]=Cannot bookmark printer Name[es]=No se puede añadir una impresora como marcador +Name[et]=Printerit ei saa järjehoidjatesse lisada Name[fi]=Tulostimesta ei voi tehdä kirjanmerkkiä Name[fr]=Impossible d'ajouter l'imprimante aux signets Name[gl]=Non é posíbel marcar unha impresora Name[hu]=Nem lehet könyvjelzőbe tenni a nyomtatót Name[it]=Non riesco ad aggiungere la stampante ai segnalibri Name[ko]=프린터를 책갈피할 수 없음 Name[nds]=Drucker lett sik Leestekens nich tofögen Name[nl]=Kan geen bladwijzer maken van een printer Name[pl]=Nie można utworzyć zakładki dla drukarki Name[pt]=Marcação de impressora como favorita impossível Name[pt_BR]=Não foi possível marcar a impressora como favorita Name[ru]=Невозможно добавить принтер в закладки Name[sk]=Nemôžem pridať tlačiareň medzi záložky Name[sv]=Kan inte lägga till bokmärke för skrivare Name[tr]=Yazıcı yer imlerine eklenemez Name[uk]=Не можна створювати закладки для принтерів Name[x-test]=xxCannot bookmark printerxx Name[zh_CN]=无法为打印机添加书签 Name[zh_TW]=無法將印表機加入書籤 Comment=A printer cannot be bookmarked Comment[bs]=Printer ne može biti zabilježen Comment[ca]=Una impressora no es pot afegir com a adreça d'interès Comment[ca@valencia]=Una impressora no es pot afegir com a adreça d'interés Comment[da]=Der kan ikke sættes bogmærke ved en printer Comment[de]=Ein Lesezeichen für einen Drucker kann nicht angelegt werden Comment[el]=Αδυναμία εισαγωγής εκτυπωτή στους σελιδοδείκτες Comment[en_GB]=A printer cannot be bookmarked Comment[es]=Una impresora no se puede añadir como marcador +Comment[et]=Printerit ei saa järjehoidjatesse lisada Comment[fi]=Tulostimesta ei voi tehdä kirjanmerkkiä Comment[fr]=Une imprimante n'a pas pu être ajoutée aux signets Comment[gl]=Non se pode marcar unha impresora Comment[hu]=Egy nyomtatót nem lehet könyvjelzőbe tenni Comment[it]=Una stampante non può essere aggiunta ai segnalibri Comment[ko]=프린터를 책갈피할 수 없음 Comment[nds]=En Drucker lett sik de Leestekens nich tofögen Comment[nl]=Een printer kan geen bladwijzer hebben Comment[pl]=Nie można utworzyć zakładki dla drukarki Comment[pt]=Não foi possível adicionar uma impressora aos favoritos Comment[pt_BR]=Não foi possível adicionar uma impressora aos favoritos Comment[ru]=Невозможно создать закладку для общего ресурса, потому что он является принтером. Comment[sk]=Tlačiareň nie je možné pridať do záložiek Comment[sv]=Ett bokmärke kan inte läggas till för en skrivare Comment[tr]=Bir yazıcı yer imlerine eklenemez Comment[uk]=Не можна створювати закладку на принтер Comment[x-test]=xxA printer cannot be bookmarkedxx Comment[zh_CN]=打印机无法添加书签 Comment[zh_TW]=無法將印表機加入書籤 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/fileNotFound] Name=File not found Name[bs]=Datoteka nije pronađena. Name[ca]=No s'ha trobat el fitxer Name[ca@valencia]=No s'ha trobat el fitxer Name[cs]=Soubor nenalezen Name[da]=Fil ikke fundet Name[de]=Datei nicht gefunden Name[el]=Το αρχείο δεν βρέθηκε Name[en_GB]=File not found Name[es]=Archivo no encontrado +Name[et]=Faili ei leitud Name[fi]=Tiedostoa ei löydy Name[fr]=Fichier introuvable Name[gl]=Non se atopou un ficheiro Name[hu]=A fájl nem található Name[ia]=File non trovate Name[it]=File non trovato Name[ko]=파일을 찾을 수 없음 Name[nds]=Datei nich funnen Name[nl]=Bestand niet gevonden Name[pl]=Nie znaleziono pliku Name[pt]=Ficheiro não encontrado Name[pt_BR]=Arquivo não encontrado Name[ru]=Файл не найден Name[sk]=Súbor nenájdený Name[sv]=Filen hittades inte Name[tr]=Dosya bulunamadı Name[uk]=Файл не знайдено Name[x-test]=xxFile not foundxx Name[zh_CN]=未找到文件 Name[zh_TW]=找不到檔案 Comment=A file could not be found Comment[bs]=Datoteka niej pronađena Comment[ca]=No s'ha pogut trobar un fitxer Comment[ca@valencia]=No s'ha pogut trobar un fitxer Comment[da]=En fil kunne ikke findes Comment[de]=Eine Datei wurde nicht gefunden Comment[el]=Το αρχείο δεν βρέθηκε Comment[en_GB]=A file could not be found Comment[es]=No se ha podido encontrar un archivo +Comment[et]=Faili ei leitud Comment[fi]=Tiedostoa ei löydy Comment[fr]=Impossible de trouver un fichier Comment[gl]=Non foi posíbel atopar un ficheiro. Comment[hu]=Egy fájl nem található Comment[it]=Un file non è stato trovato Comment[ko]=파일을 찾을 수 없음 Comment[nds]=En Datei lett sik nich finnen Comment[nl]=Een bestand kon niet worden gevonden Comment[pl]=Nie można znaleźć pliku Comment[pt]=Não foi possível encontrar um ficheiro Comment[pt_BR]=Não foi possível encontrar um arquivo Comment[ru]=Не удалось найти файл Comment[sk]=Súbor nie je možné nájsť Comment[sv]=En fil kunde inte hittas Comment[tr]=Bir dosya bulunamadı Comment[uk]=Не вдалося знайти файл Comment[x-test]=xxA file could not be foundxx Comment[zh_CN]=找不到文件 Comment[zh_TW]=找不到檔案 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/openingFileFailed] Name=Opening file failed Name[bs]=Otvaranje datoteke nije uspjelo Name[ca]=Ha fallat en obrir el fitxer Name[ca@valencia]=Ha fallat en obrir el fitxer Name[da]=Åbning af fil mislykkedes Name[de]=Öffnen der Datei fehlgeschlagen Name[el]=Αποτυχία ανοίγματος αρχείου Name[en_GB]=Opening file failed Name[es]=Apertura de archivo fallida +Name[et]=Faili avamine nurjus Name[fi]=Tiedoston avaaminen epäonnistui Name[fr]=Échec de l'ouverture d'un fichier Name[gl]=A apertura do ficheiro fallou Name[hu]=A fájl megnyitása nem sikerült Name[it]=Apertura del file non riuscita Name[ko]=파일 여는 중... Name[nds]=Opmaken vun Datei fehlslaan Name[nl]=Openen van bestand is mislukt Name[pl]=Nieudane otwieranie pliku Name[pt]=Abertura do ficheiro mal sucedida Name[pt_BR]=Ocorreu uma falha ao abrir o arquivo Name[ru]=Ошибка открытия файла Name[sk]=Otvorenie súboru zlyhalo Name[sv]=Misslyckades öppna fil Name[tr]=Dosya açılamadı Name[uk]=Спроба відкриття файла зазнала невдачі Name[x-test]=xxOpening file failedxx Name[zh_CN]=打开文件失败 Name[zh_TW]=開啟檔案失敗 Comment=A file could not be opened Comment[bs]=Datoteka nije mogla biti otvorena Comment[ca]=No s'ha pogut obrir un fitxer Comment[ca@valencia]=No s'ha pogut obrir un fitxer Comment[da]=En fil kunne ikke åbnes Comment[de]=Eine Datei kann nicht geöffnet werden Comment[el]=Αποτυχία ανοίγματος αρχείου Comment[en_GB]=A file could not be opened Comment[es]=No se ha podido abrir un archivo +Comment[et]=Faili ei õnnestunud avada Comment[fi]=Tiedostoa ei voi avata Comment[fr]=Impossible d'ouvrir un fichier Comment[gl]=Non foi posíbel abrir un ficheiro. Comment[hu]=Egy fájlt nem lehetett megnyitni Comment[it]=Un file non può essere aperto Comment[ko]=파일을 열 수 없음 Comment[nds]=En Datei lett sik nich opmaken Comment[nl]=Een bestand kon niet worden geopend Comment[pl]=Nie można otworzyć pliku Comment[pt]=Não foi possível aceder a um dado ficheiro Comment[pt_BR]=O arquivo não pode ser aberto Comment[ru]=Не удалось открыть файл Comment[sk]=Súbor nie je možné otvoriť Comment[sv]=En fil kunde inte öppnas Comment[tr]=Bir dosya açılamadı Comment[uk]=Не вдалося відкрити файл Comment[x-test]=xxA file could not be openedxx Comment[zh_CN]=无法打开文件 Comment[zh_TW]=無法開啟檔案 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/readingFileFailed] Name=Reading file failed Name[bs]=Čitanje datoteke nije uspjelo Name[ca]=Ha fallat en llegir el fitxer Name[ca@valencia]=Ha fallat en llegir el fitxer Name[da]=Læsning af fil mislykkedes Name[de]=Lesen der Datei fehlgeschlagen Name[el]=Αποτυχία ανάγνωσης αρχείου Name[en_GB]=Reading file failed Name[es]=Lectura de archivo fallida +Name[et]=Faili lugemine nurjus Name[fi]=Tiedoston lukeminen epäonnistui Name[fr]=Échec de la lecture d'un fichier Name[gl]=A lectura do ficheiro fallou Name[hu]=A fájl olvasása nem sikerült Name[it]=Lettura del file non riuscita Name[ko]=파일 읽기 실패 Name[nds]=Lesen vun Datei fehlslaan Name[nl]=Lezen van bestand is mislukt Name[pl]=Nieudane czytanie z pliku Name[pt]=Leitura do ficheiro mal-sucedida Name[pt_BR]=Falha na leitura do arquivo Name[ru]=Ошибка чтения из файла Name[sk]=Čítanie súboru zlyhalo Name[sv]=Misslyckades läsa fil Name[tr]=Dosya okunamadı Name[uk]=Помилка читання файла Name[x-test]=xxReading file failedxx Name[zh_CN]=读取文件失败 Name[zh_TW]=讀取檔案失敗 Comment=A file could not be read Comment[bs]=Datoteka nije mogla biti pročitana Comment[ca]=No s'ha pogut llegir un fitxer Comment[ca@valencia]=No s'ha pogut llegir un fitxer Comment[da]=En fil kunne ikke læses Comment[de]=Eine Datei kann nicht gelesen werden Comment[el]=Αποτυχία ανάγνωσης αρχείου Comment[en_GB]=A file could not be read Comment[es]=No se ha podido leer un archivo +Comment[et]=Faili ei õnnestunud lugeda Comment[fi]=Tiedostoa ei voi lukea Comment[fr]=Impossible de lire un fichier Comment[gl]=Non foi posíbel ler un ficheiro. Comment[hu]=Egy fájlt nem lehetett olvasni Comment[it]=Un file non può essere letto Comment[ko]=파일을 읽을 수 없음 Comment[nds]=En Datei lett sik nich lesen Comment[nl]=Een bestand kon niet worden gelezen Comment[pl]=Nie można odczytać pliku Comment[pt]=Não foi possível ler um dado ficheiro Comment[pt_BR]=Não foi possível ler um arquivo Comment[ru]=Не удалось прочитать из файла Comment[sk]=Súbor nie je možné čítať Comment[sv]=En fil kunde inte läsas Comment[tr]=Bir dosya okunamadı Comment[uk]=Не вдалося прочитати файл Comment[x-test]=xxA file could not be readxx Comment[zh_CN]=无法读取文件 Comment[zh_TW]=無法讀取檔案 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/mkdirFailed] Name=mkdir failed Name[bs]=mkdir nije uspio Name[ca]=Ha fallat el «mkdir» Name[ca@valencia]=Ha fallat el «mkdir» Name[da]=mkdir mislykkedes Name[de]=Befehl mkdir fehlgeschlagen Name[el]=Αποτυχία mkdir Name[en_GB]=mkdir failed Name[es]=mkdir falló +Name[et]=Kataloogi loomine nurjus Name[fi]=mkdir epäonnistui Name[fr]=Échec de la commande mkdir Name[gl]=A execución de mkdir fallou Name[hu]=mkdir sikertelen Name[it]=mkdir non riuscito Name[ko]=디렉토리 만들기 실패 Name[nds]=„mkdir“ fehlslaan Name[nl]=Commando mkdir is mislukt Name[pl]=Niepowodzenie mkdir Name[pt]=Erro na criação da pasta Name[pt_BR]=Erro na criação da pasta Name[ru]=Ошибка создания каталога Name[sk]=mkdir zlyhalo Name[sv]=Kommandot mkdir misslyckades Name[tr]=mkdir başarısız oldu Name[uk]=Помилка mkdir Name[x-test]=xxmkdir failedxx Name[zh_CN]=mkdir 失败 Name[zh_TW]=建立目錄失敗 Comment=A directory could not be created Comment[bs]=Direktorij nije mogao biti kreiran Comment[ca]=No s'ha pogut crear un directori Comment[ca@valencia]=No s'ha pogut crear un directori Comment[da]=En mappe kunne ikke oprettes Comment[de]=Ein Ordner kann nicht erstellt werden Comment[el]=Αποτυχία δημιουργίας καταλόγου Comment[en_GB]=A directory could not be created Comment[es]=No se ha podido crear un directorio +Comment[et]=Kataloogi ei õnnestunud luua Comment[fi]=Kansiota ei voi luoda Comment[fr]=Impossible de créer un dossier Comment[gl]=Non foi posíbel crear un directorio. Comment[hu]=Egy könyvtárat nem lehetett létrehozni Comment[it]=Una cartella non può essere creata Comment[ko]=디렉터리를 만들 수 없음 Comment[nds]=En Orner lett sik nich opstellen Comment[nl]=Een map kon niet worden aangemaakt Comment[pl]=Nie można utworzyć katalogu Comment[pt]=Não foi possível criar uma pasta Comment[pt_BR]=Não foi possível criar uma pasta Comment[ru]=Не удалось создать каталог Comment[sk]=Adresár nie je možné vytvoriť Comment[sv]=En katalog kunde inte skapas Comment[tr]=Bir dizin oluşturulamadı Comment[uk]=Не вдалося створити каталог Comment[x-test]=xxA directory could not be createdxx Comment[zh_CN]=无法创建目录 Comment[zh_TW]=無法建立目錄 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/processError] Name=Process error Name[bs]=Greška u procesu Name[ca]=Error de procés Name[ca@valencia]=Error de procés Name[cs]=Chyba procesu Name[da]=Procesfejl Name[de]=Prozess-Fehler Name[el]=Σφάλμα διεργασίας Name[en_GB]=Process error Name[es]=Error de proceso +Name[et]=Protsessi tõrge Name[fi]=Käsittelyvirhe Name[fr]=Erreur du processus Name[gl]=Erro no proceso Name[hu]=Folyamathiba Name[ia]=Error de processo Name[it]=Errore del processo Name[ko]=프로세스 오류 Name[nds]=Perzessfehler Name[nl]=Procesfout Name[pl]=Błąd procesu Name[pt]=Erro no processo Name[pt_BR]=Erro no processo Name[ru]=Ошибка процесса Name[sk]=Chyba procesu Name[sv]=Processfel Name[tr]=Süreç hatası Name[uk]=Помилка процесу Name[x-test]=xxProcess errorxx Name[zh_CN]=处理错误 Name[zh_TW]=行程錯誤 Comment=A process error occurred Comment[bs]=Greška u procesu se pojavila Comment[ca]=Hi ha hagut un error de procés Comment[ca@valencia]=Hi ha hagut un error de procés Comment[da]=Der opstod en procesfejl Comment[de]=Es ist ein Prozess-Fehler aufgetreten Comment[el]=Εμφανίστηκε σφάλμα σε μια διεργασία Comment[en_GB]=A process error occurred Comment[es]=Ha ocurrido un error en un proceso +Comment[et]=Protsessis tekkis tõrge Comment[fi]=Sattui käsittelyvirhe Comment[fr]=Une erreur du processus est survenue Comment[gl]=Produciuse un erro no proceso. Comment[hu]=Egy folyamathiba történt Comment[it]=Si è verificato un errore nel processo Comment[ko]=프로세스 오류가 발생 했습니다 Comment[nds]=Dat geev en Perzessfehler Comment[nl]=Er deed zich een procesfout voor Comment[pl]=Wystąpił błąd procesu Comment[pt]=Ocorreu um erro no processo Comment[pt_BR]=Ocorreu um erro no processo Comment[ru]=В работе программного процесса произошла ошибка Comment[sk]=Nastala chyba procesu Comment[sv]=Ett processfel uppstod Comment[tr]=Bir süreç hatası oluştu Comment[uk]=Помилка під час роботи процесу Comment[x-test]=xxA process error occurredxx Comment[zh_CN]=发生进程错误 Comment[zh_TW]=行程發生錯誤 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/actionFailed] Name=Action failed Name[bs]=Radnja nije uspjela Name[ca]=L'acció ha fallat Name[ca@valencia]=L'acció ha fallat Name[da]=Handling mislykkedes Name[de]=Aktion fehlgeschlagen Name[el]=Αποτυχία ενέργειας Name[en_GB]=Action failed Name[es]=Acción fallida +Name[et]=Toiming nurjus Name[fi]=Toiminto epäonnistui Name[fr]=Échec de l'action Name[gl]=Unha acción fallou Name[hu]=A művelet nem sikerült Name[ia]=Action falleva Name[it]=Azione non riuscita Name[ko]=작업 실패 Name[nds]=Akschoon fehlslaan Name[nl]=Actie is mislukt Name[pl]=Nieudane działanie Name[pt]=Acção mal-sucedida Name[pt_BR]=Ação com falhas Name[ru]=Ошибка выполнения действия Name[sk]=Akcia zlyhala Name[sv]=Åtgärd misslyckades Name[tr]=Başarısız işlem Name[uk]=Спроба виконання дії зазнала невдачі Name[x-test]=xxAction failedxx Name[zh_CN]=操作失败 Name[zh_TW]=動作失敗 Comment=A KAuth action failed Comment[bs]=KAuth radnja nije uspjela Comment[ca]=Una acció del KAuth ha fallat Comment[ca@valencia]=Una acció del KAuth ha fallat Comment[da]=En KAuth-handling mislykkedes Comment[de]=Eine KAuth-Aktion ist fehlgeschlagen Comment[el]=Αποτυχία ενέργειας KAuth Comment[en_GB]=A KAuth action failed Comment[es]=Una acción de KAuth ha fallado +Comment[et]=KAuth'i toiming nurjus Comment[fi]=KAuth-toiminto epäonnistui Comment[fr]=Une action KAuth a échoué Comment[gl]=Unha acción de KAuth fallou. Comment[hu]=Egy KAuth művelet nem sikerült Comment[it]=Azione KAuth non riuscita Comment[ko]=KAuth 작업 실패 Comment[nds]=En KAuth-Akschonen is fehlslaan Comment[nl]=Een KAuth-actie is mislukt Comment[pl]=Niepowodzenie działania KAuth Comment[pt]=Uma acção do KAuth foi mal-sucedida Comment[pt_BR]=Ocorreu uma falha na ação do KAuth Comment[ru]=Не удалось выполнить действие с помощью KAuth Comment[sk]=Akcia KAuth zlyhala Comment[sv]=En KAuth behörighetskontrollåtgärd misslyckades Comment[tr]=Bir KAuth işlemi başarısız oldu Comment[uk]=Спроба виконання дії KAuth зазнала невдачі Comment[x-test]=xxA KAuth action failedxx Comment[zh_CN]=KAuth 操作失败 Comment[zh_TW]=KAuth 動作失敗 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/invalidURL] Name=Invalid URL Name[bs]=Pogrešan URL Name[ca]=URL no vàlid Name[ca@valencia]=URL no vàlid Name[cs]=Neplatné URL Name[da]=Ugyldig URL Name[de]=Ungültige Adresse (URL) Name[el]=Μη έγκυρο URL Name[en_GB]=Invalid URL Name[es]=URL no válido +Name[et]=Vigane URL Name[fi]=Virheellinen verkko-osoite Name[fr]=URL mal formée Name[gl]=O URL é incorrecto Name[hu]=Érvénytelen URL Name[ia]=URL invalide Name[it]=URL non valido Name[ko]=잘못된 URL Name[nds]=Leeg URL Name[nl]=Ongeldig URL-adres Name[pl]=Nieprawidłowy adres URL Name[pt]=URL inválido Name[pt_BR]=URL inválida Name[ru]=Недопустимый адрес URL Name[sk]=Neplatné URL Name[sv]=Ogiltig webbadress Name[tr]=Geçersiz Adres Name[uk]=Некоректна адреса Name[x-test]=xxInvalid URLxx Name[zh_CN]=无效的 URL Name[zh_TW]=不合法的網址 Comment=An invalid URL was passed Comment[bs]=Pogrešan URL je premošten Comment[ca]=S'han passat un URL no vàlid Comment[ca@valencia]=S'han passat un URL no vàlid Comment[da]=En ugyldig URL blev modtaget Comment[de]=Es wurde eine ungültige Adresse (URL) übergeben Comment[el]=Πέρασε μη έγκυρο URL Comment[en_GB]=An invalid URL was passed Comment[es]=Se ha pasado un URL no válido +Comment[et]=Edastati vigane URL Comment[fi]=Annettiin virheellinen verkko-osoite Comment[fr]=Une URL mal formée a été transmise Comment[gl]=Forneceuse un URL incorrecto. Comment[hu]=Egy érvénytelen URL lett átadva Comment[it]=URL inserito non valido Comment[ko]=잘못된 URL이 전달됨 Comment[nds]=En leeg URL wöör övergeven Comment[nl]=Een ongeldige URL is doorgegeven Comment[pl]=Podano nieprawidłowy adres URL Comment[pt]=Foi passado um URL inválido Comment[pt_BR]=Foi passada uma URL inválida Comment[ru]=Передан недопустимый адрес URL Comment[sk]=Bolo zadané neplatné URL Comment[sv]=En ogiltig webbadress skickades Comment[tr]=Geçersiz bir adres geçildi Comment[uk]=Було передано некоректну адресу Comment[x-test]=xxAn invalid URL was passedxx Comment[zh_CN]=传递的 URL 无效 Comment[zh_TW]=傳遞了不合法的網址 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound [Event/networkCommunicationFailed] Name=Network communication failed Name[ca]=La xarxa de comunicació ha fallat Name[ca@valencia]=La xarxa de comunicació ha fallat Name[cs]=Síťová komunikace selhala Name[de]=Netzwerkkommunikation fehlgeschlagen Name[en_GB]=Network communication failed Name[es]=Ha fallado la comunicación de red +Name[et]=Võrguühendus nurjus Name[fi]=Verkkoviestintä epäonnistui Name[fr]=Échec de la communication réseau Name[gl]=A comunicación de rede fallou Name[it]=Comunicazione di rete non riuscita Name[ko]=네트워크 통신 실패 Name[nl]=Netwerkcommunicatie is mislukt Name[pl]=Nie udało się nawiązać połączenia sieciowego Name[pt]=Comunicação de rede mal-sucedida Name[pt_BR]=Falha na comunicação de rede Name[sk]=Sieťová komunikácia zlyhala Name[sv]=Nätverkskommunikation misslyckades Name[uk]=Невдала спроба обміну даними мережею Name[x-test]=xxNetwork communication failedxx Name[zh_TW]=網路通訊失敗 Comment=A network related action could not be performed or failed Comment[ca]=No s'ha pogut portar a terme una acció relativa a la xarxa o ha fallat Comment[ca@valencia]=No s'ha pogut portar a terme una acció relativa a la xarxa o ha fallat Comment[cs]=Požadovanou síťovou operaci nelze provést nebo selhala Comment[de]=Eine netzwerkbezogene Aktion kann nicht durchgeführt werden oder schlug fehl Comment[en_GB]=A network related action could not be performed or failed Comment[es]=Una acción relacionada con la red no se ha podido ejecutar o ha fallado +Comment[et]=Võrgutoimingut ei saanud sooritada või see nurjus Comment[fi]=Verkkotoimintoa ei voitu suorittaa tai se epäonnistui Comment[fr]=Impossible d'effectuer une action réseau Comment[gl]=Unha acción relacionada coa rede non puido realizarse ou fallou Comment[it]=Un'azione correlata alla rete non può essere eseguita o non ha avuto successo Comment[ko]=네트워크 관련 작업을 수행할 수 없거나 실패했습니다 Comment[nl]=Een aan het netwerk gerelateerde actie kon niet worden uitgevoerd of is mislukt Comment[pl]=Nie można było wykonać działania związanego z siecią lub nie udało się ono Comment[pt]=Não foi possível efectuar uma acção relacionada com a rede Comment[pt_BR]=Uma ação relacionada à rede não pode ser executada ou falhou Comment[sk]=Sieťovú operáciu nie je možné vykonať alebo zlyhala Comment[sv]=En nätverksrelaterad åtgärd kunde inte utföras eller misslyckades Comment[uk]=Не вдалося виконати пов'язану із мережею дію або спроба виконання дії зазнала невдачі Comment[x-test]=xxA network related action could not be performed or failedxx Comment[zh_TW]=網路相關動作無法執行或是執行失敗。 Contexts=Error Sound=Oxygen-Sys-App-Error.ogg Action=Popup|Sound diff --git a/core/smb4kbookmarkhandler_p.cpp b/core/smb4kbookmarkhandler_p.cpp index 8ff1936..c54aae2 100644 --- a/core/smb4kbookmarkhandler_p.cpp +++ b/core/smb4kbookmarkhandler_p.cpp @@ -1,1011 +1,1011 @@ /*************************************************************************** Private classes for the bookmark handler ------------------- begin : Sun Mar 20 2011 copyright : (C) 2011-2018 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, 51 Franklin Street, Suite 500, Boston, * * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kbookmarkhandler_p.h" #include "smb4ksettings.h" #include "smb4kbookmark.h" // Qt includes #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // KDE includes #define TRANSLATION_DOMAIN "smb4k-core" #include #include #include Smb4KBookmarkDialog::Smb4KBookmarkDialog(const QList &bookmarks, const QStringList &groups, QWidget *parent) : QDialog(parent) { // // Set the window title // setWindowTitle(i18n("Add Bookmarks")); // // Setup the view // setupView(); // // Load the list of bookmarks and groups // loadLists(bookmarks, groups); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "BookmarkDialog"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 // // Fill the completion objects // m_label_edit->completionObject()->setItems(group.readEntry("LabelCompletion", QStringList())); m_group_combo->completionObject()->setItems(group.readEntry("GroupCompletion", m_groups)); // // Connections // connect(KIconLoader::global(), SIGNAL(iconChanged(int)), SLOT(slotIconSizeChanged(int))); } Smb4KBookmarkDialog::~Smb4KBookmarkDialog() { while (!m_bookmarks.isEmpty()) { m_bookmarks.takeFirst().clear(); } } const QList &Smb4KBookmarkDialog::bookmarks() { return m_bookmarks; } void Smb4KBookmarkDialog::setupView() { QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); QWidget *description = new QWidget(this); QHBoxLayout *desc_layout = new QHBoxLayout(description); desc_layout->setSpacing(5); - desc_layout->setMargin(0); + desc_layout->setContentsMargins(0, 0, 0, 0); QLabel *pixmap = new QLabel(description); QPixmap sync_pix = KDE::icon("bookmark-new").pixmap(KIconLoader::SizeHuge); pixmap->setPixmap(sync_pix); pixmap->setAlignment(Qt::AlignBottom); QLabel *label = new QLabel(i18n("All listed shares will be bookmarked. To edit the label " "or group, click the respective bookmark entry."), description); label->setWordWrap(true); label->setAlignment(Qt::AlignBottom); desc_layout->addWidget(pixmap, 0); desc_layout->addWidget(label, Qt::AlignBottom); m_widget = new QListWidget(this); m_widget->setSortingEnabled(true); m_widget->setSelectionMode(QAbstractItemView::SingleSelection); int icon_size = KIconLoader::global()->currentSize(KIconLoader::Small); m_widget->setIconSize(QSize(icon_size, icon_size)); m_editors = new QWidget(this); m_editors->setEnabled(false); QGridLayout *editors_layout = new QGridLayout(m_editors); editors_layout->setSpacing(5); - editors_layout->setMargin(0); + editors_layout->setContentsMargins(0, 0, 0, 0); QLabel *l_label = new QLabel(i18n("Label:"), m_editors); m_label_edit = new KLineEdit(m_editors); m_label_edit->setClearButtonEnabled(true); QLabel *g_label = new QLabel(i18n("Group:"), m_editors); m_group_combo = new KComboBox(true, m_editors); editors_layout->addWidget(l_label, 0, 0, 0); editors_layout->addWidget(m_label_edit, 0, 1, 0); editors_layout->addWidget(g_label, 1, 0, 0); editors_layout->addWidget(m_group_combo, 1, 1, 0); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_ok_button = buttonBox->addButton(QDialogButtonBox::Ok); m_cancel_button = buttonBox->addButton(QDialogButtonBox::Cancel); m_ok_button->setShortcut(Qt::CTRL|Qt::Key_Return); m_cancel_button->setShortcut(Qt::Key_Escape); m_ok_button->setDefault(true); layout->addWidget(description, 0); layout->addWidget(m_widget, 0); layout->addWidget(m_editors, 0); layout->addWidget(buttonBox, 0); // // Connections // connect(m_widget, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(slotBookmarkClicked(QListWidgetItem*))); connect(m_label_edit, SIGNAL(editingFinished()), this, SLOT(slotLabelEdited())); connect(m_group_combo->lineEdit(), SIGNAL(editingFinished()), this, SLOT(slotGroupEdited())); connect(m_ok_button, SIGNAL(clicked()), this, SLOT(slotDialogAccepted())); connect(m_cancel_button, SIGNAL(clicked()), this, SLOT(reject())); } void Smb4KBookmarkDialog::loadLists(const QList &bookmarks, const QStringList &groups) { // Copy the bookmarks to the internal list and add them to // the list widget afterwards. for (const BookmarkPtr &b : bookmarks) { QListWidgetItem *item = new QListWidgetItem(b->icon(), b->displayString(), m_widget); item->setData(Qt::UserRole, static_cast(b->url())); m_bookmarks << b; } m_groups = groups; m_group_combo->addItems(m_groups); } BookmarkPtr Smb4KBookmarkDialog::findBookmark(const QUrl &url) { BookmarkPtr bookmark; for (const BookmarkPtr &b : m_bookmarks) { if (b->url() == url) { bookmark = b; break; } else { continue; } } return bookmark; } void Smb4KBookmarkDialog::slotBookmarkClicked(QListWidgetItem *bookmark_item) { if (bookmark_item) { // Enable the editor widgets if necessary if (!m_editors->isEnabled()) { m_editors->setEnabled(true); } QUrl url = bookmark_item->data(Qt::UserRole).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { m_label_edit->setText(bookmark->label()); m_group_combo->setCurrentItem(bookmark->groupName()); } else { m_label_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } else { m_label_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } void Smb4KBookmarkDialog::slotLabelEdited() { // Set the label QUrl url = m_widget->currentItem()->data(Qt::UserRole).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setLabel(m_label_edit->userText()); } // Add label to completion object KCompletion *completion = m_label_edit->completionObject(); if (!m_label_edit->userText().isEmpty()) { completion->addItem(m_label_edit->userText()); } } void Smb4KBookmarkDialog::slotGroupEdited() { // Set the group QUrl url = m_widget->currentItem()->data(Qt::UserRole).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setGroupName(m_group_combo->currentText()); } // Add the group name to the combo box if (m_group_combo->findText(m_group_combo->currentText()) == -1) { m_group_combo->addItem(m_group_combo->currentText()); } // Add group to completion object KCompletion *completion = m_group_combo->completionObject(); if (!m_group_combo->currentText().isEmpty()) { completion->addItem(m_group_combo->currentText()); } } void Smb4KBookmarkDialog::slotDialogAccepted() { KConfigGroup group(Smb4KSettings::self()->config(), "BookmarkDialog"); KWindowConfig::saveWindowSize(windowHandle(), group); group.writeEntry("LabelCompletion", m_label_edit->completionObject()->items()); group.writeEntry("GroupCompletion", m_group_combo->completionObject()->items()); accept(); } void Smb4KBookmarkDialog::slotIconSizeChanged(int group) { switch (group) { case KIconLoader::Small: { int icon_size = KIconLoader::global()->currentSize(KIconLoader::Small); m_widget->setIconSize(QSize(icon_size, icon_size)); break; } default: { break; } } } Smb4KBookmarkEditor::Smb4KBookmarkEditor(const QList &bookmarks, QWidget *parent) : QDialog(parent), m_bookmarks(bookmarks) { // // Set the window title // setWindowTitle(i18n("Edit Bookmarks")); // // Setup the view // setupView(); // // Load the bookmarks into the editor // loadBookmarks(); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "BookmarkEditor"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 // // Fill the completion objects // m_label_edit->completionObject()->setItems(group.readEntry("LabelCompletion", QStringList())); m_login_edit->completionObject()->setItems(group.readEntry("LoginCompletion", QStringList())); m_ip_edit->completionObject()->setItems(group.readEntry("IPCompletion", QStringList())); m_group_combo->completionObject()->setItems(group.readEntry("GroupCompletion", m_groups)); // // Connections // connect(KIconLoader::global(), SIGNAL(iconChanged(int)), SLOT(slotIconSizeChanged(int))); } Smb4KBookmarkEditor::~Smb4KBookmarkEditor() { while (!m_bookmarks.isEmpty()) { m_bookmarks.takeFirst().clear(); } } bool Smb4KBookmarkEditor::eventFilter(QObject *obj, QEvent *e) { if (obj == m_tree_widget->viewport()) { switch (e->type()) { case QEvent::DragEnter: { QDragEnterEvent *ev = static_cast(e); if (ev->source() == m_tree_widget->viewport()) { e->accept(); } else { e->ignore(); } break; } case QEvent::DragLeave: { e->ignore(); break; } case QEvent::Drop: { QTimer::singleShot(50, this, SLOT(slotAdjust())); break; } default: { break; } } } return QDialog::eventFilter(obj, e); } void Smb4KBookmarkEditor::setupView() { QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); m_tree_widget = new QTreeWidget(this); m_tree_widget->setColumnCount(2); m_tree_widget->hideColumn((m_tree_widget->columnCount() - 1)); // for sorting purposes m_tree_widget->headerItem()->setHidden(true); m_tree_widget->setRootIsDecorated(true); m_tree_widget->setSelectionMode(QAbstractItemView::SingleSelection); m_tree_widget->setContextMenuPolicy(Qt::CustomContextMenu); m_tree_widget->header()->setSectionResizeMode(QHeaderView::ResizeToContents); m_tree_widget->setDragDropMode(QTreeWidget::InternalMove); int icon_size = KIconLoader::global()->currentSize(KIconLoader::Small); m_tree_widget->setIconSize(QSize(icon_size, icon_size)); m_tree_widget->viewport()->installEventFilter(this); m_add_group = new QAction(KDE::icon("bookmark-add-folder"), i18n("Add Group"), m_tree_widget); m_delete = new QAction(KDE::icon("edit-delete"), i18n("Remove"), m_tree_widget); m_clear = new QAction(KDE::icon("edit-clear"), i18n("Clear"), m_tree_widget); m_menu = new KActionMenu(m_tree_widget); m_menu->addAction(m_add_group); m_menu->addAction(m_delete); m_menu->addAction(m_clear); m_editors = new QWidget(this); m_editors->setEnabled(false); QGridLayout *editors_layout = new QGridLayout(m_editors); editors_layout->setSpacing(5); - editors_layout->setMargin(0); + editors_layout->setContentsMargins(0, 0, 0, 0); QLabel *l_label = new QLabel(i18n("Label:"), m_editors); m_label_edit = new KLineEdit(m_editors); m_label_edit->setClearButtonEnabled(true); QLabel *lg_label = new QLabel(i18n("Login:"), m_editors); m_login_edit = new KLineEdit(m_editors); m_login_edit->setClearButtonEnabled(true); QLabel *i_label = new QLabel(i18n("IP Address:"), m_editors); m_ip_edit = new KLineEdit(m_editors); m_ip_edit->setClearButtonEnabled(true); QLabel *g_label = new QLabel(i18n("Group:"), m_editors); m_group_combo = new KComboBox(true, m_editors); m_group_combo->setDuplicatesEnabled(false); editors_layout->addWidget(l_label, 0, 0, 0); editors_layout->addWidget(m_label_edit, 0, 1, 0); editors_layout->addWidget(lg_label, 1, 0, 0); editors_layout->addWidget(m_login_edit, 1, 1, 0); editors_layout->addWidget(i_label, 2, 0, 0); editors_layout->addWidget(m_ip_edit, 2, 1, 0); editors_layout->addWidget(g_label, 3, 0, 0); editors_layout->addWidget(m_group_combo, 3, 1, 0); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_ok_button = buttonBox->addButton(QDialogButtonBox::Ok); m_cancel_button = buttonBox->addButton(QDialogButtonBox::Cancel); m_ok_button->setShortcut(Qt::CTRL|Qt::Key_Return); m_cancel_button->setShortcut(Qt::Key_Escape); m_ok_button->setDefault(true); layout->addWidget(m_tree_widget); layout->addWidget(m_editors); layout->addWidget(buttonBox); // // Connections // connect(m_tree_widget, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(slotItemClicked(QTreeWidgetItem*,int))); connect(m_tree_widget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenuRequested(QPoint))); connect(m_label_edit, SIGNAL(editingFinished()), this, SLOT(slotLabelEdited())); connect(m_ip_edit, SIGNAL(editingFinished()), this, SLOT(slotIPEdited())); connect(m_login_edit, SIGNAL(editingFinished()), this, SLOT(slotLoginEdited())); connect(m_group_combo->lineEdit(), SIGNAL(editingFinished()), this, SLOT(slotGroupEdited())); connect(m_add_group, SIGNAL(triggered(bool)), this, SLOT(slotAddGroupTriggered(bool))); connect(m_delete, SIGNAL(triggered(bool)), this, SLOT(slotDeleteTriggered(bool))); connect(m_clear, SIGNAL(triggered(bool)), this, SLOT(slotClearTriggered(bool))); connect(m_ok_button, SIGNAL(clicked()), this, SLOT(slotDialogAccepted())); connect(m_cancel_button, SIGNAL(clicked()), this, SLOT(slotDialogRejected())); } void Smb4KBookmarkEditor::loadBookmarks() { // // Clear the tree widget and the group combo box // m_tree_widget->clear(); m_group_combo->clear(); // // Copy the groups into the internal list // m_groups.clear(); for (const BookmarkPtr &bookmark : m_bookmarks) { if (!m_groups.contains(bookmark->groupName())) { m_groups << bookmark->groupName(); } } // // Insert the groups into the tree widget // for (const QString &group : m_groups) { if (!group.isEmpty()) { QTreeWidgetItem *groupItem = new QTreeWidgetItem(QTreeWidgetItem::UserType); groupItem->setIcon(0, KDE::icon("folder-bookmark")); groupItem->setText(0, group); groupItem->setText((m_tree_widget->columnCount() - 1), QString("00_%1").arg(group)); groupItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled|Qt::ItemIsDropEnabled); m_tree_widget->addTopLevelItem(groupItem); } } // // Insert the bookmarks info the tree widget // for (const BookmarkPtr &bookmark : m_bookmarks) { QTreeWidgetItem *bookmarkItem = new QTreeWidgetItem(QTreeWidgetItem::UserType); bookmarkItem->setData(0, QTreeWidgetItem::UserType, static_cast(bookmark->url())); bookmarkItem->setIcon(0, bookmark->icon()); bookmarkItem->setText(0, bookmark->displayString()); bookmarkItem->setText((m_tree_widget->columnCount() - 1), QString("01_%1").arg(bookmark->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort))); bookmarkItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled|Qt::ItemIsDragEnabled); if (!bookmark->groupName().isEmpty()) { QList items = m_tree_widget->findItems(bookmark->groupName(), Qt::MatchFixedString|Qt::MatchCaseSensitive, 0); if (!items.isEmpty()) { items.first()->addChild(bookmarkItem); items.first()->setExpanded(true); } } else { m_tree_widget->addTopLevelItem(bookmarkItem); } } // // Sort // for (int i = 0; i < m_tree_widget->topLevelItemCount(); ++i) { m_tree_widget->topLevelItem(i)->sortChildren((m_tree_widget->columnCount() - 1), Qt::AscendingOrder); } m_tree_widget->sortItems((m_tree_widget->columnCount() - 1), Qt::AscendingOrder); // // Check that an empty group entry is also present. If it is not there, // add it now and insert the groups to the group combo box afterwards. // if (!m_groups.contains("") && !m_groups.contains(QString())) { m_groups << ""; } m_group_combo->addItems(m_groups); m_group_combo->setCurrentItem(""); } QList Smb4KBookmarkEditor::editedBookmarks() { return m_bookmarks; } BookmarkPtr Smb4KBookmarkEditor::findBookmark(const QUrl &url) { BookmarkPtr bookmark; for (const BookmarkPtr &b : m_bookmarks) { if (b->url() == url) { bookmark = b; break; } else { continue; } } return bookmark; } void Smb4KBookmarkEditor::slotItemClicked(QTreeWidgetItem *item, int /*col*/) { if (item) { if (m_tree_widget->indexOfTopLevelItem(item) != -1) { // This is a top-level item, i.e. it is either a bookmark without // group or a group entry. // Bookmarks have an URL stored, group folders not. if (!item->data(0, QTreeWidgetItem::UserType).toUrl().isEmpty()) { BookmarkPtr bookmark = findBookmark(item->data(0, QTreeWidgetItem::UserType).toUrl()); if (bookmark) { m_label_edit->setText(bookmark->label()); m_login_edit->setText(bookmark->login()); m_ip_edit->setText(bookmark->hostIpAddress()); m_group_combo->setCurrentItem(bookmark->groupName()); m_editors->setEnabled(true); } else { m_label_edit->clear(); m_login_edit->clear(); m_ip_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } else { m_label_edit->clear(); m_login_edit->clear(); m_ip_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } else { // This can only be a bookmark. BookmarkPtr bookmark = findBookmark(item->data(0, QTreeWidgetItem::UserType).toUrl()); if (bookmark) { m_label_edit->setText(bookmark->label()); m_login_edit->setText(bookmark->login()); m_ip_edit->setText(bookmark->hostIpAddress()); m_group_combo->setCurrentItem(bookmark->groupName()); m_editors->setEnabled(true); } else { m_label_edit->clear(); m_login_edit->clear(); m_ip_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } } else { m_label_edit->clear(); m_login_edit->clear(); m_ip_edit->clear(); m_group_combo->clearEditText(); m_editors->setEnabled(false); } } void Smb4KBookmarkEditor::slotContextMenuRequested(const QPoint &pos) { QTreeWidgetItem *item = m_tree_widget->itemAt(pos); m_delete->setEnabled((item)); m_menu->menu()->popup(m_tree_widget->viewport()->mapToGlobal(pos)); } void Smb4KBookmarkEditor::slotLabelEdited() { // Set the label QUrl url = m_tree_widget->currentItem()->data(0, QTreeWidgetItem::UserType).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setLabel(m_label_edit->userText()); } // Add label to completion object KCompletion *completion = m_label_edit->completionObject(); if (!m_label_edit->userText().isEmpty()) { completion->addItem(m_label_edit->userText()); } } void Smb4KBookmarkEditor::slotLoginEdited() { // Set the login QUrl url = m_tree_widget->currentItem()->data(0, QTreeWidgetItem::UserType).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setLogin(m_login_edit->userText()); } // Add login to completion object KCompletion *completion = m_login_edit->completionObject(); if (!m_login_edit->userText().isEmpty()) { completion->addItem(m_login_edit->userText()); } } void Smb4KBookmarkEditor::slotIPEdited() { // Set the ip address QUrl url = m_tree_widget->currentItem()->data(0, QTreeWidgetItem::UserType).toUrl(); BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setHostIpAddress(m_ip_edit->userText()); } // Add login to completion object KCompletion *completion = m_ip_edit->completionObject(); if (!m_ip_edit->userText().isEmpty()) { completion->addItem(m_ip_edit->userText()); } } void Smb4KBookmarkEditor::slotGroupEdited() { // // Get the URL of the current item. // QUrl url = m_tree_widget->currentItem()->data(0, QTreeWidgetItem::UserType).toUrl(); // // Return here, if the current item is a group // if (url.isEmpty()) { return; } // // Set the group name to the bookmark // BookmarkPtr bookmark = findBookmark(url); if (bookmark) { bookmark->setGroupName(m_group_combo->currentText()); } // // Reload the bookmarks (The current item is cleared by this!) // loadBookmarks(); // // Reset the current item // QTreeWidgetItemIterator it(m_tree_widget); while (*it) { if ((*it)->data(0, QTreeWidgetItem::UserType).toUrl() == url) { m_tree_widget->setCurrentItem(*it); slotItemClicked(*it, 0); break; } ++it; } // // Add the group to the completion object // KCompletion *completion = m_group_combo->completionObject(); if (!m_group_combo->currentText().isEmpty()) { completion->addItem(m_group_combo->currentText()); } } void Smb4KBookmarkEditor::slotAddGroupTriggered(bool /*checked*/) { bool ok = false; QString group_name = QInputDialog::getText(this, i18n("Add Group"), i18n("Group name:"), QLineEdit::Normal, QString(), &ok); if (ok && !group_name.isEmpty() && m_tree_widget->findItems(group_name, Qt::MatchFixedString|Qt::MatchCaseSensitive, 0).isEmpty()) { // Create a new group item and add it to the widget QTreeWidgetItem *group = new QTreeWidgetItem(QTreeWidgetItem::UserType); group->setIcon(0, KDE::icon("folder-bookmark")); group->setText(0, group_name); group->setText((m_tree_widget->columnCount() - 1), QString("00_%1").arg(group_name)); group->setFlags(Qt::ItemIsSelectable|Qt::ItemIsUserCheckable|Qt::ItemIsEnabled|Qt::ItemIsDropEnabled) ; m_tree_widget->addTopLevelItem(group); m_tree_widget->sortItems((m_tree_widget->columnCount() - 1), Qt::AscendingOrder); // Add the group to the combo box m_group_combo->addItem(group_name); m_group_combo->completionObject()->addItem(group_name); } } void Smb4KBookmarkEditor::slotDeleteTriggered(bool /*checked*/) { // // Remove the bookmarks from the view and the internal list // QList selected = m_tree_widget->selectedItems(); while (!selected.isEmpty()) { QTreeWidgetItem *item = selected.takeFirst(); QUrl url = item->data(0, QTreeWidgetItem::UserType).toUrl(); QMutableListIterator it(m_bookmarks); while (it.hasNext()) { BookmarkPtr bookmark = it.next(); if (bookmark->url() == url) { it.remove(); break; } } delete item; } } void Smb4KBookmarkEditor::slotClearTriggered(bool /*checked*/) { m_tree_widget->clear(); m_bookmarks.clear(); m_groups.clear(); } void Smb4KBookmarkEditor::slotDialogAccepted() { // // Write the dialog properties to the config file // KConfigGroup group(Smb4KSettings::self()->config(), "BookmarkEditor"); KWindowConfig::saveWindowSize(windowHandle(), group); group.writeEntry("LabelCompletion", m_label_edit->completionObject()->items()); group.writeEntry("LoginCompletion", m_login_edit->completionObject()->items()); group.writeEntry("IPCompletion", m_ip_edit->completionObject()->items()); group.writeEntry("GroupCompletion", m_group_combo->completionObject()->items()); // // Accept the dialog // accept(); } void Smb4KBookmarkEditor::slotDialogRejected() { // // Reject the dialog // reject(); } void Smb4KBookmarkEditor::slotIconSizeChanged(int group) { switch (group) { case KIconLoader::Small: { int icon_size = KIconLoader::global()->currentSize(KIconLoader::Small); m_tree_widget->setIconSize(QSize(icon_size, icon_size)); break; } default: { break; } } } void Smb4KBookmarkEditor::slotAdjust() { // Do the necessary adjustments: QTreeWidgetItemIterator it(m_tree_widget); while (*it) { if (!(*it)->parent()) { if ((*it)->data(0, QTreeWidgetItem::UserType).toUrl().isEmpty()) { if ((*it)->childCount() == 0) { delete *it; } } else { BookmarkPtr bookmark = findBookmark((*it)->data(0, QTreeWidgetItem::UserType).toUrl()); if (bookmark) { bookmark->setGroupName(""); } } } else { BookmarkPtr bookmark = findBookmark((*it)->data(0, QTreeWidgetItem::UserType).toUrl()); if (bookmark) { bookmark->setGroupName((*it)->parent()->text(0)); } } ++it; } } diff --git a/core/smb4kcustomoptionsmanager_p.cpp b/core/smb4kcustomoptionsmanager_p.cpp index e0f698d..5c5008d 100644 --- a/core/smb4kcustomoptionsmanager_p.cpp +++ b/core/smb4kcustomoptionsmanager_p.cpp @@ -1,2019 +1,2019 @@ /*************************************************************************** Private helper classes for Smb4KCustomOptionsManagerPrivate class ------------------- begin : Fr 29 Apr 2011 copyright : (C) 2011-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kcustomoptionsmanager_p.h" #include "smb4ksettings.h" #if defined(Q_OS_LINUX) #include "smb4kmountsettings_linux.h" #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) #include "smb4kmountsettings_bsd.h" #endif // Qt includes #include #include #include #include #include #include #include #include #include #include #include // KDE includes #define TRANSLATION_DOMAIN "smb4k-core" #include #include #include #include #include #include Smb4KCustomOptionsDialog::Smb4KCustomOptionsDialog(const OptionsPtr &options, QWidget *parent) : QDialog(parent), m_options(options) { // // Set the title // setWindowTitle(i18n("Custom Options")); // // Set up the layout // QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); setLayout(layout); // Header QWidget *header = new QWidget(this); QHBoxLayout *headerLayout = new QHBoxLayout(header); headerLayout->setSpacing(5); - headerLayout->setMargin(0); + headerLayout->setContentsMargins(0, 0, 0, 0); QLabel *pixmap = new QLabel(header); QPixmap preferencesPixmap = KDE::icon("preferences-system-network").pixmap(KIconLoader::SizeHuge); pixmap->setPixmap(preferencesPixmap); pixmap->setAlignment(Qt::AlignCenter); QLabel *description = 0; switch (m_options->type()) { case Host: { description = new QLabel(i18n("

Define custom options for host %1 and all the shares it provides.

", m_options->displayString()), header); break; } case Share: { description = new QLabel(i18n("

Define custom options for share %1.

", m_options->displayString()), header); break; } default: { description = new QLabel(); break; } } description->setWordWrap(true); description->setAlignment(Qt::AlignVCenter); headerLayout->addWidget(pixmap, 0); headerLayout->addWidget(description, Qt::AlignVCenter); layout->addWidget(header, 0); // // Set up the operating system dependent stuff // setupView(); // // Finish the layout // QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); QPushButton *restoreButton = buttonBox->addButton(QDialogButtonBox::RestoreDefaults); QPushButton *okButton = buttonBox->addButton(QDialogButtonBox::Ok); okButton->setShortcut(Qt::CTRL|Qt::Key_Return); okButton->setDefault(true); QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel); cancelButton->setShortcut(Qt::Key_Escape); layout->addWidget(buttonBox, 0); // // Connections // connect(restoreButton, SIGNAL(clicked()), SLOT(slotSetDefaultValues())); connect(okButton, SIGNAL(clicked()), SLOT(slotOKClicked())); connect(cancelButton, SIGNAL(clicked()), SLOT(reject())); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "CustomOptionsDialog"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 // // Enable/disable buttons // restoreButton->setEnabled(!checkDefaultValues()); } Smb4KCustomOptionsDialog::~Smb4KCustomOptionsDialog() { } #if defined(Q_OS_LINUX) // // Linux // void Smb4KCustomOptionsDialog::setupView() { // // Tab widget with settings // QTabWidget *tabWidget = new QTabWidget(this); QVBoxLayout *dialogLayout = qobject_cast(layout()); dialogLayout->addWidget(tabWidget, 0); // // Custom options for mounting // QWidget *mountingTab = new QWidget(tabWidget); QVBoxLayout *mountingTabLayout = new QVBoxLayout(mountingTab); mountingTabLayout->setSpacing(5); // // Common options // QGroupBox *commonBox = new QGroupBox(i18n("Common Options"), mountingTab); QGridLayout *commonBoxLayout = new QGridLayout(commonBox); commonBoxLayout->setSpacing(5); QCheckBox *remountAlways = new QCheckBox(i18n("Always remount this share"), commonBox); remountAlways->setObjectName("RemountAlways"); remountAlways->setEnabled(m_options->type() == Share); connect(remountAlways, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(remountAlways, 0, 0, 1, 2, 0); // Write access QCheckBox *useWriteAccess = new QCheckBox(Smb4KMountSettings::self()->useWriteAccessItem()->label(), commonBox); useWriteAccess->setObjectName("UseWriteAccess"); KComboBox *writeAccess = new KComboBox(commonBox); writeAccess->setObjectName("WriteAccess"); QString readWriteText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadWrite).label; QString readOnlyText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadOnly).label; writeAccess->addItem(readWriteText); writeAccess->addItem(readOnlyText); connect(useWriteAccess, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(writeAccess, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(useWriteAccess, 1, 0, 0); commonBoxLayout->addWidget(writeAccess, 1, 1, 0); // Remote file system port QCheckBox *useFilesystemPort = new QCheckBox(Smb4KMountSettings::self()->useRemoteFileSystemPortItem()->label(), commonBox); useFilesystemPort->setObjectName("UseFilesystemPort"); QSpinBox *filesystemPort = new QSpinBox(commonBox); filesystemPort->setObjectName("FileSystemPort"); filesystemPort->setMinimum(Smb4KMountSettings::self()->remoteFileSystemPortItem()->minValue().toInt()); filesystemPort->setMaximum(Smb4KMountSettings::self()->remoteFileSystemPortItem()->maxValue().toInt()); // filesystemPort->setSliderEnabled(true); connect(useFilesystemPort, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(filesystemPort, SIGNAL(valueChanged(int)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(useFilesystemPort, 2, 0, 0); commonBoxLayout->addWidget(filesystemPort, 2, 1, 0); mountingTabLayout->addWidget(commonBox, 0); // // CIFS Unix Extensions Support // QGroupBox *extensionsSupportBox = new QGroupBox(i18n("CIFS Unix Extensions Support"), mountingTab); QGridLayout *extensionsSupportBoxLayout = new QGridLayout(extensionsSupportBox); extensionsSupportBoxLayout->setSpacing(5); QCheckBox *cifsExtensionsSupport = new QCheckBox(i18n("This server supports the CIFS Unix extensions"), extensionsSupportBox); cifsExtensionsSupport->setObjectName("CifsExtensionsSupport"); connect(cifsExtensionsSupport, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(cifsExtensionsSupport, SIGNAL(toggled(bool)), SLOT(slotCifsExtensionsSupport(bool))); extensionsSupportBoxLayout->addWidget(cifsExtensionsSupport, 0, 0, 1, 4, 0); // User Id QCheckBox *useUserId = new QCheckBox(Smb4KMountSettings::self()->useUserIdItem()->label(), extensionsSupportBox); useUserId->setObjectName("UseUserId"); KComboBox *userId = new KComboBox(extensionsSupportBox); userId->setObjectName("UserId"); QList allUsers = KUser::allUsers(); for (const KUser &u : allUsers) { userId->addItem(QString("%1 (%2)").arg(u.loginName()).arg(u.userId().nativeId()), QVariant::fromValue(u.groupId().nativeId())); } connect(useUserId, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(userId, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); extensionsSupportBoxLayout->addWidget(useUserId, 1, 0, 0); extensionsSupportBoxLayout->addWidget(userId, 1, 1, 0); // Group Id QCheckBox *useGroupId = new QCheckBox(Smb4KMountSettings::self()->useGroupIdItem()->label(), extensionsSupportBox); useGroupId->setObjectName("UseGroupId"); KComboBox *groupId = new KComboBox(extensionsSupportBox); groupId->setObjectName("GroupId"); QList allGroups = KUserGroup::allGroups(); for (const KUserGroup &g : allGroups) { groupId->addItem(QString("%1 (%2)").arg(g.name()).arg(g.groupId().nativeId()), QVariant::fromValue(g.groupId().nativeId())); } connect(useGroupId, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(groupId, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); extensionsSupportBoxLayout->addWidget(useGroupId, 2, 0, 0); extensionsSupportBoxLayout->addWidget(groupId, 2, 1, 0); // File mode QCheckBox *useFileMode = new QCheckBox(Smb4KMountSettings::self()->useFileModeItem()->label(), extensionsSupportBox); useFileMode->setObjectName("UseFileMode"); KLineEdit *fileMode = new KLineEdit(extensionsSupportBox); fileMode->setObjectName("FileMode"); fileMode->setClearButtonEnabled(true); fileMode->setAlignment(Qt::AlignRight); connect(useFileMode, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(fileMode, SIGNAL(textEdited(QString)), this, SLOT(slotCheckValues())); extensionsSupportBoxLayout->addWidget(useFileMode, 3, 0, 0); extensionsSupportBoxLayout->addWidget(fileMode, 3, 1, 0); // Directory mode QCheckBox *useDirectoryMode = new QCheckBox(Smb4KMountSettings::self()->useDirectoryModeItem()->label(), extensionsSupportBox); useDirectoryMode->setObjectName("UseDirectoryMode"); KLineEdit *directoryMode = new KLineEdit(extensionsSupportBox); directoryMode->setObjectName("DirectoryMode"); directoryMode->setClearButtonEnabled(true); directoryMode->setAlignment(Qt::AlignRight); connect(useDirectoryMode, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(directoryMode, SIGNAL(textEdited(QString)), this, SLOT(slotCheckValues())); extensionsSupportBoxLayout->addWidget(useDirectoryMode, 4, 0, 0); extensionsSupportBoxLayout->addWidget(directoryMode, 4, 1, 0); mountingTabLayout->addWidget(extensionsSupportBox, 0); // // Advanced options // QGroupBox *advancedOptionsBox = new QGroupBox(i18n("Advanced Options"), mountingTab); QGridLayout *advancedOptionsBoxLayout = new QGridLayout(advancedOptionsBox); advancedOptionsBoxLayout->setSpacing(5); // Security mode QCheckBox *useSecurityMode = new QCheckBox(Smb4KMountSettings::self()->useSecurityModeItem()->label(), advancedOptionsBox); useSecurityMode->setObjectName("UseSecurityMode"); KComboBox *securityMode = new KComboBox(advancedOptionsBox); securityMode->setObjectName("SecurityMode"); QString noneText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::None).label; QString krb5Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5).label; QString krb5iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5i).label; QString ntlmText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlm).label; QString ntlmiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmi).label; QString ntlmv2Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2).label; QString ntlmv2iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2i).label; QString ntlmsspText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmssp).label; QString ntlmsspiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmsspi).label; securityMode->addItem(noneText); securityMode->addItem(krb5Text); securityMode->addItem(krb5iText); securityMode->addItem(ntlmText); securityMode->addItem(ntlmiText); securityMode->addItem(ntlmv2Text); securityMode->addItem(ntlmv2iText); securityMode->addItem(ntlmsspText); connect(useSecurityMode, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(securityMode, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); advancedOptionsBoxLayout->addWidget(useSecurityMode, 0, 0, 0); advancedOptionsBoxLayout->addWidget(securityMode, 0, 1, 0); mountingTabLayout->addWidget(advancedOptionsBox, 0); mountingTabLayout->addStretch(100); tabWidget->addTab(mountingTab, i18n("Mounting")); // // Custom options for Samba // QWidget *sambaTab = new QWidget(tabWidget); QVBoxLayout *sambaTabLayout = new QVBoxLayout(sambaTab); sambaTabLayout->setSpacing(5); // // Common Options // QGroupBox *commonSambaOptionsBox = new QGroupBox(i18n("Common Options"), sambaTab); QGridLayout *commonSambaOptionsBoxLayout = new QGridLayout(commonSambaOptionsBox); commonSambaOptionsBoxLayout->setSpacing(5); // SMB port QCheckBox *useSmbPort = new QCheckBox(Smb4KSettings::self()->useRemoteSmbPortItem()->label(), commonSambaOptionsBox); useSmbPort->setObjectName("UseSmbPort"); QSpinBox *smbPort = new QSpinBox(commonSambaOptionsBox); smbPort->setObjectName("SmbPort"); smbPort->setMinimum(Smb4KSettings::self()->remoteSmbPortItem()->minValue().toInt()); smbPort->setMaximum(Smb4KSettings::self()->remoteSmbPortItem()->maxValue().toInt()); // smbPort->setSliderEnabled(true); connect(useSmbPort, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(smbPort, SIGNAL(valueChanged(int)), this, SLOT(slotCheckValues())); commonSambaOptionsBoxLayout->addWidget(useSmbPort, 0, 0, 0); commonSambaOptionsBoxLayout->addWidget(smbPort, 0, 1, 0); sambaTabLayout->addWidget(commonSambaOptionsBox, 0); // // Authentication // QGroupBox *authenticationBox = new QGroupBox(i18n("Authentication"), sambaTab); QVBoxLayout *authenticationBoxLayout = new QVBoxLayout(authenticationBox); authenticationBoxLayout->setSpacing(5); // Kerberos QCheckBox *useKerberos = new QCheckBox(Smb4KSettings::self()->useKerberosItem()->label(), authenticationBox); useKerberos->setObjectName("UseKerberos"); connect(useKerberos, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); authenticationBoxLayout->addWidget(useKerberos, 0); sambaTabLayout->addWidget(authenticationBox, 0); sambaTabLayout->addStretch(100); tabWidget->addTab(sambaTab, i18n("Samba")); // // Custom options for Wake-On-LAN // // NOTE: If you change the texts here, also alter them in the respective // config page. // QWidget *wakeOnLanTab = new QWidget(tabWidget); QVBoxLayout *wakeOnLanTabLayout = new QVBoxLayout(wakeOnLanTab); wakeOnLanTabLayout->setSpacing(5); // // MAC address // QGroupBox *macAddressBox = new QGroupBox(i18n("MAC Address"), wakeOnLanTab); QGridLayout *macAddressBoxLayout = new QGridLayout(macAddressBox); macAddressBoxLayout->setSpacing(5); // MAC address QLabel *macAddressLabel = new QLabel(i18n("MAC Address:"), macAddressBox); KLineEdit *macAddress = new KLineEdit(macAddressBox); macAddress->setObjectName("MACAddress"); macAddress->setClearButtonEnabled(true); macAddress->setInputMask("HH:HH:HH:HH:HH:HH;_"); // MAC address, see QLineEdit doc macAddressLabel->setBuddy(macAddress); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotCheckValues())); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotEnableWOLFeatures(QString))); macAddressBoxLayout->addWidget(macAddressLabel, 0, 0, 0); macAddressBoxLayout->addWidget(macAddress, 0, 1, 0); wakeOnLanTabLayout->addWidget(macAddressBox, 0); // // Wake-On-LAN Actions // QGroupBox *wakeOnLANActionsBox = new QGroupBox(i18n("Actions"), wakeOnLanTab); QVBoxLayout *wakeOnLANActionsBoxLayout = new QVBoxLayout(wakeOnLANActionsBox); wakeOnLANActionsBoxLayout->setSpacing(5); // Send magic package before network scan QCheckBox *sendPackageBeforeScan = new QCheckBox(i18n("Send magic package before scanning the network neighborhood"), wakeOnLANActionsBox); sendPackageBeforeScan->setObjectName("SendPackageBeforeScan"); connect(sendPackageBeforeScan, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeScan, 0); // Send magic package before mount QCheckBox *sendPackageBeforeMount = new QCheckBox(i18n("Send magic package before mounting a share"), wakeOnLanTab); sendPackageBeforeMount->setObjectName("SendPackageBeforeMount"); connect(sendPackageBeforeMount, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeMount, 0); wakeOnLanTabLayout->addWidget(wakeOnLANActionsBox, 0); wakeOnLanTabLayout->addStretch(100); tabWidget->addTab(wakeOnLanTab, i18n("Wake-On-LAN")); // // Load settings // if (m_options->hasOptions()) { if (m_options->type() == Share) { remountAlways->setChecked((m_options->remount() == Smb4KCustomOptions::RemountAlways)); } // CIFS Unix extensions support cifsExtensionsSupport->setChecked(m_options->cifsUnixExtensionsSupport()); // User information useUserId->setChecked(m_options->useUser()); userId->setCurrentText(QString("%1 (%2)").arg(m_options->user().loginName()).arg(m_options->user().userId().nativeId())); // Group information useGroupId->setChecked(m_options->useGroup()); groupId->setCurrentText(QString("%1 (%2)").arg(m_options->group().name()).arg(m_options->group().groupId().nativeId())); // File mode useFileMode->setChecked(m_options->useFileMode()); fileMode->setText(m_options->fileMode()); // Directory mode useDirectoryMode->setChecked(m_options->useDirectoryMode()); directoryMode->setText(m_options->directoryMode()); // Remote file system port useFilesystemPort->setChecked(m_options->useFileSystemPort()); filesystemPort->setValue(m_options->fileSystemPort()); // Write access useWriteAccess->setChecked(m_options->useWriteAccess()); switch (m_options->writeAccess()) { case Smb4KMountSettings::EnumWriteAccess::ReadWrite: { writeAccess->setCurrentText(readWriteText); break; } case Smb4KMountSettings::EnumWriteAccess::ReadOnly: { writeAccess->setCurrentText(readOnlyText); break; } default: { break; } } // Security mode useSecurityMode->setChecked(m_options->useSecurityMode()); switch (m_options->securityMode()) { case Smb4KMountSettings::EnumSecurityMode::None: { securityMode->setCurrentText(noneText); break; } case Smb4KMountSettings::EnumSecurityMode::Krb5: { securityMode->setCurrentText(krb5Text); break; } case Smb4KMountSettings::EnumSecurityMode::Krb5i: { securityMode->setCurrentText(krb5iText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlm: { securityMode->setCurrentText(ntlmText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmi: { securityMode->setCurrentText(ntlmiText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmv2: { securityMode->setCurrentText(ntlmv2Text); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmv2i: { securityMode->setCurrentText(ntlmv2iText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmssp: { securityMode->setCurrentText(ntlmsspText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmsspi: { securityMode->setCurrentText(ntlmsspiText); break; } default: { break; } } // Remote SMB port useSmbPort->setChecked(m_options->useSmbPort()); smbPort->setValue(m_options->smbPort()); // Kerberos useKerberos->setChecked(m_options->useKerberos()); // MAC address macAddress->setText(m_options->macAddress()); // Send magic package before scan sendPackageBeforeScan->setChecked(m_options->wolSendBeforeNetworkScan()); // Send magic package before mount sendPackageBeforeMount->setChecked(m_options->wolSendBeforeMount()); } else { setDefaultValues(); } // // Enable/disable features // wakeOnLanTab->setEnabled((m_options->type() == Host && Smb4KSettings::enableWakeOnLAN())); slotEnableWOLFeatures(macAddress->text()); slotCifsExtensionsSupport(cifsExtensionsSupport->isChecked()); } #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) // // FreeBSD and NetBSD // void Smb4KCustomOptionsDialog::setupView() { // // Tab widget with settings // QTabWidget *tabWidget = new QTabWidget(this); QVBoxLayout *dialogLayout = qobject_cast(layout()); dialogLayout->addWidget(tabWidget, 0); // // Custom options for mounting // QWidget *mountingTab = new QWidget(tabWidget); QVBoxLayout *mountingTabLayout = new QVBoxLayout(mountingTab); mountingTabLayout->setSpacing(5); // // Common options // QGroupBox *commonBox = new QGroupBox(i18n("Common Options"), mountingTab); QGridLayout *commonBoxLayout = new QGridLayout(commonBox); commonBoxLayout->setSpacing(5); QCheckBox *remountAlways = new QCheckBox(i18n("Always remount this share"), commonBox); remountAlways->setObjectName("RemountAlways"); remountAlways->setEnabled(m_options->type() == Share); connect(remountAlways, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(remountAlways, 0, 0, 1, 2, 0); // User Id QCheckBox *useUserId = new QCheckBox(Smb4KMountSettings::self()->useUserIdItem()->label(), commonBox); useUserId->setObjectName("UseUserId"); KComboBox *userId = new KComboBox(commonBox); userId->setObjectName("UserId"); QList allUsers = KUser::allUsers(); for (const KUser &u : allUsers) { userId->addItem(QString("%1 (%2)").arg(u.loginName()).arg(u.userId().nativeId()), QVariant::fromValue(u.groupId().nativeId())); } connect(useUserId, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(userId, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(useUserId, 1, 0, 0); commonBoxLayout->addWidget(userId, 1, 1, 0); // Group Id QCheckBox *useGroupId = new QCheckBox(Smb4KMountSettings::self()->useGroupIdItem()->label(), commonBox); useGroupId->setObjectName("UseGroupId"); KComboBox *groupId = new KComboBox(commonBox); groupId->setObjectName("GroupId"); QList allGroups = KUserGroup::allGroups(); for (const KUserGroup &g : allGroups) { groupId->addItem(QString("%1 (%2)").arg(g.name()).arg(g.groupId().nativeId()), QVariant::fromValue(g.groupId().nativeId())); } connect(useGroupId, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); connect(groupId, SIGNAL(currentIndexChanged(int)), SLOT(slotCheckValues())); commonBoxLayout->addWidget(useGroupId, 2, 0, 0); commonBoxLayout->addWidget(groupId, 2, 1, 0); // File mode QCheckBox *useFileMode = new QCheckBox(Smb4KMountSettings::self()->useFileModeItem()->label(), commonBox); useFileMode->setObjectName("UseFileMode"); KLineEdit *fileMode = new KLineEdit(commonBox); fileMode->setObjectName("FileMode"); fileMode->setClearButtonEnabled(true); fileMode->setAlignment(Qt::AlignRight); connect(useFileMode, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(fileMode, SIGNAL(textEdited(QString)), this, SLOT(slotCheckValues())); commonBoxLayout->addWidget(useFileMode, 3, 0, 0); commonBoxLayout->addWidget(fileMode, 3, 1, 0); // Directory mode QCheckBox *useDirectoryMode = new QCheckBox(Smb4KMountSettings::self()->useDirectoryModeItem()->label(), commonBox); useDirectoryMode->setObjectName("UseDirectoryMode"); KLineEdit *directoryMode = new KLineEdit(commonBox); directoryMode->setObjectName("DirectoryMode"); directoryMode->setClearButtonEnabled(true); directoryMode->setAlignment(Qt::AlignRight); connect(useDirectoryMode, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(directoryMode, SIGNAL(textEdited(QString)), this, SLOT(slotCheckValues())); commonBoxLayout->addWidget(useDirectoryMode, 4, 0, 0); commonBoxLayout->addWidget(directoryMode, 4, 1, 0); mountingTabLayout->addWidget(commonBox, 0); mountingTabLayout->addStretch(100); tabWidget->addTab(mountingTab, i18n("Mounting")); // // Custom options for Samba // QWidget *sambaTab = new QWidget(tabWidget); QVBoxLayout *sambaTabLayout = new QVBoxLayout(sambaTab); sambaTabLayout->setSpacing(5); // // Common Options // QGroupBox *commonSambaOptionsBox = new QGroupBox(i18n("Common Options"), sambaTab); QGridLayout *commonSambaOptionsBoxLayout = new QGridLayout(commonSambaOptionsBox); commonSambaOptionsBoxLayout->setSpacing(5); // SMB port QCheckBox *useSmbPort = new QCheckBox(Smb4KSettings::self()->useRemoteSmbPortItem()->label(), commonSambaOptionsBox); useSmbPort->setObjectName("UseSmbPort"); QSpinBox *smbPort = new QSpinBox(commonSambaOptionsBox); smbPort->setObjectName("SmbPort"); smbPort->setMinimum(Smb4KSettings::self()->remoteSmbPortItem()->minValue().toInt()); smbPort->setMaximum(Smb4KSettings::self()->remoteSmbPortItem()->maxValue().toInt()); // smbPort->setSliderEnabled(true); connect(useSmbPort, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(smbPort, SIGNAL(valueChanged(int)), this, SLOT(slotCheckValues())); commonSambaOptionsBoxLayout->addWidget(useSmbPort, 0, 0, 0); commonSambaOptionsBoxLayout->addWidget(smbPort, 0, 1, 0); sambaTabLayout->addWidget(commonSambaOptionsBox, 0); // // Authentication // QGroupBox *authenticationBox = new QGroupBox(i18n("Authentication"), sambaTab); QVBoxLayout *authenticationBoxLayout = new QVBoxLayout(authenticationBox); authenticationBoxLayout->setSpacing(5); // Kerberos QCheckBox *useKerberos = new QCheckBox(Smb4KSettings::self()->useKerberosItem()->label(), authenticationBox); useKerberos->setObjectName("UseKerberos"); connect(useKerberos, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); authenticationBoxLayout->addWidget(useKerberos, 0); sambaTabLayout->addWidget(authenticationBox, 0); sambaTabLayout->addStretch(100); tabWidget->addTab(sambaTab, i18n("Samba")); // // Custom options for Wake-On-LAN // // NOTE: If you change the texts here, also alter them in the respective // config page. // QWidget *wakeOnLanTab = new QWidget(tabWidget); QVBoxLayout *wakeOnLanTabLayout = new QVBoxLayout(wakeOnLanTab); wakeOnLanTabLayout->setSpacing(5); // // MAC address // QGroupBox *macAddressBox = new QGroupBox(i18n("MAC Address"), wakeOnLanTab); QGridLayout *macAddressBoxLayout = new QGridLayout(macAddressBox); macAddressBoxLayout->setSpacing(5); // MAC address QLabel *macAddressLabel = new QLabel(i18n("MAC Address:"), macAddressBox); KLineEdit *macAddress = new KLineEdit(macAddressBox); macAddress->setObjectName("MACAddress"); macAddress->setClearButtonEnabled(true); macAddress->setInputMask("HH:HH:HH:HH:HH:HH;_"); // MAC address, see QLineEdit doc macAddressLabel->setBuddy(macAddress); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotCheckValues())); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotEnableWOLFeatures(QString))); macAddressBoxLayout->addWidget(macAddressLabel, 0, 0, 0); macAddressBoxLayout->addWidget(macAddress, 0, 1, 0); wakeOnLanTabLayout->addWidget(macAddressBox, 0); // // Wake-On-LAN Actions // QGroupBox *wakeOnLANActionsBox = new QGroupBox(i18n("Actions"), wakeOnLanTab); QVBoxLayout *wakeOnLANActionsBoxLayout = new QVBoxLayout(wakeOnLANActionsBox); wakeOnLANActionsBoxLayout->setSpacing(5); // Send magic package before network scan QCheckBox *sendPackageBeforeScan = new QCheckBox(i18n("Send magic package before scanning the network neighborhood"), wakeOnLANActionsBox); sendPackageBeforeScan->setObjectName("SendPackageBeforeScan"); connect(sendPackageBeforeScan, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeScan, 0); // Send magic package before mount QCheckBox *sendPackageBeforeMount = new QCheckBox(i18n("Send magic package before mounting a share"), wakeOnLanTab); sendPackageBeforeMount->setObjectName("SendPackageBeforeMount"); connect(sendPackageBeforeMount, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeMount, 0); wakeOnLanTabLayout->addWidget(wakeOnLANActionsBox, 0); wakeOnLanTabLayout->addStretch(100); tabWidget->addTab(wakeOnLanTab, i18n("Wake-On-LAN")); // // Load settings // if (m_options->hasOptions()) { if (m_options->type() == Share) { remountAlways->setChecked((m_options->remount() == Smb4KCustomOptions::RemountAlways)); } // User information useUserId->setChecked(m_options->useUser()); userId->setCurrentText(QString("%1 (%2)").arg(m_options->user().loginName()).arg(m_options->user().userId().nativeId())); // Group information useGroupId->setChecked(m_options->useGroup()); groupId->setCurrentText(QString("%1 (%2)").arg(m_options->group().name()).arg(m_options->group().groupId().nativeId())); // File mode useFileMode->setChecked(m_options->useFileMode()); fileMode->setText(m_options->fileMode()); // Directory mode useDirectoryMode->setChecked(m_options->useDirectoryMode()); directoryMode->setText(m_options->directoryMode()); // Remote SMB port useSmbPort->setChecked(m_options->useSmbPort()); smbPort->setValue(m_options->smbPort()); // Kerberos useKerberos->setChecked(m_options->useKerberos()); // MAC address macAddress->setText(m_options->macAddress()); // Send magic package before scan sendPackageBeforeScan->setChecked(m_options->wolSendBeforeNetworkScan()); // Send magic package before mount sendPackageBeforeMount->setChecked(m_options->wolSendBeforeMount()); } else { setDefaultValues(); } // // Enable/disable features // wakeOnLanTab->setEnabled((m_options->type() == Host && Smb4KSettings::enableWakeOnLAN())); slotEnableWOLFeatures(macAddress->text()); } #else // // Generic (without mount options) // void Smb4KCustomOptionsDialog::setupView() { // // Tab widget with settings // QTabWidget *tabWidget = new QTabWidget(this); QVBoxLayout *dialogLayout = qobject_cast(layout()); dialogLayout->addWidget(tabWidget, 0); // // Custom options for Samba // QWidget *sambaTab = new QWidget(tabWidget); QVBoxLayout *sambaTabLayout = new QVBoxLayout(sambaTab); sambaTabLayout->setSpacing(5); // // Common Options // QGroupBox *commonSambaOptionsBox = new QGroupBox(i18n("Common Options"), sambaTab); QGridLayout *commonSambaOptionsBoxLayout = new QGridLayout(commonSambaOptionsBox); commonSambaOptionsBoxLayout->setSpacing(5); // SMB port QCheckBox *useSmbPort = new QCheckBox(Smb4KSettings::self()->useRemoteSmbPortItem()->label(), commonSambaOptionsBox); useSmbPort->setObjectName("UseSmbPort"); QSpinBox *smbPort = new QSpinBox(commonSambaOptionsBox); smbPort->setObjectName("SmbPort"); smbPort->setMinimum(Smb4KSettings::self()->remoteSmbPortItem()->minValue().toInt()); smbPort->setMaximum(Smb4KSettings::self()->remoteSmbPortItem()->maxValue().toInt()); // smbPort->setSliderEnabled(true); connect(useSmbPort, SIGNAL(toggled(bool)), this, SLOT(slotCheckValues())); connect(smbPort, SIGNAL(valueChanged(int)), this, SLOT(slotCheckValues())); commonSambaOptionsBoxLayout->addWidget(useSmbPort, 0, 0, 0); commonSambaOptionsBoxLayout->addWidget(smbPort, 0, 1, 0); sambaTabLayout->addWidget(commonSambaOptionsBox, 0); // // Authentication // QGroupBox *authenticationBox = new QGroupBox(i18n("Authentication"), sambaTab); QVBoxLayout *authenticationBoxLayout = new QVBoxLayout(authenticationBox); authenticationBoxLayout->setSpacing(5); // Kerberos QCheckBox *useKerberos = new QCheckBox(Smb4KSettings::self()->useKerberosItem()->label(), authenticationBox); useKerberos->setObjectName("UseKerberos"); connect(useKerberos, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); authenticationBoxLayout->addWidget(useKerberos, 0); sambaTabLayout->addWidget(authenticationBox, 0); sambaTabLayout->addStretch(100); tabWidget->addTab(sambaTab, i18n("Samba")); // // Custom options for Wake-On-LAN // // NOTE: If you change the texts here, also alter them in the respective // config page. // QWidget *wakeOnLanTab = new QWidget(tabWidget); QVBoxLayout *wakeOnLanTabLayout = new QVBoxLayout(wakeOnLanTab); wakeOnLanTabLayout->setSpacing(5); // // MAC address // QGroupBox *macAddressBox = new QGroupBox(i18n("MAC Address"), wakeOnLanTab); QGridLayout *macAddressBoxLayout = new QGridLayout(macAddressBox); macAddressBoxLayout->setSpacing(5); // MAC address QLabel *macAddressLabel = new QLabel(i18n("MAC Address:"), macAddressBox); KLineEdit *macAddress = new KLineEdit(macAddressBox); macAddress->setObjectName("MACAddress"); macAddress->setClearButtonEnabled(true); macAddress->setInputMask("HH:HH:HH:HH:HH:HH;_"); // MAC address, see QLineEdit doc macAddressLabel->setBuddy(macAddress); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotCheckValues())); connect(macAddress, SIGNAL(textEdited(QString)), SLOT(slotEnableWOLFeatures(QString))); macAddressBoxLayout->addWidget(macAddressLabel, 0, 0, 0); macAddressBoxLayout->addWidget(macAddress, 0, 1, 0); wakeOnLanTabLayout->addWidget(macAddressBox, 0); // // Wake-On-LAN Actions // QGroupBox *wakeOnLANActionsBox = new QGroupBox(i18n("Actions"), wakeOnLanTab); QVBoxLayout *wakeOnLANActionsBoxLayout = new QVBoxLayout(wakeOnLANActionsBox); wakeOnLANActionsBoxLayout->setSpacing(5); // Send magic package before network scan QCheckBox *sendPackageBeforeScan = new QCheckBox(i18n("Send magic package before scanning the network neighborhood"), wakeOnLANActionsBox); sendPackageBeforeScan->setObjectName("SendPackageBeforeScan"); connect(sendPackageBeforeScan, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeScan, 0); // Send magic package before mount QCheckBox *sendPackageBeforeMount = new QCheckBox(i18n("Send magic package before mounting a share"), wakeOnLanTab); sendPackageBeforeMount->setObjectName("SendPackageBeforeMount"); connect(sendPackageBeforeMount, SIGNAL(toggled(bool)), SLOT(slotCheckValues())); wakeOnLANActionsBoxLayout->addWidget(sendPackageBeforeMount, 0); wakeOnLanTabLayout->addWidget(wakeOnLANActionsBox, 0); wakeOnLanTabLayout->addStretch(100); tabWidget->addTab(wakeOnLanTab, i18n("Wake-On-LAN")); // // Load settings // if (m_options->hasOptions()) { // Remote SMB port useSmbPort->setChecked(m_options->useSmbPort()); smbPort->setValue(m_options->smbPort()); // Kerberos useKerberos->setChecked(m_options->useKerberos()); // MAC address macAddress->setText(m_options->macAddress()); // Send magic package before scan sendPackageBeforeScan->setChecked(m_options->wolSendBeforeNetworkScan()); // Send magic package before mount sendPackageBeforeMount->setChecked(m_options->wolSendBeforeMount()); } else { setDefaultValues(); } // // Enable/disable features // wakeOnLanTab->setEnabled((m_options->type() == Host && Smb4KSettings::enableWakeOnLAN())); slotEnableWOLFeatures(macAddress->text()); } #endif bool Smb4KCustomOptionsDialog::checkDefaultValues() { // // Always remount the share // if (m_options->type() == Share) { QCheckBox *remountAlways = findChild("RemountAlways"); if (remountAlways) { if (remountAlways->isChecked()) { return false; } } } // // User Id // QCheckBox *useUserId = findChild("UseUserId"); if (useUserId) { if (useUserId->isChecked() != Smb4KMountSettings::useUserId()) { return false; } } KComboBox *userId = findChild("UserId"); if (userId) { K_UID uid = (K_UID)userId->itemData(userId->currentIndex()).toInt(); if (uid != (K_UID)Smb4KMountSettings::userId().toInt()) { return false; } } // // Group Id // QCheckBox *useGroupId = findChild("UseGroupId"); if (useGroupId) { if (useGroupId->isChecked() != Smb4KMountSettings::useGroupId()) { return false; } } KComboBox *groupId = findChild("GroupId"); if (groupId) { K_GID gid = (K_GID)groupId->itemData(groupId->currentIndex()).toInt(); if (gid != (K_GID)Smb4KMountSettings::groupId().toInt()) { return false; } } // // File mode // QCheckBox *useFileMode = findChild("UseFileMode"); if (useFileMode) { if (useFileMode->isChecked() != Smb4KMountSettings::useFileMode()) { return false; } } KLineEdit *fileMode = findChild("FileMode"); if (fileMode) { if (fileMode->text() != Smb4KMountSettings::fileMode()) { return false; } } // // Directory mode // QCheckBox *useDirectoryMode = findChild("UseDirectoryMode"); if (useDirectoryMode) { if (useDirectoryMode->isChecked() != Smb4KMountSettings::useDirectoryMode()) { return false; } } KLineEdit *directoryMode = findChild("DirectoryMode"); if (directoryMode) { if (directoryMode->text() != Smb4KMountSettings::directoryMode()) { return false; } } #if defined(Q_OS_LINUX) // // CIFS Unix extensions support // QCheckBox *cifsExtensionsSupport = findChild("CifsExtensionsSupport"); if (cifsExtensionsSupport) { if (cifsExtensionsSupport->isChecked() != Smb4KMountSettings::cifsUnixExtensionsSupport()) { return false; } } // // Filesystem port // QCheckBox *useFilesystemPort = findChild("UseFilesystemPort"); if (useFilesystemPort) { if (useFilesystemPort->isChecked() != Smb4KMountSettings::useRemoteFileSystemPort()) { return false; } } QSpinBox *filesystemPort = findChild("FileSystemPort"); if (filesystemPort) { if (filesystemPort->value() != Smb4KMountSettings::remoteFileSystemPort()) { return false; } } // // Write access // QCheckBox *useWriteAccess = findChild("UseWriteAccess"); if (useWriteAccess) { if (useWriteAccess->isChecked() != Smb4KMountSettings::useWriteAccess()) { return false; } } KComboBox *writeAccess = findChild("WriteAccess"); if (writeAccess) { if (writeAccess->currentText() != Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::self()->writeAccess()).label) { return false; } } // // Security mode // QCheckBox *useSecurityMode = findChild("UseSecurityMode"); if (useSecurityMode) { if (useSecurityMode->isChecked() != Smb4KMountSettings::useSecurityMode()) { return false; } } KComboBox *securityMode = findChild("SecurityMode"); if (securityMode) { if (securityMode->currentText() != Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::self()->securityMode()).label) { return false; } } #endif // // SMB port // QCheckBox *useSmbPort = findChild("UseSmbPort"); if (useSmbPort) { if (useSmbPort->isChecked() != Smb4KSettings::useRemoteSmbPort()) { return false; } } QSpinBox *smbPort = findChild("SmbPort"); if (smbPort) { if (smbPort->value() != Smb4KSettings::remoteSmbPort()) { return false; } } // // Kerberos // QCheckBox *useKerberos = findChild("UseKerberos"); if (useKerberos) { if (useKerberos->isChecked() != Smb4KSettings::useKerberos()) { return false; } } // // MAC address & Wake-On-LAN features // if (m_options->type() == Host && Smb4KSettings::enableWakeOnLAN()) { KLineEdit *macAddress = findChild("MACAddress"); if (macAddress) { QRegExp exp("..\\:..\\:..\\:..\\:..\\:.."); if (exp.exactMatch(macAddress->text())) { return false; } } QCheckBox *sendPackageBeforeScan = findChild("SendPackageBeforeScan"); if (sendPackageBeforeScan) { if (sendPackageBeforeScan->isChecked()) { return false; } } QCheckBox *sendPackageBeforeMount = findChild("SendPackageBeforeMount"); if (sendPackageBeforeMount) { if (sendPackageBeforeMount->isChecked()) { return false; } } } return true; } void Smb4KCustomOptionsDialog::setDefaultValues() { // // Always remount the share // if (m_options->type() == Share) { QCheckBox *remountAlways = findChild("RemountAlways"); if (remountAlways) { remountAlways->setChecked(false); } } // // User Id // QCheckBox *useUserId = findChild("UseUserId"); if (useUserId) { useUserId->setChecked(Smb4KMountSettings::useUserId()); } KComboBox *userId = findChild("UserId"); if (userId) { KUser user((K_UID)Smb4KMountSettings::userId().toInt()); userId->setCurrentText(QString("%1 (%2)").arg(user.loginName()).arg(user.userId().nativeId())); } // // Group Id // QCheckBox *useGroupId = findChild("UseGroupId"); if (useGroupId) { useGroupId->setChecked(Smb4KMountSettings::useGroupId()); } KComboBox *groupId = findChild("GroupId"); if (groupId) { KUserGroup group((K_GID)Smb4KMountSettings::groupId().toInt()); groupId->setCurrentText(QString("%1 (%2)").arg(group.name()).arg(group.groupId().nativeId()));; } // // File mask // QCheckBox *useFileMode = findChild("UseFileMode"); if (useFileMode) { useFileMode->setChecked(Smb4KMountSettings::useFileMode()); } KLineEdit *fileMode = findChild("FileMode"); if (fileMode) { fileMode->setText(Smb4KMountSettings::fileMode()); } // // Directory mode // QCheckBox *useDirectoryMode = findChild("UseDirectoryMode"); if (useDirectoryMode) { useDirectoryMode->setChecked(Smb4KMountSettings::useDirectoryMode()); } KLineEdit *directoryMode = findChild("DirectoryMode"); if (directoryMode) { directoryMode->setText(Smb4KMountSettings::directoryMode()); } #if defined(Q_OS_LINUX) // // CIFS Unix extensions support // QCheckBox *cifsExtensionsSupport = findChild("CifsExtensionsSupport"); if (cifsExtensionsSupport) { cifsExtensionsSupport->setChecked(Smb4KMountSettings::cifsUnixExtensionsSupport()); } // // Filesystem port // QCheckBox *useFilesystemPort = findChild("UseFilesystemPort"); if (useFilesystemPort) { useFilesystemPort->setChecked(Smb4KMountSettings::useRemoteFileSystemPort()); } QSpinBox *filesystemPort = findChild("FileSystemPort"); if (filesystemPort) { filesystemPort->setValue(Smb4KMountSettings::remoteFileSystemPort()); } // // Write access // QCheckBox *useWriteAccess = findChild("UseWriteAccess"); if (useWriteAccess) { useWriteAccess->setChecked(Smb4KMountSettings::useWriteAccess()); } KComboBox *writeAccess = findChild("WriteAccess"); if (writeAccess) { QString readWriteText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadWrite).label; QString readOnlyText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadOnly).label; switch (Smb4KMountSettings::writeAccess()) { case Smb4KMountSettings::EnumWriteAccess::ReadWrite: { writeAccess->setCurrentText(readWriteText); break; } case Smb4KMountSettings::EnumWriteAccess::ReadOnly: { writeAccess->setCurrentText(readOnlyText); break; } default: { break; } } } // // Security mode // QCheckBox *useSecurityMode = findChild("UseSecurityMode"); if (useSecurityMode) { useSecurityMode->setChecked(Smb4KMountSettings::useSecurityMode()); } KComboBox *securityMode = findChild("SecurityMode"); if (securityMode) { QString noneText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::None).label; QString krb5Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5).label; QString krb5iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5i).label; QString ntlmText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlm).label; QString ntlmiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmi).label; QString ntlmv2Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2).label; QString ntlmv2iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2i).label; QString ntlmsspText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmssp).label; QString ntlmsspiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmsspi).label; switch (Smb4KMountSettings::securityMode()) { case Smb4KMountSettings::EnumSecurityMode::None: { securityMode->setCurrentText(noneText); break; } case Smb4KMountSettings::EnumSecurityMode::Krb5: { securityMode->setCurrentText(krb5Text); break; } case Smb4KMountSettings::EnumSecurityMode::Krb5i: { securityMode->setCurrentText(krb5iText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlm: { securityMode->setCurrentText(ntlmText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmi: { securityMode->setCurrentText(ntlmiText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmv2: { securityMode->setCurrentText(ntlmv2Text); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmv2i: { securityMode->setCurrentText(ntlmv2iText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmssp: { securityMode->setCurrentText(ntlmsspText); break; } case Smb4KMountSettings::EnumSecurityMode::Ntlmsspi: { securityMode->setCurrentText(ntlmsspiText); break; } default: { break; } } } #endif // // SMB port // QCheckBox *useSmbPort = findChild("UseSmbPort"); if (useSmbPort) { useSmbPort->setChecked(Smb4KSettings::useRemoteSmbPort()); } QSpinBox *smbPort = findChild("SmbPort"); if (smbPort) { smbPort->setValue(Smb4KSettings::remoteSmbPort()); } // // Kerberos // QCheckBox *useKerberos = findChild("UseKerberos"); if (useKerberos) { useKerberos->setChecked(Smb4KSettings::useKerberos()); } // // MAC address & Wake-On-LAN features // if (m_options->type() == Host) { KLineEdit *macAddress = findChild("MACAddress"); if (macAddress) { macAddress->clear(); macAddress->setInputMask("HH:HH:HH:HH:HH:HH;_"); } QCheckBox *sendPackageBeforeScan = findChild("SendPackageBeforeScan"); if (sendPackageBeforeScan) { sendPackageBeforeScan->setChecked(false); } QCheckBox *sendPackageBeforeMount = findChild("SendPackageBeforeMount"); if (sendPackageBeforeMount) { sendPackageBeforeMount->setChecked(false); } } } void Smb4KCustomOptionsDialog::saveValues() { // // Always remount the share // if (m_options->type() == Share) { QCheckBox *remountAlways = findChild("RemountAlways"); if (remountAlways) { if (remountAlways->isChecked()) { m_options->setRemount(Smb4KCustomOptions::RemountAlways); } else { m_options->setRemount(Smb4KCustomOptions::UndefinedRemount); } } } // // User Id // QCheckBox *useUserId = findChild("UseUserId"); if (useUserId) { m_options->setUseUser(useUserId->isChecked()); } KComboBox *userId = findChild("UserId"); if (userId) { m_options->setUser(KUser(userId->itemData(userId->currentIndex()).toInt())); } // // Group Id // QCheckBox *useGroupId = findChild("UseGroupId"); if (useGroupId) { m_options->setUseGroup(useGroupId->isChecked()); } KComboBox *groupId = findChild("GroupId"); if (groupId) { m_options->setGroup(KUserGroup(groupId->itemData(groupId->currentIndex()).toInt())); } // // File mode // QCheckBox *useFileMode = findChild("UseFileMode"); if (useFileMode) { m_options->setUseFileMode(useFileMode->isChecked()); } KLineEdit *fileMode = findChild("FileMode"); if (fileMode) { m_options->setFileMode(fileMode->text()); } // // Directory mode // QCheckBox *useDirectoryMode = findChild("UseDirectoryMode"); if (useDirectoryMode) { m_options->setUseDirectoryMode(useDirectoryMode->isChecked()); } KLineEdit *directoryMode = findChild("DirectoryMode"); if (directoryMode) { m_options->setDirectoryMode(directoryMode->text()); } #if defined(Q_OS_LINUX) // // CIFS Unix extensions support // QCheckBox *cifsExtensionsSupport = findChild("CifsExtensionsSupport"); if (cifsExtensionsSupport) { m_options->setCifsUnixExtensionsSupport(cifsExtensionsSupport->isChecked()); } // // Filesystem port // QCheckBox *useFilesystemPort = findChild("UseFilesystemPort"); if (useFilesystemPort) { m_options->setUseFileSystemPort(useFilesystemPort->isChecked()); } QSpinBox *filesystemPort = findChild("FileSystemPort"); if (filesystemPort) { m_options->setFileSystemPort(filesystemPort->value()); } // // Write access // QCheckBox *useWriteAccess = findChild("UseWriteAccess"); if (useWriteAccess) { m_options->setUseWriteAccess(useWriteAccess->isChecked()); } KComboBox *writeAccess = findChild("WriteAccess"); if (writeAccess) { QString readWriteText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadWrite).label; QString readOnlyText = Smb4KMountSettings::self()->writeAccessItem()->choices().value(Smb4KMountSettings::EnumWriteAccess::ReadOnly).label; if (writeAccess->currentText() == readWriteText) { m_options->setWriteAccess(Smb4KMountSettings::EnumWriteAccess::ReadWrite); } else if (writeAccess->currentText() == readOnlyText) { m_options->setWriteAccess(Smb4KMountSettings::EnumWriteAccess::ReadOnly); } } // // Security mode // QCheckBox *useSecurityMode = findChild("UseSecurityMode"); if (useSecurityMode) { m_options->setUseSecurityMode(useSecurityMode->isChecked()); } KComboBox *securityMode = findChild("SecurityMode"); if (securityMode) { QString noneText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::None).label; QString krb5Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5).label; QString krb5iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Krb5i).label; QString ntlmText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlm).label; QString ntlmiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmi).label; QString ntlmv2Text = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2).label; QString ntlmv2iText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmv2i).label; QString ntlmsspText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmssp).label; QString ntlmsspiText = Smb4KMountSettings::self()->securityModeItem()->choices().value(Smb4KMountSettings::EnumSecurityMode::Ntlmsspi).label; if (securityMode->currentText() == noneText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::None); } else if (securityMode->currentText() == krb5Text) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Krb5); } else if (securityMode->currentText() == krb5iText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Krb5i); } else if (securityMode->currentText() == ntlmText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlm); } else if (securityMode->currentText() == ntlmiText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlmi); } else if (securityMode->currentText() == ntlmv2Text) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlmv2); } else if (securityMode->currentText() == ntlmv2iText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlmv2i); } else if (securityMode->currentText() == ntlmsspText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlmssp); } else if (securityMode->currentText() == ntlmsspiText) { m_options->setSecurityMode(Smb4KMountSettings::EnumSecurityMode::Ntlmsspi); } } #endif // // SMB port // QCheckBox *useSmbPort = findChild("UseSmbPort"); if (useSmbPort) { m_options->setUseSmbPort(useSmbPort->isChecked()); } QSpinBox *smbPort = findChild("SmbPort"); if (smbPort) { m_options->setSmbPort(smbPort->value()); } // Kerberos QCheckBox *useKerberos = findChild("UseKerberos"); if (useKerberos) { m_options->setUseKerberos(useKerberos->isChecked()); } // MAC address & Wake-On-LAN features if (m_options->type() == Host) { KLineEdit *macAddress = findChild("MACAddress"); if (macAddress) { m_options->setMACAddress(macAddress->text()); } QCheckBox *sendPackageBeforeScan = findChild("SendPackageBeforeScan"); if (sendPackageBeforeScan) { m_options->setWOLSendBeforeNetworkScan(sendPackageBeforeScan->isChecked()); } QCheckBox *sendPackageBeforeMount = findChild("SendPackageBeforeMount"); if (sendPackageBeforeMount) { m_options->setWOLSendBeforeMount(sendPackageBeforeMount->isChecked()); } } KConfigGroup group(Smb4KSettings::self()->config(), "CustomOptionsDialog"); KWindowConfig::saveWindowSize(windowHandle(), group); } void Smb4KCustomOptionsDialog::slotSetDefaultValues() { setDefaultValues(); } void Smb4KCustomOptionsDialog::slotCheckValues() { QDialogButtonBox *buttonBox = findChild(); if (buttonBox) { for (QAbstractButton *b : buttonBox->buttons()) { if (buttonBox->buttonRole(b) == QDialogButtonBox::ResetRole) { b->setEnabled(!checkDefaultValues()); break; } } } } void Smb4KCustomOptionsDialog::slotOKClicked() { saveValues(); accept(); } void Smb4KCustomOptionsDialog::slotEnableWOLFeatures(const QString &mac) { QRegExp exp("..\\:..\\:..\\:..\\:..\\:.."); QCheckBox *sendPackageBeforeScan = findChild("SendPackageBeforeScan"); if (sendPackageBeforeScan) { sendPackageBeforeScan->setEnabled(m_options->type() == Host && exp.exactMatch(mac)); } QCheckBox *sendPackageBeforeMount = findChild("SendPackageBeforeMount"); if (sendPackageBeforeMount) { sendPackageBeforeMount->setEnabled(m_options->type() == Host && exp.exactMatch(mac)); } } void Smb4KCustomOptionsDialog::slotCifsExtensionsSupport(bool support) { #if defined(Q_OS_LINUX) // // User id // QCheckBox *useUserId = findChild("UseUserId"); if (useUserId) { useUserId->setEnabled(!support); } KComboBox *userId = findChild("UserId"); if (userId) { userId->setEnabled(!support); } // // Group id // QCheckBox *useGroupId = findChild("UseGroupId"); if (useGroupId) { useGroupId->setEnabled(!support); } KComboBox *groupId = findChild("GroupId"); if (groupId) { groupId->setEnabled(!support); } // // File mode // QCheckBox *useFileMode = findChild("UseFileMode"); if (useFileMode) { useFileMode->setEnabled(!support); } KLineEdit *fileMode = findChild("FileMode"); if (fileMode) { fileMode->setEnabled(!support); } // // Directory mode // QCheckBox *useDirectoryMode = findChild("UseDirectoryMode"); if (useDirectoryMode) { useDirectoryMode->setEnabled(!support); } KLineEdit *directoryMode = findChild("DirectoryMode"); if (directoryMode) { directoryMode->setEnabled(!support); } #endif } diff --git a/core/smb4khomesshareshandler_p.cpp b/core/smb4khomesshareshandler_p.cpp index 5c551fd..62e183a 100644 --- a/core/smb4khomesshareshandler_p.cpp +++ b/core/smb4khomesshareshandler_p.cpp @@ -1,326 +1,326 @@ /*************************************************************************** Private helpers for the homes shares handler ------------------- begin : Mo Apr 11 2011 copyright : (C) 2011-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, 51 Franklin Street, Suite 500, Boston, * * MA 02110-1335 USA * ***************************************************************************/ // application specific includes #include "smb4khomesshareshandler_p.h" #include "smb4ksettings.h" #include "smb4kshare.h" // Qt includes #include #include #include #include #include #include #include #include #include #include // KDE includes #define TRANSLATION_DOMAIN "smb4k-core" #include #include #include Smb4KHomesUsers::Smb4KHomesUsers(const SharePtr &s, const QStringList &u) { m_workgroup_name = s->workgroupName(); m_host_name = s->hostName(); m_share_name = s->shareName(); m_host_ip.setAddress(s->hostIpAddress()); m_users = u; } Smb4KHomesUsers::Smb4KHomesUsers(const Smb4KHomesUsers &u) { m_workgroup_name = u.workgroupName(); m_host_name = u.hostName(); m_share_name = u.shareName(); m_host_ip.setAddress(u.hostIP()); m_users = u.users(); m_profile = u.profile(); } Smb4KHomesUsers::Smb4KHomesUsers() { } Smb4KHomesUsers::~Smb4KHomesUsers() { } QString Smb4KHomesUsers::workgroupName() const { return m_workgroup_name; } void Smb4KHomesUsers::setWorkgroupName(const QString& name) { m_workgroup_name = name; } QString Smb4KHomesUsers::hostName() const { return m_host_name; } void Smb4KHomesUsers::setHostName(const QString& name) { m_host_name = name; } QString Smb4KHomesUsers::shareName() const { return m_share_name; } void Smb4KHomesUsers::setShareName(const QString& name) { m_share_name = name; } QString Smb4KHomesUsers::hostIP() const { return m_host_ip.toString(); } void Smb4KHomesUsers::setHostIP(const QString& ip) { m_host_ip.setAddress(ip); } QStringList Smb4KHomesUsers::users() const { return m_users; } void Smb4KHomesUsers::setUsers(const QStringList& users) { m_users = users; } QString Smb4KHomesUsers::profile() const { return m_profile; } void Smb4KHomesUsers::setProfile(const QString& profile) { m_profile = profile; } Smb4KHomesUserDialog::Smb4KHomesUserDialog(const SharePtr &share, QWidget *parent) : QDialog(parent), m_share(share) { // // Set the window title // setWindowTitle(i18n("Specify User")); // // Setup the view // setupView(); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "HomesUserDialog"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 // // Fill the completion object // m_user_combo->completionObject()->setItems(group.readEntry("HomesUsersCompletion", QStringList())); } Smb4KHomesUserDialog::~Smb4KHomesUserDialog() { } void Smb4KHomesUserDialog::setupView() { QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); QWidget *description = new QWidget(this); QHBoxLayout *desc_layout = new QHBoxLayout(description); desc_layout->setSpacing(5); - desc_layout->setMargin(0); + desc_layout->setContentsMargins(0, 0, 0, 0); QLabel *pixmap = new QLabel(description); QPixmap user_pix = KDE::icon("user-identity").pixmap(KIconLoader::SizeHuge); pixmap->setPixmap(user_pix); pixmap->setAlignment(Qt::AlignBottom); QLabel *label = new QLabel(i18n("Please specify a username for share
%1.", m_share->displayString()), description); label->setWordWrap(true); label->setAlignment(Qt::AlignBottom); desc_layout->addWidget(pixmap, 0); desc_layout->addWidget(label, Qt::AlignBottom); QWidget *input = new QWidget(this); QGridLayout *input_layout = new QGridLayout(input); input_layout->setSpacing(5); - input_layout->setMargin(0); + input_layout->setContentsMargins(0, 0, 0, 0); input_layout->setColumnStretch(0, 0); input_layout->setColumnStretch(1, 1); QLabel *input_label = new QLabel(i18n("User:"), input); m_user_combo = new KComboBox(true, input); m_user_combo->setDuplicatesEnabled(false); m_user_combo->setEditable(true); input_layout->addWidget(input_label, 0, 0, 0); input_layout->addWidget(m_user_combo, 0, 1, 0); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_clear_button = buttonBox->addButton(i18n("Clear List"), QDialogButtonBox::ActionRole); m_clear_button->setIcon(KDE::icon("edit-clear")); m_clear_button->setEnabled(false); m_ok_button = buttonBox->addButton(QDialogButtonBox::Ok); m_ok_button->setEnabled(false); m_cancel_button = buttonBox->addButton(QDialogButtonBox::Cancel); m_ok_button->setShortcut(Qt::CTRL|Qt::Key_Return); m_cancel_button->setShortcut(Qt::Key_Escape); m_ok_button->setDefault(true); layout->addWidget(description, 0); layout->addWidget(input, 0); layout->addWidget(buttonBox, 0); m_user_combo->setFocus(); connect(m_user_combo, SIGNAL(currentTextChanged(QString)), SLOT(slotTextChanged(QString))); connect(m_user_combo->lineEdit(), SIGNAL(editingFinished()), SLOT(slotHomesUserEntered())); connect(m_clear_button, SIGNAL(clicked()), SLOT(slotClearClicked())); connect(m_ok_button, SIGNAL(clicked()), SLOT(slotOkClicked())); connect(m_cancel_button, SIGNAL(clicked()), SLOT(reject())); } void Smb4KHomesUserDialog::setUserNames(const QStringList &users) { if (!users.isEmpty()) { m_user_combo->addItems(users); m_user_combo->setCurrentItem(""); m_clear_button->setEnabled(true); } } QStringList Smb4KHomesUserDialog::userNames() { QStringList users; for (int i = 0; i < m_user_combo->count(); ++i) { users << m_user_combo->itemText(i); } if (!users.contains(m_user_combo->currentText())) { users << m_user_combo->currentText(); } return users; } void Smb4KHomesUserDialog::slotTextChanged(const QString &text) { m_ok_button->setEnabled(!text.isEmpty()); } void Smb4KHomesUserDialog::slotClearClicked() { m_user_combo->clearEditText(); m_user_combo->clear(); m_clear_button->setEnabled(false); } void Smb4KHomesUserDialog::slotOkClicked() { KConfigGroup group(Smb4KSettings::self()->config(), "HomesUserDialog"); KWindowConfig::saveWindowSize(windowHandle(), group); group.writeEntry("HomesUsersCompletion", m_user_combo->completionObject()->items()); accept(); } void Smb4KHomesUserDialog::slotHomesUserEntered() { KCompletion *completion = m_user_combo->completionObject(); if (!m_user_combo->currentText().isEmpty()) { completion->addItem(m_user_combo->currentText()); } } diff --git a/core/smb4kmounter_p.cpp b/core/smb4kmounter_p.cpp index 429a304..1681028 100644 --- a/core/smb4kmounter_p.cpp +++ b/core/smb4kmounter_p.cpp @@ -1,294 +1,294 @@ /*************************************************************************** This file contains private helper classes for the Smb4KMounter class. ------------------- begin : Do Jul 19 2007 copyright : (C) 2007-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kmounter_p.h" #include "smb4ksettings.h" #include "smb4knotification.h" #include "smb4khomesshareshandler.h" #include "smb4kglobal.h" #include "smb4kcustomoptions.h" #include "smb4kcustomoptionsmanager.h" // Qt includes #include #include #include #include #include #include #include // KDE includes #define TRANSLATION_DOMAIN "smb4k-core" #include #include #include using namespace Smb4KGlobal; Smb4KMountDialog::Smb4KMountDialog(const SharePtr &share, QWidget *parent) : QDialog(parent), m_share(share), m_valid(true) { // // Set the title // setWindowTitle(i18n("Mount Share")); // // Set up the view // setupView(); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "MountDialog"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 // // Fill the completion objects // m_share_input->completionObject()->setItems(group.readEntry("ShareNameCompletion", QStringList())); m_ip_input->completionObject()->setItems(group.readEntry("IPAddressCompletion", QStringList())); m_workgroup_input->completionObject()->setItems(group.readEntry("WorkgroupCompletion", QStringList())); } Smb4KMountDialog::~Smb4KMountDialog() { } void Smb4KMountDialog::setupView() { QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); QWidget *description = new QWidget(this); QHBoxLayout *desc_layout = new QHBoxLayout(description); desc_layout->setSpacing(5); QLabel *pixmap = new QLabel(description); QPixmap mount_pix = KDE::icon("view-form", QStringList("emblem-mounted")).pixmap(KIconLoader::SizeHuge); pixmap->setPixmap(mount_pix); pixmap->setAlignment(Qt::AlignBottom); QLabel *label = new QLabel(i18n("Enter the location and optionally the IP address and workgroup to mount a share."), description); label->setWordWrap(true); label->setAlignment(Qt::AlignBottom); desc_layout->addWidget(pixmap, 0); desc_layout->addWidget(label, Qt::AlignBottom); QWidget *edit_widget = new QWidget(this); QGridLayout *edit_layout = new QGridLayout(edit_widget); layout->setSpacing(5); QLabel *shareLabel = new QLabel(i18n("Location:"), edit_widget); m_share_input = new KLineEdit(edit_widget); m_share_input->setWhatsThis(i18n("The location of the share is provided by the Uniform Resource Locator (URL). It generally has the following syntax: " "[smb:]//[USER:PASSWORD@]HOST:PORT/SHARE. The username, password and port are optional. You should omit to enter the password here, because it is shown in cleartext.")); // m_share_input->setToolTip(i18n("The URL of the share")); m_share_input->setCompletionMode(KCompletion::CompletionPopupAuto); m_share_input->setClearButtonEnabled(true); m_share_input->setMinimumWidth(200); m_share_input->setFocus(); QLabel *addressLabel = new QLabel(i18n("IP Address:"), edit_widget); m_ip_input = new KLineEdit(edit_widget); m_ip_input->setWhatsThis(i18n("The Internet Protocol (IP) address identifies the " "host in the network and indicates where it is. It has two valid formats, the one " "known as IP version 4 (e.g. 192.168.2.11) and the version 6 format " "(e.g. 2001:0db8:85a3:08d3:1319:8a2e:0370:7334).")); // m_ip_input->setToolTip(i18n("The IP address of the host where the share is located")); m_ip_input->setCompletionMode(KCompletion::CompletionPopupAuto); m_ip_input->setClearButtonEnabled(true); m_ip_input->setMinimumWidth(200); QLabel *workgroupLabel = new QLabel(i18n("Workgroup:"), edit_widget); m_workgroup_input = new KLineEdit(edit_widget); m_workgroup_input->setWhatsThis(i18n("The workgroup or domain identifies the " "peer-to-peer computer network the host is located in.")); // m_workgroup_input->setToolTip(i18n("The workgroup where the host is located")); m_workgroup_input->setCompletionMode(KCompletion::CompletionPopupAuto); m_workgroup_input->setClearButtonEnabled(true); m_workgroup_input->setMinimumWidth(200); edit_layout->addWidget(shareLabel, 0, 0, 0); edit_layout->addWidget(m_share_input, 0, 1, 0); edit_layout->addWidget(addressLabel, 1, 0, 0); edit_layout->addWidget(m_ip_input, 1, 1, 0); edit_layout->addWidget(workgroupLabel, 2, 0, 0); edit_layout->addWidget(m_workgroup_input, 2, 1, 0); m_bookmark = new QCheckBox(i18n("Add this share to the bookmarks"), this); m_bookmark->setWhatsThis(i18n("If you tick this checkbox, the share will be bookmarked " "and you can access it e.g. through the \"Bookmarks\" menu entry in the main window.")); // m_bookmark->setToolTip(i18n("Add this share to the bookmarks")); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_ok_button = buttonBox->addButton(QDialogButtonBox::Ok); m_cancel_button = buttonBox->addButton(QDialogButtonBox::Cancel); m_ok_button->setShortcut(Qt::CTRL|Qt::Key_Return); m_cancel_button->setShortcut(Qt::Key_Escape); layout->addWidget(description, Qt::AlignBottom); layout->addWidget(edit_widget, 0); layout->addWidget(m_bookmark, 0); layout->addWidget(buttonBox, 0); slotChangeInputValue(m_share_input->text()); // // Connections // connect(m_share_input, SIGNAL(textChanged(QString)), this, SLOT(slotChangeInputValue(QString))); connect(m_share_input, SIGNAL(editingFinished()), this, SLOT(slotShareNameEntered())); connect(m_ip_input, SIGNAL(editingFinished()), this, SLOT(slotIPEntered())); connect(m_workgroup_input, SIGNAL(editingFinished()), this, SLOT(slotWorkgroupEntered())); connect(m_ok_button, SIGNAL(clicked()), this, SLOT(slotOkClicked())); connect(m_cancel_button, SIGNAL(clicked()), this, SLOT(slotCancelClicked())); } ///////////////////////////////////////////////////////////////////////////// // SLOT IMPLEMENTATIONS ///////////////////////////////////////////////////////////////////////////// void Smb4KMountDialog::slotChangeInputValue(const QString& _test) { m_ok_button->setEnabled(!_test.isEmpty()); } void Smb4KMountDialog::slotOkClicked() { if (!m_share_input->text().trimmed().isEmpty()) { // // Get the URL // QString userInput = m_share_input->text().trimmed(); // // Take care of a Windows-like UNC addresses // if (userInput.startsWith(QLatin1String("\\"))) { userInput.replace("\\", "/"); } // // Set the URL and adjust the scheme // QUrl smbUrl = QUrl::fromUserInput(userInput); smbUrl.setScheme("smb"); // // Set the URL of the share // - if (smbUrl.isValid() && !smbUrl.host().isEmpty() && !smbUrl.path().isEmpty() && !smbUrl.path().endsWith(QLatin1String("/"))) + if (smbUrl.isValid() && !smbUrl.host().isEmpty() && !smbUrl.path().isEmpty() && !smbUrl.path().endsWith(QLatin1Char('/'))) { m_share->setUrl(smbUrl); m_share->setWorkgroupName(m_workgroup_input->text().trimmed()); m_share->setHostIpAddress(m_ip_input->text().trimmed()); } else { Smb4KNotification::invalidURLPassed(); m_valid = false; } } KConfigGroup group(Smb4KSettings::self()->config(), "MountDialog"); KWindowConfig::saveWindowSize(windowHandle(), group); group.writeEntry("ShareNameCompletion", m_share_input->completionObject()->items()); group.writeEntry("IPAddressCompletion", m_ip_input->completionObject()->items()); group.writeEntry("WorkgroupCompletion", m_workgroup_input->completionObject()->items()); accept(); } void Smb4KMountDialog::slotCancelClicked() { Smb4KMounter::self()->abort(); reject(); } void Smb4KMountDialog::slotShareNameEntered() { KCompletion *completion = m_share_input->completionObject(); QUrl url(m_share_input->userText()); url.setScheme("smb"); if (url.isValid() && !url.isEmpty()) { completion->addItem(m_share_input->userText()); } } void Smb4KMountDialog::slotIPEntered() { KCompletion *completion = m_ip_input->completionObject(); if (!m_ip_input->userText().isEmpty()) { completion->addItem(m_ip_input->userText()); } } void Smb4KMountDialog::slotWorkgroupEntered() { KCompletion *completion = m_workgroup_input->completionObject(); if (!m_workgroup_input->userText().isEmpty()) { completion->addItem(m_workgroup_input->userText()); } } diff --git a/core/smb4kprofilemanager_p.cpp b/core/smb4kprofilemanager_p.cpp index effbd7c..1ec4415 100644 --- a/core/smb4kprofilemanager_p.cpp +++ b/core/smb4kprofilemanager_p.cpp @@ -1,213 +1,213 @@ /*************************************************************************** Private helper class(es) for the profile manager. ------------------- begin : Mi Aug 12 2014 copyright : (C) 2014-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kprofilemanager_p.h" #include "smb4ksettings.h" // Qt includes #include #include #include #include #include #include #include // KDE includes #define TRANSLATION_DOMAIN "smb4k-core" #include #include #include Smb4KProfileMigrationDialog::Smb4KProfileMigrationDialog(const QStringList& from, const QStringList& to, QWidget* parent) : QDialog(parent), m_from_list(from), m_to_list(to) { // // Set the window title // setWindowTitle(i18n("Profile Migration Assistant")); // // Setup the view // setupView(); // // Set the dialog size // create(); KConfigGroup group(Smb4KSettings::self()->config(), "ProfileMigrationDialog"); QSize dialogSize; if (group.exists()) { KWindowConfig::restoreWindowSize(windowHandle(), group); dialogSize = windowHandle()->size(); } else { dialogSize = sizeHint(); } resize(dialogSize); // workaround for QTBUG-40584 } Smb4KProfileMigrationDialog::~Smb4KProfileMigrationDialog() { } void Smb4KProfileMigrationDialog::setupView() { // // The layout // QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); // // The description // QWidget *description = new QWidget(this); QHBoxLayout *desc_layout = new QHBoxLayout(description); desc_layout->setSpacing(5); - desc_layout->setMargin(0); + desc_layout->setContentsMargins(0, 0, 0, 0); QLabel *pixmap = new QLabel(description); QPixmap pix = KDE::icon("format-list-unordered").pixmap(KIconLoader::SizeHuge); pixmap->setPixmap(pix); pixmap->setAlignment(Qt::AlignBottom); QLabel *label = new QLabel(i18n("Migrate all relevant settings of one profile to another.")); label->setWordWrap(true); label->setAlignment(Qt::AlignBottom); desc_layout->addWidget(pixmap, 0); desc_layout->addWidget(label, Qt::AlignBottom); // // The input widgets // QWidget *editors = new QWidget(this); QGridLayout *editors_layout = new QGridLayout(editors); editors_layout->setSpacing(5); - editors_layout->setMargin(0); + editors_layout->setContentsMargins(0, 0, 0, 0); editors_layout->setColumnStretch(0, 0); editors_layout->setColumnStretch(1, 1); QLabel *from = new QLabel(i18n("Old Profile:"), editors); editors_layout->addWidget(from, 0, 0, 0); m_from_box = new KComboBox(editors); if (m_from_list.size() == 1 && m_from_list.first().isEmpty()) { m_from_box->addItem(i18n("")); } else { if (m_to_list.size() == 1 && m_to_list.first().isEmpty()) { m_from_box->addItem(i18n("")); } else { m_from_box->addItems(m_from_list); } } editors_layout->addWidget(m_from_box, 0, 1, 0); QLabel *to = new QLabel(i18n("New Profile:"), editors); editors_layout->addWidget(to, 1, 0, 0); m_to_box = new KComboBox(editors); if (m_to_list.size() == 1 && m_to_list.first().isEmpty()) { m_to_box->addItem(i18n("")); } else { m_to_box->addItems(m_to_list); m_to_box->setCurrentText(Smb4KProfileManager::self()->activeProfile()); } editors_layout->addWidget(m_to_box, 1, 1, 0); QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this); m_ok_button = buttonBox->addButton(QDialogButtonBox::Ok); m_cancel_button = buttonBox->addButton(QDialogButtonBox::Cancel); m_ok_button->setShortcut(Qt::CTRL|Qt::Key_Return); m_cancel_button->setShortcut(Qt::Key_Escape); m_ok_button->setDefault(true); m_ok_button->setEnabled(!m_to_box->currentText().isEmpty()); layout->addWidget(description, 0); layout->addWidget(editors, 0); layout->addWidget(buttonBox, 0); connect(m_ok_button, SIGNAL(clicked()), this, SLOT(slotOkClicked())); connect(m_cancel_button, SIGNAL(clicked()), this, SLOT(reject())); } QString Smb4KProfileMigrationDialog::from() const { if (m_from_box->currentText() == i18n("")) { return QString(); } return m_from_box->currentText(); } QString Smb4KProfileMigrationDialog::to() const { if (m_to_box->currentText() == i18n("")) { return QString(); } return m_to_box->currentText(); } void Smb4KProfileMigrationDialog::slotOkClicked() { KConfigGroup group(Smb4KSettings::self()->config(), "ProfileMigrationDialog"); KWindowConfig::saveWindowSize(windowHandle(), group); accept(); } diff --git a/plasmoid/plugin/smb4knetworkobject.cpp b/plasmoid/plugin/smb4knetworkobject.cpp index 86e2403..08687a7 100644 --- a/plasmoid/plugin/smb4knetworkobject.cpp +++ b/plasmoid/plugin/smb4knetworkobject.cpp @@ -1,430 +1,430 @@ /*************************************************************************** This class derives from QObject and encapsulates the network items. It is for use with QtQuick. ------------------- begin : Fr Mär 02 2012 copyright : (C) 2012-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4knetworkobject.h" #include "core/smb4kglobal.h" // Qt includes #include using namespace Smb4KGlobal; class Smb4KNetworkObjectPrivate { public: QString workgroup; QUrl url; int type; int parentType; QString comment; bool mounted; QUrl mountpoint; bool printer; bool isMaster; bool inaccessible; }; Smb4KNetworkObject::Smb4KNetworkObject(Smb4KWorkgroup *workgroup, QObject *parent) : QObject(parent), d(new Smb4KNetworkObjectPrivate) { d->workgroup = workgroup->workgroupName(); d->url = workgroup->url(); d->mounted = false; d->inaccessible = false; d->printer = false; d->isMaster = false; setType(Workgroup); } Smb4KNetworkObject::Smb4KNetworkObject(Smb4KHost *host, QObject *parent) : QObject(parent), d(new Smb4KNetworkObjectPrivate) { d->workgroup = host->workgroupName(); d->url = host->url(); d->comment = host->comment(); d->mounted = false; d->inaccessible = false; d->printer = false; d->isMaster = host->isMasterBrowser(); setType(Host); } Smb4KNetworkObject::Smb4KNetworkObject(Smb4KShare *share, QObject *parent) : QObject(parent), d(new Smb4KNetworkObjectPrivate) { d->workgroup = share->workgroupName(); d->url = share->url(); d->comment = share->comment(); d->mounted = share->isMounted(); d->inaccessible = share->isInaccessible(); d->printer = share->isPrinter(); d->isMaster = false; d->mountpoint = QUrl::fromLocalFile(share->path()); setType(Share); } Smb4KNetworkObject::Smb4KNetworkObject(QObject *parent) : QObject(parent), d(new Smb4KNetworkObjectPrivate) { d->url.setUrl("smb://", QUrl::TolerantMode); d->mounted = false; d->inaccessible = false; d->printer = false; d->isMaster = false; setType(Network); } Smb4KNetworkObject::~Smb4KNetworkObject() { } Smb4KNetworkObject::NetworkItem Smb4KNetworkObject::type() const { return static_cast(d->type); } Smb4KNetworkObject::NetworkItem Smb4KNetworkObject::parentType() const { return static_cast(d->parentType); } void Smb4KNetworkObject::setType(NetworkItem type) { d->type = type; switch (type) { case Host: { d->parentType = Workgroup; break; } case Share: { d->parentType = Host; break; } default: { d->parentType = Network; break; } } emit changed(); } QString Smb4KNetworkObject::workgroupName() const { return d->workgroup; } void Smb4KNetworkObject::setWorkgroupName(const QString& name) { d->workgroup = name; emit changed(); } QString Smb4KNetworkObject::hostName() const { return d->url.host().toUpper(); } void Smb4KNetworkObject::setHostName(const QString& name) { d->url.setHost(name); emit changed(); } bool Smb4KNetworkObject::isMasterBrowser() const { return d->isMaster; } void Smb4KNetworkObject::setMasterBrowser(bool master) { if (type() == Host) { d->isMaster = master; emit changed(); } } QString Smb4KNetworkObject::shareName() const { // Since users might come up with very weird share names, // we are careful and do not use QString::remove("/"), but // only remove preceding and trailing slashes. QString share_name = d->url.path(); if (share_name.startsWith('/')) { - share_name = share_name.remove(0, 1); + share_name.remove(0, 1); } if (share_name.endsWith('/')) { - share_name = share_name.remove(share_name.size() - 1, 1); + share_name.remove(share_name.size() - 1, 1); } return share_name; } void Smb4KNetworkObject::setShareName(const QString& name) { d->url.setPath(name); emit changed(); } QString Smb4KNetworkObject::name() const { QString name; switch (d->type) { case Workgroup: { name = workgroupName(); break; } case Host: { name = hostName(); break; } case Share: { name = shareName(); break; } default: { break; } } return name; } QString Smb4KNetworkObject::comment() const { return d->comment; } void Smb4KNetworkObject::setComment(const QString& comment) { d->comment = comment; emit changed(); } QUrl Smb4KNetworkObject::url() const { return d->url; } QUrl Smb4KNetworkObject::parentUrl() const { // Do not use QUrl::upUrl() here, because it produces // an URL like this: smb://HOST/Share/../ and we do not // want that. QUrl parent_url; parent_url.setUrl("smb://"); switch (d->type) { case Host: { parent_url.setHost(d->workgroup); break; } case Share: { parent_url.setHost(d->url.host()); break; } default: { break; } } return parent_url; } void Smb4KNetworkObject::setUrl(const QUrl& url) { d->url = url; emit changed(); } bool Smb4KNetworkObject::isMounted() const { return d->mounted; } void Smb4KNetworkObject::setMounted(bool mounted) { d->mounted = mounted; emit changed(); } void Smb4KNetworkObject::update(Smb4KBasicNetworkItem *networkItem) { if (d->type == Workgroup && networkItem->type() == Smb4KGlobal::Workgroup) { Smb4KWorkgroup *workgroup = static_cast(networkItem); if (workgroup) { // Check that we update with the correct item. if (QString::compare(workgroupName(), workgroup->workgroupName(), Qt::CaseInsensitive) == 0) { d->workgroup = workgroup->workgroupName(); d->url = workgroup->url(); d->type = Workgroup; d->mounted = false; d->inaccessible = false; d->printer = false; } } } else if (d->type == Host && networkItem->type() == Smb4KGlobal::Host) { Smb4KHost *host = static_cast(networkItem); if (host) { // Check that we update with the correct item. if (QString::compare(workgroupName(), host->workgroupName(), Qt::CaseInsensitive) == 0 && QString::compare(hostName(), host->hostName(), Qt::CaseInsensitive) == 0) { d->workgroup = host->workgroupName(); d->url = host->url(); d->comment = host->comment(); d->type = Host; d->mounted = false; d->inaccessible = false; d->printer = false; } } } else if (d->type == Share && networkItem->type() == Smb4KGlobal::Share) { Smb4KShare *share = static_cast(networkItem); if (share) { // Check that we update with the correct item. if (QString::compare(workgroupName(), share->workgroupName(), Qt::CaseInsensitive) == 0 && QString::compare(hostName(), share->hostName(), Qt::CaseInsensitive) == 0 && QString::compare(shareName(), share->shareName(), Qt::CaseInsensitive) == 0) { d->workgroup = share->workgroupName(); d->url = share->url(); d->comment = share->comment(); d->type = Share; d->mounted = share->isMounted(); d->inaccessible = share->isInaccessible(); d->printer = share->isPrinter(); d->mountpoint.setUrl(share->path(), QUrl::TolerantMode); d->mountpoint.setScheme("file"); } } } else { d->type = Network; } emit changed(); } bool Smb4KNetworkObject::isPrinter() const { return d->printer; } void Smb4KNetworkObject::setPrinter(bool printer) { d->printer = printer; emit changed(); } QUrl Smb4KNetworkObject::mountpoint() const { return d->mountpoint; } void Smb4KNetworkObject::setMountpoint(const QUrl &mountpoint) { d->mountpoint = mountpoint; emit changed(); } bool Smb4KNetworkObject::isInaccessible() const { return (d->mounted && d->inaccessible); } void Smb4KNetworkObject::setInaccessible(bool inaccessible) { d->inaccessible = inaccessible; } diff --git a/smb4k/org.kde.smb4k.appdata.xml b/smb4k/org.kde.smb4k.appdata.xml index 2828521..36e3c38 100644 --- a/smb4k/org.kde.smb4k.appdata.xml +++ b/smb4k/org.kde.smb4k.appdata.xml @@ -1,795 +1,825 @@ org.kde.smb4k.desktop CC0-1.0 GPL-2.0+ and GFDL-1.2 Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K + Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K Smb4K xxSmb4Kxx Smb4K Smb4K Advanced Network Neighborhood Browser and Samba Share Mounting Utility Napredni pretraživač mrežnih susjeda i Samba dijeljeni ugrađeni uslužni program Explorador avançat del veïnatge de xarxa i utilitat per a muntar les comparticions de Samba Explorador avançat del veïnatge de xarxa i utilitat per a muntar les comparticions de Samba Pokročilý prohlížeč síťového okolí a nástroj na připojování úložišť samba Den avancerede browser til netværksnabolag og værktøj til montering af Samba-ressourcer Erweiterter Browser für die Netzwerkumgebung und Dienstprogramm zum Einhängen von Samba-Freigaben Προηγμένος περιηγητής τοπικού δικτύου και εργαλείο προσάρτησης κοινών πόρων Samba Advanced Network Neighborhood Browser and Samba Share Mounting Utility Navegador avanzado del entorno de red y utilidad para montar recursos compartidos de Samba + Täiustatud võrgunaabruse sirvija ja Samba jagatud ressursside ühendamise tööriist Edistynyt verkkoympäristöselain ja Samba-jakoliitostyökalu Navigateur avancé de voisinage réseau et utilitaire pour le montage des partages Samba Navegador avanzado da veciñanza de rede e ferramenta para montar comparticións de Samba Penelusur Jaringan Tetangga Terkemuka dan Utilitas Pengaitan Berbagi Samba Navigatore di risorse di rete avanzato e programma per montare le condivisioni Samba 고급 네트워크 환경 탐색 및 Samba 공유 마운트 유틸리티 Verwiedert Nettwarkümgeven-Kieker un Inhangwrktüüch för Samba-Freegaven Geavanceerde browser voor de netwerkomgeving en hulpmiddel voor aankoppelen van Samba shares Zaawansowana przeglądarka otoczenia sieciowego i narzędzie do podpinania udziałów Samby Navegador Avançado da Vizinhança na Rede e Utilitário de Montagem de Partilhas de Samba Navegador avançado da vizinhança da rede e utilitário de montagem de compartilhamentos Samba Диспетчер сетевого окружения и инструмент для подключения общих ресурсов с использованием протокола Samba Pokročilý prehliadač sieťového okolia a nástroj na pripojenie zdieľaní Samba Avancerad bläddrare för nätverksgrannskapet och verktyg för montering av delade Samba-resurser Gelişmiş Ağ Komşuları Tarayıcısı ve Samba Paylaşım Bağlama Programı Переглядач мережевого оточення з додатковими можливостями та засіб для монтування спільних ресурсів Samba xxAdvanced Network Neighborhood Browser and Samba Share Mounting Utilityxx 高级网络邻居浏览器和 Samba 共享挂载工具 進階網路芳鄰瀏覽器與 Samba 分享掛載工具

Smb4K is an advanced network neighborhood browser and Samba share mounting utility. It is based on the KDE Frameworks 5 and Samba's client library (libsmbclient). It scans your network neighborhood for all available workgroups, servers and shares and can mount all desired shares to your local file system.

El Smb4K és un explorador avançat del veïnatge de xarxa i una utilitat per a muntar les comparticions de Samba. està basat ens els Frameworks 5 del KDE i la biblioteca client del Samba (libsmbclient). Explora el vostre veïnatge de xarxa per a tots els grups de treball disponibles, servidors i comparticions, i pot muntar totes les comparticions desitjades al vostre sistema de fitxers local.

El Smb4K és un explorador avançat del veïnatge de xarxa i una utilitat per a muntar les comparticions de Samba. està basat ens els Frameworks 5 del KDE i la biblioteca client del Samba (libsmbclient). Explora el vostre veïnatge de xarxa per a tots els grups de treball disponibles, servidors i comparticions, i pot muntar totes les comparticions desitjades al vostre sistema de fitxers local.

Smb4K ist ein erweiterter Browser für die Netzwerkumgebung und Dienstprogramm für das Einhängen von Samba-Freigaben. Es basiert auf den KDE Frameworks 5 und der Samba-Bibliothek libsmbclient.Es durchsucht Ihre Netzwerkumgebung nach allen verfügbaren Arbeitsgruppen, Server und Freigaben und kann alle gewünschten Freigaben in Ihr lokales Dateisystem einhängen.

Smb4K is an advanced network neighbourhood browser and Samba share mounting utility. It is based on the KDE Frameworks 5 and Samba's client library (libsmbclient). It scans your network neighbourhood for all available workgroups, servers and shares and can mount all desired shares to your local file system.

Smb4K es un navegador avanzado del entorno de red y una utilidad de montaje de recursos compartidos Samba. Se basa en la infraestructura de KDE 5 y la biblioteca de clientes de Samba (libsmbclient). Escanea su entorno de red en busca de los grupos de trabajo, servidores y recursos compartidos disponibles y puede montar todos los recursos compartidos deseados en su sistema de archivos local.

+

Smb4K on täiustatud võrgunaabruse sirvija ja Samba jagatud ressursside ühendamise tööriist. Selle aluseks on KDE Frameworks 5 ja Samba kliendi teek (libsmbclient). See uurib sinu võrgunaabruses saadaolevate töögruppide, serverite ja jagatud ressursside leidumist ning võib kõik soovitud ressursid ühendada sinu kohaliku süsteemiga.

Smb4K on kehittynyt verkkoympäristöselain ja Samba-jakoliitostyökalu. Se pohjautuu KDE Frameworks 5:een ja Samban asiakaskirjastoon (libsmbclient). Se etsii verkkoympäristöstä työryhmiä, palvelimia ja jakoja ja osaa liittää halutut jaot paikalliseen tiedostojärjestelmään.

Smb4K est un navigateur de voisinage réseau avancé et un utilitaire de montage Samba. Il repose sur KDE Frameworks 5 et la librairie client de Samba (libsmbclient). Il balaye votre voisinage réseau à la recherche des groupes de travail, serveurs et partages disponibles et peut afficher tous les partages désirés sur votre système de fichiers local.

Smb4K é un navegador avanzado da veciñanza de rede e unha ferramenta para montar comparticións de Samba. Está baseada na versión 5 das infraestruturas de KDE e a biblioteca de cliente de Samba (libsmbclient). Examina a veciñanza de rede en busca de grupos de traballo, servidores e comparticións dispoñíbeis, e pode montar todas as comparticións que queira no seu sistema de ficheiros local.

Smb4K adalah sebuah penelusur pengaitan berbagi Samba. Ini berbasiskan pada KDE Frameworks 5 dan pustaka klien Samba (libsmbclient). Ini memindaikan jaringan tetanggamu untuk semua workgroup-workgroup, server-server, dan bebagi-bebagi yang tersedia dan bisa mengaitkan semua berbagi yang diinginkan ke sistem file lokalmu.

Smb4K è un navigatore di risorse di rete avanzato e un programma per montare le condivisioni Samba. È basato su KDE Frameworks 5 e sulla libreria client di Samba (libsmbclient). Analizza le risorse di rete per trovare tutti i gruppi di lavoro disponibili, i server e le condivisioni, e può montare tutte le condivisioni che desideri nel tuo file system locale.

Smb4K는 고급 네트워크 환경 탐색기 및 Samba 공유 마운트 도구입니다. KDE 프레임워크 5와 Samba 클라이언트 라이브러리(libsmbclient)를 사용합니다. 로컬 네트워크에 있는 작업 그룹, 서버, 공유 자원을 탐색할 수 있으며 로컬 파일 시스템에 공유를 마운트할 수 있습니다.

Smb4K is een geavanceerde browser voor de netwerkomgeving en hulpmiddel voor aankoppelen van Samba shares. Het is gebaseerd op het KDE Frameworks 5 en de clientbibliotheek (libsmbclient). Het scant uw netwerkomgeving voor alle beschikbare werkgroepen, servers en shares en kan alle gewenste shares aankoppelen aan uw lokale bestandssysteem.

Smb4K jest zaawansowaną przeglądarką otoczenia sieciowego i narzędziem do podpinania udziałów Samby. Jest oparta na Szkieletach KDE 5 i bibliotece klienckiej Samby (libsmbclient). Przegląda twoje otoczenie sieciowe w poszukiwaniu wszystkich dostępnych grup roboczych, serwerów i udziałów, żeby umożliwić podpięcie wszystkich tych udziałów w lokalnym systemie plików.

O Smb4K é um navegador avançado da vizinhança da rede e um utilitário de montagem de partilhas do Samba. Baseia-se nas Plataformas do KDE 5 e na biblioteca-cliente do Samba (libsmbclient). Ele sonda a sua vizinhança da rede à procura de todos os grupos de trabalho, servidores e partilhas disponíveis, podendo montar todas as partilhas desejadas no seu sistema de ficheiros local.

Smb4K é um navegador avançado da vizinhança da rede e um utilitário de montagem de compartilhamentos do Samba. Ele tem como base o KDE Frameworks 5 e a biblioteca-cliente do Samba (libsmbclient). Verifica a vizinhança da rede à procura de todos os grupos de trabalho, servidores e compartilhamentos disponíveis, podendo montar todos os compartilhamentos desejados no seu sistema de arquivos local.

Smb4K je pokročilý prehliadač siete a nástroj na pripájanie Samba zdieľaní pre softvérovú kompiláciu KDE. Prehľadá vašu sieť, nájde všetky dostupné pracovné skupiny, servery a zdieľania a môže pripojiť všetky želané zdieľania do vášho miestneho súborového systému.

Smb4K är en avancerad bläddrare för nätverksgrannskapet och verktyg för montering av delade Samba-kataloger. Den är baserad på KDE:s ramverk 5 och Sambas klientbibliotek (libsmbclient). Den söker igenom ditt nätverksgrannskap för att hitta alla tillgängliga arbetsgrupper, servrar och delade kataloger, och kan montera alla delade kataloger som önskas i det lokala filsystemet.

Smb4K програма з розширеними можливостями для перегляду мережевого середовища та монтування спільних ресурсів Samba. Програму засновано на KDE Frameworks 5 та клієнтській бібліотеці Samba (libsmbclient). Програма сканує мережеве оточення і шукає доступні робочі групи, сервери і спільні ресурси. Вона може монтувати усі бажані спільні ресурси у вашій локальній файловій системі.

xxSmb4K is an advanced network neighborhood browser and Samba share mounting utility. It is based on the KDE Frameworks 5 and Samba's client library (libsmbclient). It scans your network neighborhood for all available workgroups, servers and shares and can mount all desired shares to your local file system.xx

Smb4K 是一个高级的网络邻居浏览器和 Samba 共享挂载工具。它基于 KDE 框架 5 和 Samba 客户端库 (libsmbclient)。它会扫描您的网络邻居,发现所有可用的工作组,服务器和共享,并挂载所有想要共享的内容到您的文件系统。

Smb4K is based on Samba's client library. Its purpose is to provide a program that is easy to use and has as many features as possible.

El Smb4K està basat en la biblioteca client del Samba. El seu propòsit és proporcionar un programa de fàcil ús i contenir tantes característiques com sigui possible.

El Smb4K està basat en la biblioteca client del Samba. El seu propòsit és proporcionar un programa de fàcil ús i contindre tantes característiques com siga possible.

Smb4K benutzt die Samba-Bibliothek, um ein Programm mit leichter Handhabung und möglichst vielen Funktionen zur Verfügung zu stellen.

Smb4K is based on Samba's client library. Its purpose is to provide a program that is easy to use and has as many features as possible.

Smb4K se basa en la biblioteca de clientes de Samba. Su propósito es proporcionar un programa que sea fácil de usar y tenga tantas prestaciones como sea posible.

+

Smb4K aluseks on Samba kliendi teek. Eesmärk on pakkuda rakendust, mis oleks hõlpsalt kasutatav ja võimalikult paljude võimalustega.

Smb4K perustuu Samban asiakaskirjastoon. Se pyrkii tarjoamaan ohjelman, joka on sekä helppokäyttöinen että mahdollisimman monipuolinen.

Smb4K utilise la librairie client de Samba. Son objectif est de fournir un programme facile à utiliser et fournissant le plus de fonctionnalités possibles.

Smb4K está baseado na biblioteca de cliente de Samba. O seu obxectivo é o de fornecer un programa fácil de usar que forneza tantas funcionalidades como sexa posíbel.

Smb4K adalah berbasiskan pada pustaka klien Samba. Tujuannya adalah untuk menyediakan sebuah program yang mudah digunakan dan memiliki fitur sebanyak mungkin.

Smb4K è basato sulla libreria client di Samba. Il suo scopo è quello di fornire un programma che sia facile da usare e che abbia più funzionalità possibili.

Smb4K는 Samba 클라이언트 라이브러리를 사용합니다. 사용하기 편하면서도 기능이 풍부한 프로그램을 목적으로 합니다.

Smb4K is gebaseerd op de client-bibliotheek van Samba. Het doel is een programma te bieden dat gemakkelijk is te gebruiken to use en zoveel mogelijk functies heeft.

Smb4K jest oparte na bibliotece klienta Samba. Jego zadaniem jest dostarczenie łatwego w użyciu programu jednocześnie posiadającego tak wiele możliwości jaka tylko jest możliwa.

O Smb4K baseia-se na biblioteca-cliente do Samba. O seu objectivo é oferecer um programa que seja simples de usar e tenha tantas funcionalidades quantas possíveis.

O Smb4K tem como base a biblioteca-cliente do Samba. Seu objetivo é oferecer um programa que seja simples de usar e tenha todas as funcionalidades possíveis.

Smb4K používa programy softvérového balíka Samba. Jeho cieľom je poskytnúť program, ktorý sa ľahko používa a obsahuje toľko funkcií, ako je len možné.

Smb4K är baserat på Sambas klientbibliotek. Dess syfte är att tillhandahålla ett program som är enkelt att använda och har så många funktioner som möjligt.

Smb4K засновано на клієнтській бібліотеці Samba. Її призначено для спрощення користування системою, вона має якомога ширший спектр можливостей.

xxSmb4K is based on Samba's client library. Its purpose is to provide a program that is easy to use and has as many features as possible.xx

Smb4K 基于 Samba 的客户端库。它的目标是易于使用且功能丰富。

Features:

Svojstva:

Característiques:

Característiques:

Vlastnosti:

Funktioner:

Funktionen:

Χαρακτηριστικά:

Features:

Características:

+

Omadused:

Ominaisuuksia:

Fonctionnalité :

Funcionalidades:

Fitur:

Funzionalità:

기능:

Markmalen:

Mogelijkheden:

Możliwości:

Funcionalidades:

Funcionalidades:

Возможности:

Funkcie:

Funktioner:

Özellikler:

Можливості:

xxFeatures:xx

功能:

功能:

  • Scanning for (active) workgroups, hosts, and shares
  • Pretraživanje (aktivnih) radnih grupa, hostova i razmjena
  • Escaneig per a grups de treball (actius), servidors i comparticions
  • Escaneig per a grups de treball (actius), servidors i comparticions
  • Suche nach (aktiven) Arbeitsgruppen, Rechnern und Freigaben
  • Σαρώνει για (ενεργές) ομάδες εργασίας, υπολογιστές και κοινούς πόρους
  • Scanning for (active) workgroups, hosts, and shares
  • Escaneo de grupos de trabajo, servidores y recursos compartidos (activos)
  • +
  • (Aktiivsete) töögruppide, serverite ja jagatud ressursside väljaselgitamine
  • (Aktiivisten) työryhmien, verkkokoneiden ja -jakojen etsintä
  • Balayage des groupes de travail (actifs), hôtes et partages
  • Buscando grupos de traballo (activos), servidores e comparticións
  • Pemindaian untuk workgroup, host, dan berbagi (yang aktif)
  • Ricerca di gruppi di lavoro, host e condivisioni (attivi)
  • (활성) 작업 그룹, 호스트, 공유 검색
  • Kieken na (aktiev) Arbeitkoppeln, Reekners un Freegaven
  • Scannen voor (actieve) werkgroepen, hosts en shares
  • Przeszukiwanie (aktywnych) grup roboczych, gospodarzy oraz udziałów
  • Pesquisar pelos grupos de trabalho, máquinas e partilhas - activos ou não
  • Pesquisar por grupos de trabalho, máquinas e compartilhamentos (ativos)
  • Prehľadávanie aktívnych pracovných skupín, hostiteľov a zdieľaní
  • Sökning efter (aktiva) arbetsgrupper, värddatorer och delade resurser
  • Çalışma gruplarını (etkin), makineleri ve paylaşımları tarama
  • Виявлення (активних) робочих груп, вузлів та спільних ресурсів.
  • xxScanning for (active) workgroups, hosts, and sharesxx
  • 扫描(活动)工作组、主机和共享
  • 掃描(活躍的)工作群組、主機與分享
  • Support of the CIFS (Linux) and SMBFS (FreeBSD) file system
  • Podrška za CIFS (Linux) i SMBFS (FreeBSD) sistem datoteka
  • Implementació dels sistemes de fitxers CIFS (Linux) i SMBFS (FreeBSD)
  • Implementació dels sistemes de fitxers CIFS (Linux) i SMBFS (FreeBSD)
  • Unterstützung für CIFS-Dateisysteme unter Linux und SMBFS-Dateisysteme unter FreeBSD
  • Υποστηρίζει τα συστήματα αρχείων CIFS (Linux) και SMBFS (FreeBSD)
  • Support of the CIFS (Linux) and SMBFS (FreeBSD) file system
  • Admite los sistemas de archivo CIFS (Linux) y SMBFS (FreeBSD)
  • +
  • Failisüsteemide CIFS (Linux) ja SMBFS (FreeBSD) toetus
  • CIFS- (Linux) ja SMBFS-tiedostojärjestelmien (FreeBSD) tuki
  • Prise en charge des systèmes de fichiers CIFS (Linux) et SMBFS (FreeBSD)
  • É compatíbel cos sistemas de ficheiros CIFS (Linux) e SMBFS (FreeBSD).
  • Dukungan sistem file CIFS (Linux) dan SMBFS (FreeBSD)
  • Supporto dei file system CIFS (Linux) e SMBFS (FreeBSD)
  • CIFS(리눅스) 및 SMBFS(FreeBSD) 파일 시스템 지원
  • Ünnerstütt dat CIFS- (op Linux) un SMBFS-Dateisysteem (op FreeBSD)
  • Ondersteuning van het CIFS (Linux) en SMBFS (FreeBSD) bestandssysteem
  • Obsługa systemu plików CIFS (Linux) oraz SMBFS (FreeBSD)
  • Suporte para os sistemas de ficheiros CIFS (Linux) e SMBFS (FreeBSD)
  • Suporte para os sistemas de arquivos CIFS (Linux) e SMBFS (FreeBSD)
  • Podpora súborových systémov CIFS (Linux) a SMBFS (FreeBSD)
  • Stöd för filsystemen CIFS (Linux) och SMBFS (FreeBSD)
  • CIFS (Linux) ve SMBFS (FreeBSD) dosya sistemi desteği
  • Підтримка файлових систем CIFS (Linux) та SMBFS (FreeBSD).
  • xxSupport of the CIFS (Linux) and SMBFS (FreeBSD) file systemxx
  • 支持 CIFS (Linux) 和 SMBFS (FreeBSD) 文件系统
  • 支援 CIFS (Linux) 與 SMBFS (FreeBSD) 檔案系統
  • Mounting and unmounting of shares
  • Namještanje i razmještanje razmjena
  • El muntatge i desmuntatge de les comparticions
  • El muntatge i desmuntatge de les comparticions
  • Ein- und Aushängen von Freigaben
  • Προσαρτά και απομακρύνει κοινούς πόρους
  • Mounting and unmounting of shares
  • Montaje y desmontaje de recursos compartidos
  • +
  • Jagatud ressursside ühendamine ja lahutamine
  • Jakojen liittäminen ja irrottaminen
  • Montage et démontage des partages
  • Permite montar e desmontar comparticións.
  • Pengaitan dan pelepaskaitan berbagi
  • Montaggio e smontaggio delle condivisioni
  • 공유 마운트 및 마운트 해제
  • Freegaven in- un uthangen
  • Aan- en afkoppelen van gedeelde mappen
  • Podpinanie i odpinanie udziałów
  • Montagem e desmontagem de partilhas
  • Montagem e desmontagem de compartilhamentos
  • Pripájanie a odpájanie zdieľaní
  • Montera och avmontera delade resurser
  • Paylaşımları bağlama ve ayırma
  • Монтування і демонтування спільних ресурсів.
  • xxMounting and unmounting of sharesxx
  • 挂载和卸载共享
  • 掛載與解除掛載分享
  • Access to the files of a mounted share using a file manager or terminal
  • Pristup datotekama namještene razmjene koristeći upravitelj datotekom ili terminal
  • Accés als fitxers d'una compartició muntada emprant un gestor de fitxers o terminal
  • Accés als fitxers d'una compartició muntada emprant un gestor de fitxers o terminal
  • Zugriff auf die Dateien einer eingehängten Freigabe mit einem Dateiverwaltungsprogramm oder einem Terminal
  • Παρέχει πρόσβαση στα αρχεία ενός προσαρτημένου κοινού πόρου με χρήση του διαχειριστή αρχείων ή του τερματικού
  • Access to the files of a mounted share using a file manager or terminal
  • Acceso a los archivos de un recurso compartido montado utilizando un gestor de archivos o un terminal
  • +
  • Ligipääs ühendatud jagatud ressursi failidele failihalduri või terminali abil
  • Pääsy liitetyn jaon tiedostoihin tiedostonhallinnasta tai päätteestä
  • Accès aux fichiers d'un partage à travers un gestionnaire de fichiers ou un terminal
  • Permite acceder aos ficheiros dunha compartición montada usando un xestor de ficheiros ou un terminal.
  • Akses ke file pada berbagi yang dikaitkan menggunakan pengelola file atau terminal
  • Accesso ai file di una condivisione montata usando un gestore dei file o un terminale
  • 파일 관리자나 터미널을 통해서 마운트된 공유 내 파일에 접근
  • Togriep op de Dateien binnen en inhangt Freegaav över Dateipleger oder Konsool
  • Toegang tot de bestanden van een aangekoppeld gedeelde map met gebruik van een bestandsbeheerder of terminal
  • Dostęp do plików podpiętego udziału przy użyciu programu do zarządzania plikami lub terminalu
  • Aceder aos ficheiros de uma partilha montada com um gestor de ficheiros ou terminal
  • Acessar aos arquivos de um compartilhamento montado com um gerenciador de arquivos ou terminal
  • Prístup k súborom pripojených zdieľaní pomocou správcu súborov alebo terminálu
  • Åtkomst av filer på en monterad delad resurs med en filhanterare eller terminal
  • Bağlanmış paylaşımın dosyalarına, dosya yöneticisi veya uç birim üzerinden erişim
  • Доступ до файлів змонтованого спільного ресурсу за допомогою програми для керування файлами або термінала.
  • xxAccess to the files of a mounted share using a file manager or terminalxx
  • 使用檔案管理員或終端機存取已掛載分享的檔案
  • Auto-detection of external mounts and unmounts
  • Auto-detekcija vanjskih namještanja i razmještanja
  • Detecció automàtica de muntatges i desmuntatges externs
  • Detecció automàtica de muntatges i desmuntatges externs
  • Automatische Erkennung externer Medien, die ein- oder ausgehängt werden
  • Αυτόματος εντοπισμός εξωτερικών προσαρτήσεων και απομακρύνσεων
  • Auto-detection of external mounts and unmounts
  • Detección automática de montajes y desmontajes externos
  • +
  • Väliste ühendamiste ja lahutamiste automaatne tuvastamine
  • Ulkoisten liitosten ja irrotusten automaattinen havaitseminen
  • Auto-détection des montages et démontages externes
  • Pode detectar automaticamente montaxes e desmontaxes externos.
  • Auto deteksi kait dan lepaskait eksternal
  • Rilevazione automatica di montaggi o di smontaggi esterni
  • 외부 마운트 및 마운트 해제 자동 감지
  • Automaatsch Opdecken vun In- un Uthangen vun buten ut
  • Autodetectie van externe aan- en afkoppelingen
  • Samoczynne wykrywanie zewnętrznych działań podpinania i odpinania
  • Detectar automaticamente as montagens e desmontagens externas
  • Detectar automaticamente as montagens e desmontagens externas
  • Automatická detekcia externých pripojení a odpojení
  • Automatiskt detektion av externa monteringar och avmonteringar
  • Harici bağlamaların otomatik algılanması ve ayırılması
  • Автоматичне виявлення зовнішніх дій з монтування або демонтування.
  • xxAuto-detection of external mounts and unmountsxx
  • 自動偵測外部掛載與解除掛載
  • Remounting of previously used shares on program start
  • Ponovno namještanje prethodno korištenih razmjena na početak programa
  • Tornar a muntar comparticions emprades anteriorment en iniciar el programa
  • Tornar a muntar comparticions emprades anteriorment en iniciar el programa
  • Erneutes Einhängen von vorher benutzten Freigaben beim Start des Programms
  • Αναπροσαρτά κοινούς πόρους προηγούμενης χρήσης στην εκκίνηση του προγράμματος
  • Remounting of previously used shares on program start
  • Vuelve a montar los recursos compartidos utilizados anteriormente al iniciar el programa
  • +
  • Varem kasutatud jagatud ressursside taasühendamine rakenduse käivitamisel
  • Aiemmin käytettyjen jakojen uudelleenliittäminen ohjelman käynnistyessä
  • Remontage de partages précédemment utilisés lors du démarrage du programme
  • Pode volver a montar comparticións usadas previamente ao iniciar o programa.
  • Mengaitkan-ulang berbagi-berbagi yang digunakan sebelumnya saat memulai program
  • Rimontaggio all'avvio del programma di una condivisione usata in precedenza
  • 프로그램을 시작할 때 이전에 사용한 공유 다시 마운트
  • Wedderinhangen vun al vördem bruukt Freegaven bi Programmstart
  • Recent gebruikte gedeelde mappen opnieuw tijdens het laden van het programma aankoppelen
  • Podpinanie poprzednio podpiętych udziałów przy starcie
  • Voltar a montar as partilhas usadas anteriormente ao iniciar o programa
  • Remontar os compartilhamentos usados anteriormente ao iniciar o programa
  • Znovupripojenie predtým použitých zdieľaní pri spustení programu
  • Montering av tidigare använda delade resurser igen vid programstart
  • Program başlangıcında, daha önce kullanılmış paylaşımları yeniden bağlama
  • Повторне монтування раніше використаних спільних ресурсів під час запуску програми.
  • xxRemounting of previously used shares on program startxx
  • 在程式啟動時重新掛載先前使用過的分享
  • Miscellaneous infos about remote network items and mounted shares
  • Raznovrsne informacije o udaljenim mrežnim stavkama i namještenim razmjenama
  • Informacions diverses sobre elements de xarxa remots i les comparticions muntades
  • Informacions diverses sobre elements de xarxa remots i les comparticions muntades
  • Verschiedene Informationen über Netzwerke auf anderen Rechnern und eingehängte Freigaben
  • Διάφορες πληροφορίες για απομακρυσμένα δικτυακά αντικείμενα και προσαρτημένους κοινούς πόρους
  • Miscellaneous information about remote network items and mounted shares
  • Información variada sobre los elementos remotos de la red y los recursos compartidos montados
  • +
  • Mitmesugune teave võrguelementide ja ühendatud jagatud ressursside kohta
  • Erilaiset tiedot etäverkkokohteista ja liitetyistä jaoista
  • Infos diverses sur les éléments réseau distants et les partages montés
  • Fornece información variada sobre elementos remotos da rede e comparticións montadas.
  • Beraneka info tentang item-item jaringan jarak jauh dan berbagi-berbagi yang dikaitkan
  • Informazioni varie sugli elementi di rete remoti e sulle condivisioni montate
  • 원격 네트워크 항목과 마운트된 공유에 대한 정보 제공
  • En Reeg verscheden Informatschonen över Indrääg binnen Nettwarken un inhangt Freegaven
  • Allerlei informatie over netwerk-items en aangekoppelde shares
  • Różne informacje o elementach w zdalnej sieci i podpiętych udziałach
  • Diversas informações acerca dos itens de rede remotos e das partilhas montadas
  • Diversas informações sobre os itens de rede remotos e dos compartilhamentos montados
  • Rôzne informácie o vzdialených sieťových položkách a pripojených zdieľaniach
  • Diverse information om fjärrobjekt i nätverket och monterade delade resurser
  • Uzak ağ ögeleri ve bağlı paylaşımlar hakkında çeşitli bilgiler
  • Показ різноманітних відомостей щодо віддалених елементів мережі та змонтованих спільних ресурсів.
  • xxMiscellaneous infos about remote network items and mounted sharesxx
  • 關於遠端網路項目與已掛載的分享的其他資訊
  • Network search
  • Pretraga mreže
  • Cerca a la xarxa
  • Cerca a la xarxa
  • Prohledání sítě
  • Netværkssøgning
  • Netzwerksuche
  • Αναζήτηση στο δίκτυο
  • Network search
  • Búsqueda en la red
  • +
  • Võrguotsing
  • Verkkohaku
  • Recherche sur le réseau
  • Permite realizar buscas na rede.
  • Pencarian jaringan
  • Ricerca in rete
  • 네트워크 검색
  • Nettwarksöök
  • Netwerk doorzoeken
  • Wyszukiwanie w sieci
  • Pesquisa na rede
  • Pesquisa na rede
  • Поиск по сети
  • Prehľadávanie siete
  • Nätverkssökning
  • Ağ arama
  • Мережевий пошук.
  • xxNetwork searchxx
  • 网络搜索
  • 網路搜尋
  • Preview of the contents of a remote share
  • Vista prèvia del contingut d'una compartició remota
  • Vista prèvia del contingut d'una compartició remota
  • Náhled obsahu vzdáleného úložiště
  • Vorschau des Inhalts einer entfernten Freigabe
  • Preview of the contents of a remote share
  • Vista previa del contenido de un recurso compartido remoto
  • +
  • Jagatud võrguressursi sisu eelvaatlus
  • Etäjaon sisällön esikatselu
  • Aperçu des contenus d'un partage distant
  • Permite obter unha vista previa dos contidos dunha compartición remota
  • Pratinjaunya konten dari berbagi jarak jauh
  • Anteprima dei contenuti di una condivisione remota
  • 원격 공유 내용 미리 보기
  • Voorbeeldweergave van de inhoud van een share op afstand
  • Podgląd treści zdalnego udziału
  • Antevisão do conteúdo de uma partilha remota
  • Visualização do conteúdo de um compartilhamento remoto
  • Náhľad obsahu vzdialeného zdieľania
  • Förhandsgranskning av innehållet i en delad resurs
  • Попередній перегляд даних із віддаленого спільного ресурсу
  • xxPreview of the contents of a remote sharexx
  • 远程共享内容的预览
  • 預覽遠端分享的內容
  • Default login
  • Početna prijava
  • Inici de sessió predeterminat
  • Inici de sessió predeterminat
  • Výchozí přihlášení
  • Standard-login
  • Standardanmeldung
  • Προκαθορισμένη σύνδεση
  • Default login
  • Inicio de sesión predeterminado
  • +
  • Vaikimisi sisselogimine
  • Oletuskirjautuminen
  • Identificateur de connexion par défaut
  • Permite configurar credenciais predeterminadas de acceso.
  • Login baku
  • Nome utente predefinito
  • 기본 로그인
  • Standardanmellen
  • Standaard aanmelden
  • Domyślny użytkownik
  • Conta por omissão
  • Conta padrão
  • Štandardné prihlásenie
  • Standardinloggning
  • Varsayılan giriş
  • Типова реєстрація.
  • xxDefault loginxx
  • 默认登录
  • 預設登入
  • Special handling of homes shares
  • Posebno korištenje početnih razmjena
  • Gestió especial per a les comparticions personals
  • Gestió especial per a les comparticions personals
  • Besondere Behandlung freigegebener persönlicher Ordner
  • Ειδικός χειρισμός πόρων περιοχών χρηστών
  • Special handling of homes shares
  • Manejo especial de los directorios personales compartidos
  • +
  • Jagatud ressursside kogukataloogide spetsiaalne kohtlemine
  • Kotikansiojakojen erityiskäsittely
  • Prise en charge spéciale des répertoires personnels partagés
  • Xestiona de forma especial as particións de cartafoles persoais.
  • Penanganan spesial pemberbagian beranda
  • Gestione speciale delle condivisioni delle home
  • 홈 공유 특수 처리
  • Besünner Hanteren vun Tohuus-Freegaven
  • Speciale behandeling van shares van hoofdmappen
  • Wyjątkowa obsługa udziałów w postaci katalogów domowych
  • Tratamento especial para as partilhas de áreas pessoais
  • Tratamento especial para os compartilhamentos de áreas pessoais
  • Špeciálne zaobchádzanie so zdieľaniami home
  • Särskild hantering av delade hemkataloger
  • Ev paylaşımlarına özel işlemler
  • Особливі інструменти роботи з домашніми спільними ресурсами.
  • xxSpecial handling of homes sharesxx
  • 家目錄分享的特別處理
  • Ability to bookmark favorite shares
  • Sposobnost bilježenja omiljenih razmjena
  • La possibilitat d'apuntar les comparticions a les adreces d'interès
  • La possibilitat d'apuntar les comparticions a les adreces d'interés
  • Lesezeichen für bevorzugte Freigaben
  • Δυνατότητα αποθήκευσης πόρων σε σελιδοδείκτες
  • Ability to bookmark favorite shares
  • Capacidad para poner como marcadores los recursos compartidos favoritos
  • +
  • Võimalus lisada lemmikust jagatud ressursse järjehoidjatesse
  • Mahdollisuus tehdä suosikkijaoista kirjanmerkkejä
  • Possibilité d'avoir des partages favoris
  • Fornece un sistema de marcadores para gardar comparticións.
  • Kemampuan untuk memarkahi berbagi-berbagi favorit
  • Possibilità di aggiungere le condivisioni preferite nei segnalibri
  • 자주 찾는 공유 책갈피 추가
  • Leestekens för vörtrocken Freegaven
  • Vermogen om van favoriete shares een bladwijzer te maken
  • Możliwość nadania zakładki ulubionym udziałom
  • A capacidade de marcar as partilhas como favoritos
  • Capacidade de marcar os compartilhamentos como favoritos
  • Podpora záložiek zdieľaní
  • Möjlighet att lägga till bokmärken för favoritresurser
  • Favori yer imi paylaşımları yeteneği
  • Можливість створення закладок для потрібних вам спільних ресурсів.
  • xxAbility to bookmark favorite sharesxx
  • 將最愛的分享加入書籤的能力
  • System tray widget
  • Kontrola za poslužavnik sistema
  • Un estri per a la safata del sistema
  • Un giny («widget») per a la safata del sistema
  • Symbol im Systemabschnitt der Kontrollleiste
  • Γραφικό συστατικό πλαισίου συστήματος
  • System tray widget
  • Elemento gráfico de la bandeja del sistema
  • +
  • Süsteemisalve vidin
  • Ilmoitusaluekuvake
  • Composant graphique dans la barre d'état
  • Fornece un trebello na área de notificación.
  • Widget system tray
  • Oggetto per il vassoio di sistema
  • 시스템 트레이 위젯
  • Systeemafsnitt-Lüttprogramm
  • Widget in systeemvak
  • Element interfejsu w tacce systemowej
  • Item gráfico da bandeja do sistema
  • Item da área de notificação
  • Widget v systémovej lište
  • Grafisk komponent i systembrickan
  • Sistem çekmecesi programcığı
  • Віджет системного лотка.
  • xxSystem tray widgetxx
  • 系统托盘小部件
  • 系統匣小工具
  • Support of advanced mount options
  • Implementació per a les opcions avançades de muntatge
  • Implementació per a les opcions avançades de muntatge
  • Podpora pokročilých možností připojení
  • Unterstützung der erweiterten Einstellungen zum Einhängen
  • Support of advanced mount options
  • Apoyo para opciones avanzadas de montaje
  • +
  • Rohkete ühendamisvalikute toetus
  • Lisäliitosasetusten tuki
  • Prise en charge des options de montage avancées
  • Permite usar opcións avanzadas de montaxe
  • Dukungan opsi kait tingkat-lanjut
  • Supporto alle opzioni avanzate di montaggio
  • 고급 마운트 옵션 지원
  • Ondersteuning van geavanceerde opties voor aankoppelen
  • Obsługa zaawansowanych możliwości podpinania
  • Suporte para as opções avançadas de montagem
  • Suporte para opções de montagem avançadas
  • Podpora pokročilých volieb pripojenia
  • Stöd för avancerade monteringsalternativ
  • Підтримка додаткових параметрів монтування
  • xxSupport of advanced mount optionsxx
  • 支持高级挂载选项
  • 支援進階的掛載選項
  • Support of printer shares
  • Podrška za razmjene štampača
  • Implementació per a les impressores compartides
  • Implementació per a les impressores compartides
  • Unterstützung für Drucker-Freigaben
  • Υποστήριξη κοινών πόρων εκτυπωτών
  • Support of printer shares
  • Apoyo de impresoras compartidas
  • +
  • Jagatud printeriressursside toetus
  • Tulostinjakojen tuki
  • Prise en charge des imprimantes partagées
  • Permite usar impresoras compartidas.
  • Dukungan berbagi pencetak
  • Supporto alla condivisione di stampanti
  • 프린터 공유 지원
  • Ünnerstütten vun Druckerfreegaven
  • Ondersteuning van gedeelde printers
  • Obsługa drukarek sieciowych
  • Suporte para as partilhas de impressoras
  • Suporte para os compartilhamentos de impressoras
  • Podpora zdieľania tlačiarní
  • Stöd för delade skrivare
  • Yazıcı paylaşımları desteği
  • Підтримка спільних принтерів.
  • xxSupport of printer sharesxx
  • 支持打印机共享
  • 印表機分享的支援
  • KWallet support
  • KWallet podrška
  • Implementació per al KWallet
  • Implementació per al KWallet
  • Podpora KWallet
  • Unterstützung für KWallet
  • Υποστήριξη KWallet
  • KWallet support
  • Apoyo para KWallet
  • +
  • KDE turvalaeka toetus
  • KWallet-tuki
  • Prise en charge de KWallet
  • Compatibilidade con KWallet.
  • Dukungan KWallet
  • Supporto a KWallet
  • KWallet 지원
  • KWallet-Ünnerstütten
  • Ondersteuning van KWallet
  • Obsługa KPortfela
  • Suporte para a KWallet
  • Suporte para o KWallet
  • Podpora KWallet
  • Stöd för plånboken
  • KWallet desteği
  • Підтримка роботи з KWallet.
  • xxKWallet supportxx
  • KWallet 支持
  • 支援 KWallet
  • Synchronization of a remote share with a local copy and vice versa
  • Sinhronizacija udaljenih razmjena sa lokalnom kopijom i obrnuto
  • Sincronització d'una compartició remota amb una còpia local i viceversa
  • Sincronització d'una compartició remota amb una còpia local i viceversa
  • Abgleich einer entfernten Freigabe mit einer lokalen Kopie und umgekehrt
  • Συγχρονισμός απομακρυσμένου πόρου με τοπικό αντίγραφο και αντίστροφα
  • Synchronisation of a remote share with a local copy and vice versa
  • Sincronización de un recurso compartido remoto con una copia local y viceversa
  • +
  • Võrguressursi sünkroonimine kohaliku koopiaga ja vastupidi
  • Etäjakojen synkronointi paikallisen kopion kanssa ja päinvastoin
  • Synchronisation d'un partage distant avec une copie locale et vice-versa
  • Permite sincronizar comparticións remotas con copias locais en ambos sentidos.
  • Sinkronisasi berbagi jarak jauh dengan salinan lokal dan sebaliknya
  • Sincronizzazione di una condivisione remota con una copia locale e viceversa
  • 원격 공유와 로컬 사본 양방향 동기화
  • Synkroniseren vun en feern Freegaav mit en lokaal Kopie, un ok ümdreiht
  • Synchronisatie van een share op afstand met een lokale kopie en vice versa
  • Synchronizacja zdalnego udziału z lokalną kopią i na odwrót
  • Sincronização de uma partilha remota com uma cópia local e vice-versa
  • Sincronização de um compartilhamento remoto com uma cópia local e vice-versa
  • Synchronizácia vzdialených zdieľaní s miestnou kópiou a naopak
  • Synkronisering av delade fjärresurser med en lokal kopia och tvärtom
  • Uzak paylaşımın yerel bir kopya ile eşitlenmesi veya tam tesi
  • Синхронізація віддаленого спільного ресурсу з локальною копією і навпаки.
  • xxSynchronization of a remote share with a local copy and vice versaxx
  • 將遠端分享與本機複本同步的能力,反過來也可以
  • Ability to define custom options for individual servers and shares
  • Sposobnost definisanja prilagođenih opcija za individualne servere i razmjene
  • La capacitat per a definir opcions personalitzades individuals per a servidors i comparticions
  • La capacitat per a definir opcions personalitzades individuals per a servidors i comparticions
  • Fähigkeit zur Definition von benutzerdefinierten Einstellungen für einzelne Server und Freigaben.
  • Δυνατότητα καθορισμού προσαρμοσμένων επιλογών για ξεχωριστούς εξυπηρετητές και κοινούς πόρους
  • Ability to define custom options for individual servers and shares
  • Capacidad para definir opciones personalizadas para servidores y recursos compartidos individuales
  • +
  • Võimalus määrata kohandatud valikuid konkreetsetele serveritele ja jagatud ressurssidele
  • Mahdollisuus mukauttaa määräpalvelinten ja -jakojen asetuksia
  • Possibilité de définir des options personnalisées pour des serveurs et des partages individuels
  • Permite definir configuracións personalizadas para servidores e comparticións concretas.
  • Kemampuan untuk menentukan opsi kustom untuk berbagi dan server individu
  • Capacità di definire opzioni personalizzate per server individuali e per le condivisioni
  • 서버 및 공유 자원별 설정
  • Lett Di Dien egen Optschonen för enkelte Servers un Freegaven fastleggen
  • Vermogen om eigen opties voor individuele servers en shares te definiëren
  • Możliwość określenia osobnych ustawień dla poszczególnych serwerów i udziałów
  • A capacidade de definir opções personalizadas para os servidores e partilhas individuais
  • Capacidade de definir opções personalizadas para os servidores e compartilhamentos individuais
  • Možnosť definovať vlastné voľby pre individuálne servery a zdieľania
  • Möjlighet att definiera egna alternativ för enskilda servrar och delade resurser
  • Kişisel sunucular ve paylaşımlar için özel seçenekleri tanımlama yeteneği
  • Можливість визначення нетипових параметрів для окремих серверів та спільних ресурсів.
  • xxAbility to define custom options for individual servers and sharesxx
  • 為每個伺服器與分享定義自訂選項的能力
  • Laptop support through the Solid hardware device framework
  • Laptop podrška preko čvrstog hardver uređajnog okruženja
  • Implementació per a portàtils a través del marc de treball Solid per a dispositius de maquinari
  • Implementació per a portàtils a través del marc de treball Solid per a dispositius de maquinari
  • Laptop-Unterstützung durch das Solid-Framework für Hardware-Geräte
  • Υποστήριξη φορητού υπολογιστή μέσω του πλαισίου Solid για συσκευές
  • Laptop support through the Solid hardware device framework
  • Apoyo para portátiles a través de la infraestructura de dispositivos hardware Solid
  • +
  • Sülearvutite toetus Solidi riistvaraseadmete raamistiku vahendusel
  • Kannettavan tietokoneen tuki Solid-laitteistokehyksen avulla
  • Prise en charge des ordinateurs portables avec le framework de gestion matérielle Solid
  • Compatíbel con portátiles mediante a infraestrutura de dispositivos de hardware Solid.
  • Dukungan laptop melalui kerangkakerja perangkat hardware Solid
  • Supporto ai computer portatili per mezzo dell'infrastruttura per i dispositivi hardware Solid
  • Solid 하드웨어 장치 프레임워크를 통한 노트북 지원
  • Klappreekner-Ünnerstütten över't Hardware-Rahmenwark Solid
  • Ondersteuning van laptop via het framework voor hardware apparaten Solid
  • Obsługa laptopa przez szkielet urządzenia sprzętowego Solid
  • Suporte para portáteis, através da plataforma de dispositivos de 'hardware' Solid
  • Suporte para notebooks através da plataforma de hardware Solid
  • Podpora laptopov cez framework hardvérových zariadení Solid
  • Stöd för bärbara datorer via Solid-ramverket för hårdvaruenheter
  • Katı donanım aygıt altyapısı aracılığıyla diz üstü bilgisayar desteği
  • Підтримка ноутбуків за допомогою оболонки для роботи з пристроями Solid.
  • xxLaptop support through the Solid hardware device frameworkxx
  • 透過 Solid 硬體裝置框架支援筆記型電腦
  • Wake-On-LAN capabilities
  • Wake-On-LAN mogućnosti
  • Capacitats de l'activació per LAN (Wake-On-LAN)
  • Capacitats de l'activació per LAN (Wake-On-LAN)
  • „Wake-On-LAN“-Fähigkeiten
  • Δυνατότητες απομακρυσμένης αφύπνισης
  • Wake-On-LAN capabilities
  • Capacidades «Despertar en LAN»
  • +
  • Wake-On-LAN võimekus
  • Wake-On-LAN-ominaisuudet
  • Capacités de réveil par le réseau (Wake-on-LAN)
  • Ofrece funcionalidades de espertar na rede (Wake-On-LAN).
  • Kemampuan Wake-On-LAN
  • Funzionalità Wake-On-LAN
  • Wake-On-LAN 기능
  • Kann OpWaken-op-LAN (WOL)
  • Vermogen voor Wake-On-LAN
  • Możliwość Wake-On-LAN
  • Capacidades de activação pela LAN
  • Capacidades de ativação por LAN (Wake-On-LAN)
  • Schopnosti Wake-On-LAN
  • Funktioner för att väckas av lokalt nätverk
  • Yerel ağ üzerinden açma yetenekleri
  • Можливості пробудження сигналом з локальної мережі.
  • xxWake-On-LAN capabilitiesxx
  • 局域网唤醒功能
  • LAN 喚醒的能力
  • Plasmoid for desktop integration
  • Plasmoid za integraciju radne površine
  • Plasmoide per a la integració amb l'escriptori
  • Plasmoide per a la integració amb l'escriptori
  • Plasmoid für die Integration in die Arbeitsfläche
  • Πλασμοειδές για ενοποίηση με το γραφικό περιβάλλον
  • Plasmoid for desktop integration
  • Plasmoide para integración en el escritorio
  • +
  • Töölauaga lõimitud plasmoid
  • Sovelma työpöytäintegrointiin
  • Plasmoïde pour l'intégration sur le bureau
  • Ofrece integración co escritorio mediante un plasmoide.
  • Plasmoid untuk integrasi desktop
  • Plasmoide per l'integrazione desktop
  • Plasmoid를 통한 데스크톱 통합
  • Plasma-Lüttprogramm för't Integreren na den Schriefdisch
  • Plasmoid voor bureaubladintegratie
  • Plazmoid do integracji z pulpitem
  • Plasmóide de integração no ambiente de trabalho
  • Plasmoide de integração no ambiente de trabalho
  • Plazmoid pre integráciu s pracovnou plochou
  • Plasmoid för integrering med skrivbordssökning
  • Masaüstü tümleştirmesi için Plasmoid
  • Плазмоїд для інтеграції зі стільницею.
  • xxPlasmoid for desktop integrationxx
  • Plasma 桌面部件集成
  • 以 Plasmoid 提供桌面整合
  • Profiles for different network neighborhood setups
  • Perfils per a diferents configuracions del veïnatge de xarxa
  • Perfils per a diferents configuracions del veïnatge de xarxa
  • Profile für verschiedene Einstellungen der Netzwerkumgebung
  • Profiles for different network neighbourhood setups
  • Perfiles para diferentes configuraciones de entorno de red
  • +
  • Profiilid võrgunaabruse eri seadistuste tarbeks
  • Profiilit eri verkkoympäristömäärityksille
  • Profils pour les différentes configurations de voisinage réseau
  • Perfís para distintas configuracións de veciñanza de rede
  • Memprofilkan bagi persiapan jaringan tetangga yang berbeda
  • Profili per diverse impostazioni delle risorse di rete
  • 다른 네트워크 환경 설정 프로필
  • Profielen voor verschillende opzetten van netwerkomgevingen
  • Profile dla różnych ustawień otoczenia sieciowego
  • Perfis para diferentes configurações da vizinhança da rede
  • Perfis para diferentes configurações de vizinhança da rede
  • Profily pre rôzne nastavenia sieťového okolia
  • Profiler för olika inställningar av nätverksgrannskap
  • Профілі для різних наборів налаштувань мережевого оточення
  • xxProfiles for different network neighborhood setupsxx
  • 为不同网络邻居设置配备不同配置方案

If you are working in a Windows dominated network environment, you may want to install this application to be able to easily access the provided Windows shares.

Ako radite sa Windows dominiranim mrežnim okruženjem, možda ćete željeti instalirati aplikaciju kako biste lako pristupili omogućenim Windows razmjenama.

Si esteu treballant en un entorn de xarxa dominat per Windows, és possible que vulgueu instal·lar aquesta aplicació per a poder accedir amb facilitat a les comparticions proporcionades per Windows.

Si esteu treballant en un entorn de xarxa dominat per Windows, és possible que vulgueu instal·lar aquesta aplicació per a poder accedir amb facilitat a les comparticions proporcionades per Windows.

Wenn Sie in einer Windows-dominierten Netzwerkumgebung arbeiten, sollten Sie diese Anwendung installieren, um leicht auf die vorhandenen Windows-Freigaben zuzugreifen.

Αν εργάζεστε σε ένα περιβάλλον δικτύου υπό την κυριαρχία των Windows, θα θέλατε να εγκαταστήσετε την εφαρμογή αυτή για να μπορείτε να έχετε άνετηπρόσβαση στους κοινούς πόρους που παρέχουν τα Windows.

If you are working in a Windows dominated network environment, you may want to install this application to be able to easily access the provided Windows shares.

Si estás trabajando en un entorno de red dominado por Windows, es posible que desees instalar esta aplicación para poder acceder fácilmente a los recursos Windows compartidos.

+

Kui töötad võrgukeskkonnas, milles domineerib Windows, tasuks see rakendus paigaldada, et pääseda kergemini ligi saadaolevatele Windowsi jagatud ressurssidele.

Windowsin hallitsemassa verkkoympäristössä tämä sovellus helpottaa tarjolla olevien Windows-jakojen käyttöä.

Si vous travaillez dans un réseau contenant majoritairement des PC sous Windows, vous voudrez sans doute installer cette application pour accéder facilement aux partages Windows.

Se traballa nun ambiente de rede dominado por Windows, esta aplicación axudará a acceder facilmente aos recursos compartidos desde Windows.

Jika kamu bekerja dalam lingkungan jaringan yang didominasi Windows, kamu mungkin ingin menginstal aplikasi ini untuk dapat mengakses secara mudah berbagi-berbagi yang disediakan Windows

Se stai lavorando in una rete dominata da Windows potresti voler installare questa applicazione, per essere in grado di accedere facilmente alle condivisioni fornite da Windows.

Windows가 대다수인 네트워크 환경에서 Windows 공유에 빠르게 접근하려면 이 프로그램을 사용할 수 있습니다.

Arbeidst Du binnen en vun Windows präägt Nettwarkümgeven, kannst Du dit Programm installeren, wenn Du eenfach op de praatstahn Windows-Freegaven togriepen wullt.

Als u werkt in een door Windows gedomineerde netwerkomgeving, dan zou u deze toepassing willen installeren om in staat te zijn gemakkelijk toegang tot de geboden Windows shares te krijgen.

Jeśli pracujesz w otoczeniu sieciowym zdominowanym przez system Windows, to możesz wgrać program do łatwego uzyskiwania dostępu do udziałów Windowsa.

Se estiver a trabalhar num ambiente de rede dominado pelo Windows, poderá querer instalar esta aplicação para poder acede facilmente às partilhas de rede disponíveis.

Se estiver trabalhando em um ambiente de rede dominado pelo Windows, poderá querer instalar este aplicativo para acessar facilmente os compartilhamentos de rede disponíveis.

Ak pracujete vo Windows sieťovom prostredí, možno budete chcieť nainštalovať túto aplikáciu, aby ste mali možnosť jednoducho pristupovať ku zdieľaniam Windows.

Om du arbetar i en Windows-dominerad nätverksmiljö, kan du vilja installera detta program för att enkelt kunna komma åt de delade Windows-kataloger som tillhandahålls.

Windows'un hakim olduğu bir ağ ortamında çalışıyorsanız, sağlanan Windows paylaşımlarına kolayca erişebilmek için bu uygulamayı kurmak isteyebilirsiniz.

Якщо ви працюєте у середовищі з переважним використанням Windows, вам варто встановити цю програму для полегшення доступу до спільних ресурсів Windows.

xxIf you are working in a Windows dominated network environment, you may want to install this application to be able to easily access the provided Windows shares.xx

若您正在 Windows 主導的網路環境下工作,您可能會想要安裝這個應用程式來讓存取提供的 Windows 分享更簡單。

The main window Glavni prozor La finestra principal La finestra principal Hlavní okno Das Hauptfenster Το κύριο παράθυρο The main window La ventana principal + Peaaken Pääikkuna La fenêtre principale A xanela principal Window utama La finestra principale 주 창 Dat Hööftfinster Het hoofdvenster Główne okno A janela principal A janela principal Hlavné okno Huvudfönstret Ana pencere Головне вікно. xxThe main windowxx 主窗口 主視窗 https://cdn.kde.org/screenshots/smb4k/screenshot_smb4k_mainwindow_1.png The plasmoid Plazmoid El plasmoide El plasmoide Plasmoid Das Plasmoid Το πλασμοειδές The plasmoid El plasmoide + Plasmoid Sovelma Le plasmoïde O plasmoide Plasmoid Il plasmoide Plasmoid Dat Plasma-Lüttprogramm De plasmoid Plazmoid O plasmóide O plasmoide Plazmoid Plasmoiden plasmoid Плазмоїд. xxThe plasmoidxx Plasma 桌面部件 Plasmoid 元件 https://cdn.kde.org/screenshots/smb4k/screenshot_smb4k_plasmoid_1.png https://smb4k.sourceforge.io https://bugs.kde.org/enter_bug.cgi?format=guided&product=smb4k
diff --git a/smb4k/smb4kconfigpageauthentication.cpp b/smb4k/smb4kconfigpageauthentication.cpp index f42fadd..4310759 100644 --- a/smb4k/smb4kconfigpageauthentication.cpp +++ b/smb4k/smb4kconfigpageauthentication.cpp @@ -1,735 +1,735 @@ /*************************************************************************** The configuration page for the authentication settings of Smb4K ------------------- begin : Sa Nov 15 2003 copyright : (C) 2003-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpageauthentication.h" #include "core/smb4ksettings.h" // Qt includes #include #include #include #include #include #include #include #include #include // KDE includes #include #include #include Smb4KConfigPageAuthentication::Smb4KConfigPageAuthentication(QWidget *parent) : QWidget(parent) { m_entries_displayed = false; m_maybe_changed = false; // // Layout // QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); // // Settings group box // QGroupBox *settingsBox = new QGroupBox(i18n("Settings"), this); QVBoxLayout *settingsBoxLayout = new QVBoxLayout(settingsBox); settingsBoxLayout->setSpacing(5); // Wallet usage QCheckBox *useWallet = new QCheckBox(Smb4KSettings::self()->useWalletItem()->label(), settingsBox); useWallet->setObjectName("kcfg_UseWallet"); connect(useWallet, SIGNAL(toggled(bool)), this, SLOT(slotKWalletButtonToggled(bool))); settingsBoxLayout->addWidget(useWallet, 0); // Default login QCheckBox *defaultAuth = new QCheckBox(Smb4KSettings::self()->useDefaultLoginItem()->label(), settingsBox); defaultAuth->setObjectName("kcfg_UseDefaultLogin"); connect(defaultAuth, SIGNAL(toggled(bool)), this, SLOT(slotDefaultLoginToggled(bool))); settingsBoxLayout->addWidget(defaultAuth, 0); layout->addWidget(settingsBox, 0); // // Wallet Entries group box // QGroupBox *walletEntriesBox = new QGroupBox(i18n("Wallet Entries"), this); QVBoxLayout *walletEntriesBoxLayout = new QVBoxLayout(walletEntriesBox); walletEntriesBoxLayout->setSpacing(5); // // Wallet Entries editor // QWidget *walletEntriesEditor = new QWidget(walletEntriesBox); walletEntriesEditor->setObjectName("WalletEntriesEditor"); QGridLayout *walletEntriesEditorLayout= new QGridLayout(walletEntriesEditor); walletEntriesEditorLayout->setSpacing(5); // // The list view // QListWidget *walletEntriesWidget = new QListWidget(walletEntriesEditor); walletEntriesWidget->setObjectName("WalletEntriesWidget"); walletEntriesWidget->setDragDropMode(QListWidget::NoDragDrop); walletEntriesWidget->setSelectionMode(QListWidget::SingleSelection); walletEntriesWidget->setContextMenuPolicy(Qt::ActionsContextMenu); walletEntriesWidget->viewport()->installEventFilter(this); // Edit action QAction *editAction = new QAction(KDE::icon("edit-rename"), i18n("Edit"), walletEntriesWidget); editAction->setObjectName("EditAction"); editAction->setEnabled(false); connect(editAction, SIGNAL(triggered(bool)), this, SLOT(slotEditClicked())); walletEntriesWidget->addAction(editAction); // Remove action QAction *removeAction = new QAction(KDE::icon("edit-delete"), i18n("Remove"), walletEntriesWidget); removeAction->setObjectName("RemoveAction"); removeAction->setEnabled(false); connect(removeAction, SIGNAL(triggered(bool)), this, SLOT(slotRemoveClicked())); walletEntriesWidget->addAction(removeAction); // Clear action QAction *clearAction = new QAction(KDE::icon("edit-clear-list"), i18n("Clear"), walletEntriesWidget); clearAction->setObjectName("ClearAction"); clearAction->setEnabled(false); connect(clearAction, SIGNAL(triggered(bool)), this, SLOT(slotClearClicked())); walletEntriesWidget->addAction(clearAction); connect(walletEntriesWidget, SIGNAL(itemSelectionChanged()), this, SLOT(slotItemSelectionChanged())); walletEntriesEditorLayout->addWidget(walletEntriesWidget, 0, 0, 7, 1, 0); // // Load button // QPushButton *loadButton = new QPushButton(walletEntriesEditor); loadButton->setObjectName("LoadButton"); loadButton->setText(i18n("Load")); loadButton->setIcon(KDE::icon("document-open")); loadButton->setWhatsThis(i18n("The login information that was stored by Smb4K will be loaded from the wallet.")); connect(loadButton, SIGNAL(clicked(bool)), this, SIGNAL(loadWalletEntries())); walletEntriesEditorLayout->addWidget(loadButton, 0, 1, 0); // // Save button // QPushButton *saveButton = new QPushButton(walletEntriesEditor); saveButton->setObjectName("SaveButton"); saveButton->setText(i18n("Save")); saveButton->setIcon(KDE::icon("document-save-all")); saveButton->setWhatsThis(i18n("All modifications you applied are saved to the wallet.")); saveButton->setEnabled(false); connect(saveButton, SIGNAL(clicked(bool)), this, SIGNAL(saveWalletEntries())); connect(saveButton, SIGNAL(clicked(bool)), this, SLOT(slotSaveClicked(bool))); walletEntriesEditorLayout->addWidget(saveButton, 1, 1, 0); walletEntriesEditorLayout->addItem(new QSpacerItem(0, 10, QSizePolicy::Fixed, QSizePolicy::Fixed), 2, 1); // // The details widget // KCollapsibleGroupBox *detailsBox = new KCollapsibleGroupBox(walletEntriesEditor); detailsBox->setObjectName("DetailsBox"); detailsBox->setTitle(i18n("Details")); detailsBox->setEnabled(false); QVBoxLayout *detailsBoxLayout = new QVBoxLayout(detailsBox); detailsBoxLayout->setSpacing(5); QTableWidget *detailsWidget = new QTableWidget(detailsBox); detailsWidget->setObjectName("DetailsWidget"); detailsWidget->horizontalHeader()->setVisible(false); detailsWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); detailsWidget->verticalHeader()->setVisible(false); detailsWidget->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); detailsWidget->viewport()->installEventFilter(this); detailsBoxLayout->addWidget(detailsWidget, 0); walletEntriesEditorLayout->addWidget(detailsBox, 5, 1, 0); walletEntriesEditorLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Fixed, QSizePolicy::MinimumExpanding), 6, 1); walletEntriesBoxLayout->addWidget(walletEntriesEditor, 0); layout->addWidget(walletEntriesBox, 0); // // Adjustments // slotKWalletButtonToggled(useWallet->isChecked()); slotDefaultLoginToggled(defaultAuth->isChecked()); // // Set focus // loadButton->setFocus(); } Smb4KConfigPageAuthentication::~Smb4KConfigPageAuthentication() { } void Smb4KConfigPageAuthentication::insertWalletEntries(const QList &list) { // // Insert the list of authentication information // m_entriesList = list; // // Reset the changed flag, since we are (re)loading the information // m_maybe_changed = false; emit walletEntriesModified(); // // Get the list wirdget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Clear the list widget // walletEntriesWidget->clear(); // // Insert the authentication information entries into the // list widget // for (Smb4KAuthInfo *authInfo : m_entriesList) { switch (authInfo->type()) { case UnknownNetworkItem: { (void) new QListWidgetItem(KDE::icon("dialog-password"), i18n("Default Login"), walletEntriesWidget); break; } default: { (void) new QListWidgetItem(KDE::icon("dialog-password"), authInfo->displayString(), walletEntriesWidget); break; } } } // // Sort the entries // walletEntriesWidget->sortItems(); // // Set the display flag to true // m_entries_displayed = true; // // Enable buttons and actions // findChild("SaveButton")->setEnabled(walletEntriesWidget->count() != 0); findChild("ClearAction")->setEnabled(walletEntriesWidget->count() != 0); } bool Smb4KConfigPageAuthentication::eventFilter(QObject *object, QEvent *e) { // // Get the list widget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Process the events in the list widget // if (object == walletEntriesWidget->viewport()) { // If the user clicked on the viewport of the entries view, clear // the details widget and the "Details" button, if no item // is under the mouse. if (e->type() == QEvent::MouseButtonPress) { QMouseEvent *event = static_cast(e); QPoint pos = walletEntriesWidget->mapFromGlobal(event->globalPos()); if (!walletEntriesWidget->itemAt(pos)) { clearDetails(); walletEntriesWidget->clearSelection(); findChild("EditAction")->setEnabled(false); findChild("RemoveAction")->setEnabled(false); } } return walletEntriesWidget->viewport()->eventFilter(object, e); } return QWidget::eventFilter(object, e); } void Smb4KConfigPageAuthentication::loadDetails(Smb4KAuthInfo *authInfo) { // // Get the widgets // QTableWidget *detailsWidget = findChild("DetailsWidget"); KCollapsibleGroupBox *detailsGroupBox = findChild("DetailsBox"); QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Fill the details table widget with the information // switch (authInfo->type()) { case Host: case Share: { detailsWidget->setColumnCount(2); detailsWidget->setRowCount(4); QTableWidgetItem *entry_label = new QTableWidgetItem(i18n("Entry")); entry_label->setFlags(entry_label->flags() & Qt::ItemIsEditable); entry_label->setForeground(palette().text()); QTableWidgetItem *entry = new QTableWidgetItem(authInfo->displayString()); entry->setFlags(entry->flags() & Qt::ItemIsEditable); entry->setForeground(palette().text()); QTableWidgetItem *workgroup_label = new QTableWidgetItem(i18n("Workgroup")); workgroup_label->setFlags(workgroup_label->flags() & Qt::ItemIsEditable); workgroup_label->setForeground(palette().text()); QTableWidgetItem *login_label = new QTableWidgetItem(i18n("Login")); login_label->setFlags(login_label->flags() & Qt::ItemIsEditable); login_label->setForeground(palette().text()); QTableWidgetItem *password_label = new QTableWidgetItem(i18n("Password")); password_label->setFlags(password_label->flags() & Qt::ItemIsEditable); password_label->setForeground(palette().text()); detailsWidget->setItem(0, 0, entry_label); detailsWidget->setItem(0, 1, entry); detailsWidget->setItem(1, 0, workgroup_label); detailsWidget->setItem(1, 1, new QTableWidgetItem(authInfo->workgroupName())); detailsWidget->setItem(2, 0, login_label); detailsWidget->setItem(2, 1, new QTableWidgetItem(authInfo->userName())); detailsWidget->setItem(3, 0, password_label); detailsWidget->setItem(3, 1, new QTableWidgetItem(authInfo->password())); break; } default: { detailsWidget->setColumnCount(2); detailsWidget->setRowCount(3); QTableWidgetItem *entry_label = new QTableWidgetItem(i18n("Entry")); entry_label->setFlags(entry_label->flags() & Qt::ItemIsEditable); entry_label->setForeground(palette().text()); QTableWidgetItem *entry = new QTableWidgetItem(i18n("Default Login")); entry->setFlags(entry->flags() & Qt::ItemIsEditable); entry->setForeground(palette().text()); QTableWidgetItem *login_label = new QTableWidgetItem(i18n("Login")); login_label->setFlags(login_label->flags() & Qt::ItemIsEditable); login_label->setForeground(palette().text()); QTableWidgetItem *password_label = new QTableWidgetItem(i18n("Password")); password_label->setFlags(password_label->flags() & Qt::ItemIsEditable); password_label->setForeground(palette().text()); detailsWidget->setItem(0, 0, entry_label); detailsWidget->setItem(0, 1, entry); detailsWidget->setItem(1, 0, login_label); detailsWidget->setItem(1, 1, new QTableWidgetItem(authInfo->userName())); detailsWidget->setItem(2, 0, password_label); detailsWidget->setItem(2, 1, new QTableWidgetItem(authInfo->password())); break; } } // // Connect signals // connect(detailsWidget, SIGNAL(cellChanged(int,int)), this, SLOT(slotDetailsChanged(int,int))); // // Enable the details box // detailsGroupBox->setEnabled(!walletEntriesWidget->selectedItems().isEmpty()); } void Smb4KConfigPageAuthentication::clearDetails() { // // Get the widgets // QTableWidget *detailsWidget = findChild("DetailsWidget"); KCollapsibleGroupBox *detailsGroupBox = findChild("DetailsBox"); QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Disconnect signals // disconnect(detailsWidget, SIGNAL(cellChanged(int,int)), this, SLOT(slotDetailsChanged(int,int))); // // Collapse the details box and disable it. // detailsGroupBox->setExpanded(false); detailsGroupBox->setEnabled(!walletEntriesWidget->selectedItems().isEmpty()); // // Clear the table widget // if (detailsWidget->rowCount() != 0 && detailsWidget->columnCount() != 0) { detailsWidget->clear(); detailsWidget->setRowCount(0); detailsWidget->setColumnCount(0); } } ///////////////////////////////////////////////////////////////////////////// // SLOT IMPLEMENTATIONS ///////////////////////////////////////////////////////////////////////////// void Smb4KConfigPageAuthentication::slotKWalletButtonToggled(bool checked) { findChild("kcfg_UseDefaultLogin")->setEnabled(checked); findChild("WalletEntriesEditor")->setEnabled(checked); } void Smb4KConfigPageAuthentication::slotDefaultLoginToggled(bool checked) { if (checked && !Smb4KSettings::useDefaultLogin()) { emit setDefaultLogin(); } } void Smb4KConfigPageAuthentication::slotItemSelectionChanged() { // // Get the list widget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Clear details widget // clearDetails(); // // Get the authentication information and load its // details into the details widget // if (walletEntriesWidget->currentItem()) { for (Smb4KAuthInfo *authInfo : m_entriesList) { if (walletEntriesWidget->currentItem()->text() == authInfo->displayString() || (walletEntriesWidget->currentItem()->text() == i18n("Default Login") && authInfo->type() == UnknownNetworkItem)) { loadDetails(authInfo); break; } } // Enable actions findChild("EditAction")->setEnabled(true); findChild("RemoveAction")->setEnabled(true); } } void Smb4KConfigPageAuthentication::slotDetailsChanged(int row, int column) { // // Get the widget // QTableWidget *detailsWidget = findChild("DetailsWidget"); // // Find the right authentication information and pass the modifications // for (Smb4KAuthInfo *authInfo : m_entriesList) { if (QString::compare(detailsWidget->item(0, 1)->text(), authInfo->displayString()) == 0 || (QString::compare(detailsWidget->item(0, 1)->text(), i18n("Default Login")) == 0 && authInfo->type() == UnknownNetworkItem)) { switch (authInfo->type()) { case Host: case Share: { if (column == 1) { switch (row) { case 1: // Workgroup { authInfo->setWorkgroupName(detailsWidget->item(row, column)->text()); break; } case 2: // Login { authInfo->setUserName(detailsWidget->item(row, column)->text()); break; } case 3: // Password { authInfo->setPassword(detailsWidget->item(row, column)->text()); break; } default: { break; } } } break; } default: { if (column == 1) { switch (row) { case 1: // Login { authInfo->setUserName(detailsWidget->item(row, column)->text()); break; } case 2: // Password { authInfo->setPassword(detailsWidget->item(row, column)->text()); break; } default: { break; } } } break; } } break; } } // // Tell the program that the authentication information may be changed // and emit the appropriate signal // m_maybe_changed = true; emit walletEntriesModified(); } void Smb4KConfigPageAuthentication::slotEditClicked() { // // Get the widgets // KCollapsibleGroupBox *detailsGroupBox = findChild("DetailsBox"); QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); if (walletEntriesWidget->currentItem()) { // // Since the details have been loaded to the details widget already // by slotItemSelectionChanged(), only open the details widget here. // if (!detailsGroupBox->isExpanded()) { detailsGroupBox->setExpanded(true); } } } void Smb4KConfigPageAuthentication::slotRemoveClicked() { // // Get the list widget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Clear the details widget // clearDetails(); // // Remove the appropriate entry from the list of authentication information // for (int i = 0; i < m_entriesList.size(); ++i) { if (QString::compare(walletEntriesWidget->currentItem()->text(), m_entriesList.at(i)->displayString()) == 0 || (QString::compare(walletEntriesWidget->currentItem()->text(), i18n("Default Login")) == 0 && m_entriesList.at(i)->type() == UnknownNetworkItem)) { switch (m_entriesList.at(i)->type()) { case UnknownNetworkItem: { QCheckBox *default_login = findChild("kcfg_UseDefaultLogin"); default_login->setChecked(false); break; } default: { break; } } delete m_entriesList.takeAt(i); break; } else { continue; } } // // Remove the current item // delete walletEntriesWidget->currentItem(); // // Enable actions // findChild("ClearAction")->setEnabled((walletEntriesWidget->count() != 0)); // // Tell the program that the authentication information may be changed // and emit the appropriate signal // m_maybe_changed = true; emit walletEntriesModified(); } void Smb4KConfigPageAuthentication::slotClearClicked() { // // Get the list widget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Clear the details widget // clearDetails(); // // Remove all entries from the view // while (walletEntriesWidget->count() != 0) { delete walletEntriesWidget->item(0); } // // Remove all entries from the list off authentication information // while(!m_entriesList.isEmpty()) { delete m_entriesList.takeFirst(); } // // Enabled widgets // findChild("ClearAction")->setEnabled(false); // // Uncheck the Default Login checkbox // findChild("kcfg_UseDefaultLogin")->setChecked(false); // // Tell the program that the authentication information may be changed // and emit the appropriate signal // m_maybe_changed = true; emit walletEntriesModified(); } void Smb4KConfigPageAuthentication::slotSaveClicked(bool /*checked*/) { // // Get the list widget // QListWidget *walletEntriesWidget = findChild("WalletEntriesWidget"); // // Disable buttons // findChild("EditAction")->setEnabled(false); findChild("RemoveAction")->setEnabled(false); findChild("ClearAction")->setEnabled((walletEntriesWidget->count() != 0)); // // Clear the selection in the list view // walletEntriesWidget->clearSelection(); // // Tell the program that the authentication information may be changed // and emit the appropriate signal // m_maybe_changed = false; emit walletEntriesModified(); } diff --git a/smb4k/smb4kconfigpagemounting.cpp b/smb4k/smb4kconfigpagemounting.cpp index c406c2f..ae97f97 100644 --- a/smb4k/smb4kconfigpagemounting.cpp +++ b/smb4k/smb4kconfigpagemounting.cpp @@ -1,950 +1,950 @@ /*************************************************************************** The configuration page for the mount options ------------------- begin : So Mär 22 2015 copyright : (C) 2015-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpagemounting.h" #include "core/smb4kglobal.h" #if defined(Q_OS_LINUX) #include "core/smb4kmountsettings_linux.h" #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) #include "core/smb4kmountsettings_bsd.h" #endif // Qt includes #include #include #include #include #include #include #include #include // KDE includes #include #include #include #include #include #include using namespace Smb4KGlobal; Smb4KConfigPageMounting::Smb4KConfigPageMounting(QWidget* parent): QTabWidget(parent) { setupWidget(); } Smb4KConfigPageMounting::~Smb4KConfigPageMounting() { } #if defined(Q_OS_LINUX) // // Linux // void Smb4KConfigPageMounting::setupWidget() { // // Basic Settings tab // QWidget *basicTab = new QWidget(this); QVBoxLayout *basicTabLayout = new QVBoxLayout(basicTab); basicTabLayout->setSpacing(5); - basicTabLayout->setMargin(0); + basicTabLayout->setContentsMargins(0, 0, 0, 0); // // Directories // QGroupBox *directoryBox = new QGroupBox(i18n("Directories"), basicTab); QGridLayout *directoryBoxLayout = new QGridLayout(directoryBox); directoryBoxLayout->setSpacing(5); QLabel *prefixLabel = new QLabel(Smb4KMountSettings::self()->mountPrefixItem()->label(), directoryBox); KUrlRequester *prefix = new KUrlRequester(directoryBox); prefix->setMode(KFile::Directory | KFile::LocalOnly); prefix->setObjectName("kcfg_MountPrefix"); prefixLabel->setBuddy(prefix); QCheckBox *lowercaseSubdirs = new QCheckBox(Smb4KMountSettings::self()->forceLowerCaseSubdirsItem()->label(), directoryBox); lowercaseSubdirs->setObjectName("kcfg_ForceLowerCaseSubdirs"); directoryBoxLayout->addWidget(prefixLabel, 0, 0, 0); directoryBoxLayout->addWidget(prefix, 0, 1, 0); directoryBoxLayout->addWidget(lowercaseSubdirs, 1, 0, 1, 2, 0); basicTabLayout->addWidget(directoryBox, 0); // // Behavior // QGroupBox *behaviorBox = new QGroupBox(i18n("Behavior"), this); QGridLayout *behaviorBoxLayout = new QGridLayout(behaviorBox); behaviorBoxLayout->setSpacing(5); QCheckBox *remountShares = new QCheckBox(Smb4KMountSettings::self()->remountSharesItem()->label(), behaviorBox); remountShares->setObjectName("kcfg_RemountShares"); QLabel *remountAttemptsLabel = new QLabel(Smb4KMountSettings::self()->remountAttemptsItem()->label(), behaviorBox); remountAttemptsLabel->setIndent(25); QSpinBox *remountAttempts = new QSpinBox(behaviorBox); remountAttempts->setObjectName("kcfg_RemountAttempts"); remountAttemptsLabel->setBuddy(remountAttempts); QLabel *remountIntervalLabel = new QLabel(Smb4KMountSettings::self()->remountIntervalItem()->label(), behaviorBox); remountIntervalLabel->setIndent(25); QSpinBox *remountInterval = new QSpinBox(behaviorBox); remountInterval->setObjectName("kcfg_RemountInterval"); remountInterval->setSuffix(i18n(" min")); remountIntervalLabel->setBuddy(remountInterval); QCheckBox *unmountAllShares = new QCheckBox(Smb4KMountSettings::self()->unmountSharesOnExitItem()->label(), behaviorBox); unmountAllShares->setObjectName("kcfg_UnmountSharesOnExit"); QCheckBox *unmountForeignShares = new QCheckBox(Smb4KMountSettings::self()->unmountForeignSharesItem()->label(), behaviorBox); unmountForeignShares->setObjectName("kcfg_UnmountForeignShares"); QCheckBox *unmountInaccessibleShares = new QCheckBox(Smb4KMountSettings::self()->forceUnmountInaccessibleItem()->label(), behaviorBox); unmountInaccessibleShares->setObjectName("kcfg_ForceUnmountInaccessible"); QCheckBox *detectAllShares = new QCheckBox(Smb4KMountSettings::self()->detectAllSharesItem()->label(), behaviorBox); detectAllShares->setObjectName("kcfg_DetectAllShares"); behaviorBoxLayout->addWidget(remountShares, 0, 0, 1, 2, 0); behaviorBoxLayout->addWidget(remountAttemptsLabel, 1, 0, 0); behaviorBoxLayout->addWidget(remountAttempts, 1, 1, 0); behaviorBoxLayout->addWidget(remountIntervalLabel, 2, 0, 0); behaviorBoxLayout->addWidget(remountInterval, 2, 1, 0); behaviorBoxLayout->addWidget(unmountAllShares, 3, 0, 1, 2, 0); behaviorBoxLayout->addWidget(unmountInaccessibleShares, 4, 0, 1, 2, 0); behaviorBoxLayout->addWidget(unmountForeignShares, 5, 0, 1, 2, 0); behaviorBoxLayout->addWidget(detectAllShares, 6, 0, 1, 2, 0); basicTabLayout->addWidget(behaviorBox, 0); basicTabLayout->addStretch(100); addTab(basicTab, i18n("Basic Settings")); // // Common Mount Settings tab // QWidget *commonTab = new QWidget(this); QVBoxLayout *commonTabLayout = new QVBoxLayout(commonTab); commonTabLayout->setSpacing(5); - commonTabLayout->setMargin(0); + commonTabLayout->setContentsMargins(0, 0, 0, 0); // // Common options group box // QGroupBox *commonOptions = new QGroupBox(i18n("Common Options"), commonTab); QGridLayout *commonOptionsLayout = new QGridLayout(commonOptions); commonOptionsLayout->setSpacing(5); // Write access QCheckBox *useWriteAccess = new QCheckBox(Smb4KMountSettings::self()->useWriteAccessItem()->label(), commonOptions); useWriteAccess->setObjectName("kcfg_UseWriteAccess"); KComboBox *writeAccess = new KComboBox(commonOptions); writeAccess->setObjectName("kcfg_WriteAccess"); QList writeAccessChoices = Smb4KMountSettings::self()->writeAccessItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &wa : writeAccessChoices) { writeAccess->addItem(wa.label); } commonOptionsLayout->addWidget(useWriteAccess, 0, 0, 0); commonOptionsLayout->addWidget(writeAccess, 0, 1, 0); // Character set QCheckBox *useCharacterSet = new QCheckBox(Smb4KMountSettings::self()->useClientCharsetItem()->label(), commonOptions); useCharacterSet->setObjectName("kcfg_UseClientCharset"); KComboBox *characterSet = new KComboBox(commonOptions); characterSet->setObjectName("kcfg_ClientCharset"); QList charsetChoices = Smb4KMountSettings::self()->clientCharsetItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : charsetChoices) { characterSet->addItem(c.label); } commonOptionsLayout->addWidget(useCharacterSet, 1, 0, 0); commonOptionsLayout->addWidget(characterSet, 1, 1, 0); // Remote filesystem port QCheckBox *useFilesystemPort = new QCheckBox(Smb4KMountSettings::self()->useRemoteFileSystemPortItem()->label(), commonOptions); useFilesystemPort->setObjectName("kcfg_UseRemoteFileSystemPort"); QSpinBox *filesystemPort = new QSpinBox(commonOptions); filesystemPort->setObjectName("kcfg_RemoteFileSystemPort"); commonOptionsLayout->addWidget(useFilesystemPort, 2, 0, 0); commonOptionsLayout->addWidget(filesystemPort, 2, 1, 0); commonTabLayout->addWidget(commonOptions, 0); // // CIFS Unix Extensions Support group box // QGroupBox *cifsExtensionSupportBox= new QGroupBox(i18n("CIFS Unix Extensions Support"), commonTab); QGridLayout *cifsExtensionSupportLayout = new QGridLayout(cifsExtensionSupportBox); cifsExtensionSupportLayout->setSpacing(5); // CIFS Unix extensions support QCheckBox *cifsExtensionsSupport = new QCheckBox(Smb4KMountSettings::self()->cifsUnixExtensionsSupportItem()->label(), cifsExtensionSupportBox); cifsExtensionsSupport->setObjectName("kcfg_CifsUnixExtensionsSupport"); cifsExtensionSupportLayout->addWidget(cifsExtensionsSupport, 0, 0, 1, 2, 0); // User information QCheckBox *useUserId = new QCheckBox(Smb4KMountSettings::self()->useUserIdItem()->label(), cifsExtensionSupportBox); useUserId->setObjectName("kcfg_UseUserId"); QWidget *userIdInputWidget = new QWidget(cifsExtensionSupportBox); userIdInputWidget->setObjectName("UserIdInputWidget"); QGridLayout *userLayout = new QGridLayout(userIdInputWidget); userLayout->setSpacing(5); - userLayout->setMargin(0); + userLayout->setContentsMargins(0, 0, 0, 0); KLineEdit *userId = new KLineEdit(userIdInputWidget); userId->setObjectName("kcfg_UserId"); userId->setAlignment(Qt::AlignRight); userId->setReadOnly(true); QToolButton *userChooser = new QToolButton(userIdInputWidget); userChooser->setIcon(KDE::icon("edit-find-user")); userChooser->setToolTip(i18n("Choose a different user")); userChooser->setPopupMode(QToolButton::InstantPopup); QMenu *userMenu = new QMenu(userChooser); userChooser->setMenu(userMenu); QList allUsers = KUser::allUsers(); for (const KUser &u : allUsers) { QAction *userAction = userMenu->addAction(QString("%1 (%2)").arg(u.loginName()).arg(u.userId().nativeId())); userAction->setData(u.userId().nativeId()); } userLayout->addWidget(userId, 0, 0, 0); userLayout->addWidget(userChooser, 0, 1, Qt::AlignCenter); cifsExtensionSupportLayout->addWidget(useUserId, 1, 0, 0); cifsExtensionSupportLayout->addWidget(userIdInputWidget, 1, 1, 0); // Group information QCheckBox *useGroupId = new QCheckBox(Smb4KMountSettings::self()->useGroupIdItem()->label(), cifsExtensionSupportBox); useGroupId->setObjectName("kcfg_UseGroupId"); QWidget *groupIdInputWidget = new QWidget(cifsExtensionSupportBox); groupIdInputWidget->setObjectName("GroupIdInputWidget"); QGridLayout *groupLayout = new QGridLayout(groupIdInputWidget); groupLayout->setSpacing(5); - groupLayout->setMargin(0); + groupLayout->setContentsMargins(0, 0, 0, 0); KLineEdit *groupId = new KLineEdit(groupIdInputWidget); groupId->setObjectName("kcfg_GroupId"); groupId->setAlignment(Qt::AlignRight); groupId->setReadOnly(true); QToolButton *groupChooser = new QToolButton(groupIdInputWidget); groupChooser->setIcon(KDE::icon("edit-find-user")); groupChooser->setToolTip(i18n("Choose a different group")); groupChooser->setPopupMode(QToolButton::InstantPopup); QMenu *groupMenu = new QMenu(groupChooser); groupChooser->setMenu(groupMenu); QList groupList = KUserGroup::allGroups(); for (const KUserGroup &g : groupList) { QAction *groupAction = groupMenu->addAction(QString("%1 (%2)").arg(g.name()).arg(g.groupId().nativeId())); groupAction->setData(g.groupId().nativeId()); } groupLayout->addWidget(groupId, 0, 0, 0); groupLayout->addWidget(groupChooser, 0, 1, Qt::AlignCenter); cifsExtensionSupportLayout->addWidget(useGroupId, 2, 0, 0); cifsExtensionSupportLayout->addWidget(groupIdInputWidget, 2, 1, 0); // File mask QCheckBox *useFileMode = new QCheckBox(Smb4KMountSettings::self()->useFileModeItem()->label(), cifsExtensionSupportBox); useFileMode->setObjectName("kcfg_UseFileMode"); KLineEdit *fileMode = new KLineEdit(cifsExtensionSupportBox); fileMode->setObjectName("kcfg_FileMode"); fileMode->setClearButtonEnabled(true); fileMode->setAlignment(Qt::AlignRight); cifsExtensionSupportLayout->addWidget(useFileMode, 3, 0, 0); cifsExtensionSupportLayout->addWidget(fileMode, 3, 1, 0); // Directory mask QCheckBox *useDirectoryMode = new QCheckBox(Smb4KMountSettings::self()->useDirectoryModeItem()->label(), cifsExtensionSupportBox); useDirectoryMode->setObjectName("kcfg_UseDirectoryMode"); KLineEdit *directoryMode = new KLineEdit(cifsExtensionSupportBox); directoryMode->setObjectName("kcfg_DirectoryMode"); directoryMode->setClearButtonEnabled(true); directoryMode->setAlignment(Qt::AlignRight); cifsExtensionSupportLayout->addWidget(useDirectoryMode, 4, 0, 0); cifsExtensionSupportLayout->addWidget(directoryMode, 4, 1, 0); commonTabLayout->addWidget(cifsExtensionSupportBox, 1, 0); commonTabLayout->addStretch(100); addTab(commonTab, i18n("Common Mount Settings")); // // Advanced Mount Settings tab // QWidget *advancedTab = new QWidget(this); QVBoxLayout *advancedTabLayout = new QVBoxLayout(advancedTab); advancedTabLayout->setSpacing(5); - advancedTabLayout->setMargin(0); + advancedTabLayout->setContentsMargins(0, 0, 0, 0); QGroupBox *advancedOptions = new QGroupBox(i18n("Advanced Options"), advancedTab); QGridLayout *advancedOptionsLayout = new QGridLayout(advancedOptions); advancedOptionsLayout->setSpacing(5); // Force Uid QCheckBox *forceUid = new QCheckBox(Smb4KMountSettings::self()->forceUIDItem()->label(), advancedOptions); forceUid->setObjectName("kcfg_ForceUID"); advancedOptionsLayout->addWidget(forceUid, 0, 0, 0); // Force Gid QCheckBox *forceGid = new QCheckBox(Smb4KMountSettings::self()->forceGIDItem()->label(), advancedOptions); forceGid->setObjectName("kcfg_ForceGID"); advancedOptionsLayout->addWidget(forceGid, 0, 1, 0); // Permission checks QCheckBox *permissionChecks = new QCheckBox(Smb4KMountSettings::self()->permissionChecksItem()->label(), advancedOptions); permissionChecks->setObjectName("kcfg_PermissionChecks"); advancedOptionsLayout->addWidget(permissionChecks, 1, 0, 0); // Client controls Ids QCheckBox *clientControlsIds = new QCheckBox(Smb4KMountSettings::self()->clientControlsIDsItem()->label(), advancedOptions); clientControlsIds->setObjectName("kcfg_ClientControlsIDs"); advancedOptionsLayout->addWidget(clientControlsIds, 1, 1, 0); // Use server inode numbers QCheckBox *useServerInodes = new QCheckBox(Smb4KMountSettings::self()->serverInodeNumbersItem()->label(), advancedOptions); useServerInodes->setObjectName("kcfg_ServerInodeNumbers"); advancedOptionsLayout->addWidget(useServerInodes, 2, 0, 0); // Translate reserved characters QCheckBox *translateReservedCharacters = new QCheckBox(Smb4KMountSettings::self()->translateReservedCharsItem()->label(), advancedOptions); translateReservedCharacters->setObjectName("kcfg_TranslateReservedChars"); advancedOptionsLayout->addWidget(translateReservedCharacters, 2, 1, 0); // No locking QCheckBox *no_locking = new QCheckBox(Smb4KMountSettings::self()->noLockingItem()->label(), advancedOptions); no_locking->setObjectName("kcfg_NoLocking"); advancedOptionsLayout->addWidget(no_locking, 3, 0, 0); // Extra widget for the rest of the options QWidget *advancedOptionsExtraWidget = new QWidget(advancedOptions); QGridLayout *advancedOptionsExtraWidgetLayout = new QGridLayout(advancedOptionsExtraWidget); advancedOptionsExtraWidgetLayout->setSpacing(5); - advancedOptionsExtraWidgetLayout->setMargin(0); + advancedOptionsExtraWidgetLayout->setContentsMargins(0, 0, 0, 0); // SMB protocol version QCheckBox *useSmbProtocol = new QCheckBox(Smb4KMountSettings::self()->useSmbProtocolVersionItem()->label(), advancedOptionsExtraWidget); useSmbProtocol->setObjectName("kcfg_UseSmbProtocolVersion"); KComboBox *smbProtocol = new KComboBox(advancedOptionsExtraWidget); smbProtocol->setObjectName("kcfg_SmbProtocolVersion"); QList smbProtocolChoices = Smb4KMountSettings::self()->smbProtocolVersionItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : smbProtocolChoices) { smbProtocol->addItem(c.label); } advancedOptionsExtraWidgetLayout->addWidget(useSmbProtocol, 0, 0, 0); advancedOptionsExtraWidgetLayout->addWidget(smbProtocol, 0, 1, 0); // Cache mode QCheckBox *useCacheMode = new QCheckBox(Smb4KMountSettings::self()->useCacheModeItem()->label(), advancedOptionsExtraWidget); useCacheMode->setObjectName("kcfg_UseCacheMode"); KComboBox *cacheMode = new KComboBox(advancedOptionsExtraWidget); cacheMode->setObjectName("kcfg_CacheMode"); QList cacheModeChoices = Smb4KMountSettings::self()->cacheModeItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : cacheModeChoices) { cacheMode->addItem(c.label); } advancedOptionsExtraWidgetLayout->addWidget(useCacheMode, 1, 0, 0); advancedOptionsExtraWidgetLayout->addWidget(cacheMode, 1, 1, 0); // Security mode QCheckBox *useSecurityMode = new QCheckBox(Smb4KMountSettings::self()->useSecurityModeItem()->label(), advancedOptionsExtraWidget); useSecurityMode->setObjectName("kcfg_UseSecurityMode"); KComboBox *securityMode = new KComboBox(advancedOptionsExtraWidget); securityMode->setObjectName("kcfg_SecurityMode"); QList securityModeChoices = Smb4KMountSettings::self()->securityModeItem()->choices(); for (const KConfigSkeleton::ItemEnum::Choice &c : securityModeChoices) { securityMode->addItem(c.label); } advancedOptionsExtraWidgetLayout->addWidget(useSecurityMode, 2, 0, 0); advancedOptionsExtraWidgetLayout->addWidget(securityMode, 2, 1, 0); // Additional options QLabel *additionalOptionsLabel = new QLabel(Smb4KMountSettings::self()->customCIFSOptionsItem()->label(), advancedOptionsExtraWidget); QWidget *additionalOptionsWidget = new QWidget(advancedOptionsExtraWidget); QHBoxLayout *additionalOptionsWidgetLayout = new QHBoxLayout(additionalOptionsWidget); additionalOptionsWidgetLayout->setSpacing(5); - additionalOptionsWidgetLayout->setMargin(0); + additionalOptionsWidgetLayout->setContentsMargins(0, 0, 0, 0); KLineEdit *additionalOptions = new KLineEdit(additionalOptionsWidget); additionalOptions->setObjectName("kcfg_CustomCIFSOptions"); additionalOptions->setReadOnly(true); additionalOptions->setClearButtonEnabled(true); additionalOptionsLabel->setBuddy(additionalOptions); QToolButton *additionalOptionsEdit = new QToolButton(advancedOptionsExtraWidget); additionalOptionsEdit->setIcon(KDE::icon("document-edit")); additionalOptionsEdit->setToolTip(i18n("Edit the additional CIFS options.")); additionalOptionsWidgetLayout->addWidget(additionalOptions, 0); additionalOptionsWidgetLayout->addWidget(additionalOptionsEdit, 0); advancedOptionsExtraWidgetLayout->addWidget(additionalOptionsLabel, 3, 0, 0); advancedOptionsExtraWidgetLayout->addWidget(additionalOptionsWidget, 3, 1, 0); advancedOptionsLayout->addWidget(advancedOptionsExtraWidget, 4, 0, 1, 2, 0); advancedTabLayout->addWidget(advancedOptions, 0); advancedTabLayout->addStretch(100); addTab(advancedTab, i18n("Advanced Mount Settings")); // // Adjust widgets // slotCIFSUnixExtensionsSupport(Smb4KMountSettings::cifsUnixExtensionsSupport()); // // Connections // connect(userMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotNewUserTriggered(QAction*))); connect(groupMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotNewGroupTriggered(QAction*))); connect(cifsExtensionsSupport, SIGNAL(clicked(bool)), this, SLOT(slotCIFSUnixExtensionsSupport(bool))); connect(additionalOptionsEdit, SIGNAL(clicked(bool)), this, SLOT(slotAdditionalCIFSOptions())); } #elif defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) // // FreeBSD and NetBSD // void Smb4KConfigPageMounting::setupWidget() { // // Basic Settings tab // QWidget *basicTab = new QWidget(this); QVBoxLayout *basicTabLayout = new QVBoxLayout(basicTab); basicTabLayout->setSpacing(5); - basicTabLayout->setMargin(0); + basicTabLayout->setContentsMargins(0, 0, 0, 0); // // Directories // QGroupBox *directoryBox = new QGroupBox(i18n("Directories"), basicTab); QGridLayout *directoryBoxLayout = new QGridLayout(directoryBox); directoryBoxLayout->setSpacing(5); QLabel *prefixLabel = new QLabel(Smb4KMountSettings::self()->mountPrefixItem()->label(), directoryBox); KUrlRequester *prefix = new KUrlRequester(directoryBox); prefix->setMode(KFile::Directory | KFile::LocalOnly); prefix->setObjectName("kcfg_MountPrefix"); prefixLabel->setBuddy(prefix); QCheckBox *lowercaseSubdirs = new QCheckBox(Smb4KMountSettings::self()->forceLowerCaseSubdirsItem()->label(), directoryBox); lowercaseSubdirs->setObjectName("kcfg_ForceLowerCaseSubdirs"); directoryBoxLayout->addWidget(prefixLabel, 0, 0, 0); directoryBoxLayout->addWidget(prefix, 0, 1, 0); directoryBoxLayout->addWidget(lowercaseSubdirs, 1, 0, 1, 2, 0); basicTabLayout->addWidget(directoryBox, 0); // // Behavior // QGroupBox *behaviorBox = new QGroupBox(i18n("Behavior"), basicTab); QGridLayout *behaviorBoxLayout = new QGridLayout(behaviorBox); behaviorBoxLayout->setSpacing(5); QCheckBox *remountShares = new QCheckBox(Smb4KMountSettings::self()->remountSharesItem()->label(), behaviorBox); remountShares->setObjectName("kcfg_RemountShares"); QLabel *remountAttemptsLabel = new QLabel(Smb4KMountSettings::self()->remountAttemptsItem()->label(), behaviorBox); remountAttemptsLabel->setIndent(25); QSpinBox *remountAttempts = new QSpinBox(behaviorBox); remountAttempts->setObjectName("kcfg_RemountAttempts"); remountAttemptsLabel->setBuddy(remountAttempts); QLabel *remountIntervalLabel = new QLabel(Smb4KMountSettings::self()->remountIntervalItem()->label(), behaviorBox); remountIntervalLabel->setIndent(25); QSpinBox *remountInterval = new QSpinBox(behaviorBox); remountInterval->setObjectName("kcfg_RemountInterval"); remountInterval->setSuffix(i18n(" min")); remountIntervalLabel->setBuddy(remountInterval); QCheckBox *unmountAllShares = new QCheckBox(Smb4KMountSettings::self()->unmountSharesOnExitItem()->label(), behaviorBox); unmountAllShares->setObjectName("kcfg_UnmountSharesOnExit"); QCheckBox *unmountForeignShares = new QCheckBox(Smb4KMountSettings::self()->unmountForeignSharesItem()->label(), behaviorBox); unmountForeignShares->setObjectName("kcfg_UnmountForeignShares"); QCheckBox *detectAllShares = new QCheckBox(Smb4KMountSettings::self()->detectAllSharesItem()->label(), behaviorBox); detectAllShares->setObjectName("kcfg_DetectAllShares"); behaviorBoxLayout->addWidget(remountShares, 0, 0, 1, 2, 0); behaviorBoxLayout->addWidget(remountAttemptsLabel, 1, 0, 0); behaviorBoxLayout->addWidget(remountAttempts, 1, 1, 0); behaviorBoxLayout->addWidget(remountIntervalLabel, 2, 0, 0); behaviorBoxLayout->addWidget(remountInterval, 2, 1, 0); behaviorBoxLayout->addWidget(unmountAllShares, 3, 0, 1, 2, 0); behaviorBoxLayout->addWidget(unmountForeignShares, 4, 0, 1, 2, 0); behaviorBoxLayout->addWidget(detectAllShares, 5, 0, 1, 2, 0); basicTabLayout->addWidget(behaviorBox, 0); basicTabLayout->addStretch(100); addTab(basicTab, i18n("Basic Settings")); // // Mount Settings tab // QWidget *mountTab = new QWidget(this); QVBoxLayout *mountTabLayout = new QVBoxLayout(mountTab); mountTabLayout->setSpacing(5); - mountTabLayout->setMargin(0); + mountTabLayout->setContentsMargins(0, 0, 0, 0); // // Common Options // QGroupBox *commonOptionsBox = new QGroupBox(i18n("Common Options"), mountTab); QGridLayout *commonOptionsBoxLayout = new QGridLayout(commonOptionsBox); commonOptionsBoxLayout->setSpacing(5); // User information QCheckBox *useUserId = new QCheckBox(Smb4KMountSettings::self()->useUserIdItem()->label(), commonOptionsBox); useUserId->setObjectName("kcfg_UseUserId"); QWidget *userIdInputWidget = new QWidget(commonOptionsBox); userIdInputWidget->setObjectName("UserIdInputWidget"); QGridLayout *userLayout = new QGridLayout(userIdInputWidget); userLayout->setSpacing(5); - userLayout->setMargin(0); + userLayout->setContentsMargins(0, 0, 0, 0); KLineEdit *userId = new KLineEdit(userIdInputWidget); userId->setObjectName("kcfg_UserId"); userId->setAlignment(Qt::AlignRight); userId->setReadOnly(true); QToolButton *userChooser = new QToolButton(userIdInputWidget); userChooser->setIcon(KDE::icon("edit-find-user")); userChooser->setToolTip(i18n("Choose a different user")); userChooser->setPopupMode(QToolButton::InstantPopup); QMenu *userMenu = new QMenu(userChooser); userChooser->setMenu(userMenu); QList allUsers = KUser::allUsers(); for (const KUser &u : allUsers) { QAction *userAction = userMenu->addAction(QString("%1 (%2)").arg(u.loginName()).arg(u.userId().nativeId())); userAction->setData(u.userId().nativeId()); } userLayout->addWidget(userId, 0, 0, 0); userLayout->addWidget(userChooser, 0, 1, Qt::AlignCenter); commonOptionsBoxLayout->addWidget(useUserId, 0, 0, 0); commonOptionsBoxLayout->addWidget(userIdInputWidget, 0, 1, 0); // Group information QCheckBox *useGroupId = new QCheckBox(Smb4KMountSettings::self()->useGroupIdItem()->label(), commonOptionsBox); useGroupId->setObjectName("kcfg_UseGroupId"); QWidget *groupIdInputWidget = new QWidget(commonOptionsBox); groupIdInputWidget->setObjectName("GroupIdInputWidget"); QGridLayout *groupLayout = new QGridLayout(groupIdInputWidget); groupLayout->setSpacing(5); - groupLayout->setMargin(0); + groupLayout->setContentsMargins(0, 0, 0, 0); KLineEdit *groupId = new KLineEdit(groupIdInputWidget); groupId->setObjectName("kcfg_GroupId"); groupId->setAlignment(Qt::AlignRight); groupId->setReadOnly(true); QToolButton *groupChooser = new QToolButton(groupIdInputWidget); groupChooser->setIcon(KDE::icon("edit-find-user")); groupChooser->setToolTip(i18n("Choose a different group")); groupChooser->setPopupMode(QToolButton::InstantPopup); QMenu *groupMenu = new QMenu(groupChooser); groupChooser->setMenu(groupMenu); QList groupList = KUserGroup::allGroups(); for (const KUserGroup &g : groupList) { QAction *groupAction = groupMenu->addAction(QString("%1 (%2)").arg(g.name()).arg(g.groupId().nativeId())); groupAction->setData(g.groupId().nativeId()); } groupLayout->addWidget(groupId, 0, 0, 0); groupLayout->addWidget(groupChooser, 0, 1, Qt::AlignCenter); commonOptionsBoxLayout->addWidget(useGroupId, 1, 0, 0); commonOptionsBoxLayout->addWidget(groupIdInputWidget, 1, 1, 0); // File mask QCheckBox *useFileMode = new QCheckBox(Smb4KMountSettings::self()->useFileModeItem()->label(), commonOptionsBox); useFileMode->setObjectName("kcfg_UseFileMode"); KLineEdit *fileMode = new KLineEdit(commonOptionsBox); fileMode->setObjectName("kcfg_FileMode"); fileMode->setClearButtonEnabled(true); fileMode->setAlignment(Qt::AlignRight); commonOptionsBoxLayout->addWidget(useFileMode, 2, 0, 0); commonOptionsBoxLayout->addWidget(fileMode, 2, 1, 0); // Directory mask QCheckBox *useDirectoryMode = new QCheckBox(Smb4KMountSettings::self()->useDirectoryModeItem()->label(), commonOptionsBox); useDirectoryMode->setObjectName("kcfg_UseDirectoryMode"); KLineEdit *directoryMode = new KLineEdit(commonOptionsBox); directoryMode->setObjectName("kcfg_DirectoryMode"); directoryMode->setClearButtonEnabled(true); directoryMode->setAlignment(Qt::AlignRight); commonOptionsBoxLayout->addWidget(useDirectoryMode, 3, 0, 0); commonOptionsBoxLayout->addWidget(directoryMode, 3, 1, 0); // // Character sets // QGroupBox *characterSetsBox = new QGroupBox(i18n("Character Sets"), mountTab); QGridLayout *characterSetsBoxLayout = new QGridLayout(characterSetsBox); characterSetsBoxLayout->setSpacing(5); // Client character set QCheckBox *useCharacterSets = new QCheckBox(Smb4KMountSettings::self()->useCharacterSetsItem()->label(), characterSetsBox); useCharacterSets->setObjectName("kcfg_UseCharacterSets"); QLabel *clientCharacterSetLabel = new QLabel(Smb4KMountSettings::self()->clientCharsetItem()->label(), characterSetsBox); clientCharacterSetLabel->setIndent(25); clientCharacterSetLabel->setObjectName("ClientCharacterSetLabel"); KComboBox *clientCharacterSet = new KComboBox(characterSetsBox); clientCharacterSet->setObjectName("kcfg_ClientCharset"); QList charsetChoices = Smb4KMountSettings::self()->clientCharsetItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : charsetChoices) { clientCharacterSet->addItem(c.label); } clientCharacterSetLabel->setBuddy(clientCharacterSet); // Server character set QLabel *serverCharacterSetLabel = new QLabel(Smb4KMountSettings::self()->serverCodepageItem()->label(), characterSetsBox); serverCharacterSetLabel->setIndent(25); serverCharacterSetLabel->setObjectName("ServerCodepageLabel"); KComboBox *serverCharacterSet = new KComboBox(characterSetsBox); serverCharacterSet->setObjectName("kcfg_ServerCodepage"); QList codepageChoices = Smb4KMountSettings::self()->serverCodepageItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : codepageChoices) { serverCharacterSet->addItem(c.label); } serverCharacterSetLabel->setBuddy(serverCharacterSet); characterSetsBoxLayout->addWidget(useCharacterSets, 0, 0, 1, 2, 0); characterSetsBoxLayout->addWidget(clientCharacterSetLabel, 1, 0, 0); characterSetsBoxLayout->addWidget(clientCharacterSet, 1, 1, 0); characterSetsBoxLayout->addWidget(serverCharacterSetLabel, 2, 0, 0); characterSetsBoxLayout->addWidget(serverCharacterSet, 2, 1, 0); mountTabLayout->addWidget(commonOptionsBox, 0); mountTabLayout->addWidget(characterSetsBox, 0); mountTabLayout->addStretch(100); addTab(mountTab, i18n("Mount Settings")); // // Connections // connect(userMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotNewUserTriggered(QAction*))); connect(groupMenu, SIGNAL(triggered(QAction*)), this, SLOT(slotNewGroupTriggered(QAction*))); connect(useCharacterSets, SIGNAL(toggled(bool)), this, SLOT(slotCharacterSets(bool))); // // Enable / disable widgets // slotCharacterSets(Smb4KMountSettings::useCharacterSets()); } #else // // Dummy // void Smb4KConfigPageMounting::setupWidget() { } #endif void Smb4KConfigPageMounting::slotNewUserTriggered(QAction *action) { KLineEdit *userId = findChild("kcfg_UserId"); if (userId) { userId->setText(action->data().toString()); } } void Smb4KConfigPageMounting::slotNewGroupTriggered(QAction *action) { KLineEdit *groupId = findChild("kcfg_GroupId"); if (groupId) { groupId->setText(action->data().toString()); } } void Smb4KConfigPageMounting::slotCIFSUnixExtensionsSupport(bool checked) { QCheckBox *useUserId = findChild("kcfg_UseUserId"); if (useUserId) { useUserId->setEnabled(!checked); } QWidget *userIdInputWidget = findChild("UserIdInputWidget"); if (userIdInputWidget) { userIdInputWidget->setEnabled(!checked); } QCheckBox *useGroupId = findChild("kcfg_UseGroupId"); if (useGroupId) { useGroupId->setEnabled(!checked); } QWidget *groupIdInputWidget = findChild("GroupIdInputWidget"); if (groupIdInputWidget) { groupIdInputWidget->setEnabled(!checked); } QCheckBox *useFileMode = findChild("kcfg_UseFileMode"); if (useFileMode) { useFileMode->setEnabled(!checked); } KLineEdit *fileMode = findChild("kcfg_FileMode"); if (fileMode) { fileMode->setEnabled(!checked); } QCheckBox *useDirectoryMode = findChild("kcfg_UseDirectoryMode"); if (useDirectoryMode) { useDirectoryMode->setEnabled(!checked); } KLineEdit *directoryMode = findChild("kcfg_DirectoryMode"); if (directoryMode) { directoryMode->setEnabled(!checked); } } void Smb4KConfigPageMounting::slotAdditionalCIFSOptions() { #if defined(Q_OS_LINUX) KLineEdit *cifsOptions = findChild("kcfg_CustomCIFSOptions"); if (cifsOptions) { QString options = cifsOptions->originalText(); bool ok = false; options = QInputDialog::getText(this, i18n("Additional CIFS Options"), i18n("Enter the desired options as a comma separated list:"), QLineEdit::Normal, options, &ok); if (ok) { if(!options.trimmed().isEmpty()) { // SECURITY: Only pass those arguments to mount.cifs that do not pose // a potential security risk and that have not already been defined. // // This is, among others, the proper fix to the security issue reported // by Heiner Markert (aka CVE-2014-2581). QStringList whitelist = whitelistedMountArguments(); QStringList deniedArgs; QStringList list = options.split(',', QString::SkipEmptyParts); QMutableStringListIterator it(list); while (it.hasNext()) { QString arg = it.next().section("=", 0, 0); if (!whitelist.contains(arg)) { deniedArgs << arg; it.remove(); } } if (!deniedArgs.isEmpty()) { QString msg = i18np("The following entry is going to be removed from the additional options: %2. Please read the handbook for details.", "The following %1 entries are going to be removed from the additional options: %2. Please read the handbook for details.", deniedArgs.size(), deniedArgs.join(", ")); KMessageBox::sorry(this, msg); } cifsOptions->setText(list.join(",").trimmed()); } else { cifsOptions->clear(); } } } #endif } void Smb4KConfigPageMounting::slotCharacterSets(bool on) { // // Client character set // QLabel *clientCharacterSetLabel = findChild("ClientCharacterSetLabel"); if (clientCharacterSetLabel) { clientCharacterSetLabel->setEnabled(on); } KComboBox *clientCharacterSet = findChild("kcfg_ClientCharset"); if (clientCharacterSet) { clientCharacterSet->setEnabled(on); } // // Server character set // QLabel *serverCharacterSetLabel = findChild("ServerCodepageLabel"); if (serverCharacterSetLabel) { serverCharacterSetLabel->setEnabled(on); } KComboBox *serverCharacterSet = findChild("kcfg_ServerCodepage"); if (serverCharacterSet) { serverCharacterSet->setEnabled(on); } } diff --git a/smb4k/smb4kconfigpagenetwork.cpp b/smb4k/smb4kconfigpagenetwork.cpp index 590296b..9b2281c 100644 --- a/smb4k/smb4kconfigpagenetwork.cpp +++ b/smb4k/smb4kconfigpagenetwork.cpp @@ -1,242 +1,242 @@ /*************************************************************************** smb4knetworkoptions - The configuration page for the network settings of Smb4K ------------------- begin : Sa Nov 15 2003 copyright : (C) 2003-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpagenetwork.h" #include "core/smb4ksettings.h" // Qt includes #include #include #include #include #include #include // KDE includes #include #include #include #include Smb4KConfigPageNetwork::Smb4KConfigPageNetwork(QWidget *parent) : QTabWidget(parent) { // // Basic Samba Settings // QWidget *commonSambaTab = new QWidget(this); QVBoxLayout *commonSambaTabLayout = new QVBoxLayout(commonSambaTab); // // Basic Settings group box // QGroupBox *basicSettingsBox = new QGroupBox(i18n("Basic Settings"), commonSambaTab); QGridLayout *basicSettingsBoxLayout = new QGridLayout(basicSettingsBox); QLabel *nebiosNameLabel = new QLabel(Smb4KSettings::self()->netBIOSNameItem()->label(), basicSettingsBox); KLineEdit *netbiosName = new KLineEdit(basicSettingsBox); netbiosName->setObjectName("kcfg_NetBIOSName"); netbiosName->setClearButtonEnabled(true); nebiosNameLabel->setBuddy(netbiosName); QLabel *domainLabel = new QLabel(Smb4KSettings::self()->domainNameItem()->label(), basicSettingsBox); KLineEdit *domain = new KLineEdit(basicSettingsBox); domain->setObjectName("kcfg_DomainName"); domain->setClearButtonEnabled(true); domainLabel->setBuddy(domain); QCheckBox *useRemoteSmbPort = new QCheckBox(Smb4KSettings::self()->useRemoteSmbPortItem()->label(), basicSettingsBox); useRemoteSmbPort->setObjectName("kcfg_UseRemoteSmbPort"); QSpinBox *remoteSmbPort = new QSpinBox(basicSettingsBox); remoteSmbPort->setObjectName("kcfg_RemoteSmbPort"); // remoteSmbPort->setSliderEnabled(true); QCheckBox *largeNetworkNeighborhood = new QCheckBox(Smb4KSettings::self()->largeNetworkNeighborhoodItem()->label(), basicSettingsBox); largeNetworkNeighborhood->setObjectName("kcfg_LargeNetworkNeighborhood"); basicSettingsBoxLayout->addWidget(nebiosNameLabel, 0, 0, 0); basicSettingsBoxLayout->addWidget(netbiosName, 0, 1, 0); basicSettingsBoxLayout->addWidget(domainLabel, 1, 0, 0); basicSettingsBoxLayout->addWidget(domain, 1, 1, 0); basicSettingsBoxLayout->addWidget(useRemoteSmbPort, 2, 0, 0); basicSettingsBoxLayout->addWidget(remoteSmbPort, 2, 1, 0); basicSettingsBoxLayout->addWidget(largeNetworkNeighborhood, 3, 0, 1, 2, 0); // // Behavior group box // QGroupBox *behaviorBox = new QGroupBox(i18n("Behavior"), commonSambaTab); QGridLayout *behaviorBoxLayout = new QGridLayout(behaviorBox); QCheckBox *detectPrinters = new QCheckBox(Smb4KSettings::self()->detectPrinterSharesItem()->label(), behaviorBox); detectPrinters->setObjectName("kcfg_DetectPrinterShares"); QCheckBox *detectHiddenShares = new QCheckBox(Smb4KSettings::self()->detectHiddenSharesItem()->label(), behaviorBox); detectHiddenShares->setObjectName("kcfg_DetectHiddenShares"); QCheckBox *previewHiddenItems = new QCheckBox(Smb4KSettings::self()->previewHiddenItemsItem()->label(), behaviorBox); previewHiddenItems->setObjectName("kcfg_PreviewHiddenItems"); behaviorBoxLayout->addWidget(detectPrinters, 0, 0, 0); behaviorBoxLayout->addWidget(detectHiddenShares, 0, 1, 0); behaviorBoxLayout->addWidget(previewHiddenItems, 1, 0, 0); commonSambaTabLayout->addWidget(basicSettingsBox, 0); commonSambaTabLayout->addWidget(behaviorBox, 0); commonSambaTabLayout->addStretch(100); addTab(commonSambaTab, i18n("Common Samba Settings")); // // Advanced Samba Settings // QWidget *advancedSambaTab = new QWidget(this); QVBoxLayout *advancedSambaTabLayout = new QVBoxLayout(advancedSambaTab); // // Protocol group box // QGroupBox *protocolsBox = new QGroupBox(i18n("Protocols"), basicSettingsBox); QVBoxLayout *protocolsBoxLayout = new QVBoxLayout(protocolsBox); QCheckBox *forceSMB1Protocol = new QCheckBox(Smb4KSettings::self()->forceSMB1ProtocolItem()->label(), protocolsBox); forceSMB1Protocol->setObjectName("kcfg_ForceSMB1Protocol"); protocolsBoxLayout->addWidget(forceSMB1Protocol, 0); // // Authentication group box // QGroupBox *authenticationBox = new QGroupBox(i18n("Authentication"), advancedSambaTab); QGridLayout *authenticationBoxLayout = new QGridLayout(authenticationBox); QCheckBox *masterBrowsersRequireAuth = new QCheckBox(Smb4KSettings::self()->masterBrowsersRequireAuthItem()->label(), authenticationBox); masterBrowsersRequireAuth->setObjectName("kcfg_MasterBrowsersRequireAuth"); QCheckBox *useKerberos = new QCheckBox(Smb4KSettings::self()->useKerberosItem()->label(), authenticationBox); useKerberos->setObjectName("kcfg_UseKerberos"); QCheckBox *useCCache = new QCheckBox(Smb4KSettings::self()->useWinbindCCacheItem()->label(), authenticationBox); useCCache->setObjectName("kcfg_UseWinbindCCache"); authenticationBoxLayout->addWidget(masterBrowsersRequireAuth, 0, 0, 0); authenticationBoxLayout->addWidget(useKerberos, 0, 1, 0); authenticationBoxLayout->addWidget(useCCache, 1, 0, 0); // // Security group box // QGroupBox *securityBox = new QGroupBox(i18n("Security"), advancedSambaTab); QGridLayout *securityBoxLayout = new QGridLayout(securityBox); securityBoxLayout->setSpacing(5); // Encryption level QCheckBox *useEncryptionLevel = new QCheckBox(Smb4KSettings::self()->useEncryptionLevelItem()->label(), securityBox); useEncryptionLevel->setObjectName("kcfg_UseEncryptionLevel"); KComboBox *encryptionLevel = new KComboBox(securityBox); encryptionLevel->setObjectName("kcfg_EncryptionLevel"); QList encryptionLevelChoices = Smb4KSettings::self()->encryptionLevelItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &c : encryptionLevelChoices) { encryptionLevel->addItem(c.label); } securityBoxLayout->addWidget(useEncryptionLevel, 0, 0, 0); securityBoxLayout->addWidget(encryptionLevel, 0, 1, 0); advancedSambaTabLayout->addWidget(protocolsBox, 0); advancedSambaTabLayout->addWidget(authenticationBox, 0); advancedSambaTabLayout->addWidget(securityBox, 0); advancedSambaTabLayout->addStretch(100); addTab(advancedSambaTab, i18n("Advanced Samba Settings")); // // Wake-On-LAN tab // QWidget *wakeOnLanTab = new QWidget(this); QVBoxLayout *wakeOnLanTabLayout = new QVBoxLayout(wakeOnLanTab); // // Wake-On-LAN group box // QGroupBox *wakeOnLanBox = new QGroupBox(i18n("Wake-On-LAN"), wakeOnLanTab); QGridLayout *wakeOnLanBoxLayout = new QGridLayout(wakeOnLanBox); QCheckBox *enableWakeOnLan = new QCheckBox(Smb4KSettings::self()->enableWakeOnLANItem()->label(), wakeOnLanBox); enableWakeOnLan->setObjectName("kcfg_EnableWakeOnLAN"); QLabel *wakeOnLanWaitingTimeLabel = new QLabel(Smb4KSettings::self()->wakeOnLANWaitingTimeItem()->label(), wakeOnLanBox); wakeOnLanWaitingTimeLabel->setIndent(25); QSpinBox *wakeOnLanWaitingTime = new QSpinBox(wakeOnLanBox); wakeOnLanWaitingTime->setObjectName("kcfg_WakeOnLANWaitingTime"); wakeOnLanWaitingTime->setSuffix(i18n(" s")); wakeOnLanWaitingTime->setSingleStep(1); // wakeOnLanWaitingTime->setSliderEnabled(true); wakeOnLanWaitingTimeLabel->setBuddy(wakeOnLanWaitingTime); QFrame *wakeOnLanNote = new QFrame(wakeOnLanBox); QGridLayout *wakeOnLanNoteLayout = new QGridLayout(wakeOnLanNote); wakeOnLanNoteLayout->setSpacing(10); - wakeOnLanNoteLayout->setMargin(5); + wakeOnLanNoteLayout->setContentsMargins(5, 5, 5, 5); QLabel *importantPixmap = new QLabel(wakeOnLanNote); importantPixmap->setPixmap(KIconLoader::global()->loadIcon("emblem-important", KIconLoader::Desktop, KIconLoader::SizeMedium)); importantPixmap->adjustSize(); QLabel *message = new QLabel(wakeOnLanNote); message->setText(i18n("Define the hosts that should be woken up via the custom options dialog.")); message->setTextFormat(Qt::AutoText); message->setWordWrap(true); message->setAlignment(Qt::AlignJustify); wakeOnLanNoteLayout->addWidget(importantPixmap, 0, 0, Qt::AlignVCenter); wakeOnLanNoteLayout->addWidget(message, 0, 1, Qt::AlignVCenter); wakeOnLanNoteLayout->setColumnStretch(1, 1); wakeOnLanBoxLayout->addWidget(enableWakeOnLan, 0, 0, 1, 2, 0); wakeOnLanBoxLayout->addWidget(wakeOnLanWaitingTimeLabel, 1, 0, 0); wakeOnLanBoxLayout->addWidget(wakeOnLanWaitingTime, 1, 1, 0); wakeOnLanBoxLayout->addWidget(wakeOnLanNote, 2, 0, 1, 2, 0); wakeOnLanTabLayout->addWidget(wakeOnLanBox, 0); wakeOnLanTabLayout->addStretch(100); addTab(wakeOnLanTab, i18n("Wake-On-LAN")); } Smb4KConfigPageNetwork::~Smb4KConfigPageNetwork() { } diff --git a/smb4k/smb4kconfigpageprofiles.cpp b/smb4k/smb4kconfigpageprofiles.cpp index d4c3c63..5f98858 100644 --- a/smb4k/smb4kconfigpageprofiles.cpp +++ b/smb4k/smb4kconfigpageprofiles.cpp @@ -1,205 +1,205 @@ /*************************************************************************** The configuration page for the profiles ------------------- begin : Do Aug 07 2014 copyright : (C) 2014-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpageprofiles.h" #include "core/smb4ksettings.h" #include "core/smb4kprofilemanager.h" // Qt includes #include #include #include // KDE includes #include #include Smb4KConfigPageProfiles::Smb4KConfigPageProfiles(QWidget* parent) : QWidget(parent) { // Layout QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); QGroupBox *settings = new QGroupBox(i18n("Settings"), this); QVBoxLayout *settings_layout = new QVBoxLayout(settings); settings_layout->setSpacing(5); // settings_layout->setMargin(0); // Use profiles QCheckBox *use_profiles = new QCheckBox(Smb4KSettings::self()->useProfilesItem()->label(), settings); use_profiles->setObjectName("kcfg_UseProfiles"); // Use profile migration assistant QCheckBox *use_assistant = new QCheckBox(Smb4KSettings::self()->useMigrationAssistantItem()->label(), settings); use_assistant->setObjectName("kcfg_UseMigrationAssistant"); settings_layout->addWidget(use_profiles, 0, 0); settings_layout->addWidget(use_assistant, 1, 0); QGroupBox *profiles = new QGroupBox(i18n("Profiles"), this); QVBoxLayout *profiles_layout = new QVBoxLayout(profiles); profiles_layout->setSpacing(5); // List of profiles m_profiles = new KEditListWidget(profiles); m_profiles->setObjectName("kcfg_ProfilesList"); m_profiles->setEnabled(Smb4KSettings::self()->useProfiles()); profiles_layout->addWidget(m_profiles, 0, 0); layout->addWidget(settings, 0, 0); layout->addWidget(profiles, 1, 0); connect(use_profiles, SIGNAL(stateChanged(int)), this, SLOT(slotEnableWidget(int))); connect(m_profiles, SIGNAL(removed(QString)), this, SLOT(slotProfileRemoved(QString))); connect(m_profiles->lineEdit(), SIGNAL(editingFinished()), this, SLOT(slotProfileChanged())); } Smb4KConfigPageProfiles::~Smb4KConfigPageProfiles() { } QList< QPair > Smb4KConfigPageProfiles::renamedProfiles() const { return m_renamed; } void Smb4KConfigPageProfiles::clearRenamedProfiles() { m_renamed.clear(); } QStringList Smb4KConfigPageProfiles::removedProfiles() const { return m_removed; } void Smb4KConfigPageProfiles::clearRemovedProfiles() { m_removed.clear(); } void Smb4KConfigPageProfiles::slotEnableWidget(int state) { switch (state) { case Qt::Unchecked: { m_profiles->setEnabled(false); break; } case Qt::Checked: { m_profiles->setEnabled(true); break; } default: { break; } } } void Smb4KConfigPageProfiles::slotProfileRemoved(const QString& name) { // If the removed profile was renamed before, remove it from // the list. QMutableListIterator< QPair > it(m_renamed); while (it.hasNext()) { QPair entry = it.next(); if (QString::compare(entry.first, name) == 0 || QString::compare(entry.second, name) == 0) { it.remove(); } } m_removed << name; } void Smb4KConfigPageProfiles::slotProfileChanged() { QStringList savedProfiles = Smb4KProfileManager::self()->profilesList(); QStringList currentProfiles = m_profiles->items(); if (savedProfiles.size() == currentProfiles.size()) { QMutableStringListIterator it(savedProfiles); while (it.hasNext()) { QString entry = it.next(); int index = currentProfiles.indexOf(entry); if (index != -1) { currentProfiles.removeAt(index); it.remove(); } } if (!savedProfiles.isEmpty() && !currentProfiles.isEmpty()) { // Take care that multiple renamings will have the correct // result. bool write = true; for (int i = 0; i < m_renamed.size(); ++i) { if (QString::compare(savedProfiles.first(), m_renamed.at(i).first, Qt::CaseSensitive) == 0) { QPair pair = static_cast< QPair >(m_renamed.at(i)); pair.second = currentProfiles.first(); write = false; break; } } // Write the renamed profile to the list, if necessary. if (write) { QPair renamed(savedProfiles.first(), currentProfiles.first()); m_renamed << renamed; } } } } diff --git a/smb4k/smb4kconfigpagesynchronization.cpp b/smb4k/smb4kconfigpagesynchronization.cpp index 3d430a7..386f0c8 100644 --- a/smb4k/smb4kconfigpagesynchronization.cpp +++ b/smb4k/smb4kconfigpagesynchronization.cpp @@ -1,586 +1,586 @@ /*************************************************************************** The configuration page for the synchronization options ------------------- begin : So Nov 20 2005 copyright : (C) 2005-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpagesynchronization.h" #include "core/smb4ksettings.h" // Qt includes #include #include #include #include #include #include #include // KDE includes #include #include #include Smb4KConfigPageSynchronization::Smb4KConfigPageSynchronization(QWidget *parent) : QTabWidget(parent) { // // 'Basic Settings' tab // QWidget *basicTab = new QWidget(this); QVBoxLayout *basicTabLayout = new QVBoxLayout(basicTab); basicTabLayout->setSpacing(5); - basicTabLayout->setMargin(0); + basicTabLayout->setContentsMargins(0, 0, 0, 0); // Default destination (rsync) QGroupBox *pathsBox = new QGroupBox(i18n("Default Destination"), basicTab); QGridLayout *pathsBoxLayout = new QGridLayout(pathsBox); pathsBoxLayout->setSpacing(5); QLabel *rsyncPrefixLabel = new QLabel(Smb4KSettings::self()->rsyncPrefixItem()->label(), pathsBox); KUrlRequester *rsyncPrefix = new KUrlRequester(pathsBox); rsyncPrefix->setMode(KFile::Directory|KFile::LocalOnly); rsyncPrefix->setObjectName("kcfg_RsyncPrefix"); rsyncPrefixLabel->setBuddy(rsyncPrefix); pathsBoxLayout->addWidget(rsyncPrefixLabel, 0, 0, 0); pathsBoxLayout->addWidget(rsyncPrefix, 0, 1, 0); // Behavior QGroupBox *behaviorBox = new QGroupBox(i18n("Behavior"), basicTab); QGridLayout *behaviorBoxLayout = new QGridLayout(behaviorBox); behaviorBoxLayout->setSpacing(5); QCheckBox *archiveMode = new QCheckBox(Smb4KSettings::self()->archiveModeItem()->label(), behaviorBox); archiveMode->setObjectName("kcfg_ArchiveMode"); QCheckBox *recurseDirs = new QCheckBox(Smb4KSettings::self()->recurseIntoDirectoriesItem()->label(), behaviorBox); recurseDirs->setObjectName("kcfg_RecurseIntoDirectories"); QCheckBox *relativePaths = new QCheckBox(Smb4KSettings::self()->relativePathNamesItem()->label(), behaviorBox); relativePaths->setObjectName("kcfg_RelativePathNames"); QCheckBox *noImpliedDirs = new QCheckBox(Smb4KSettings::self()->noImpliedDirectoriesItem()->label(), behaviorBox); noImpliedDirs->setObjectName("kcfg_NoImpliedDirectories"); QCheckBox *transferDirs = new QCheckBox(Smb4KSettings::self()->transferDirectoriesItem()->label(), behaviorBox); transferDirs->setObjectName("kcfg_TransferDirectories"); behaviorBoxLayout->addWidget(archiveMode, 0, 0, 0); behaviorBoxLayout->addWidget(recurseDirs, 0, 1, 0); behaviorBoxLayout->addWidget(relativePaths, 1, 0, 0); behaviorBoxLayout->addWidget(noImpliedDirs, 1, 1, 0); behaviorBoxLayout->addWidget(transferDirs, 2, 0, 0); // Backup QGroupBox *backupBox = new QGroupBox(i18n("Backup"), basicTab); QGridLayout *backupBoxLayout = new QGridLayout(backupBox); backupBoxLayout->setSpacing(5); QCheckBox *makeBackups = new QCheckBox(Smb4KSettings::self()->makeBackupsItem()->label(), backupBox); makeBackups->setObjectName("kcfg_MakeBackups"); QCheckBox *backupSuffixButton = new QCheckBox(Smb4KSettings::self()->useBackupSuffixItem()->label(), backupBox); backupSuffixButton->setObjectName("kcfg_UseBackupSuffix"); KLineEdit *backupSuffix = new KLineEdit(backupBox); backupSuffix->setObjectName("kcfg_BackupSuffix"); backupSuffix->setClearButtonEnabled(true); QCheckBox *backupDirButton = new QCheckBox(Smb4KSettings::self()->useBackupDirectoryItem()->label(), backupBox); backupDirButton->setObjectName("kcfg_UseBackupDirectory"); KUrlRequester *backupDir= new KUrlRequester(backupBox); backupDir->setObjectName("kcfg_BackupDirectory"); backupDir->setMode(KFile::Directory | KFile::LocalOnly); backupBoxLayout->addWidget(makeBackups, 0, 0, 0); backupBoxLayout->addWidget(backupSuffixButton, 1, 0, 0); backupBoxLayout->addWidget(backupSuffix, 1, 1, 0); backupBoxLayout->addWidget(backupDirButton, 2, 0, 0); backupBoxLayout->addWidget(backupDir, 2, 1, 0); basicTabLayout->addWidget(pathsBox, 0); basicTabLayout->addWidget(behaviorBox, 0); basicTabLayout->addWidget(backupBox, 0); basicTabLayout->addStretch(100); addTab(basicTab, i18n("Basic Settings")); // // 'File Handling' tab // QWidget *fileHandlingTab = new QWidget(this); QVBoxLayout *fileHandlingTabLayout = new QVBoxLayout(fileHandlingTab); fileHandlingTabLayout->setSpacing(5); - fileHandlingTabLayout->setMargin(0); + fileHandlingTabLayout->setContentsMargins(0, 0, 0, 0); // General QGroupBox *generalHandlingBox = new QGroupBox(i18n("General"), fileHandlingTab); QGridLayout *generalHandlingBoxLayout = new QGridLayout(generalHandlingBox); generalHandlingBoxLayout->setSpacing(5); QCheckBox *updateTarget = new QCheckBox(Smb4KSettings::self()->updateTargetItem()->label(), generalHandlingBox); updateTarget->setObjectName("kcfg_UpdateTarget"); QCheckBox *updateInPlace = new QCheckBox(Smb4KSettings::self()->updateInPlaceItem()->label(), generalHandlingBox); updateInPlace->setObjectName("kcfg_UpdateInPlace"); QCheckBox *sparseFiles = new QCheckBox(Smb4KSettings::self()->efficientSparseFileHandlingItem()->label(), generalHandlingBox); sparseFiles->setObjectName("kcfg_EfficientSparseFileHandling"); QCheckBox *copyFilesWhole = new QCheckBox(Smb4KSettings::self()->copyFilesWholeItem()->label(), generalHandlingBox); copyFilesWhole->setObjectName("kcfg_CopyFilesWhole"); QCheckBox *updateExisting = new QCheckBox(Smb4KSettings::self()->updateExistingItem()->label(), generalHandlingBox); updateExisting->setObjectName("kcfg_UpdateExisting"); QCheckBox *ignoreExisting = new QCheckBox(Smb4KSettings::self()->ignoreExistingItem()->label(), generalHandlingBox); ignoreExisting->setObjectName("kcfg_IgnoreExisting"); generalHandlingBoxLayout->addWidget(updateTarget, 0, 0, 0); generalHandlingBoxLayout->addWidget(updateInPlace, 0, 1, 0); generalHandlingBoxLayout->addWidget(sparseFiles, 1, 0, 0); generalHandlingBoxLayout->addWidget(copyFilesWhole, 1, 1, 0); generalHandlingBoxLayout->addWidget(updateExisting, 2, 0, 0); generalHandlingBoxLayout->addWidget(ignoreExisting, 2, 1, 0); // Links QGroupBox *linksBox = new QGroupBox(i18n("Links"), fileHandlingTab); QGridLayout *linksBoxLayout = new QGridLayout(linksBox); linksBoxLayout->setSpacing(5); QCheckBox *preserveLinks = new QCheckBox(Smb4KSettings::self()->preserveSymlinksItem()->label(), linksBox); preserveLinks->setObjectName("kcfg_PreserveSymlinks"); QCheckBox *transformLinks = new QCheckBox(Smb4KSettings::self()->transformSymlinksItem()->label(), linksBox); transformLinks->setObjectName("kcfg_TransformSymlinks"); QCheckBox *transformUnsafe = new QCheckBox(Smb4KSettings::self()->transformUnsafeSymlinksItem()->label(), linksBox); transformUnsafe->setObjectName("kcfg_TransformUnsafeSymlinks"); QCheckBox *ignoreUnsafe = new QCheckBox(Smb4KSettings::self()->ignoreUnsafeSymlinksItem()->label(), linksBox); ignoreUnsafe->setObjectName("kcfg_IgnoreUnsafeSymlinks"); QCheckBox *mungeLinks = new QCheckBox(Smb4KSettings::self()->mungeSymlinksItem()->label(), linksBox); mungeLinks->setObjectName("kcfg_MungeSymlinks"); QCheckBox *preserveHlinks = new QCheckBox(Smb4KSettings::self()->preserveHardLinksItem()->label(), linksBox); preserveHlinks->setObjectName("kcfg_PreserveHardLinks"); QCheckBox *copyDirLinks = new QCheckBox(Smb4KSettings::self()->copyDirectorySymlinksItem()->label(), linksBox); copyDirLinks->setObjectName("kcfg_CopyDirectorySymlinks"); QCheckBox *keepDirLinks = new QCheckBox(Smb4KSettings::self()->keepDirectorySymlinksItem()->label(), linksBox); keepDirLinks->setObjectName("kcfg_KeepDirectorySymlinks"); linksBoxLayout->addWidget(preserveLinks, 0, 0, 0); linksBoxLayout->addWidget(transformLinks, 0, 1, 0); linksBoxLayout->addWidget(transformUnsafe, 1, 0, 0); linksBoxLayout->addWidget(ignoreUnsafe, 1, 1, 0); linksBoxLayout->addWidget(mungeLinks, 2, 0, 0); linksBoxLayout->addWidget(preserveHlinks, 2, 1, 0); linksBoxLayout->addWidget(copyDirLinks, 3, 0, 0); linksBoxLayout->addWidget(keepDirLinks, 3, 1, 0); // Permissions & Attributes QGroupBox *permissionsBox = new QGroupBox(i18n("Permissions, etc."), fileHandlingTab); QGridLayout *permissionsBoxLayout = new QGridLayout(permissionsBox); permissionsBoxLayout->setSpacing(5); QCheckBox *preservePerms = new QCheckBox(Smb4KSettings::self()->preservePermissionsItem()->label(), permissionsBox); preservePerms->setObjectName("kcfg_PreservePermissions"); QCheckBox *preserveOwner = new QCheckBox(Smb4KSettings::self()->preserveOwnerItem()->label(), permissionsBox); preserveOwner->setObjectName("kcfg_PreserveOwner"); QCheckBox *preserveGroup = new QCheckBox(Smb4KSettings::self()->preserveGroupItem()->label(), permissionsBox); preserveGroup->setObjectName("kcfg_PreserveGroup"); QCheckBox *preserveDevices = new QCheckBox(Smb4KSettings::self()->preserveDevicesAndSpecialsItem()->label(), permissionsBox); preserveDevices->setObjectName("kcfg_PreserveDevicesAndSpecials"); QCheckBox *preserveTimes = new QCheckBox(Smb4KSettings::self()->preserveTimesItem()->label(), permissionsBox); preserveTimes->setObjectName("kcfg_PreserveTimes"); QCheckBox *omitDirTimes = new QCheckBox(Smb4KSettings::self()->omitDirectoryTimesItem()->label(), permissionsBox); omitDirTimes->setObjectName("kcfg_OmitDirectoryTimes"); permissionsBoxLayout->addWidget(preservePerms, 0, 0, 0); permissionsBoxLayout->addWidget(preserveOwner, 0, 1, 0); permissionsBoxLayout->addWidget(preserveGroup, 1, 0, 0); permissionsBoxLayout->addWidget(preserveDevices, 1, 1, 0); permissionsBoxLayout->addWidget(preserveTimes, 2, 0, 0); permissionsBoxLayout->addWidget(omitDirTimes, 2, 1, 0); fileHandlingTabLayout->addWidget(generalHandlingBox, 0); fileHandlingTabLayout->addWidget(linksBox, 0); fileHandlingTabLayout->addWidget(permissionsBox, 0); fileHandlingTabLayout->addStretch(100); addTab(fileHandlingTab, i18n("File Handling")); // // 'File Transfer' tab // QWidget *transferTab = new QWidget(this); QVBoxLayout *transferTabLayout = new QVBoxLayout(transferTab); transferTabLayout->setSpacing(5); - transferTabLayout->setMargin(0); + transferTabLayout->setContentsMargins(0, 0, 0, 0); // Compression QGroupBox *compressionBox = new QGroupBox(i18n("Compression"), transferTab); QGridLayout *compressionBoxLayout = new QGridLayout(compressionBox); compressionBoxLayout->setSpacing(5); QCheckBox *compressData = new QCheckBox(Smb4KSettings::self()->compressDataItem()->label(), compressionBox); compressData->setObjectName("kcfg_CompressData"); QCheckBox *compressionLevelButton = new QCheckBox(Smb4KSettings::self()->useCompressionLevelItem()->label(), compressionBox); compressionLevelButton->setObjectName("kcfg_UseCompressionLevel"); QSpinBox *compressionLevel = new QSpinBox(compressionBox); compressionLevel->setObjectName("kcfg_CompressionLevel"); QCheckBox *skipCompressionButton = new QCheckBox(Smb4KSettings::self()->useSkipCompressionItem()->label(), compressionBox); skipCompressionButton->setObjectName("kcfg_UseSkipCompression"); KLineEdit *skipCompression = new KLineEdit(compressionBox); skipCompression->setObjectName("kcfg_SkipCompression"); skipCompression->setClearButtonEnabled(true); compressionBoxLayout->addWidget(compressData, 0, 0, 1, -1, 0); compressionBoxLayout->addWidget(compressionLevelButton, 1, 0, 1, 1, 0); compressionBoxLayout->addWidget(compressionLevel, 1, 1, 1, 1, 0); compressionBoxLayout->addWidget(skipCompressionButton, 2, 0, 1, 1, 0); compressionBoxLayout->addWidget(skipCompression, 2, 1, 1, 1, 0); // Files QGroupBox *filesBox = new QGroupBox(i18n("Files"), transferTab); QGridLayout *filesBoxLayout = new QGridLayout(filesBox); filesBoxLayout->setSpacing(5); QCheckBox *minTransferSizeButton = new QCheckBox(Smb4KSettings::self()->useMinimalTransferSizeItem()->label(), filesBox); minTransferSizeButton->setObjectName("kcfg_UseMinimalTransferSize"); QSpinBox *minTransferSize = new QSpinBox(filesBox); minTransferSize->setObjectName("kcfg_MinimalTransferSize"); minTransferSize->setSuffix(i18n(" KiB")); QCheckBox *maxTransferSizeButton = new QCheckBox(Smb4KSettings::self()->useMaximalTransferSizeItem()->label(), filesBox); maxTransferSizeButton->setObjectName("kcfg_UseMaximalTransferSize"); QSpinBox *maxTransferSize = new QSpinBox(filesBox); maxTransferSize->setObjectName("kcfg_MaximalTransferSize"); maxTransferSize->setSuffix(i18n(" KiB")); QCheckBox *keepPartial = new QCheckBox(Smb4KSettings::self()->keepPartialItem()->label(), filesBox); keepPartial->setObjectName("kcfg_KeepPartial"); QCheckBox *partialDirButton = new QCheckBox(Smb4KSettings::self()->usePartialDirectoryItem()->label(), filesBox); partialDirButton->setObjectName("kcfg_UsePartialDirectory"); KUrlRequester *partialDir = new KUrlRequester(filesBox); partialDir->setObjectName("kcfg_PartialDirectory"); partialDir->setMode(KFile::Directory | KFile::LocalOnly); filesBoxLayout->addWidget(minTransferSizeButton, 0, 0, 0); filesBoxLayout->addWidget(minTransferSize, 0, 1, 0); filesBoxLayout->addWidget(maxTransferSizeButton, 1, 0, 0); filesBoxLayout->addWidget(maxTransferSize, 1, 1, 0); filesBoxLayout->addWidget(keepPartial, 2, 0, 1, -1, 0); filesBoxLayout->addWidget(partialDirButton, 3, 0, 0); filesBoxLayout->addWidget(partialDir, 3, 1, 0); // Miscellaneous QGroupBox *miscTransferBox = new QGroupBox(i18n("Miscellaneous"), transferTab); QGridLayout *miscTransferBoxLayout = new QGridLayout(miscTransferBox); miscTransferBoxLayout->setSpacing(5); QCheckBox *bwLimitButton = new QCheckBox(Smb4KSettings::self()->useBandwidthLimitItem()->label(), miscTransferBox); bwLimitButton->setObjectName("kcfg_UseBandwidthLimit"); QSpinBox *bwLimit = new QSpinBox(miscTransferBox); bwLimit->setObjectName("kcfg_BandwidthLimit"); bwLimit->setSuffix(i18n(" KiB/s")); miscTransferBoxLayout->addWidget(bwLimitButton, 0, 0, 0); miscTransferBoxLayout->addWidget(bwLimit, 0, 1, 0); transferTabLayout->addWidget(compressionBox, 0); transferTabLayout->addWidget(filesBox, 0); transferTabLayout->addWidget(miscTransferBox, 0); transferTabLayout->addStretch(100); addTab(transferTab, i18n("File Transfer")); // // 'File Deletion' tab // QWidget *deleteTab = new QWidget(this); QVBoxLayout *deleteTabLayout = new QVBoxLayout(deleteTab); deleteTabLayout->setSpacing(5); - deleteTabLayout->setMargin(0); + deleteTabLayout->setContentsMargins(0, 0, 0, 0); // Files and Directories QGroupBox *filesAndDirsBox = new QGroupBox(i18n("Files && Directories"), deleteTab); QGridLayout *filesAndDirsBoxLayout = new QGridLayout(filesAndDirsBox); filesAndDirsBoxLayout->setSpacing(5); QCheckBox *removeSource = new QCheckBox(Smb4KSettings::self()->removeSourceFilesItem()->label(), filesAndDirsBox); removeSource->setObjectName("kcfg_RemoveSourceFiles"); QCheckBox *deleteExtraneous = new QCheckBox(Smb4KSettings::self()->deleteExtraneousItem()->label(), filesAndDirsBox); deleteExtraneous->setObjectName("kcfg_DeleteExtraneous"); QCheckBox *deleteBefore = new QCheckBox(Smb4KSettings::self()->deleteBeforeItem()->label(), filesAndDirsBox); deleteBefore->setObjectName("kcfg_DeleteBefore"); QCheckBox *deleteAfter = new QCheckBox(Smb4KSettings::self()->deleteAfterItem()->label(), filesAndDirsBox); deleteAfter->setObjectName("kcfg_DeleteAfter"); QCheckBox *deleteDuring = new QCheckBox(Smb4KSettings::self()->deleteDuringItem()->label(), filesAndDirsBox); deleteDuring->setObjectName("kcfg_DeleteDuring"); QCheckBox *deleteExcluded = new QCheckBox(Smb4KSettings::self()->deleteExcludedItem()->label(), filesAndDirsBox); deleteExcluded->setObjectName("kcfg_DeleteExcluded"); QCheckBox *ignoreIOErrors = new QCheckBox(Smb4KSettings::self()->ignoreErrorsItem()->label(), filesAndDirsBox); ignoreIOErrors->setObjectName("kcfg_IgnoreErrors"); QCheckBox *forceDirDeletion = new QCheckBox(Smb4KSettings::self()->forceDirectoryDeletionItem()->label(), filesAndDirsBox); forceDirDeletion->setObjectName("kcfg_ForceDirectoryDeletion"); filesAndDirsBoxLayout->addWidget(removeSource, 0, 0, 0); filesAndDirsBoxLayout->addWidget(deleteExtraneous, 0, 1, 0); filesAndDirsBoxLayout->addWidget(deleteBefore, 1, 0, 0); filesAndDirsBoxLayout->addWidget(deleteAfter, 1, 1, 0); filesAndDirsBoxLayout->addWidget(deleteDuring, 2, 0, 0); filesAndDirsBoxLayout->addWidget(deleteExcluded, 2, 1, 0); filesAndDirsBoxLayout->addWidget(ignoreIOErrors, 3, 0, 0); filesAndDirsBoxLayout->addWidget(forceDirDeletion, 3, 1, 0); // Restrictions QGroupBox *restrictionsBox = new QGroupBox(i18n("Restrictions"), deleteTab); QGridLayout *restrictionsBoxLayout = new QGridLayout(restrictionsBox); restrictionsBoxLayout->setSpacing(5); QCheckBox *maxDeleteButton = new QCheckBox(Smb4KSettings::self()->useMaximumDeleteItem()->label(), restrictionsBox); maxDeleteButton->setObjectName("kcfg_UseMaximumDelete"); QSpinBox *maxDelete = new QSpinBox(restrictionsBox); maxDelete->setObjectName("kcfg_MaximumDeleteValue"); restrictionsBoxLayout->addWidget(maxDeleteButton, 0, 0, 0); restrictionsBoxLayout->addWidget(maxDelete, 0, 1, 0); deleteTabLayout->addWidget(filesAndDirsBox, 0); deleteTabLayout->addWidget(restrictionsBox, 0); deleteTabLayout->addStretch(100); addTab(deleteTab, i18n("File Deletion")); // // 'Filter' tab // QWidget *filterTab = new QWidget(this); QVBoxLayout *filterTabLayout = new QVBoxLayout(filterTab); filterTabLayout->setSpacing(5); - filterTabLayout->setMargin(0); + filterTabLayout->setContentsMargins(0, 0, 0, 0); // General QGroupBox *generalFilterBox = new QGroupBox(i18n("General"), filterTab); QGridLayout *generalFilterBoxLayout = new QGridLayout(generalFilterBox); generalFilterBoxLayout->setSpacing(5); QCheckBox *cvsExclude = new QCheckBox(Smb4KSettings::self()->useCVSExcludeItem()->label(), generalFilterBox); cvsExclude->setObjectName("kcfg_UseCVSExclude"); QCheckBox *excludePatternButton = new QCheckBox(Smb4KSettings::self()->useExcludePatternItem()->label(), generalFilterBox); excludePatternButton->setObjectName("kcfg_UseExcludePattern"); KLineEdit *excludePattern = new KLineEdit(generalFilterBox); excludePattern->setObjectName("kcfg_ExcludePattern"); excludePattern->setClearButtonEnabled(true); QCheckBox *excludeFromButton = new QCheckBox(Smb4KSettings::self()->useExcludeFromItem()->label(), generalFilterBox); excludeFromButton->setObjectName("kcfg_UseExcludeFrom"); KUrlRequester *excludeFrom = new KUrlRequester(generalFilterBox); excludeFrom->setObjectName("kcfg_ExcludeFrom"); excludeFrom->setMode(KFile::File | KFile::LocalOnly); QCheckBox *includePatternButton = new QCheckBox(Smb4KSettings::self()->useIncludePatternItem()->label(), generalFilterBox); includePatternButton->setObjectName("kcfg_UseIncludePattern"); KLineEdit *includePattern = new KLineEdit(generalFilterBox); includePattern->setObjectName("kcfg_IncludePattern"); includePattern->setClearButtonEnabled(true); QCheckBox *includeFromButton = new QCheckBox(Smb4KSettings::self()->useIncludeFromItem()->label(), generalFilterBox); includeFromButton->setObjectName("kcfg_UseIncludeFrom"); KUrlRequester *includeFrom = new KUrlRequester(generalFilterBox); includeFrom->setObjectName("kcfg_IncludeFrom"); includeFrom->setMode(KFile::File | KFile::LocalOnly); generalFilterBoxLayout->addWidget(cvsExclude, 0, 0, 1, -1, 0); generalFilterBoxLayout->addWidget(excludePatternButton, 1, 0, 0); generalFilterBoxLayout->addWidget(excludePattern, 1, 1, 0); generalFilterBoxLayout->addWidget(excludeFromButton, 2, 0, 0); generalFilterBoxLayout->addWidget(excludeFrom, 2, 1, 0); generalFilterBoxLayout->addWidget(includePatternButton, 3, 0, 0); generalFilterBoxLayout->addWidget(includePattern, 3, 1, 0); generalFilterBoxLayout->addWidget(includeFromButton, 4, 0, 0); generalFilterBoxLayout->addWidget(includeFrom, 4, 1, 0); // Filter rules QGroupBox *filterRulesBox = new QGroupBox(i18n("Filter Rules"), filterTab); QGridLayout *filterRulesBoxLayout = new QGridLayout(filterRulesBox); filterRulesBoxLayout->setSpacing(5); QLabel *customRulesLabel = new QLabel(Smb4KSettings::self()->customFilteringRulesItem()->label(), filterRulesBox); KLineEdit *customRules = new KLineEdit(filterRulesBox); customRules->setObjectName("kcfg_CustomFilteringRules"); customRules->setClearButtonEnabled(true); customRulesLabel->setBuddy(customRules); QLabel *specialRulesLabel = new QLabel(i18n("Special filter rules:"), filterRulesBox); QCheckBox *useFFilterRule = new QCheckBox(Smb4KSettings::self()->useFFilterRuleItem()->label(), filterRulesBox); useFFilterRule->setObjectName("kcfg_UseFFilterRule"); QCheckBox *useFFFilterRule = new QCheckBox(Smb4KSettings::self()->useFFFilterRuleItem()->label(), filterRulesBox); useFFFilterRule->setObjectName("kcfg_UseFFFilterRule"); filterRulesBoxLayout->addWidget(customRulesLabel, 0, 0, 0); filterRulesBoxLayout->addWidget(customRules, 0, 1, 0); filterRulesBoxLayout->addWidget(specialRulesLabel, 1, 0, 1, -1, 0); filterRulesBoxLayout->addWidget(useFFilterRule, 2, 0, 1, -1, 0); filterRulesBoxLayout->addWidget(useFFFilterRule, 3, 0, 1, -1, 0); filterTabLayout->addWidget(generalFilterBox, 0); filterTabLayout->addWidget(filterRulesBox, 0); filterTabLayout->addStretch(100); addTab(filterTab, i18n("Filtering")); // // 'Miscellaneous' tab // QWidget *miscTab = new QWidget(this); QVBoxLayout *miscTabLayout = new QVBoxLayout(miscTab); miscTabLayout->setSpacing(5); - miscTabLayout->setMargin(0); + miscTabLayout->setContentsMargins(0, 0, 0, 0); // Checksums QGroupBox *checksumsBox= new QGroupBox(i18n("Checksums"), miscTab); QGridLayout *checksumsBoxLayout = new QGridLayout(checksumsBox); checksumsBoxLayout->setSpacing(5); QCheckBox *blockSizeButton = new QCheckBox(Smb4KSettings::self()->useBlockSizeItem()->label(), checksumsBox); blockSizeButton->setObjectName("kcfg_UseBlockSize"); QSpinBox *blockSize = new QSpinBox(checksumsBox); blockSize->setObjectName("kcfg_BlockSize"); QCheckBox *checksumSeedButton = new QCheckBox(Smb4KSettings::self()->useChecksumSeedItem()->label(), checksumsBox); checksumSeedButton->setObjectName("kcfg_UseChecksumSeed"); QSpinBox *checksumSeed = new QSpinBox(checksumsBox); checksumSeed->setObjectName("kcfg_ChecksumSeed"); QCheckBox *useChecksum = new QCheckBox(Smb4KSettings::self()->useChecksumItem()->label(), checksumsBox); useChecksum->setObjectName("kcfg_UseChecksum"); checksumsBoxLayout->addWidget(blockSizeButton, 0, 0, 0); checksumsBoxLayout->addWidget(blockSize, 0, 1, 0); checksumsBoxLayout->addWidget(checksumSeedButton, 1, 0, 0); checksumsBoxLayout->addWidget(checksumSeed, 1, 1, 0); checksumsBoxLayout->addWidget(useChecksum, 2, 0, 0); // Miscellaneous QGroupBox *miscBox = new QGroupBox(i18n("Miscellaneous"), miscTab); QGridLayout *miscBoxLayout = new QGridLayout(miscBox); miscBoxLayout->setSpacing(5); QCheckBox *oneFilesystem = new QCheckBox(Smb4KSettings::self()->oneFileSystemItem()->label(), miscBox); oneFilesystem->setObjectName("kcfg_OneFileSystem"); QCheckBox *delayUpdates = new QCheckBox(Smb4KSettings::self()->delayUpdatesItem()->label(), miscBox); delayUpdates->setObjectName("kcfg_DelayUpdates"); miscBoxLayout->addWidget(oneFilesystem, 0, 0, 0); miscBoxLayout->addWidget(delayUpdates, 0, 1, 0); miscTabLayout->addWidget(checksumsBox, 0); miscTabLayout->addWidget(miscBox, 0); miscTabLayout->addStretch(100); addTab(miscTab, i18n("Miscellaneous")); // // Connections // connect(archiveMode, SIGNAL(toggled(bool)), this, SLOT(slotArchiveToggled(bool))); connect(recurseDirs, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preserveLinks, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preservePerms, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preserveTimes, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preserveGroup, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preserveOwner, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(preserveDevices, SIGNAL(toggled(bool)), this, SLOT(slotUncheckArchive(bool))); connect(useFFilterRule, SIGNAL(toggled(bool)), this, SLOT(slotFFilterRuleToggled(bool))); connect(useFFFilterRule, SIGNAL(toggled(bool)), this, SLOT(slotFFFilterRuleToggled(bool))); connect(makeBackups, SIGNAL(toggled(bool)), this, SLOT(slotBackupToggled(bool))); connect(compressData, SIGNAL(toggled(bool)), this, SLOT(slotCompressToggled(bool))); connect(keepPartial, SIGNAL(toggled(bool)), this, SLOT(slotKeepPartialToggled(bool))); slotArchiveToggled(Smb4KSettings::archiveMode()); slotBackupToggled(Smb4KSettings::makeBackups()); slotCompressToggled(Smb4KSettings::compressData()); slotKeepPartialToggled(Smb4KSettings::keepPartial()); } Smb4KConfigPageSynchronization::~Smb4KConfigPageSynchronization() { } ///////////////////////////////////////////////////////////////////////////// // SLOT IMPLEMENTATIONS ///////////////////////////////////////////////////////////////////////////// void Smb4KConfigPageSynchronization::slotArchiveToggled(bool checked) { if (checked) { findChild("kcfg_RecurseIntoDirectories")->setChecked(checked); findChild("kcfg_PreserveSymlinks")->setChecked(checked); findChild("kcfg_PreservePermissions")->setChecked(checked); findChild("kcfg_PreserveTimes")->setChecked(checked); findChild("kcfg_PreserveGroup")->setChecked(checked); findChild("kcfg_PreserveOwner")->setChecked(checked); findChild("kcfg_PreserveDevicesAndSpecials")->setChecked(checked); } } void Smb4KConfigPageSynchronization::slotUncheckArchive(bool checked) { if (!checked) { findChild("kcfg_ArchiveMode")->setChecked(checked); } } void Smb4KConfigPageSynchronization::slotBackupToggled(bool checked) { findChild("kcfg_UseBackupDirectory")->setEnabled(checked); findChild("kcfg_BackupDirectory")->setEnabled(checked); findChild("kcfg_UseBackupSuffix")->setEnabled(checked); findChild("kcfg_BackupSuffix")->setEnabled(checked); } void Smb4KConfigPageSynchronization::slotCompressToggled(bool checked) { findChild("kcfg_UseCompressionLevel")->setEnabled(checked); findChild("kcfg_CompressionLevel")->setEnabled(checked); findChild("kcfg_UseSkipCompression")->setEnabled(checked); findChild("kcfg_SkipCompression")->setEnabled(checked); } void Smb4KConfigPageSynchronization::slotKeepPartialToggled(bool checked) { findChild("kcfg_UsePartialDirectory")->setEnabled(checked); findChild("kcfg_PartialDirectory")->setEnabled(checked); } void Smb4KConfigPageSynchronization::slotFFilterRuleToggled(bool on) { QCheckBox *ff_filter = findChild("kcfg_UseFFFilterRule"); if (on && ff_filter->isChecked()) { ff_filter->setChecked(false); } } void Smb4KConfigPageSynchronization::slotFFFilterRuleToggled(bool on) { QCheckBox *f_filter = findChild("kcfg_UseFFilterRule"); if (on && f_filter->isChecked()) { f_filter->setChecked(false); } } diff --git a/smb4k/smb4kconfigpageuserinterface.cpp b/smb4k/smb4kconfigpageuserinterface.cpp index 406af67..b92074b 100644 --- a/smb4k/smb4kconfigpageuserinterface.cpp +++ b/smb4k/smb4kconfigpageuserinterface.cpp @@ -1,227 +1,227 @@ /*************************************************************************** This configuration page takes care of all settings concerning the user interface ------------------- begin : Mi Aug 30 2006 copyright : (C) 2006-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4kconfigpageuserinterface.h" #include "core/smb4ksettings.h" // Qt includes #include #include #include #include #include #include #include // KDE includes #include #include Smb4KConfigPageUserInterface::Smb4KConfigPageUserInterface(QWidget *parent) : QWidget(parent) { // // Layout // QVBoxLayout *layout = new QVBoxLayout(this); layout->setSpacing(5); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); // // Main Window settings // QGroupBox *mainWindowBox = new QGroupBox(i18n("Main Window"), this); QGridLayout *mainWindowBoxLayout = new QGridLayout(mainWindowBox); mainWindowBoxLayout->setSpacing(5); QLabel *tabOrientationLabel = new QLabel(Smb4KSettings::self()->mainWindowTabOrientationItem()->label(), mainWindowBox); KComboBox *tabOrientation = new KComboBox(mainWindowBox); tabOrientation->setObjectName("kcfg_MainWindowTabOrientation"); QList tabOrientationChoices = Smb4KSettings::self()->mainWindowTabOrientationItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &to : tabOrientationChoices) { tabOrientation->addItem(to.label); } tabOrientationLabel->setBuddy(tabOrientation); mainWindowBoxLayout->addWidget(tabOrientationLabel, 0, 0, 0); mainWindowBoxLayout->addWidget(tabOrientation, 0, 1, 0); QCheckBox *showBookmarkLabel = new QCheckBox(Smb4KSettings::self()->showCustomBookmarkLabelItem()->label(), mainWindowBox); showBookmarkLabel->setObjectName("kcfg_ShowCustomBookmarkLabel"); mainWindowBoxLayout->addWidget(showBookmarkLabel, 1, 0, 1, 2, 0); layout->addWidget(mainWindowBox, 0); // // Network Neighborhood settings // QGroupBox *networkNeighhoodBox = new QGroupBox(i18n("Network Neighborhood"), this); QGridLayout *networkNeighhoodBoxLayout = new QGridLayout(networkNeighhoodBox); networkNeighhoodBoxLayout->setSpacing(5); QCheckBox *autoExpand = new QCheckBox(Smb4KSettings::self()->autoExpandNetworkItemsItem()->label(), networkNeighhoodBox); autoExpand->setObjectName("kcfg_AutoExpandNetworkItems"); networkNeighhoodBoxLayout->addWidget(autoExpand, 0, 0, 0); QCheckBox *showType = new QCheckBox(Smb4KSettings::self()->showTypeItem()->label(), networkNeighhoodBox); showType->setObjectName("kcfg_ShowType"); networkNeighhoodBoxLayout->addWidget(showType, 0, 1, 0); QCheckBox *showIpAddress = new QCheckBox(Smb4KSettings::self()->showIPAddressItem()->label(), networkNeighhoodBox); showIpAddress->setObjectName("kcfg_ShowIPAddress"); networkNeighhoodBoxLayout->addWidget(showIpAddress, 1, 0, 0); QCheckBox *showComment = new QCheckBox(Smb4KSettings::self()->showCommentItem()->label(), networkNeighhoodBox); showComment->setObjectName("kcfg_ShowComment"); networkNeighhoodBoxLayout->addWidget(showComment, 1, 1, 0); QCheckBox *showNetworkTooltip = new QCheckBox(Smb4KSettings::self()->showNetworkItemToolTipItem()->label(), networkNeighhoodBox); showNetworkTooltip->setObjectName("kcfg_ShowNetworkItemToolTip"); networkNeighhoodBoxLayout->addWidget(showNetworkTooltip, 2, 0, 1, 2, 0); layout->addWidget(networkNeighhoodBox, 0); // // Shares View settings // QGroupBox *sharesViewBox = new QGroupBox(i18n("Shares View"), this); QGridLayout *sharesViewBoxLayout = new QGridLayout(sharesViewBox); sharesViewBoxLayout->setSpacing(5); QLabel *viewModeLabel = new QLabel(Smb4KSettings::self()->sharesViewModeItem()->label(), sharesViewBox); KComboBox *viewMode = new KComboBox(sharesViewBox); viewMode->setObjectName("kcfg_SharesViewMode"); QList sharesViewModeChoices = Smb4KSettings::self()->sharesViewModeItem()->choices(); for (const KCoreConfigSkeleton::ItemEnum::Choice &vm : sharesViewModeChoices) { viewMode->addItem(vm.label); } viewModeLabel->setBuddy(viewMode); sharesViewBoxLayout->addWidget(viewModeLabel, 0, 0, 0); sharesViewBoxLayout->addWidget(viewMode, 0, 1, 0); QCheckBox *showShareTooltip = new QCheckBox(Smb4KSettings::self()->showShareToolTipItem()->label(), sharesViewBox); showShareTooltip->setObjectName("kcfg_ShowShareToolTip"); sharesViewBoxLayout->addWidget(showShareTooltip, 1, 0, 1, 2, 0); layout->addWidget(sharesViewBox, 0); layout->addStretch(100); // // Network item tooltips // QGroupBox *network_tooltips_box = new QGroupBox(i18n("Tooltips"), networkNeighborhoodTab); // // QGridLayout *n_tooltips_layout = new QGridLayout(network_tooltips_box); // n_tooltips_layout->setSpacing(5); // // // n_tooltips_layout->addWidget(network_tooltip, 0, 0, 0); // // networkNeighborhoodTabLayout->addWidget(behavior_box); // networkNeighborhoodTabLayout->addWidget(columns_box); // networkNeighborhoodTabLayout->addWidget(network_tooltips_box); // networkNeighborhoodTabLayout->addStretch(100); // // addTab(networkNeighborhoodTab, i18n("Network Neighborhood")); // // // // // Shares view // // // QWidget *shares_view_tab = new QWidget(this); // // QVBoxLayout *shares_view_layout = new QVBoxLayout(shares_view_tab); // shares_view_layout->setSpacing(5); // shares_view_layout->setMargin(0); // // // View // QGroupBox *viewBox = new QGroupBox(i18n("View Mode"), shares_view_tab); // QHBoxLayout *viewBoxLayout = new QHBoxLayout(viewBox); // viewBoxLayout->setSpacing(5); // // QLabel *viewModeLabel = new QLabel(Smb4KSettings::self()->sharesViewModeItem()->label(), viewBox); // KComboBox *viewMode = new KComboBox(viewBox); // viewMode->setObjectName("kcfg_SharesViewMode"); // viewMode->insertItem(Smb4KSettings::EnumSharesViewMode::IconView, // Smb4KSettings::self()->sharesViewModeItem()->choices().value(Smb4KSettings::EnumSharesViewMode::IconView).label); // viewMode->insertItem(Smb4KSettings::EnumSharesViewMode::ListView, // Smb4KSettings::self()->sharesViewModeItem()->choices().value(Smb4KSettings::EnumSharesViewMode::ListView).label); // viewModeLabel->setBuddy(viewMode); // // viewBoxLayout->addWidget(viewModeLabel); // viewBoxLayout->addWidget(viewMode); // // // Share tooltips // QGroupBox *share_tooltips_box = new QGroupBox(i18n("Tooltips"), shares_view_tab); // // QGridLayout *s_tooltips_layout = new QGridLayout(share_tooltips_box); // s_tooltips_layout->setSpacing(5); // // QCheckBox *show_share_tooltip = new QCheckBox(Smb4KSettings::self()->showShareToolTipItem()->label(), share_tooltips_box); // show_share_tooltip->setObjectName("kcfg_ShowShareToolTip"); // // s_tooltips_layout->addWidget(show_share_tooltip, 0, 0, 0); // // QSpacerItem *spacer4 = new QSpacerItem(10, 10, QSizePolicy::Preferred, QSizePolicy::Expanding); // // shares_view_layout->addWidget(viewBox); // shares_view_layout->addWidget(share_tooltips_box); // shares_view_layout->addItem(spacer4); // // addTab(shares_view_tab, i18n("Mounted Shares")); } Smb4KConfigPageUserInterface::~Smb4KConfigPageUserInterface() { } ///////////////////////////////////////////////////////////////////////////// // SLOT IMPLEMENTATIONS ///////////////////////////////////////////////////////////////////////////// diff --git a/smb4k/smb4knetworkbrowserdockwidget.cpp b/smb4k/smb4knetworkbrowserdockwidget.cpp index 794e6cd..908359a 100644 --- a/smb4k/smb4knetworkbrowserdockwidget.cpp +++ b/smb4k/smb4knetworkbrowserdockwidget.cpp @@ -1,1450 +1,1450 @@ /*************************************************************************** The network neighborhood browser dock widget ------------------- begin : Sat Apr 28 2018 copyright : (C) 2018-2019 by Alexander Reinholdt email : alexander.reinholdt@kdemail.net ***************************************************************************/ /*************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, but * * WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* * MA 02110-1335, USA * ***************************************************************************/ // application specific includes #include "smb4knetworkbrowserdockwidget.h" #include "smb4knetworkbrowseritem.h" #include "core/smb4kmounter.h" #include "core/smb4kworkgroup.h" #include "core/smb4khost.h" #include "core/smb4kshare.h" #include "core/smb4ksettings.h" #include "core/smb4kbookmarkhandler.h" #include "core/smb4kwalletmanager.h" #include "core/smb4kcustomoptionsmanager.h" #include "core/smb4kclient.h" // Qt includes #include #include #include #include #include // KDE includes #include #include #include #include using namespace Smb4KGlobal; Smb4KNetworkBrowserDockWidget::Smb4KNetworkBrowserDockWidget(const QString& title, QWidget* parent) : QDockWidget(title, parent) { // // The network browser widget // QWidget *mainWidget = new QWidget(this); QVBoxLayout *mainWidgetLayout = new QVBoxLayout(mainWidget); - mainWidgetLayout->setMargin(0); + mainWidgetLayout->setContentsMargins(0, 0, 0, 0); mainWidgetLayout->setSpacing(5); m_networkBrowser = new Smb4KNetworkBrowser(mainWidget); m_searchToolBar = new Smb4KNetworkSearchToolBar(mainWidget); m_searchToolBar->setVisible(false); mainWidgetLayout->addWidget(m_networkBrowser); mainWidgetLayout->addWidget(m_searchToolBar); setWidget(mainWidget); // // The action collection // m_actionCollection = new KActionCollection(this); // // The context menu // m_contextMenu = new KActionMenu(this); // // Search underway? // m_searchRunning = false; // // Set up the actions // setupActions(); // // Load the settings // loadSettings(); // // Connections // connect(m_networkBrowser, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenuRequested(QPoint))); connect(m_networkBrowser, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(slotItemActivated(QTreeWidgetItem*,int))); connect(m_networkBrowser, SIGNAL(itemSelectionChanged()), this, SLOT(slotItemSelectionChanged())); connect(m_searchToolBar, SIGNAL(close()), this, SLOT(slotHideSearchToolBar())); connect(m_searchToolBar, SIGNAL(search(QString)), this, SLOT(slotPerformSearch(QString))); connect(m_searchToolBar, SIGNAL(abort()), this, SLOT(slotStopSearch())); connect(m_searchToolBar, SIGNAL(jumpToResult(QString)), this, SLOT(slotJumpToResult(QString))); connect(m_searchToolBar, SIGNAL(clearSearchResults()), this, SLOT(slotClearSearchResults())); connect(Smb4KClient::self(), SIGNAL(aboutToStart(NetworkItemPtr,int)), this, SLOT(slotClientAboutToStart(NetworkItemPtr,int))); connect(Smb4KClient::self(), SIGNAL(finished(NetworkItemPtr,int)), this, SLOT(slotClientFinished(NetworkItemPtr,int))); connect(Smb4KClient::self(), SIGNAL(workgroups()), this, SLOT(slotWorkgroups())); connect(Smb4KClient::self(), SIGNAL(hosts(WorkgroupPtr)), this, SLOT(slotWorkgroupMembers(WorkgroupPtr))); connect(Smb4KClient::self(), SIGNAL(shares(HostPtr)), this, SLOT(slotShares(HostPtr))); connect(Smb4KClient::self(), SIGNAL(searchResults(QList)), this, SLOT(slotSearchResults(QList))); connect(Smb4KMounter::self(), SIGNAL(mounted(SharePtr)), this, SLOT(slotShareMounted(SharePtr))); connect(Smb4KMounter::self(), SIGNAL(unmounted(SharePtr)), this, SLOT(slotShareUnmounted(SharePtr))); connect(Smb4KMounter::self(), SIGNAL(aboutToStart(int)), this, SLOT(slotMounterAboutToStart(int))); connect(Smb4KMounter::self(), SIGNAL(finished(int)), this, SLOT(slotMounterFinished(int))); connect(KIconLoader::global(), SIGNAL(iconChanged(int)), this, SLOT(slotIconSizeChanged(int))); } Smb4KNetworkBrowserDockWidget::~Smb4KNetworkBrowserDockWidget() { } void Smb4KNetworkBrowserDockWidget::setupActions() { // // Rescan and abort dual action // KDualAction *rescanAbortAction = new KDualAction(this); rescanAbortAction->setInactiveIcon(KDE::icon("view-refresh")); rescanAbortAction->setInactiveText(i18n("Scan Netwo&rk")); rescanAbortAction->setActiveIcon(KDE::icon("process-stop")); rescanAbortAction->setActiveText(i18n("&Abort")); rescanAbortAction->setAutoToggle(false); rescanAbortAction->setEnabled(true); connect(rescanAbortAction, SIGNAL(triggered(bool)), this, SLOT(slotRescanAbortActionTriggered(bool))); m_actionCollection->addAction("rescan_abort_action", rescanAbortAction); m_actionCollection->setDefaultShortcut(rescanAbortAction, QKeySequence::Refresh); // // Search action // QAction *searchAction = new QAction(KDE::icon("search"), i18n("&Search"), this); connect(searchAction, SIGNAL(triggered(bool)), this, SLOT(slotShowSearchToolBar())); m_actionCollection->addAction("search_action", searchAction); m_actionCollection->setDefaultShortcut(searchAction, QKeySequence::Find); // // Separator // QAction *separator1 = new QAction(this); separator1->setSeparator(true); m_actionCollection->addAction("network_separator1", separator1); // // Bookmark action // QAction *bookmarkAction = new QAction(KDE::icon("bookmark-new"), i18n("Add &Bookmark"), this); bookmarkAction->setEnabled(false); connect(bookmarkAction, SIGNAL(triggered(bool)), this, SLOT(slotAddBookmark(bool))); m_actionCollection->addAction("bookmark_action", bookmarkAction); m_actionCollection->setDefaultShortcut(bookmarkAction, QKeySequence(Qt::CTRL+Qt::Key_B)); // // Mount dialog action // QAction *manualAction = new QAction(KDE::icon("view-form", QStringList("emblem-mounted")), i18n("&Open Mount Dialog"), this); manualAction->setEnabled(true); connect(manualAction, SIGNAL(triggered(bool)), this, SLOT(slotMountManually(bool))); m_actionCollection->addAction("mount_manually_action", manualAction); m_actionCollection->setDefaultShortcut(manualAction, QKeySequence(Qt::CTRL+Qt::Key_O)); // // Separator // QAction *separator2 = new QAction(this); separator2->setSeparator(true); m_actionCollection->addAction("network_separator2", separator2); // // Authentication action // QAction *authAction = new QAction(KDE::icon("dialog-password"), i18n("Au&thentication"), this); authAction->setEnabled(false); connect(authAction, SIGNAL(triggered(bool)), this, SLOT(slotAuthentication(bool))); m_actionCollection->addAction("authentication_action", authAction); m_actionCollection->setDefaultShortcut(authAction, QKeySequence(Qt::CTRL+Qt::Key_T)); // // Custom options action // QAction *customAction = new QAction(KDE::icon("preferences-system-network"), i18n("&Custom Options"), this); customAction->setEnabled(false); connect(customAction, SIGNAL(triggered(bool)), this, SLOT(slotCustomOptions(bool))); m_actionCollection->addAction("custom_action", customAction); m_actionCollection->setDefaultShortcut(customAction, QKeySequence(Qt::CTRL+Qt::Key_C)); // // Preview action // QAction *previewAction = new QAction(KDE::icon("view-list-icons"), i18n("Pre&view"), this); previewAction->setEnabled(false); connect(previewAction, SIGNAL(triggered(bool)), this, SLOT(slotPreview(bool))); m_actionCollection->addAction("preview_action", previewAction); m_actionCollection->setDefaultShortcut(previewAction, QKeySequence(Qt::CTRL+Qt::Key_V)); // // Print action // QAction *printAction = new QAction(KDE::icon("printer"), i18n("&Print File"), this); printAction->setEnabled(false); connect(printAction, SIGNAL(triggered(bool)), this, SLOT(slotPrint(bool))); m_actionCollection->addAction("print_action", printAction); m_actionCollection->setDefaultShortcut(printAction, QKeySequence(Qt::CTRL+Qt::Key_P)); // // Mount/unmount action // KDualAction *mountAction = new KDualAction(this); KGuiItem mountItem(i18n("&Mount"), KDE::icon("media-mount")); KGuiItem unmountItem(i18n("&Unmount"), KDE::icon("media-eject")); mountAction->setActiveGuiItem(mountItem); mountAction->setInactiveGuiItem(unmountItem); mountAction->setActive(true); mountAction->setAutoToggle(false); mountAction->setEnabled(false); connect(mountAction, SIGNAL(triggered(bool)), this, SLOT(slotMountActionTriggered(bool))); connect(mountAction, SIGNAL(activeChanged(bool)), this, SLOT(slotMountActionChanged(bool))); m_actionCollection->addAction("mount_action", mountAction); m_actionCollection->setDefaultShortcut(mountAction, QKeySequence(Qt::CTRL+Qt::Key_M)); // // Plug the actions into the context menu // for (QAction *a : m_actionCollection->actions()) { m_contextMenu->addAction(a); } } void Smb4KNetworkBrowserDockWidget::loadSettings() { // // Load icon size // int iconSize = KIconLoader::global()->currentSize(KIconLoader::Small); m_networkBrowser->setIconSize(QSize(iconSize, iconSize)); // // Show/hide columns // m_networkBrowser->setColumnHidden(Smb4KNetworkBrowser::IP, !Smb4KSettings::showIPAddress()); m_networkBrowser->setColumnHidden(Smb4KNetworkBrowser::Type, !Smb4KSettings::showType()); m_networkBrowser->setColumnHidden(Smb4KNetworkBrowser::Comment, !Smb4KSettings::showComment()); // // Load and apply the positions of the columns // KConfigGroup configGroup(Smb4KSettings::self()->config(), "NetworkBrowserPart"); QMap map; map.insert(configGroup.readEntry("ColumnPositionNetwork", (int)Smb4KNetworkBrowser::Network), Smb4KNetworkBrowser::Network); map.insert(configGroup.readEntry("ColumnPositionType", (int)Smb4KNetworkBrowser::Type), Smb4KNetworkBrowser::Type); map.insert(configGroup.readEntry("ColumnPositionIP", (int)Smb4KNetworkBrowser::IP), Smb4KNetworkBrowser::IP); map.insert(configGroup.readEntry("ColumnPositionComment", (int)Smb4KNetworkBrowser::Comment), Smb4KNetworkBrowser::Comment); QMap::const_iterator it = map.constBegin(); while (it != map.constEnd()) { if (it.key() != m_networkBrowser->header()->visualIndex(it.value())) { m_networkBrowser->header()->moveSection(m_networkBrowser->header()->visualIndex(it.value()), it.key()); } ++it; } // // Apply the completion strings to the search toolbar // m_searchToolBar->setCompletionStrings(configGroup.readEntry("SearchItemCompletion", QStringList())); // // Does anything has to be changed with the marked shares? // for (const SharePtr &share : mountedSharesList()) { // We do not need to use slotShareUnmounted() here, too, // because slotShareMounted() will take care of everything // we need here. slotShareMounted(share); } // // Adjust the actions, if needed // slotItemSelectionChanged(); } void Smb4KNetworkBrowserDockWidget::saveSettings() { // // Save the position of the columns // KConfigGroup configGroup(Smb4KSettings::self()->config(), "NetworkBrowserPart"); configGroup.writeEntry("ColumnPositionNetwork", m_networkBrowser->header()->visualIndex(Smb4KNetworkBrowser::Network)); configGroup.writeEntry("ColumnPositionType", m_networkBrowser->header()->visualIndex(Smb4KNetworkBrowser::Type)); configGroup.writeEntry("ColumnPositionIP", m_networkBrowser->header()->visualIndex(Smb4KNetworkBrowser::IP)); configGroup.writeEntry("ColumnPositionComment", m_networkBrowser->header()->visualIndex(Smb4KNetworkBrowser::Comment)); // // Save the completion strings // configGroup.writeEntry("SearchItemCompletion", m_searchToolBar->completionStrings()); configGroup.sync(); } KActionCollection *Smb4KNetworkBrowserDockWidget::actionCollection() { return m_actionCollection; } void Smb4KNetworkBrowserDockWidget::slotContextMenuRequested(const QPoint& pos) { m_contextMenu->menu()->popup(m_networkBrowser->viewport()->mapToGlobal(pos)); } void Smb4KNetworkBrowserDockWidget::slotItemActivated(QTreeWidgetItem* item, int /*column*/) { // // Process the activated item // if (QApplication::keyboardModifiers() == Qt::NoModifier && m_networkBrowser->selectedItems().size() == 1) { Smb4KNetworkBrowserItem *browserItem = static_cast(item); if (browserItem) { switch (browserItem->type()) { case Workgroup: { if (browserItem->isExpanded()) { Smb4KClient::self()->lookupDomainMembers(browserItem->workgroupItem()); } break; } case Host: { if (browserItem->isExpanded()) { Smb4KClient::self()->lookupShares(browserItem->hostItem()); } break; } case Share: { if (!browserItem->shareItem()->isPrinter()) { slotMountActionTriggered(false); // boolean is ignored } else { slotPrint(false); // boolean is ignored } break; } default: { break; } } } } } void Smb4KNetworkBrowserDockWidget::slotItemSelectionChanged() { // // Get the selected item // QList items = m_networkBrowser->selectedItems(); // // Enable/disable and/or adjust the actions depending of the number // of selected items and their type // if (items.size() == 1) { Smb4KNetworkBrowserItem *browserItem = static_cast(items.first()); if (browserItem) { switch (browserItem->type()) { case Host: { // // Adjust the actions // qobject_cast(m_actionCollection->action("rescan_abort_action"))->setInactiveText(i18n("Scan Compute&r")); m_actionCollection->action("bookmark_action")->setEnabled(false); m_actionCollection->action("authentication_action")->setEnabled(true); m_actionCollection->action("custom_action")->setEnabled(true); m_actionCollection->action("preview_action")->setEnabled(false); m_actionCollection->action("print_action")->setEnabled(false); static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(false); break; } case Share: { // // Adjust the actions // qobject_cast(m_actionCollection->action("rescan_abort_action"))->setInactiveText(i18n("Scan Compute&r")); m_actionCollection->action("bookmark_action")->setEnabled(!browserItem->shareItem()->isPrinter()); m_actionCollection->action("authentication_action")->setEnabled(true); m_actionCollection->action("custom_action")->setEnabled(!browserItem->shareItem()->isPrinter()); m_actionCollection->action("preview_action")->setEnabled(!browserItem->shareItem()->isPrinter()); m_actionCollection->action("print_action")->setEnabled(browserItem->shareItem()->isPrinter()); if (!browserItem->shareItem()->isPrinter()) { if (!browserItem->shareItem()->isMounted() || (browserItem->shareItem()->isMounted() && browserItem->shareItem()->isForeign())) { static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(true); } else if (browserItem->shareItem()->isMounted() && !browserItem->shareItem()->isForeign()) { static_cast(m_actionCollection->action("mount_action"))->setActive(false); m_actionCollection->action("mount_action")->setEnabled(true); } else { static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(false); } } else { static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(true); } break; } default: { // // Adjust the actions // qobject_cast(m_actionCollection->action("rescan_abort_action"))->setInactiveText(i18n("Scan Wo&rkgroup")); m_actionCollection->action("bookmark_action")->setEnabled(false); m_actionCollection->action("authentication_action")->setEnabled(false); m_actionCollection->action("custom_action")->setEnabled(false); m_actionCollection->action("preview_action")->setEnabled(false); m_actionCollection->action("print_action")->setEnabled(false); static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(false); break; } } } } else if (items.size() > 1) { // // In this case there are only shares selected, because all other items // are automatically deselected in extended selection mode. // // For deciding which function the mount action should have, we use // the number of unmounted shares. If that is identical with the items.size(), // it will mount the items, otherwise it will unmount them. // int unmountedShares = items.size(); for (QTreeWidgetItem *item : items) { Smb4KNetworkBrowserItem *browserItem = static_cast(item); if (browserItem && browserItem->shareItem()->isMounted() && !browserItem->shareItem()->isForeign()) { // // Subtract shares mounted by the user // unmountedShares--; } } // // Adjust the actions // qobject_cast(m_actionCollection->action("rescan_abort_action"))->setInactiveText(i18n("Scan Netwo&rk")); m_actionCollection->action("bookmark_action")->setEnabled(true); m_actionCollection->action("authentication_action")->setEnabled(false); m_actionCollection->action("custom_action")->setEnabled(false); m_actionCollection->action("preview_action")->setEnabled(true); m_actionCollection->action("print_action")->setEnabled(false); static_cast(m_actionCollection->action("mount_action"))->setActive(unmountedShares == items.size()); m_actionCollection->action("mount_action")->setEnabled(true); } else { // // Adjust the actions // qobject_cast(m_actionCollection->action("rescan_abort_action"))->setInactiveText(i18n("Scan Netwo&rk")); m_actionCollection->action("bookmark_action")->setEnabled(false); m_actionCollection->action("authentication_action")->setEnabled(false); m_actionCollection->action("custom_action")->setEnabled(false); m_actionCollection->action("preview_action")->setEnabled(false); m_actionCollection->action("print_action")->setEnabled(false); static_cast(m_actionCollection->action("mount_action"))->setActive(true); m_actionCollection->action("mount_action")->setEnabled(false); } } void Smb4KNetworkBrowserDockWidget::slotClientAboutToStart(const NetworkItemPtr& /*item*/, int process) { // // Get the rescan/abort action // KDualAction *rescanAbortAction = static_cast(m_actionCollection->action("rescan_abort_action")); // // Make adjustments // if (rescanAbortAction) { rescanAbortAction->setActive(true); m_actionCollection->setDefaultShortcut(rescanAbortAction, QKeySequence::Cancel); } // // Set the active status of the search tool bar // if (process == NetworkSearch) { m_searchToolBar->setActiveState(true); } } void Smb4KNetworkBrowserDockWidget::slotClientFinished(const NetworkItemPtr& /*item*/, int process) { // // Get the rescan/abort action // KDualAction *rescanAbortAction = static_cast(m_actionCollection->action("rescan_abort_action")); // // Make adjustments // if (rescanAbortAction) { rescanAbortAction->setActive(false); m_actionCollection->setDefaultShortcut(rescanAbortAction, QKeySequence::Refresh); } // // Set the active status of the search tool bar // if (process == NetworkSearch) { m_searchToolBar->setActiveState(false); } } void Smb4KNetworkBrowserDockWidget::slotWorkgroups() { // // Process the global workgroup list // if (!workgroupsList().isEmpty()) { // // Remove obsolete workgroups and update existing ones // QTreeWidgetItemIterator itemIt(m_networkBrowser, QTreeWidgetItemIterator::All); while (*itemIt) { Smb4KNetworkBrowserItem *networkItem = static_cast(*itemIt); if (networkItem->type() == Workgroup) { WorkgroupPtr workgroup = findWorkgroup(networkItem->workgroupItem()->workgroupName()); if (workgroup) { networkItem->update(); // Update the master browser for (int i = 0; i < networkItem->childCount(); ++i) { Smb4KNetworkBrowserItem *host = static_cast(networkItem->child(i)); host->update(); } } else { delete networkItem; } } ++itemIt; } // // Add new workgroups to the tree widget // for (const WorkgroupPtr &workgroup : workgroupsList()) { QList items = m_networkBrowser->findItems(workgroup->workgroupName(), Qt::MatchFixedString, Smb4KNetworkBrowser::Network); if (items.isEmpty()) { (void) new Smb4KNetworkBrowserItem(m_networkBrowser, workgroup); } } // // Sort the items // m_networkBrowser->sortItems(Smb4KNetworkBrowser::Network, Qt::AscendingOrder); } else { // // Clear the tree widget // m_networkBrowser->clear(); } } void Smb4KNetworkBrowserDockWidget::slotWorkgroupMembers(const WorkgroupPtr& workgroup) { // // Process the list of domain members // if (workgroup) { // // Find the workgroup(s) // QList workgroups = m_networkBrowser->findItems(workgroup->workgroupName(), Qt::MatchFixedString, Smb4KNetworkBrowser::Network); QMutableListIterator it(workgroups); while (it.hasNext()) { QTreeWidgetItem *item = it.next(); if (item->type() == Workgroup) { Smb4KNetworkBrowserItem *workgroupItem = static_cast(item); QTreeWidgetItemIterator itemIt(workgroupItem); // // Remove obsolete hosts and update existing ones // while (*itemIt) { Smb4KNetworkBrowserItem *networkItem = static_cast(*itemIt); if (networkItem->type() == Host) { HostPtr host = findHost(networkItem->hostItem()->hostName(), networkItem->hostItem()->workgroupName()); if (host) { networkItem->update(); } else { delete networkItem; } } else { break; } ++itemIt; } // // Add new hosts to the workgroup item and remove obsolete workgroups if // necessary. Honor the auto-expand feature. // QList members = workgroupMembers(workgroupItem->workgroupItem()); if (!members.isEmpty()) { for (const HostPtr &host : members) { bool foundHost = false; for (int i = 0; i < workgroupItem->childCount(); ++i) { Smb4KNetworkBrowserItem *hostItem = static_cast(workgroupItem->child(i)); if (hostItem->hostItem()->hostName() == host->hostName()) { foundHost = true; break; } else { continue; } } if (!foundHost) { (void) new Smb4KNetworkBrowserItem(workgroupItem, host); } } // Auto-expand the workgroup item, if applicable if (Smb4KSettings::autoExpandNetworkItems() && !workgroupItem->isExpanded() && !m_searchRunning) { m_networkBrowser->expandItem(workgroupItem); } } else { // Delete all hosts of the workgroup (if there should still be some) and // remove the workgroup item from the view (no hosts => no workgroup) while (workgroupItem->childCount() != 0) { delete workgroupItem->takeChild(0); } delete workgroupItem; } } } // // Sort the items // m_networkBrowser->sortItems(Smb4KNetworkBrowser::Network, Qt::AscendingOrder); } } void Smb4KNetworkBrowserDockWidget::slotShares(const HostPtr& host) { // // Process the list of shares // if (host) { // // Find the host(s) // QList hosts = m_networkBrowser->findItems(host->hostName(), Qt::MatchFixedString|Qt::MatchRecursive, Smb4KNetworkBrowser::Network); QMutableListIterator it(hosts); while (it.hasNext()) { Smb4KNetworkBrowserItem *hostItem = static_cast(it.next()); if (hostItem->type() == Host && hostItem->hostItem()->workgroupName() == host->workgroupName()) { QTreeWidgetItemIterator itemIt(hostItem); // // Remove obsolete shares and update existing ones // while (*itemIt) { Smb4KNetworkBrowserItem *shareItem = static_cast(*itemIt); if (shareItem->type() == Share) { SharePtr share = findShare(shareItem->shareItem()->url(), shareItem->shareItem()->workgroupName()); if (share) { shareItem->update(); } else { delete shareItem; } } else { break; } ++itemIt; } // // Add new shares to the host item. The host will not be removed from the // view when it has no shares. Honor the auto-expand feature. // QList shares = sharedResources(host); if (!shares.isEmpty()) { for (const SharePtr &share : shares) { bool foundShare = false; for (int i = 0; i < hostItem->childCount(); ++i) { Smb4KNetworkBrowserItem *shareItem = static_cast(hostItem->child(i)); if (QString::compare(shareItem->shareItem()->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), share->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), Qt::CaseInsensitive) == 0) { foundShare = true; break; } else { continue; } } if (!foundShare) { (void) new Smb4KNetworkBrowserItem(hostItem, share); } } // Auto-expand the host item, if applicable if (Smb4KSettings::autoExpandNetworkItems() && !hostItem->isExpanded() && !m_searchRunning) { m_networkBrowser->expandItem(hostItem); } } else { // Delete all shares (if there should still be some), but leave the // host in the view. while (hostItem->childCount() != 0) { delete hostItem->takeChild(0); } } } else { continue; } } // // Sort the items // m_networkBrowser->sortItems(Smb4KNetworkBrowser::Network, Qt::AscendingOrder); } } void Smb4KNetworkBrowserDockWidget::slotRescanAbortActionTriggered(bool /*checked*/) { // // Get the Rescan/Abort action // KDualAction *rescanAbortAction = static_cast(m_actionCollection->action("rescan_abort_action")); // // Get the selected items // QList selectedItems = m_networkBrowser->selectedItems(); // // Perform actions according to the state of the action and the number of // selected items. // if (!rescanAbortAction->isActive()) { if (selectedItems.size() == 1) { Smb4KNetworkBrowserItem *browserItem = static_cast(selectedItems.first()); if (browserItem) { switch (browserItem->type()) { case Workgroup: { Smb4KClient::self()->lookupDomainMembers(browserItem->workgroupItem()); break; } case Host: { Smb4KClient::self()->lookupShares(browserItem->hostItem()); break; } case Share: { Smb4KNetworkBrowserItem *parentItem = static_cast(browserItem->parent()); Smb4KClient::self()->lookupShares(parentItem->hostItem()); break; } default: { break; } } } } else { // If several items are selected or no selected items, // only the network can be scanned. Smb4KClient::self()->lookupDomains(); } } else { // Stop all actions performed by the client if (Smb4KClient::self()->isRunning()) { Smb4KClient::self()->abort(); } } } void Smb4KNetworkBrowserDockWidget::slotAddBookmark(bool /*checked*/) { QList items = m_networkBrowser->selectedItems(); QList shares; if (!items.isEmpty()) { for (int i = 0; i < items.size(); ++i) { Smb4KNetworkBrowserItem *item = static_cast(items.at(i)); if (item && item->type() == Share && !item->shareItem()->isPrinter()) { shares << item->shareItem(); } } } else { // No selected items. Just return. return; } if (!shares.isEmpty()) { Smb4KBookmarkHandler::self()->addBookmarks(shares); } } void Smb4KNetworkBrowserDockWidget::slotMountManually(bool /*checked*/) { Smb4KMounter::self()->openMountDialog(); } void Smb4KNetworkBrowserDockWidget::slotAuthentication(bool /*checked*/) { Smb4KNetworkBrowserItem *item = static_cast(m_networkBrowser->currentItem()); if (item) { switch (item->type()) { case Host: { Smb4KWalletManager::self()->showPasswordDialog(item->hostItem()); break; } case Share: { Smb4KWalletManager::self()->showPasswordDialog(item->shareItem()); break; } default: { break; } } } } void Smb4KNetworkBrowserDockWidget::slotCustomOptions(bool /*checked*/) { Smb4KNetworkBrowserItem *item = static_cast(m_networkBrowser->currentItem()); if (item) { switch (item->type()) { case Host: { Smb4KCustomOptionsManager::self()->openCustomOptionsDialog(item->hostItem()); break; } case Share: { Smb4KCustomOptionsManager::self()->openCustomOptionsDialog(item->shareItem()); break; } default: { break; } } } } void Smb4KNetworkBrowserDockWidget::slotPreview(bool /*checked*/) { QList items = m_networkBrowser->selectedItems(); if (!items.isEmpty()) { for (int i = 0; i < items.size(); ++i) { Smb4KNetworkBrowserItem *item = static_cast(items.at(i)); if (item && item->type() == Share && !item->shareItem()->isPrinter()) { Smb4KClient::self()->openPreviewDialog(item->shareItem()); } } } } void Smb4KNetworkBrowserDockWidget::slotPrint(bool /*checked*/) { Smb4KNetworkBrowserItem *item = static_cast(m_networkBrowser->currentItem()); if (item && item->shareItem()->isPrinter()) { Smb4KClient::self()->openPrintDialog(item->shareItem()); } } void Smb4KNetworkBrowserDockWidget::slotMountActionTriggered(bool /*checked*/) { // // Get the selected items // QList selectedItems = m_networkBrowser->selectedItems(); if (selectedItems.size() > 1) { // // In the case of multiple selected network items, selectedItems() // only contains shares. Thus, we do not need to test for the type. // For deciding what the mount action is supposed to do, i.e. mount // the (remaining) selected unmounted shares or unmounting all selected // mounted shares, we use the number of unmounted shares. If that is // greater than 0, we mount all shares that need to be mounted, otherwise // we unmount all selected shares. // QList unmounted, mounted; for (QTreeWidgetItem *item : selectedItems) { Smb4KNetworkBrowserItem *browserItem = static_cast(item); if (browserItem && browserItem->shareItem()->isMounted()) { mounted << browserItem->shareItem(); } else if (browserItem && !browserItem->shareItem()->isMounted()) { unmounted << browserItem->shareItem(); } } if (!unmounted.empty()) { // Mount the (remaining) unmounted shares. Smb4KMounter::self()->mountShares(unmounted); } else { // Unmount all shares. Smb4KMounter::self()->unmountShares(mounted, m_networkBrowser); } } else { // // If only one network item is selected, we need to test for the type // of the item. Only in case of a share we need to do something. // Smb4KNetworkBrowserItem *browserItem = static_cast(selectedItems.first()); if (browserItem) { switch (browserItem->type()) { case Share: { if (!browserItem->shareItem()->isMounted()) { Smb4KMounter::self()->mountShare(browserItem->shareItem()); } else { Smb4KMounter::self()->unmountShare(browserItem->shareItem(), false); } break; } default: { break; } } } } } void Smb4KNetworkBrowserDockWidget::slotMountActionChanged(bool active) { // // Get the mount action // KDualAction *mountAction = static_cast(m_actionCollection->action("mount_action")); // // Change the shortcuts depending on the value of the 'active' argument // if (mountAction) { if (active) { m_actionCollection->setDefaultShortcut(mountAction, QKeySequence(Qt::CTRL+Qt::Key_M)); } else { m_actionCollection->setDefaultShortcut(mountAction, QKeySequence(Qt::CTRL+Qt::Key_U)); } } } void Smb4KNetworkBrowserDockWidget::slotShareMounted(const SharePtr& share) { QTreeWidgetItemIterator it(m_networkBrowser); while (*it) { Smb4KNetworkBrowserItem *item = static_cast(*it); if (item->type() == Share) { if (QString::compare(item->shareItem()->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), share->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), Qt::CaseInsensitive) == 0) { item->update(); break; } } ++it; } } void Smb4KNetworkBrowserDockWidget::slotShareUnmounted(const SharePtr& share) { QTreeWidgetItemIterator it(m_networkBrowser); while (*it) { Smb4KNetworkBrowserItem *item = static_cast(*it); if (item->type() == Share) { if (QString::compare(item->shareItem()->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), share->url().toString(QUrl::RemoveUserInfo|QUrl::RemovePort), Qt::CaseInsensitive) == 0) { item->update(); break; } } ++it; } } void Smb4KNetworkBrowserDockWidget::slotMounterAboutToStart(int /*process*/) { // // Unused at the moment // } void Smb4KNetworkBrowserDockWidget::slotMounterFinished(int process) { // // Get the mount/unmount action // KDualAction *mountAction = static_cast(m_actionCollection->action("mount_action")); // // Make adjustments // if (mountAction) { switch (process) { case MountShare: { mountAction->setActive(false); break; } case UnmountShare: { mountAction->setActive(true); break; } default: { break; } } } } void Smb4KNetworkBrowserDockWidget::slotIconSizeChanged(int group) { switch (group) { case KIconLoader::Small: { int icon_size = KIconLoader::global()->currentSize(KIconLoader::Small); m_networkBrowser->setIconSize(QSize(icon_size, icon_size)); break; } default: { break; } } } void Smb4KNetworkBrowserDockWidget::slotShowSearchToolBar() { // // Show the search toolbar // m_searchToolBar->setVisible(true); // // Set the focus to the search item input // m_searchToolBar->prepareInput(); } void Smb4KNetworkBrowserDockWidget::slotHideSearchToolBar() { // // Prevent another dock widget from stealing the focus when // the search tool bar is hidden // m_networkBrowser->setFocus(); // // Hide the search toolbar // m_searchToolBar->setVisible(false); } void Smb4KNetworkBrowserDockWidget::slotPerformSearch(const QString& item) { // // Prevent another dock widget from stealing the focus when // the search item input is disabled // m_networkBrowser->setFocus(); // // A global search is underway // m_searchRunning = true; // // Start the search // Smb4KClient::self()->search(item); } void Smb4KNetworkBrowserDockWidget::slotStopSearch() { // // Stop the network search // Smb4KClient::self()->abort(); // // A global search finished // m_searchRunning = false; } void Smb4KNetworkBrowserDockWidget::slotSearchResults(const QList& shares) { // // A global search finished // m_searchRunning = false; // // Process the search results // QTreeWidgetItemIterator it(m_networkBrowser); while (*it) { Smb4KNetworkBrowserItem *networkItem = static_cast(*it); if (networkItem->type() == Share) { for (const SharePtr &share : shares) { if (networkItem->shareItem() == share) { // // Select the search result // networkItem->setSelected(true); // // Expand the branch of the network tree where a search result // was retrieved // if (!networkItem->parent()->isExpanded()) { m_networkBrowser->expandItem(networkItem->parent()); } if (!networkItem->parent()->parent()->isExpanded()) { m_networkBrowser->expandItem(networkItem->parent()->parent()); } } } } it++; } // // Pass the search results to the search toolbar // m_searchToolBar->setSearchResults(shares); } void Smb4KNetworkBrowserDockWidget::slotJumpToResult(const QString& url) { // // Find the share item with URL url // QTreeWidgetItemIterator it(m_networkBrowser); while (*it) { Smb4KNetworkBrowserItem *networkItem = static_cast(*it); if (networkItem->type() == Share && networkItem->shareItem()->url().toString() == url) { m_networkBrowser->setCurrentItem(networkItem); break; } it++; } } void Smb4KNetworkBrowserDockWidget::slotClearSearchResults() { m_networkBrowser->clearSelection(); }