pidgin/quail/quail-redux

Parents 077fc8c3776a
Children 2bd9e0fc5d64
More work on tracking down the Windows socket issue, plus a little bit of Android/glib integration
--- a/Quail-redux.pro Mon Sep 23 16:31:00 2013 +0100
+++ b/Quail-redux.pro Thu Sep 26 14:23:14 2013 +0100
@@ -20,21 +20,25 @@
# DEFINES += BUILDTIME=\\\"$$system(date '+%H:%M.%s')\\\"
# DEFINES += BUILDDATE=\\\"$$system(date '+%d/%m/%y')\\\"
#}
-
-QT += core gui webkit
-greaterThan(QT_MAJOR_VERSION, 4) {
- message("Using QT5")
- DEFINES += USE_QT5
+QT += core gui
+!android-g++ {
+ QT += webkit
+ greaterThan(QT_MAJOR_VERSION, 4) {
+ message("Using QT5")
+ DEFINES += USE_QT5
+ QT += widgets
+ QT += webkitwidgets
+ }
+} else {
QT += widgets
- QT += webkitwidgets
- QT -= printsupport
- QT -= sensors
- QT -= qml
- QT -= opengl
- QT -= quick
- QT -= network
- QT -= multimedia
- QT -= multimediawidgets
+ INCLUDEPATH += $(LIBPURPLE_ROOT)/../glib/glib
+ INCLUDEPATH += $(LIBPURPLE_ROOT)/../glib
+ INCLUDEPATH += $(LIBPURPLE_ROOT)/../glib/android
+ INCLUDEPATH += $(LIBPURPLE_ROOT)/../glib/gobject/android/gobject
+ INCLUDEPATH += $(LIBPURPLE_ROOT)/../glib/gobject
+ #INCLUDEPATH += $(LIBPURPLE_ROOT)/../win32-dev/gtk_2_0-2.14/include/glib-2.0/include
+ #INCLUDEPATH += $(LIBPURPLE_ROOT)/../win32-dev/gtk_2_0-2.14/lib/glib-2.0/include
+ INCLUDEPATH += $(LIBPURPLE_ROOT)
}
CONFIG = qt warn_on debug_and_release
--- a/TODO.txt Mon Sep 23 16:31:00 2013 +0100
+++ b/TODO.txt Thu Sep 26 14:23:14 2013 +0100
@@ -2,7 +2,6 @@
===========================================================
* Use Aduim's Message Styles for the conversation window
-* Buddy icons showing up
* Formatting toolbar on the conversation window
* Kill off dead code
* Rename group
@@ -34,6 +33,8 @@
* Improve enter key usage so that Shift-Enter does not send, by inserts a line feed
* Rewrite the event loop for Window
* Remember the window layout and position
+* Buddy icons size improved
+* Windows buddy list size corrected
DONE
===========================================================
@@ -51,3 +52,4 @@
* Remember group expanded state
* Enable double click to open a chat
* Buddy status icons showing
+* Buddy icons showing up
--- a/src/QuailWinGlibEventLoop.cpp Mon Sep 23 16:31:00 2013 +0100
+++ b/src/QuailWinGlibEventLoop.cpp Thu Sep 26 14:23:14 2013 +0100
@@ -312,7 +312,7 @@
//QMutexLocker locker(QMutexPool::globalInstanceGet(&triedResolve));
QMutex locker;
triedResolve = locker.tryLock();
- if (triedResolve)
+ if (!triedResolve)
return;
#endif
triedResolve = true;
@@ -335,8 +335,9 @@
serialNumber(0), lastSerialNumber(0),
sendPostedEventsWindowsTimerId(0), wakeUps(0)
{
- qDebug() << "QuailEventDispatcherWinGlib";
+ qDebug() << "QuailEventDispatcherWinGlib::QuailEventDispatcherWinGlib";
resolveTimerAPI();
+ qDebug() << "QuailEventDispatcherWinGlib::QuailEventDispatcherWinGlib.1";
#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 32
if (qEnvironmentVariableIsEmpty("QT_NO_THREADED_GLIB")) {
static QBasicMutex mutex;
@@ -357,7 +358,7 @@
mainContext = g_main_context_new();
}
}
-
+ qDebug() << "QuailEventDispatcherWinGlib::QuailEventDispatcherWinGlib.2";
#if GLIB_CHECK_VERSION (2, 22, 0)
g_main_context_push_thread_default (mainContext);
#endif
@@ -365,6 +366,8 @@
// setup post event source
postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
sizeof(GPostEventSource)));
+
+ qDebug() << "QuailEventDispatcherWinGlib::QuailEventDispatcherWinGlib.3";
postEventSource->serialNumber.store(1);
postEventSource->d = this;
g_source_set_can_recurse(&postEventSource->source, true);
@@ -398,11 +401,13 @@
void QuailEventDispatcherWinGlib::runTimersOnceWithNormalPriority()
{
+ qDebug() << "QuailEventDispatcherWinGlib::runTimersOnceWithNormalPriority";
timerSource->runWithIdlePriority = false;
}
QuailEventDispatcherWinGlib::~QuailEventDispatcherWinGlib()
{
+ qDebug() << "QuailEventDispatcherWinGlib::~QuailEventDispatcherWinGlib";
if (internalHwnd)
DestroyWindow(internalHwnd);
QString className = QLatin1String("QuailEventDispatcherWinGlib_Internal_Widget") + QString::number(quintptr(qt_internal_proc));
@@ -419,6 +424,7 @@
// This function is called by a workerthread
void WINAPI QT_WIN_CALLBACK qt_fast_timer_proc(uint timerId, uint /*reserved*/, DWORD_PTR user, DWORD_PTR /*reserved*/, DWORD_PTR /*reserved*/)
{
+ qDebug() << "QuailEventDispatcherWinGlib::qt_fast_timer_proc";
if (!timerId) // sanity check
return;
WinTimerInfo *t = (WinTimerInfo*)user;
@@ -428,9 +434,10 @@
LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp)
{
+ qDebug() << "QuailEventDispatcherWinGlib::qt_internal_proc";
if (message == WM_NCCREATE)
return true;
- qDebug() << "QuailEventDispatcherWinGlib::qt_internal_proc";
+ qDebug() << "QuailEventDispatcherWinGlib::qt_internal_proc.1";
MSG msg;
msg.hwnd = hwnd;
msg.message = message;
@@ -514,6 +521,7 @@
LRESULT QT_WIN_CALLBACK qt_GetMessageHook(int code, WPARAM wp, LPARAM lp)
{
+ qDebug() << "QuailEventDispatcherWinGlib::qt_GetMessageHook";
if (wp == PM_REMOVE) {
QuailEventDispatcherWinGlib *q = qobject_cast<QuailEventDispatcherWinGlib *>(QAbstractEventDispatcher::instance());
Q_ASSERT(q != 0);
@@ -628,6 +636,7 @@
void QuailEventDispatcherWinGlib::unregisterTimer(WinTimerInfo *t)
{
+ qDebug() << "QuailEventDispatcherWinGlib::unregisterTimer";
if (t->interval == 0) {
//QCoreApplicationPrivate::removePostedTimerEvent(t->dispatcher, t->timerId);
QCoreApplication::removePostedEvents(t->dispatcher, t->timerId);
@@ -643,6 +652,7 @@
void QuailEventDispatcherWinGlib::sendTimerEvent(int timerId)
{
+ qDebug() << "QuailEventDispatcherWinGlib::sendTimerEvent";
WinTimerInfo *t = timerDict.value(timerId);
if (t && !t->inTimerEvent) {
// send event, but don't allow it to recurse
@@ -677,6 +687,7 @@
void QuailEventDispatcherWinGlib::createInternalHwnd()
{
+ qDebug() << "QuailEventDispatcherWinGlib::createInternalHwnd";
//QuailEventDispatcherWinGlib *d = this;
QuailEventDispatcherWinGlib *d = this;