aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2015-09-04 20:23:03 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2015-09-04 20:23:03 +1200
commit7e9478d19c15703f0b4f83bfddf2830d37633e31 (patch)
treebaf9fec787310ef5fc4f42456ae51060cafc10ef
parent8d6e87a2f16b6163b1e55503fed8f7a8491f9ea3 (diff)
downloadparamano-7e9478d19c15703f0b4f83bfddf2830d37633e31.tar.xz
More style changes, fixed commented out init call (whoops\!)
-rw-r--r--bat_tray.c8
-rw-r--r--paramano.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/bat_tray.c b/bat_tray.c
index f9e1328..81435c2 100644
--- a/bat_tray.c
+++ b/bat_tray.c
@@ -83,7 +83,7 @@ long get_bat_seconds_left()
if (full < 0 || now < 0 || rate <= 0)
return -1;
- switch(get_battery_state())
+ switch (get_battery_state())
{
case STATE_CHARGING:
return (3600*(long long)(full - now))/rate;
@@ -120,7 +120,7 @@ static void update_tooltip_cache()
else
snprintf(time_left, sizeof(time_left), _("%02d:%02d left"), (int)(seconds_left/3600), (int)((seconds_left%3600)/60));
- switch(get_battery_state())
+ switch (get_battery_state())
{
case STATE_DISCHARGING:
snprintf(msg, sizeof(msg), _("Discharging (%d%%)\n%s"), get_bat_percent(), time_left);
@@ -259,10 +259,10 @@ int get_bat_num()
char filename[1024];
int i = 0;
- for(i = 0; i < 10; i++)
+ for (i = 0; i < 10; i++)
{
snprintf(filename, sizeof(filename), "/sys/class/power_supply/BAT%d/present", i);
- if((fd = fopen(filename, "r")))
+ if ((fd = fopen(filename, "r")))
{
if (fgetc(fd) == '1')
{
diff --git a/paramano.c b/paramano.c
index 1af70a7..b3f75d2 100644
--- a/paramano.c
+++ b/paramano.c
@@ -28,7 +28,7 @@ int main(int argc, char** argv)
bindtextdomain("paramano",LOCALEDIR);
textdomain("paramano");
- if(!gtk_init_check(&argc, &argv))
+ if (!gtk_init_check(&argc, &argv))
{
g_error( _("GTK Error: gtk_init_check returned FALSE.\nBailing.") );
return 1;
@@ -42,10 +42,10 @@ int main(int argc, char** argv)
tray_show();
/* Show battery tray only if we're supposed to */
- if(DEFAULT_SHOW_BATTERY)
+ if (DEFAULT_SHOW_BATTERY)
{
bat_tray_init();
-// bat_tray_show();
+ bat_tray_show();
}
gtk_main();