From 64aadfcbdbaf44c8013e0da4ffb71880473889fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrew=20Lee=20=28=E6=9D=8E=E5=81=A5=E7=A7=8B=29?= Date: Sat, 15 Aug 2015 01:41:18 +0800 Subject: [PATCH] Merging upstream version 0.9.0+20150807. --- CMakeLists.txt | 4 +- lxqt-admin-time/CMakeLists.txt | 4 +- .../translations/lxqt-admin-time_hr.ts | 98 +++++++ .../translations/lxqt-admin-time_hu.desktop | 4 + .../translations/lxqt-admin-time_hu.ts | 98 +++++++ .../translations/lxqt-admin-time_it.desktop | 3 + .../translations/lxqt-admin-time_pl.desktop | 4 + .../translations/lxqt-admin-time_pl.ts | 98 +++++++ .../translations/lxqt-admin-user_it.desktop | 13 - lxqt-admin-user/CMakeLists.txt | 4 +- lxqt-admin-user/groupdialog.cpp | 5 +- lxqt-admin-user/groupdialog.h | 6 +- lxqt-admin-user/mainwindow.h | 16 +- .../translations/lxqt-admin-user_hr.ts | 263 ++++++++++++++++++ .../translations/lxqt-admin-user_hu.desktop | 4 + .../translations/lxqt-admin-user_hu.ts | 263 ++++++++++++++++++ .../translations/lxqt-admin-user_it.desktop | 3 + .../translations/lxqt-admin-user_pl.desktop | 4 + .../translations/lxqt-admin-user_pl.ts | 263 ++++++++++++++++++ lxqt-admin-user/userdialog.cpp | 15 +- lxqt-admin-user/userdialog.h | 2 +- 21 files changed, 1134 insertions(+), 40 deletions(-) create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_hr.ts create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_hu.desktop create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_hu.ts create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_it.desktop create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_pl.desktop create mode 100644 lxqt-admin-time/translations/lxqt-admin-time_pl.ts delete mode 100644 lxqt-admin-time/translations/lxqt-admin-user_it.desktop create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_hr.ts create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_hu.desktop create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_hu.ts create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_it.desktop create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_pl.desktop create mode 100644 lxqt-admin-user/translations/lxqt-admin-user_pl.ts diff --git a/CMakeLists.txt b/CMakeLists.txt index 9381344..cd1fcc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(lxqt-admin) @@ -10,7 +10,6 @@ set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for librari find_package(Qt5Widgets REQUIRED QUIET) find_package(lxqt REQUIRED QUIET) find_package(KF5WindowSystem REQUIRED QUIET) -include(${LXQT_USE_FILE}) find_package(PkgConfig) pkg_check_modules(OOBS REQUIRED @@ -18,6 +17,7 @@ pkg_check_modules(OOBS REQUIRED liboobs-1 ) +include(LXQtCompilerSettings NO_POLICY_SCOPE) include(LXQtTranslate) add_subdirectory(lxqt-admin-time) diff --git a/lxqt-admin-time/CMakeLists.txt b/lxqt-admin-time/CMakeLists.txt index ef876d8..28ce566 100644 --- a/lxqt-admin-time/CMakeLists.txt +++ b/lxqt-admin-time/CMakeLists.txt @@ -3,8 +3,6 @@ project(lxqt-admin-time) # build static helper class first include_directories ( ${CMAKE_CURRENT_BINARY_DIR} - ${LXQT_INCLUDE_DIRS} - ${QTXDG_INCLUDE_DIRS} ${OOBS_INCLUDE_DIRS} ) @@ -66,7 +64,7 @@ add_executable(lxqt-admin-time target_link_libraries(lxqt-admin-time KF5::WindowSystem Qt5::Widgets - ${LXQT_LIBRARIES} + lxqt ${OOBS_LIBRARIES} ) diff --git a/lxqt-admin-time/translations/lxqt-admin-time_hr.ts b/lxqt-admin-time/translations/lxqt-admin-time_hr.ts new file mode 100644 index 0000000..07388a4 --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_hr.ts @@ -0,0 +1,98 @@ + + + + + DateTime + + + Form + + + + + Time and date setup + Postavke datuma i vremena + + + + Time: + Vrijeme: + + + + HH:mm:ss + HH:mm:ss + + + + Date: + Nadnevak + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Spremanje pronjena zahtjeva adminstracijske dozvole.<br>Biti će zatražene nakon što kliknete na dugme zatvori</p></body></html> + + + + TimeAdminDialog + + + Time and date configuration + Konfiguracija vremena i nadnevka + + + + Date and time + Nadnevak i vrijeme + + + + Timezone + Vremenska zona + + + + Authentication Error + + + + + Timezone + + + Form + + + + + Timezone setup + Postavljanje vremenske zone + + + + Your current timezone: + Vaša trenutna vremenska zona + + + + TextLabel + + + + + Filter + + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Spremanje pronjena zahtjeva adminstracijske dozvole.<br>Biti će zatražene nakon što kliknete na dugme zatvori</p></body></html> + + + + None + Nijedan + + + diff --git a/lxqt-admin-time/translations/lxqt-admin-time_hu.desktop b/lxqt-admin-time/translations/lxqt-admin-time_hu.desktop new file mode 100644 index 0000000..3a13957 --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_hu.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[hu]=Dátum és idő +GenericName[hu]=Dátum és időbeállítás +Comment[hu]=A rendszeridő beállítása diff --git a/lxqt-admin-time/translations/lxqt-admin-time_hu.ts b/lxqt-admin-time/translations/lxqt-admin-time_hu.ts new file mode 100644 index 0000000..41f65c1 --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_hu.ts @@ -0,0 +1,98 @@ + + + + + DateTime + + + Form + Űrlap + + + + Time and date setup + Dátum és időbeállítás + + + + Time: + Idő: + + + + HH:mm:ss + + + + + Date: + Dátum: + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Változtatások csak rendszergazdaként menthetők,<br>jelszóbekérés a kilépés után.</p></body></html> + + + + TimeAdminDialog + + + Time and date configuration + Dátum és időbeállítások + + + + Date and time + Dátum és idő + + + + Timezone + Időzóna + + + + Authentication Error + Hitelesítési hiba + + + + Timezone + + + Form + Űrlap + + + + Timezone setup + Időzóna beállítás + + + + Your current timezone: + Mostani időzóna: + + + + TextLabel + Szövegcím + + + + Filter + Szűrő + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Változtatások csak rendszergazdaként menthetők,<br>jelszóbekérés a kilépés után.</p></body></html> + + + + None + Nincs + + + diff --git a/lxqt-admin-time/translations/lxqt-admin-time_it.desktop b/lxqt-admin-time/translations/lxqt-admin-time_it.desktop new file mode 100644 index 0000000..1d852c7 --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_it.desktop @@ -0,0 +1,3 @@ +#Translations +Name[it]=Data e ora +Comment[it]=Configura la data e l'ora del sistema diff --git a/lxqt-admin-time/translations/lxqt-admin-time_pl.desktop b/lxqt-admin-time/translations/lxqt-admin-time_pl.desktop new file mode 100644 index 0000000..c0588bb --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_pl.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[pl]=Data i czas +GenericName[pl]=Ustawienia daty i czasu + diff --git a/lxqt-admin-time/translations/lxqt-admin-time_pl.ts b/lxqt-admin-time/translations/lxqt-admin-time_pl.ts new file mode 100644 index 0000000..d56adac --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_pl.ts @@ -0,0 +1,98 @@ + + + + + DateTime + + + Form + + + + + Time and date setup + Konfiguracja daty i czasu + + + + Time: + Czas: + + + + HH:mm:ss + + + + + Date: + Data: + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Zapisywanie zmian wymaga uprawnień administratora.<br>Zostaniesz poproszony o hasło.</p></body></html> + + + + TimeAdminDialog + + + Time and date configuration + Konfiguracja daty i czasu + + + + Date and time + Data i czas + + + + Timezone + Strefa czasowa + + + + Authentication Error + Błąd autoryzacji + + + + Timezone + + + Form + + + + + Timezone setup + Ustawienia strefy czasowej + + + + Your current timezone: + Twoja aktualna strefa czasowa: + + + + TextLabel + + + + + Filter + Filtr + + + + <html><head/><body><p>Saving changes requires admin permissions.<br>You will be requested after clicking close button</p></body></html> + <html><head/><body><p>Zapisywanie zmian wymaga uprawnień administratora.<br>Zostaniesz poproszony o hasło.</p></body></html> + + + + None + Żadna + + + diff --git a/lxqt-admin-time/translations/lxqt-admin-user_it.desktop b/lxqt-admin-time/translations/lxqt-admin-user_it.desktop deleted file mode 100644 index 0055993..0000000 --- a/lxqt-admin-time/translations/lxqt-admin-user_it.desktop +++ /dev/null @@ -1,13 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Users and Groups -GenericName=User and Group Settings -Comment=Configure the users and groups of your system -Exec=lxqt-admin-user -Icon=preferences-system -Categories=Settings;System;DesktopSettings;Qt;LXQt; -OnlyShowIn=LXQt; - -Name[it]=Utenti e gruppi -GenericName[it]=Impostazioni utenti e gruppi -Comment[it]=Configura utenti e gruppi del sistema diff --git a/lxqt-admin-user/CMakeLists.txt b/lxqt-admin-user/CMakeLists.txt index 8ff00e6..e3fc857 100644 --- a/lxqt-admin-user/CMakeLists.txt +++ b/lxqt-admin-user/CMakeLists.txt @@ -3,8 +3,6 @@ project(lxqt-admin-user) # build static helper class first include_directories ( ${CMAKE_CURRENT_BINARY_DIR} - ${LXQT_INCLUDE_DIRS} - ${QTXDG_INCLUDE_DIRS} ${OOBS_INCLUDE_DIRS} ) @@ -60,7 +58,7 @@ add_executable(lxqt-admin-user target_link_libraries(lxqt-admin-user KF5::WindowSystem Qt5::Widgets - ${LXQT_LIBRARIES} + lxqt ${OOBS_LIBRARIES} ) diff --git a/lxqt-admin-user/groupdialog.cpp b/lxqt-admin-user/groupdialog.cpp index e3c07ab..fd7fc43 100644 --- a/lxqt-admin-user/groupdialog.cpp +++ b/lxqt-admin-user/groupdialog.cpp @@ -21,6 +21,9 @@ #include "groupdialog.h" #include +#define DEFAULT_GID_MIN 1000 +#define DEFAULT_GID_MAX 32768 + GroupDialog::GroupDialog(OobsGroup *group, QWidget *parent, Qt::WindowFlags f): QDialog(parent, f), mGroup(group ? OOBS_GROUP(g_object_ref(group)) : NULL) @@ -38,7 +41,7 @@ GroupDialog::GroupDialog(OobsGroup *group, QWidget *parent, Qt::WindowFlags f): else // create a new group { mOldGId = -1; - ui.gid->setValue(oobs_groups_config_find_free_gid(groupsConfig, 0, 32768)); + ui.gid->setValue(oobs_groups_config_find_free_gid(groupsConfig, DEFAULT_GID_MIN, DEFAULT_GID_MAX)); } GList* groupUsers = oobs_group_get_users(mGroup); // all users in this group diff --git a/lxqt-admin-user/groupdialog.h b/lxqt-admin-user/groupdialog.h index 3726a2c..d8743a1 100644 --- a/lxqt-admin-user/groupdialog.h +++ b/lxqt-admin-user/groupdialog.h @@ -34,14 +34,14 @@ class GroupDialog : public QDialog public: GroupDialog(OobsGroup* group = NULL, QWidget *parent = NULL, Qt::WindowFlags f = 0); ~GroupDialog(); - + OobsGroup* group() { return mGroup; } - + virtual void accept(); - + private: bool hasUser(OobsUser* user); diff --git a/lxqt-admin-user/mainwindow.h b/lxqt-admin-user/mainwindow.h index 79fd24b..f3edd50 100644 --- a/lxqt-admin-user/mainwindow.h +++ b/lxqt-admin-user/mainwindow.h @@ -1,21 +1,21 @@ /* * * Copyright (C) 2014 Hong Jen Yee (PCMan) - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * */ #ifndef MAINWINDOW_H @@ -38,7 +38,7 @@ public: PageUsers = 0, PageGroups }; - + public: explicit MainWindow(); virtual ~MainWindow(); @@ -56,18 +56,18 @@ private: { _this->loadUsers(); } - + static void onGroupsConfigChanged(OobsObject* obj, MainWindow* _this) { _this->loadGroups(); } - + private Q_SLOTS: void onAdd(); void onDelete(); void onEditProperties(); void onRefresh(); - + private: Ui::MainWindow ui; OobsUsersConfig* mUsersConfig; diff --git a/lxqt-admin-user/translations/lxqt-admin-user_hr.ts b/lxqt-admin-user/translations/lxqt-admin-user_hr.ts new file mode 100644 index 0000000..13967d6 --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_hr.ts @@ -0,0 +1,263 @@ + + + + + GroupDialog + + + Group Settings + Postavke grupe + + + + Group name: + Ime grupe: + + + + Group ID: + ID grupe + + + + Users belong to this group: + Korisnici koji pripadaju ovoj grupi + + + + + + Error + Greška + + + + The group ID is in use. + ID grupe je u uporabi. + + + + The group name cannot be empty. + Ime grupe ne može biti prazno. + + + + The group name is in use. + Ime grupe je u uporabi. + + + + MainWindow + + + User and Group Settings + Postavke korisnika i grupe + + + + &Users + &Korisnici + + + + Login Name + Ime prijave + + + + User ID + ID korisnika + + + + Full Name + Puno ime + + + + Group + Grupa + + + + Home Directory + Osobna mapa + + + + Show system users (for advanced users only) + + + + + &Groups + &Grupe + + + + Name + Ime + + + + Group ID + ID grupe + + + + toolBar + alatna traka + + + + Add + Dodaj + + + + Add new users or groups + Dodaj nove korisnike ili grupe + + + + Delete + Izbriši + + + + Delete selected item + Izbriši odabranu stavku + + + + Properties + Svojstva + + + + edit properties of the selected item + uredi svojstva odabrane stavke + + + + Refresh + Osvježi + + + + Refresh the lists + Osvježi liste + + + + Error + Greška + + + + + Confirm + Potvrdi + + + + Are you sure you want to delete the selected user? + Jeste li sigurni da želite izbrisati odabranoga korisnika? + + + + Are you sure you want to delete the selected group? + Jeste li sigurni da želite izbrisati odabranu grupu? + + + + UserDialog + + + User Settings + Postavke korisnika + + + + General + Općenito + + + + Full name: + Puno ime: + + + + Login name: + Ime prijave: + + + + Set password: + Postavi lozinku: + + + + User ID: + ID korisnika: + + + + Main group: + Glavna grupa: + + + + Advanced + Napredno + + + + Login shell: + Ljuska prijave: + + + + Home directory: + Osobna mapa: + + + + Change password: + Promjeni lozinku: + + + + + + Error + Greška + + + + The user ID is in use. + ID korisnika je u uporabi. + + + + The user name cannot be empty. + Korisničko ime ne može biti prazno. + + + + The user name is in use. + Korisničko ime je u uoprabi. + + + + Confirm + Potvrdi + + + + Are you sure you want to use an "empty password" for the user? + Jeste li sigurni da želite koristiti "praznu lozinku" za korisnika? + + + diff --git a/lxqt-admin-user/translations/lxqt-admin-user_hu.desktop b/lxqt-admin-user/translations/lxqt-admin-user_hu.desktop new file mode 100644 index 0000000..0da7b3e --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_hu.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[hu]=Felhasználók és csoportok +GenericName[hu]=Felhasználó és csoportkezelés +Comment[hu]=A rendszer felhasználóinak és csoportjainak kezeése diff --git a/lxqt-admin-user/translations/lxqt-admin-user_hu.ts b/lxqt-admin-user/translations/lxqt-admin-user_hu.ts new file mode 100644 index 0000000..24e4806 --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_hu.ts @@ -0,0 +1,263 @@ + + + + + GroupDialog + + + Group Settings + Csoportbeállítás + + + + Group name: + Csoportnév: + + + + Group ID: + Csoport ID + + + + Users belong to this group: + A csoport tagjai: + + + + + + Error + Hiba + + + + The group ID is in use. + Csoport ID foglalt. + + + + The group name cannot be empty. + Csoportnév nem lehet üres. + + + + The group name is in use. + Csoportnév foglalt. + + + + MainWindow + + + User and Group Settings + Felhasználók és csoportok + + + + &Users + &Felhasználók + + + + Login Name + Bejelenkezési név + + + + User ID + Felhasználó ID + + + + Full Name + Teljes név + + + + Group + Csoport + + + + Home Directory + Saját könyvtár + + + + Show system users (for advanced users only) + Rendszer felhasználók is látszanak (csak haladóknak) + + + + &Groups + &Csoportok + + + + Name + Név + + + + Group ID + Csoport ID + + + + toolBar + eszközsáv + + + + Add + Hozzáad + + + + Add new users or groups + Új felhasználó, vagy csoport hozzáadása + + + + Delete + Törlés + + + + Delete selected item + Kiválasztott törlése + + + + Properties + Tulajdonságok + + + + edit properties of the selected item + A választott elem módosítása + + + + Refresh + Frisítés + + + + Refresh the lists + Lista frissítése + + + + Error + Hiba + + + + + Confirm + Megerősítés + + + + Are you sure you want to delete the selected user? + Tényleg töröljük az illető felhasználót? + + + + Are you sure you want to delete the selected group? + Tényleg töröljük az illető csoportot? + + + + UserDialog + + + User Settings + Felhasználó beállítása + + + + General + Alap + + + + Full name: + Teljes név: + + + + Login name: + Bejelenkezési név: + + + + Set password: + Jelszóbeállítás: + + + + User ID: + Felhasználó ID: + + + + Main group: + Főcsoport + + + + Advanced + Bővített + + + + Login shell: + Parancsértelmező: + + + + Home directory: + Saját könyvtár: + + + + Change password: + Jelszóváltoztatás: + + + + + + Error + Hiba + + + + The user ID is in use. + Felhasználó ID foglalt. + + + + The user name cannot be empty. + Felhasználónév nem lehet üres. + + + + The user name is in use. + Felhasználónév foglalt. + + + + Confirm + Megerősítés + + + + Are you sure you want to use an "empty password" for the user? + Üres legyen a jelszava a felhasználónak? + + + diff --git a/lxqt-admin-user/translations/lxqt-admin-user_it.desktop b/lxqt-admin-user/translations/lxqt-admin-user_it.desktop new file mode 100644 index 0000000..b0fb110 --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_it.desktop @@ -0,0 +1,3 @@ +#Translations +Name[it]=Utenti e gruppi +Comment[it]=Configura utenti e gruppi del sistema diff --git a/lxqt-admin-user/translations/lxqt-admin-user_pl.desktop b/lxqt-admin-user/translations/lxqt-admin-user_pl.desktop new file mode 100644 index 0000000..2fe56dc --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_pl.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[pl]=Użytkownicy i grupy +GenericName[pl]=Zarządzanie użytkownikami i grupami + diff --git a/lxqt-admin-user/translations/lxqt-admin-user_pl.ts b/lxqt-admin-user/translations/lxqt-admin-user_pl.ts new file mode 100644 index 0000000..104584b --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_pl.ts @@ -0,0 +1,263 @@ + + + + + GroupDialog + + + Group Settings + Ustawienia Grup + + + + Group name: + Nazwa grupy: + + + + Group ID: + ID grupy: + + + + Users belong to this group: + Użytkownicy należący do tej grupy: + + + + + + Error + Błąd + + + + The group ID is in use. + ID grupy jest już w użyciu. + + + + The group name cannot be empty. + Nazwa grupy nie może być pusta. + + + + The group name is in use. + Ta nazwa grupy jest już w użyciu. + + + + MainWindow + + + User and Group Settings + Ustawienia użytkowników i grup + + + + &Users + &Użytkownicy + + + + Login Name + Login + + + + User ID + ID użytkownika + + + + Full Name + Pełna nazwa + + + + Group + Grupa + + + + Home Directory + Katalog domowy + + + + Show system users (for advanced users only) + Pokaż użytkowników systemowych (dla zaawansowanych) + + + + &Groups + &Grupy + + + + Name + Nazwa + + + + Group ID + ID grupy + + + + toolBar + Pasek narzędzi + + + + Add + Dodaj + + + + Add new users or groups + Dodaj nowych użytkowników lub grupy + + + + Delete + Usuń + + + + Delete selected item + Usuń zaznaczoną pozycję + + + + Properties + Właściwości + + + + edit properties of the selected item + edytuj właściwości dla wybranej pozycji + + + + Refresh + Odśwież + + + + Refresh the lists + Odśwież listę + + + + Error + Błąd + + + + + Confirm + Potwierdzenie + + + + Are you sure you want to delete the selected user? + Czy na pewno chcesz usunąć wybranego użytkownika? + + + + Are you sure you want to delete the selected group? + Czy na pewno chcesz usunąć wybraną grupę? + + + + UserDialog + + + User Settings + Ustawienia użytkownika + + + + General + Ogólne + + + + Full name: + Pełna nazwa: + + + + Login name: + Login: + + + + Set password: + Ustaw hasło: + + + + User ID: + ID użytkownika: + + + + Main group: + Grupa główna: + + + + Advanced + Zaawansowane + + + + Login shell: + Powłoka: + + + + Home directory: + Katalog domowy: + + + + Change password: + Zmień hasło: + + + + + + Error + Błąd + + + + The user ID is in use. + To ID użytkownika jest już w użyciu. + + + + The user name cannot be empty. + Nazwa użytkownika nie może być pusta. + + + + The user name is in use. + Ta nazwa użytkownika jest już w użyciu. + + + + Confirm + Potwierdzenie + + + + Are you sure you want to use an "empty password" for the user? + Czy na pewno chcesz użyć "pustego hasła" dla tego użytkownika? + + + diff --git a/lxqt-admin-user/userdialog.cpp b/lxqt-admin-user/userdialog.cpp index e2b9c50..292df06 100644 --- a/lxqt-admin-user/userdialog.cpp +++ b/lxqt-admin-user/userdialog.cpp @@ -21,11 +21,14 @@ #include "userdialog.h" #include +#define DEFAULT_UID_MIN 1000 +#define DEFAULT_UID_MAX 32768 + UserDialog::UserDialog(OobsUser* user, QWidget* parent): QDialog(), + mUser(user ? OOBS_USER(g_object_ref(user)) : NULL), mFullNameChanged(false), - mHomeDirChanged(false), - mUser(user ? OOBS_USER(g_object_ref(user)) : NULL) + mHomeDirChanged(false) { ui.setupUi(this); @@ -66,7 +69,7 @@ UserDialog::UserDialog(OobsUser* user, QWidget* parent): ui.fullName->setText(oobs_user_get_full_name(user)); ui.loginShell->setEditText(oobs_user_get_shell(user)); ui.homeDir->setText(QString::fromLocal8Bit(oobs_user_get_home_directory(user))); - + OobsGroup* group = oobs_user_get_main_group(user); ui.mainGroup->setEditText(oobs_group_get_name(group)); } @@ -76,11 +79,11 @@ UserDialog::UserDialog(OobsUser* user, QWidget* parent): ui.loginName->setReadOnly(false); ui.loginName->setFocus(); ui.changePasswd->setChecked(true); - ui.uid->setValue(oobs_users_config_find_free_uid(userConfig, 1000, 32768)); + ui.uid->setValue(oobs_users_config_find_free_uid(userConfig, DEFAULT_UID_MIN, DEFAULT_UID_MAX)); ui.loginShell->setEditText(oobs_users_config_get_default_shell(userConfig)); ui.mainGroup->setCurrentIndex(-1); } - + } UserDialog::~UserDialog() @@ -97,7 +100,7 @@ void UserDialog::onLoginNameChanged(const QString& text) ui.fullName->setText(text); ui.fullName->blockSignals(false); } - + if(!mHomeDirChanged) { ui.homeDir->blockSignals(true); diff --git a/lxqt-admin-user/userdialog.h b/lxqt-admin-user/userdialog.h index f31320b..23bb8ee 100644 --- a/lxqt-admin-user/userdialog.h +++ b/lxqt-admin-user/userdialog.h @@ -46,7 +46,7 @@ private Q_SLOTS: void onLoginNameChanged(const QString& text); void onFullNameChanged(const QString& text); void onHomeDirChanged(const QString& text); - + private: Ui::UserDialog ui; OobsUser* mUser;