Initial import.
[lxde/lxpanel.git] / src / plugins / separator.c
CommitLineData
a52c2257
HJYP
1
2
3#include "panel.h"
4#include "misc.h"
5#include "plugin.h"
6
7
8//#define DEBUG
9#include "dbg.h"
10
11
12static int
13separator_constructor(plugin *p)
14{
15 GtkWidget *sep, *eb;
16 line s;
17
18 ENTER;
19 s.len = 256;
20 while (get_line(p->fp, &s) != LINE_BLOCK_END) {
21 ERR( "separator: illegal in this context %s\n", s.str);
22 RET(0);
23 }
24 eb = gtk_event_box_new();
25 gtk_container_set_border_width(GTK_CONTAINER(eb), 1);
26 gtk_widget_show(eb);
27 /*
28 g_signal_connect(G_OBJECT(eb), "expose_event",
29 G_CALLBACK(gtk_widget_queue_draw), NULL);
30 */
31 sep = p->panel->my_separator_new();
32 gtk_widget_show(sep);
33 gtk_container_add (GTK_CONTAINER (eb), sep);
34 gtk_container_add(GTK_CONTAINER(p->pwid), eb);
35 p->priv = g_new0(int, 1); /* just to alloc smth */
36
37 RET(1);
38}
39
40static void
41separator_destructor(plugin *p)
42{
43 ENTER;
44 g_free(p->priv);
45 RET();
46}
47
48
49plugin_class separator_plugin_class = {
50 fname: NULL,
51 count: 0,
52
53 type : "separator",
54 name : "separator",
55 version: "1.0",
56 description : "Simple separator plugin",
57
58 constructor : separator_constructor,
59 destructor : separator_destructor,
60};