After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455099 - Handle phone batteries through gnome-phone-manager
Handle phone batteries through gnome-phone-manager
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on: 455095 455106
Blocks:
 
 
Reported: 2007-07-09 09:49 UTC by Bastien Nocera
Modified: 2009-06-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2007-07-09 09:49:03 UTC
API explained in bug 455095

gnome-phone-manager would send the NumberBatteriesChanged signal, and set NumberBatteries to 1 when connected, 0 when disconnected.
Comment 1 Richard Hughes 2007-07-26 10:18:20 UTC
2007-07-25  Richard Hughes  <richard@hughsie.com>

	* src/gpm-cell.c: (gpm_cell_refresh_hal_all),
	(hal_device_property_modified_cb), (gpm_cell_set_type),
	(gpm_cell_set_hal_udi), (gpm_cell_set_phone_index),
	(gpm_cell_get_icon), (gpm_cell_print), (gpm_cell_get_description),
	(phone_device_refresh_cb), (gpm_cell_init), (gpm_cell_finalize):
	* src/gpm-phone.c: (gpm_phone_coldplug), (gpm_phone_get_present),
	(gpm_phone_get_percentage), (gpm_phone_get_on_ac),
	(gpm_phone_get_num_batteries), (gpm_phone_battery_state_changed),
	(gpm_phone_num_batteries_changed), (gpm_phone_dbus_connect),
	(gpm_phone_dbus_disconnect), (phone_device_refresh_cb),
	(gpm_st_phone):
	Add in checks for the object type, and also remember to disconnect the
	signal when GpmCell is unref'ed, else we segfault on phone connect,
	disconnect, connect.

2007-07-25  Richard Hughes  <richard@hughsie.com>

	* src/Makefile.am:
	* src/gpm-cell.c:
	* src/gpm-cell-array.c: (gpm_cell_array_index_udi),
	(gpm_cell_array_coldplug), (phone_device_added_cb),
	(phone_device_removed_cb), (gpm_cell_array_init),
	(gpm_cell_array_finalize):
	Add support for GpmPhone devices. These show as laptop batteries for
	now, soon to be fixed.

	* src/gpm-marshal.list:
	* src/gpm-phone.c: (gpm_phone_coldplug),
	(gpm_phone_battery_state_changed),
	(gpm_phone_num_batteries_changed), (gpm_phone_class_init),
	(gpm_phone_dbus_connect), (gpm_phone_dbus_disconnect),
	(gpm_st_mainloop_wait), (gpm_st_phone):
	Listen for the correct signals, and add the correct GpmCell device.

	* src/gpm-self-test.c: (main):
	* src/gpm-self-test.h:
	Add the phone self-checks.