Removes battery_device_remove_pix --- .../power-manager-plugin/power-manager-button.c | 32 ---------------------- 1 file changed, 32 deletions(-) diff --git a/panel-plugins/power-manager-plugin/power-manager-button.c b/panel-plugins/power-manager-plugin/power-manager-button.c index 15e2689..bcb8c38 100644 --- a/panel-plugins/power-manager-plugin/power-manager-button.c +++ b/panel-plugins/power-manager-plugin/power-manager-button.c @@ -132,7 +132,6 @@ static gboolean power_manager_button_press_event (GtkWidget *widget, GdkEventBut static gboolean power_manager_button_menu_add_device (PowerManagerButton *button, BatteryDevice *battery_device, gboolean append); static void increase_brightness (PowerManagerButton *button); static void decrease_brightness (PowerManagerButton *button); -static void battery_device_remove_pix (BatteryDevice *battery_device); static BatteryDevice* @@ -395,9 +394,6 @@ power_manager_button_update_device_icon_and_details (PowerManagerButton *button, g_free (battery_device->details); battery_device->details = details; - /* If we had an image before, remove it and the callback */ - battery_device_remove_pix(battery_device); - battery_device->pix = pix; /* Get the display device, which may now be this one */ @@ -483,34 +479,6 @@ power_manager_button_add_device (UpDevice *device, PowerManagerButton *button) } } -/* This function unrefs the pix and img from the battery device and - * disconnects the expose-event callback on the img. - */ -static void -battery_device_remove_pix (BatteryDevice *battery_device) -{ - TRACE("entering"); - - if (battery_device == NULL) - return; - - if (G_IS_OBJECT (battery_device->pix)) - { - if (GTK_IS_WIDGET (battery_device->img)) - { - if (battery_device->expose_signal_id != 0) - { - g_signal_handler_disconnect (battery_device->img, battery_device->expose_signal_id); - battery_device->expose_signal_id = 0; - } - g_object_unref (battery_device->img); - battery_device->img = NULL; - } - g_object_unref (battery_device->pix); - battery_device->pix = NULL; - } -} - static void remove_battery_device (PowerManagerButton *button, BatteryDevice *battery_device) { -- 2.1.0