1 | /* |
---|
2 | * GNOME panel launcher module. |
---|
3 | * (C) 1997 The Free Software Foundation |
---|
4 | * |
---|
5 | * Authors: Miguel de Icaza |
---|
6 | * Federico Mena |
---|
7 | * CORBAized by George Lebl |
---|
8 | * de-CORBAized by George Lebl |
---|
9 | */ |
---|
10 | |
---|
11 | #ifndef LAUNCHER_H |
---|
12 | #define LAUNCHER_H |
---|
13 | |
---|
14 | #include "applet.h" |
---|
15 | #include "panel-widget.h" |
---|
16 | |
---|
17 | #include <libgnome/gnome-desktop-item.h> |
---|
18 | |
---|
19 | G_BEGIN_DECLS |
---|
20 | |
---|
21 | #define PANEL_LAUNCHERS_PATH "panel2.d/default/launchers" |
---|
22 | |
---|
23 | typedef struct { |
---|
24 | AppletInfo *info; |
---|
25 | GtkWidget *button; |
---|
26 | GtkWidget *dedit; |
---|
27 | GnomeDesktopItem *ditem; |
---|
28 | GnomeDesktopItem *revert_ditem; |
---|
29 | |
---|
30 | GtkWidget *prop_dialog; |
---|
31 | |
---|
32 | gulong icon_changed_signal; |
---|
33 | gulong destroy_handler; |
---|
34 | } Launcher; |
---|
35 | |
---|
36 | /* If launchers are loaded from ANYWHERE but the normal panel |
---|
37 | * launcher location, do HOARD the file (with launcher_hoard), |
---|
38 | * otherwise things may be removed from disk when they shouldn't |
---|
39 | * etc. Also always hoard if an applet which owns a desktop already |
---|
40 | * exists.*/ |
---|
41 | Launcher * load_launcher_applet_full (const char *params, |
---|
42 | GnomeDesktopItem *ditem, |
---|
43 | PanelWidget *panel, |
---|
44 | int pos, |
---|
45 | gboolean exactpos, |
---|
46 | const char *gconf_key); |
---|
47 | |
---|
48 | Launcher * load_launcher_applet (const char *params, |
---|
49 | PanelWidget *panel, |
---|
50 | int pos, |
---|
51 | gboolean exactpos, |
---|
52 | const char *gconf_key); |
---|
53 | |
---|
54 | Launcher * load_launcher_applet_from_info (const char *name, |
---|
55 | const char *comment, |
---|
56 | const char *exec, |
---|
57 | const char *icon, |
---|
58 | PanelWidget *panel, |
---|
59 | int pos, |
---|
60 | gboolean exactpos); |
---|
61 | Launcher * load_launcher_applet_from_info_url(const char *name, |
---|
62 | const char *comment, |
---|
63 | const char *url, |
---|
64 | const char *icon, |
---|
65 | PanelWidget *panel, |
---|
66 | int pos, |
---|
67 | gboolean exactpos); |
---|
68 | |
---|
69 | void launcher_properties (Launcher *launcher, |
---|
70 | GdkScreen *screen); |
---|
71 | |
---|
72 | void launcher_save_to_gconf (Launcher *launcher, |
---|
73 | const char *gconf_key); |
---|
74 | |
---|
75 | void launcher_load_from_gconf (PanelWidget *panel_widget, |
---|
76 | gint position, |
---|
77 | const char *gconf_key); |
---|
78 | |
---|
79 | void ask_about_launcher (const char *file, |
---|
80 | PanelWidget *panel, |
---|
81 | int pos, |
---|
82 | gboolean exactpos); |
---|
83 | |
---|
84 | /* always make a new unique filename, useful for converting OLD configs */ |
---|
85 | void launcher_hoard (Launcher *launcher); |
---|
86 | |
---|
87 | Launcher * find_launcher (const char *path); |
---|
88 | |
---|
89 | void launcher_show_help (Launcher *launcher, |
---|
90 | GdkScreen *screen); |
---|
91 | |
---|
92 | void launcher_properties_destroy (Launcher *launcher); |
---|
93 | |
---|
94 | G_END_DECLS |
---|
95 | |
---|
96 | #endif |
---|