diff options
Diffstat (limited to 'community/awn-extras-applets')
10 files changed, 0 insertions, 1045 deletions
diff --git a/community/awn-extras-applets/PKGBUILD b/community/awn-extras-applets/PKGBUILD deleted file mode 100644 index 7ce9fca85..000000000 --- a/community/awn-extras-applets/PKGBUILD +++ /dev/null @@ -1,89 +0,0 @@ -# Maintainer: György Balló <ballogy@freestart.hu> -# Contributor: Biru Ionut <ionut@archlinux.ro> -# Contributor: Jonathan Liu <net147@hotmail.com> -# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> - -pkgname=awn-extras-applets -_pkgname=awn-extras -pkgver=0.4.0 -pkgrel=15 -pkgdesc="Collection of applets for avant-window-navigator" -arch=('i686' 'x86_64') -url="https://launchpad.net/awn-extras" -license=('GPL') -depends=('avant-window-navigator' 'python2-notify' 'vte' 'gnome-menus' 'gnome-menus2' 'webkitgtk2') -makedepends=('intltool' 'vala') -optdepends=('python2-feedparser: comics, feeds, mail applets' - 'python2-rsvg: comics, cairo-clock, hardware-sensors applets' - 'gstreamer0.10-python: media-player, volume-control applets' - 'python2-dateutil: cairo-clock (optional), calendar applets' - 'python2-gdata: calendar applet' - 'python2-vobject: calendar applet' - 'python2-pyinotify: thinkhdaps applet (optional)' - 'python2-libgnome: stacks applet' - 'python2-gnomedesktop: stacks applet' - 'python2-wnck: slickswitcher applet' - 'fortune-mod: animal-farm applet' - 'upower: battery applet' - 'gnome-applets: cpufreq applet' - 'hddtemp: hardware-sensors applet (optional)' - 'lm_sensors: hardware-sensors applet (optional)') -options=('!libtool') -install=$pkgname.install -source=(http://launchpad.net/$_pkgname/0.4/$pkgver/+download/$_pkgname-$pkgver.tar.gz - awn-extras-libnotify0.7.patch - remove-settings-menu.patch - add-battery-upower-support.patch - fix-shinyswitcher-scrolling.patch - fix-weather-applet.patch - awn-extras-glib2.32.patch - cairo-menu-upower.patch - check-dependencies.patch) -md5sums=('b559d68cd6ad295c961c20fcc5d9f9c0' - '2df8dfd8f0f1d458c09b56983c7d049f' - '52f8ce6a4eca862b0740e29a84db8ae5' - '26b56106b63b14ba3c99f1a2e96da05d' - '755c57dfbb65a314f247277918ec95ac' - 'bc22bb3e81aca0f651ae8acee1ce2f00' - '1cfcd1e5dc92c4c7c306472d42a21c2d' - 'f9715f531947967d6549a358ea8d2979' - '8f920c7dde987d66eef7d3739df1051d') - -build() { - cd "$srcdir/$_pkgname-$pkgver" - patch -Np1 -i "$srcdir/awn-extras-libnotify0.7.patch" - patch -Np1 -i "$srcdir/remove-settings-menu.patch" - patch -Np0 -i "$srcdir/add-battery-upower-support.patch" - patch -Np0 -i "$srcdir/fix-shinyswitcher-scrolling.patch" - patch -Np1 -i "$srcdir/fix-weather-applet.patch" - patch -Np0 -i "$srcdir/awn-extras-glib2.32.patch" - patch -Np1 -i "$srcdir/cairo-menu-upower.patch" - patch -Np1 -i "$srcdir/check-dependencies.patch" - - # Python2 fix - find . -type f -name *.py | xargs sed -i 's@^#.*python$@#!/usr/bin/python2@' - sed -i 's/async(\"python \"/async(\"python2 \"/' applets/maintained/shiny-switcher/shinyswitcherapplet.c - - ./configure --prefix=/usr --sysconfdir=/etc \ - --disable-static \ - --disable-pymod-checks \ - --with-webkit \ - PYTHON=/usr/bin/python2 - make -} - -package() { - cd "$srcdir/$_pkgname-$pkgver" - - make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="$pkgdir" install - - mkdir -p "$pkgdir/usr/share/gconf/schemas" - gconf-merge-schema "$pkgdir/usr/share/gconf/schemas/awn-extras.schemas" "$pkgdir"/etc/gconf/schemas/*.schemas - rm -r "$pkgdir"/etc - - # Remove bandwidth-monitor applet, because it's not compatible with latest netstat - rm -R "$pkgdir"/usr/share/avant-window-navigator/applets/bandwidth-monitor* - - # Remove pandora applet, because gtkmozembed is not available - rm -R "$pkgdir"/usr/share/avant-window-navigator/applets/pandora* -} diff --git a/community/awn-extras-applets/add-battery-upower-support.patch b/community/awn-extras-applets/add-battery-upower-support.patch deleted file mode 100644 index 0548df758..000000000 --- a/community/awn-extras-applets/add-battery-upower-support.patch +++ /dev/null @@ -1,200 +0,0 @@ -=== modified file 'applets/maintained/battery/battery.py' ---- applets/maintained/battery/battery.py 2010-08-12 19:00:37 +0000 -+++ applets/maintained/battery/battery.py 2010-09-12 22:24:21 +0000 -@@ -1,6 +1,6 @@ - #!/usr/bin/python - # Copyright (c) 2007 - 2008 Randal Barlow <im.tehk at gmail.com> --# 2008 - 2009 onox <denkpadje@gmail.com> -+# 2008 - 2010 onox <denkpadje@gmail.com> - # - # This library is free software; you can redistribute it and/or - # modify it under the terms of the GNU Lesser General Public -@@ -223,11 +223,11 @@ - return - - charge_percentage = self.backend.get_capacity_percentage() -- -- charge_message = "Computer running on %s power" % ("AC", "battery")[self.backend.is_discharging()] -+ power_type = "AC" if self.backend.is_on_ac_power() else "battery" -+ charge_message = "Computer running on %s power" % power_type - - if self.backend.is_charged(): -- charge_message += "\nBattery charged" -+ charge_message += "\n" + "Battery charged" - icon = os.path.join(themes_dir, self.settings["theme"], "battery-charged.svg") - else: - is_charging = self.backend.is_charging() -@@ -343,6 +343,148 @@ - return self.get_remaining_capacity() <= self.get_warning_capacity() - - -+class UPowerBackend(AbstractBackend): -+ -+ """Backend that uses UPower via DBus. -+ -+ Reference: http://upower.freedesktop.org/docs/Device.html -+ -+ """ -+ -+ device_iface_name = "org.freedesktop.UPower.Device" -+ -+ devices = None -+ -+ def __init__(self): -+ self.__system_bus = dbus.SystemBus() -+ -+ self.udi = UPowerBackend.get_batteries().keys()[0] -+ self.__set_dbus_interface(self.udi) -+ -+ @staticmethod -+ def backend_useable(): -+ return dbus is not None and len(UPowerBackend.get_batteries()) > 0 -+ -+ @staticmethod -+ def get_batteries(): -+ udi_models = {} -+ -+ try: -+ system_bus = dbus.SystemBus() -+ -+ proxy = system_bus.get_object("org.freedesktop.UPower", "/org/freedesktop/UPower") -+ interface = dbus.Interface(proxy, "org.freedesktop.UPower") -+ -+ UPowerBackend.devices = list(interface.EnumerateDevices()) -+ -+ for udi in UPowerBackend.devices: -+ device_iface = UPowerBackend.__get_dbus_interface(system_bus, udi) -+ -+ # Type 2 is battery (1 is AC, 3 is UPS) -+ device_type = int(UPowerBackend.__get_property(device_iface, "Type")) -+ is_present = bool(UPowerBackend.__get_property(device_iface, "IsPresent")) -+ -+ if device_type == 2 and is_present: -+ udi_models[str(udi)] = str(UPowerBackend.__get_property(device_iface, "Model")) -+ except dbus.DBusException, e: -+ print e.message -+ finally: -+ return udi_models -+ -+ def set_active_udi(self, udi): -+ udi_models = UPowerBackend.get_batteries() -+ -+ assert udi in udi_models -+ -+ self.udi = udi -+ self.__set_dbus_interface(udi) -+ -+ @staticmethod -+ def __get_dbus_interface(system_bus, udi): -+ proxy = system_bus.get_object("org.freedesktop.UPower", udi) -+ return dbus.Interface(proxy, "org.freedesktop.DBus.Properties") -+ -+ def __set_dbus_interface(self, udi): -+ self.__battery = UPowerBackend.__get_dbus_interface(self.__system_bus, udi) -+ -+ @staticmethod -+ def __get_property(interface, property_name): -+ return interface.Get(UPowerBackend.device_iface_name, property_name) -+ -+ def get_active_udi(self): -+ return self.udi -+ -+ def is_present(self): -+ return bool(UPowerBackend.__get_property(self.__battery, "IsPresent")) -+ -+ def is_charging(self): -+ # State 1 is charging -+ return int(UPowerBackend.__get_property(self.__battery, "State")) == 1 -+ -+ def is_discharging(self): -+ # State 2 is discharging -+ return int(UPowerBackend.__get_property(self.__battery, "State")) == 2 -+ -+ def get_last_full_capacity(self): -+ # Measured in Wh -+ return int(UPowerBackend.__get_property(self.__battery, "EnergyFull")) -+ -+ def get_remaining_capacity(self): -+ # Measured in Wh -+ return int(UPowerBackend.__get_property(self.__battery, "Energy")) -+ -+ def get_charge_rate(self): -+ # Measured in W. Original value positive if being discharged, negative if being charged -+ return abs(int(UPowerBackend.__get_property(self.__battery, "EnergyRate"))) -+ -+ def get_capacity_percentage(self): -+ # Percentage in range 0 .. 100 -+ return int(UPowerBackend.__get_property(self.__battery, "Percentage")) -+ -+ def get_warning_capacity(self): -+ # Measured in Wh -+ return int(int(UPowerBackend.__get_property(self.__battery, "EnergyFullDesign")) * (warning_percentage / 100.)) -+ -+ def get_charge_time(self): -+ assert self.is_charging() -+ -+ # Charge time in seconds -+ time = int(UPowerBackend.__get_property(self.__battery, "TimeToFull")) -+ -+ if time == 0: -+ return super(UPowerBackend, self).get_charge_time() -+ -+ hours = time / 3600 -+ seconds = time % 3600 -+ return (hours, int(round(seconds / 60.0))) -+ -+ def get_remaining_time(self): -+ assert self.is_discharging() -+ -+ # Discharge time in seconds -+ time = int(UPowerBackend.__get_property(self.__battery, "TimeToEmpty")) -+ -+ if time == 0: -+ return super(UPowerBackend, self).get_discharge_time() -+ -+ hours = time / 3600 -+ seconds = time % 3600 -+ return (hours, int(round(seconds / 60.0))) -+ -+ def is_charged(self): -+ # State 4 is fully charged -+ return int(UPowerBackend.__get_property(self.__battery, "State")) == 4 -+ -+ def is_on_ac_power(self): -+ for udi in UPowerBackend.devices: -+ device_iface = UPowerBackend.__get_dbus_interface(self.__system_bus, udi) -+ -+ # Property "Online" only has a value for AC power device -+ if bool(UPowerBackend.__get_property(device_iface, "Online")): -+ return True -+ return False -+ -+ - class HalBackend(AbstractBackend): - - """Backend that uses HAL via DBus. -@@ -372,7 +514,7 @@ - return udi_models - except dbus.DBusException, e: - print e.message -- return {} -+ return udi_models - - def set_active_udi(self, udi): - udi_models = HalBackend.get_batteries() -@@ -416,8 +558,12 @@ - except dbus.DBusException: - return int(int(self.__hal_battery.GetProperty("battery.charge_level.design")) * (warning_percentage / 100.)) - -- --backends = [HalBackend] -+ def is_on_ac_power(self): -+ # TODO Should check that _all_ batteries are not discharging -+ return not self.is_discharging() -+ -+ -+backends = [UPowerBackend, HalBackend] - - - if __name__ == "__main__": - diff --git a/community/awn-extras-applets/awn-extras-applets.install b/community/awn-extras-applets/awn-extras-applets.install deleted file mode 100644 index 9f04bf6a2..000000000 --- a/community/awn-extras-applets/awn-extras-applets.install +++ /dev/null @@ -1,23 +0,0 @@ -pkgname=awn-extras - -post_install() { - gconfpkg --install $pkgname - xdg-icon-resource forceupdate -} - -pre_upgrade() { - pre_remove $1 -} - -post_upgrade() { - post_install $1 -} - - -pre_remove() { - gconfpkg --uninstall $pkgname -} - -post_remove() { - xdg-icon-resource forceupdate -} diff --git a/community/awn-extras-applets/awn-extras-glib2.32.patch b/community/awn-extras-applets/awn-extras-glib2.32.patch deleted file mode 100644 index 563d73b56..000000000 --- a/community/awn-extras-applets/awn-extras-glib2.32.patch +++ /dev/null @@ -1,226 +0,0 @@ -=== modified file 'applets/maintained/awnterm/keybinder.h' ---- applets/maintained/awnterm/keybinder.h 2009-12-04 15:32:54 +0000 -+++ applets/maintained/awnterm/keybinder.h 2012-04-28 13:17:10 +0000 -@@ -24,7 +24,7 @@ - #ifndef __AWN_KEY_BINDER_H__ - #define __AWN_KEY_BINDER_H__ - --#include <glib/gtypes.h> -+#include <glib.h> - - G_BEGIN_DECLS - - -=== modified file 'applets/maintained/notification-daemon/daemon.h' ---- applets/maintained/notification-daemon/daemon.h 2009-11-18 20:13:53 +0000 -+++ applets/maintained/notification-daemon/daemon.h 2012-04-28 13:17:10 +0000 -@@ -31,8 +31,6 @@ - - #include <libawn/awn-applet.h> - #include <libawn/awn-applet-simple.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-cairo-utils.h> - -=== modified file 'applets/maintained/notification-daemon/engines.c' ---- applets/maintained/notification-daemon/engines.c 2010-04-10 17:06:17 +0000 -+++ applets/maintained/notification-daemon/engines.c 2012-04-28 13:17:10 +0000 -@@ -38,8 +38,7 @@ - - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> -@@ -50,7 +49,6 @@ - - #include <string.h> - #include <gtk/gtk.h> --#include <glib.h> - #ifndef HAVE_GTK_URL_LABEL - #include <libsexy/sexy-url-label.h> - #endif - -=== modified file 'applets/unmaintained/awnsystemmonitor/awnsystemmonitor.h' ---- applets/unmaintained/awnsystemmonitor/awnsystemmonitor.h 2009-04-22 03:44:36 +0000 -+++ applets/unmaintained/awnsystemmonitor/awnsystemmonitor.h 2012-04-28 13:17:10 +0000 -@@ -25,7 +25,7 @@ - //#include <libawn/awn-title.h> - #include <libawn/awn-tooltip.h> - --#include <glib/gtypes.h> -+#include <glib.h> - #include <glibtop/cpu.h> - #include <gconf/gconf-client.h> - - -=== modified file 'applets/unmaintained/awnsystemmonitor/awntop_cairo_component.c' ---- applets/unmaintained/awnsystemmonitor/awntop_cairo_component.c 2010-04-01 14:25:40 +0000 -+++ applets/unmaintained/awnsystemmonitor/awntop_cairo_component.c 2012-04-28 13:17:10 +0000 -@@ -43,13 +43,11 @@ - - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - - - -=== modified file 'applets/unmaintained/awnsystemmonitor/cpu_component.c' ---- applets/unmaintained/awnsystemmonitor/cpu_component.c 2009-08-27 20:20:33 +0000 -+++ applets/unmaintained/awnsystemmonitor/cpu_component.c 2012-04-28 13:17:10 +0000 -@@ -18,13 +18,11 @@ - */ - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - #include <gdk/gdk.h> - #include <string.h> - -=== modified file 'applets/unmaintained/awnsystemmonitor/cpumetergconf.c' ---- applets/unmaintained/awnsystemmonitor/cpumetergconf.c 2009-04-22 03:44:36 +0000 -+++ applets/unmaintained/awnsystemmonitor/cpumetergconf.c 2012-04-28 13:17:10 +0000 -@@ -20,13 +20,10 @@ - * Boston, MA 02111-1307, USA. - */ - #include <string.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> - #include <gconf/gconf-value.h> - - #include "cairo-utils.h" - -=== modified file 'applets/unmaintained/awnsystemmonitor/dashboard.h' ---- applets/unmaintained/awnsystemmonitor/dashboard.h 2009-04-22 03:44:36 +0000 -+++ applets/unmaintained/awnsystemmonitor/dashboard.h 2012-04-28 13:17:10 +0000 -@@ -23,13 +23,11 @@ - - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - - #include <glibtop/mem.h> - -=== modified file 'applets/unmaintained/awnsystemmonitor/date_time_component.c' ---- applets/unmaintained/awnsystemmonitor/date_time_component.c 2009-07-07 20:10:17 +0000 -+++ applets/unmaintained/awnsystemmonitor/date_time_component.c 2012-04-28 13:17:10 +0000 -@@ -19,13 +19,11 @@ - - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - #include <gdk/gdk.h> - #include <string.h> - -=== modified file 'applets/unmaintained/awnsystemmonitor/loadavg_component.c' ---- applets/unmaintained/awnsystemmonitor/loadavg_component.c 2009-07-07 20:10:17 +0000 -+++ applets/unmaintained/awnsystemmonitor/loadavg_component.c 2012-04-28 13:17:10 +0000 -@@ -19,13 +19,11 @@ - - #include <glibtop/loadavg.h> - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - #include <gdk/gdk.h> - #include <string.h> - -=== modified file 'applets/unmaintained/awnsystemmonitor/sysmem_component.c' ---- applets/unmaintained/awnsystemmonitor/sysmem_component.c 2009-08-27 20:20:33 +0000 -+++ applets/unmaintained/awnsystemmonitor/sysmem_component.c 2012-04-28 13:17:10 +0000 -@@ -19,13 +19,11 @@ - - #include <glibtop/mem.h> - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - #include <gtk/gtk.h> - #include <gdk/gdk.h> - #include <string.h> - -=== modified file 'applets/unmaintained/awnsystemmonitor/uptime_component.c' ---- applets/unmaintained/awnsystemmonitor/uptime_component.c 2009-07-07 20:10:17 +0000 -+++ applets/unmaintained/awnsystemmonitor/uptime_component.c 2012-04-28 13:17:10 +0000 -@@ -1,12 +1,10 @@ - - #include <libawn/awn-applet.h> --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <gconf/gconf-value.h> - - #include <libawn/awn-dialog.h> - #include <libawn/awn-applet-simple.h> --#include <glib.h> - - #include <glibtop/uptime.h> - #include <glibtop/cpu.h> - -=== modified file 'applets/unmaintained/main-menu/applet.c' ---- applets/unmaintained/main-menu/applet.c 2011-12-28 11:09:45 +0000 -+++ applets/unmaintained/main-menu/applet.c 2012-04-28 13:17:10 +0000 -@@ -23,8 +23,7 @@ - - #include <string.h> - --#include <glib/gmacros.h> --#include <glib/gerror.h> -+#include <glib.h> - #include <glib/gi18n.h> - #include <gtk/gtk.h> - #include <libdesktop-agnostic/fdo.h> - diff --git a/community/awn-extras-applets/awn-extras-libnotify0.7.patch b/community/awn-extras-applets/awn-extras-libnotify0.7.patch deleted file mode 100644 index c552e26f2..000000000 --- a/community/awn-extras-applets/awn-extras-libnotify0.7.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/notification-daemon/daemon.c awn-extras-0.4.0/applets/maintained/notification-daemon/daemon.c ---- awn-extras-0.4.0.orig/applets/maintained/notification-daemon/daemon.c 2010-04-10 01:26:20.000000000 +0200 -+++ awn-extras-0.4.0/applets/maintained/notification-daemon/daemon.c 2011-12-16 00:23:45.488215715 +0100 -@@ -1487,7 +1487,7 @@ - if (fork() == 0) - { - notify_init("notify-send"); -- notify = notify_notification_new(summary, body, icon_str, NULL); -+ notify = notify_notification_new(summary, body, icon_str); - notify_notification_set_category(notify, type); - notify_notification_set_urgency(notify, urgency); - notify_notification_set_timeout(notify, expire_timeout); diff --git a/community/awn-extras-applets/cairo-menu-upower.patch b/community/awn-extras-applets/cairo-menu-upower.patch deleted file mode 100644 index 08e79a68d..000000000 --- a/community/awn-extras-applets/cairo-menu-upower.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c ---- awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c 2010-04-10 01:26:19.000000000 +0200 -+++ awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c 2012-12-29 05:46:45.971364855 +0100 -@@ -104,7 +104,7 @@ - - if (have_gnome_session_manager) - { -- add_special_item (menu,_("Logout"),"gnome-logout","gnome-session-save","--logout-dialog --gui"); -+ add_special_item (menu,_("Logout"),"gnome-logout","gnome-session-quit","--logout"); - } - else if (dbus_service_exists ("org.xfce.SessionManager") ) - { -@@ -121,35 +121,13 @@ - { - add_special_item (menu,_("Lock Screen"),"system-lock-screen","xscreensaver-command","-lock"); - } -- if (dbus_service_exists ("org.freedesktop.PowerManagement")) -- { -- if (!add_special_item (menu,_("Suspend"),"gnome-session-suspend","gnome-power-cmd","suspend")) -- { -- add_special_item (menu,_("Suspend"),"gnome-session-suspend","dbus-send","--session --dest=org.freedesktop.PowerManagement --type=method_call --print-reply --reply-timeout=2000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend"); -- } -- -- if (!add_special_item (menu,_("Hibernate"),"gnome-session-hibernate","gnome-power-cmd","hibernate")) -- { -- add_special_item (menu,_("Hibernate"),"gnome-session-hibernate","dbus-send","--session --dest=org.freedesktop.PowerManagement --type=method_call --print-reply --reply-timeout=2000 /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Hibernate"); -- } - -- } -- else if (dbus_service_exists ("org.gnome.PowerManagement")) -- { -- if (!add_special_item (menu,_("Suspend"),"gnome-session-suspend","gnome-power-cmd","suspend")) -- { -- -- } -- -- if (!add_special_item (menu,_("Hibernate"),"gnome-session-hibernate","gnome-power-cmd","hibernate")) -- { -+ add_special_item (menu,_("Suspend"),"gnome-session-suspend","dbus-send","--system --dest=org.freedesktop.UPower --type=method_call --print-reply --reply-timeout=2000 /org/freedesktop/UPower org.freedesktop.UPower.Suspend"); -+ add_special_item (menu,_("Hibernate"),"gnome-session-hibernate","dbus-send","--system --dest=org.freedesktop.UPower --type=method_call --print-reply --reply-timeout=2000 /org/freedesktop/UPower org.freedesktop.UPower.Hibernate"); - -- } -- } -- - if (have_gnome_session_manager) - { -- add_special_item (menu,_("Shutdown"),"gnome-logout","gnome-session-save","--shutdown-dialog --gui"); -+ add_special_item (menu,_("Shutdown"),"gnome-shutdown","gnome-session-quit","--power-off"); - } - gtk_widget_show_all (menu); - return FALSE; diff --git a/community/awn-extras-applets/check-dependencies.patch b/community/awn-extras-applets/check-dependencies.patch deleted file mode 100644 index 959d3a113..000000000 --- a/community/awn-extras-applets/check-dependencies.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/comics/comics.py awn-extras-0.4.0/applets/maintained/comics/comics.py ---- awn-extras-0.4.0.orig/applets/maintained/comics/comics.py 2010-03-26 17:14:53.000000000 +0100 -+++ awn-extras-0.4.0/applets/maintained/comics/comics.py 2012-11-15 17:28:52.045595715 +0100 -@@ -30,7 +30,7 @@ - from awn.extras import _ - - # Import Comics! modules, but check dependencies first --awn.check_dependencies(globals(), 'feedparser', 'pynotify') -+awn.check_dependencies(globals(), 'feedparser', 'pynotify', 'rsvg') - from pynotify import init as notify_init, Notification - - import comics_manage -diff -Naur awn-extras-0.4.0.orig/applets/maintained/media-player/media_player.py awn-extras-0.4.0/applets/maintained/media-player/media_player.py ---- awn-extras-0.4.0.orig/applets/maintained/media-player/media_player.py 2010-01-06 00:01:33.000000000 +0100 -+++ awn-extras-0.4.0/applets/maintained/media-player/media_player.py 2012-11-15 17:28:54.925659573 +0100 -@@ -17,13 +17,15 @@ - import os - import sys - -+import awn -+awn.check_dependencies(globals(), 'pygst') -+ - import pygst - pygst.require("0.10") - import gst - import gtk - import gobject - --import awn - from desktopagnostic import config - - -diff -Naur awn-extras-0.4.0.orig/applets/maintained/slickswitcher/slickswitcher.py awn-extras-0.4.0/applets/maintained/slickswitcher/slickswitcher.py ---- awn-extras-0.4.0.orig/applets/maintained/slickswitcher/slickswitcher.py 2010-04-08 14:31:25.000000000 +0200 -+++ awn-extras-0.4.0/applets/maintained/slickswitcher/slickswitcher.py 2012-11-15 17:31:32.025809983 +0100 -@@ -25,6 +25,9 @@ - import gobject - - import cairo -+ -+awn.check_dependencies(globals(), 'wnck') -+ - import drawing, switch, settings - from os.path import exists, isdir - import os -diff -Naur awn-extras-0.4.0.orig/applets/maintained/volume-control/volume-control.py awn-extras-0.4.0/applets/maintained/volume-control/volume-control.py ---- awn-extras-0.4.0.orig/applets/maintained/volume-control/volume-control.py 2010-01-06 00:01:34.000000000 +0100 -+++ awn-extras-0.4.0/applets/maintained/volume-control/volume-control.py 2012-11-15 17:28:26.368359913 +0100 -@@ -30,6 +30,9 @@ - - from awn.extras import awnlib, __version__ - -+import awn -+awn.check_dependencies(globals(), 'pygst') -+ - import pygst - pygst.require("0.10") - import gst -diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/stacks/stacks_applet.py awn-extras-0.4.0/applets/unmaintained/stacks/stacks_applet.py ---- awn-extras-0.4.0.orig/applets/unmaintained/stacks/stacks_applet.py 2009-11-16 00:31:16.000000000 +0100 -+++ awn-extras-0.4.0/applets/unmaintained/stacks/stacks_applet.py 2012-11-15 17:28:41.778701431 +0100 -@@ -25,6 +25,9 @@ - import pango - import awn - import cairo -+ -+awn.check_dependencies(globals(), 'gnome.ui', 'gnomedesktop') -+ - import gnome.ui - import gnomedesktop - import time diff --git a/community/awn-extras-applets/fix-shinyswitcher-scrolling.patch b/community/awn-extras-applets/fix-shinyswitcher-scrolling.patch deleted file mode 100644 index 69dcae9c1..000000000 --- a/community/awn-extras-applets/fix-shinyswitcher-scrolling.patch +++ /dev/null @@ -1,96 +0,0 @@ -=== modified file 'applets/maintained/shiny-switcher/shinyswitcherapplet.c' ---- applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-09-12 16:15:07 +0000 -+++ applets/maintained/shiny-switcher/shinyswitcherapplet.c 2010-11-02 13:52:43 +0000 -@@ -769,7 +769,7 @@ - - - static gboolean --_scroll_event(GtkWidget *widget, GdkEventMotion *event, AwnShinySwitcher *shinyswitcher) -+_scroll_event(GtkWidget *widget, GdkEventScroll *event, AwnShinySwitcher *shinyswitcher) - { - AwnShinySwitcherPrivate * priv = GET_PRIVATE (shinyswitcher); - WnckWorkspace *cur_space = wnck_screen_get_active_workspace(priv->wnck_screen); -@@ -779,7 +779,7 @@ - { - if (event->type == GDK_SCROLL) - { -- WnckMotionDirection direction1, direction2; -+ WnckMotionDirection left, right, up, down; - - switch (priv->mousewheel) - { -@@ -787,8 +787,10 @@ - case 1: - - case 3: -- direction1 = WNCK_MOTION_LEFT; -- direction2 = WNCK_MOTION_RIGHT; -+ left = WNCK_MOTION_LEFT; -+ right = WNCK_MOTION_RIGHT; -+ up = WNCK_MOTION_UP; -+ down = WNCK_MOTION_DOWN; - break; - - case 2: -@@ -796,22 +798,52 @@ - case 4: - - default: -- direction1 = WNCK_MOTION_RIGHT; -- direction2 = WNCK_MOTION_LEFT; -- -+ left = WNCK_MOTION_RIGHT; -+ right = WNCK_MOTION_LEFT; -+ up = WNCK_MOTION_DOWN; -+ down = WNCK_MOTION_UP; - } - -- if (event->state & GDK_SHIFT_MASK) -+ if ( (event->direction == GDK_SCROLL_UP) || -+ (event->direction == GDK_SCROLL_LEFT) ) - { -- new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_RIGHT); -+ new_space = wnck_workspace_get_neighbor(cur_space, left); -+ if (new_space == NULL) -+ { -+ new_space = wnck_workspace_get_neighbor(cur_space, up); -+ if (new_space) -+ { -+ for (cur_space = new_space; cur_space; ) -+ { -+ cur_space = wnck_workspace_get_neighbor(cur_space, right); -+ if (cur_space) -+ { -+ new_space = cur_space; -+ } -+ } -+ } -+ } - } - else - { -- new_space = wnck_workspace_get_neighbor(cur_space, WNCK_MOTION_LEFT); -- -+ new_space = wnck_workspace_get_neighbor(cur_space, right); -+ if (!new_space) -+ { -+ new_space = wnck_workspace_get_neighbor(cur_space, down); -+ if (new_space) -+ { -+ for (cur_space = new_space; cur_space; ) -+ { -+ cur_space = wnck_workspace_get_neighbor(cur_space, left); -+ if (cur_space) -+ { -+ new_space = cur_space; -+ } -+ } -+ } -+ } - } - } -- - if (new_space) - { - wnck_workspace_activate(new_space, event->time); /* FIXME */ - diff --git a/community/awn-extras-applets/fix-weather-applet.patch b/community/awn-extras-applets/fix-weather-applet.patch deleted file mode 100644 index 889c0f641..000000000 --- a/community/awn-extras-applets/fix-weather-applet.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/weather/weather.py awn-extras-0.4.0/applets/maintained/weather/weather.py ---- awn-extras-0.4.0.orig/applets/maintained/weather/weather.py 2012-03-07 00:20:03.094411287 +0100 -+++ awn-extras-0.4.0/applets/maintained/weather/weather.py 2010-03-21 13:58:03.000000000 +0100 -@@ -570,7 +570,7 @@ - - class NetworkHandler(ThreadQueue): - -- __ws_key = "&prod=xoap&par=1048871467&key=12daac2f3a67cb39&link=xoap" -+ __ws_key = "&prod=xml&par=1287722164&key=e11ec82daa20d876" - - def dict_from_xml(self, rootNode, keys, paths): - """Given an XML node, iterate over keys and paths, grabbing the -@@ -590,7 +590,7 @@ - @async_method - @network_exception - def get_locations(self, text): -- url = "http://xoap.weather.com/search/search?where=" + urllib2.quote(text) -+ url = "http://xml.weather.com/search/search?where=" + urllib2.quote(text) - with closing(urllib2.urlopen(url)) as usock: - with unlink_xml(usock) as xmldoc: - locations_list = [] -@@ -604,7 +604,7 @@ - @with_overlays - @network_exception - def get_conditions(self, location_code): -- url = "http://xoap.weather.com/weather/local/" + location_code + "?cc=*" + self.__ws_key -+ url = "http://xml.weather.com/weather/local/" + location_code + "?cc=*" + self.__ws_key - with closing(urllib2.urlopen(url)) as usock: - with unlink_xml(usock) as xmldoc: - names = ['CITY', 'SUNRISE', 'SUNSET', 'DESCRIPTION', 'CODE', 'TEMP', 'FEELSLIKE', 'BAR', 'BARDESC', 'WINDSPEED', 'WINDGUST', 'WINDDIR', 'HUMIDITY', 'MOONPHASE'] -@@ -619,7 +619,7 @@ - def get_weather_map(self, location_code): - map_url = "http://www.weather.com/outlook/travel/businesstraveler/map/%s" % location_code - with closing(urllib2.urlopen(map_url)) as usock: -- mapExp = """<IMG NAME="mapImg" SRC="([^\"]+)" WIDTH=([0-9]+) HEIGHT=([0-9]+) BORDER""" -+ mapExp = """<img name="mapImg" src="([^\"]+)" width="([0-9]+)" height="([0-9]+)" border""" - result = re.findall(mapExp, usock.read()) - if not result or len(result) != 1: - raise NetworkException("Couldn't parse weather map") -@@ -635,7 +635,7 @@ - @with_overlays - @network_exception - def get_forecast(self, location_code): -- url = "http://xoap.weather.com/weather/local/" + location_code + "?dayf=5" + self.__ws_key -+ url = "http://xml.weather.com/weather/local/" + location_code + "?dayf=5" + self.__ws_key - with closing(urllib2.urlopen(url)) as usock: - with unlink_xml(usock) as xmldoc: - try: diff --git a/community/awn-extras-applets/remove-settings-menu.patch b/community/awn-extras-applets/remove-settings-menu.patch deleted file mode 100644 index 60eeda1d5..000000000 --- a/community/awn-extras-applets/remove-settings-menu.patch +++ /dev/null @@ -1,229 +0,0 @@ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c ---- awn-extras-0.4.0.orig/applets/maintained/cairo-menu/gnome-menu-builder.c 2010-04-10 01:26:19.000000000 +0200 -+++ awn-extras-0.4.0/applets/maintained/cairo-menu/gnome-menu-builder.c 2011-12-16 20:34:22.612913317 +0100 -@@ -34,7 +34,6 @@ - #include "cairo-menu-applet.h" - - GMenuTree * main_menu_tree = NULL; --GMenuTree * settings_menu_tree = NULL; - - GtkWidget * menu_build (MenuInstance * instance); - static GtkWidget * submenu_build (MenuInstance * instance); -@@ -749,19 +748,10 @@ - gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance); - } - --static void --_remove_settings_submenu_cb(MenuInstance * instance,GObject *where_the_object_was) --{ -- g_debug ("%s",__func__); -- GMenuTreeDirectory *main_root; -- gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance); --} -- - static GtkWidget * - submenu_build (MenuInstance * instance) - { - GMenuTreeDirectory *main_root; -- GMenuTreeDirectory *settings_root; - GtkWidget * menu = NULL; - /* - if the menu is set then clear any menu items (except for places or recent) -@@ -771,10 +761,6 @@ - { - main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE); - } -- if (!settings_menu_tree) -- { -- settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE); -- } - g_assert (main_menu_tree); - /* - get_places_menu() and get_recent_menu() are -@@ -808,7 +794,6 @@ - main_root = gmenu_tree_get_root_directory(main_menu_tree); - g_assert (gmenu_tree_item_get_type( (GMenuTreeItem*)main_root) == GMENU_TREE_ITEM_DIRECTORY); - g_assert (main_root); -- settings_root = gmenu_tree_get_root_directory(settings_menu_tree); - if ( menu_dir = find_menu_dir (instance,main_root) ) - { - /* if instance->menu then we're refreshing in a monitor callback*/ -@@ -817,22 +802,11 @@ - menu = fill_er_up(instance,menu_dir,instance->menu); - g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_main_submenu_cb,instance); - } -- else if ( settings_root && (menu_dir = find_menu_dir (instance,settings_root)) ) -- { -- gmenu_tree_remove_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance); -- gmenu_tree_add_monitor (main_menu_tree,(GMenuTreeChangedFunc)_submenu_modified_cb,instance); -- menu = fill_er_up(instance,menu_dir,instance->menu); -- g_object_weak_ref (G_OBJECT(menu), (GWeakNotify)_remove_settings_submenu_cb,instance); -- } - if (menu_dir) - { - gmenu_tree_item_unref(menu_dir); - } - gmenu_tree_item_unref(main_root); -- if (settings_root) -- { -- gmenu_tree_item_unref(settings_root); -- } - } - return instance->menu = menu; - } -@@ -862,10 +836,6 @@ - { - main_menu_tree = gmenu_tree_lookup("applications.menu", GMENU_TREE_FLAGS_NONE); - } -- if (!settings_menu_tree) -- { -- settings_menu_tree = gmenu_tree_lookup("settings.menu", GMENU_TREE_FLAGS_NONE); -- } - - if (main_menu_tree) - { -@@ -884,44 +854,6 @@ - menu_item = gtk_separator_menu_item_new (); - gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item); - } -- if (settings_menu_tree) -- { -- root = gmenu_tree_get_root_directory(settings_menu_tree); -- gmenu_tree_remove_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance); -- gmenu_tree_add_monitor (settings_menu_tree,(GMenuTreeChangedFunc)_menu_modified_cb,instance); -- if (!instance->menu) -- { -- g_debug ("%s: No applications menu????",__func__); -- instance->menu = fill_er_up(instance,root,instance->menu); -- } -- else -- { -- sub_menu = fill_er_up (instance, root,instance->menu); --#if 0 -- sub_menu = fill_er_up(instance,root,NULL); -- c = g_malloc0 (sizeof(CallbackContainer)); -- c->icon_name = g_strdup(gmenu_tree_directory_get_icon (root)); -- image = get_gtk_image (c->icon_name); -- txt = gmenu_tree_entry_get_name((GMenuTreeEntry*)root); -- menu_item = cairo_menu_item_new_with_label (txt?txt:"unknown"); -- gtk_menu_item_set_submenu (GTK_MENU_ITEM(menu_item),sub_menu); -- if (image) -- { -- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),image); -- } -- gtk_menu_shell_append(GTK_MENU_SHELL(instance->menu),menu_item); -- c->file_path = g_strdup(gmenu_tree_directory_get_desktop_file_path (root)); -- c->display_name = g_strdup ("Settings"); -- drop_data = g_strdup_printf("cairo_menu_item_dir:///@@@%s@@@%s@@@%s\n",c->file_path,c->display_name,c->icon_name); -- cairo_menu_item_set_source (AWN_CAIRO_MENU_ITEM(menu_item),drop_data); -- g_free (drop_data); -- c->instance = instance; -- g_signal_connect (menu_item, "button-press-event",G_CALLBACK(_button_press_dir),c); -- g_object_weak_ref (G_OBJECT(menu_item),(GWeakNotify)_free_callback_container,c); --#endif -- } -- gmenu_tree_item_unref(root); -- } - - /*TODO Check to make sure it is needed. Should not be displayed if - all flags are of the NO persuasion.*/ -diff -Naur awn-extras-0.4.0.orig/applets/maintained/yama/yama.py awn-extras-0.4.0/applets/maintained/yama/yama.py ---- awn-extras-0.4.0.orig/applets/maintained/yama/yama.py 2010-03-31 16:21:24.000000000 +0200 -+++ awn-extras-0.4.0/applets/maintained/yama/yama.py 2011-12-16 20:37:48.243326388 +0100 -@@ -113,7 +113,6 @@ - - def build_menu(self): - self.applications_items = [] -- self.settings_items = [] - self.session_items = [] - - """ Applications """ -@@ -126,11 +125,6 @@ - """ Places """ - self.create_places_submenu(self.menu) - -- """ System """ -- tree = gmenu.lookup_tree("settings.menu") -- self.append_directory(tree.root, self.menu, item_list=self.settings_items) -- tree.add_monitor(self.menu_changed_cb, self.settings_items) -- - """ Session actions """ - if dbus is not None: - self.append_session_actions(self.menu) -@@ -227,7 +221,7 @@ - for i in xrange(len(items)): - items.pop().destroy() - -- index = len(self.applications_items) + 2 if items is self.settings_items else 0 # + 2 = separator + Places -+ index = len(self.applications_items) + 0 - self.append_directory(tree.root, self.menu, index=index, item_list=items) - # Refresh menu to re-initialize the widget - self.menu.show_all() -diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/main-menu/applet.c awn-extras-0.4.0/applets/unmaintained/main-menu/applet.c ---- awn-extras-0.4.0.orig/applets/unmaintained/main-menu/applet.c 2009-10-27 20:45:03.000000000 +0100 -+++ awn-extras-0.4.0/applets/unmaintained/main-menu/applet.c 2011-12-16 20:27:28.792248015 +0100 -@@ -43,7 +43,6 @@ - GMenuTree *tree; - GMenuTreeDirectory *root; - GMenuTreeDirectory *apps; -- GMenuTreeDirectory *settings; - - } Menu; - -@@ -243,8 +242,6 @@ - { - GMenuTreeDirectory *temp= menu->root; - menu->root = gmenu_tree_item_get_parent (GMENU_TREE_ITEM (temp)); -- if (menu->root == menu->settings) -- menu->root = gmenu_tree_get_root_directory (menu->tree); - populate (menu); - } - -@@ -299,8 +296,6 @@ - if (app->root == GMENU_TREE_DIRECTORY(gmenu_tree_get_root_directory ((GMenuTree*)app->apps))) - { - list = g_slist_copy (apps); -- sets = g_slist_copy (gmenu_tree_directory_get_contents (app->settings)); -- list = g_slist_concat (list, sets); - list = g_slist_sort (list, (GCompareFunc)_compare); - } - else -@@ -419,13 +414,6 @@ - g_warning ("Unable to find applications.menu"); - return FALSE; - } -- app->settings = gmenu_tree_get_root_directory ( -- gmenu_tree_lookup ("settings.menu", GMENU_TREE_FLAGS_NONE)); -- if (!app->settings) -- { -- g_warning ("Unable to find settings.menu"); -- return FALSE; -- } - app->tree = (GMenuTree*)app->apps; - - app->menu = awn_applet_create_default_menu (app->applet); -diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/menus.py awn-extras-0.4.0/applets/unmaintained/MiMenu/menus.py ---- awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/menus.py 2009-08-14 14:29:59.000000000 +0200 -+++ awn-extras-0.4.0/applets/unmaintained/MiMenu/menus.py 2011-12-16 20:30:42.060104523 +0100 -@@ -12,8 +12,6 @@ - class MenuDateStore: - MENUCORE = gmenu.lookup_tree('applications.menu') - MENUROOT = MENUCORE.get_root_directory() -- SYSTEMMENUCORE = gmenu.lookup_tree('settings.menu') -- SYSTEMMENUROOT = SYSTEMMENUCORE.get_root_directory() - PATH = [] - - -diff -Naur awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/mimenu.py awn-extras-0.4.0/applets/unmaintained/MiMenu/mimenu.py ---- awn-extras-0.4.0.orig/applets/unmaintained/MiMenu/mimenu.py 2009-10-27 20:45:47.000000000 +0100 -+++ awn-extras-0.4.0/applets/unmaintained/MiMenu/mimenu.py 2011-12-16 20:30:35.897158422 +0100 -@@ -69,8 +69,7 @@ - tree1.set_headers_visible (0) - tree1.append_column(column1) - tree1.append_column(column2) -- lst1,self.objlist1 = menus.get_menus(menus.data.MENUROOT, -- root2=menus.data.SYSTEMMENUROOT) -+ lst1,self.objlist1 = menus.get_menus(menus.data.MENUROOT) - model = menus.set_model(tree1,lst1,self.theme,self.location_icon) - tree1.connect('cursor_changed', self.treeclick, - tree1,self.objlist1,False) |