diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-10-25 08:02:32 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-10-25 08:02:32 +0800 |
commit | 143e51e09f6a958fac3fb5096cf63fa97f47596a (patch) | |
tree | 288bbfe67d658184ea791a70d62df05d0ea9f490 /sysutils/gnome-power-manager/files | |
parent | 1b4d19213a78d259d24a708947f18143d6f96e1e (diff) | |
download | marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar.gz marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar.bz2 marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar.lz marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar.xz marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.tar.zst marcuscom-ports-143e51e09f6a958fac3fb5096cf63fa97f47596a.zip |
Add a patch fro GNOME git to fix laptop suspension when battery power is
very low.
Obtained from: GNOME git
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13187 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/gnome-power-manager/files')
5 files changed, 103 insertions, 0 deletions
diff --git a/sysutils/gnome-power-manager/files/patch-libhal-glib_libhal-gdevice.c b/sysutils/gnome-power-manager/files/patch-libhal-glib_libhal-gdevice.c new file mode 100644 index 000000000..6d98cece2 --- /dev/null +++ b/sysutils/gnome-power-manager/files/patch-libhal-glib_libhal-gdevice.c @@ -0,0 +1,11 @@ +--- libhal-glib/libhal-gdevice.c.orig 2009-04-19 02:15:52.000000000 -0400 ++++ libhal-glib/libhal-gdevice.c 2009-04-19 02:16:09.000000000 -0400 +@@ -280,7 +280,7 @@ hal_gdevice_query_capability (HalGDevice + return FALSE; + } + ret = dbus_g_proxy_call (proxy, "QueryCapability", error, +- G_TYPE_STRING, device->priv->udi, ++ G_TYPE_STRING, capability, + G_TYPE_INVALID, + G_TYPE_BOOLEAN, has_capability, + G_TYPE_INVALID); diff --git a/sysutils/gnome-power-manager/files/patch-src_Makefile.in b/sysutils/gnome-power-manager/files/patch-src_Makefile.in new file mode 100644 index 000000000..8bbbfb172 --- /dev/null +++ b/sysutils/gnome-power-manager/files/patch-src_Makefile.in @@ -0,0 +1,29 @@ +--- src/Makefile.in.orig 2008-09-29 17:30:53.000000000 -0400 ++++ src/Makefile.in 2008-09-29 17:35:03.000000000 -0400 +@@ -471,7 +471,7 @@ gnome_power_statistics_SOURCES = \ + $(NULL) + + gnome_power_statistics_LDADD = $(GLIB_LIBS) $(GNOME_LIBS) $(DBUS_LIBS) \ +- $(LOCAL_LIBDBUS_LIBS) $(LOCAL_LIBUNIQUE_LIBS) $(NULL) \ ++ $(LOCAL_LIBDBUS_LIBS) $(LOCAL_LIBUNIQUE_LIBS) -lexecinfo $(NULL) \ + $(am__append_1) + gnome_power_preferences_SOURCES = \ + egg-debug.h \ +@@ -499,7 +499,7 @@ gnome_power_preferences_SOURCES = \ + gnome_power_preferences_LDADD = $(GLIB_LIBS) $(GNOME_LIBS) $(HAL_LIBS) \ + $(DBUS_LIBS) $(POLKIT_GNOME_LIBS) $(GPM_EXTRA_LIBS) \ + $(LOCAL_LIBHAL_LIBS) $(LOCAL_LIBDBUS_LIBS) \ +- $(LOCAL_LIBUNIQUE_LIBS) $(NULL) $(am__append_2) ++ $(LOCAL_LIBUNIQUE_LIBS) -lexecinfo $(NULL) $(am__append_2) + gnome_power_manager_SOURCES = \ + egg-color.c \ + egg-color.h \ +@@ -588,7 +588,7 @@ gnome_power_manager_SOURCES = \ + gnome_power_manager_LDADD = $(GLIB_LIBS) $(GSTREAMER_LIBS) \ + $(GNOME_LIBS) $(HAL_LIBS) $(POLKIT_LIBS) $(DBUS_LIBS) \ + $(XRANDR_LIBS) $(GPM_EXTRA_LIBS) $(LOCAL_LIBHAL_LIBS) \ +- $(LOCAL_LIBDBUS_LIBS) $(NULL) $(am__append_3) ++ $(LOCAL_LIBDBUS_LIBS) -lexecinfo $(NULL) $(am__append_3) + gnome_power_self_test_SOURCES = \ + egg-color.c \ + egg-color.h \ diff --git a/sysutils/gnome-power-manager/files/patch-src_gpm-array-float.h b/sysutils/gnome-power-manager/files/patch-src_gpm-array-float.h new file mode 100644 index 000000000..8273665a5 --- /dev/null +++ b/sysutils/gnome-power-manager/files/patch-src_gpm-array-float.h @@ -0,0 +1,14 @@ +--- src/gpm-array-float.h.orig 2009-03-18 19:35:24.000000000 -0400 ++++ src/gpm-array-float.h 2009-03-18 19:35:42.000000000 -0400 +@@ -49,9 +49,9 @@ gfloat gpm_array_float_get_average (G + gboolean gpm_array_float_print (GArray *array); + GArray *gpm_array_float_convolve (GArray *data, + GArray *kernel); +-inline gfloat gpm_array_float_get (GArray *array, ++gfloat gpm_array_float_get (GArray *array, + guint i); +-inline void gpm_array_float_set (GArray *array, ++void gpm_array_float_set (GArray *array, + guint i, + gfloat value); + diff --git a/sysutils/gnome-power-manager/files/patch-src_gpm-button.c b/sysutils/gnome-power-manager/files/patch-src_gpm-button.c new file mode 100644 index 000000000..7960d9f22 --- /dev/null +++ b/sysutils/gnome-power-manager/files/patch-src_gpm-button.c @@ -0,0 +1,37 @@ +--- src/gpm-button.c.orig 2009-04-19 02:17:58.000000000 -0400 ++++ src/gpm-button.c 2009-04-19 02:20:39.000000000 -0400 +@@ -494,6 +494,25 @@ hal_daemon_stop_cb (HalGManager *hal_man + } + } + ++/* ++ * hal_daemon_new_device_cb ++ **/ ++static void ++hal_daemon_new_device_cb (HalGManager *hal_manager, const gchar *udi, GpmButton *button) ++{ ++ gboolean is_button; ++ HalGDevice *device; ++ ++ device = hal_gdevice_new (); ++ hal_gdevice_set_udi (device, udi); ++ hal_gdevice_query_capability (device, "button", &is_button, NULL); ++ if (is_button == TRUE) { ++ egg_debug ("Watching %s", udi); ++ watch_add_button (button, udi); ++ } ++ g_object_unref (device); ++} ++ + /** + * gpm_button_init: + * @button: This class instance +@@ -543,6 +562,8 @@ gpm_button_init (GpmButton *button) + G_CALLBACK (hal_daemon_start_cb), button); + g_signal_connect (button->priv->hal_manager, "daemon-stop", + G_CALLBACK (hal_daemon_stop_cb), button); ++ g_signal_connect (button->priv->hal_manager, "device-added", ++ G_CALLBACK (hal_daemon_new_device_cb), button); + + button->priv->hal_devicestore = hal_gdevicestore_new (); + diff --git a/sysutils/gnome-power-manager/files/patch-src_gpm-cell-array.c b/sysutils/gnome-power-manager/files/patch-src_gpm-cell-array.c new file mode 100644 index 000000000..ea8e92f03 --- /dev/null +++ b/sysutils/gnome-power-manager/files/patch-src_gpm-cell-array.c @@ -0,0 +1,12 @@ +--- src/gpm-cell-aray.c.orig 2009-10-24 19:59:07.000000000 -0400 ++++ src/gpm-cell-array.c 2009-10-24 19:59:50.000000000 -0400 +@@ -355,7 +355,8 @@ gpm_cell_array_update (GpmCellArray *cel + * get an with batteries which have a very small charge unit and consequently + * a very high charge. Fixes bug #327471 */ + if (unit->kind == GPM_CELL_UNIT_KIND_PRIMARY && +- unit->charge_current > 0 && unit->charge_last_full > 0) { ++ unit->charge_current > 0 && unit->charge_last_full > 0 && ++ unit->percentage > 1) { + gfloat pc = 100.0f * ((gfloat)unit->charge_current / + (gfloat)unit->charge_last_full); + if (pc < 0.0f) { |