[Pkg-xfce-commits] r7486 - in desktop/trunk/xfce4-power-manager: . debian debian/patches

Yves-Alexis Perez corsac at alioth.debian.org
Tue May 21 10:45:13 UTC 2013


Author: corsac
Date: 2013-05-21 22:45:13 +0000 (Tue, 21 May 2013)
New Revision: 7486

Added:
   desktop/trunk/xfce4-power-manager/debian/patches/01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead.patch
   desktop/trunk/xfce4-power-manager/debian/patches/03_fix-insert-battery.patch
Removed:
   desktop/trunk/xfce4-power-manager/debian/patches/03_trap-x-errors.patch
   desktop/trunk/xfce4-power-manager/debian/patches/04_clear-idles-for-removed-batteries.patch
   desktop/trunk/xfce4-power-manager/debian/patches/05_fix-brightness-key-modifiers.patch
   desktop/trunk/xfce4-power-manager/debian/patches/06_fix-insert-battery.patch
Modified:
   desktop/trunk/xfce4-power-manager/
   desktop/trunk/xfce4-power-manager/debian/changelog
   desktop/trunk/xfce4-power-manager/debian/control
   desktop/trunk/xfce4-power-manager/debian/patches/02_translations-fix-invalid-format-strings.patch
   desktop/trunk/xfce4-power-manager/debian/patches/series
   desktop/trunk/xfce4-power-manager/debian/rules
Log:
merge changes from experimental



Property changes on: desktop/trunk/xfce4-power-manager
___________________________________________________________________
Modified: svn:mergeinfo
   - /goodies/branches/experimental/xfce4-power-manager:3824-5300
/goodies/tags/xfce4-power-manager/0.8.4.2-1:3692-3823
   + /desktop/branches/experimental/xfce4-power-manager:6767-7485
/goodies/branches/experimental/xfce4-power-manager:3824-5300
/goodies/tags/xfce4-power-manager/0.8.4.2-1:3692-3823

Modified: desktop/trunk/xfce4-power-manager/debian/changelog
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/changelog	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/changelog	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,11 +1,46 @@
-xfce4-power-manager (1.0.11-3) UNRELEASED; urgency=low
+xfce4-power-manager (1.2.0-2) UNRELEASED; urgency=low
 
+  [ Lionel Le Folgoc ]
   * debian/patches:
-    - 06_fix-insert-battery added, correctly handle icon when adding/removing
-      batteries.                                                closes: #626224
+    - 02_translations-fix-invalid-format-strings.patch: updated to fix
+      crashes because of en_GB.po and tr.po.
 
- -- Yves-Alexis Perez <corsac at debian.org>  Thu, 22 Nov 2012 22:53:33 +0100
+  [ Yves-Alexis Perez ]
+  * debian/patches:
+    - 01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead added, use
+      libnotify for brightness notifications.
+    - 03_fix-insert-battery added, fix spurious space appearing when
+      removing/adding battery.                                  closes: #626224
+  * debian/rules:
+    - enable all hardening options.
 
+ -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 21 Oct 2012 23:17:45 +0200
+
+xfce4-power-manager (1.2.0-1) experimental; urgency=low
+
+  * New upstream stable release.
+  * debian/control:
+    - bump b-deps for Xfce 4.10.
+  * debian/patches:
+    - 02_translations-fix-invalid-format-strings.patch: refreshed, some
+      translations have been fixed.
+
+ -- Lionel Le Folgoc <mrpouit at gmail.com>  Sat, 05 May 2012 14:24:30 +0200
+
+xfce4-power-manager (1.1.0-1) experimental; urgency=low
+
+  [ Yves-Alexis Perez ]
+  * New upstream development release.
+  * debian/patches:
+    - 03_trap-x-errors, 04_clear-idles-for-removed-batteries,
+      05_fix-brightness-key-modifiers: dropped, included upstream.
+
+  [ Lionel Le Folgoc ]
+  * debian/patches:
+    - 02_translations-fix-invalid-format-strings: refreshed to apply cleanly.
+
+ -- Yves-Alexis Perez <corsac at debian.org>  Sun, 15 Apr 2012 20:23:42 +0200
+
 xfce4-power-manager (1.0.11-2) unstable; urgency=low
 
   [ Lionel Le Folgoc ]

Modified: desktop/trunk/xfce4-power-manager/debian/control
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/control	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/control	2013-05-21 22:45:13 UTC (rev 7486)
@@ -4,9 +4,10 @@
 Maintainer: Debian Xfce Maintainers <pkg-xfce-devel at lists.alioth.debian.org>
 Uploaders: Yves-Alexis Perez <corsac at debian.org>, Lionel Le Folgoc <mrpouit at gmail.com>
 Build-Depends: debhelper (>= 9), intltool, pkg-config, libgtk2.0-dev,
- libdbus-1-dev, libdbus-glib-1-dev, libxfconf-0-dev (>= 4.8.0),
- libxfce4ui-1-dev (>= 4.7.0), libnotify-dev, xfce4-panel-dev (>= 4.8.0),
- libpolkit-gobject-1-dev, libxext-dev, libx11-dev, dpkg-dev (>= 1.16.1)
+ libdbus-1-dev, libdbus-glib-1-dev, libxfconf-0-dev (>= 4.10.0),
+ libxfce4ui-1-dev (>= 4.10.0), libnotify-dev, xfce4-panel-dev (>= 4.10.0),
+ libpolkit-gobject-1-dev, libxext-dev, libx11-dev, dpkg-dev (>= 1.16.1),
+ xfce4-dev-tools, libtool
 Standards-Version: 3.9.3
 Vcs-Svn: svn://svn.debian.org/pkg-xfce/goodies/trunk/xfce4-power-manager/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-xfce/goodies/trunk/xfce4-power-manager/

Added: desktop/trunk/xfce4-power-manager/debian/patches/01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead.patch	                        (rev 0)
+++ desktop/trunk/xfce4-power-manager/debian/patches/01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -0,0 +1,1411 @@
+From: Jannis Pohlmann <jannis at xfce.org>
+To: xfce4-dev at xfce.org
+Subject: [PATCH] Remove custom OSD brightness popup, use libnotify instead
+
+The custom rendered OSD popup to indicate the current brightness
+state whenever it changed looked nice but it is better handled in
+the notification daemon. E.g. we could include an extension hint
+in the notification to have xfce4-notifyd render certain
+notifications (e.g. brightness, volume changes) in a different style
+than regular notifications.
+
+This commit simplifies the whole brightness notification logic
+quite a bit.
+
+Signed-off-by: Jannis Pohlmann <jannis at xfce.org>
+---
+ src/Makefile.am             |    4 +-
+ src/gsd-media-keys-window.c | 1078 -------------------------------------------
+ src/gsd-media-keys-window.h |   71 ---
+ src/xfpm-backlight.c        |  128 +----
+ src/xfpm-notify.c           |    2 +-
+ 5 files changed, 19 insertions(+), 1264 deletions(-)
+ delete mode 100644 src/gsd-media-keys-window.c
+ delete mode 100644 src/gsd-media-keys-window.h
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -37,9 +37,7 @@ xfce4_power_manager_SOURCES =
+ 	xfpm-polkit.c				\
+ 	xfpm-polkit.h				\
+ 	xfpm-errors.c				\
+-	xfpm-errors.h				\
+-	gsd-media-keys-window.c			\
+-	gsd-media-keys-window.h
++	xfpm-errors.h
+ 
+ xfce4_power_manager_CFLAGS =                    \
+ 	-I$(top_srcdir)                         \
+--- a/src/gsd-media-keys-window.c
++++ /dev/null
+@@ -1,1078 +0,0 @@
+-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+- *
+- * Copyright (C) 2006-2007 William Jon McCann <mccann at jhu.edu>
+- *
+- * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#include "config.h"
+-
+-#include <stdlib.h>
+-#include <string.h>
+-#include <math.h>
+-#include <glib.h>
+-#include <glib/gi18n.h>
+-#include <gtk/gtk.h>
+-
+-#include "gsd-media-keys-window.h"
+-
+-#include "data/interfaces/acme_ui.h"
+-
+-#define DIALOG_TIMEOUT 2000     /* dialog timeout in ms */
+-#define DIALOG_FADE_TIMEOUT 1500 /* timeout before fade starts */
+-#define FADE_TIMEOUT 10        /* timeout in ms between each frame of the fade */
+-
+-#define BG_ALPHA 0.75
+-#define FG_ALPHA 1.00
+-
+-#define GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowPrivate))
+-
+-struct GsdMediaKeysWindowPrivate
+-{
+-        guint                    is_composited : 1;
+-        guint                    hide_timeout_id;
+-        guint                    fade_timeout_id;
+-        double                   fade_out_alpha;
+-        GsdMediaKeysWindowAction action;
+-        char                    *icon_name;
+-        gboolean                 show_level;
+-
+-        guint                    volume_muted : 1;
+-        int                      volume_level;
+-
+-        GtkImage                *image;
+-        GtkWidget               *progress;
+-};
+-
+-G_DEFINE_TYPE (GsdMediaKeysWindow, gsd_media_keys_window, GTK_TYPE_WINDOW)
+-
+-static gboolean
+-fade_timeout (GsdMediaKeysWindow *window)
+-{
+-        if (window->priv->fade_out_alpha <= 0.0) {
+-                gtk_widget_hide (GTK_WIDGET (window));
+-
+-                /* Reset it for the next time */
+-                window->priv->fade_out_alpha = 1.0;
+-                window->priv->fade_timeout_id = 0;
+-
+-                return FALSE;
+-        } else {
+-                GdkRectangle rect;
+-                GtkWidget *win = GTK_WIDGET (window);
+-                GtkAllocation allocation;
+-
+-                window->priv->fade_out_alpha -= 0.10;
+-
+-                rect.x = 0;
+-                rect.y = 0;
+-                gtk_widget_get_allocation (win, &allocation);
+-                rect.width = allocation.width;
+-                rect.height = allocation.height;
+-
+-                gtk_widget_realize (win);
+-                gdk_window_invalidate_rect (gtk_widget_get_window (win), &rect, FALSE);
+-        }
+-
+-        return TRUE;
+-}
+-
+-static gboolean
+-hide_timeout (GsdMediaKeysWindow *window)
+-{
+-        if (window->priv->is_composited) {
+-                window->priv->hide_timeout_id = 0;
+-                window->priv->fade_timeout_id = g_timeout_add (FADE_TIMEOUT,
+-                                                               (GSourceFunc) fade_timeout,
+-                                                               window);
+-        } else {
+-                gtk_widget_hide (GTK_WIDGET (window));
+-        }
+-
+-        return FALSE;
+-}
+-
+-static void
+-remove_hide_timeout (GsdMediaKeysWindow *window)
+-{
+-        if (window->priv->hide_timeout_id != 0) {
+-                g_source_remove (window->priv->hide_timeout_id);
+-                window->priv->hide_timeout_id = 0;
+-        }
+-
+-        if (window->priv->fade_timeout_id != 0) {
+-                g_source_remove (window->priv->fade_timeout_id);
+-                window->priv->fade_timeout_id = 0;
+-                window->priv->fade_out_alpha = 1.0;
+-        }
+-}
+-
+-static void
+-add_hide_timeout (GsdMediaKeysWindow *window)
+-{
+-        int timeout;
+-
+-        if (window->priv->is_composited) {
+-                timeout = DIALOG_FADE_TIMEOUT;
+-        } else {
+-                timeout = DIALOG_TIMEOUT;
+-        }
+-        window->priv->hide_timeout_id = g_timeout_add (timeout,
+-                                                       (GSourceFunc) hide_timeout,
+-                                                       window);
+-}
+-
+-static void
+-update_window (GsdMediaKeysWindow *window)
+-{
+-        remove_hide_timeout (window);
+-        add_hide_timeout (window);
+-
+-        if (window->priv->is_composited) {
+-                gtk_widget_queue_draw (GTK_WIDGET (window));
+-        }
+-}
+-
+-static void
+-volume_controls_set_visible (GsdMediaKeysWindow *window,
+-                             gboolean            visible)
+-{
+-        if (window->priv->progress == NULL)
+-                return;
+-
+-        if (visible) {
+-                gtk_widget_show (window->priv->progress);
+-        } else {
+-                gtk_widget_hide (window->priv->progress);
+-        }
+-}
+-
+-static void
+-window_set_icon_name (GsdMediaKeysWindow *window,
+-                      const char         *name)
+-{
+-        if (window->priv->image == NULL)
+-                return;
+-
+-        gtk_image_set_from_icon_name (window->priv->image,
+-                                      name, GTK_ICON_SIZE_DIALOG);
+-}
+-
+-static void
+-action_changed (GsdMediaKeysWindow *window)
+-{
+-        if (! window->priv->is_composited) {
+-                switch (window->priv->action) {
+-                case GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME:
+-                        volume_controls_set_visible (window, TRUE);
+-
+-                        if (window->priv->volume_muted) {
+-                                window_set_icon_name (window, "audio-volume-muted");
+-                        } else {
+-                                window_set_icon_name (window, "audio-volume-high");
+-                        }
+-
+-                        break;
+-                case GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM:
+-                        volume_controls_set_visible (window, window->priv->show_level);
+-                        window_set_icon_name (window, window->priv->icon_name);
+-                        break;
+-                default:
+-                        g_assert_not_reached ();
+-                        break;
+-                }
+-        }
+-
+-        update_window (window);
+-}
+-
+-static void
+-volume_level_changed (GsdMediaKeysWindow *window)
+-{
+-        update_window (window);
+-
+-        if (!window->priv->is_composited && window->priv->progress != NULL) {
+-                double fraction;
+-
+-                fraction = (double) window->priv->volume_level / 100.0;
+-
+-                gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (window->priv->progress),
+-                                               fraction);
+-        }
+-}
+-
+-static void
+-volume_muted_changed (GsdMediaKeysWindow *window)
+-{
+-        update_window (window);
+-
+-        if (! window->priv->is_composited) {
+-                if (window->priv->volume_muted) {
+-                        window_set_icon_name (window, "audio-volume-muted");
+-                } else {
+-                        window_set_icon_name (window, "audio-volume-high");
+-                }
+-        }
+-}
+-
+-void
+-gsd_media_keys_window_set_action (GsdMediaKeysWindow      *window,
+-                                  GsdMediaKeysWindowAction action)
+-{
+-        g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window));
+-        g_return_if_fail (action == GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME);
+-
+-        if (window->priv->action != action) {
+-                window->priv->action = action;
+-                action_changed (window);
+-        } else {
+-                update_window (window);
+-        }
+-}
+-
+-void
+-gsd_media_keys_window_set_action_custom (GsdMediaKeysWindow      *window,
+-                                         const char              *icon_name,
+-                                         gboolean                 show_level)
+-{
+-        g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window));
+-        g_return_if_fail (icon_name != NULL);
+-
+-        if (window->priv->action != GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM ||
+-            g_strcmp0 (window->priv->icon_name, icon_name) != 0 ||
+-            window->priv->show_level != show_level) {
+-                window->priv->action = GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM;
+-                g_free (window->priv->icon_name);
+-                window->priv->icon_name = g_strdup (icon_name);
+-                window->priv->show_level = show_level;
+-                action_changed (window);
+-        } else {
+-                update_window (window);
+-        }
+-}
+-
+-void
+-gsd_media_keys_window_set_volume_muted (GsdMediaKeysWindow *window,
+-                                        gboolean            muted)
+-{
+-        g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window));
+-
+-        if (window->priv->volume_muted != muted) {
+-                window->priv->volume_muted = muted;
+-                volume_muted_changed (window);
+-        }
+-}
+-
+-void
+-gsd_media_keys_window_set_volume_level (GsdMediaKeysWindow *window,
+-                                        int                 level)
+-{
+-        g_return_if_fail (GSD_IS_MEDIA_KEYS_WINDOW (window));
+-
+-        if (window->priv->volume_level != level) {
+-                window->priv->volume_level = level;
+-                volume_level_changed (window);
+-        }
+-}
+-
+-static void
+-rounded_rectangle (cairo_t* cr,
+-                   gdouble  aspect,
+-                   gdouble  x,
+-                   gdouble  y,
+-                   gdouble  corner_radius,
+-                   gdouble  width,
+-                   gdouble  height)
+-{
+-        gdouble radius = corner_radius / aspect;
+-
+-        cairo_move_to (cr, x + radius, y);
+-
+-        cairo_line_to (cr,
+-                       x + width - radius,
+-                       y);
+-        cairo_arc (cr,
+-                   x + width - radius,
+-                   y + radius,
+-                   radius,
+-                   -90.0f * G_PI / 180.0f,
+-                   0.0f * G_PI / 180.0f);
+-        cairo_line_to (cr,
+-                       x + width,
+-                       y + height - radius);
+-        cairo_arc (cr,
+-                   x + width - radius,
+-                   y + height - radius,
+-                   radius,
+-                   0.0f * G_PI / 180.0f,
+-                   90.0f * G_PI / 180.0f);
+-        cairo_line_to (cr,
+-                       x + radius,
+-                       y + height);
+-        cairo_arc (cr,
+-                   x + radius,
+-                   y + height - radius,
+-                   radius,
+-                   90.0f * G_PI / 180.0f,
+-                   180.0f * G_PI / 180.0f);
+-        cairo_line_to (cr,
+-                       x,
+-                       y + radius);
+-        cairo_arc (cr,
+-                   x + radius,
+-                   y + radius,
+-                   radius,
+-                   180.0f * G_PI / 180.0f,
+-                   270.0f * G_PI / 180.0f);
+-        cairo_close_path (cr);
+-}
+-
+-static GdkPixbuf *
+-load_pixbuf (GsdMediaKeysWindow *window,
+-             const char         *name,
+-             int                 icon_size)
+-{
+-        GtkIconTheme *theme;
+-        GdkPixbuf    *pixbuf;
+-
+-        if (window != NULL && gtk_widget_has_screen (GTK_WIDGET (window))) {
+-                theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)));
+-        } else {
+-                theme = gtk_icon_theme_get_default ();
+-        }
+-
+-        pixbuf = gtk_icon_theme_load_icon (theme,
+-                                           name,
+-                                           icon_size,
+-                                           GTK_ICON_LOOKUP_FORCE_SVG,
+-                                           NULL);
+-
+-        /* make sure the pixbuf is close to the requested size
+-         * this is necessary because GTK_ICON_LOOKUP_FORCE_SVG
+-         * seems to be broken */
+-        if (pixbuf != NULL) {
+-                int width;
+-
+-                width = gdk_pixbuf_get_width (pixbuf);
+-                if (width < (float)icon_size * 0.75) {
+-                        g_object_unref (pixbuf);
+-                        pixbuf = NULL;
+-                }
+-        }
+-
+-        return pixbuf;
+-}
+-
+-static void
+-draw_eject (cairo_t *cr,
+-            double   _x0,
+-            double   _y0,
+-            double   width,
+-            double   height)
+-{
+-        int box_height;
+-        int tri_height;
+-        int separation;
+-
+-        box_height = height * 0.2;
+-        separation = box_height / 3;
+-        tri_height = height - box_height - separation;
+-
+-        cairo_rectangle (cr, _x0, _y0 + height - box_height, width, box_height);
+-
+-        cairo_move_to (cr, _x0, _y0 + tri_height);
+-        cairo_rel_line_to (cr, width, 0);
+-        cairo_rel_line_to (cr, -width / 2, -tri_height);
+-        cairo_rel_line_to (cr, -width / 2, tri_height);
+-        cairo_close_path (cr);
+-        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
+-        cairo_fill_preserve (cr);
+-
+-        cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
+-        cairo_set_line_width (cr, 2);
+-        cairo_stroke (cr);
+-}
+-
+-static void
+-draw_waves (cairo_t *cr,
+-            double   cx,
+-            double   cy,
+-            double   max_radius,
+-            int      volume_level)
+-{
+-        const int n_waves = 3;
+-        int last_wave;
+-        int i;
+-
+-        last_wave = n_waves * volume_level / 100;
+-
+-        for (i = 0; i < n_waves; i++) {
+-                double angle1;
+-                double angle2;
+-                double radius;
+-                double alpha;
+-
+-                angle1 = -M_PI / 4;
+-                angle2 = M_PI / 4;
+-
+-                if (i < last_wave)
+-                        alpha = 1.0;
+-                else if (i > last_wave)
+-                        alpha = 0.1;
+-                else alpha = 0.1 + 0.9 * (n_waves * volume_level % 100) / 100.0;
+-
+-                radius = (i + 1) * (max_radius / n_waves);
+-                cairo_arc (cr, cx, cy, radius, angle1, angle2);
+-                cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, alpha / 2);
+-                cairo_set_line_width (cr, 14);
+-                cairo_set_line_cap  (cr, CAIRO_LINE_CAP_ROUND);
+-                cairo_stroke_preserve (cr);
+-
+-                cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, alpha);
+-                cairo_set_line_width (cr, 10);
+-                cairo_set_line_cap  (cr, CAIRO_LINE_CAP_ROUND);
+-                cairo_stroke (cr);
+-        }
+-}
+-
+-static void
+-draw_cross (cairo_t *cr,
+-            double   cx,
+-            double   cy,
+-            double   size)
+-{
+-        cairo_move_to (cr, cx, cy - size/2.0);
+-        cairo_rel_line_to (cr, size, size);
+-
+-        cairo_move_to (cr, cx, cy + size/2.0);
+-        cairo_rel_line_to (cr, size, -size);
+-
+-        cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
+-        cairo_set_line_width (cr, 14);
+-        cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
+-        cairo_stroke_preserve (cr);
+-
+-        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
+-        cairo_set_line_width (cr, 10);
+-        cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND);
+-        cairo_stroke (cr);
+-}
+-
+-static void
+-draw_speaker (cairo_t *cr,
+-              double   cx,
+-              double   cy,
+-              double   width,
+-              double   height)
+-{
+-        double box_width;
+-        double box_height;
+-        double _x0;
+-        double _y0;
+-
+-        box_width = width / 3;
+-        box_height = height / 3;
+-
+-        _x0 = cx - (width / 2) + box_width;
+-        _y0 = cy - box_height / 2;
+-
+-        cairo_move_to (cr, _x0, _y0);
+-        cairo_rel_line_to (cr, - box_width, 0);
+-        cairo_rel_line_to (cr, 0, box_height);
+-        cairo_rel_line_to (cr, box_width, 0);
+-
+-        cairo_line_to (cr, cx + box_width, cy + height / 2);
+-        cairo_rel_line_to (cr, 0, -height);
+-        cairo_line_to (cr, _x0, _y0);
+-        cairo_close_path (cr);
+-
+-        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, FG_ALPHA);
+-        cairo_fill_preserve (cr);
+-
+-        cairo_set_source_rgba (cr, 0.6, 0.6, 0.6, FG_ALPHA / 2);
+-        cairo_set_line_width (cr, 2);
+-        cairo_stroke (cr);
+-}
+-
+-static gboolean
+-render_speaker (GsdMediaKeysWindow *window,
+-                cairo_t            *cr,
+-                double              _x0,
+-                double              _y0,
+-                double              width,
+-                double              height)
+-{
+-        GdkPixbuf         *pixbuf;
+-        int                icon_size;
+-        int                n;
+-        static const char *icon_names[] = {
+-                "audio-volume-muted",
+-                "audio-volume-low",
+-                "audio-volume-medium",
+-                "audio-volume-high",
+-                NULL
+-        };
+-
+-        if (window->priv->volume_muted) {
+-                n = 0;
+-        } else {
+-                /* select image */
+-                n = 3 * window->priv->volume_level / 100 + 1;
+-                if (n < 1) {
+-                        n = 1;
+-                } else if (n > 3) {
+-                        n = 3;
+-                }
+-        }
+-
+-        icon_size = (int)width;
+-
+-        pixbuf = load_pixbuf (window, icon_names[n], icon_size);
+-
+-        if (pixbuf == NULL) {
+-                return FALSE;
+-        }
+-
+-        gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0);
+-        cairo_paint_with_alpha (cr, FG_ALPHA);
+-
+-        g_object_unref (pixbuf);
+-
+-        return TRUE;
+-}
+-
+-static void
+-color_reverse (const GdkColor *a,
+-               GdkColor       *b)
+-{
+-        gdouble red;
+-        gdouble green;
+-        gdouble blue;
+-        gdouble h;
+-        gdouble s;
+-        gdouble v;
+-
+-        red = (gdouble) a->red / 65535.0;
+-        green = (gdouble) a->green / 65535.0;
+-        blue = (gdouble) a->blue / 65535.0;
+-
+-        gtk_rgb_to_hsv (red, green, blue, &h, &s, &v);
+-
+-        v = 0.5 + (0.5 - v);
+-        if (v > 1.0)
+-                v = 1.0;
+-        else if (v < 0.0)
+-                v = 0.0;
+-
+-        gtk_hsv_to_rgb (h, s, v, &red, &green, &blue);
+-
+-        b->red = red * 65535.0;
+-        b->green = green * 65535.0;
+-        b->blue = blue * 65535.0;
+-}
+-
+-static void
+-draw_volume_boxes (GsdMediaKeysWindow *window,
+-                   cairo_t            *cr,
+-                   double              percentage,
+-                   double              _x0,
+-                   double              _y0,
+-                   double              width,
+-                   double              height)
+-{
+-        gdouble   x1;
+-        GdkColor  color;
+-        double    r, g, b;
+-        GtkStyle *style;
+-
+-        _x0 += 0.5;
+-        _y0 += 0.5;
+-        height = round (height) - 1;
+-        width = round (width) - 1;
+-        x1 = round ((width - 1) * percentage);
+-        style = gtk_widget_get_style (GTK_WIDGET (window));
+-
+-        /* bar background */
+-        color_reverse (&style->dark[GTK_STATE_NORMAL], &color);
+-        r = (float)color.red / 65535.0;
+-        g = (float)color.green / 65535.0;
+-        b = (float)color.blue / 65535.0;
+-        rounded_rectangle (cr, 1.0, _x0, _y0, height / 6, width, height);
+-        cairo_set_source_rgba (cr, r, g, b, FG_ALPHA / 2);
+-        cairo_fill_preserve (cr);
+-
+-        /* bar border */
+-        color_reverse (&style->light[GTK_STATE_NORMAL], &color);
+-        r = (float)color.red / 65535.0;
+-        g = (float)color.green / 65535.0;
+-        b = (float)color.blue / 65535.0;
+-        cairo_set_source_rgba (cr, r, g, b, FG_ALPHA / 2);
+-        cairo_set_line_width (cr, 1);
+-        cairo_stroke (cr);
+-
+-        /* bar progress */
+-        if (percentage < 0.01)
+-                return;
+-        color = style->bg[GTK_STATE_NORMAL];
+-        r = (float)color.red / 65535.0;
+-        g = (float)color.green / 65535.0;
+-        b = (float)color.blue / 65535.0;
+-        rounded_rectangle (cr, 1.0, _x0 + 0.5, _y0 + 0.5, height / 6 - 0.5, x1, height - 1);
+-        cairo_set_source_rgba (cr, r, g, b, FG_ALPHA);
+-        cairo_fill (cr);
+-}
+-
+-static void
+-draw_action_volume (GsdMediaKeysWindow *window,
+-                    cairo_t            *cr)
+-{
+-        int window_width;
+-        int window_height;
+-        double icon_box_width;
+-        double icon_box_height;
+-        double icon_box_x0;
+-        double icon_box_y0;
+-        double volume_box_x0;
+-        double volume_box_y0;
+-        double volume_box_width;
+-        double volume_box_height;
+-        gboolean res;
+-
+-        gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height);
+-
+-        icon_box_width = round (window_width * 0.65);
+-        icon_box_height = round (window_height * 0.65);
+-        volume_box_width = icon_box_width;
+-        volume_box_height = round (window_height * 0.05);
+-
+-        icon_box_x0 = (window_width - icon_box_width) / 2;
+-        icon_box_y0 = (window_height - icon_box_height - volume_box_height) / 2;
+-        volume_box_x0 = round (icon_box_x0);
+-        volume_box_y0 = round (icon_box_height + icon_box_y0);
+-
+-#if 0
+-        g_message ("icon box: w=%f h=%f _x0=%f _y0=%f",
+-                   icon_box_width,
+-                   icon_box_height,
+-                   icon_box_x0,
+-                   icon_box_y0);
+-        g_message ("volume box: w=%f h=%f _x0=%f _y0=%f",
+-                   volume_box_width,
+-                   volume_box_height,
+-                   volume_box_x0,
+-                   volume_box_y0);
+-#endif
+-
+-        res = render_speaker (window,
+-                              cr,
+-                              icon_box_x0, icon_box_y0,
+-                              icon_box_width, icon_box_height);
+-        if (! res) {
+-                double speaker_width;
+-                double speaker_height;
+-                double speaker_cx;
+-                double speaker_cy;
+-
+-                speaker_width = icon_box_width * 0.5;
+-                speaker_height = icon_box_height * 0.75;
+-                speaker_cx = icon_box_x0 + speaker_width / 2;
+-                speaker_cy = icon_box_y0 + speaker_height / 2;
+-
+-#if 0
+-                g_message ("speaker box: w=%f h=%f cx=%f cy=%f",
+-                           speaker_width,
+-                           speaker_height,
+-                           speaker_cx,
+-                           speaker_cy);
+-#endif
+-
+-                /* draw speaker symbol */
+-                draw_speaker (cr, speaker_cx, speaker_cy, speaker_width, speaker_height);
+-
+-                if (! window->priv->volume_muted) {
+-                        /* draw sound waves */
+-                        double wave_x0;
+-                        double wave_y0;
+-                        double wave_radius;
+-
+-                        wave_x0 = window_width / 2;
+-                        wave_y0 = speaker_cy;
+-                        wave_radius = icon_box_width / 2;
+-
+-                        draw_waves (cr, wave_x0, wave_y0, wave_radius, window->priv->volume_level);
+-                } else {
+-                        /* draw 'mute' cross */
+-                        double cross_x0;
+-                        double cross_y0;
+-                        double cross_size;
+-
+-                        cross_size = speaker_width * 3 / 4;
+-                        cross_x0 = icon_box_x0 + icon_box_width - cross_size;
+-                        cross_y0 = speaker_cy;
+-
+-                        draw_cross (cr, cross_x0, cross_y0, cross_size);
+-                }
+-        }
+-
+-        /* draw volume meter */
+-        draw_volume_boxes (window,
+-                           cr,
+-                           (double)window->priv->volume_level / 100.0,
+-                           volume_box_x0,
+-                           volume_box_y0,
+-                           volume_box_width,
+-                           volume_box_height);
+-}
+-
+-static gboolean
+-render_custom (GsdMediaKeysWindow *window,
+-               cairo_t            *cr,
+-               double              _x0,
+-               double              _y0,
+-               double              width,
+-               double              height)
+-{
+-        GdkPixbuf         *pixbuf;
+-        int                icon_size;
+-
+-        icon_size = (int)width;
+-
+-        pixbuf = load_pixbuf (window, window->priv->icon_name, icon_size);
+-
+-        if (pixbuf == NULL) {
+-                char *name;
+-                if (gtk_widget_get_direction (GTK_WIDGET (window)) == GTK_TEXT_DIR_RTL)
+-                        name = g_strdup_printf ("%s-rtl", window->priv->icon_name);
+-                else
+-                        name = g_strdup_printf ("%s-ltr", window->priv->icon_name);
+-                pixbuf = load_pixbuf (window, name, icon_size);
+-                g_free (name);
+-                if (pixbuf == NULL)
+-                        return FALSE;
+-        }
+-
+-        gdk_cairo_set_source_pixbuf (cr, pixbuf, _x0, _y0);
+-        cairo_paint_with_alpha (cr, FG_ALPHA);
+-
+-        g_object_unref (pixbuf);
+-
+-        return TRUE;
+-}
+-
+-static void
+-draw_action_custom (GsdMediaKeysWindow *window,
+-                    cairo_t            *cr)
+-{
+-        int window_width;
+-        int window_height;
+-        double icon_box_width;
+-        double icon_box_height;
+-        double icon_box_x0;
+-        double icon_box_y0;
+-        double bright_box_x0;
+-        double bright_box_y0;
+-        double bright_box_width;
+-        double bright_box_height;
+-        gboolean res;
+-
+-        gtk_window_get_size (GTK_WINDOW (window), &window_width, &window_height);
+-
+-        icon_box_width = round (window_width * 0.65);
+-        icon_box_height = round (window_height * 0.65);
+-        bright_box_width = round (icon_box_width);
+-        bright_box_height = round (window_height * 0.05);
+-
+-        icon_box_x0 = (window_width - icon_box_width) / 2;
+-        icon_box_y0 = (window_height - icon_box_height - bright_box_height) / 2;
+-        bright_box_x0 = round (icon_box_x0);
+-        bright_box_y0 = round (icon_box_height + icon_box_y0);
+-
+-#if 0
+-        g_message ("icon box: w=%f h=%f _x0=%f _y0=%f",
+-                   icon_box_width,
+-                   icon_box_height,
+-                   icon_box_x0,
+-                   icon_box_y0);
+-        g_message ("brightness box: w=%f h=%f _x0=%f _y0=%f",
+-                   bright_box_width,
+-                   bright_box_height,
+-                   bright_box_x0,
+-                   bright_box_y0);
+-#endif
+-
+-        res = render_custom (window,
+-                             cr,
+-                             icon_box_x0, icon_box_y0,
+-                             icon_box_width, icon_box_height);
+-        if (! res && g_strcmp0 (window->priv->icon_name, "media-eject") == 0) {
+-                /* draw eject symbol */
+-                draw_eject (cr,
+-                            icon_box_x0, icon_box_y0,
+-                            icon_box_width, icon_box_height);
+-        }
+-
+-        if (window->priv->show_level != FALSE) {
+-                /* draw volume meter */
+-                draw_volume_boxes (window,
+-                                   cr,
+-                                   (double)window->priv->volume_level / 100.0,
+-                                   bright_box_x0,
+-                                   bright_box_y0,
+-                                   bright_box_width,
+-                                   bright_box_height);
+-        }
+-}
+-
+-static void
+-draw_action (GsdMediaKeysWindow *window,
+-             cairo_t            *cr)
+-{
+-        switch (window->priv->action) {
+-        case GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME:
+-                draw_action_volume (window, cr);
+-                break;
+-        case GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM:
+-                draw_action_custom (window, cr);
+-                break;
+-        default:
+-                break;
+-        }
+-}
+-
+-static gboolean
+-on_expose_event (GtkWidget          *widget,
+-                 GdkEventExpose     *event,
+-                 GsdMediaKeysWindow *window)
+-{
+-        cairo_t         *context;
+-        cairo_t         *cr;
+-        cairo_surface_t *surface;
+-        int              width;
+-        int              height;
+-        GtkStyle        *style;
+-        GdkColor         color;
+-        double           r, g, b;
+-
+-        context = gdk_cairo_create (gtk_widget_get_window (widget));
+-
+-        style = gtk_widget_get_style (widget);
+-        cairo_set_operator (context, CAIRO_OPERATOR_SOURCE);
+-        gtk_window_get_size (GTK_WINDOW (widget), &width, &height);
+-
+-        surface = cairo_surface_create_similar (cairo_get_target (context),
+-                                                CAIRO_CONTENT_COLOR_ALPHA,
+-                                                width,
+-                                                height);
+-
+-        if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS) {
+-                goto done;
+-        }
+-
+-        cr = cairo_create (surface);
+-        if (cairo_status (cr) != CAIRO_STATUS_SUCCESS) {
+-                goto done;
+-        }
+-        cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.0);
+-        cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+-        cairo_paint (cr);
+-
+-        /* draw a box */
+-        rounded_rectangle (cr, 1.0, 0.5, 0.5, height / 10, width-1, height-1);
+-        color_reverse (&style->bg[GTK_STATE_NORMAL], &color);
+-        r = (float)color.red / 65535.0;
+-        g = (float)color.green / 65535.0;
+-        b = (float)color.blue / 65535.0;
+-        cairo_set_source_rgba (cr, r, g, b, BG_ALPHA);
+-        cairo_fill_preserve (cr);
+-
+-        color_reverse (&style->text_aa[GTK_STATE_NORMAL], &color);
+-        r = (float)color.red / 65535.0;
+-        g = (float)color.green / 65535.0;
+-        b = (float)color.blue / 65535.0;
+-        cairo_set_source_rgba (cr, r, g, b, BG_ALPHA / 2);
+-        cairo_set_line_width (cr, 1);
+-        cairo_stroke (cr);
+-
+-        /* draw action */
+-        draw_action (window, cr);
+-
+-        cairo_destroy (cr);
+-
+-        /* Make sure we have a transparent background */
+-        cairo_rectangle (context, 0, 0, width, height);
+-        cairo_set_source_rgba (context, 0.0, 0.0, 0.0, 0.0);
+-        cairo_fill (context);
+-
+-        cairo_set_source_surface (context, surface, 0, 0);
+-        cairo_paint_with_alpha (context, window->priv->fade_out_alpha);
+-
+- done:
+-        if (surface != NULL) {
+-                cairo_surface_destroy (surface);
+-        }
+-        cairo_destroy (context);
+-
+-        return FALSE;
+-}
+-
+-static void
+-gsd_media_keys_window_real_show (GtkWidget *widget)
+-{
+-        GsdMediaKeysWindow *window;
+-
+-        if (GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->show) {
+-                GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->show (widget);
+-        }
+-
+-        window = GSD_MEDIA_KEYS_WINDOW (widget);
+-        remove_hide_timeout (window);
+-        add_hide_timeout (window);
+-}
+-
+-static void
+-gsd_media_keys_window_real_hide (GtkWidget *widget)
+-{
+-        GsdMediaKeysWindow *window;
+-
+-        if (GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->hide) {
+-                GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->hide (widget);
+-        }
+-
+-        window = GSD_MEDIA_KEYS_WINDOW (widget);
+-        remove_hide_timeout (window);
+-}
+-
+-static void
+-gsd_media_keys_window_real_realize (GtkWidget *widget)
+-{
+-        GdkColormap *colormap;
+-        GtkAllocation allocation;
+-        GdkBitmap *mask;
+-        cairo_t *cr;
+-
+-        colormap = gdk_screen_get_rgba_colormap (gtk_widget_get_screen (widget));
+-
+-        if (colormap != NULL) {
+-                gtk_widget_set_colormap (widget, colormap);
+-        }
+-
+-        if (GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->realize) {
+-                GTK_WIDGET_CLASS (gsd_media_keys_window_parent_class)->realize (widget);
+-        }
+-
+-        gtk_widget_get_allocation (widget, &allocation);
+-        mask = gdk_pixmap_new (gtk_widget_get_window (widget),
+-                               allocation.width,
+-                               allocation.height,
+-                               1);
+-        cr = gdk_cairo_create (mask);
+-
+-        cairo_set_source_rgba (cr, 1., 1., 1., 0.);
+-        cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
+-        cairo_paint (cr);
+-
+-        /* make the whole window ignore events */
+-        gdk_window_input_shape_combine_mask (gtk_widget_get_window (widget), mask, 0, 0);
+-        g_object_unref (mask);
+-        cairo_destroy (cr);
+-}
+-
+-static void
+-gsd_media_keys_window_class_init (GsdMediaKeysWindowClass *klass)
+-{
+-        GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+-
+-        widget_class->show = gsd_media_keys_window_real_show;
+-        widget_class->hide = gsd_media_keys_window_real_hide;
+-        widget_class->realize = gsd_media_keys_window_real_realize;
+-
+-        g_type_class_add_private (klass, sizeof (GsdMediaKeysWindowPrivate));
+-}
+-
+-gboolean
+-gsd_media_keys_window_is_valid (GsdMediaKeysWindow *window)
+-{
+-        GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (window));
+-        return gdk_screen_is_composited (screen) == window->priv->is_composited;
+-}
+-
+-static void
+-gsd_media_keys_window_init (GsdMediaKeysWindow *window)
+-{
+-        GdkScreen *screen;
+-
+-        window->priv = GSD_MEDIA_KEYS_WINDOW_GET_PRIVATE (window);
+-
+-        screen = gtk_widget_get_screen (GTK_WIDGET (window));
+-
+-        window->priv->is_composited = gdk_screen_is_composited (screen);
+-
+-        if (window->priv->is_composited) {
+-                gdouble scalew, scaleh, scale;
+-                gint size;
+-
+-                gtk_window_set_decorated (GTK_WINDOW (window), FALSE);
+-                gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
+-
+-                /* assume 130x130 on a 640x480 display and scale from there */
+-                scalew = gdk_screen_get_width (screen) / 640.0;
+-                scaleh = gdk_screen_get_height (screen) / 480.0;
+-                scale = MIN (scalew, scaleh);
+-                size = 130 * MAX (1, scale);
+-
+-                gtk_window_set_default_size (GTK_WINDOW (window), size, size);
+-                g_signal_connect (window, "expose-event", G_CALLBACK (on_expose_event), window);
+-
+-                window->priv->fade_out_alpha = 1.0;
+-        } else {
+-                GtkBuilder *builder;
+-                const gchar *objects[] = {"acme_frame", NULL};
+-                GtkWidget *frame;
+-
+-                builder = gtk_builder_new ();
+-		gtk_builder_add_objects_from_string (builder, acme_ui, acme_ui_length, (char **)objects, NULL);
+-
+-                window->priv->image = GTK_IMAGE (gtk_builder_get_object (builder, "acme_image"));
+-                window->priv->progress = GTK_WIDGET (gtk_builder_get_object (builder, "acme_volume_progressbar"));
+-                frame = GTK_WIDGET (gtk_builder_get_object (builder,
+-                                                            "acme_frame"));
+-
+-                if (frame != NULL) {
+-                        gtk_container_add (GTK_CONTAINER (window), frame);
+-                        gtk_widget_show_all (frame);
+-                }
+-
+-                /* The builder needs to stay alive until the window
+-                   takes ownership of the frame (and its children)  */
+-                g_object_unref (builder);
+-        }
+-}
+-
+-GtkWidget *
+-gsd_media_keys_window_new (void)
+-{
+-        GObject *object;
+-
+-        object = g_object_new (GSD_TYPE_MEDIA_KEYS_WINDOW,
+-                               "type", GTK_WINDOW_POPUP,
+-                               "type-hint", GDK_WINDOW_TYPE_HINT_NOTIFICATION,
+-                               "skip-taskbar-hint", TRUE,
+-                               "skip-pager-hint", TRUE,
+-                               "focus-on-map", FALSE,
+-                               NULL);
+-
+-        return GTK_WIDGET (object);
+-}
+--- a/src/gsd-media-keys-window.h
++++ /dev/null
+@@ -1,71 +0,0 @@
+-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8; tab-width: 8 -*-
+- *
+- * Copyright (C) 2006 William Jon McCann <mccann at jhu.edu>
+- *
+- * 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., 59 Temple Place - Suite 330,
+- * Boston, MA 02111-1307, USA.
+- *
+- */
+-
+-#ifndef GSD_MEDIA_KEYS_WINDOW_H
+-#define GSD_MEDIA_KEYS_WINDOW_H
+-
+-#include <glib-object.h>
+-#include <gtk/gtk.h>
+-
+-G_BEGIN_DECLS
+-
+-#define GSD_TYPE_MEDIA_KEYS_WINDOW            (gsd_media_keys_window_get_type ())
+-#define GSD_MEDIA_KEYS_WINDOW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj),  GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindow))
+-#define GSD_MEDIA_KEYS_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),   GSD_TYPE_MEDIA_KEYS_WINDOW, GsdMediaKeysWindowClass))
+-#define GSD_IS_MEDIA_KEYS_WINDOW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj),  GSD_TYPE_MEDIA_KEYS_WINDOW))
+-#define GSD_IS_MEDIA_KEYS_WINDOW_CLASS(klass) (G_TYPE_INSTANCE_GET_CLASS ((klass), GSD_TYPE_MEDIA_KEYS_WINDOW))
+-
+-typedef struct GsdMediaKeysWindow                   GsdMediaKeysWindow;
+-typedef struct GsdMediaKeysWindowClass              GsdMediaKeysWindowClass;
+-typedef struct GsdMediaKeysWindowPrivate            GsdMediaKeysWindowPrivate;
+-
+-struct GsdMediaKeysWindow {
+-        GtkWindow                   parent;
+-
+-        GsdMediaKeysWindowPrivate  *priv;
+-};
+-
+-struct GsdMediaKeysWindowClass {
+-        GtkWindowClass parent_class;
+-};
+-
+-typedef enum {
+-        GSD_MEDIA_KEYS_WINDOW_ACTION_VOLUME,
+-        GSD_MEDIA_KEYS_WINDOW_ACTION_CUSTOM
+-} GsdMediaKeysWindowAction;
+-
+-GType                 gsd_media_keys_window_get_type          (void);
+-
+-GtkWidget *           gsd_media_keys_window_new               (void);
+-void                  gsd_media_keys_window_set_action        (GsdMediaKeysWindow      *window,
+-                                                               GsdMediaKeysWindowAction action);
+-void                  gsd_media_keys_window_set_action_custom (GsdMediaKeysWindow      *window,
+-                                                               const char              *icon_name,
+-                                                               gboolean                 show_level);
+-void                  gsd_media_keys_window_set_volume_muted  (GsdMediaKeysWindow      *window,
+-                                                               gboolean                 muted);
+-void                  gsd_media_keys_window_set_volume_level  (GsdMediaKeysWindow      *window,
+-                                                               int                      level);
+-gboolean              gsd_media_keys_window_is_valid          (GsdMediaKeysWindow      *window);
+-
+-G_END_DECLS
+-
+-#endif
+--- a/src/xfpm-backlight.c
++++ b/src/xfpm-backlight.c
+@@ -42,14 +42,9 @@
+ #include "xfpm-debug.h"
+ #include "xfpm-icons.h"
+ 
+-#include "gsd-media-keys-window.h"
+-
+ static void xfpm_backlight_finalize     (GObject *object);
+ 
+-static void xfpm_backlight_create_popup (XfpmBacklight *backlight);
+-
+ #define ALARM_DISABLED 9
+-#define BRIGHTNESS_POPUP_SIZE	180
+ 
+ #define XFPM_BACKLIGHT_GET_PRIVATE(o) \
+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFPM_TYPE_BACKLIGHT, XfpmBacklightPrivate))
+@@ -63,12 +58,8 @@ struct XfpmBacklightPrivate
+     XfpmButton     *button;
+     XfpmNotify     *notify;
+     
+-    GtkWidget	   *osd;
+     NotifyNotification *n;
+     
+-    
+-    gulong	    destroy_id;
+-    
+     gboolean	    has_hw;
+     gboolean	    on_battery;
+     
+@@ -123,12 +114,6 @@ xfpm_backlight_destroy_popup (gpointer d
+     
+     backlight = XFPM_BACKLIGHT (data);
+     
+-    if ( backlight->priv->osd )
+-    {
+-	gtk_widget_destroy (backlight->priv->osd);
+-	backlight->priv->osd = NULL;
+-    }
+-    
+     if ( backlight->priv->n )
+     {
+ 	g_object_unref (backlight->priv->n);
+@@ -139,120 +124,43 @@ xfpm_backlight_destroy_popup (gpointer d
+ }
+ 
+ static void
+-xfpm_backlight_composited_changed_cb (XfpmBacklight *backlight)
+-{
+-    xfpm_backlight_destroy_popup (backlight);
+-    xfpm_backlight_create_popup (backlight);
+-}
+-
+-static void
+ xfpm_backlight_show_notification (XfpmBacklight *backlight, gfloat value)
+ {
+-    gint i;
+-    
+-    static const char *display_icon_name[] = 
+-    {
+-	"notification-display-brightness-off",
+-	"notification-display-brightness-low",
+-	"notification-display-brightness-medium",
+-	"notification-display-brightness-high",
+-	"notification-display-brightness-full",
+-	NULL
+-    };
+-    
++    gchar *summary;
++
++    /* create the notification on demand */
+     if ( backlight->priv->n == NULL )
+     {
+-	backlight->priv->n = xfpm_notify_new_notification (backlight->priv->notify, 
+-							   " ", 
+-							   "", 
+-							   NULL, 
+-							   0, 
++	backlight->priv->n = xfpm_notify_new_notification (backlight->priv->notify,
++							   "",
++							   "",
++							   "xfpm-brightness-lcd",
++							   0,
+ 							   XFPM_NOTIFY_NORMAL,
+ 							   NULL);
+     }
++
++    /* generate a human-readable summary for the notification */
++    summary = g_strdup_printf (_("Brightness: %.0f percent"), value);
++    notify_notification_update (backlight->priv->n, summary, NULL, NULL);
++    g_free (summary);
+     
+-    i = (gint)value / 25;
+-    
+-    if ( i > 4 || i < 0 )
+-	return;
++    /* add the brightness value to the notification */
++    notify_notification_set_hint_int32 (backlight->priv->n, "value", value);
+     
+-    notify_notification_set_hint_int32  (backlight->priv->n,
+-					 "value",
+-					 value);
+-    
+-    notify_notification_set_hint_string (backlight->priv->n,
+-					 "x-canonical-private-synchronous",
+-					 "brightness");
+-    
+-    notify_notification_update (backlight->priv->n,
+-			        " ",
+-				"",
+-				display_icon_name[i]);
+-				
++    /* show the notification */
+     notify_notification_show (backlight->priv->n, NULL);
+ }
+ 
+ static void
+-xfpm_backlight_create_popup (XfpmBacklight *backlight)
+-{
+-    if ( backlight->priv->osd != NULL )
+-	return;
+-	
+-    backlight->priv->osd = gsd_media_keys_window_new ();
+-    gsd_media_keys_window_set_action_custom (GSD_MEDIA_KEYS_WINDOW (backlight->priv->osd),
+-					     XFPM_DISPLAY_BRIGHTNESS_ICON,
+-					     TRUE);
+-    gtk_window_set_position (GTK_WINDOW (backlight->priv->osd), GTK_WIN_POS_CENTER);
+-    
+-    g_signal_connect_swapped (backlight->priv->osd, "composited-changed",
+-			      G_CALLBACK (xfpm_backlight_composited_changed_cb), backlight);
+-			      
+-}
+-
+-static void
+ xfpm_backlight_show (XfpmBacklight *backlight, gint level)
+ {
+     gfloat value;
+-    gboolean sync_notify;
+-    gboolean show_popup;
+     
+     XFPM_DEBUG ("Level %u", level);
+     
+-    g_object_get (G_OBJECT (backlight->priv->conf),
+-                  SHOW_BRIGHTNESS_POPUP, &show_popup,
+-                  NULL);
+-		  
+-    if ( !show_popup )
+-	goto out;
+-    
+-    g_object_get (G_OBJECT (backlight->priv->notify),
+-		  "sync", &sync_notify,
+-		  NULL);
+-    
+     value = (gfloat) 100 * level / backlight->priv->max_level;
+-    
+-    if ( !sync_notify ) /*Notification server doesn't support sync notifications*/
+-    {
+-	xfpm_backlight_create_popup (backlight);
+-	gsd_media_keys_window_set_volume_level (GSD_MEDIA_KEYS_WINDOW (backlight->priv->osd),
+-						round (value));
+-	if ( !GTK_WIDGET_VISIBLE (backlight->priv->osd))
+-	    gtk_window_present (GTK_WINDOW (backlight->priv->osd));
+-    }
+-    else
+-    {
+-	xfpm_backlight_show_notification (backlight, value);
+-    }
+-    
+-    if ( backlight->priv->destroy_id != 0 )
+-    {
+-	g_source_remove (backlight->priv->destroy_id);
+-	backlight->priv->destroy_id = 0;
+-    }
+-    
+-out:
+-    /* Release the memory after 60 seconds */
+-    backlight->priv->destroy_id = g_timeout_add_seconds (60, (GSourceFunc) xfpm_backlight_destroy_popup, backlight);
++    xfpm_backlight_show_notification (backlight, value);
+ }
+ 
+ 
+@@ -386,7 +294,6 @@ xfpm_backlight_init (XfpmBacklight *back
+     backlight->priv->brightness = xfpm_brightness_new ();
+     backlight->priv->has_hw     = xfpm_brightness_setup (backlight->priv->brightness);
+     
+-    backlight->priv->osd    = NULL;
+     backlight->priv->notify = NULL;
+     backlight->priv->idle   = NULL;
+     backlight->priv->conf   = NULL;
+@@ -394,7 +301,6 @@ xfpm_backlight_init (XfpmBacklight *back
+     backlight->priv->power    = NULL;
+     backlight->priv->dimmed = FALSE;
+     backlight->priv->block = FALSE;
+-    backlight->priv->destroy_id = 0;
+     
+     if ( !backlight->priv->has_hw )
+     {
+--- a/src/xfpm-notify.c
++++ b/src/xfpm-notify.c
+@@ -69,7 +69,7 @@ struct XfpmNotifyPrivate
+     gulong		notify_id;
+     
+     gboolean	        supports_actions;
+-    gboolean		supports_sync; /*For x-canonical-private-synchronous */
++    gboolean		supports_sync; /* For x-canonical-private-synchronous */
+ };
+ 
+ enum
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -6,6 +6,7 @@ settings/xfce4-power-manager-settings.de
+ common/xfpm-common.c
+ src/xfpm-power.c
+ src/xfpm-power-common.c
++src/xfpm-backlight.c
+ src/xfpm-battery.c
+ src/xfpm-battery.c
+ src/xfpm-main.c

Modified: desktop/trunk/xfce4-power-manager/debian/patches/02_translations-fix-invalid-format-strings.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/02_translations-fix-invalid-format-strings.patch	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/02_translations-fix-invalid-format-strings.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,13 +1,15 @@
 Description: Fix incorrect usage of format strings in translations
 Author: Lionel Le Folgoc <lionel at lefolgoc.net>
 Bug-Ubuntu: https://bugs.launchpad.net/bugs/975880
-Forwarded: no
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1054907
+Bug: https://bugzilla.xfce.org/show_bug.cgi?id=8992
+Forwarded: yes, to the coordinator/last translator of each affected language
 
---- xfce4-power-manager-1.0.11.orig/po/kk.po
-+++ xfce4-power-manager-1.0.11/po/kk.po
-@@ -536,16 +536,6 @@ msgstr "Сіздің %s толығыме
+--- xfce4-power-manager-1.0.11.orig/po/te.po
++++ xfce4-power-manager-1.0.11/po/te.po
+@@ -535,16 +535,6 @@ msgstr "మీ %s పూర్తిగà
  msgid "Your %s is charging"
- msgstr "Сіздің %s зарядталуда"
+ msgstr "మీ %s చార్జింగ్ అవుతున్నది"
  
 -#: ../src/xfpm-battery.c:222
 -#, c-format
@@ -16,15 +18,15 @@
 -"%s until is fully charged."
 -msgstr ""
 -"%s\n"
--"Сіздің %s зарядталуда (%i%%).\n"
--"Толық зарядталуға дейін %s қалды."
+-"మీ %s చార్జింగు అవుతున్నది (%i%%)\n"
+-"%s లలో పూర్తిగా చార్జ్ అవుతుంది."
 -
  #: ../src/xfpm-battery.c:230 ../src/xfpm-battery.c:266
  #, c-format
  msgid "Your %s is discharging"
-@@ -556,16 +546,6 @@ msgstr "Сіздің %s өз зарядÑ
+@@ -555,16 +545,6 @@ msgstr "మీ %s డిస్చారà
  msgid "System is running on %s power"
- msgstr "Жүйе %s қорегінен жұмыс істеуде"
+ msgstr "వ్యవస్థ %s విద్యుత్ పై నడుస్తున్నది"
  
 -#: ../src/xfpm-battery.c:242
 -#, c-format
@@ -33,137 +35,39 @@
 -"Estimated time left is %s."
 -msgstr ""
 -"%s\n"
--"Сіздің %s өз зарядын беруде (%i%%)\n"
--"Қалған уақыты шамамен %s."
+-"మీ %s డిస్చార్జ్ అవుతున్నది (%i%%)\n"
+-"ఇంకా మిగిలివున్న సమయం %s."
 -
  #: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
  #, c-format
  msgid "Your %s is empty"
---- xfce4-power-manager-1.0.11.orig/po/ru.po
-+++ xfce4-power-manager-1.0.11/po/ru.po
-@@ -408,16 +408,6 @@ msgstr ""
- msgid "System is running on low power"
- msgstr "Система работает от батареи c низким зарядом "
- 
--#: ../src/xfpm-power.c:955
--#, c-format
--msgid ""
--"Your %s charge level is low\n"
--"Estimated time left %s"
--msgstr ""
--"%s\n"
--"Устройство (%s) разряжается (%i%%)\n"
--"Оставшееся время работы около %s."
--
- #: ../src/xfpm-power.c:1158 ../src/xfpm-power.c:1163
- msgid "Adaptor is offline"
- msgstr "Блок питания отключен от сети"
-@@ -546,16 +536,6 @@ msgstr "Ваше устройство (%
- msgid "Your %s is charging"
- msgstr "Ваше устройство (%s) заряжается "
- 
--#: ../src/xfpm-battery.c:222
--#, c-format
--msgid ""
--"%s (%i%%)\n"
--"%s until is fully charged."
--msgstr ""
--"%s\n"
--"Устройство (%s) заряжается (%i%%)\n"
--"%s до полного заряда."
--
- #: ../src/xfpm-battery.c:230 ../src/xfpm-battery.c:266
- #, c-format
- msgid "Your %s is discharging"
-@@ -566,23 +546,6 @@ msgstr "Ваше устройство (%
- msgid "System is running on %s power"
- msgstr "Система работает от: %s"
- 
--#: ../src/xfpm-battery.c:242
--#, c-format
--msgid ""
--"%s (%i%%)\n"
--"Estimated time left is %s."
--msgstr ""
--"%s\n"
--"Устройство (%s) разряжается (%i%%)\n"
--"Оставшееся время работы около %s."
--
--#: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
--#, c-format
--msgid "Your %s is empty"
--msgstr ""
--"%s\n"
--"Устройство (%s) полностью разряжено"
--
- #: ../src/xfpm-battery.c:408
- #, c-format
- msgid "System is running on battery power"
---- xfce4-power-manager-1.0.11.orig/po/fr.po
-+++ xfce4-power-manager-1.0.11/po/fr.po
-@@ -559,9 +559,8 @@ msgid ""
+--- xfce4-power-manager-1.2.0.orig/po/en_GB.po
++++ xfce4-power-manager-1.2.0/po/en_GB.po
+@@ -548,8 +548,7 @@ msgid ""
  "%s (%i%%)\n"
  "%s until is fully charged."
  msgstr ""
 -"%s\n"
--"Votre %s est en charge (%i%%)\n"
--"%s jusqu'a ce qu'il soit complétement chargé."
+-"Your %s is charging (%i%%)\n"
 +"%s (%i%%)\n"
-+"%s jusqu'a ce qu'il soit complètement chargé."
+ "%s until is fully charged."
  
- #: ../src/xfpm-battery.c:230 ../src/xfpm-battery.c:266
- #, c-format
-@@ -579,8 +578,7 @@ msgid ""
+ #: ../src/xfpm-battery.c:232 ../src/xfpm-battery.c:268
+@@ -568,8 +567,7 @@ msgid ""
  "%s (%i%%)\n"
  "Estimated time left is %s."
  msgstr ""
 -"%s\n"
--"Votre %s est en décharge (%i%%)\n"
+-"Your %s is discharging (%i%%)\n"
 +"%s (%i%%)\n"
- "Temps restant estimé est de %s."
+ "Estimated time left is %s."
  
- #: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
---- xfce4-power-manager-1.0.11.orig/po/te.po
-+++ xfce4-power-manager-1.0.11/po/te.po
-@@ -535,16 +535,6 @@ msgstr "మీ %s పూర్తిగà
- msgid "Your %s is charging"
- msgstr "మీ %s చార్జింగ్ అవుతున్నది"
- 
--#: ../src/xfpm-battery.c:222
--#, c-format
--msgid ""
--"%s (%i%%)\n"
--"%s until is fully charged."
--msgstr ""
--"%s\n"
--"మీ %s చార్జింగు అవుతున్నది (%i%%)\n"
--"%s లలో పూర్తిగా చార్జ్ అవుతుంది."
--
- #: ../src/xfpm-battery.c:230 ../src/xfpm-battery.c:266
- #, c-format
- msgid "Your %s is discharging"
-@@ -555,16 +545,6 @@ msgstr "మీ %s డిస్చారà
- msgid "System is running on %s power"
- msgstr "వ్యవస్థ %s విద్యుత్ పై నడుస్తున్నది"
- 
--#: ../src/xfpm-battery.c:242
--#, c-format
--msgid ""
--"%s (%i%%)\n"
--"Estimated time left is %s."
--msgstr ""
--"%s\n"
--"మీ %s డిస్చార్జ్ అవుతున్నది (%i%%)\n"
--"ఇంకా మిగిలివున్న సమయం %s."
--
- #: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
- #, c-format
- msgid "Your %s is empty"
---- xfce4-power-manager-1.0.11.orig/po/hu.po
-+++ xfce4-power-manager-1.0.11/po/hu.po
-@@ -407,16 +407,6 @@ msgstr ""
+ #: ../src/xfpm-battery.c:250 ../src/xfpm-battery.c:271
+--- xfce4-power-manager-1.2.0.orig/po/tr.po
++++ xfce4-power-manager-1.2.0/po/tr.po
+@@ -408,16 +408,6 @@ msgstr ""
  msgid "System is running on low power"
- msgstr "A rendszer energiaellátása gyenge"
+ msgstr "Sistem düşük güçte çalışıyor"
  
 -#: ../src/xfpm-power.c:955
 -#, c-format
@@ -172,32 +76,15 @@
 -"Estimated time left %s"
 -msgstr ""
 -"%s\n"
--"A(z) %s kisül (%i%%).\n"
--"A becsült hátralévő idő: %s."
+-"%s deÅŸarj oluyor (%i%%)\n"
+-"tahmini kalan süre %s."
 -
  #: ../src/xfpm-power.c:1158 ../src/xfpm-power.c:1163
  msgid "Adaptor is offline"
- msgstr "Az adapter nincs csatlakoztatva"
-@@ -541,16 +531,6 @@ msgstr "A(z) %s teljesen feltöltve"
- msgid "Your %s is charging"
- msgstr "A(z) %s töltődik"
- 
--#: ../src/xfpm-battery.c:222
--#, c-format
--msgid ""
--"%s (%i%%)\n"
--"%s until is fully charged."
--msgstr ""
--"%s\n"
--"A(z) %s töltődik (%i%%)\n"
--"A teljes feltöltésig még %s van."
--
- #: ../src/xfpm-battery.c:230 ../src/xfpm-battery.c:266
- #, c-format
- msgid "Your %s is discharging"
-@@ -561,23 +541,6 @@ msgstr "A(z) %s kisül"
+ msgstr "Adaptör takılı değil"
+@@ -558,16 +548,6 @@ msgstr "%s deÅŸarj oluyor."
  msgid "System is running on %s power"
- msgstr "A rendszer %s  tápellátásról működik"
+ msgstr "Sistem, %s gücüyle çalışıyor."
  
 -#: ../src/xfpm-battery.c:242
 -#, c-format
@@ -206,16 +93,9 @@
 -"Estimated time left is %s."
 -msgstr ""
 -"%s\n"
--"A(z) %s kisül (%i%%).\n"
--"A becsült hátralévő idő: %s."
+-"%s deÅŸarj oluyor (%i%%)\n"
+-"tahmini kalan süre %s."
 -
--#: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
--#, c-format
--msgid "Your %s is empty"
--msgstr ""
--"%s\n"
--"A(z) %s üres"
--
- #: ../src/xfpm-battery.c:408
+ #: ../src/xfpm-battery.c:248 ../src/xfpm-battery.c:269
  #, c-format
- msgid "System is running on battery power"
+ msgid "Your %s is empty"

Added: desktop/trunk/xfce4-power-manager/debian/patches/03_fix-insert-battery.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/03_fix-insert-battery.patch	                        (rev 0)
+++ desktop/trunk/xfce4-power-manager/debian/patches/03_fix-insert-battery.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -0,0 +1,44 @@
+From 6f87cc775b4c72f5708d6582173077b856ba01f5 Mon Sep 17 00:00:00 2001
+From: Henry Gebhardt <hsggebhardt at googlemail.com>
+Date: Wed, 29 Feb 2012 14:14:33 +0100
+Subject: [PATCH] Fix empty systray icon in some panels on battery removal and
+ addition
+
+Unreferencing a GtkStatusIcon is not enough to get rid of it entirely.
+
+This fixes these bugs:
+
+    https://bugzilla.xfce.org/show_bug.cgi?id=7603
+    http://bugzilla.xfce.org/show_bug.cgi?id=8424
+    https://bugs.launchpad.net/ubuntu/+source/lxpanel/+bug/846878
+    https://bugzilla.redhat.com/show_bug.cgi?id=765726
+---
+ src/xfpm-battery.c |    2 ++
+ src/xfpm-power.c   |    1 +
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+Index: xfce4-power-manager/src/xfpm-battery.c
+===================================================================
+--- xfce4-power-manager/src/xfpm-battery.c	2012-03-02 19:25:29.000000000 +0100
++++ xfce4-power-manager/src/xfpm-battery.c	2012-03-02 19:31:07.000000000 +0100
+@@ -782,6 +782,8 @@
+     g_object_unref (battery->priv->notify);
+     g_object_unref (battery->priv->button);
+ 
++    gtk_status_icon_set_visible(GTK_STATUS_ICON(battery), FALSE);
++
+     G_OBJECT_CLASS (xfpm_battery_parent_class)->finalize (object);
+ }
+ 
+Index: xfce4-power-manager/src/xfpm-power.c
+===================================================================
+--- xfce4-power-manager/src/xfpm-power.c	2012-03-02 19:25:29.000000000 +0100
++++ xfce4-power-manager/src/xfpm-power.c	2012-03-02 19:31:07.000000000 +0100
+@@ -1118,6 +1118,7 @@
+      
+     if ( power->priv->adapter_icon )
+     {
++        gtk_status_icon_set_visible (power->priv->adapter_icon, FALSE);
+         g_object_unref (power->priv->adapter_icon);
+         power->priv->adapter_icon = NULL;
+     }

Deleted: desktop/trunk/xfce4-power-manager/debian/patches/03_trap-x-errors.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/03_trap-x-errors.patch	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/03_trap-x-errors.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,25 +0,0 @@
-Subject: Trap X errors when initializing brightness management
-Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=3911
-Bug: https://bugzilla.xfce.org/show_bug.cgi?id=7999
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xfce4-power-manager/+bug/821170
----
- common/xfpm-brightness.c |    5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/common/xfpm-brightness.c
-+++ b/common/xfpm-brightness.c
-@@ -65,10 +65,13 @@
- {
-     XRRPropertyInfo *info;
-     gboolean ret = TRUE;
-+    gint rc;
- 
-+    gdk_error_trap_push ();
-     info = XRRQueryOutputProperty (GDK_DISPLAY (), output, brightness->priv->backlight);
-+    rc = gdk_error_trap_pop ();
-     
--    if (info == NULL) 
-+    if (info == NULL || rc != Success)
-     {
- 	g_warning ("could not get output property");
- 	return FALSE;

Deleted: desktop/trunk/xfce4-power-manager/debian/patches/04_clear-idles-for-removed-batteries.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/04_clear-idles-for-removed-batteries.patch	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/04_clear-idles-for-removed-batteries.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,18 +0,0 @@
-Description: prevent xfpm_battery_notify_idle() being called on a battery that has been removed
-Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=3912
-Bug: https://bugzilla.xfce.org/show_bug.cgi?id=7851
----
- src/xfpm-battery.c |    2 ++
- 1 file changed, 2 insertions(+)
-
---- a/src/xfpm-battery.c
-+++ b/src/xfpm-battery.c
-@@ -763,6 +763,8 @@
- 
-     battery = XFPM_BATTERY (object);
-     
-+    g_idle_remove_by_data (battery);
-+
-     g_free (battery->priv->icon_prefix);
-     
-     dbus_g_proxy_disconnect_signal (battery->priv->proxy, "Changed",

Deleted: desktop/trunk/xfce4-power-manager/debian/patches/05_fix-brightness-key-modifiers.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/05_fix-brightness-key-modifiers.patch	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/05_fix-brightness-key-modifiers.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,17 +0,0 @@
-Description: grab the key with any modifier set
-Origin: other, https://bugzilla.xfce.org/attachment.cgi?id=3762
-Bug: https://bugzilla.xfce.org/show_bug.cgi?id=6549
-
-diff --git a/src/xfpm-button.c b/src/xfpm-button.c
-index d2a92e0..70c07a1 100644
---- a/src/xfpm-button.c
-+++ b/src/xfpm-button.c
-@@ -125,7 +125,7 @@ xfpm_button_grab_keystring (XfpmButton *button, guint keycode)
- {
-     Display *display;
-     guint ret;
--    guint modmask = 0;
-+    guint modmask = AnyModifier;
-     
-     display = GDK_DISPLAY ();
-     

Deleted: desktop/trunk/xfce4-power-manager/debian/patches/06_fix-insert-battery.patch
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/06_fix-insert-battery.patch	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/06_fix-insert-battery.patch	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,40 +0,0 @@
-From 6f87cc775b4c72f5708d6582173077b856ba01f5 Mon Sep 17 00:00:00 2001
-From: Henry Gebhardt <hsggebhardt at googlemail.com>
-Date: Wed, 29 Feb 2012 14:14:33 +0100
-Subject: [PATCH] Fix empty systray icon in some panels on battery removal and
- addition
-
-Unreferencing a GtkStatusIcon is not enough to get rid of it entirely.
-
-This fixes these bugs:
-
-    https://bugzilla.xfce.org/show_bug.cgi?id=7603
-    http://bugzilla.xfce.org/show_bug.cgi?id=8424
-    https://bugs.launchpad.net/ubuntu/+source/lxpanel/+bug/846878
-    https://bugzilla.redhat.com/show_bug.cgi?id=765726
----
- src/xfpm-battery.c |    2 ++
- src/xfpm-power.c   |    1 +
- 2 files changed, 3 insertions(+), 0 deletions(-)
-
---- a/src/xfpm-battery.c
-+++ b/src/xfpm-battery.c
-@@ -782,6 +782,8 @@ xfpm_battery_finalize (GObject *object)
-     g_object_unref (battery->priv->notify);
-     g_object_unref (battery->priv->button);
- 
-+    gtk_status_icon_set_visible(GTK_STATUS_ICON(battery), FALSE);
-+
-     G_OBJECT_CLASS (xfpm_battery_parent_class)->finalize (object);
- }
- 
---- a/src/xfpm-power.c
-+++ b/src/xfpm-power.c
-@@ -1114,6 +1114,7 @@ xfpm_power_hide_adapter_icon (XfpmPower
-      
-     if ( power->priv->adapter_icon )
-     {
-+        gtk_status_icon_set_visible (power->priv->adapter_icon, FALSE);
-         g_object_unref (power->priv->adapter_icon);
-         power->priv->adapter_icon = NULL;
-     }

Modified: desktop/trunk/xfce4-power-manager/debian/patches/series
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/patches/series	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/patches/series	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,5 +1,3 @@
+01_Remove_custom_OSD_brightness_popup,_use_libnotify_instead.patch
 02_translations-fix-invalid-format-strings.patch
-03_trap-x-errors.patch
-04_clear-idles-for-removed-batteries.patch
-05_fix-brightness-key-modifiers.patch
-06_fix-insert-battery.patch
+03_fix-insert-battery.patch

Modified: desktop/trunk/xfce4-power-manager/debian/rules
===================================================================
--- desktop/trunk/xfce4-power-manager/debian/rules	2013-05-21 22:41:52 UTC (rev 7485)
+++ desktop/trunk/xfce4-power-manager/debian/rules	2013-05-21 22:45:13 UTC (rev 7486)
@@ -1,8 +1,12 @@
 #!/usr/bin/make -f
 
 export DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,--as-needed -Wl,-O1
-export DEB_BUILD_MAINT_OPTIONS=hardening=+pie,+bindnow
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
+override_dh_auto_configure:
+	NOCONFIGURE=1 xdt-autogen
+	dh_auto_configure
+
 override_dh_install:
 	dh_install --fail-missing
 




More information about the Pkg-xfce-commits mailing list