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