// This file is a part of Simple Launcher
//
-// Copyright (C) 2006, 2007, Mikhail Sobolev
+// Copyright (C) 2006, 2007, 2008 Mikhail Sobolev <mss@mawhrin.net>
//
// Simple Launcher is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License version 2 as published by
#ifndef _SIMPLE_LAUNCHER_H_
#define _SIMPLE_LAUNCHER_H_
+#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();
+
+ GtkWidget *settings(GtkWindow *parent);
+
+ GtkWidget *getWidget() const { 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;
+ int myValidItems;
+
+ GConfBooleanOption myTransparent;
+ // bool myShowInfobanner; // FIXME: to implement
+ GConfIntegerOption myIconSize;
+
+ static char *ourDirs[];
+};
+
#endif
+
+// vim:ts=2:sw=2:et