Applied various fixes and patches

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kerry@1163769 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 643c8222b7
commit 763098a08f

@ -134,9 +134,9 @@ dnl Check for libbeagle 0.2.0
# LIBBEAGLE_LIBADD: libbeagle libraries (-l options)
# LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options)
LIBBEAGLE_PACKAGES="libbeagle-0.0"
LIBBEAGLE_VERSION="0.2.5"
AC_MSG_CHECKING(for libbeagle-0.2.5 (at least $LIBBEAGLE_VERSION))
LIBBEAGLE_PACKAGES="libbeagle-1.0"
LIBBEAGLE_VERSION="0.3.0"
AC_MSG_CHECKING(for libbeagle-0.3.0 (at least $LIBBEAGLE_VERSION))
if $PKG_CONFIG --atleast-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; then

@ -57,9 +57,9 @@ dnl Check for libbeagle 0.2.0
# LIBBEAGLE_LIBADD: libbeagle libraries (-l options)
# LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options)
LIBBEAGLE_PACKAGES="libbeagle-0.0"
LIBBEAGLE_VERSION="0.2.5"
AC_MSG_CHECKING(for libbeagle-0.2.5 (at least $LIBBEAGLE_VERSION))
LIBBEAGLE_PACKAGES="libbeagle-1.0"
LIBBEAGLE_VERSION="0.3.0"
AC_MSG_CHECKING(for libbeagle-0.3.0 (at least $LIBBEAGLE_VERSION))
if $PKG_CONFIG --atleast-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; then

@ -33,8 +33,8 @@ kerry_la_LIBADD = -lkio -lkonq $(LIB_KDEUI) $(LIBBEAGLE_LIBADD) $(GLIB_LIBADD) $
autostartdir = $(datadir)/autostart
autostart_DATA = kerry.autostart.desktop beagled.desktop
shutdowndir = $(prefix)/shutdown
shutdown_SCRIPTS = beagled-shutdown.sh
shutdowndir = $(prefix)/bin
shutdown_SCRIPTS = beagled-shutdown
xdg_apps_DATA = kerry.desktop

@ -1,5 +1,4 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Icon=kerry
Exec=kcmshell beagle

@ -1279,7 +1279,7 @@ void SearchDlg::slotOpen()
}
else if (item->uri().startsWith("knotes:/") )
{
slotOpenKNotes(item->uri().mid(9,22));
slotOpenKNotes(item->uri().mid(10,21));
}
else if (item->uri().startsWith("note:/")) {
KProcess *proc = new KProcess;
@ -1344,13 +1344,12 @@ void SearchDlg::slotOpenKAddressBook(const QString &uid)
}
}
void SearchDlg::slotOpenKNotes(const QString &noteid)
void SearchDlg::slotOpenKNotes(const QString& noteid)
{
if (ensureServiceRunning("knotes")) {
QByteArray data;
QDataStream arg(data, IO_WriteOnly);
arg << noteid;
kapp->dcopClient()->send("knotes","KNotesIface","showNote(QString)", data);
}
}
@ -1817,36 +1816,42 @@ static QLabel* dateSwitches[dateSwitchesCount] = {showAnyDate, showToday, showSi
return false;
}
bool SearchDlg::ensureServiceRunning(const QString & name)
bool SearchDlg::ensureServiceRunning(const QString& name)
{
QStringList URLs;
QByteArray data, replyData;
QCString replyType;
QDataStream arg(data, IO_WriteOnly);
arg << name << URLs;
if ( !kapp->dcopClient()->call( "klauncher", "klauncher", "start_service_by_desktop_name(QString,QStringList)",
data, replyType, replyData) ) {
qWarning( "call to klauncher failed.");
return false;
QCString appname = name.utf8();
if (kapp->dcopClient()->isApplicationRegistered(appname)) {
return true;
}
QDataStream reply(replyData, IO_ReadOnly);
else {
QStringList URLs;
QByteArray data, replyData;
QCString replyType;
QDataStream arg(data, IO_WriteOnly);
arg << name << URLs;
if ( !kapp->dcopClient()->call( "klauncher", "klauncher", "start_service_by_desktop_name(QString,QStringList)",
data, replyType, replyData) ) {
qWarning( "call to klauncher failed.");
return false;
}
QDataStream reply(replyData, IO_ReadOnly);
if ( replyType != "serviceResult" )
{
qWarning( "unexpected result '%s' from klauncher.", replyType.data());
return false;
}
int result;
QCString dcopName;
QString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
qWarning("Error starting: %s", error.local8Bit().data());
return false;
if ( replyType != "serviceResult" )
{
qWarning( "unexpected result '%s' from klauncher.", replyType.data());
return false;
}
int result;
QCString dcopName;
QString error;
reply >> result >> dcopName >> error;
if (result != 0)
{
qWarning("Error starting: %s", error.local8Bit().data());
return false;
}
return true;
}
return true;
}
#include "searchdlg.moc"

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save