Cherry-picking upstream version 0.12.0.
This commit is contained in:
parent
e04885a98f
commit
ea300003ee
2
AUTHORS
2
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.
|
||||
|
16
CHANGELOG
16
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
|
||||
|
@ -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)
|
||||
|
@ -26,11 +26,24 @@
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/SingleApplication>
|
||||
#include <QCommandLineParser>
|
||||
#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);
|
||||
|
4
lxqt-admin-time/translations/lxqt-admin-time_lt.desktop
Normal file
4
lxqt-admin-time/translations/lxqt-admin-time_lt.desktop
Normal file
@ -0,0 +1,4 @@
|
||||
#TRANSLATIONS
|
||||
Name[lt]=Data ir laikas
|
||||
GenericName[lt]=Datos ir laiko nustatymai
|
||||
Comment[lt]=Konfigūruoti sistemos datą ir laiką
|
@ -26,11 +26,24 @@
|
||||
* END_COMMON_COPYRIGHT_HEADER */
|
||||
|
||||
#include <LXQt/SingleApplication>
|
||||
#include <QCommandLineParser>
|
||||
#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);
|
||||
|
4
lxqt-admin-user/translations/lxqt-admin-user_lt.desktop
Normal file
4
lxqt-admin-user/translations/lxqt-admin-user_lt.desktop
Normal file
@ -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
|
@ -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()) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user