Diffstat (limited to 'noncore/settings/sysinfo/modulesinfo.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/modulesinfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 3d127a8..8def0d6 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp | |||
@@ -39,25 +39,25 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) | |||
39 | : QWidget( parent, name, fl ) | 39 | : QWidget( parent, name, fl ) |
40 | { | 40 | { |
41 | QGridLayout *layout = new QGridLayout( this ); | 41 | QGridLayout *layout = new QGridLayout( this ); |
42 | layout->setSpacing( 4 ); | 42 | layout->setSpacing( 4 ); |
43 | layout->setMargin( 4 ); | 43 | layout->setMargin( 4 ); |
44 | 44 | ||
45 | ModulesView = new QListView( this ); | 45 | ModulesView = new QListView( this ); |
46 | int colnum = ModulesView->addColumn( tr( "Module" ) ); | 46 | int colnum = ModulesView->addColumn( tr( "Module" ) ); |
47 | colnum = ModulesView->addColumn( tr( "Size" ) ); | 47 | colnum = ModulesView->addColumn( tr( "Size" ) ); |
48 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 48 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
49 | colnum = ModulesView->addColumn( tr( "Use#" ) ); | 49 | colnum = ModulesView->addColumn( tr( "Use#" ) ); |
50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); | 50 | ModulesView->setColumnAlignment( colnum, Qt::AlignRight ); |
51 | colnum = ModulesView->addColumn( tr( "Used By" ) ); | 51 | colnum = ModulesView->addColumn( tr( "Used by" ) ); |
52 | ModulesView->setAllColumnsShowFocus( TRUE ); | 52 | ModulesView->setAllColumnsShowFocus( TRUE ); |
53 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); | 53 | layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); |
54 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); | 54 | QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); |
55 | 55 | ||
56 | // Test if we have /sbin/modinfo, and if so, allow module detail window | 56 | // Test if we have /sbin/modinfo, and if so, allow module detail window |
57 | if ( QFile::exists( "/sbin/modinfo" ) ) | 57 | if ( QFile::exists( "/sbin/modinfo" ) ) |
58 | { | 58 | { |
59 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); | 59 | QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); |
60 | connect( ModulesView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), | 60 | connect( ModulesView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), |
61 | this, SLOT( viewModules( QListViewItem * ) ) ); | 61 | this, SLOT( viewModules( QListViewItem * ) ) ); |
62 | } | 62 | } |
63 | 63 | ||
@@ -132,27 +132,25 @@ void ModulesInfo::updateData() | |||
132 | 132 | ||
133 | fclose( procfile ); | 133 | fclose( procfile ); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | void ModulesInfo::slotSendClicked() | 137 | void ModulesInfo::slotSendClicked() |
138 | { | 138 | { |
139 | if ( !ModulesView->currentItem() ) | 139 | if ( !ModulesView->currentItem() ) |
140 | { | 140 | { |
141 | return; | 141 | return; |
142 | } | 142 | } |
143 | 143 | ||
144 | QString capstr = tr( "You really want to execute\n" ); | 144 | QString capstr = tr( "You really want to execute %1 for this module?" ).arg( CommandCB->currentText() ); |
145 | capstr.append( CommandCB->currentText() ); | ||
146 | capstr.append( "\nfor this module?" ); | ||
147 | 145 | ||
148 | QString modname = ModulesView->currentItem()->text( 0 ); | 146 | QString modname = ModulesView->currentItem()->text( 0 ); |
149 | 147 | ||
150 | if ( QMessageBox::warning( this, modname, capstr, | 148 | if ( QMessageBox::warning( this, modname, capstr, |
151 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) | 149 | QMessageBox::Yes | QMessageBox::Default, QMessageBox::No | QMessageBox::Escape ) == QMessageBox::Yes ) |
152 | { | 150 | { |
153 | QString command = "/sbin/"; | 151 | QString command = "/sbin/"; |
154 | command.append( CommandCB->currentText() ); | 152 | command.append( CommandCB->currentText() ); |
155 | command.append( " " ); | 153 | command.append( " " ); |
156 | command.append( modname ); | 154 | command.append( modname ); |
157 | 155 | ||
158 | FILE* stream = popen( command, "r" ); | 156 | FILE* stream = popen( command, "r" ); |