summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/fortune/config.in1
-rw-r--r--noncore/todayplugins/fortune/fortune.pro2
-rw-r--r--noncore/todayplugins/fortune/fortuneplugin.cpp2
-rw-r--r--noncore/todayplugins/fortune/fortuneplugin.h6
-rw-r--r--noncore/todayplugins/fortune/fortunepluginimpl.h2
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp17
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.h7
-rw-r--r--noncore/todayplugins/fortune/opie-today-fortuneplugin.control2
8 files changed, 18 insertions, 21 deletions
diff --git a/noncore/todayplugins/fortune/config.in b/noncore/todayplugins/fortune/config.in
index 1f9a08b..ca476f1 100644
--- a/noncore/todayplugins/fortune/config.in
+++ b/noncore/todayplugins/fortune/config.in
@@ -1,4 +1,5 @@
config TODAY_FORTUNE
boolean "opie-today-fortuneplugin (a joke a day keeps the doctor away)"
default "y"
+ depends (LIBQPE || LIBQPE-X11) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM && TODAY
depends TODAY
diff --git a/noncore/todayplugins/fortune/fortune.pro b/noncore/todayplugins/fortune/fortune.pro
index 3446732..84a5730 100644
--- a/noncore/todayplugins/fortune/fortune.pro
+++ b/noncore/todayplugins/fortune/fortune.pro
@@ -1,21 +1,21 @@
TEMPLATE = lib
#CONFIG -= moc
CONFIG += qt plugin release
# Input
HEADERS = fortuneplugin.h fortunepluginimpl.h \
fortunepluginwidget.h
SOURCES = fortuneplugin.cpp fortunepluginimpl.cpp \
fortunepluginwidget.cpp
INCLUDEPATH += $(OPIEDIR)/include \
../ ../library
DEPENDPATH += $(OPIEDIR)/include \
../ ../library
-LIBS+= -lqpe -lopie
+LIBS+= -lqpe -lopiecore2 -lopiepim2 -lopieui2
DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todayfortuneplugin
include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/todayplugins/fortune/fortuneplugin.cpp b/noncore/todayplugins/fortune/fortuneplugin.cpp
index 9751e6f..69d2c45 100644
--- a/noncore/todayplugins/fortune/fortuneplugin.cpp
+++ b/noncore/todayplugins/fortune/fortuneplugin.cpp
@@ -8,64 +8,64 @@
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "fortuneplugin.h"
#include "fortunepluginwidget.h"
FortunePlugin::FortunePlugin()
{
}
FortunePlugin::~FortunePlugin()
{
}
QString FortunePlugin::pluginName() const
{
return QObject::tr( "Fortune plugin" );
}
double FortunePlugin::versionNumber() const
{
return 0.1;
}
QString FortunePlugin::pixmapNameWidget() const
{
return "Fortune";
}
QWidget* FortunePlugin::widget( QWidget *wid )
{
return new FortunePluginWidget( wid, "Fortune" );
}
QString FortunePlugin::pixmapNameConfig() const
{
return "Fortune";
}
-TodayConfigWidget* FortunePlugin::configWidget( QWidget* wid )
+TodayConfigWidget* FortunePlugin::configWidget( QWidget* /*wid*/ )
{
// return new FortunePluginConfig( wid , "Fortune" );
return NULL;
}
QString FortunePlugin::appName() const
{
return "fortune";
}
bool FortunePlugin::excludeFromRefresh() const
{
return false;
}
diff --git a/noncore/todayplugins/fortune/fortuneplugin.h b/noncore/todayplugins/fortune/fortuneplugin.h
index 9376771..9b590ad 100644
--- a/noncore/todayplugins/fortune/fortuneplugin.h
+++ b/noncore/todayplugins/fortune/fortuneplugin.h
@@ -1,43 +1,43 @@
/*
* fortuneplugin.h
*
* copyright : (c) 2002 by Chris Larson
* email : kergoth@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef FORTUNE_PLUGIN_H
#define FORTUNE_PLUGIN_H
+#include <opie2/oclickablelabel.h>
+#include <opie2/todayplugininterface.h>
+
#include <qstring.h>
#include <qwidget.h>
-#include <opie/oclickablelabel.h>
-#include <opie/todayplugininterface.h>
-
class FortunePlugin : public TodayPluginObject
{
public:
FortunePlugin();
~FortunePlugin();
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget( QWidget * );
QString pixmapNameConfig() const;
TodayConfigWidget* configWidget( QWidget * );
QString appName() const;
bool excludeFromRefresh() const;
};
#endif
diff --git a/noncore/todayplugins/fortune/fortunepluginimpl.h b/noncore/todayplugins/fortune/fortunepluginimpl.h
index 8e380f5..35ecf92 100644
--- a/noncore/todayplugins/fortune/fortunepluginimpl.h
+++ b/noncore/todayplugins/fortune/fortunepluginimpl.h
@@ -1,40 +1,40 @@
/*
* todopluginimpl.h
*
* copyright : (c) 2002 by Maximilian Reiß
* email : harlekin@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef FORTUNE_PLUGIN_IMPL_H
#define FORTUNE_PLUGIN_IMPL_H
-#include <opie/todayplugininterface.h>
+#include <opie2/todayplugininterface.h>
class FortunePlugin;
class FortunePluginImpl : public TodayPluginInterface
{
public:
FortunePluginImpl();
virtual ~FortunePluginImpl();
QRESULT queryInterface( const QUuid &, QUnknownInterface** );
Q_REFCOUNT
virtual TodayPluginObject *guiPart();
private:
FortunePlugin *fortunePlugin;
};
#endif
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
index e6a0d09..3aa978c 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
@@ -1,84 +1,81 @@
/*
* fortunepluginwidget.cpp
*
* copyright : (c) 2002 by Maximilian Reiß
* email : harlekin@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "fortunepluginwidget.h"
+#include <qpe/config.h>
+#include <qpe/qcopenvelope_qws.h>
+
#include <qvaluelist.h>
#include <qtl.h>
#include <qstring.h>
#include <qscrollview.h>
#include <qobject.h>
#include <qlayout.h>
-#include <qpe/config.h>
-#include <qpe/qcopenvelope_qws.h>
-
-#include <opie/oprocess.h>
-#include <opie/oticker.h>
-
FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name )
: QWidget( parent, name )
{
fortune = NULL;
getFortune();
}
FortunePluginWidget::~FortunePluginWidget() {
if( fortuneProcess ){
delete fortuneProcess;
}
}
/**
* Get the fortunes
*/
void FortunePluginWidget::getFortune() {
QVBoxLayout* layoutFortune = new QVBoxLayout( this );
if ( fortune ) {
delete fortune;
}
fortune = new OTicker( this );
// fortune->setReadOnly( TRUE );
// fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
fortune->setText( QString("Obtaining fortune...") );
layoutFortune->addWidget( fortune );
fortuneProcess = new OProcess();
*fortuneProcess << "fortune";
-
+
connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ),
this, SLOT(slotStdOut(OProcess*,char*,int) ) );
-
+
if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start :(");
fortune->setText( QString("Failed to obtain fortune.") );
delete fortuneProcess;
fortuneProcess = 0;
}
-
+
}
-void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len )
+void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len )
{
QCString s( buf, len );
s.replace( QRegExp("\n"), "" );
fortune->setText( s );
}
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.h b/noncore/todayplugins/fortune/fortunepluginwidget.h
index 302d046..abb7bed 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.h
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.h
@@ -1,46 +1,45 @@
/*
* fortunepluginwidget.h
*
* copyright : (c) 2002 by Chris Larson
* email : kergoth@handhelds.org
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef FORTUNE_PLUGIN_WIDGET_H
#define FORTUNE_PLUGIN_WIDGET_H
+#include <opie2/oprocess.h>
+#include <opie2/oticker.h>
+
#include <qstring.h>
#include <qwidget.h>
-#include <opie/oticker.h>
-#include <opie/oprocess.h>
-
-
class FortunePluginWidget : public QWidget
{
Q_OBJECT
public:
FortunePluginWidget( QWidget *parent, const char *name );
~FortunePluginWidget();
private:
OTicker *fortune;
OProcess *fortuneProcess;
void getFortune();
private slots:
void slotStdOut( OProcess*, char*, int );
};
#endif
diff --git a/noncore/todayplugins/fortune/opie-today-fortuneplugin.control b/noncore/todayplugins/fortune/opie-today-fortuneplugin.control
index 48ddab1..9b7adbe 100644
--- a/noncore/todayplugins/fortune/opie-today-fortuneplugin.control
+++ b/noncore/todayplugins/fortune/opie-today-fortuneplugin.control
@@ -1,9 +1,9 @@
Package: opie-today-fortuneplugin
Files: plugins/today/libtodayfortuneplugin.so*
Priority: optional
Section: opie/plugins
Maintainer: Chris Larson <kergoth@handhelds.org>
Architecture: arm
-Depends: opie-today, fortune (<=9708-0.1) | fortune-mod
+Depends: opie-today, fortune (<=9708-0.1) | fortune-mod, libopiecore2, libopiepim2, libopieui2
Description: 'fortune' plugin for Today
Version: $QPE_VERSION$EXTRAVERSION