-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/swapfile.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -1,41 +1,42 @@ 2005-??-?? Opie 1.2.1 New Features ------------ - * OpieStumbler: New application (skyhusker) + * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) Fixed Bugs ---------- * #1535 - Missing line break and unnecessary location shown with Today-Calendar plugin (deller) * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) * n.a. - always show volume and wireless applet popups inside visible screen (deller) * n.a. - scale O-Menu-Applets appropriately (mickeyl) * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) * n.a. - scale BluezApplet appropriately (mickeyl) + * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) Internal -------- * make BluezApplet use OTaskbarApplet (mickeyl) 2005-03-25 Opie 1.2.0 Fixed Bugs ---------- * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) * n.a. - make qpeglobal.h include qglobal.h (zecke) 2005-03-20 Opie 1.2.0-rc1 New Features ------------ * Launcher: Support a static background pixmap (mickeyl) * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) * PackageManager supports the 'lists_dir' ipkg configuration option (drw) * Added hi-res inline images for large resolution devices (drw) diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp index 4609c13..50c173b 100644 --- a/noncore/applets/memoryapplet/swapfile.cpp +++ b/noncore/applets/memoryapplet/swapfile.cpp @@ -1,28 +1,29 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2002-2005 the Opie Team <opie-devel@handhelds.org> ** -** This file is part of Qtopia Environment. +** This file is part of Opie Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "swapfile.h" /* OPIE */ #include <opie2/odebug.h> #include <qpe/resource.h> using namespace Opie::Core; /* QT */ @@ -35,48 +36,53 @@ using namespace Opie::Core; #include <qhbuttongroup.h> #include <qradiobutton.h> #include <qlineedit.h> #include <qprogressbar.h> #include <qcombobox.h> #include <qvgroupbox.h> #include <qhbox.h> #include <qmessagebox.h> #include <qcopchannel_qws.h> /* STD */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/vfs.h> #include <mntent.h> #include <unistd.h> #include <sys/types.h> Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) : QWidget( parent, name, f ) { + if ( !QFile::exists( "/proc/swaps" ) ) + { + QLabel *text = new QLabel( tr( "Swap disabled in kernel" ), this ); + return; + } // are we running as root? isRoot = geteuid() == 0; QVBoxLayout* vb = new QVBoxLayout(this, 5); QHButtonGroup* cfsdRBG = new QHButtonGroup(tr("Swapfile location"), this); cfsdRBG->setRadioButtonExclusive(true); vb->addWidget(cfsdRBG); ramRB = new QRadioButton(tr("RAM"), cfsdRBG); cfRB = new QRadioButton(tr("CF Card"), cfsdRBG); sdRB = new QRadioButton(tr("SD Card"), cfsdRBG); QHBox *hb1 = new QHBox(this); hb1->setSpacing(5); swapPath1 = new QLineEdit(hb1); swapPath1->setEnabled(false); QPushButton* swapOn = new QPushButton(tr(" On "), hb1); QPushButton* swapOff = new QPushButton(tr(" Off "), hb1); vb->addWidget(hb1); QVGroupBox* box1 = new QVGroupBox(tr("Manage Swapfile"), this); |