Compare commits

...

6 Commits

Author SHA1 Message Date
Philip
4c3d634df0 [displaymanager] if gnome is present, budgie should be detected first 2016-01-02 10:24:43 +01:00
Philip
7c1d193234 [displaymanager] add budgie v10.1 support 2016-01-02 07:42:14 +01:00
Philip
5456ed3b53 fix missing terminating warning 2015-10-16 18:53:34 +02:00
Teo Mrnjavac
198d5d5c4a Add new users to a group with the same name. 2015-10-16 16:45:34 +02:00
Teo Mrnjavac
9f4b8c16b6 Allow reusing the user password as root password. 2015-10-16 14:59:12 +02:00
Teo Mrnjavac
27b5fa4d5b Make sure the FullName is not empty. 2015-10-15 13:25:08 +02:00
4 changed files with 160 additions and 180 deletions

View File

@@ -31,6 +31,8 @@ DesktopEnvironment = collections.namedtuple('DesktopEnvironment', ['executable',
desktop_environments = [
DesktopEnvironment('/usr/bin/startkde', 'plasma'), # KDE Plasma 5
DesktopEnvironment('/usr/bin/startkde', 'kde-plasma'), # KDE Plasma 4
DesktopEnvironment('/usr/bin/budgie-desktop', 'budgie-desktop'), # Budgie v10.x
DesktopEnvironment('/usr/bin/budgie-session', 'budgie-desktop'), # Budgie v8.x
DesktopEnvironment('/usr/bin/gnome-session', 'gnome'),
DesktopEnvironment('/usr/bin/startxfce4', 'xfce'),
DesktopEnvironment('/usr/bin/cinnamon-session-cinnamon', 'cinnamon'),
@@ -41,7 +43,6 @@ desktop_environments = [
DesktopEnvironment('/usr/bin/lxqt-session', 'lxqt'),
DesktopEnvironment('/usr/bin/pekwm', 'pekwm'),
DesktopEnvironment('/usr/bin/pantheon-session', 'pantheon'),
DesktopEnvironment('/usr/bin/budgie-session', 'budgie-session'),
DesktopEnvironment('/usr/bin/i3', 'i3'),
DesktopEnvironment('/usr/bin/openbox-session', 'openbox')
]

View File

@@ -128,8 +128,7 @@ CreateUserJob::exec()
"-m",
"-s",
"/bin/bash",
"-g",
"users",
"-U",
"-G",
defaultGroups,
m_userName } );

View File

@@ -66,11 +66,22 @@ UsersPage::UsersPage( QWidget* parent )
this, &UsersPage::onRootPasswordTextChanged );
connect( ui->textBoxVerifiedRootPassword, &QLineEdit::textChanged,
this, &UsersPage::onRootPasswordTextChanged );
connect( ui->checkBoxReusePassword, &QCheckBox::stateChanged,
this, [this]( int checked )
{
ui->labelChooseRootPassword->setVisible( !checked );
ui->labelExtraRootPassword->setVisible( !checked );
ui->labelRootPassword->setVisible( !checked );
ui->labelRootPasswordError->setVisible( !checked );
ui->textBoxRootPassword->setVisible( !checked );
ui->textBoxVerifiedRootPassword->setVisible( !checked );
} );
m_customUsername = false;
m_customHostname = false;
setShowRootPassword( true );
ui->checkBoxReusePassword->setChecked( true );
CALAMARES_RETRANSLATE( ui->retranslateUi( this ); )
}
@@ -88,7 +99,7 @@ UsersPage::isReady()
return m_readyFullName &&
m_readyHostname &&
m_readyPassword &&
( !m_showRootPassword || m_readyRootPassword ) &&
( !m_showRootPassword || ( ui->checkBoxReusePassword->isChecked() || m_readyRootPassword ) ) &&
m_readyUsername;
}
@@ -102,8 +113,10 @@ UsersPage::createJobs( const QString& defaultUserGroup, const QStringList& defau
Calamares::Job* j;
j = new CreateUserJob( ui->textBoxUsername->text(),
QString(),
ui->checkBoxLoginAuto->isChecked(),
ui->textBoxFullName->text().isEmpty() ?
ui->textBoxUsername->text() :
ui->textBoxFullName->text(),
ui->checkBoxAutoLogin->isChecked(),
defaultUserGroup,
defaultGroupsList );
list.append( Calamares::job_ptr( j ) );
@@ -114,8 +127,12 @@ UsersPage::createJobs( const QString& defaultUserGroup, const QStringList& defau
if ( m_showRootPassword )
{
j = new SetPasswordJob( "root",
ui->textBoxRootPassword->text() );
if ( ui->checkBoxReusePassword->isChecked() )
j = new SetPasswordJob( "root",
ui->textBoxUserPassword->text() );
else
j = new SetPasswordJob( "root",
ui->textBoxRootPassword->text() );
list.append( Calamares::job_ptr( j ) );
}
@@ -124,7 +141,7 @@ UsersPage::createJobs( const QString& defaultUserGroup, const QStringList& defau
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
gs->insert( "hostname", ui->textBoxHostname->text() );
if ( ui->checkBoxLoginAuto->isChecked() )
if ( ui->checkBoxAutoLogin->isChecked() )
gs->insert( "autologinUser", ui->textBoxUsername->text() );
gs->insert( "username", ui->textBoxUsername->text() );
@@ -143,13 +160,7 @@ UsersPage::onActivate()
void
UsersPage::setShowRootPassword( bool show )
{
ui->labelChooseRootPassword->setVisible( show );
ui->labelExtraRootPassword->setVisible( show );
ui->labelRootPassword->setVisible( show );
ui->labelRootPasswordError->setVisible( show );
ui->textBoxRootPassword->setVisible( show );
ui->textBoxVerifiedRootPassword->setVisible( show );
ui->checkBoxReusePassword->setVisible( show );
m_showRootPassword = show;
}
@@ -412,6 +423,5 @@ UsersPage::onRootPasswordTextChanged( const QString& )
void
UsersPage::setAutologinDefault( bool checked )
{
ui->checkBoxLoginAuto->setChecked( checked );
ui->checkBoxLoginNormal->setChecked( !checked );
ui->checkBoxAutoLogin->setChecked( checked );
}

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>862</width>
<height>597</height>
<height>683</height>
</rect>
</property>
<property name="windowTitle">
@@ -19,10 +19,13 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
<height>6</height>
</size>
</property>
</spacer>
@@ -97,10 +100,13 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
<height>6</height>
</size>
</property>
</spacer>
@@ -199,14 +205,126 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
<height>6</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="hostname_label_2">
<property name="text">
<string>What is the name of this computer?</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLineEdit" name="textBoxHostname">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelHostname">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelHostnameError">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="hostname_extra_label_2">
<property name="styleSheet">
<string>font-weight: normal</string>
</property>
<property name="text">
<string>&lt;small&gt;This name will be used if you make the computer visible to others on a network.&lt;/small&gt;</string>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>6</height>
</size>
</property>
</spacer>
@@ -327,120 +445,31 @@
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="hostname_label_2">
<widget class="QCheckBox" name="checkBoxAutoLogin">
<property name="text">
<string>What is the name of this computer?</string>
</property>
<property name="wordWrap">
<bool>false</bool>
<string>Log in automatically without asking for the password.</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLineEdit" name="textBoxHostname">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelHostname">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelHostnameError">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignVCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="hostname_extra_label_2">
<property name="styleSheet">
<string>font-weight: normal</string>
</property>
<widget class="QCheckBox" name="checkBoxReusePassword">
<property name="text">
<string>&lt;small&gt;This name will be used if you make the computer visible to others on a network.&lt;/small&gt;</string>
</property>
<property name="wordWrap">
<bool>false</bool>
<string>Use the same password for the administrator account.</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
<height>6</height>
</size>
</property>
</spacer>
@@ -560,61 +589,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<widget class="QWidget" name="widget_7" native="true">
<layout class="QGridLayout" name="gridLayout_10">
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item row="0" column="1">
<widget class="QRadioButton" name="checkBoxLoginAuto">
<property name="text">
<string>&amp;Log in automatically</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QRadioButton" name="checkBoxLoginNormal">
<property name="text">
<string>Require &amp;my password to log in</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_7">
<property name="orientation">
@@ -630,10 +604,6 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>checkBoxLoginNormal</tabstop>
<tabstop>checkBoxLoginAuto</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>