diff --git a/AUTHORS b/AUTHORS index f200f7c..3834f6d 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,7 +2,7 @@ Upstream Authors: LXQt team: http://lxqt.org Copyright: - Copyright (c) 2014-2016 LXQt team + Copyright (c) 2014-2017 LXQt team License: LGPL-2.1+ The full text of the licenses can be found in the 'COPYING' file. diff --git a/CHANGELOG b/CHANGELOG index f3173a7..0f31c77 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,21 @@ -lxqt-admin-0.11.1 / 2017-01-01 +lxqt-admin-0.12.0 / 2017-10-21 ============================== + * Set patch version + * Don't export github templates + * Added *lt.desktop + * lxqt-admin-user: set Qt::AA_UseHighDpiPixmaps to true + * lxqt-admin-time: set Qt::AA_UseHighDpiPixmaps to true + * Add basic cli to lxqt-admin (#48) + * lxqt-admin-user: Check for duplicates from getgrent, getpwent + * Fix lxqt-admin-user does not save shell change #1199 (#45) + * Bump year + +0.11.1 / 2017-01-01 +=================== + + * Release 0.11.1: Update changelog * lxqt-admin-user: Add FreeBSD support * Added *da.desktop * Add French translation diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ee1436..5c31c53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,9 +7,19 @@ option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" O # Set default installation paths set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "Installation path for libraries") -find_package(Qt5Widgets REQUIRED QUIET) -find_package(lxqt REQUIRED QUIET) -find_package(KF5WindowSystem REQUIRED QUIET) +find_package(Qt5Widgets REQUIRED) +find_package(lxqt REQUIRED) +find_package(KF5WindowSystem REQUIRED) + +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE Release) +endif() + +# Patch Version +set(LXQT_ADMIN_PATCH_VERSION 0) + +set(LXQT_ADMIN_VERSION ${LXQT_MAJOR_VERSION}.${LXQT_MINOR_VERSION}.${LXQT_ADMIN_PATCH_VERSION}) +add_definitions("-DLXQT_ADMIN_VERSION=\"${LXQT_ADMIN_VERSION}\"") include(LXQtCompilerSettings NO_POLICY_SCOPE) include(LXQtTranslate) diff --git a/debian/changelog b/debian/changelog index 56043e2..4079968 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +lxqt-admin (0.12.0-1) experimental; urgency=medium + + * Cherry-picking new upstream version 0.12.0. + * Switched to experimental + * Bumped Standards to 4.1.1 - no changes needed + * Bumped liblxqt to >= 0.12.0 + + -- Alf Gaida Sun, 22 Oct 2017 23:35:49 +0200 + lxqt-admin (0.11.1-2) unstable; urgency=medium * Bumped Standards to 4.0.0 - no changes needed diff --git a/debian/control b/debian/control index ca3cc57..ec127dd 100644 --- a/debian/control +++ b/debian/control @@ -7,13 +7,13 @@ Section: x11 Priority: optional Build-Depends: debhelper (>= 10), libkf5windowsystem-dev, - liblxqt0-dev (>= 0.11.1), + liblxqt0-dev (>= 0.12.0), libqt5svg5-dev, libqt5x11extras5-dev, libx11-dev -Standards-Version: 4.0.0 -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-admin.git/?h=debian/sid -Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/lxqt-admin.git -b debian/sid +Standards-Version: 4.1.1 +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-lxqt/lxqt-admin.git/?h=debian/experimental +Vcs-Git: https://anonscm.debian.org/git/pkg-lxqt/lxqt-admin.git -b debian/experimental Homepage: https://github.com/lxde/lxqt-admin Package: lxqt-admin diff --git a/debian/gbp.conf b/debian/gbp.conf index 04ac689..b79c958 100644 --- a/debian/gbp.conf +++ b/debian/gbp.conf @@ -1,5 +1,5 @@ [DEFAULT] -debian-branch = debian/sid +debian-branch = debian/experimental pristine-tar = True [import-orig] diff --git a/lxqt-admin-time/main.cpp b/lxqt-admin-time/main.cpp index b457249..0a177c3 100644 --- a/lxqt-admin-time/main.cpp +++ b/lxqt-admin-time/main.cpp @@ -26,11 +26,24 @@ * END_COMMON_COPYRIGHT_HEADER */ #include +#include #include "timeadmindialog.h" int main(int argc, char **argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Admin Time")); + const QString VERINFO = QStringLiteral(LXQT_ADMIN_VERSION + "\nliblxqt " LXQT_VERSION + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + TimeAdminDialog dlg; dlg.setWindowIcon(QIcon::fromTheme("preferences-system")); app.setActivationWindow(&dlg); diff --git a/lxqt-admin-time/translations/lxqt-admin-time_lt.desktop b/lxqt-admin-time/translations/lxqt-admin-time_lt.desktop new file mode 100644 index 0000000..b8e3668 --- /dev/null +++ b/lxqt-admin-time/translations/lxqt-admin-time_lt.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[lt]=Data ir laikas +GenericName[lt]=Datos ir laiko nustatymai +Comment[lt]=Konfigūruoti sistemos datą ir laiką diff --git a/lxqt-admin-user/main.cpp b/lxqt-admin-user/main.cpp index 865ba21..187f5f5 100644 --- a/lxqt-admin-user/main.cpp +++ b/lxqt-admin-user/main.cpp @@ -26,11 +26,24 @@ * END_COMMON_COPYRIGHT_HEADER */ #include +#include #include "mainwindow.h" int main(int argc, char **argv) { LXQt::SingleApplication app(argc, argv); + app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); + + QCommandLineParser parser; + parser.setApplicationDescription(QStringLiteral("LXQt Admin User")); + const QString VERINFO = QStringLiteral(LXQT_ADMIN_VERSION \ + "\nliblxqt " LXQT_VERSION\ + "\nQt " QT_VERSION_STR); + app.setApplicationVersion(VERINFO); + parser.addVersionOption(); + parser.addHelpOption(); + parser.process(app); + MainWindow window; window.setWindowIcon(QIcon::fromTheme("preferences-system")); app.setActivationWindow(&window); diff --git a/lxqt-admin-user/translations/lxqt-admin-user_lt.desktop b/lxqt-admin-user/translations/lxqt-admin-user_lt.desktop new file mode 100644 index 0000000..885ff9f --- /dev/null +++ b/lxqt-admin-user/translations/lxqt-admin-user_lt.desktop @@ -0,0 +1,4 @@ +#TRANSLATIONS +Name[lt]=Naudotojai ir grupės +GenericName[lt]=Naudotojų ir grupių nustatymai +Comment[lt]=Konfigūruoti sistemos naudotojus ir grupes diff --git a/lxqt-admin-user/userdialog.cpp b/lxqt-admin-user/userdialog.cpp index cd8d4b0..6266a28 100644 --- a/lxqt-admin-user/userdialog.cpp +++ b/lxqt-admin-user/userdialog.cpp @@ -121,7 +121,7 @@ void UserDialog::accept() mUser->setFullName(ui.fullName->text()); mUser->setHomeDir(ui.homeDir->text()); - + mUser->setShell(ui.loginShell->currentText()); // main group QString groupName = ui.mainGroup->currentText(); if(!groupName.isEmpty()) { diff --git a/lxqt-admin-user/usermanager.cpp b/lxqt-admin-user/usermanager.cpp index 3722cf4..287ce34 100644 --- a/lxqt-admin-user/usermanager.cpp +++ b/lxqt-admin-user/usermanager.cpp @@ -54,10 +54,15 @@ UserManager::~UserManager() { void UserManager::loadUsersAndGroups() { + // Note: getpwent(), getgrent() makes no attempt to suppress duplicate information + // if multiple sources are specified in nsswitch.conf(5). + // load groups setgrent(); struct group * grp; while((grp = getgrent())) { + if (mGroups.cend() != std::find_if(mGroups.cbegin(), mGroups.cend(), [grp] (const GroupInfo * g) -> bool { return g->gid() == grp->gr_gid; })) + continue; GroupInfo* group = new GroupInfo(grp); mGroups.append(group); // add members of this group @@ -74,6 +79,8 @@ void UserManager::loadUsersAndGroups() setpwent(); struct passwd * pw; while((pw = getpwent())) { + if (mUsers.cend() != std::find_if(mUsers.cbegin(), mUsers.cend(), [pw] (const UserInfo * u) -> bool { return u->uid() == pw->pw_uid; })) + continue; UserInfo* user = new UserInfo(pw); mUsers.append(user); // add groups to this user