summaryrefslogtreecommitdiff
authordrw <drw>2004-02-22 17:17:08 (UTC)
committer drw <drw>2004-02-22 17:17:08 (UTC)
commit5b27ef38d45ae4aa751c6e364cb62ed428808e3f (patch) (side-by-side diff)
tree14e149df51b9016c0128b277eb698cf14582d639
parentf31e19e2d828dc6d8563b2540e45ee60184f91aa (diff)
downloadopie-5b27ef38d45ae4aa751c6e364cb62ed428808e3f.zip
opie-5b27ef38d45ae4aa751c6e364cb62ed428808e3f.tar.gz
opie-5b27ef38d45ae4aa751c6e364cb62ed428808e3f.tar.bz2
Memory Applet: libopie->libopie2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/config.in2
-rw-r--r--noncore/applets/memoryapplet/memoryapplet.pro2
-rw-r--r--noncore/applets/memoryapplet/memorystatus.cpp31
-rw-r--r--noncore/applets/memoryapplet/memorystatus.h10
-rw-r--r--noncore/applets/memoryapplet/opie-memoryapplet.control2
5 files changed, 24 insertions, 23 deletions
diff --git a/noncore/applets/memoryapplet/config.in b/noncore/applets/memoryapplet/config.in
index 578aaf9..4fc13ba 100644
--- a/noncore/applets/memoryapplet/config.in
+++ b/noncore/applets/memoryapplet/config.in
@@ -3,3 +3,3 @@
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && SYSINFO
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && SYSINFO
comment "opie-memoryapplet needs a libqpe, libopie and sysinfo"
diff --git a/noncore/applets/memoryapplet/memoryapplet.pro b/noncore/applets/memoryapplet/memoryapplet.pro
index cd3f4a5..6031386 100644
--- a/noncore/applets/memoryapplet/memoryapplet.pro
+++ b/noncore/applets/memoryapplet/memoryapplet.pro
@@ -21,3 +21,3 @@ DEPENDPATH += ../$(OPIEDIR)/include
VERSION = 1.0.0
-LIBS += -lqpe -lopie
+LIBS += -lqpe -lopieui2
diff --git a/noncore/applets/memoryapplet/memorystatus.cpp b/noncore/applets/memoryapplet/memorystatus.cpp
index b738312..c01ba28 100644
--- a/noncore/applets/memoryapplet/memorystatus.cpp
+++ b/noncore/applets/memoryapplet/memorystatus.cpp
@@ -28,3 +28,2 @@
-#include <opie/otabwidget.h>
#include <qlayout.h>
@@ -43,3 +42,3 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f )
- QLabel* about = new QLabel(tr("<center><b>Memory Monitor Plugin</b><br>"
+ QLabel* about = new QLabel(tr("<center><b>Memory Monitor Plugin</b><br>"
"Copyright (C) 2003 Anton Maslovsky<br>"
@@ -47,4 +46,4 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f )
"<a href=\"http://my-zaurus.narod.ru\">http://my-zaurus.narod.ru</a><br>"
- "Based on source code from:<br> qswap (udoseidel@gmx.de) <br> Battery Applet (trolltech.com) <br> SysInfo (OPIE)<br><br>"
- "This program is licensed under GNU GPL.</center>"), tab);
+ "Based on source code from:<br> qswap (udoseidel@gmx.de) <br> Battery Applet (trolltech.com) <br> SysInfo (OPIE)<br><br>"
+ "This program is licensed under GNU GPL.</center>"), tab);
@@ -57,14 +56,14 @@ int MemoryStatus::percent()
{
- if (mi == 0)
- return 100;
+ if (mi == 0)
+ return 100;
- int total = mi->total;
- if (mi->swaptotal > 0)
- total += mi->swaptotal;
+ int total = mi->total;
+ if (mi->swaptotal > 0)
+ total += mi->swaptotal;
- int used = mi->realUsed;
- if (mi->swapused > 0)
- total += mi->swapused;
+ int used = mi->realUsed;
+ if (mi->swapused > 0)
+ total += mi->swapused;
- return ((total - used) * 100)/total;
+ return ((total - used) * 100)/total;
}
@@ -73,5 +72,5 @@ QSize MemoryStatus::sizeHint() const
{
- QSize s = tab->size();
- s.setWidth(200);
- s.setHeight((mi->swaptotal > 0) ? 220 : 200);
+ QSize s = tab->size();
+ s.setWidth(200);
+ s.setHeight((mi->swaptotal > 0) ? 220 : 200);
return s;
diff --git a/noncore/applets/memoryapplet/memorystatus.h b/noncore/applets/memoryapplet/memorystatus.h
index 5c73833..c3926db 100644
--- a/noncore/applets/memoryapplet/memorystatus.h
+++ b/noncore/applets/memoryapplet/memorystatus.h
@@ -24,5 +24,7 @@
+#include <opie2/otabwidget.h>
+
class MemoryInfo;
class Swapfile;
-class OTabWidget;
+using Opie::OTabWidget;
@@ -37,8 +39,8 @@ public:
MemoryInfo* mi;
- Swapfile* sf;
+ Swapfile* sf;
- int percent();
+ int percent();
private:
- OTabWidget *tab;
+ OTabWidget *tab;
};
diff --git a/noncore/applets/memoryapplet/opie-memoryapplet.control b/noncore/applets/memoryapplet/opie-memoryapplet.control
index 12026a4..c01a93f 100644
--- a/noncore/applets/memoryapplet/opie-memoryapplet.control
+++ b/noncore/applets/memoryapplet/opie-memoryapplet.control
@@ -6,3 +6,3 @@ Maintainer: Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
Architecture: arm
-Depends: task-opie-minimal
+Depends: task-opie-minimal, libopieui2
Description: Memory Applet