[Licq-devel] Licq on Mac OS X
Arne Schmitz <[email protected]> Fri, 16 Jan 2009 23:38:01 +0100
| Newsgroups | gmane.network.licq.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! Since I am working a lot on Mac OS X at the moment, I thought I might try to port my favourite ICQ client. :) I got it to compile, but functionality is limited. The daemon seems to work, as does the Qt4 GUI. However, the GUI does not seem to receive updates from the daemon. So the GUI stays outdated, as it was started. Anyhow, attached are the patches needed to compile current SVN and a screen shot. :) It has even got a dock icon in the menu bar! :) What needs to be changed: Some small things in the menu -- needs to be organized differently, I think. And also clicking on the dock icon should not hide / show Licq und Mac OS X. But that is trivially to implement. Cheers, Arne -- Dipl.-Inform. Arne Schmitz Phone +49 (0)241 80-21817 Computer Graphics Group Fax +49 (0)241 80-22899 RWTH Aachen University http://www.rwth-graphics.de Ahornstrasse 55, 52074 Aachen, Germany
licq-on-mac-os-x.jpg
(image/jpeg, 69.7 KB) - not displayed
mac-os-qt4-gui.patch
(application/octet-stream, 2 KB)
Index: src/helpers/support.h
===================================================================
--- src/helpers/support.h (revision 6574)
+++ src/helpers/support.h (working copy)
@@ -91,12 +91,14 @@
static unsigned keyToXSym(int keyCode);
private:
+#ifdef Q_WS_X11
/**
* Convenient wrapper to XGetWindowProperty
*
* The returned value must be deleted with XFree().
*/
static unsigned char* getWindowProperty(WId win, const char* prop);
+#endif // Q_WS_X11
};
} // namespace LicqQtGui
Index: src/helpers/support.cpp
===================================================================
--- src/helpers/support.cpp (revision 6574)
+++ src/helpers/support.cpp (working copy)
@@ -335,6 +335,7 @@
return keysym;
}
+#ifdef Q_WS_X11
unsigned char* Support::getWindowProperty(WId win, const char* prop)
{
Display* dsp = QX11Info::display();
@@ -397,3 +398,4 @@
return retValue;
}
+#endif // Q_WS_X11
Index: src/core/licqgui.h
===================================================================
--- src/core/licqgui.h (revision 6574)
+++ src/core/licqgui.h (working copy)
@@ -229,9 +229,7 @@
void eventSent(const ICQEvent* event);
private slots:
-#ifdef Q_WS_X11
void grabKey(QString key);
-#endif
void userDlgFinished(UserDlg* dialog);
void userEventTabDlgDone();
Index: src/core/licqgui.cpp
===================================================================
--- src/core/licqgui.cpp (revision 6574)
+++ src/core/licqgui.cpp (working copy)
@@ -563,9 +563,11 @@
return QApplication::x11EventFilter(event);
#endif
}
+#endif /* defined(Q_WS_X11) */
void LicqGui::grabKey(QString key)
{
+#if defined(Q_WS_X11)
Display* dsp = QX11Info::display();
Qt::HANDLE rootWin = QX11Info::appRootWindow();
@@ -592,8 +594,8 @@
XGrabKey(dsp, XKeysymToKeycode(dsp, Support::keyToXSym(grabKeysym)),
Support::keyToXMod(grabKeysym), rootWin, true,
GrabModeAsync, GrabModeSync);
+#endif /* defined(Q_WS_X11) */
}
-#endif /* defined(Q_WS_X11) */
void LicqGui::changeStatus(unsigned long status, bool invisible)
{
mac-os-licq.patch
(application/octet-stream, 678 B)
Index: include/licq_byteorder.h =================================================================== --- include/licq_byteorder.h (revision 6574) +++ include/licq_byteorder.h (working copy) @@ -43,6 +43,13 @@ # define BSWAP_64(x) bswap_64(x) # endif +// Mac OS X +#elif defined(__APPLE__) && defined(__MACH__) +# ifdef __BIG_ENDIAN__ +# define IS_BIG_ENDIAN +# else +# define IS_LITTLE_ENDIAN +# endif // BSD header for endian and byte swap #elif defined HAVE_MACHINE_ENDIAN_H @@ -69,7 +76,6 @@ # define LE_32(x) letoh32(x) # define LE_64(x) letoh64(x) - // Solaris header for endian and byte swap #elif defined HAVE_SYS_BYTEORDER_H # include <sys/byteorder.h>
PGP.sig
(application/pgp-signature, 194 B) - not displayed