[mate-power-manager] 07/18: debian/patches/0004_drop-udisks1-support.patch: Applied upstream.

Martin Wimpress flexiondotorg-guest at moszumanska.debian.org
Mon Jun 15 19:04:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

flexiondotorg-guest pushed a commit to branch debian/experimental
in repository mate-power-manager.

commit 65e66a0004eee9c080bf9e3b0af7f5e19f84bc69
Author: Martin Wimpress <code at flexion.org>
Date:   Mon Jun 15 19:39:40 2015 +0100

    debian/patches/0004_drop-udisks1-support.patch: Applied upstream.
---
 debian/patches/0004_drop-udisks1-support.patch | 532 -------------------------
 1 file changed, 532 deletions(-)

diff --git a/debian/patches/0004_drop-udisks1-support.patch b/debian/patches/0004_drop-udisks1-support.patch
deleted file mode 100644
index 8f602c9..0000000
--- a/debian/patches/0004_drop-udisks1-support.patch
+++ /dev/null
@@ -1,532 +0,0 @@
-From 405bec23c0a1cf97e39171fabc6596c9ab7f7a5e Mon Sep 17 00:00:00 2001
-From: Monsta <monsta at inbox.ru>
-Date: Tue, 28 Apr 2015 14:10:17 +0300
-Subject: [PATCH] dropped udisks support for several reasons.
-
-1. udisks1 will soon be dropped from debian and ubuntu, and probably from
-other major distros as well. it's replaced by udisks2.
-
-2. the only udisks1 feature that was used in m-p-m was the disk spindown.
-its usefullness is questionable, especially when you have an SSD.
-
-3. udisks2 doesn't seem to have neither API nor command-line tools for the
-spindown feature.
-
-4. spindown support has been dropped in gnome-power-manager in 2011,
-https://git.gnome.org/browse/gnome-power-manager/commit/?id=d97a988246d34f4cd38b7ee1335c9b500c7c522f
-
-5. it also has been dropped in xfce-power-manager in 2014,
-http://git.xfce.org/xfce/xfce4-power-manager/log/?qt=grep&q=disk+spin+down
-
-Closes https://github.com/mate-desktop/mate-power-manager/pull/144
-
-v2: rebased against mate-power-manager 1.8.1 (Mike Gabriel)
----
- data/gpm-prefs.ui                          |  30 -----
- data/mate-power-manager.convert            |   4 -
- data/org.mate.power-manager.gschema.xml.in |  20 ---
- src/Makefile.am                            |   2 -
- src/gpm-common.h                           |   6 -
- src/gpm-disks.c                            | 209 -----------------------------
- src/gpm-disks.h                            |  57 --------
- src/gpm-manager.c                          |  34 -----
- src/gpm-prefs-core.c                       |   8 --
- 9 files changed, 370 deletions(-)
- delete mode 100644 src/gpm-disks.c
- delete mode 100644 src/gpm-disks.h
-
---- a/data/gpm-prefs.ui
-+++ b/data/gpm-prefs.ui
-@@ -162,21 +162,6 @@
-                                 <property name="position">1</property>
-                               </packing>
-                             </child>
--                            <child>
--                              <object class="GtkCheckButton" id="checkbutton_ac_spindown">
--                                <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
--                                <property name="visible">True</property>
--                                <property name="can_focus">True</property>
--                                <property name="receives_default">False</property>
--                                <property name="use_underline">True</property>
--                                <property name="draw_indicator">True</property>
--                              </object>
--                              <packing>
--                                <property name="expand">False</property>
--                                <property name="fill">False</property>
--                                <property name="position">2</property>
--                              </packing>
--                            </child>
-                           </object>
-                         </child>
-                       </object>
-@@ -447,21 +432,6 @@
-                                 <property name="position">2</property>
-                               </packing>
-                             </child>
--                            <child>
--                              <object class="GtkCheckButton" id="checkbutton_battery_spindown">
--                                <property name="label" translatable="yes">Sp_in down hard disks when possible</property>
--                                <property name="visible">True</property>
--                                <property name="can_focus">True</property>
--                                <property name="receives_default">False</property>
--                                <property name="use_underline">True</property>
--                                <property name="draw_indicator">True</property>
--                              </object>
--                              <packing>
--                                <property name="expand">False</property>
--                                <property name="fill">False</property>
--                                <property name="position">3</property>
--                              </packing>
--                            </child>
-                           </object>
-                         </child>
-                       </object>
---- a/data/mate-power-manager.convert
-+++ b/data/mate-power-manager.convert
-@@ -47,10 +47,6 @@
- sleep-display-ac = /apps/mate-power-manager/timeout/sleep_display_ac
- sleep-display-battery = /apps/mate-power-manager/timeout/sleep_display_battery
- sleep-display-ups = /apps/mate-power-manager/timeout/sleep_display_ups
--spindown-enable-ac = /apps/mate-power-manager/disks/spindown_enable_ac
--spindown-enable-battery = /apps/mate-power-manager/disks/spindown_enable_battery
--spindown-timeout-ac = /apps/mate-power-manager/disks/spindown_timeout_ac
--spindown-timeout-battery = /apps/mate-power-manager/disks/spindown_timeout_battery
- time-action = /apps/mate-power-manager/thresholds/time_action
- time-critical = /apps/mate-power-manager/thresholds/time_critical
- time-low = /apps/mate-power-manager/thresholds/time_low
---- a/data/org.mate.power-manager.gschema.xml.in
-+++ b/data/org.mate.power-manager.gschema.xml.in
-@@ -191,26 +191,6 @@
-       <_summary>Lock GNOME keyring on sleep</_summary>
-       <_description>Whether the GNOME keyring is locked before the computer enters hibernate. This means the keyring will have to be unlocked on resume.</_description>
-     </key>
--    <key name="spindown-enable-ac" type="b">
--      <default>false</default>
--      <_summary>If the low-power mode should be enabled when on AC</_summary>
--      <_description>If the system low-power mode should be enabled when on AC power.</_description>
--    </key>
--    <key name="spindown-enable-battery" type="b">
--      <default>true</default>
--      <_summary>If the low-power mode should be enabled when on battery</_summary>
--      <_description>If the system low-power mode should be enabled when on laptop battery power.</_description>
--    </key>
--    <key name="spindown-timeout-ac" type="i">
--      <default>600</default>
--      <_summary>Seconds of inactivity to spin down when on AC</_summary>
--      <_description>The number of seconds of inactivity to spin down the disks when on AC power.</_description>
--    </key>
--    <key name="spindown-timeout-battery" type="i">
--      <default>60</default>
--      <_summary>Seconds of inactivity to spin down when on battery</_summary>
--      <_description>The number of seconds of inactivity to spin down the disks when on battery power.</_description>
--    </key>
-     <key name="notify-low-capacity" type="b">
-       <default>true</default>
-       <_summary>If we should show the low capacity warning for a broken battery</_summary>
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -156,8 +156,6 @@
- 	gpm-idle.c					\
- 	gpm-load.h					\
- 	gpm-load.c					\
--	gpm-disks.h					\
--	gpm-disks.c					\
- 	gpm-control.h					\
- 	gpm-control.c					\
- 	gpm-button.h					\
---- a/src/gpm-common.h
-+++ b/src/gpm-common.h
-@@ -90,12 +90,6 @@
- #define GPM_SETTINGS_LOCK_KEYRING_SUSPEND		"lock-keyring-suspend"
- #define GPM_SETTINGS_LOCK_KEYRING_HIBERNATE		"lock-keyring-hibernate"
- 
--/* disks */
--#define GPM_SETTINGS_SPINDOWN_ENABLE_AC			"spindown-enable-ac"
--#define GPM_SETTINGS_SPINDOWN_ENABLE_BATT		"spindown-enable-battery"
--#define GPM_SETTINGS_SPINDOWN_TIMEOUT_AC		"spindown-timeout-ac"
--#define GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT		"spindown-timeout-battery"
--
- /* notify */
- #define GPM_SETTINGS_NOTIFY_LOW_CAPACITY		"notify-low-capacity"
- #define GPM_SETTINGS_NOTIFY_DISCHARGING			"notify-discharging"
---- a/src/gpm-disks.c
-+++ /dev/null
-@@ -1,209 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
-- *
-- * Licensed under the GNU General Public License Version 2
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-- */
--
--#include "config.h"
--
--#include <glib.h>
--#include <dbus/dbus-glib.h>
--
--#include "egg-debug.h"
--#include "gpm-disks.h"
--
--static void     gpm_disks_finalize   (GObject	  *object);
--
--#define GPM_DISKS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_DISKS, GpmDisksPrivate))
--
--struct GpmDisksPrivate
--{
--	DBusGProxy		*proxy;
--	gchar			*cookie;
--};
--
--static gpointer gpm_disks_object = NULL;
--
--G_DEFINE_TYPE (GpmDisks, gpm_disks, G_TYPE_OBJECT)
--
--/**
-- * gpm_disks_unregister:
-- **/
--static gboolean
--gpm_disks_unregister (GpmDisks *disks)
--{
--	gboolean ret = FALSE;
--	GError *error = NULL;
--
--	/* no UDisks */
--	if (disks->priv->proxy == NULL) {
--		egg_warning ("no UDisks");
--		goto out;
--	}
--
--	/* clear spindown timeouts */
--	ret = dbus_g_proxy_call (disks->priv->proxy, "DriveUnsetAllSpindownTimeouts", &error,
--				 G_TYPE_STRING, disks->priv->cookie,
--				 G_TYPE_INVALID,
--				 G_TYPE_INVALID);
--	if (!ret) {
--		egg_warning ("failed to clear spindown timeout: %s", error->message);
--		g_error_free (error);
--		goto out;
--	}
--out:
--	/* reset */
--	g_free (disks->priv->cookie);
--	disks->priv->cookie = NULL;
--
--	return ret;
--}
--
--/**
-- * gpm_disks_register:
-- **/
--static gboolean
--gpm_disks_register (GpmDisks *disks, gint timeout)
--{
--	gboolean ret = FALSE;
--	GError *error = NULL;
--	const gchar **options = {NULL};
--
--	/* no UDisks */
--	if (disks->priv->proxy == NULL) {
--		egg_warning ("no UDisks");
--		goto out;
--	}
--
--	/* set spindown timeouts */
--	ret = dbus_g_proxy_call (disks->priv->proxy, "DriveSetAllSpindownTimeouts", &error,
--				 G_TYPE_INT, timeout,
--				 G_TYPE_STRV, options,
--				 G_TYPE_INVALID,
--				 G_TYPE_STRING, &disks->priv->cookie,
--				 G_TYPE_INVALID);
--	if (!ret) {
--		egg_warning ("failed to set spindown timeout: %s", error->message);
--		g_error_free (error);
--		goto out;
--	}
--out:
--	return ret;
--}
--
--/**
-- * gpm_disks_set_spindown_timeout:
-- **/
--gboolean
--gpm_disks_set_spindown_timeout (GpmDisks *disks, gint timeout)
--{
--	gboolean ret = TRUE;
--
--	/* get rid of last request */
--	if (disks->priv->cookie != NULL) {
--		egg_debug ("unregistering %s", disks->priv->cookie);
--		gpm_disks_unregister (disks);
--	}
--
--	/* is not enabled? */
--	if (timeout == 0) {
--		egg_debug ("disk spindown disabled");
--		goto out;
--	}
--
--	/* register */
--	ret = gpm_disks_register (disks, timeout);
--	if (ret)
--		egg_debug ("registered %s (%i)", disks->priv->cookie, timeout);
--out:
--	return ret;
--}
--
--/**
-- * gpm_disks_init:
-- */
--static void
--gpm_disks_init (GpmDisks *disks)
--{
--	GError *error = NULL;
--	DBusGConnection *connection;
--
--	disks->priv = GPM_DISKS_GET_PRIVATE (disks);
--
--	disks->priv->cookie = NULL;
--
--	/* get proxy to interface */
--	connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
--	disks->priv->proxy = dbus_g_proxy_new_for_name_owner (connection,
--							      "org.freedesktop.UDisks",
--							      "/org/freedesktop/UDisks",
--							      "org.freedesktop.UDisks", &error);
--	if (disks->priv->proxy == NULL) {
--		egg_warning ("DBUS error: %s", error->message);
--		g_error_free (error);
--	}
--}
--
--/**
-- * gpm_disks_coldplug:
-- *
-- * @object: This disks instance
-- */
--static void
--gpm_disks_finalize (GObject *object)
--{
--	GpmDisks *disks;
--	g_return_if_fail (object != NULL);
--	g_return_if_fail (GPM_IS_DISKS (object));
--	disks = GPM_DISKS (object);
--	g_return_if_fail (disks->priv != NULL);
--
--	g_free (disks->priv->cookie);
--	g_object_unref (disks->priv->proxy);
--
--	G_OBJECT_CLASS (gpm_disks_parent_class)->finalize (object);
--}
--
--/**
-- * gpm_disks_class_init:
-- * @klass: This class instance
-- **/
--static void
--gpm_disks_class_init (GpmDisksClass *klass)
--{
--	GObjectClass *object_class = G_OBJECT_CLASS (klass);
--	object_class->finalize = gpm_disks_finalize;
--	g_type_class_add_private (klass, sizeof (GpmDisksPrivate));
--}
--
--/**
-- * gpm_disks_new:
-- * Return value: new #GpmDisks instance.
-- **/
--GpmDisks *
--gpm_disks_new (void)
--{
--	if (gpm_disks_object != NULL) {
--		g_object_ref (gpm_disks_object);
--	} else {
--		gpm_disks_object = g_object_new (GPM_TYPE_DISKS, NULL);
--		g_object_add_weak_pointer (gpm_disks_object, &gpm_disks_object);
--	}
--	return GPM_DISKS (gpm_disks_object);
--}
--
---- a/src/gpm-disks.h
-+++ /dev/null
-@@ -1,57 +0,0 @@
--/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
-- *
-- * Copyright (C) 2009 Richard Hughes <richard at hughsie.com>
-- *
-- * Licensed under the GNU General Public License Version 2
-- *
-- * This program is free software; you can redistribute it and/or modify
-- * it under the terms of the GNU General Public License as published by
-- * the Free Software Foundation; either version 2 of the License, or
-- * (at your option) any later version.
-- *
-- * This program is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-- */
--
--#ifndef __GPM_DISKS_H
--#define __GPM_DISKS_H
--
--#include <glib-object.h>
--
--G_BEGIN_DECLS
--
--#define GPM_TYPE_DISKS		(gpm_disks_get_type ())
--#define GPM_DISKS(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GPM_TYPE_DISKS, GpmDisks))
--#define GPM_DISKS_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), GPM_TYPE_DISKS, GpmDisksClass))
--#define GPM_IS_DISKS(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GPM_TYPE_DISKS))
--#define GPM_IS_DISKS_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GPM_TYPE_DISKS))
--#define GPM_DISKS_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GPM_TYPE_DISKS, GpmDisksClass))
--
--typedef struct GpmDisksPrivate GpmDisksPrivate;
--
--typedef struct
--{
--	GObject		 parent;
--	GpmDisksPrivate	*priv;
--} GpmDisks;
--
--typedef struct
--{
--	GObjectClass	parent_class;
--} GpmDisksClass;
--
--GType		 gpm_disks_get_type			(void);
--GpmDisks	*gpm_disks_new				(void);
--
--gboolean	 gpm_disks_set_spindown_timeout		(GpmDisks	*disks,
--							 gint		 timeout);
--
--G_END_DECLS
--
--#endif /* __GPM_DISKS_H */
---- a/src/gpm-manager.c
-+++ b/src/gpm-manager.c
-@@ -60,7 +60,6 @@
- #include "gpm-tray-icon.h"
- #include "gpm-engine.h"
- #include "gpm-upower.h"
--#include "gpm-disks.h"
- 
- #include "org.mate.PowerManager.Backlight.h"
- 
-@@ -77,7 +76,6 @@
- {
- 	GpmButton		*button;
- 	GSettings		*settings;
--	GpmDisks		*disks;
- 	GpmDpms			*dpms;
- 	GpmIdle			*idle;
- 	GpmControl		*control;
-@@ -945,28 +943,6 @@
- }
- 
- /**
-- * gpm_manager_get_spindown_timeout:
-- **/
--static gint
--gpm_manager_get_spindown_timeout (GpmManager *manager)
--{
--	gboolean enabled;
--	gint timeout;
--
--	/* get policy */
--	if (!manager->priv->on_battery) {
--		enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_AC);
--		timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_AC);
--	} else {
--		enabled = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_BATT);
--		timeout = g_settings_get_int (manager->priv->settings, GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT);
--	}
--	if (!enabled)
--		timeout = 0;
--	return timeout;
--}
--
--/**
-  * gpm_manager_client_changed_cb:
-  **/
- static void
-@@ -1015,10 +991,6 @@
- 
- 	egg_debug ("on_battery: %d", on_battery);
- 
--	/* set disk spindown threshold */
--	timeout = gpm_manager_get_spindown_timeout (manager);
--	gpm_disks_set_spindown_timeout (manager->priv->disks, timeout);
--
- 	gpm_manager_sync_policy_sleep (manager);
- 
- 	gpm_manager_update_ac_throttle (manager);
-@@ -1851,7 +1823,6 @@
- 	manager->priv->notification_warning_low = NULL;
- 	manager->priv->notification_discharging = NULL;
- 	manager->priv->notification_fully_charged = NULL;
--	manager->priv->disks = gpm_disks_new ();
- 	manager->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA);
- 	g_signal_connect (manager->priv->settings, "changed",
- 			  G_CALLBACK (gpm_manager_settings_changed_cb), manager);
-@@ -1942,10 +1913,6 @@
- 	g_signal_connect (manager->priv->engine, "charge-action",
- 			  G_CALLBACK (gpm_manager_engine_charge_action_cb), manager);
- 
--	/* set disk spindown threshold */
--	timeout = gpm_manager_get_spindown_timeout (manager);
--	gpm_disks_set_spindown_timeout (manager->priv->disks, timeout);
--
- 	/* update ac throttle */
- 	gpm_manager_update_ac_throttle (manager);
- }
-@@ -1981,7 +1948,6 @@
- 		g_source_remove (manager->priv->critical_alert_timeout_id);
- 
- 	g_object_unref (manager->priv->settings);
--	g_object_unref (manager->priv->disks);
- 	g_object_unref (manager->priv->dpms);
- 	g_object_unref (manager->priv->idle);
- 	g_object_unref (manager->priv->engine);
---- a/src/gpm-prefs-core.c
-+++ b/src/gpm-prefs-core.c
-@@ -539,10 +539,6 @@
- 	g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_AC,
- 			 widget, "active",
- 			 G_SETTINGS_BIND_DEFAULT);
--	widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_spindown"));
--	g_settings_bind (prefs->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_AC,
--			 widget, "active",
--			 G_SETTINGS_BIND_DEFAULT);
- 
- 	if (prefs->priv->has_button_lid == FALSE) {
- 		widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_lid"));
-@@ -639,10 +635,6 @@
- 	g_settings_bind (prefs->priv->settings, GPM_SETTINGS_IDLE_DIM_BATT,
- 			 widget, "active",
- 			 G_SETTINGS_BIND_DEFAULT);
--	widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_spindown"));
--	g_settings_bind (prefs->priv->settings, GPM_SETTINGS_SPINDOWN_ENABLE_BATT,
--			 widget, "active",
--			 G_SETTINGS_BIND_DEFAULT);
- 
- 	if (prefs->priv->has_button_lid == FALSE) {
- 		widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid"));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mate/mate-power-manager.git



More information about the pkg-mate-commits mailing list