summaryrefslogtreecommitdiff
path: root/noncore/tools/formatter/formatter.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/tools/formatter/formatter.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/tools/formatter/formatter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/formatter/formatter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp
index e869317..77e1790 100644
--- a/noncore/tools/formatter/formatter.cpp
+++ b/noncore/tools/formatter/formatter.cpp
@@ -115,99 +115,99 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool
115 115
116 tabLayout_2->addMultiCellWidget( mountPointLineEdit, 0, 0, 0, 1); 116 tabLayout_2->addMultiCellWidget( mountPointLineEdit, 0, 0, 0, 1);
117 117
118 deviceComboBox = new QComboBox( FALSE, tab_2, "deviceComboBox" ); 118 deviceComboBox = new QComboBox( FALSE, tab_2, "deviceComboBox" );
119 119
120 tabLayout_2->addMultiCellWidget( deviceComboBox, 3, 3, 0, 1); 120 tabLayout_2->addMultiCellWidget( deviceComboBox, 3, 3, 0, 1);
121 121
122 TextLabel5 = new QLabel( tab_2, "TextLabel5" ); 122 TextLabel5 = new QLabel( tab_2, "TextLabel5" );
123 TextLabel5->setText( tr( "CAUTION:\n" 123 TextLabel5->setText( tr( "CAUTION:\n"
124 "Changing parameters on this\n" 124 "Changing parameters on this\n"
125 "page may cause your system\n" 125 "page may cause your system\n"
126 "to stop functioning properly!" ) );//idiot message 126 "to stop functioning properly!" ) );//idiot message
127 127
128 tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1); 128 tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1);
129 129
130 editPushButton = new QPushButton( tab_2, "editPushButton" ); 130 editPushButton = new QPushButton( tab_2, "editPushButton" );
131 editPushButton->setText( tr( "Edit fstab" ) ); 131 editPushButton->setText( tr( "Edit fstab" ) );
132 editPushButton->setMaximumWidth(100); 132 editPushButton->setMaximumWidth(100);
133 133
134 tabLayout_2->addMultiCellWidget( editPushButton, 7, 7, 0, 0 ); 134 tabLayout_2->addMultiCellWidget( editPushButton, 7, 7, 0, 0 );
135 135
136 fsckButton = new QPushButton( tab_2, "fsckPushButton" ); 136 fsckButton = new QPushButton( tab_2, "fsckPushButton" );
137 fsckButton->setText( tr( "Check Disk" ) ); 137 fsckButton->setText( tr( "Check Disk" ) );
138 fsckButton->setMaximumWidth(100); 138 fsckButton->setMaximumWidth(100);
139 139
140 tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1); 140 tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1);
141 141
142 TextLabel3 = new QLabel( tab_2, "TextLabel3" ); 142 TextLabel3 = new QLabel( tab_2, "TextLabel3" );
143 TextLabel3->setText( tr( "Device" ) ); 143 TextLabel3->setText( tr( "Device" ) );
144 144
145 tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 ); 145 tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 );
146 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 146 QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
147 tabLayout_2->addItem( spacer_3, 5, 0 ); 147 tabLayout_2->addItem( spacer_3, 5, 0 );
148 148
149 TextLabel1 = new QLabel( tab_2, "TextLabel1" ); 149 TextLabel1 = new QLabel( tab_2, "TextLabel1" );
150 TextLabel1->setText( tr( "Mount Point" ) ); 150 TextLabel1->setText( tr( "Mount Point" ) );
151 151
152 tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 ); 152 tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 );
153 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); 153 QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
154 tabLayout_2->addItem( spacer_4, 2, 1 ); 154 tabLayout_2->addItem( spacer_4, 2, 1 );
155 TabWidget->insertTab( tab_2, tr( "Advanced" ) ); 155 TabWidget->insertTab( tab_2, tr( "Advanced" ) );
156 156
157 FormatterAppLayout->addWidget( TabWidget, 0, 1 ); 157 FormatterAppLayout->addWidget( TabWidget, 0, 1 );
158 158
159 connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) ); 159 connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) );
160 connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) ); 160 connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) );
161 connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) ); 161 connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) );
162 162
163 connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) )); 163 connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int) ));
164 connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) )); 164 connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int) ));
165 connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) )); 165 connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int) ));
166 166
167 167
168 fillCombos(); 168 fillCombos();
169} 169}
170 170
171FormatterApp::~FormatterApp() 171FormatterApp::~FormatterApp()
172{} 172{}
173 173
174void FormatterApp::doFormat() 174void FormatterApp::doFormat()
175{ 175{
176 int err=0; 176 int err=0;
177 Output *outDlg; 177 Output *outDlg;
178 QString umountS, remountS; 178 QString umountS, remountS;
179 QString text = storageComboBox->currentText(); 179 QString text = storageComboBox->currentText();
180 QString currentText = storageComboBox->currentText(); 180 QString currentText = storageComboBox->currentText();
181 QString cmd; 181 QString cmd;
182 QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4); 182 QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4);
183 QString diskName = currentText.left(currentText.find(" -> ",0,TRUE)); 183 QString diskName = currentText.left(currentText.find(" -> ",0,TRUE));
184 QString fs = fileSystemsCombo->currentText(); 184 QString fs = fileSystemsCombo->currentText();
185 185
186#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap 186#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap
187#else 187#else
188 currentText = diskDevice = "/dev/fd0"; 188 currentText = diskDevice = "/dev/fd0";
189 umountS = "umount -v /floppy 2>&1"; 189 umountS = "umount -v /floppy 2>&1";
190 remountS = "mount -v /floppy 2>&1"; 190 remountS = "mount -v /floppy 2>&1";
191#endif 191#endif
192 192
193 if( currentText.find("CF",0,TRUE) != -1) 193 if( currentText.find("CF",0,TRUE) != -1)
194 { 194 {
195 umountS = "umount "; 195 umountS = "umount ";
196 remountS = "mount "; 196 remountS = "mount ";
197 197
198 // umountS = "/sbin/cardctl eject"; 198 // umountS = "/sbin/cardctl eject";
199 // remountS = "/sbin/cardctl insert"; 199 // remountS = "/sbin/cardctl insert";
200 } 200 }
201 if( currentText.find("SD",0,TRUE) != -1) 201 if( currentText.find("SD",0,TRUE) != -1)
202 { 202 {
203 umountS = "umount "; 203 umountS = "umount ";
204 remountS = "mount "; 204 remountS = "mount ";
205 // umountS = "/etc/sdcontrol compeject"; 205 // umountS = "/etc/sdcontrol compeject";
206 // remountS = "/etc/sdcontrol insert"; 206 // remountS = "/etc/sdcontrol insert";
207 } 207 }
208 208
209 switch ( QMessageBox::warning(this,tr("Format?") 209 switch ( QMessageBox::warning(this,tr("Format?")
210 , tr("Really format\n") +diskName+" "+ currentText + 210 , tr("Really format\n") +diskName+" "+ currentText +
211 tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs ) 211 tr("\nwith %1 filesystem?\nYou will loose all data!!").arg( fs )
212 ,tr("Yes") 212 ,tr("Yes")
213 ,tr("No") 213 ,tr("No")