[arch-commits] CVS update of extra/gnome/gnome-power-manager (4 files)

Jan de Groot jgc at archlinux.org
Sun Apr 22 16:33:43 UTC 2007


    Date: Sunday, April 22, 2007 @ 12:33:43
  Author: jgc
    Path: /home/cvs-extra/extra/gnome/gnome-power-manager

   Added: gnome-power-manager-2.17.92-tray-kde.patch (1.1)
          gpm-icon.patch (1.1)
Modified: PKGBUILD (1.8 -> 1.9) gnome-power-manager.install (1.3 -> 1.4)

upgpkg: gnome-power-manager 2.18.2-2
Fix tray icon, add patches to fix it with KDE also, move to /usr


--------------------------------------------+
 PKGBUILD                                   |   42 +++++------
 gnome-power-manager-2.17.92-tray-kde.patch |   15 ++++
 gnome-power-manager.install                |   14 +--
 gpm-icon.patch                             |  100 +++++++++++++++++++++++++++
 4 files changed, 143 insertions(+), 28 deletions(-)


Index: extra/gnome/gnome-power-manager/PKGBUILD
diff -u extra/gnome/gnome-power-manager/PKGBUILD:1.8 extra/gnome/gnome-power-manager/PKGBUILD:1.9
--- extra/gnome/gnome-power-manager/PKGBUILD:1.8	Mon Apr  9 16:46:00 2007
+++ extra/gnome/gnome-power-manager/PKGBUILD	Sun Apr 22 12:33:43 2007
@@ -1,39 +1,39 @@
-# $Id: PKGBUILD,v 1.8 2007/04/09 20:46:00 jgc Exp $
+# $Id: PKGBUILD,v 1.9 2007/04/22 16:33:43 jgc Exp $
 # Maintainer: Jan de Groot <jgc at archlinux.org>
 
 pkgname=gnome-power-manager
 pkgver=2.18.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system."
 arch=(i686 x86_64)
 url="http://www.gnome.org/projects/gnome-power-manager/"
 license=('GPL')
-depends=('libnotify>=0.4.4' 'gnome-panel>=2.18.0')
+depends=('libnotify>=0.4.4' 'gnome-panel>=2.18.1' 'scrollkeeper')
 makedepends=('gettext' 'perlxml' 'pkgconfig')
 install=gnome-power-manager.install
 groups=(gnome-extra)
-source=(http://ftp.gnome.org/pub/GNOME/sources/gnome-power-manager/2.18/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('0f8412b9c6d800886d2ba479a47c73ea')
+source=(http://ftp.gnome.org/pub/GNOME/sources/gnome-power-manager/2.18/${pkgname}-${pkgver}.tar.bz2
+        gnome-power-manager-2.17.92-tray-kde.patch
+	gpm-icon.patch)
+md5sums=('0f8412b9c6d800886d2ba479a47c73ea' 'ae15a1b3b6bb45b999175d2414710115'
+         '6d0e3dc50d7800b9ebbda6e2e13e598b')
 
 build() {
-  [ -z "${GNOMEDIR}" ] && . /etc/profile.d/gnome.sh
   cd ${startdir}/src/${pkgname}-${pkgver}
-  ./configure --prefix=/opt/gnome \
-  --with-dpms-ext \
-  --disable-scrollkeeper \
-  --with-dbus-sys=/etc/dbus-1/system.d \
-  --with-dbus-services=/usr/share/dbus-1/services \
-  --with-x \
-  --disable-icon-framing \
-  --enable-xevents \
-  --enable-applets
+  patch -Np0 -i ${startdir}/src/gpm-icon.patch || return 1
+  patch -Np0 -i ${startdir}/src/gnome-power-manager-2.17.92-tray-kde.patch || return 1
+
+  ./configure --prefix=/usr --sysconfdir=/etc \
+              --localstatedir=/var \
+	      --with-dpms-ext \
+              --disable-scrollkeeper \
+              --with-dbus-sys=/etc/dbus-1/system.d \
+              --with-dbus-services=/usr/share/dbus-1/services \
+              --enable-applets
   make || return 1
   make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install
 
-  mkdir -p ${startdir}/pkg/opt/gnome/share/gconf/schemas
-  gconf-merge-schema ${startdir}/pkg/opt/gnome/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/opt/gnome/etc/gconf/schemas/*.schemas
-  rm -f ${startdir}/pkg/opt/gnome/etc/gconf/schemas/*.schemas
-
-  mkdir -p ${startdir}/pkg/usr/share
-  mv ${startdir}/pkg/opt/gnome/share/icons ${startdir}/pkg/usr/share/
+  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
+  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/etc/gconf/schemas/*.schemas
+  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas
 } 
Index: extra/gnome/gnome-power-manager/gnome-power-manager-2.17.92-tray-kde.patch
diff -u /dev/null extra/gnome/gnome-power-manager/gnome-power-manager-2.17.92-tray-kde.patch:1.1
--- /dev/null	Sun Apr 22 12:33:43 2007
+++ extra/gnome/gnome-power-manager/gnome-power-manager-2.17.92-tray-kde.patch	Sun Apr 22 12:33:43 2007
@@ -0,0 +1,15 @@
+--- src/gpm-tray-icon.c	(révision 1934)
++++ src/gpm-tray-icon.c	(copie de travail)
+@@ -447,8 +447,10 @@ 
+ {
+ 	g_return_if_fail (GPM_IS_TRAY_ICON (icon));
+ 
+-	gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), enabled);
+-	icon->priv->is_visible = enabled != FALSE;
++	if (enabled != icon->priv->is_visible) {
++		gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), enabled);
++		icon->priv->is_visible = enabled != FALSE;
++	}
+ }
+ 
+ /**
Index: extra/gnome/gnome-power-manager/gnome-power-manager.install
diff -u extra/gnome/gnome-power-manager/gnome-power-manager.install:1.3 extra/gnome/gnome-power-manager/gnome-power-manager.install:1.4
--- extra/gnome/gnome-power-manager/gnome-power-manager.install:1.3	Fri Mar 23 14:02:38 2007
+++ extra/gnome/gnome-power-manager/gnome-power-manager.install	Sun Apr 22 12:33:43 2007
@@ -1,9 +1,8 @@
 pkgname=gnome-power-manager
 
 post_install() {
-  export GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source`
-  opt/gnome/bin/gconftool-2 --makefile-install-rule opt/gnome/share/gconf/schemas/${pkgname}.schemas >/dev/null
-  update-desktop-database -q
+  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
+  usr/bin/gconftool-2 --makefile-install-rule usr/share/gconf/schemas/${pkgname}.schemas >/dev/null
   scrollkeeper-update -q -p var/lib/scrollkeeper
   gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
 }
@@ -17,18 +16,19 @@
 }
 
 pre_remove() {
-  if [ -f opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
+  if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then
+    schemas=(usr/share/gconf/schemas/${pkgname}.schemas)
+  elif [ -f opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
     schemas=(opt/gnome/share/gconf/schemas/${pkgname}.schemas)
   else
     schemas=(`pacman -Ql $pkgname | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`)
   fi
-  export GCONF_CONFIG_SOURCE=`opt/gnome/bin/gconftool-2 --get-default-source`
+  export GCONF_CONFIG_SOURCE=`usr/bin/gconftool-2 --get-default-source`
   
-  opt/gnome/bin/gconftool-2 --makefile-uninstall-rule ${schemas[@]} >/dev/null
+  usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas[@]} >/dev/null
 }
 
 post_remove() {
-  update-desktop-database -q
   scrollkeeper-update -q -p var/lib/scrollkeeper
   gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
 }
Index: extra/gnome/gnome-power-manager/gpm-icon.patch
diff -u /dev/null extra/gnome/gnome-power-manager/gpm-icon.patch:1.1
--- /dev/null	Sun Apr 22 12:33:43 2007
+++ extra/gnome/gnome-power-manager/gpm-icon.patch	Sun Apr 22 12:33:43 2007
@@ -0,0 +1,100 @@
+Index: src/gpm-tray-icon.c
+===================================================================
+--- src/gpm-tray-icon.c	(révision 1934)
++++ src/gpm-tray-icon.c	(copie de travail)
+@@ -125,6 +125,21 @@
+ }
+ 
+ /**
++ * gpm_tray_icon_show:
++ * @icon: This TrayIcon class instance
++ * @enabled: If we should show the tray
++ **/
++static void
++gpm_tray_icon_show (GpmTrayIcon *icon,
++		    gboolean     enabled)
++{
++	g_return_if_fail (GPM_IS_TRAY_ICON (icon));
++
++	gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), enabled);
++	icon->priv->is_visible = enabled != FALSE;
++}
++
++/**
+  * gpm_tray_icon_set_tooltip:
+  * @icon: This TrayIcon class instance
+  * @tooltip: The tooltip text, e.g. "Batteries fully charged"
+@@ -160,14 +175,18 @@
+ 		if (strcmp (icon->priv->stock_id, stock_id) != 0) {
+ 			gpm_debug ("Setting icon to %s", stock_id);
+ 			gtk_status_icon_set_from_icon_name (GTK_STATUS_ICON (icon->priv->status_icon), stock_id);
+-			gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), TRUE);
+ 			/* don't keep trying to set the same icon */
+ 		        g_free (icon->priv->stock_id);
+ 			icon->priv->stock_id = g_strdup (stock_id);
+ 		}
++		/* make sure that we are visible */
++		gpm_tray_icon_show (icon, TRUE);
+ 	} else {
+-		/* get rid of the icon */
+-		gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), FALSE);
++		/* remove icon */
++		gpm_debug ("no icon will be displayed");
++
++		/* make sure that we are hidden */
++		gpm_tray_icon_show (icon, FALSE);
+ 	}
+ }
+ 
+@@ -437,21 +456,6 @@
+ }
+ 
+ /**
+- * gpm_tray_icon_show:
+- * @icon: This TrayIcon class instance
+- * @enabled: If we should show the tray
+- **/
+-static void
+-gpm_tray_icon_show (GpmTrayIcon *icon,
+-		    gboolean     enabled)
+-{
+-	g_return_if_fail (GPM_IS_TRAY_ICON (icon));
+-
+-	gtk_status_icon_set_visible (GTK_STATUS_ICON (icon->priv->status_icon), enabled);
+-	icon->priv->is_visible = enabled != FALSE;
+-}
+-
+-/**
+  * gpm_tray_icon_popup_menu_cb:
+  *
+  * Display the popup menu.
+@@ -762,14 +766,12 @@
+ 
+ 	gpm_debug ("Going to use stock id: %s", stock_id);
+ 
++	gpm_tray_icon_set_image_from_stock (icon, stock_id);
++
+ 	/* only create if we have a valid filename */
+ 	if (stock_id) {
+ 		gchar *tooltip = NULL;
+ 
+-		gpm_tray_icon_set_image_from_stock (icon, stock_id);
+-		/* make sure that we are visible */
+-		gpm_tray_icon_show (icon, TRUE);
+-
+ 		gpm_debug ("emitting description-changed %s", stock_id);
+ 		g_signal_emit (icon, signals [DESCRIPTION_CHANGED], 0, stock_id);
+ 		g_free (stock_id);
+@@ -778,12 +780,6 @@
+ 
+ 		gpm_tray_icon_set_tooltip (icon, tooltip);
+ 		g_free (tooltip);
+-	} else {
+-		/* remove icon */
+-		gpm_debug ("no icon will be displayed");
+-
+-		/* make sure that we are hidden */
+-		gpm_tray_icon_show (icon, FALSE);
+ 	}
+ }
+ 




More information about the arch-commits mailing list