
Applet HDAPS
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This is a small applet to display the state of your harddisk protected with the hdapsd.
A basic installation tutorial:
# wget http://www.hirnfrei.org/~joerg/applet_hdaps/applet_hdaps-0.1.tar.bz2
# tar xjf applet_hdaps-0.1.tar.bz2
# cd applet_hdaps-0.1
# cmake -DCMAKE_INSTALL_PREFIX=/usr/kde/4.0 .
# make
# make install
TOD
11 years ago
I have used all patches above but i can't get it to work.
When i add it to the desktop i had only a small black dot.
Any ideas?
THX
Manuel
Report
bitcrazy
11 years ago
http://kde-look.org/content/show.php?content=103481
It looks way better and it works out of the box.
Greetings
m0nk
Report
centic
12 years ago
void AppletHdaps::init()
{
//Plasma::Svg* m_svg;
m_svg = new Plasma::Svg(this);
m_svg->setImagePath("widgets/drive-harddisk-running");
m_svg->setContainsMultipleImages( false );
updateGeometry();
searchDevices();
connect(m_pTimer, SIGNAL(timeout()), this, SLOT(doSomething()));
m_pTimer->start(250);
}
Report
teom
12 years ago
Report
centic
12 years ago
Report
bitcrazy
12 years ago
--- CMakeLists.txt.orig 2009-02-05 20:48:45.000000000 +0100
+++ CMakeLists.txt 2009-02-05 20:45:26.000000000 +0100
@@ -11,7 +11,7 @@
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
-find_package(Plasma REQUIRED)
+#find_package(Plasma REQUIRED)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
@@ -26,7 +26,7 @@
# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_hdaps ${applet_hdaps_SRCS})
target_link_libraries(plasma_applet_hdaps
- ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
+ ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
install(TARGETS plasma_applet_hdaps
DESTINATION ${PLUGIN_INSTALL_DIR})
Report
bitcrazy
12 years ago
--- applet_hdaps.cpp~ 2009-02-05 20:37:04.000000000 +0100
+++ applet_hdaps.cpp 2009-02-05 20:37:04.000000000 +0100
@@ -94,7 +94,7 @@
block->setPath("/sys/block");
QFile *file = new QFile();
for(int i = 0; i < (int)block->count(); i++) {
- QString fn = QString("/sys/block/") + (*block)[i] + "/queue/protect";
+ QString fn = QString("/sys/block/") + (*block)[i] + "/device/unload_heads";
file->setFileName(fn);
if ( file->open(QIODevice::ReadOnly | QIODevice::Text) ) {
m_pDevices->append(fn);
As you can see you need to change /queue/protect -> /device/unload_heads
Greetings
m0nk
Report
iordanov
12 years ago
Report
iordanov
12 years ago
# echo -1 > /sys/block/sda/device/unload_heads
and now it works for me.
Report
bitcrazy
12 years ago
Any suggestions?
Btw. I've applied the patch, suggested here to get it compiled.
Greetings
m0nk
Report
olexiy
12 years ago
make: *** No targets specified and no makefile found. Stop.
With last step cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
was all ok.
[email protected]:~/applet_hdaps-0.1/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
-- Found Qt-Version 4.4.1 (using /usr/bin/qmake)
-- Found X11: /usr/lib/libX11.so
-- Found Automoc4: /usr/bin/automoc4
-- Found Perl: /usr/bin/perl
-- Found KDE 4.1 include dir: /usr/lib/kde4/include
-- Found KDE 4.1 library dir: /usr/lib/kde4/lib
-- Found KDE4 kconfig_compiler preprocessor: /usr/lib/kde4/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oleksiy/applet_hdaps-0.1
When I have done make in /applet_hdaps-0.1 ordner. I have get that:
[email protected]:~/applet_hdaps-0.1$ make
[ 50%] Building CXX object CMakeFiles/plasma_applet_hdaps.dir/applet_hdaps.o
/home/oleksiy/applet_hdaps-0.1/applet_hdaps.cpp: In member function ‘virtual void AppletHdaps::init()’:
/home/oleksiy/applet_hdaps-0.1/applet_hdaps.cpp:38: error: no matching function for call to ‘Plasma::Svg::Svg(constchar [31], AppletHdaps* const)’
/usr/lib/kde4/include/KDE/Plasma/../../plasma/svg.h:73: note: candidates are: Plasma::Svg::Svg(QObject*)
/usr/lib/kde4/include/KDE/Plasma/../../plasma/svg.h:51: note: Plasma::Svg::Svg(const Plasma::Svg&)
/home/oleksiy/applet_hdaps-0.1/applet_hdaps.cpp:39: error: ‘class Plasma::Svg’ has no member named ‘setContentType’
/home/oleksiy/applet_hdaps-0.1/applet_hdaps.cpp:39: error: ‘SingleImage’ is not a member of ‘Plasma::Svg’
make[2]: *** [CMakeFiles/plasma_applet_hdaps.dir/applet_hdaps.o] Error 1
make[1]: *** [CMakeFiles/plasma_applet_hdaps.dir/all] Error 2
make: *** [all] Error 2
Why? Can you help me?
Thanks.
Report
mitoyarzun
12 years ago
void AppletHdaps::init()
{
m_svg = new Plasma::Svg("widgets/drive-harddisk-running", this);
m_svg->setContentType(Plasma::Svg::SingleImage);
searchDevices();
connect(m_pTimer, SIGNAL(timeout()), this, SLOT(doSomething()));
m_pTimer->start(250);
}
Now it should compile. I sent the patch to the developer but he didn't answer.
Good luck :)
Report
olexiy
12 years ago
Thank you for this fix. I try it.
Good luck :)
Report
mitoyarzun
12 years ago
This is what I have:
void AppletHdaps::init()
{
Plasma::Svg* m_svg;
m_svg = new Plasma::Svg(this);
m_svg->setImagePath("widgets/drive-harddisk-running");
m_svg->setContainsMultipleImages( false );
updateGeometry();
searchDevices();
connect(m_pTimer, SIGNAL(timeout()), this, SLOT(doSomething()));
m_pTimer->start(250);
}
One of those should work :P
BTW, I'm using KDE4.1
Report
buschmann23
12 years ago
http://software.opensuse.org/search?baseproject=ALL&p=1&q=kde4-plasmoid-hdaps
Report