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_LIBADD: libbeagle libraries (-l options)
# LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options) # LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options)
LIBBEAGLE_PACKAGES="libbeagle-0.0" LIBBEAGLE_PACKAGES="libbeagle-1.0"
LIBBEAGLE_VERSION="0.2.5" LIBBEAGLE_VERSION="0.3.0"
AC_MSG_CHECKING(for libbeagle-0.2.5 (at least $LIBBEAGLE_VERSION)) 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-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; 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_LIBADD: libbeagle libraries (-l options)
# LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options) # LIBBEAGLE_LDFLAGS: flags containing path to libbeagle libraries (-L options)
LIBBEAGLE_PACKAGES="libbeagle-0.0" LIBBEAGLE_PACKAGES="libbeagle-1.0"
LIBBEAGLE_VERSION="0.2.5" LIBBEAGLE_VERSION="0.3.0"
AC_MSG_CHECKING(for libbeagle-0.2.5 (at least $LIBBEAGLE_VERSION)) 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-pkgconfig-version 0.15 ; then
if $PKG_CONFIG --atleast-version $LIBBEAGLE_VERSION $LIBBEAGLE_PACKAGES >/dev/null 2>&1 ; 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 autostartdir = $(datadir)/autostart
autostart_DATA = kerry.autostart.desktop beagled.desktop autostart_DATA = kerry.autostart.desktop beagled.desktop
shutdowndir = $(prefix)/shutdown shutdowndir = $(prefix)/bin
shutdown_SCRIPTS = beagled-shutdown.sh shutdown_SCRIPTS = beagled-shutdown
xdg_apps_DATA = kerry.desktop xdg_apps_DATA = kerry.desktop

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

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

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