author | drw <drw> | 2002-03-09 21:58:30 (UTC) |
---|---|---|
committer | drw <drw> | 2002-03-09 21:58:30 (UTC) |
commit | a07cd819c6ce288e6b4426ce1668e57bb629c868 (patch) (unidiff) | |
tree | a4b7418180eb56f22529e0471bfce9cae6cbe833 /noncore/settings/sysinfo/processdetail.cpp | |
parent | 80be7dabb1e1390e4d412c785d9f44e2293b2d5d (diff) | |
download | opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.zip opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.tar.gz opie-a07cd819c6ce288e6b4426ce1668e57bb629c868.tar.bz2 |
drw: Code enhancements to reduce executable size.
Diffstat (limited to 'noncore/settings/sysinfo/processdetail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/processdetail.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp index 06e5c0d..ef612e6 100644 --- a/noncore/settings/sysinfo/processdetail.cpp +++ b/noncore/settings/sysinfo/processdetail.cpp | |||
@@ -29,19 +29,16 @@ | |||
29 | #include <qlistview.h> | 29 | #include <qlistview.h> |
30 | #include <qmessagebox.h> | 30 | #include <qmessagebox.h> |
31 | 31 | ||
32 | ProcessDetail::ProcessDetail( QWidget* parent, const char* name, bool modal, WFlags fl ) | 32 | ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) |
33 | : QDialog( parent, name, modal, fl ) | 33 | : QWidget( parent, name, fl ) |
34 | { | 34 | { |
35 | pid = 0; | 35 | pid = 0; |
36 | 36 | ||
37 | QGridLayout *layout = new QGridLayout( this ); | 37 | QGridLayout *layout = new QGridLayout( this ); |
38 | layout->setSpacing( 6 ); | 38 | layout->setSpacing( 4 ); |
39 | layout->setMargin( 11 ); | 39 | layout->setMargin( 4 ); |
40 | 40 | ||
41 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); | 41 | SignalCB = new QComboBox( FALSE, this, "SignalCB" ); |
42 | SignalCB->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)7, SignalCB->sizePolicy().hasHeightForWidth() ) ); | ||
43 | SignalCB->setMinimumSize( QSize( 50, 24 ) ); | ||
44 | SignalCB->setMaximumSize( QSize( 600, 24 ) ); | ||
45 | SignalCB->insertItem( " 1: SIGHUP" ); | 42 | SignalCB->insertItem( " 1: SIGHUP" ); |
46 | SignalCB->insertItem( " 2: SIGINT" ); | 43 | SignalCB->insertItem( " 2: SIGINT" ); |
47 | SignalCB->insertItem( " 9: SIGKILL" ); | 44 | SignalCB->insertItem( " 9: SIGKILL" ); |
@@ -51,11 +48,9 @@ ProcessDetail::ProcessDetail( QWidget* parent, const char* name, bool modal, WF | |||
51 | layout->addWidget( SignalCB, 1, 0 ); | 48 | layout->addWidget( SignalCB, 1, 0 ); |
52 | 49 | ||
53 | ProcessView = new QTextView( this, "ProcessView" ); | 50 | ProcessView = new QTextView( this, "ProcessView" ); |
54 | ProcessView->setFrameShadow( QTextView::Plain ); | ||
55 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); | 51 | layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); |
56 | 52 | ||
57 | SendButton = new QPushButton( this, "SendButton" ); | 53 | SendButton = new QPushButton( this, "SendButton" ); |
58 | SendButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, SendButton->sizePolicy().hasHeightForWidth() ) ); | ||
59 | SendButton->setMinimumSize( QSize( 50, 24 ) ); | 54 | SendButton->setMinimumSize( QSize( 50, 24 ) ); |
60 | SendButton->setMaximumSize( QSize( 50, 24 ) ); | 55 | SendButton->setMaximumSize( QSize( 50, 24 ) ); |
61 | SendButton->setText( tr( "Send" ) ); | 56 | SendButton->setText( tr( "Send" ) ); |
@@ -73,13 +68,14 @@ void ProcessDetail::slotSendClicked() | |||
73 | sigstr.truncate(2); | 68 | sigstr.truncate(2); |
74 | int sigid = sigstr.toUInt(); | 69 | int sigid = sigstr.toUInt(); |
75 | 70 | ||
76 | if ( !QMessageBox::information( this, caption(), | 71 | if ( QMessageBox::warning( this, caption(), |
77 | ( tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?") ), | 72 | tr( "You really want to send\n" + SignalCB->currentText() + "\nto this process?"), |
78 | ( tr( "Yes" ) ), ( tr( "No" ) ), 0 ) ) | 73 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) |
74 | == QMessageBox::Yes ) | ||
79 | { | 75 | { |
80 | if ( kill( pid, sigid ) == 0 ) | 76 | if ( kill( pid, sigid ) == 0 ) |
81 | { | 77 | { |
82 | accept(); | 78 | hide(); |
83 | } | 79 | } |
84 | } | 80 | } |
85 | 81 | ||