1 // This file is a part of Simple Launcher
3 // Copyright (C) 2006, 2007, 2008 Mikhail Sobolev <mss@mawhrin.net>
5 // Simple Launcher is free software; you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License version 2 as published by
7 // the Free Software Foundation.
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 // You should have received a copy of the GNU General Public License along with
15 // this program; if not, write to the Free Software Foundation, Inc., 51
16 // Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 #ifndef _SIMPLE_LAUNCHER_H_
19 #define _SIMPLE_LAUNCHER_H_
23 #include "launcher-item.h"
24 #include "launchable-item.h"
25 #include "settings-dialog.h"
26 #include "gconf-wrapper.h"
28 #define SL_APPLET_GCONF_PATH "/apps/simple-launcher"
30 class SimpleLauncherApplet {
32 SimpleLauncherApplet(const std::string&);
33 ~SimpleLauncherApplet();
35 bool doInit(void *state_data, int *state_size);
37 int saveState(void **state_data, int *state_size);
38 GtkWidget *settings(GtkWindow *parent);
40 GtkWidget *getWidget() const { return myWidget; }
43 int getHeight() const;
45 void getBackgroundColour(double& red, double& green, double& blue, double alpha) const;
48 static void addItem(LauncherItems&, const std::string&, bool);
53 static void updateItems(LauncherItems&);
54 static void processDirectory(LauncherItems&, const std::string&);
59 void buttonPressed(GtkWidget *button, GdkEventButton *event);
62 static void _button_pressed(GtkWidget *button, GdkEventButton *event, void *self);
63 static void _run_dialog(GtkMenuItem *, void *);
66 // GConfClientWrapper myClient;
67 // GConfKey myMainSettings;
69 osso_context_t *myContext;
74 LauncherItems myItems;
77 GConfBooleanOption myTransparent;
78 // bool myShowInfobanner; // FIXME: to implement
79 GConfIntegerOption myIconSize;
81 static char *ourDirs[];