Package names
Dear lazy web,
Package names
Dear lazy web,
Overload
It has been quite some time since I last blogged. Lots of things are going on, so the time to sit down and reflect has been... let's say limited.
Qt as GTK, again
void gtk_container_set_border_width(QObject *o_w, int spacing)
{
QT_WIDGET_ASSERT(w)
w->setContentsMargins(spacing,spacing,spacing,spacing);
}
GTK+ made Qt
Disclaimer! First of all - this is not an attack on any toolkit, nor critique. Rather, it is a hacker sitting down and trying out an idea.#define G_OBJECT(obj) ((QObject*)(obj))
#define G_CALLBACK(func) ((void*)(func))
typedef void* gpointer;
typedef bool gboolean;
typedef char gchar;
#define g_print qDebug
...
#define GtkWidget QWidget
void gtk_widget_show(QWidget *w) { w->show(); }
#define GTK_WINDOW_TOPLEVEL (0)
QWidget *gtk_window_new(int) { return new QWidget(); }
void gtk_window_set_title(GtkWindow *w, const char *t) { w->setWindowTitle(QString(t)); }
...
#define GTK_BOX(obj) (obj->layout())
void gtk_box_pack_start(QLayout *l, QWidget *w, bool expand, bool fill, int padding) { l->addWidget(w); }
void g_signal_connect(QObject *src, const char *cstrEventName, void *f, void *data)
{
QString eventName = QString(cstrEventName);
if (eventName.endsWith("_event"))
{ // This is an event, f is an eventFuncPtr
QObject *o = QGtkEventFilter::createFilter(eventName, eventFuncPtr(f), data);
if(o)
src->installEventFilter(o);
else
qWarning("Failed to match GTK event '%s' to a Qt event filter.", cstrEventName);
}
else
{ // This is a callback, f is an callbackFuncPtr
QObject *o = new QGtkCallbackBridge(src, callbackFuncPtr(f), data);
const char *signalName = 0;
if(eventName == "clicked")
signalName = SIGNAL(clicked());
if (signalName)
QObject::connect(src, signalName, o, SLOT(trigger()));
else
qWarning("Failed to match GTK signal '%s' to a Qt signal.", cstrEventName);
}
}
One month of flying
It has been a month since I started working in my own business. My former employer has been very kind and let me explore this while on a leave of absense, i.e. I have somewhere to return to.
FSCONS 2009
So, it is kind of stupid to write about these things afterwards, but the time before a conference is always filled with preparations and far too much time spent in OO.o Impress.
Warning - broken links ahead
So, the day finally came when I switched from a fairly broken and badly styled MediaWiki-based web page to a WordPress-based one instead. This not only means better management abilites, a working search engine, a proper editor, etc. It also means that links are broken. I don't write are likely to be - there are broken links out there as I have not migrated all contents. If you run into one - feel free to tell me and I'll try to sort it out.
The result from this move will hopefully be a more professional presence on the web for my part. Unfortunately I do not have the time I want to polish the site - now I have to prepare my workshops (1, 2) for FSCONS. These events always seems to be so far away into the distant future when I sign up for them - and now it is only two weeks left...
Off to DevDays
I'm packing and trying not to forget anything, because my brain will be in auto-pilot-mode tomorrow at 4:50 when the taxi comes around to start my journey to DevDays'09 in Munich.
New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!