diff --git a/src/calculateconfig.cpp b/src/calculateconfig.cpp index f4852a5..c1e48aa 100644 --- a/src/calculateconfig.cpp +++ b/src/calculateconfig.cpp @@ -31,10 +31,10 @@ bool CalculateConfig::getDefaultConfig() // start cl-install -v and parse out QProcess cl_install; - qDebug() << "Start cl-install -v --xml --filter (os_install*|os_locale_lang|os_disk*|os_device*)"; + qDebug() << "Start cl-install -v --xml --filter (os_install*|os_locale_lang|os_disk*|os_device*|cl_migrate_user)"; cl_install.start( - "cl-install -v --xml --filter \"os_install*|os_locale_lang|*os_disk*|*os_device*\"" + "cl-install -v --xml --filter \"os_install*|os_locale_lang|*os_disk*|*os_device*|cl_migrate_user\"" ); if ( !cl_install.waitForStarted() ) @@ -89,6 +89,8 @@ bool CalculateConfig::getDefaultConfig() m_Config["def_os_install_disk_mount"] = m_Config["os_install_disk_mount"]; m_Config["def_os_install_disk_perform_format"] = m_Config["os_install_disk_perform_format"]; + m_Config["def_cl_migrate_user"] = m_Config["cl_migrate_user"]; + return true; } diff --git a/src/pageusers.cpp b/src/pageusers.cpp index 55e2983..9d8a3e5 100644 --- a/src/pageusers.cpp +++ b/src/pageusers.cpp @@ -31,7 +31,10 @@ PageUsers::PageUsers() connect( m_edRootPswRep, SIGNAL(textChanged(QString)), this, SLOT(checkPasswords()) ); // add default guest user - m_lstUsers->addItem("guest"); + m_migratedUsers = CalculateConfig::instance()->getValue("def_cl_migrate_user").toStringList(); + if ( !m_migratedUsers.contains("guest") ) + m_lstUsers->addItem("guest"); + checkPasswords(); } @@ -86,6 +89,13 @@ void PageUsers::setupUi() m_lstUsers = new QListWidget; + QFrame* hline2 = new QFrame; + hline2->setFrameShape(QFrame::HLine); + hline2->setFrameShadow(QFrame::Sunken); + + m_labMigratedUsers = new QLabel(""); + m_labMigratedUsers->setWordWrap(true); + QVBoxLayout* vbox_0 = new QVBoxLayout; vbox_0->addLayout(hbox_0); vbox_0->addLayout(gbox_0); @@ -94,7 +104,9 @@ void PageUsers::setupUi() vbox_0->addLayout(hbox_users); vbox_0->addLayout(hbox_but); vbox_0->addWidget(m_lstUsers); - //vbox_0->addStretch(); + vbox_0->addWidget(hline2); + vbox_0->addWidget(m_labMigratedUsers); +// vbox_0->addStretch(); setLayout(vbox_0); @@ -116,6 +128,9 @@ void PageUsers::retranslateUi() m_lstUsers->setToolTip( tr("Added users.\nFor modifying user - double click it.") ); m_labUsers->setText( tr("Create users:") ); + + if ( m_migratedUsers.size() > 0 ) + m_labMigratedUsers->setText( tr("These user accounts will be migrated: ") + m_migratedUsers.join(", ") ); } void PageUsers::show() @@ -125,7 +140,7 @@ void PageUsers::show() m_edRootPsw->setEnabled(false); m_edRootPswRep->setEnabled(false); m_pswState = true; - m_labMatch->setText( tr("Root password will be moved from current system.") ); + m_labMatch->setText( "" ); //tr("Root password will be moved from current system.") ); } emit changeNext( m_pswState ); @@ -146,7 +161,7 @@ void PageUsers::addUser() UserInfo userInfo = userDlg->getUserInfo(); - if ( findUserName(userInfo) == -1 ) + if ( findUserName(userInfo) == -1 && !m_migratedUsers.contains(userInfo.name) ) { m_lstUserInfo << userInfo; m_lstUsers->addItem( userInfo.name ); @@ -178,7 +193,8 @@ void PageUsers::delUser() if (m_lstUserInfo.isEmpty()) { - m_lstUsers->addItem("guest"); + if ( !m_migratedUsers.contains("guest") ) + m_lstUsers->addItem("guest"); } } updateConfig(); diff --git a/src/pageusers.h b/src/pageusers.h index f7e1e8d..9334f68 100644 --- a/src/pageusers.h +++ b/src/pageusers.h @@ -49,6 +49,9 @@ private: QListWidget* m_lstUsers; + QLabel* m_labMigratedUsers; + bool m_pswState; QList m_lstUserInfo; + QStringList m_migratedUsers; }; diff --git a/translations/cl-install-gui_bg.ts b/translations/cl-install-gui_bg.ts index 516ab5e..72f0822 100644 --- a/translations/cl-install-gui_bg.ts +++ b/translations/cl-install-gui_bg.ts @@ -40,7 +40,7 @@ Partition: - + Дял: none @@ -48,11 +48,11 @@ Warning - + Предупреждение Mount point must be not empty - + Точка на монтиране не може да бъде празна Duplicate mount point %1 @@ -330,16 +330,17 @@ Add a new mount point - + Добавете нова точка на монтиране Remove a selected mount point - + Премахнете избраната точка на монтиране Mount point - + Точка на +монтиране File @@ -350,23 +351,24 @@ system Choose mount points for the installation. You need at least a root / partition. To modify the mount point, double-click it. - + Изберете точка на монтиране за инсталацията. Минимално необходимо е да изберете дял за / . +За редактиране на създадена точка за монтиране, кликнете два пъти на нея. To continue You need to choose partition for mount point %1. - + За да продължите изберете раздел за точка на монтиране %1 Adding is not possible. All partitions is busy. - + Не може да се добави. Всички дялове вече се използват. Root partition can't be deleted - + Дял / не може да бъде изтрит. Migrated mount point can't be deleted. Use 'none' for disabling migration. - + ... точка за монтиране не може да бъде изтрита. Използвайте none в име на раздела за деактивиране на прехвърлянето. @@ -442,7 +444,7 @@ For modifying user - double click it. Root password will be moved from current system. - Паролата за потребител root ще бъде преместена в текущата система. + Паролата за потребител root ще бъде преместена в текущата система. Error @@ -468,6 +470,10 @@ For modifying user - double click it. Passwords do not match Паролите не съвпадат + + These user accounts will be migrated: + + PageWelcome diff --git a/translations/cl-install-gui_ru.ts b/translations/cl-install-gui_ru.ts index a660384..59b03e3 100644 --- a/translations/cl-install-gui_ru.ts +++ b/translations/cl-install-gui_ru.ts @@ -32,7 +32,7 @@ OK - + OK Cancel @@ -339,7 +339,8 @@ Mount point - Точка монтирования + Точка +монтирования File @@ -442,7 +443,7 @@ For modifying user - double click it. Root password will be moved from current system. - Пароль пользователя root будет перенесен из текущей системы. + Пароль пользователя root будет перенесен из текущей системы. Error @@ -468,6 +469,10 @@ For modifying user - double click it. Passwords do not match Пароли не совпадают + + These user accounts will be migrated: + Эти аккаунты будут перенесены: + PageWelcome @@ -658,7 +663,7 @@ For modifying user - double click it. OK - + ОК Cancel diff --git a/translations/cl-install-gui_uk.ts b/translations/cl-install-gui_uk.ts index 6102fc5..a11f227 100644 --- a/translations/cl-install-gui_uk.ts +++ b/translations/cl-install-gui_uk.ts @@ -40,7 +40,6 @@ Cancel - Отмена Скасування @@ -498,7 +497,7 @@ For modifying user - double click it. Root password will be moved from current system. Пароль пользователя root будет перенесен из текущей системы. - Пароль користувача root буде перенесений з поточної системи. + Пароль користувача root буде перенесений з поточної системи. Error @@ -529,6 +528,10 @@ For modifying user - double click it. Пароли не совпадают Паролі не збігаються + + These user accounts will be migrated: + + PageWelcome