added code to generate gnome zeitgeist events (disabled by default)

This commit is contained in:
Jean-Francois Dockes
2012-03-23 10:42:43 +01:00
parent 9f17124a08
commit cff529dc82
4 changed files with 72 additions and 3 deletions
+8
View File
@@ -77,6 +77,7 @@ using std::pair;
#include "crontool.h"
#include "rtitool.h"
#include "indexer.h"
#include "rclzg.h"
using namespace confgui;
@@ -1149,6 +1150,8 @@ void RclMain::startPreview(int docnum, Rcl::Doc doc, int mod)
}
}
}
// Do the zeitgeist thing
zg_send_event(ZGSEND_PREVIEW, doc);
if (mod & Qt::ShiftModifier) {
// User wants new preview window
@@ -1231,6 +1234,8 @@ void RclMain::startPreview(Rcl::Doc doc)
this, SLOT (fileExit()));
connect(preview, SIGNAL(wordSelect(QString)),
sSearch, SLOT(addTerm(QString)));
// Do the zeitgeist thing
zg_send_event(ZGSEND_PREVIEW, doc);
preview->show();
preview->makeDocCurrent(doc, 0);
}
@@ -1621,6 +1626,9 @@ void RclMain::startNativeViewer(Rcl::Doc doc)
if (!istempfile)
historyEnterDoc(g_dynconf, doc.meta[Rcl::Doc::keyudi]);
// Do the zeitgeist thing
zg_send_event(ZGSEND_OPEN, doc);
// We keep pushing back and never deleting. This can't be good...
ExecCmd *ecmd = new ExecCmd;
+5 -1
View File
@@ -4,6 +4,9 @@ LANGUAGE = C++
@QMAKE_ENABLE_WEBKIT@QT += webkit
@QMAKE_DISABLE_WEBKIT@QMAKE_CXXFLAGS += -DRESLIST_TEXTBROWSER
@QMAKE_ENABLE_ZEITGEIST@QT += dbus
@QMAKE_ENABLE_ZEITGEIST@QMAKE_CXXFLAGS += -DUSE_ZEITGEIST
CONFIG += qt warn_on thread release
HEADERS += \
@@ -38,6 +41,7 @@ SOURCES += \
preview_w.cpp \
rclhelp.cpp \
rclmain_w.cpp \
rclzg.cpp \
reslist.cpp \
restable.cpp \
rtitool.cpp \
@@ -73,7 +77,7 @@ unix {
LIBS += ../lib/librcl.a \
$(BSTATIC) @LIBXAPIAN@ $(LIBXAPIANSTATICEXTRA) @LIBICONV@ $(BDYNAMIC) \
-lz
@LIBQZEITGEIST@ -lz
INCLUDEPATH += ../common ../index ../internfile ../query ../unac \
../utils ../aspell ../rcldb ../qtgui \