Archives for: May 2005, 29

05/29/05

OPluginManager

I've been working on my OPluginManager lately (not too much, got to study too, and watched the Queen Elisabeth concours of course ;-)).

This is what I got now (it's my first GTK code ever, so I'm quite happy with it):

This is the "plugin" code:

#include "plugins/o-plugin-manager-plugin.h"
#include "plugins/o-plugin-manager-plugin-data.h"

#define TEST_PLUGIN_MSG "[test-plugin] "

static gpointer plugin_init(gpointer d, GError **e) {
        g_debug("" TEST_PLUGIN_MSG "Init");
        return (gpointer) g_strdup("Test plugin data");
}

static void free_data(gpointer d) {
        g_debug("" TEST_PLUGIN_MSG "Freeing data \"%s\"", (gchar *) d);

        g_free(d);
}

static OPluginManagerPluginAuthorData author = {
        O_PLUGIN_MANAGER_PLUGIN_DATA_AUTHOR_MAGIC,
        "ikke",
        "eikke eikke com"
};

static OPluginManagerPluginData plugininfo = {
        O_PLUGIN_MANAGER_PLUGIN_DATA_MAGIC,
        "test-plugin",
        "A simple test plugin",
        "This is a sample test plugin, to test the OPluginManager functionality",
        "0.1",
        "http://www.eikke.com",
        &author,

        NULL,
        plugin_init,
        free_data
};

O_PLUGIN_MANAGER_PLUGIN_REGISTER(plugininfo);

As you can see it's braindead easy to write a plugin :-)

The code is quite a mess at the moment, the UI is just plain ugly and inaccessible, there's no I18N support, but well, as you can see, one day it might work :-)

Lots of guys I know are in Stuttgart right now, visiting GUADEC. I wish I could be there too :-( Have a great time!!!

Permalink . Ikke . 08:33:36 pm . 221 Words . Technology, Linux, Desktop, Coding Corner . . 291 views . Leave a comment
GVim

Just had a little chat with Ruben on Vim, where he suggested me to put my .vimrc etc online.

So I did, this is my current GVim setup:


(Thumbnail is link to original image)

And here's my current .vimrc. If you know any other fancy tricks I could use, please let me know :-)

A lot of useful information on configuring your Vim is available here.

Permalink . Ikke . 01:33:19 pm . 95 Words . Technology, Desktop . . 373 views . Leave a comment