summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/processinfo.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp
index 9a5446a..769410f 100644
--- a/noncore/settings/sysinfo/processinfo.cpp
+++ b/noncore/settings/sysinfo/processinfo.cpp
@@ -140,51 +140,48 @@ void ProcessInfo::updateData()
140 140
141 delete proclist; 141 delete proclist;
142 delete procdir; 142 delete procdir;
143} 143}
144 144
145void ProcessInfo::slotSendClicked() 145void ProcessInfo::slotSendClicked()
146{ 146{
147 QListViewItem *currprocess = ProcessView->currentItem(); 147 QListViewItem *currprocess = ProcessView->currentItem();
148 if ( !currprocess ) 148 if ( !currprocess )
149 { 149 {
150 return; 150 return;
151 } 151 }
152 152
153 QString capstr = tr( "You really want to send\n" ); 153 QString capstr = tr( "You really want to send\n" );
154 capstr.append( SignalCB->currentText() ); 154 capstr.append( SignalCB->currentText() );
155 capstr.append( "\nto this process?" ); 155 capstr.append( "\nto this process?" );
156 156
157 157
158 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr, 158 if ( QMessageBox::warning( this, currprocess->text( 1 ), capstr,
159 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) 159 QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes )
160 { 160 {
161 QString sigstr = SignalCB->currentText(); 161 QString sigstr = SignalCB->currentText();
162 sigstr.truncate(2); 162 sigstr.truncate(2);
163 int sigid = sigstr.toUInt(); 163 int sigid = sigstr.toUInt();
164 if ( kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid ) == 0 ) 164 kill( currprocess->text( 0 ).stripWhiteSpace().toUInt(), sigid );
165 {
166 hide();
167 }
168 } 165 }
169 166
170} 167}
171 168
172void ProcessInfo::viewProcess( QListViewItem *process ) 169void ProcessInfo::viewProcess( QListViewItem *process )
173{ 170{
174 QString pid= process->text( 0 ).stripWhiteSpace(); 171 QString pid= process->text( 0 ).stripWhiteSpace();
175 QString command = process->text( 1 ); 172 QString command = process->text( 1 );
176 ProcessDtl->setCaption( pid + " - " + command ); 173 ProcessDtl->setCaption( pid + " - " + command );
177 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r"); 174 FILE *statfile = fopen( ( QString ) ( "/proc/" + pid + "/status"), "r");
178 if ( statfile ) 175 if ( statfile )
179 { 176 {
180 char line[81]; 177 char line[81];
181 fgets( line, 81, statfile ); 178 fgets( line, 81, statfile );
182 ProcessDtl->detailView->setText( line ); 179 ProcessDtl->detailView->setText( line );
183 while ( fgets( line, 81, statfile ) ) 180 while ( fgets( line, 81, statfile ) )
184 { 181 {
185 ProcessDtl->detailView->append( line ); 182 ProcessDtl->detailView->append( line );
186 } 183 }
187 fclose( statfile ); 184 fclose( statfile );
188 } 185 }
189 ProcessDtl->showMaximized(); 186 ProcessDtl->showMaximized();
190} 187}