aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-07-13 13:36:19 +0300
committerJussi Kukkonen <jussi.kukkonen@intel.com>2016-07-13 14:16:11 +0300
commitaacd4e1e467758b863b54666219fec0d265c9aa6 (patch)
treeb56e93d88811db3fbf25e49096cbb7890722b932
parente936a1d0f406383d29b33f2fd94bc26798ebb9dd (diff)
downloadmatchbox-panel-2-aacd4e1e467758b863b54666219fec0d265c9aa6.tar.gz
matchbox-panel-2-aacd4e1e467758b863b54666219fec0d265c9aa6.tar.bz2
matchbox-panel-2-aacd4e1e467758b863b54666219fec0d265c9aa6.zip
battery: Port to ScalingImage2
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-rw-r--r--applets/battery/battery-acpi.c1
-rw-r--r--applets/battery/battery.c10
-rw-r--r--applets/battery/battery.h2
3 files changed, 7 insertions, 6 deletions
diff --git a/applets/battery/battery-acpi.c b/applets/battery/battery-acpi.c
index c44dd12..8431127 100644
--- a/applets/battery/battery-acpi.c
+++ b/applets/battery/battery-acpi.c
@@ -5,6 +5,7 @@
*/
#include "battery.h"
+#include <glib.h>
#include <libacpi.h>
global_t global;
diff --git a/applets/battery/battery.c b/applets/battery/battery.c
index ade3ff6..c755856 100644
--- a/applets/battery/battery.c
+++ b/applets/battery/battery.c
@@ -7,9 +7,11 @@
*/
#include "battery.h"
+#include <matchbox-panel/mb-panel.h>
+#include <matchbox-panel/mb-panel-scaling-image2.h>
typedef struct {
- MBPanelScalingImage *image;
+ MBPanelScalingImage2 *image;
const char *last_icon;
guint timeout_id;
} BatteryApplet;
@@ -38,7 +40,7 @@ timeout (BatteryApplet *applet)
applet->last_icon = icon;
- mb_panel_scaling_image_set_icon (applet->image, icon);
+ mb_panel_scaling_image2_set_icon (applet->image, icon);
/* Keep going */
return TRUE;
@@ -59,8 +61,8 @@ mb_panel_applet_create (const char *id,
applet->last_icon = NULL;
- image = mb_panel_scaling_image_new (orientation, NULL);
- applet->image = MB_PANEL_SCALING_IMAGE (image);
+ image = mb_panel_scaling_image2_new (orientation, NULL);
+ applet->image = MB_PANEL_SCALING_IMAGE2 (image);
gtk_widget_set_name (image, "MatchboxPanelBatteryMonitor");
diff --git a/applets/battery/battery.h b/applets/battery/battery.h
index 29a44ca..cf23431 100644
--- a/applets/battery/battery.h
+++ b/applets/battery/battery.h
@@ -8,8 +8,6 @@
#define MB_APPLET_BATTERY_H
#include <string.h>
-#include <matchbox-panel/mb-panel.h>
-#include <matchbox-panel/mb-panel-scaling-image.h>
int pm_support(void);
const char* pm_battery_icon(void);