-rw-r--r-- | noncore/net/opierdesktop/qtwin.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opierdesktop/qtwin.cpp b/noncore/net/opierdesktop/qtwin.cpp index 54a5a03..71ba5a5 100644 --- a/noncore/net/opierdesktop/qtwin.cpp +++ b/noncore/net/opierdesktop/qtwin.cpp | |||
@@ -91,114 +91,114 @@ void CleanString(QString* Item) | |||
91 | } | 91 | } |
92 | } | 92 | } |
93 | 93 | ||
94 | //***************************************************************************** | 94 | //***************************************************************************** |
95 | QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true) | 95 | QMyDialog::QMyDialog(QWidget* parent) : QDialog(parent, "Settings", true) |
96 | { | 96 | { |
97 | setCaption( tr( "Configuration" ) ); | 97 | setCaption( tr( "Configuration" ) ); |
98 | int i, j; | 98 | int i, j; |
99 | char* home; | 99 | char* home; |
100 | char Text[256]; | 100 | char Text[256]; |
101 | QString Line; | 101 | QString Line; |
102 | QString ItemName; | 102 | QString ItemName; |
103 | QString ItemValue; | 103 | QString ItemValue; |
104 | 104 | ||
105 | // resize dialog | 105 | // resize dialog |
106 | resize(230, 270); | 106 | resize(230, 270); |
107 | // main list box | 107 | // main list box |
108 | ListBox = new QListBox(this); | 108 | ListBox = new QListBox(this); |
109 | ListBox->move(10, 10); | 109 | ListBox->move(10, 10); |
110 | ListBox->resize(200, 100); | 110 | ListBox->resize(200, 100); |
111 | connect(ListBox, SIGNAL(selectionChanged()), this, SLOT(ListBoxChanged())); | 111 | connect(ListBox, SIGNAL(selectionChanged()), this, SLOT(ListBoxChanged())); |
112 | connect(ListBox, SIGNAL(selected(int)), this, SLOT(ListBoxSelected(int))); | 112 | connect(ListBox, SIGNAL(selected(int)), this, SLOT(ListBoxSelected(int))); |
113 | // server | 113 | // server |
114 | Label1 = new QLabel(this); | 114 | Label1 = new QLabel(this); |
115 | Label1->setText("Server Desc"); | 115 | Label1->setText( tr("Server Desc") ); |
116 | Label1->move(10, 120); | 116 | Label1->move(10, 120); |
117 | Label1->resize(100, 20); | 117 | Label1->resize(100, 20); |
118 | ServerNameEdit = new QLineEdit(this); | 118 | ServerNameEdit = new QLineEdit(this); |
119 | ServerNameEdit->move(75, 120); | 119 | ServerNameEdit->move(75, 120); |
120 | ServerNameEdit->resize(100, 20); | 120 | ServerNameEdit->resize(100, 20); |
121 | // username | 121 | // username |
122 | Label2 = new QLabel(this); | 122 | Label2 = new QLabel(this); |
123 | Label2->setText("User Name"); | 123 | Label2->setText( tr("User Name") ); |
124 | Label2->move(10, 150); | 124 | Label2->move(10, 150); |
125 | Label2->resize(100, 20); | 125 | Label2->resize(100, 20); |
126 | UserNameEdit = new QLineEdit(this); | 126 | UserNameEdit = new QLineEdit(this); |
127 | UserNameEdit->move(75, 150); | 127 | UserNameEdit->move(75, 150); |
128 | UserNameEdit->resize(100, 20); | 128 | UserNameEdit->resize(100, 20); |
129 | // ip | 129 | // ip |
130 | Label3 = new QLabel(this); | 130 | Label3 = new QLabel(this); |
131 | Label3->setText("Server IP"); | 131 | Label3->setText( tr("Server Address") ); |
132 | Label3->move(10, 180); | 132 | Label3->move(10, 180); |
133 | Label3->resize(100, 20); | 133 | Label3->resize(100, 20); |
134 | IPEdit = new QLineEdit(this); | 134 | IPEdit = new QLineEdit(this); |
135 | IPEdit->move(75, 180); | 135 | IPEdit->move(75, 180); |
136 | IPEdit->resize(100, 20); | 136 | IPEdit->resize(100, 20); |
137 | // width and height | 137 | // width and height |
138 | WidthHeightBox = new QComboBox(this); | 138 | WidthHeightBox = new QComboBox(this); |
139 | WidthHeightBox->move(10, 210); | 139 | WidthHeightBox->move(10, 210); |
140 | WidthHeightBox->resize(100, 20); | 140 | WidthHeightBox->resize(100, 20); |
141 | WidthHeightBox->insertItem("240x320"); | 141 | WidthHeightBox->insertItem("240x320"); |
142 | WidthHeightBox->insertItem("640x480"); | 142 | WidthHeightBox->insertItem("640x480"); |
143 | WidthHeightBox->insertItem("800x600"); | 143 | WidthHeightBox->insertItem("800x600"); |
144 | connect(WidthHeightBox, SIGNAL(activated(int)), this, SLOT(ComboChanged(int))); | 144 | connect(WidthHeightBox, SIGNAL(activated(int)), this, SLOT(ComboChanged(int))); |
145 | WidthHeightBox->setCurrentItem(1); | 145 | WidthHeightBox->setCurrentItem(1); |
146 | WidthEdit = new QLineEdit(this); | 146 | WidthEdit = new QLineEdit(this); |
147 | WidthEdit->move(110, 210); | 147 | WidthEdit->move(110, 210); |
148 | WidthEdit->resize(30, 20); | 148 | WidthEdit->resize(30, 20); |
149 | WidthEdit->setText("800"); | 149 | WidthEdit->setText("800"); |
150 | HeightEdit = new QLineEdit(this); | 150 | HeightEdit = new QLineEdit(this); |
151 | HeightEdit->move(140, 210); | 151 | HeightEdit->move(140, 210); |
152 | HeightEdit->resize(30, 20); | 152 | HeightEdit->resize(30, 20); |
153 | HeightEdit->setText("600"); | 153 | HeightEdit->setText("600"); |
154 | // add to list button | 154 | // add to list button |
155 | AddButton = new QPushButton(this); | 155 | AddButton = new QPushButton(this); |
156 | AddButton->move(180, 120); | 156 | AddButton->move(180, 120); |
157 | AddButton->resize(50, 20); | 157 | AddButton->resize(50, 20); |
158 | AddButton->setText("Add"); | 158 | AddButton->setText(tr("Add", "Add Connection")); |
159 | connect(AddButton, SIGNAL(clicked()), this, SLOT(AddClicked())); | 159 | connect(AddButton, SIGNAL(clicked()), this, SLOT(AddClicked())); |
160 | // change list item button | 160 | // change list item button |
161 | EditButton = new QPushButton(this); | 161 | EditButton = new QPushButton(this); |
162 | EditButton->move(180, 140); | 162 | EditButton->move(180, 140); |
163 | EditButton->resize(50, 20); | 163 | EditButton->resize(50, 20); |
164 | EditButton->setText("Edit"); | 164 | EditButton->setText(tr("Edit")); |
165 | connect(EditButton, SIGNAL(clicked()), this, SLOT(EditClicked())); | 165 | connect(EditButton, SIGNAL(clicked()), this, SLOT(EditClicked())); |
166 | // save to file button | 166 | // save to file button |
167 | SaveButton = new QPushButton(this); | 167 | SaveButton = new QPushButton(this); |
168 | SaveButton->move(180, 160); | 168 | SaveButton->move(180, 160); |
169 | SaveButton->resize(50, 20); | 169 | SaveButton->resize(50, 20); |
170 | SaveButton->setText("Save"); | 170 | SaveButton->setText(tr("Save")); |
171 | connect(SaveButton, SIGNAL(clicked()), this, SLOT(SaveClicked())); | 171 | connect(SaveButton, SIGNAL(clicked()), this, SLOT(SaveClicked())); |
172 | // remove an item button | 172 | // remove an item button |
173 | RemoveButton = new QPushButton(this); | 173 | RemoveButton = new QPushButton(this); |
174 | RemoveButton->move(180, 180); | 174 | RemoveButton->move(180, 180); |
175 | RemoveButton->resize(50, 20); | 175 | RemoveButton->resize(50, 20); |
176 | RemoveButton->setText("Remove"); | 176 | RemoveButton->setText(tr("Remove")); |
177 | connect(RemoveButton, SIGNAL(clicked()), this, SLOT(RemoveClicked())); | 177 | connect(RemoveButton, SIGNAL(clicked()), this, SLOT(RemoveClicked())); |
178 | // full screen check box | 178 | // full screen check box |
179 | FullScreenCheckBox = new QCheckBox(this, "Full Screen"); | 179 | FullScreenCheckBox = new QCheckBox(this, "Full Screen"); |
180 | FullScreenCheckBox->setText("Full Screen"); | 180 | FullScreenCheckBox->setText(tr("Full Screen")); |
181 | FullScreenCheckBox->move(10, 230); | 181 | FullScreenCheckBox->move(10, 230); |
182 | // ok button | 182 | // ok button |
183 | 183 | ||
184 | for (i = 0; i < 10; i++) | 184 | for (i = 0; i < 10; i++) |
185 | { | 185 | { |
186 | ConnectionList[i] = new QMyConnectionItem; | 186 | ConnectionList[i] = new QMyConnectionItem; |
187 | ConnectionList[i]->ServerName = ""; | 187 | ConnectionList[i]->ServerName = ""; |
188 | ConnectionList[i]->UserName = ""; | 188 | ConnectionList[i]->UserName = ""; |
189 | ConnectionList[i]->ServerIP = ""; | 189 | ConnectionList[i]->ServerIP = ""; |
190 | ConnectionList[i]->Width = 0; | 190 | ConnectionList[i]->Width = 0; |
191 | ConnectionList[i]->Height = 0; | 191 | ConnectionList[i]->Height = 0; |
192 | ConnectionList[i]->FullScreen = 0; | 192 | ConnectionList[i]->FullScreen = 0; |
193 | } | 193 | } |
194 | home = getenv("HOME"); | 194 | home = getenv("HOME"); |
195 | if (home != NULL) | 195 | if (home != NULL) |
196 | { | 196 | { |
197 | sprintf(Text, "%s/rdesktop.ini", home); | 197 | sprintf(Text, "%s/rdesktop.ini", home); |
198 | QFile* File = new QFile(Text); | 198 | QFile* File = new QFile(Text); |
199 | if (File->open(IO_ReadOnly)) | 199 | if (File->open(IO_ReadOnly)) |
200 | { | 200 | { |
201 | i = -1; | 201 | i = -1; |
202 | while (!File->atEnd()) | 202 | while (!File->atEnd()) |
203 | { | 203 | { |
204 | File->readLine(Line, 255); | 204 | File->readLine(Line, 255); |