aboutsummaryrefslogtreecommitdiffstats
path: root/widget.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-14 11:33:00 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-14 11:33:00 +0000
commit504656e9484752c9c0596f153f27089c1961f501 (patch)
tree8322150effdcffca715e116498851a2bba00c953 /widget.c
parent90a08f4f1082f25ab999d8a331dcbea512778a47 (diff)
downloadlcd4linux-504656e9484752c9c0596f153f27089c1961f501.tar.gz
[lcd4linux @ 2004-01-14 11:33:00 by reinelt]
new plugin 'uname' which does what it's called text widget nearly finished first results displayed on MatrixOrbital git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@310 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'widget.c')
-rw-r--r--widget.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/widget.c b/widget.c
index 57a4b5b..b646e38 100644
--- a/widget.c
+++ b/widget.c
@@ -1,4 +1,4 @@
-/* $Id: widget.c,v 1.7 2004/01/13 08:18:20 reinelt Exp $
+/* $Id: widget.c,v 1.8 2004/01/14 11:33:00 reinelt Exp $
*
* generic widget handling
*
@@ -21,6 +21,11 @@
*
*
* $Log: widget.c,v $
+ * Revision 1.8 2004/01/14 11:33:00 reinelt
+ * new plugin 'uname' which does what it's called
+ * text widget nearly finished
+ * first results displayed on MatrixOrbital
+ *
* Revision 1.7 2004/01/13 08:18:20 reinelt
* timer queues added
* liblcd4linux deactivated turing transformation to new layout
@@ -106,7 +111,7 @@ int widget_register (WIDGET_CLASS *widget)
}
-int widget_add (char *name)
+int widget_add (char *name, int row, int col)
{
int i;
char *section;
@@ -125,6 +130,7 @@ int widget_add (char *name)
class=cfg_get(section, "class", NULL);
if (class==NULL || *class=='\0') {
error ("error: widget '%s' has no class!", name);
+ if (class) free (class);
return -1;
}
@@ -136,6 +142,7 @@ int widget_add (char *name)
break;
}
}
+ if (class) free (class);
if (i==nClasses) {
error ("widget '%s': class '%s' not supported");
return -1;
@@ -162,6 +169,8 @@ int widget_add (char *name)
Widget->name = name;
Widget->class = Class;
+ Widget->row = row;
+ Widget->col = col;
if (Class->init!=0) {
Class->init(Widget);