summaryrefslogtreecommitdiff
path: root/battstat/battstat_applet.c
diff options
context:
space:
mode:
Diffstat (limited to 'battstat/battstat_applet.c')
-rw-r--r--battstat/battstat_applet.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c
index 30d15e75..07203996 100644
--- a/battstat/battstat_applet.c
+++ b/battstat/battstat_applet.c
@@ -675,8 +675,7 @@ check_for_updates (gpointer data)
}
if (battstat->last_charging &&
- battstat->last_acline_status &&
- battstat->last_acline_status!=1000 &&
+ battstat->last_acline_status == POWER_STATUS_ON &&
!info.charging &&
info.on_ac_power &&
info.present &&
@@ -726,10 +725,10 @@ check_for_updates (gpointer data)
battstat->refresh_label = FALSE;
}
- battstat->last_charging = (info.charging != FALSE);
+ battstat->last_charging = info.charging;
battstat->last_batt_life = info.percent;
battstat->last_minutes = info.minutes;
- battstat->last_acline_status = (info.on_ac_power != FALSE);
+ battstat->last_acline_status = info.on_ac_power;
battstat->last_present = info.present;
return TRUE;
@@ -1094,11 +1093,11 @@ create_layout (ProgressData *battstat)
G_CALLBACK (destroy_applet),
battstat);
- g_signal_connect (battstat->applet, "change_orient",
+ g_signal_connect (battstat->applet, "change-orient",
G_CALLBACK (change_orient),
battstat);
- g_signal_connect (battstat->applet, "size_allocate",
+ g_signal_connect (battstat->applet, "size-allocate",
G_CALLBACK (size_allocate),
battstat);
@@ -1131,7 +1130,9 @@ battstat_applet_fill (MatePanelApplet *applet)
if (DEBUG) g_print ("main ()\n");
+#ifndef ENABLE_IN_PROCESS
g_set_application_name (_("Battery Charge Monitor"));
+#endif
gtk_window_set_default_icon_name ("battery");
@@ -1146,8 +1147,8 @@ battstat_applet_fill (MatePanelApplet *applet)
battstat->applet = GTK_WIDGET (applet);
battstat->refresh_label = TRUE;
battstat->last_batt_life = 1000;
- battstat->last_acline_status = 1000;
- battstat->last_charging = 1000;
+ battstat->last_acline_status = POWER_STATUS_UNKNOWN;
+ battstat->last_charging = POWER_STATUS_UNKNOWN;
battstat->orienttype = mate_panel_applet_get_orient (applet);
battstat->battery_low_dialog = NULL;
battstat->battery_low_label = NULL;
@@ -1211,9 +1212,8 @@ battstat_applet_factory (MatePanelApplet *applet,
return retval;
}
-MATE_PANEL_APPLET_OUT_PROCESS_FACTORY ("BattstatAppletFactory",
- PANEL_TYPE_APPLET,
- "battstat",
- battstat_applet_factory,
- NULL)
-
+PANEL_APPLET_FACTORY ("BattstatAppletFactory",
+ PANEL_TYPE_APPLET,
+ "battstat",
+ battstat_applet_factory,
+ NULL)