Skip to content

Commit d9cca9e

Browse files
author
pardus
committed
settings form is revised
1 parent 63a8001 commit d9cca9e

File tree

6 files changed

+24
-86
lines changed

6 files changed

+24
-86
lines changed

src/loginform.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ void LoginForm::LoginTimerFinished(){
11861186

11871187
case 0:
11881188

1189-
qInfo() << "Login start for " + toolButtons[(lastuserindex + 1) % 3]->text().trimmed();
1189+
11901190

11911191
ui->waitlabel->setText(tr("Authenticating"));
11921192
pageTransition(ui->waitpage);
@@ -1213,6 +1213,7 @@ void LoginForm::LoginTimerFinished(){
12131213
} else{
12141214
userid = toolButtons[(lastuserindex+ 1) % 3]->text();
12151215
}
1216+
qInfo() << "Login start for " + userid;
12161217

12171218
qInfo() << "User name is sending";
12181219
m_Greeter.authenticate(userid.trimmed());

src/networkdialog.cpp

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,11 @@ void NetworkDialog::SetText(QString Text){
3737
void NetworkDialog::addService(QString Text){
3838

3939

40-
ui->servicecomboBox->addItem(Text, Text);
40+
4141
}
4242

4343
static bool hidden = false;
4444

45-
void NetworkDialog::on_restartservicebutton_clicked()
46-
{
47-
char *setcommand;
48-
char cmd_array[256];
49-
memset(cmd_array,0,sizeof(cmd_array));
50-
51-
QString actionName = ui->servicecomboBox->itemData(ui->servicecomboBox->currentIndex()).toString();
52-
53-
if(actionName == NULL)
54-
return;
55-
56-
57-
QByteArray ba;
58-
ba = actionName.toLatin1();
59-
setcommand = ba.data();
60-
61-
close();
62-
hidden =true;
63-
64-
sprintf(cmd_array, "systemctl restart %s &",setcommand);
65-
system(cmd_array);
66-
67-
emit servicereset();
68-
69-
logButtonClicked = false;
70-
71-
}
7245

7346
void NetworkDialog::on_logbutton_clicked()
7447
{

src/networkdialog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class NetworkDialog : public QDialog
2626
void servicereset(void);
2727

2828
private slots:
29-
void on_restartservicebutton_clicked();
3029

3130
void on_logbutton_clicked();
3231

src/networkdialog.ui

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -91,42 +91,7 @@ QComboBox::down-arrow {
9191
<enum>QFrame::Raised</enum>
9292
</property>
9393
<layout class="QGridLayout" name="gridLayout">
94-
<item row="0" column="0">
95-
<widget class="QComboBox" name="servicecomboBox">
96-
<property name="minimumSize">
97-
<size>
98-
<width>150</width>
99-
<height>30</height>
100-
</size>
101-
</property>
102-
<property name="focusPolicy">
103-
<enum>Qt::StrongFocus</enum>
104-
</property>
105-
</widget>
106-
</item>
10794
<item row="0" column="1">
108-
<widget class="QPushButton" name="restartservicebutton">
109-
<property name="minimumSize">
110-
<size>
111-
<width>0</width>
112-
<height>30</height>
113-
</size>
114-
</property>
115-
<property name="maximumSize">
116-
<size>
117-
<width>150</width>
118-
<height>16777215</height>
119-
</size>
120-
</property>
121-
<property name="focusPolicy">
122-
<enum>Qt::StrongFocus</enum>
123-
</property>
124-
<property name="text">
125-
<string>Restart Service</string>
126-
</property>
127-
</widget>
128-
</item>
129-
<item row="0" column="2">
13095
<widget class="QPushButton" name="logbutton">
13196
<property name="minimumSize">
13297
<size>
@@ -148,7 +113,7 @@ QComboBox::down-arrow {
148113
</property>
149114
</widget>
150115
</item>
151-
<item row="1" column="0" colspan="3">
116+
<item row="1" column="0" colspan="2">
152117
<widget class="QTextEdit" name="NDtextEdit">
153118
<property name="focusPolicy">
154119
<enum>Qt::NoFocus</enum>

src/settingsform.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,19 +324,19 @@ void SettingsForm::on_NwpushButton_clicked()
324324

325325
}
326326

327-
nwDialog->setFixedHeight((line_count + 1) * 20 + 50);
328-
nwDialog->setFixedWidth(this->width() + 100);
327+
nwDialog->setFixedHeight((line_count + 1) * 30 + 50);
328+
nwDialog->setFixedWidth(this->width() + 200);
329329
QPoint pt_g = QWidget::mapToGlobal(this->pos());
330330
QPoint pt = this->pos();
331331

332-
uint labelx = ((pt_g.x() - pt.x())+ (this->width() - 100)/2) - ((nwDialog->width()) / 2);
332+
uint labelx = ((pt_g.x() - pt.x())+ (this->width() - 200)/2) - ((nwDialog->width()) / 2);
333333

334334
nwDialog->logButtonClicked = false;
335335
nwDialog->SetText(networkInfoString);
336336

337-
nwDialog->setGeometry(labelx, (pt_g.y() - pt.y()) - ((line_count + 1) * 20 + 50), 0, 0);
338-
nwDialog->setFixedHeight((line_count + 1) * 20 + 50);
339-
nwDialog->setFixedWidth(this->width() + 100);
337+
nwDialog->setGeometry(labelx, (pt_g.y() - pt.y()) - ((line_count + 1) * 30 + 50), 0, 0);
338+
nwDialog->setFixedHeight((line_count + 1) * 30 + 50);
339+
nwDialog->setFixedWidth(this->width() + 200);
340340

341341
nwDialog->exec();
342342
nwDialog->clearFocus();

src/settingsform.ui

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<rect>
1010
<x>0</x>
1111
<y>0</y>
12-
<width>408</width>
13-
<height>109</height>
12+
<width>260</width>
13+
<height>165</height>
1414
</rect>
1515
</property>
1616
<property name="sizePolicy">
@@ -129,9 +129,9 @@ QComboBox::down-arrow {
129129
<widget class="QComboBox" name="kybrdcomboBox">
130130
<property name="geometry">
131131
<rect>
132-
<x>167</x>
133-
<y>60</y>
134-
<width>135</width>
132+
<x>115</x>
133+
<y>65</y>
134+
<width>140</width>
135135
<height>45</height>
136136
</rect>
137137
</property>
@@ -361,8 +361,8 @@ QComboBox::down-arrow {
361361
<widget class="QPushButton" name="NwpushButton">
362362
<property name="geometry">
363363
<rect>
364-
<x>310</x>
365-
<y>60</y>
364+
<x>50</x>
365+
<y>65</y>
366366
<width>60</width>
367367
<height>45</height>
368368
</rect>
@@ -408,10 +408,10 @@ QComboBox::down-arrow {
408408
<widget class="QLabel" name="hostnamelabel">
409409
<property name="geometry">
410410
<rect>
411-
<x>10</x>
412-
<y>10</y>
413-
<width>201</width>
414-
<height>41</height>
411+
<x>44</x>
412+
<y>5</y>
413+
<width>211</width>
414+
<height>55</height>
415415
</rect>
416416
</property>
417417
<property name="text">
@@ -424,9 +424,9 @@ QComboBox::down-arrow {
424424
<widget class="QComboBox" name="sessioncomboBox">
425425
<property name="geometry">
426426
<rect>
427-
<x>10</x>
428-
<y>60</y>
429-
<width>150</width>
427+
<x>115</x>
428+
<y>115</y>
429+
<width>140</width>
430430
<height>45</height>
431431
</rect>
432432
</property>

0 commit comments

Comments
 (0)