wok-stable annotate lxpanel/stuff/battery-plugin.patch @ rev 6423
lxpanel : patch battery plugin
author | Antoine Bodin <gokhlayeh@mailoo.org> |
---|---|
date | Mon Sep 27 02:41:42 2010 +0200 (2010-09-27) |
parents | |
children |
rev | line source |
---|---|
gokhlayeh@6423 | 1 --- a/src/plugins/batt/batt.c 2010-02-08 07:37:52.000000000 +0100 |
gokhlayeh@6423 | 2 +++ b/src/plugins/batt/batt.c 2010-09-27 02:24:22.781006054 +0200 |
gokhlayeh@6423 | 3 @@ -95,7 +95,7 @@ |
gokhlayeh@6423 | 4 typedef struct { |
gokhlayeh@6423 | 5 char *command; |
gokhlayeh@6423 | 6 sem_t *lock; |
gokhlayeh@6423 | 7 -} alarm; |
gokhlayeh@6423 | 8 +} Alarm; |
gokhlayeh@6423 | 9 |
gokhlayeh@6423 | 10 static void destructor(Plugin *p); |
gokhlayeh@6423 | 11 static void update_display(lx_battery *lx_b, gboolean repaint); |
gokhlayeh@6423 | 12 @@ -103,7 +103,7 @@ |
gokhlayeh@6423 | 13 /* alarmProcess takes the address of a dynamically allocated alarm struct (which |
gokhlayeh@6423 | 14 it must free). It ensures that alarm commands do not run concurrently. */ |
gokhlayeh@6423 | 15 static void * alarmProcess(void *arg) { |
gokhlayeh@6423 | 16 - alarm *a = (alarm *) arg; |
gokhlayeh@6423 | 17 + Alarm *a = (Alarm *) arg; |
gokhlayeh@6423 | 18 |
gokhlayeh@6423 | 19 sem_wait(a->lock); |
gokhlayeh@6423 | 20 system(a->command); |
gokhlayeh@6423 | 21 @@ -157,7 +157,7 @@ |
gokhlayeh@6423 | 22 /* Run the alarm command if it isn't already running */ |
gokhlayeh@6423 | 23 if (alarmCanRun) { |
gokhlayeh@6423 | 24 |
gokhlayeh@6423 | 25 - alarm *a = (alarm *) malloc(sizeof(alarm)); |
gokhlayeh@6423 | 26 + Alarm *a = (Alarm *) malloc(sizeof(alarm)); |
gokhlayeh@6423 | 27 a->command = lx_b->alarmCommand; |
gokhlayeh@6423 | 28 a->lock = &(lx_b->alarmProcessLock); |
gokhlayeh@6423 | 29 |