+#include <libosso.h>
+
+#include "launcher-item.h"
+#include "launchable-item.h"
+#include "settings-dialog.h"
+#include "gconf-wrapper.h"
+
+#define SL_APPLET_GCONF_PATH "/apps/simple-launcher"
+
+class SimpleLauncherApplet {
+public:
+ SimpleLauncherApplet(const std::string&);
+ ~SimpleLauncherApplet();
+
+ bool doInit(void *state_data, int *state_size);
+
+ int saveState(void **state_data, int *state_size);
+ GtkWidget *settings(GtkWindow *parent);
+
+ GtkWidget *getWidget() { return myWidget; }
+
+ int getWidth() const;
+ int getHeight() const;
+
+ void getBackgroundColour(double& red, double& green, double& blue, double alpha) const;
+
+private:
+ static void addItem(LauncherItems&, const std::string&, bool);
+
+ void loadConfig();
+ void saveConfig();
+
+ static void updateItems(LauncherItems&);
+ static void processDirectory(LauncherItems&, const std::string&);
+
+ bool initWidget();
+ void updateWidget();
+
+ void buttonPressed(GtkWidget *button, GdkEventButton *event);
+ void runDialog();
+
+ static void _button_pressed(GtkWidget *button, GdkEventButton *event, void *self);
+ static void _run_dialog(GtkMenuItem *, void *);
+
+private:
+ // GConfClientWrapper myClient;
+ // GConfKey myMainSettings;
+
+ osso_context_t *myContext;
+
+ GtkWidget *myWidget;
+ GtkWindow *myParent;
+
+ LauncherItems myItems;
+
+ GConfBooleanOption myTransparent;
+ // bool myShowInfobanner; // FIXME: to implement
+ GConfIntegerOption myIconSize;
+
+ static char *ourDirs[];
+};
+