Merge lp:~awn-extras/awn-extras/extras-trunk-rewrite-and-random-breakage into lp:awn-extras

Proposed by moonbeam on 2009-10-06
Status: Merged
Approved by: Mark Lee on 2010-01-26
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~awn-extras/awn-extras/extras-trunk-rewrite-and-random-breakage
Merge into: lp:awn-extras
Diff against target: 170085 lines (+88234/-66341)
660 files modified
.bzrignore (+35/-20)
COPYING.BSD (+26/-0)
COPYING.CCASAv3.0 (+350/-0)
COPYING.GPL-3 (+676/-0)
COPYING.LGPL-2.1 (+510/-0)
Makefile.am (+24/-8)
Makefile.c-applet (+5/-1)
Makefile.common (+6/-0)
Makefile.desktop-files (+1/-1)
Makefile.python-applet (+4/-0)
Makefile.schemas (+19/-22)
Makefile.vala-applet (+23/-16)
applets/Makefile.am (+61/-68)
applets/maintained/animal-farm/animal-farm.desktop.in (+6/-6)
applets/maintained/animal-farm/animal-farm.py (+35/-31)
applets/maintained/awnterm/Makefile.am (+13/-7)
applets/maintained/awnterm/awn-applet-awnterm.schema-ini (+7/-2)
applets/maintained/awnterm/awn-terminal.vala (+631/-0)
applets/maintained/awnterm/awnterm.desktop.in.in (+5/-3)
applets/maintained/awnterm/eggaccelerators.c (+657/-0)
applets/maintained/awnterm/eggaccelerators.h (+87/-0)
applets/maintained/awnterm/keybinder.c (+349/-0)
applets/maintained/awnterm/keybinder.h (+50/-0)
applets/maintained/awnterm/keybinder.vapi (+45/-0)
applets/maintained/bandwidth-monitor/CHANGELOG (+126/-0)
applets/maintained/bandwidth-monitor/Makefile.am (+16/-0)
applets/maintained/bandwidth-monitor/TODO (+19/-0)
applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini (+40/-0)
applets/maintained/bandwidth-monitor/awn-bwm.py (+688/-0)
applets/maintained/bandwidth-monitor/bandwidth-monitor.desktop.in (+11/-0)
applets/maintained/bandwidth-monitor/bandwidth-monitor.ui (+300/-0)
applets/maintained/bandwidth-monitor/bwmprefs.py (+280/-0)
applets/maintained/battery/Makefile.am (+4/-3)
applets/maintained/battery/awn-applet-battery.schema-ini (+37/-0)
applets/maintained/battery/battery.desktop.in (+5/-3)
applets/maintained/battery/battery.py (+53/-76)
applets/maintained/battery/battery.ui (+336/-0)
applets/maintained/battery/messagehandler.py (+13/-6)
applets/maintained/battery/themes/oxygen/battery-charged.svg (+4/-1403)
applets/maintained/battery/themes/oxygen/battery-charging-000.svg (+3/-1104)
applets/maintained/battery/themes/oxygen/battery-charging-020.svg (+3/-1600)
applets/maintained/battery/themes/oxygen/battery-charging-040.svg (+3/-1600)
applets/maintained/battery/themes/oxygen/battery-charging-060.svg (+3/-1589)
applets/maintained/battery/themes/oxygen/battery-charging-080.svg (+3/-1797)
applets/maintained/battery/themes/oxygen/battery-charging-100.svg (+3/-1402)
applets/maintained/cairo-clock/Makefile.am (+4/-2)
applets/maintained/cairo-clock/analogclock.py (+13/-17)
applets/maintained/cairo-clock/awn-applet-cairo-clock.schema-ini (+30/-12)
applets/maintained/cairo-clock/cairo-clock.desktop.in (+7/-5)
applets/maintained/cairo-clock/cairo-clock.py (+101/-130)
applets/maintained/cairo-clock/cairo-clock.ui (+681/-0)
applets/maintained/cairo-clock/locations.py (+358/-279)
applets/maintained/cairo-clock/sun.py (+200/-0)
applets/maintained/cairo-clock/weather.py (+171/-0)
applets/maintained/cairo-menu/Makefile.am (+49/-21)
applets/maintained/cairo-menu/applet.c (+19/-133)
applets/maintained/cairo-menu/awn-applet-cairo-menu.schema-ini (+129/-0)
applets/maintained/cairo-menu/cairo-aux-icon.c (+391/-0)
applets/maintained/cairo-menu/cairo-aux-icon.h (+60/-0)
applets/maintained/cairo-menu/cairo-main-icon.c (+381/-0)
applets/maintained/cairo-menu/cairo-main-icon.h (+62/-0)
applets/maintained/cairo-menu/cairo-menu-applet.c (+535/-0)
applets/maintained/cairo-menu/cairo-menu-applet.h (+110/-0)
applets/maintained/cairo-menu/cairo-menu-item.c (+316/-0)
applets/maintained/cairo-menu/cairo-menu-item.h (+65/-0)
applets/maintained/cairo-menu/cairo-menu.c (+218/-0)
applets/maintained/cairo-menu/cairo-menu.desktop.in.in (+3/-1)
applets/maintained/cairo-menu/cairo-menu.h (+59/-0)
applets/maintained/cairo-menu/gnome-menu-builder.c (+1110/-0)
applets/maintained/cairo-menu/gnome-menu-builder.h (+31/-0)
applets/maintained/cairo-menu/misc.c (+461/-0)
applets/maintained/cairo-menu/misc.h (+70/-0)
applets/maintained/cairo-menu/xfce-menu-builder.c (+202/-0)
applets/maintained/cairo-menu/xfce-menu-builder.h (+31/-0)
applets/maintained/calendar/Makefile.am (+1/-0)
applets/maintained/calendar/awn-applet-calendar.schema-ini (+64/-0)
applets/maintained/calendar/calendar.desktop.in (+6/-4)
applets/maintained/calendar/calendarlogin.py (+3/-8)
applets/maintained/calendar/calendarprefs.py (+4/-12)
applets/maintained/calendar/calthread.py (+2/-0)
applets/maintained/calendar/clockcal.py (+74/-151)
applets/maintained/calendar/evocal.py (+2/-0)
applets/maintained/calendar/googlecal.py (+3/-9)
applets/maintained/calendar/icscal.py (+3/-8)
applets/maintained/calendar/owacal.py (+3/-9)
applets/maintained/calendar/sevensegled.py (+2/-9)
applets/maintained/comics/Makefile.am (+24/-32)
applets/maintained/comics/awn-applet-comics.schema-ini (+6/-0)
applets/maintained/comics/comics.desktop.in (+6/-5)
applets/maintained/comics/comics.py (+262/-263)
applets/maintained/comics/comics_add.py (+170/-169)
applets/maintained/comics/comics_manage.py (+101/-102)
applets/maintained/comics/comics_view.py (+545/-545)
applets/maintained/comics/downloader.py (+30/-30)
applets/maintained/comics/feed/__init__.py (+97/-98)
applets/maintained/comics/feed/basic.py (+90/-94)
applets/maintained/comics/feed/rss.py (+140/-144)
applets/maintained/comics/feed/settings.py (+166/-167)
applets/maintained/comics/main.py (+271/-278)
applets/maintained/comics/shared.py (+13/-16)
applets/maintained/comics/ui/add.ui (+39/-40)
applets/maintained/comics/ui/main.ui (+30/-29)
applets/maintained/comics/ui/manage.ui (+24/-28)
applets/maintained/comics/ui/view.ui (+96/-110)
applets/maintained/comics/widgets.py (+597/-590)
applets/maintained/cpufreq/Makefile.am (+26/-1)
applets/maintained/cpufreq/awn-applet-cpufreq.schema-ini (+7/-0)
applets/maintained/cpufreq/cpufreq.desktop.in (+6/-4)
applets/maintained/cpufreq/cpufreq.py (+70/-82)
applets/maintained/cpufreq/cpufreq.svg (+58/-154)
applets/maintained/cpufreq/cpufreq.ui (+96/-0)
applets/maintained/cpufreq/images/cpufreq-0.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-1.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-2.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-3.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-4.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-5.svg (+5/-124)
applets/maintained/cpufreq/images/cpufreq-6.svg (+5/-124)
applets/maintained/cpufreq/themes/moonbeam/index.theme (+11/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-0.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-1.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-10.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-11.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-12.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-13.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-2.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-3.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-4.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-5.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-6.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-7.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-8.svg (+317/-0)
applets/maintained/cpufreq/themes/moonbeam/scalable/cpufreq-9.svg (+317/-0)
applets/maintained/dialect/Makefile.am (+14/-0)
applets/maintained/dialect/awn-applet-dialect.schema-ini (+44/-0)
applets/maintained/dialect/dialect.desktop.in (+9/-0)
applets/maintained/dialect/dialect.py (+576/-0)
applets/maintained/dialect/dialect.ui (+962/-0)
applets/maintained/dialect/icons/COPYING (+23/-0)
applets/maintained/digital-clock/Makefile.am (+1/-2)
applets/maintained/digital-clock/awn-applet-digital-clock.schema-ini (+24/-10)
applets/maintained/digital-clock/dgClockPref.py (+325/-125)
applets/maintained/digital-clock/dgTime.py (+98/-61)
applets/maintained/digital-clock/digital-clock.desktop.in (+5/-3)
applets/maintained/digital-clock/digitalClock.py (+70/-57)
applets/maintained/feeds/Makefile.am (+21/-0)
applets/maintained/feeds/awn-applet-feeds.schema-ini (+22/-0)
applets/maintained/feeds/classes.py (+733/-0)
applets/maintained/feeds/feeds.desktop.in (+11/-0)
applets/maintained/feeds/feeds.py (+1244/-0)
applets/maintained/feeds/icons/awn-feeds-greader.svg (+414/-0)
applets/maintained/feeds/icons/awn-feeds.svg (+414/-0)
applets/maintained/feeds/prefs.py (+820/-0)
applets/maintained/file-browser-launcher/about.py (+2/-8)
applets/maintained/file-browser-launcher/awn-applet-file-browser-launcher.schema-ini (+10/-10)
applets/maintained/file-browser-launcher/file-browser-launcher.desktop.in (+5/-3)
applets/maintained/file-browser-launcher/file-browser-launcher.py (+650/-262)
applets/maintained/file-browser-launcher/prefs.py (+22/-29)
applets/maintained/garbage/Makefile.am (+17/-0)
applets/maintained/garbage/TODO (+1/-0)
applets/maintained/garbage/applet.vala (+363/-0)
applets/maintained/garbage/awn-applet-garbage.schema-ini (+11/-0)
applets/maintained/garbage/garbage.desktop.in.in (+10/-0)
applets/maintained/garbage/prefs.vala (+80/-0)
applets/maintained/hardware-sensors/COPYING (+5/-0)
applets/maintained/hardware-sensors/Makefile.am (+58/-0)
applets/maintained/hardware-sensors/TODO.txt (+3/-0)
applets/maintained/hardware-sensors/awn-applet-hardware-sensors.schema-ini (+78/-0)
applets/maintained/hardware-sensors/hardware-sensors.desktop.in (+11/-0)
applets/maintained/hardware-sensors/hardware-sensors.py (+973/-0)
applets/maintained/hardware-sensors/hardware-sensors.ui (+751/-0)
applets/maintained/hardware-sensors/images/no_sensors.svg (+104/-0)
applets/maintained/hardware-sensors/images/thermometer.svg (+202/-0)
applets/maintained/hardware-sensors/interfaces/acpisensors.py (+35/-0)
applets/maintained/hardware-sensors/interfaces/fileinterface.py (+68/-0)
applets/maintained/hardware-sensors/interfaces/hddtempsensors.py (+93/-0)
applets/maintained/hardware-sensors/interfaces/lmsensors.py (+139/-0)
applets/maintained/hardware-sensors/interfaces/nvclocksensors.py (+121/-0)
applets/maintained/hardware-sensors/interfaces/nvidiasensors.py (+102/-0)
applets/maintained/hardware-sensors/interfaces/omnibooksensors.py (+36/-0)
applets/maintained/hardware-sensors/interfaces/sensorinterface.py (+221/-0)
applets/maintained/hardware-sensors/sensoricon.py (+146/-0)
applets/maintained/hardware-sensors/sensorvalues/rpmvalue.py (+38/-0)
applets/maintained/hardware-sensors/sensorvalues/sensorvalue.py (+59/-0)
applets/maintained/hardware-sensors/sensorvalues/tempvalue.py (+80/-0)
applets/maintained/hardware-sensors/sensorvalues/units.py (+35/-0)
applets/maintained/hardware-sensors/sensorvalues/voltvalue.py (+33/-0)
applets/maintained/hardware-sensors/themes/dark/double.svg (+737/-0)
applets/maintained/hardware-sensors/themes/dark/single.svg (+716/-0)
applets/maintained/hardware-sensors/themes/transparent/double.svg (+117/-0)
applets/maintained/hardware-sensors/themes/transparent/single.svg (+109/-0)
applets/maintained/hardware-sensors/themes/transparent_with_border/double.svg (+134/-0)
applets/maintained/hardware-sensors/themes/transparent_with_border/single.svg (+127/-0)
applets/maintained/mail/Makefile.am (+34/-24)
applets/maintained/mail/awn-applet-mail.schema-ini (+37/-0)
applets/maintained/mail/icons/error.svg (+3/-1144)
applets/maintained/mail/icons/login.svg (+3/-913)
applets/maintained/mail/icons/read.svg (+16/-309)
applets/maintained/mail/mail.desktop.in (+6/-4)
applets/maintained/mail/mail.py (+494/-397)
applets/maintained/mail/mail.ui (+285/-0)
applets/maintained/mail/themes/GMail/index.theme (+11/-0)
applets/maintained/mail/themes/GMail/scalable/login.svg (+5/-61)
applets/maintained/mail/themes/Reserved/index.theme (+11/-0)
applets/maintained/mail/themes/Reserved/scalable/error.svg (+3/-1212)
applets/maintained/mail/themes/Reserved/scalable/login.svg (+3/-913)
applets/maintained/mail/themes/Reserved/scalable/read.svg (+204/-315)
applets/maintained/mail/themes/Reserved/scalable/unread.svg (+4/-966)
applets/maintained/media-control/Makefile.am (+10/-8)
applets/maintained/media-control/awn-applet-media-control.schema-ini (+26/-0)
applets/maintained/media-control/icons/missing-artwork.svg (+832/-0)
applets/maintained/media-control/media-control.desktop.in (+6/-5)
applets/maintained/media-control/media-control.ui (+241/-0)
applets/maintained/media-control/media_control.py (+444/-150)
applets/maintained/media-icons/COPYING (+340/-0)
applets/maintained/media-icons/Makefile.am (+20/-0)
applets/maintained/media-icons/icons/COPYING (+340/-0)
applets/maintained/media-icons/icons/backward.svg (+350/-0)
applets/maintained/media-icons/icons/forward.svg (+349/-0)
applets/maintained/media-icons/icons/play.svg (+286/-0)
applets/maintained/media-icons/media-icon-next.desktop.in (+11/-0)
applets/maintained/media-icons/media-icon-previous.desktop.in (+11/-0)
applets/maintained/media-icons/media-icons.desktop.in (+11/-0)
applets/maintained/media-icons/media-icons.py (+156/-0)
applets/maintained/media-player/Makefile.am (+2/-1)
applets/maintained/media-player/awn-applet-media-player.schema-ini (+26/-0)
applets/maintained/media-player/media-player-prefs.ui (+316/-0)
applets/maintained/media-player/media-player.desktop.in (+6/-5)
applets/maintained/media-player/media_player.py (+146/-144)
applets/maintained/mount/Makefile.am (+6/-4)
applets/maintained/mount/awn-applet-mount.schema-ini (+12/-0)
applets/maintained/mount/mount.desktop.in (+6/-5)
applets/maintained/mount/mount.py (+38/-45)
applets/maintained/mount/mount.ui (+96/-0)
applets/maintained/notification-area/Makefile.am (+38/-15)
applets/maintained/notification-area/awn-applet-notification-area.schema-ini (+26/-0)
applets/maintained/notification-area/egg-tray-child.c (+201/-15)
applets/maintained/notification-area/egg-tray-child.h (+10/-8)
applets/maintained/notification-area/egg-tray.vapi (+44/-0)
applets/maintained/notification-area/eggtraymanager.c (+10/-2)
applets/maintained/notification-area/na-prefs.ui (+432/-0)
applets/maintained/notification-area/na-prefs.vala (+227/-0)
applets/maintained/notification-area/notification-area.desktop.in.in (+6/-4)
applets/maintained/notification-area/notification-area.vala (+662/-0)
applets/maintained/notification-daemon/Makefile.am (+43/-6)
applets/maintained/notification-daemon/awn-applet-notification-daemon.schema-ini (+80/-0)
applets/maintained/notification-daemon/daemon.c (+568/-393)
applets/maintained/notification-daemon/daemon.h (+23/-23)
applets/maintained/notification-daemon/engines.c (+49/-82)
applets/maintained/notification-daemon/notification-daemon.desktop.in.in (+3/-2)
applets/maintained/notification-daemon/sound.c (+12/-7)
applets/maintained/notification-daemon/stack.c (+1/-1)
applets/maintained/places/Makefile.am (+0/-1)
applets/maintained/places/applet.c (+254/-480)
applets/maintained/places/awn-applet-places.schema-ini (+16/-16)
applets/maintained/places/places.desktop.in.in (+5/-3)
applets/maintained/python-test/python-test.desktop.in (+5/-3)
applets/maintained/python-test/python-test.py (+23/-35)
applets/maintained/quit/Makefile.am (+7/-10)
applets/maintained/quit/awn-applet-quit.schema-ini (+17/-0)
applets/maintained/quit/quit-lock-screen.desktop.in (+11/-0)
applets/maintained/quit/quit-log-out.desktop.in (+11/-0)
applets/maintained/quit/quit-shut-down.desktop.in (+11/-0)
applets/maintained/quit/quit.desktop.in (+6/-5)
applets/maintained/quit/quit.py (+268/-72)
applets/maintained/rtm/awn-rtm.py (+2/-5)
applets/maintained/rtm/rtm.desktop.in (+5/-3)
applets/maintained/shiny-switcher/Makefile.am (+2/-3)
applets/maintained/shiny-switcher/applet.c (+6/-4)
applets/maintained/shiny-switcher/awn-applet-shinyswitcher.schema-ini (+77/-77)
applets/maintained/shiny-switcher/shiny-prefs.py (+56/-211)
applets/maintained/shiny-switcher/shiny-prefs.ui (+1258/-0)
applets/maintained/shiny-switcher/shinyswitcher.desktop.in.in (+3/-1)
applets/maintained/shiny-switcher/shinyswitcherapplet.c (+1089/-926)
applets/maintained/shiny-switcher/shinyswitcherapplet.h (+62/-106)
applets/maintained/showdesktop/Makefile.am (+25/-2)
applets/maintained/showdesktop/applet.vala (+113/-0)
applets/maintained/showdesktop/showdesktop.desktop.in.in (+10/-0)
applets/maintained/slickswitcher/Makefile.am (+21/-0)
applets/maintained/slickswitcher/awn-applet-slickswitcher.schema-ini (+94/-0)
applets/maintained/slickswitcher/drawing.py (+843/-0)
applets/maintained/slickswitcher/prefs.py (+485/-0)
applets/maintained/slickswitcher/settings.py (+73/-0)
applets/maintained/slickswitcher/slickswitcher.desktop.in (+10/-0)
applets/maintained/slickswitcher/slickswitcher.py (+488/-0)
applets/maintained/slickswitcher/switch.py (+316/-0)
applets/maintained/sysmon/Makefile.am (+45/-0)
applets/maintained/sysmon/applet.c (+27/-0)
applets/maintained/sysmon/areagraph.c (+347/-0)
applets/maintained/sysmon/areagraph.h (+64/-0)
applets/maintained/sysmon/awn-applet-sysmon.schema-ini (+49/-0)
applets/maintained/sysmon/bargraph.c (+242/-0)
applets/maintained/sysmon/bargraph.h (+58/-0)
applets/maintained/sysmon/circlegraph.c (+233/-0)
applets/maintained/sysmon/circlegraph.h (+59/-0)
applets/maintained/sysmon/cpu-dialog.c (+301/-0)
applets/maintained/sysmon/cpu-dialog.h (+60/-0)
applets/maintained/sysmon/cpuicon.c (+620/-0)
applets/maintained/sysmon/cpuicon.h (+64/-0)
applets/maintained/sysmon/defines.h (+51/-0)
applets/maintained/sysmon/graph.c (+130/-0)
applets/maintained/sysmon/graph.h (+68/-0)
applets/maintained/sysmon/graphprivate.h (+32/-0)
applets/maintained/sysmon/loadicon.c (+178/-0)
applets/maintained/sysmon/loadicon.h (+59/-0)
applets/maintained/sysmon/piegraph.c (+88/-0)
applets/maintained/sysmon/piegraph.h (+58/-0)
applets/maintained/sysmon/sysmon.c (+299/-0)
applets/maintained/sysmon/sysmon.desktop.in.in (+10/-0)
applets/maintained/sysmon/sysmon.h (+57/-0)
applets/maintained/sysmon/sysmonicon.c (+476/-0)
applets/maintained/sysmon/sysmonicon.h (+68/-0)
applets/maintained/sysmon/sysmoniconprivate.h (+53/-0)
applets/maintained/sysmon/util.c (+257/-0)
applets/maintained/sysmon/util.h (+70/-0)
applets/maintained/thinkhdaps/Makefile.am (+6/-2)
applets/maintained/thinkhdaps/icons/thinkhdaps-paused.svg (+715/-0)
applets/maintained/thinkhdaps/icons/thinkhdaps-running.svg (+464/-0)
applets/maintained/thinkhdaps/thinkhdaps.desktop.in (+7/-5)
applets/maintained/thinkhdaps/thinkhdaps.py (+45/-53)
applets/maintained/to-do/awn-applet-to-do.schema-ini (+20/-17)
applets/maintained/to-do/icon.py (+11/-11)
applets/maintained/to-do/prefs.py (+23/-19)
applets/maintained/to-do/settings.py (+84/-157)
applets/maintained/to-do/to-do.desktop.in (+5/-3)
applets/maintained/to-do/to-do.py (+1338/-1430)
applets/maintained/tomboy-applet/tomboy-applet.desktop.in (+6/-4)
applets/maintained/tomboy-applet/tomboy-applet.py (+55/-76)
applets/maintained/vala-test/Makefile.am (+11/-3)
applets/maintained/vala-test/applet.vala (+10/-21)
applets/maintained/vala-test/vala-test.desktop.in.in (+7/-5)
applets/maintained/volume-control/Makefile.am (+45/-33)
applets/maintained/volume-control/awn-applet-volume-control.schema-ini (+17/-0)
applets/maintained/volume-control/themes/Black/index.theme (+11/-0)
applets/maintained/volume-control/themes/Black/scalable/audio-volume-muted.svg (+4/-1442)
applets/maintained/volume-control/themes/Minimal/index.theme (+11/-0)
applets/maintained/volume-control/themes/Minimal/scalable/audio-volume-muted.svg (+3/-1569)
applets/maintained/volume-control/volume-control.desktop.in (+7/-5)
applets/maintained/volume-control/volume-control.py (+195/-170)
applets/maintained/volume-control/volume-control.ui (+286/-0)
applets/maintained/weather/Makefile.am (+30/-10)
applets/maintained/weather/awn-applet-weather.schema-ini (+42/-0)
applets/maintained/weather/forecast.py (+249/-99)
applets/maintained/weather/themes/moonbeam/index.theme (+11/-0)
applets/maintained/weather/weather.desktop.in (+6/-4)
applets/maintained/weather/weather.py (+629/-388)
applets/maintained/weather/weather.ui (+533/-0)
applets/maintained/webapplet/Makefile.am (+42/-10)
applets/maintained/webapplet/applet.c (+405/-91)
applets/maintained/webapplet/applet.h (+9/-5)
applets/maintained/webapplet/awn-applet-webapplet.schema-ini (+11/-1)
applets/maintained/webapplet/configuration.c (+75/-51)
applets/maintained/webapplet/configuration.h (+17/-7)
applets/maintained/webapplet/engine_html.c (+13/-11)
applets/maintained/webapplet/engine_html.h (+1/-0)
applets/maintained/webapplet/engine_mozilla.c (+35/-0)
applets/maintained/webapplet/engine_mozilla.h (+29/-0)
applets/maintained/webapplet/icons/brightkite.svg (+379/-0)
applets/maintained/webapplet/icons/digg.svg (+362/-0)
applets/maintained/webapplet/icons/facebook.svg (+227/-0)
applets/maintained/webapplet/icons/friendfeed.svg (+252/-0)
applets/maintained/webapplet/icons/pingfm.svg (+203/-0)
applets/maintained/webapplet/icons/twitter.svg (+185/-0)
applets/maintained/webapplet/webapplet-websites.ini (+65/-0)
applets/maintained/webapplet/webapplet.desktop.in.in (+6/-4)
applets/maintained/wobblyzini/applet.c (+72/-7)
applets/maintained/wobblyzini/wobblyzini.desktop.in.in (+6/-4)
applets/maintained/wobblyzini/wobblyziniapplet.c (+78/-48)
applets/maintained/wobblyzini/wobblyziniapplet.h (+3/-7)
applets/maintained/yama/Makefile.am (+3/-0)
applets/maintained/yama/yama.desktop.in (+10/-0)
applets/maintained/yama/yama.py (+608/-0)
applets/unmaintained/DesktopManager/DesktopManager.desktop.in (+5/-3)
applets/unmaintained/DesktopManager/Manager.py (+9/-3)
applets/unmaintained/DesktopManager/awn-applet-DesktopManager.schema-ini (+13/-3)
applets/unmaintained/DesktopManager/menu.py (+18/-3)
applets/unmaintained/MiMenu/mimenu.desktop.in (+3/-1)
applets/unmaintained/MiMenu/mimenu.py (+11/-24)
applets/unmaintained/arss/arss.desktop.in (+5/-4)
applets/unmaintained/arss/arss.py (+1/-1)
applets/unmaintained/arss/awn-applet-arss.schema-ini (+1/-1)
applets/unmaintained/awn-meebo/awn-meebo.desktop.in (+5/-3)
applets/unmaintained/awn-meebo/awn-meebo.py (+1/-1)
applets/unmaintained/awnsystemmonitor/Makefile.am (+7/-2)
applets/unmaintained/awnsystemmonitor/applet.c (+10/-4)
applets/unmaintained/awnsystemmonitor/awnsystemmonitor.c (+40/-37)
applets/unmaintained/awnsystemmonitor/awnsystemmonitor.desktop.in.in (+5/-3)
applets/unmaintained/awnsystemmonitor/awnsystemmonitor.h (+4/-3)
applets/unmaintained/awnsystemmonitor/awntop.c (+25/-101)
applets/unmaintained/awnsystemmonitor/awntop.h (+3/-2)
applets/unmaintained/awnsystemmonitor/awntop_cairo_component.c (+25/-37)
applets/unmaintained/awnsystemmonitor/cairo-utils.c (+70/-0)
applets/unmaintained/awnsystemmonitor/cairo-utils.h (+43/-0)
applets/unmaintained/awnsystemmonitor/cpu_component.c (+7/-7)
applets/unmaintained/awnsystemmonitor/cpumetergconf.c (+1/-1)
applets/unmaintained/awnsystemmonitor/cpumetergconf.h (+2/-1)
applets/unmaintained/awnsystemmonitor/dashboard.c (+21/-89)
applets/unmaintained/awnsystemmonitor/dashboard.h (+4/-3)
applets/unmaintained/awnsystemmonitor/dashboard_util.c (+17/-17)
applets/unmaintained/awnsystemmonitor/dashboard_util.h (+10/-14)
applets/unmaintained/awnsystemmonitor/date_time_component.c (+3/-2)
applets/unmaintained/awnsystemmonitor/loadavg_component.c (+3/-5)
applets/unmaintained/awnsystemmonitor/sysmem_component.c (+3/-6)
applets/unmaintained/awnsystemmonitor/uptime_component.c (+10/-9)
applets/unmaintained/comic/comic.desktop.in (+5/-4)
applets/unmaintained/comic/comic.py (+1/-1)
applets/unmaintained/digg/Makefile.am (+1/-1)
applets/unmaintained/digg/digg.desktop.in (+6/-5)
applets/unmaintained/digg/digg.py (+21/-21)
applets/unmaintained/digg/icons/digg.svg (+362/-0)
applets/unmaintained/dropper/COPYING (+340/-0)
applets/unmaintained/dropper/Makefile.am (+15/-0)
applets/unmaintained/dropper/awn-applet-dropper.schema-ini (+6/-0)
applets/unmaintained/dropper/dropper-prefs.ui (+316/-0)
applets/unmaintained/dropper/dropper.desktop.in (+11/-0)
applets/unmaintained/dropper/dropper.py (+393/-0)
applets/unmaintained/dropper/icons/COPYING (+340/-0)
applets/unmaintained/dropper/icons/dropper.svg (+619/-0)
applets/unmaintained/filebrowser/awn-applet-filebrowser.schema-ini (+20/-9)
applets/unmaintained/filebrowser/filebrowser-applet.c (+10/-42)
applets/unmaintained/filebrowser/filebrowser-applet.h (+0/-1)
applets/unmaintained/filebrowser/filebrowser-dialog.c (+3/-5)
applets/unmaintained/filebrowser/filebrowser-dialog.h (+1/-1)
applets/unmaintained/filebrowser/filebrowser-folder.c (+1/-1)
applets/unmaintained/filebrowser/filebrowser-folder.h (+1/-1)
applets/unmaintained/filebrowser/filebrowser.desktop.in.in (+5/-4)
applets/unmaintained/filebrowser/filebrowser.svg (+42/-321)
applets/unmaintained/helloworld-applet/src/helloworld.desktop.in.in (+2/-1)
applets/unmaintained/helloworld-applet/src/helloworldapplet.c (+3/-3)
applets/unmaintained/main-menu/Makefile.am (+0/-1)
applets/unmaintained/main-menu/applet.c (+54/-86)
applets/unmaintained/main-menu/main-menu.desktop.in.in (+5/-3)
applets/unmaintained/mono-test/Applet.cs (+55/-0)
applets/unmaintained/mono-test/Makefile.am (+9/-0)
applets/unmaintained/mono-test/README (+29/-0)
applets/unmaintained/mono-test/mono-test.desktop.in (+10/-0)
applets/unmaintained/pandora/pandora.desktop.in (+6/-5)
applets/unmaintained/pandora/pandora.py (+5/-11)
applets/unmaintained/plugger/plugger.desktop.in.in (+5/-3)
applets/unmaintained/stacks/Makefile.am (+2/-0)
applets/unmaintained/stacks/awn-applet-stacks.schema-ini (+215/-0)
applets/unmaintained/stacks/stacks.desktop.in (+6/-4)
applets/unmaintained/stacks/stacks_applet.py (+42/-75)
applets/unmaintained/stacks/stacks_backend.py (+6/-11)
applets/unmaintained/stacks/stacks_backend_file.py (+0/-7)
applets/unmaintained/stacks/stacks_backend_folder.py (+4/-9)
applets/unmaintained/stacks/stacks_backend_plugger.py (+6/-12)
applets/unmaintained/stacks/stacks_backend_trasher.py (+1/-7)
applets/unmaintained/stacks/stacks_config.py (+51/-96)
applets/unmaintained/stacks/stacks_gui_curved.py (+110/-235)
applets/unmaintained/stacks/stacks_gui_dialog.py (+12/-19)
applets/unmaintained/stacks/stacks_gui_trasher.py (+0/-9)
applets/unmaintained/trasher/trasher.desktop.in.in (+5/-3)
configure.ac (+178/-203)
debian/awn-applets-c-core-trunk.install (+75/-0)
debian/awn-applets-c-extras-trunk.install (+35/-0)
debian/awn-applets-python-core-trunk.install (+158/-0)
debian/awn-applets-python-extras-trunk.install (+84/-0)
debian/changelog (+156/-6)
debian/compat (+1/-1)
debian/control (+201/-49)
debian/control.autoppa (+0/-20)
debian/copyright (+557/-20)
debian/pycompat (+1/-0)
debian/python-awn-extras-trunk.install (+1/-0)
debian/python-awn-extras-trunk.preinst (+12/-0)
debian/rules (+38/-12)
debian/rules.autoppa (+0/-14)
debian/watch (+2/-0)
m4/as-ac-expand.m4 (+0/-2)
m4/dolt.m4 (+178/-0)
m4/python.m4 (+1/-270)
m4/shave.m4 (+73/-0)
po/POTFILES.in (+114/-3)
po/POTFILES.skip (+65/-84)
po/awn-extras.pot (+2184/-0)
po/de.po (+2189/-27)
po/en_US@piglatin.po (+2185/-0)
po/es.po (+2362/-293)
po/fr.po (+2366/-291)
po/nb.po (+2364/-293)
po/nl.po (+2167/-23)
po/nn.po (+2364/-293)
po/ru.po (+2128/-104)
po/sv.po (+2186/-23)
po/sv_SE.po (+2160/-93)
shared/python/Makefile.am (+6/-55)
shared/python/__init__.py.in (+18/-3)
shared/python/awnlib.py (+468/-519)
shared/python/awnmediaplayers.py (+285/-220)
shared/python/configbinder.py (+256/-0)
shared/python/threadqueue.py (+93/-0)
shared/vala/build.vapi (+9/-0)
shared/vala/libintl.vapi (+9/-0)
shave/shave-libtool.in (+69/-0)
shave/shave.in (+76/-0)
src/Taskmand-applet/Makefile.am (+0/-33)
src/Taskmand-applet/Taskmand-applet.desktop.in.in (+0/-8)
src/Taskmand-applet/applet.c (+0/-91)
src/awn-notification-daemon/data/Makefile.am (+0/-17)
src/awn-notification-daemon/data/awn-notification-daemon.schemas.in (+0/-161)
src/awn-notification-daemon/po/ChangeLog (+0/-23)
src/awn-notification-daemon/po/Makefile.in.in (+0/-218)
src/awn-notification-daemon/po/POTFILES.in (+0/-1)
src/awn-notification-daemon/src/Makefile.am (+0/-1)
src/awn-notification-daemon/src/daemon/Makefile.am (+0/-36)
src/awn-notification-daemon/src/daemon/conf.c (+0/-251)
src/awn-notification-daemon/src/daemon/conf.h (+0/-8)
src/awnterm/applet.c (+0/-88)
src/awnterm/awnterm.c (+0/-199)
src/awnterm/awnterm.h (+0/-65)
src/awnterm/settings.c (+0/-191)
src/awnterm/settings.h (+0/-64)
src/battery-applet/battery-status.glade (+0/-233)
src/cairo-clock/cairo-clock.glade (+0/-434)
src/cairo-menu/backend-gnome.c (+0/-891)
src/cairo-menu/backend-gnome.h (+0/-26)
src/cairo-menu/config_entries.c (+0/-847)
src/cairo-menu/config_entries.h (+0/-96)
src/cairo-menu/menu.c (+0/-284)
src/cairo-menu/menu.h (+0/-60)
src/cairo-menu/menu_list_item.h (+0/-81)
src/cairo-menu/render.c (+0/-1457)
src/cairo-menu/render.h (+0/-38)
src/comics/comics.pot (+0/-134)
src/comics/locale/Makefile.am (+0/-1)
src/comics/locale/sv_SE/LC_MESSAGES/Makefile.am (+0/-5)
src/comics/locale/sv_SE/Makefile.am (+0/-1)
src/cpufreq/cpufreq.glade (+0/-72)
src/digitalClock/pref.glade (+0/-192)
src/libawn-extras/COPYING (+0/-339)
src/libawn-extras/COPYING.lesser (+0/-504)
src/libawn-extras/Makefile.am (+0/-36)
src/libawn-extras/awn-extras.h (+0/-157)
src/libawn-extras/awn-extras.pc.in (+0/-11)
src/libawn-extras/bindings/Makefile.am (+0/-4)
src/libawn-extras/bindings/python/awn_extras.defs (+0/-92)
src/libawn-extras/bindings/python/awn_extras.override (+0/-202)
src/libawn-extras/bindings/python/awn_extrasmodule.c (+0/-51)
src/libawn-extras/bindings/python/defs.py.in (+0/-6)
src/libawn-extras/bindings/python/detach.py (+0/-967)
src/libawn-extras/bindings/vala/Makefile.am (+0/-19)
src/libawn-extras/bindings/vala/awn-extras.deps (+0/-9)
src/libawn-extras/bindings/vala/awn-extras.files (+0/-2)
src/libawn-extras/bindings/vala/awn-extras.gi (+0/-127)
src/libawn-extras/bindings/vala/awn-extras.metadata (+0/-2)
src/libawn-extras/bindings/vala/awn-extras.namespace (+0/-1)
src/libawn-extras/bindings/vala/awn-extras.vapi (+0/-40)
src/libawn-extras/colour.c (+0/-52)
src/libawn-extras/config_shared.c (+0/-41)
src/libawn-extras/notify.c (+0/-92)
src/libawn-extras/pixbufs.c (+0/-107)
src/libawn-extras/shared_menuitems.c (+0/-273)
src/libawn-extras/url.c (+0/-87)
src/mail/locale/Makefile.am (+0/-2)
src/mail/locale/ru/LC_MESSAGES/Makefile.am (+0/-5)
src/mail/locale/ru/Makefile.am (+0/-1)
src/mail/messages.pot (+0/-161)
src/media-icon-back/COPYING (+0/-340)
src/media-icon-back/Makefile.am (+0/-12)
src/media-icon-back/icons/COPYING (+0/-340)
src/media-icon-back/icons/backward.svg (+0/-350)
src/media-icon-back/media-icon-back.desktop.in (+0/-10)
src/media-icon-back/mediaicon.py (+0/-104)
src/media-icon-next/COPYING (+0/-340)
src/media-icon-next/Makefile.am (+0/-12)
src/media-icon-next/icons/COPYING (+0/-340)
src/media-icon-next/icons/forward.svg (+0/-349)
src/media-icon-next/media-icon-next.desktop.in (+0/-10)
src/media-icon-next/mediaicon.py (+0/-104)
src/media-icon-play/COPYING (+0/-340)
src/media-icon-play/Makefile.am (+0/-12)
src/media-icon-play/icons/COPYING (+0/-340)
src/media-icon-play/icons/play.svg (+0/-286)
src/media-icon-play/media-icon-play.desktop.in (+0/-10)
src/media-icon-play/mediaicon.py (+0/-104)
src/media-player/media-player-prefs.glade (+0/-216)
src/mount-applet/mount-applet.glade (+0/-93)
src/notification-area/TODO (+0/-9)
src/notification-area/applet.c (+0/-430)
src/pynot-rgba/COPYING (+0/-675)
src/pynot-rgba/Makefile.am (+0/-13)
src/pynot-rgba/pynot-rgba.desktop.in (+0/-12)
src/pynot-rgba/pynot-rgba.glade (+0/-207)
src/pynot-rgba/pynot-rgba.schema-ini (+0/-65)
src/pynot-rgba/pynot.py (+0/-688)
src/pynot-rgba/pynotconf.py (+0/-103)
src/pynot-rgba/pythonicon.py (+0/-118)
src/pynot/COPYING (+0/-675)
src/pynot/Makefile.am (+0/-13)
src/pynot/pynot-prefs.glade (+0/-383)
src/pynot/pynot.desktop.in (+0/-12)
src/pynot/pynot.py (+0/-628)
src/pynot/pynot.schema-ini (+0/-49)
src/pynot/pynot.svg (+0/-495)
src/pynot/pynotconf.py (+0/-165)
src/quit-applet/COPYING (+0/-340)
src/quit-applet/icons/COPYING (+0/-53)
src/quit-applet/icons/LGPL (+0/-165)
src/quit-applet/icons/application-exit.svg (+0/-843)
src/separator/Makefile.am (+0/-11)
src/separator/applet.c (+0/-82)
src/separator/separator.desktop.in.in (+0/-8)
src/separator/separator.svg (+0/-210)
src/shiny-switcher/shiny-prefs.glade (+0/-1089)
src/showdesktop/showdesktop.desktop.in (+0/-8)
src/showdesktop/showdesktop.py (+0/-71)
src/simple-launcher/Makefile.am (+0/-11)
src/simple-launcher/applet.vala (+0/-449)
src/simple-launcher/simple-launcher.desktop.in.in (+0/-8)
src/simple-launcher/simple-launcher.schema-ini (+0/-6)
src/standalone-launcher/Makefile.am (+0/-14)
src/standalone-launcher/applet.vala (+0/-2713)
src/standalone-launcher/standalone-launcher.desktop.in.in (+0/-8)
src/standalone-launcher/standalone-launcher.schema-ini (+0/-106)
src/standalone-launcher/taskman-client-dbus.xml (+0/-22)
src/taskmand/Makefile.am (+0/-42)
src/taskmand/data/Makefile.am (+0/-15)
src/taskmand/data/org.awnproject.taskmand.service.in (+0/-4)
src/taskmand/taskmand-infos.xml (+0/-39)
src/taskmand/taskmand.c (+0/-522)
src/taskmand/taskmand.h (+0/-45)
src/taskmand/taskmand.schema-ini (+0/-12)
src/taskmand/taskmand.schemas.in (+0/-1)
src/thinkhdaps/images/thinkhdaps-error.svg (+0/-666)
src/thinkhdaps/images/thinkhdaps-paused.svg (+0/-855)
src/trash/Makefile.am (+0/-27)
src/trash/applet.c (+0/-131)
src/trash/trash-monitor.c (+0/-514)
src/trash/trash-monitor.h (+0/-50)
src/trash/trash.desktop.in.in (+0/-8)
src/trash/trash.schema-ini (+0/-17)
src/trash/trashapplet.c (+0/-1126)
src/trash/trashapplet.glade (+0/-216)
src/trash/trashapplet.h (+0/-123)
src/trash/xstuff.c (+0/-607)
src/trash/xstuff.h (+0/-35)
src/volume-control/volume-control.glade (+0/-159)
src/weather/forecastdialogs.py (+0/-188)
src/weather/helpers.py (+0/-40)
src/weather/images/Makefile.am (+0/-53)
src/weather/locale/Makefile.am (+0/-6)
src/weather/locale/es/LC_MESSAGES/Makefile.am (+0/-5)
src/weather/locale/es/Makefile.am (+0/-1)
src/weather/locale/fr/LC_MESSAGES/Makefile.am (+0/-5)
src/weather/locale/fr/Makefile.am (+0/-1)
src/weather/locale/nb/LC_MESSAGES/Makefile.am (+0/-5)
src/weather/locale/nb/Makefile.am (+0/-1)
src/weather/locale/nn/LC_MESSAGES/Makefile.am (+0/-5)
src/weather/locale/nn/Makefile.am (+0/-1)
src/weather/locale/pt/LC_MESSAGES/Makefile.am (+0/-5)
src/weather/locale/pt/Makefile.am (+0/-1)
src/weather/messages.pot (+0/-303)
src/weather/override.py (+0/-42)
src/weather/weather-prefs.glade (+0/-390)
src/weather/weathericons.py (+0/-82)
src/weather/weatherprefs.py (+0/-246)
src/weather/weathertext.py (+0/-90)
src/webapplet/conf.c (+0/-24)
src/webapplet/conf.h (+0/-24)
To merge this branch: bzr merge lp:~awn-extras/awn-extras/extras-trunk-rewrite-and-random-breakage
Reviewer Review Type Date Requested Status
Mark Lee packaging 2009-10-06 Approve on 2010-01-26
onox (community) Approve on 2009-11-28
Review via email: mp+12944@code.launchpad.net
To post a comment you must log in.
moonbeam (rcryderman) wrote :

Opening this to track remaining blockers. Please note any blockers to merging with trunk.

Mark Lee (malept) wrote :

Gentoo ebuild in desktop-effects needs to be updated.

review: Needs Fixing (packaging)
onox (onox) wrote :

awnsystemmonitor, notification-daemon, and calendar depend on gconf

review: Needs Fixing
moonbeam (rcryderman) wrote :

> awnsystemmonitor, notification-daemon, and calendar depend on gconf

There was never any plan to convert awnsystemmonitor to lda (AFAIK). Moved it to unmaintained with rev 1638 as I'll be devoting my resources to Sysmon instead.

onox (onox) wrote :

> awnsystemmonitor, notification-daemon, and calendar depend on gconf

awnsystemmonitor moved to applets/unmaintained
calendar has been ported, but I haven't tested the calendar integration.

Now all that remains is notification-daemon...

onox (onox) wrote :

notification-daemon seems to have been fixed.

review: Approve
Mark Lee (malept) wrote :

The Gentoo ebuilds are finally merged, this can move forward.

review: Approve (packaging)
1197. By Mark Lee on 2010-01-26

Merge from <lp:~awn-extras/awn-extras/extras-trunk-rewrite-and-random-breakage>, revision 1959.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-02-14 05:15:29 +0000
3+++ .bzrignore 2010-01-26 03:57:13 +0000
4@@ -1,7 +1,11 @@
5 .deps
6 .libs
7+.pydevproject
8+.project
9+.settings
10 Makefile
11 Makefile.in
12+*.cdbs-orig
13 *.desktop
14 *.desktop.in
15 *.gmo
16@@ -10,6 +14,8 @@
17 *.loT
18 *.schemas
19 *.schemas.in
20+*.vala.stamp
21+*.vapi
22 aclocal.m4
23 autom4te.cache
24 config.guess
25@@ -19,32 +25,41 @@
26 config.sub
27 configure
28 depcomp
29+doltcompile
30+doltlibtool
31+gmon.out
32 install-sh
33 intltool-*
34 libtool
35 ltmain.sh
36 missing
37+py-compile
38+stamp-h1
39+applets/maintained/garbage/*.c
40+applets/maintained/notification-area/na-prefs.c
41+applets/maintained/notification-area/notification-area.c
42+applets/maintained/notification-daemon/notificationdaemon-dbus-glue.h
43+applets/maintained/showdesktop/*.c
44+applets/maintained/vala-test/*.c
45+debian/*.debhelper.log
46+debian/*.postinst.debhelper
47+debian/*.postrm.debhelper
48+debian/*.preinst.debhelper
49+debian/*.prerm.debhelper
50+debian/*.substvars
51+debian/*-trunk/
52+debian/files
53+debian/stamp-autotools-files
54+debian/stamp-makefile-build
55+debian/stamp-patched
56+debian/tmp/
57+m4/intltool.m4
58+m4/libtool.m4
59+m4/lt*.m4
60 po/.intltool-merge-cache
61 po/Makefile.in.in
62 po/POTFILES
63 po/stamp-it
64-py-compile
65-src/Taskmand-applet/client-bindings.h
66-src/Taskmand-applet/server-bindings.h
67-src/affinity/affinity-preferences/affinity-preferences
68-src/awn-notification-daemon/src/daemon/notificationdaemon-dbus-glue.h
69-src/libawn-extras/awn-extras.pc
70-src/libawn-extras/bindings/python/awn_extras.c
71-src/libawn-extras/bindings/python/defs.py
72-src/taskmand/client-bindings.h
73-src/taskmand/data/org.awnproject.taskmand.service
74-src/taskmand/server-bindings.h
75-src/taskmand/taskmand
76-src/simple-launcher/applet.[ch]
77-src/standalone-launcher/applet.[ch]
78-SRc/standalone-launcher/applet.h
79-src/vala-test/applet.[ch]
80-stamp-h1
81-.pydevproject
82-.project
83-.settings
84+shared/python/__init__.py
85+shave/shave
86+shave/shave-libtool
87
88=== added file 'COPYING.BSD'
89--- COPYING.BSD 1970-01-01 00:00:00 +0000
90+++ COPYING.BSD 2010-01-26 03:57:13 +0000
91@@ -0,0 +1,26 @@
92+Copyright (c) The Regents of the University of California.
93+All rights reserved.
94+
95+Redistribution and use in source and binary forms, with or without
96+modification, are permitted provided that the following conditions
97+are met:
98+1. Redistributions of source code must retain the above copyright
99+ notice, this list of conditions and the following disclaimer.
100+2. Redistributions in binary form must reproduce the above copyright
101+ notice, this list of conditions and the following disclaimer in the
102+ documentation and/or other materials provided with the distribution.
103+3. Neither the name of the University nor the names of its contributors
104+ may be used to endorse or promote products derived from this software
105+ without specific prior written permission.
106+
107+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
108+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
109+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
110+ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
111+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
112+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
113+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
114+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
115+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
116+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
117+SUCH DAMAGE.
118
119=== added file 'COPYING.CCASAv3.0'
120--- COPYING.CCASAv3.0 1970-01-01 00:00:00 +0000
121+++ COPYING.CCASAv3.0 2010-01-26 03:57:13 +0000
122@@ -0,0 +1,350 @@
123+Creative Commons Attribution-Share Alike 3.0 License.
124+
125+ THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
126+ COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
127+ COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
128+ AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
129+
130+ BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
131+ BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE
132+ CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED
133+ HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
134+
135+ 1. Definitions
136+
137+ 1. "Adaptation" means a work based upon the Work, or upon the Work and other
138+ pre-existing works, such as a translation, adaptation, derivative work,
139+ arrangement of music or other alterations of a literary or artistic work, or
140+ phonogram or performance and includes cinematographic adaptations or any
141+ other form in which the Work may be recast, transformed, or adapted
142+ including in any form recognizably derived from the original, except that a
143+ work that constitutes a Collection will not be considered an Adaptation for
144+ the purpose of this License. For the avoidance of doubt, where the Work is a
145+ musical work, performance or phonogram, the synchronization of the Work in
146+ timed-relation with a moving image ("synching") will be considered an
147+ Adaptation for the purpose of this License.
148+
149+ 2. "Collection" means a collection of literary or artistic works, such as
150+ encyclopedias and anthologies, or performances, phonograms or broadcasts, or
151+ other works or subject matter other than works listed in Section 1(f) below,
152+ which, by reason of the selection and arrangement of their contents,
153+ constitute intellectual creations, in which the Work is included in its
154+ entirety in unmodified form along with one or more other contributions,
155+ each constituting separate and independent works in themselves, which
156+ together are assembled into a collective whole. A work that constitutes a
157+ Collection will not be considered an Adaptation (as defined below) for the
158+ purposes of this License.
159+
160+ 3. "Creative Commons Compatible License" means a license that is listed at
161+ http://creativecommons.org/compatiblelicenses that has been approved by
162+ Creative Commons as being essentially equivalent to this License, including,
163+ at a minimum, because that license: (i) contains terms that have the same
164+ purpose, meaning and effect as the License Elements of this License; and,
165+ (ii) explicitly permits the relicensing of adaptations of works made
166+ available under that license under this License or a Creative Commons
167+ jurisdiction license with the same License Elements as this License.
168+
169+ 4. "Distribute" means to make available to the public the original and
170+ copies of the Work or Adaptation, as appropriate, through sale or other
171+ transfer of ownership.
172+
173+ 5. "License Elements" means the following high-level license attributes
174+ as selected by Licensor and indicated in the title of this License:
175+ Attribution, ShareAlike.
176+
177+ 6. "Licensor" means the individual, individuals, entity or entities that
178+ offer(s) the Work under the terms of this License.
179+
180+ 7. "Original Author" means, in the case of a literary or artistic work, the
181+ individual, individuals, entity or entities who created the Work or if no
182+ individual or entity can be identified, the publisher; and in addition
183+ (i) in the case of a performance the actors, singers, musicians, dancers,
184+ and other persons who act, sing, deliver, declaim, play in, interpret or
185+ otherwise perform literary or artistic works or expressions of folklore;
186+ (ii) in the case of a phonogram the producer being the person or legal
187+ entity who first fixes the sounds of a performance or other sounds; and,
188+ (iii) in the case of broadcasts, the organization that transmits the
189+ broadcast.
190+
191+ 8. "Work" means the literary and/or artistic work offered under the terms
192+ of this License including without limitation any production in the literary,
193+ scientific and artistic domain, whatever may be the mode or form of its
194+ expression including digital form, such as a book, pamphlet and other
195+ writing; a lecture, address, sermon or other work of the same nature; a
196+ dramatic or dramatico-musical work; a choreographic work or entertainment
197+ in dumb show; a musical composition with or without words; a cinematographic
198+ work to which are assimilated works expressed by a process analogous to
199+ cinematography; a work of drawing, painting, architecture, sculpture,
200+ engraving or lithography; a photographic work to which are assimilated works
201+ expressed by a process analogous to photography; a work of applied art;
202+ an illustration, map, plan, sketch or three-dimensional work relative to
203+ geography, topography, architecture or science; a performance; a broadcast;
204+ a phonogram; a compilation of data to the extent it is protected as a
205+ copyrightable work; or a work performed by a variety or circus performer
206+ to the extent it is not otherwise considered a literary or artistic work.
207+
208+ 9. "You" means an individual or entity exercising rights under this License
209+ who has not previously violated the terms of this License with respect to
210+ the Work, or who has received express permission from the Licensor to
211+ exercise rights under this License despite a previous violation.
212+
213+ 10. "Publicly Perform" means to perform public recitations of the Work and
214+ to communicate to the public those public recitations, by any means or
215+ process, including by wire or wireless means or public digital performances;
216+ to make available to the public Works in such a way that members of the
217+ public may access these Works from a place and at a place individually
218+ chosen by them; to perform the Work to the public by any means or process
219+ and the communication to the public of the performances of the Work,
220+ including by public digital performance; to broadcast and rebroadcast the
221+ Work by any means including signs, sounds or images.
222+
223+ 11. "Reproduce" means to make copies of the Work by any means including
224+ without limitation by sound or visual recordings and the right of fixation
225+ and reproducing fixations of the Work, including storage of a protected
226+ performance or phonogram in digital form or other electronic medium.
227+
228+ 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
229+ limit, or restrict any uses free from copyright or rights arising from
230+ limitations or exceptions that are provided for in connection with the
231+ copyright protection under copyright law or other applicable laws.
232+
233+ 3. License Grant. Subject to the terms and conditions of this License,
234+ Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
235+ perpetual (for the duration of the applicable copyright) license to
236+ exercise the rights in the Work as stated below:
237+
238+ 1. to Reproduce the Work, to incorporate the Work into one or more
239+ Collections, and to Reproduce the Work as incorporated in the Collections;
240+
241+ 2. to create and Reproduce Adaptations provided that any such Adaptation,
242+ including any translation in any medium, takes reasonable steps to clearly
243+ label, demarcate or otherwise identify that changes were made to the
244+ original Work. For example, a translation could be marked "The original work
245+ was translated from English to Spanish," or a modification could indicate
246+ "The original work has been modified.";
247+
248+ 3. to Distribute and Publicly Perform the Work including as incorporated in
249+ Collections; and,
250+
251+ 4. to Distribute and Publicly Perform Adaptations.
252+ 5. For the avoidance of doubt:
253+ 1. Non-waivable Compulsory License Schemes. In those jurisdictions in
254+ which the right to collect royalties through any statutory or compulsory
255+ licensing scheme cannot be waived, the Licensor reserves the exclusive right
256+ to collect such royalties for any exercise by You of the rights granted
257+ under this License;
258+ 2. Waivable Compulsory License Schemes. In those jurisdictions in
259+ which the right to collect royalties through any statutory or compulsory
260+ licensing scheme can be waived, the Licensor waives the exclusive right to
261+ collect such royalties for any exercise by You of the rights granted under
262+ this License; and,
263+ 3. Voluntary License Schemes. The Licensor waives the right to collect
264+ royalties, whether individually or, in the event that the Licensor is a
265+ member of a collecting society that administers voluntary licensing schemes,
266+ via that society, from any exercise by You of the rights granted under this
267+ License.
268+
269+ The above rights may be exercised in all media and formats whether now known
270+ or hereafter devised. The above rights include the right to make such
271+ modifications as are technically necessary to exercise the rights in other
272+ media and formats. Subject to Section 8(f), all rights not expressly granted
273+ by Licensor are hereby reserved.
274+
275+ 4. Restrictions. The license granted in Section 3 above is expressly made
276+ subject to and limited by the following restrictions:
277+
278+ 1. You may Distribute or Publicly Perform the Work only under the terms of
279+ this License. You must include a copy of, or the Uniform Resource Identifier
280+ (URI) for, this License with every copy of the Work You Distribute or
281+ Publicly Perform. You may not offer or impose any terms on the Work that
282+ restrict the terms of this License or the ability of the recipient of the
283+ Work to exercise the rights granted to that recipient under the terms
284+ of the License. You may not sublicense the Work. You must keep intact all
285+ notices that refer to this License and to the disclaimer of warranties with
286+ every copy of the Work You Distribute or Publicly Perform. When You
287+ Distribute or Publicly Perform the Work, You may not impose any effective
288+ technological measures on the Work that restrict the ability of a recipient
289+ of the Work from You to exercise the rights granted to that recipient under
290+ the terms of the License. This Section 4(a) applies to the Work as
291+ incorporated in a Collection, but this does not require the Collection
292+ apart from the Work itself to be made subject to the terms of this License.
293+ If You create a Collection, upon notice from any Licensor You must, to the
294+ extent practicable, remove from the Collection any credit as required by
295+ Section 4©, as requested. If You create an Adaptation, upon notice from
296+ any Licensor You must, to the extent practicable, remove from the Adaptation
297+ any credit as required by Section 4©, as requested.
298+
299+ 2. You may Distribute or Publicly Perform an Adaptation only under the terms
300+ of:
301+ (i) this License;
302+ (ii) a later version of this License with the same License Elements as this
303+ License;
304+ (iii) a Creative Commons jurisdiction license (either this or a later
305+ license version) that contains the same License Elements as this License
306+ (e.g., Attribution-ShareAlike 3.0 US));
307+ (iv) a Creative Commons Compatible License. If you license the Adaptation
308+ under one of the licenses mentioned in (iv), you must comply with the terms
309+ of that license. If you license the Adaptation under the terms of any of
310+ the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"),
311+ you must comply with the terms of the Applicable License generally and the
312+ following provisions:
313+ (I) You must include a copy of, or the URI for, the Applicable License with
314+ every copy of each Adaptation You Distribute or Publicly Perform;
315+ (II) You may not offer or impose any terms on the Adaptation that restrict
316+ the terms of the Applicable License or the ability of the recipient of the
317+ Adaptation to exercise the rights granted to that recipient under the terms
318+ of the Applicable License;
319+ (III) You must keep intact all notices that refer to the Applicable License
320+ and to the disclaimer of warranties with every copy of the Work as included
321+ in the Adaptation You Distribute or Publicly Perform;
322+ (IV) when You Distribute or Publicly Perform the Adaptation, You may not
323+ impose any effective technological measures on the Adaptation that restrict
324+ the ability of a recipient of the Adaptation from You to exercise the
325+ rights granted to that recipient under the terms of the Applicable License.
326+ This Section 4(b) applies to the Adaptation as incorporated in a
327+ Collection, but this does not require the Collection apart from the
328+ Adaptation itself to be made subject to the terms of the Applicable License.
329+
330+ 3. If You Distribute, or Publicly Perform the Work or any Adaptations or
331+ Collections, You must, unless a request has been made pursuant to Section
332+ 4(a), keep intact all copyright notices for the Work and provide,
333+ reasonable to the medium or means You are utilizing:
334+ (i) the name of the Original Author (or pseudonym, if applicable) if
335+ supplied, and/or if the Original Author and/or Licensor designate another
336+ party or parties (e.g., a sponsor institute, publishing entity, journal)
337+ for attribution ("Attribution Parties") in Licensor's copyright notice,
338+ terms of service or by other reasonable means, the name of such party or
339+ parties;
340+ (ii) the title of the Work if supplied;
341+ (iii) to the extent reasonably practicable, the URI, if any, that Licensor
342+ specifies to be associated with the Work, unless such URI does not refer to
343+ the copyright notice or licensing information for the Work; and
344+ (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit
345+ identifying the use of the Work in the Adaptation (e.g., "French translation
346+ of the Work by Original Author," or "Screenplay based on original Work by
347+ Original Author"). The credit required by this Section 4© may be
348+ implemented in any reasonable manner; provided, however, that in the case
349+ of a Adaptation or Collection, at a minimum such credit will appear, if a
350+ credit for all contributing authors of the Adaptation or Collection
351+ appears, then as part of these credits and in a manner at least as prominent
352+ as the credits for the other contributing authors. For the avoidance of
353+ doubt, You may only use the credit required by this Section for the purpose
354+ of attribution in the manner set out above and, by exercising Your rights
355+ under this License, You may not implicitly or explicitly assert or imply
356+ any connection with, sponsorship or endorsement by the Original Author,
357+ Licensor and/or Attribution Parties, as appropriate, of You or Your use of
358+ the Work, without the separate, express prior written permission of the
359+ Original Author, Licensor and/or Attribution Parties.
360+
361+ 4. Except as otherwise agreed in writing by the Licensor or as may be
362+ otherwise permitted by applicable law, if You Reproduce, Distribute or
363+ Publicly Perform the Work either by itself or as part of any Adaptations
364+ or Collections, You must not distort, mutilate, modify or take other
365+ derogatory action in relation to the Work which would be prejudicial to the
366+ Original Author's honor or reputation. Licensor agrees that in those
367+ jurisdictions (e.g. Japan), in which any exercise of the right granted in
368+ Section 3(b) of this License (the right to make Adaptations) would be
369+ deemed to be a distortion, mutilation, modification or other derogatory
370+ action prejudicial to the Original Author's honor and reputation, the
371+ Licensor will waive or not assert, as appropriate, this Section, to the
372+ fullest extent permitted by the applicable national law, to enable You to
373+ reasonably exercise Your right under Section 3(b) of this License (right
374+ to make Adaptations) but not otherwise.
375+
376+ 5. Representations, Warranties and Disclaimer
377+
378+ UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
379+ OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
380+ KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
381+ INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
382+ FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT
383+ OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER
384+ OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF
385+ IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
386+
387+ 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
388+ LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
389+ ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
390+ ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
391+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
392+
393+ 7. Termination
394+
395+ 1. This License and the rights granted hereunder will terminate
396+ automatically upon any breach by You of the terms of this License.
397+ Individuals or entities who have received Adaptations or Collections from
398+ You under this License, however, will not have their licenses terminated
399+ provided such individuals or entities remain in full compliance with those
400+ licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of
401+ this License.
402+
403+ 2. Subject to the above terms and conditions, the license granted here is
404+ perpetual (for the duration of the applicable copyright in the Work).
405+ Notwithstanding the above, Licensor reserves the right to release the Work
406+ under different license terms or to stop distributing the Work at any time;
407+ provided, however that any such election will not serve to withdraw this
408+ License (or any other license that has been, or is required to be, granted
409+ under the terms of this License), and this License will continue in full
410+ force and effect unless terminated as stated above.
411+
412+ 8. Miscellaneous
413+
414+ 1. Each time You Distribute or Publicly Perform the Work or a Collection,
415+ the Licensor offers to the recipient a license to the Work on the same
416+ terms and conditions as the license granted to You under this License.
417+
418+ 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor
419+ offers to the recipient a license to the original Work on the same terms
420+ and conditions as the license granted to You under this License.
421+
422+ 3. If any provision of this License is invalid or unenforceable under
423+ applicable law, it shall not affect the validity or enforceability of the
424+ remainder of the terms of this License, and without further action by the
425+ parties to this agreement, such provision shall be reformed to the minimum
426+ extent necessary to make such provision valid and enforceable.
427+
428+ 4. No term or provision of this License shall be deemed waived and no
429+ breach consented to unless such waiver or consent shall be in writing and
430+ signed by the party to be charged with such waiver or consent.
431+
432+ 5. This License constitutes the entire agreement between the parties with
433+ respect to the Work licensed here. There are no understandings, agreements
434+ or representations with respect to the Work not specified here. Licensor
435+ shall not be bound by any additional provisions that may appear in any
436+ communication from You. This License may not be modified without the mutual
437+ written agreement of the Licensor and You.
438+
439+ 6. The rights granted under, and the subject matter referenced, in this
440+ License were drafted utilizing the terminology of the Berne Convention
441+ for the Protection of Literary and Artistic Works (as amended on September
442+ 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996,
443+ the WIPO Performances and Phonograms Treaty of 1996 and the Universal
444+ Copyright Convention (as revised on July 24, 1971). These rights and subject
445+ matter take effect in the relevant jurisdiction in which the License terms
446+ are sought to be enforced according to the corresponding provisions of the
447+ implementation of those treaty provisions in the applicable national law.
448+ If the standard suite of rights granted under applicable copyright law
449+ includes additional rights not granted under this License, such additional
450+ rights are deemed to be included in the License; this License is not
451+ intended to restrict the license of any rights under applicable law.
452+
453+ Creative Commons Notice
454+
455+ Creative Commons is not a party to this License, and makes no warranty
456+ whatsoever in connection with the Work. Creative Commons will not be liable
457+ to You or any party on any legal theory for any damages whatsoever,
458+ including without limitation any general, special, incidental or
459+ consequential damages arising in connection to this license. Notwithstanding
460+ the foregoing two (2) sentences, if Creative Commons has expressly
461+ identified itself as the Licensor hereunder, it shall have all rights and
462+ obligations of Licensor.
463+
464+ Except for the limited purpose of indicating to the public that the Work
465+ is licensed under the CCPL, Creative Commons does not authorize the use by
466+ either party of the trademark "Creative Commons" or any related trademark
467+ or logo of Creative Commons without the prior written consent of Creative
468+ Commons. Any permitted use will be in compliance with Creative Commons'
469+ then-current trademark usage guidelines, as may be published on its website
470+ or otherwise made available upon request from time to time. For the
471+ avoidance of doubt, this trademark restriction does not form part of the
472+ License.
473
474=== added file 'COPYING.GPL-3'
475--- COPYING.GPL-3 1970-01-01 00:00:00 +0000
476+++ COPYING.GPL-3 2010-01-26 03:57:13 +0000
477@@ -0,0 +1,676 @@
478+
479+ GNU GENERAL PUBLIC LICENSE
480+ Version 3, 29 June 2007
481+
482+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
483+ Everyone is permitted to copy and distribute verbatim copies
484+ of this license document, but changing it is not allowed.
485+
486+ Preamble
487+
488+ The GNU General Public License is a free, copyleft license for
489+software and other kinds of works.
490+
491+ The licenses for most software and other practical works are designed
492+to take away your freedom to share and change the works. By contrast,
493+the GNU General Public License is intended to guarantee your freedom to
494+share and change all versions of a program--to make sure it remains free
495+software for all its users. We, the Free Software Foundation, use the
496+GNU General Public License for most of our software; it applies also to
497+any other work released this way by its authors. You can apply it to
498+your programs, too.
499+
500+ When we speak of free software, we are referring to freedom, not
501+price. Our General Public Licenses are designed to make sure that you
502+have the freedom to distribute copies of free software (and charge for
503+them if you wish), that you receive source code or can get it if you
504+want it, that you can change the software or use pieces of it in new
505+free programs, and that you know you can do these things.
506+
507+ To protect your rights, we need to prevent others from denying you
508+these rights or asking you to surrender the rights. Therefore, you have
509+certain responsibilities if you distribute copies of the software, or if
510+you modify it: responsibilities to respect the freedom of others.
511+
512+ For example, if you distribute copies of such a program, whether
513+gratis or for a fee, you must pass on to the recipients the same
514+freedoms that you received. You must make sure that they, too, receive
515+or can get the source code. And you must show them these terms so they
516+know their rights.
517+
518+ Developers that use the GNU GPL protect your rights with two steps:
519+(1) assert copyright on the software, and (2) offer you this License
520+giving you legal permission to copy, distribute and/or modify it.
521+
522+ For the developers' and authors' protection, the GPL clearly explains
523+that there is no warranty for this free software. For both users' and
524+authors' sake, the GPL requires that modified versions be marked as
525+changed, so that their problems will not be attributed erroneously to
526+authors of previous versions.
527+
528+ Some devices are designed to deny users access to install or run
529+modified versions of the software inside them, although the manufacturer
530+can do so. This is fundamentally incompatible with the aim of
531+protecting users' freedom to change the software. The systematic
532+pattern of such abuse occurs in the area of products for individuals to
533+use, which is precisely where it is most unacceptable. Therefore, we
534+have designed this version of the GPL to prohibit the practice for those
535+products. If such problems arise substantially in other domains, we
536+stand ready to extend this provision to those domains in future versions
537+of the GPL, as needed to protect the freedom of users.
538+
539+ Finally, every program is threatened constantly by software patents.
540+States should not allow patents to restrict development and use of
541+software on general-purpose computers, but in those that do, we wish to
542+avoid the special danger that patents applied to a free program could
543+make it effectively proprietary. To prevent this, the GPL assures that
544+patents cannot be used to render the program non-free.
545+
546+ The precise terms and conditions for copying, distribution and
547+modification follow.
548+
549+ TERMS AND CONDITIONS
550+
551+ 0. Definitions.
552+
553+ "This License" refers to version 3 of the GNU General Public License.
554+
555+ "Copyright" also means copyright-like laws that apply to other kinds of
556+works, such as semiconductor masks.
557+
558+ "The Program" refers to any copyrightable work licensed under this
559+License. Each licensee is addressed as "you". "Licensees" and
560+"recipients" may be individuals or organizations.
561+
562+ To "modify" a work means to copy from or adapt all or part of the work
563+in a fashion requiring copyright permission, other than the making of an
564+exact copy. The resulting work is called a "modified version" of the
565+earlier work or a work "based on" the earlier work.
566+
567+ A "covered work" means either the unmodified Program or a work based
568+on the Program.
569+
570+ To "propagate" a work means to do anything with it that, without
571+permission, would make you directly or secondarily liable for
572+infringement under applicable copyright law, except executing it on a
573+computer or modifying a private copy. Propagation includes copying,
574+distribution (with or without modification), making available to the
575+public, and in some countries other activities as well.
576+
577+ To "convey" a work means any kind of propagation that enables other
578+parties to make or receive copies. Mere interaction with a user through
579+a computer network, with no transfer of a copy, is not conveying.
580+
581+ An interactive user interface displays "Appropriate Legal Notices"
582+to the extent that it includes a convenient and prominently visible
583+feature that (1) displays an appropriate copyright notice, and (2)
584+tells the user that there is no warranty for the work (except to the
585+extent that warranties are provided), that licensees may convey the
586+work under this License, and how to view a copy of this License. If
587+the interface presents a list of user commands or options, such as a
588+menu, a prominent item in the list meets this criterion.
589+
590+ 1. Source Code.
591+
592+ The "source code" for a work means the preferred form of the work
593+for making modifications to it. "Object code" means any non-source
594+form of a work.
595+
596+ A "Standard Interface" means an interface that either is an official
597+standard defined by a recognized standards body, or, in the case of
598+interfaces specified for a particular programming language, one that
599+is widely used among developers working in that language.
600+
601+ The "System Libraries" of an executable work include anything, other
602+than the work as a whole, that (a) is included in the normal form of
603+packaging a Major Component, but which is not part of that Major
604+Component, and (b) serves only to enable use of the work with that
605+Major Component, or to implement a Standard Interface for which an
606+implementation is available to the public in source code form. A
607+"Major Component", in this context, means a major essential component
608+(kernel, window system, and so on) of the specific operating system
609+(if any) on which the executable work runs, or a compiler used to
610+produce the work, or an object code interpreter used to run it.
611+
612+ The "Corresponding Source" for a work in object code form means all
613+the source code needed to generate, install, and (for an executable
614+work) run the object code and to modify the work, including scripts to
615+control those activities. However, it does not include the work's
616+System Libraries, or general-purpose tools or generally available free
617+programs which are used unmodified in performing those activities but
618+which are not part of the work. For example, Corresponding Source
619+includes interface definition files associated with source files for
620+the work, and the source code for shared libraries and dynamically
621+linked subprograms that the work is specifically designed to require,
622+such as by intimate data communication or control flow between those
623+subprograms and other parts of the work.
624+
625+ The Corresponding Source need not include anything that users
626+can regenerate automatically from other parts of the Corresponding
627+Source.
628+
629+ The Corresponding Source for a work in source code form is that
630+same work.
631+
632+ 2. Basic Permissions.
633+
634+ All rights granted under this License are granted for the term of
635+copyright on the Program, and are irrevocable provided the stated
636+conditions are met. This License explicitly affirms your unlimited
637+permission to run the unmodified Program. The output from running a
638+covered work is covered by this License only if the output, given its
639+content, constitutes a covered work. This License acknowledges your
640+rights of fair use or other equivalent, as provided by copyright law.
641+
642+ You may make, run and propagate covered works that you do not
643+convey, without conditions so long as your license otherwise remains
644+in force. You may convey covered works to others for the sole purpose
645+of having them make modifications exclusively for you, or provide you
646+with facilities for running those works, provided that you comply with
647+the terms of this License in conveying all material for which you do
648+not control copyright. Those thus making or running the covered works
649+for you must do so exclusively on your behalf, under your direction
650+and control, on terms that prohibit them from making any copies of
651+your copyrighted material outside their relationship with you.
652+
653+ Conveying under any other circumstances is permitted solely under
654+the conditions stated below. Sublicensing is not allowed; section 10
655+makes it unnecessary.
656+
657+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
658+
659+ No covered work shall be deemed part of an effective technological
660+measure under any applicable law fulfilling obligations under article
661+11 of the WIPO copyright treaty adopted on 20 December 1996, or
662+similar laws prohibiting or restricting circumvention of such
663+measures.
664+
665+ When you convey a covered work, you waive any legal power to forbid
666+circumvention of technological measures to the extent such circumvention
667+is effected by exercising rights under this License with respect to
668+the covered work, and you disclaim any intention to limit operation or
669+modification of the work as a means of enforcing, against the work's
670+users, your or third parties' legal rights to forbid circumvention of
671+technological measures.
672+
673+ 4. Conveying Verbatim Copies.
674+
675+ You may convey verbatim copies of the Program's source code as you
676+receive it, in any medium, provided that you conspicuously and
677+appropriately publish on each copy an appropriate copyright notice;
678+keep intact all notices stating that this License and any
679+non-permissive terms added in accord with section 7 apply to the code;
680+keep intact all notices of the absence of any warranty; and give all
681+recipients a copy of this License along with the Program.
682+
683+ You may charge any price or no price for each copy that you convey,
684+and you may offer support or warranty protection for a fee.
685+
686+ 5. Conveying Modified Source Versions.
687+
688+ You may convey a work based on the Program, or the modifications to
689+produce it from the Program, in the form of source code under the
690+terms of section 4, provided that you also meet all of these conditions:
691+
692+ a) The work must carry prominent notices stating that you modified
693+ it, and giving a relevant date.
694+
695+ b) The work must carry prominent notices stating that it is
696+ released under this License and any conditions added under section
697+ 7. This requirement modifies the requirement in section 4 to
698+ "keep intact all notices".
699+
700+ c) You must license the entire work, as a whole, under this
701+ License to anyone who comes into possession of a copy. This
702+ License will therefore apply, along with any applicable section 7
703+ additional terms, to the whole of the work, and all its parts,
704+ regardless of how they are packaged. This License gives no
705+ permission to license the work in any other way, but it does not
706+ invalidate such permission if you have separately received it.
707+
708+ d) If the work has interactive user interfaces, each must display
709+ Appropriate Legal Notices; however, if the Program has interactive
710+ interfaces that do not display Appropriate Legal Notices, your
711+ work need not make them do so.
712+
713+ A compilation of a covered work with other separate and independent
714+works, which are not by their nature extensions of the covered work,
715+and which are not combined with it such as to form a larger program,
716+in or on a volume of a storage or distribution medium, is called an
717+"aggregate" if the compilation and its resulting copyright are not
718+used to limit the access or legal rights of the compilation's users
719+beyond what the individual works permit. Inclusion of a covered work
720+in an aggregate does not cause this License to apply to the other
721+parts of the aggregate.
722+
723+ 6. Conveying Non-Source Forms.
724+
725+ You may convey a covered work in object code form under the terms
726+of sections 4 and 5, provided that you also convey the
727+machine-readable Corresponding Source under the terms of this License,
728+in one of these ways:
729+
730+ a) Convey the object code in, or embodied in, a physical product
731+ (including a physical distribution medium), accompanied by the
732+ Corresponding Source fixed on a durable physical medium
733+ customarily used for software interchange.
734+
735+ b) Convey the object code in, or embodied in, a physical product
736+ (including a physical distribution medium), accompanied by a
737+ written offer, valid for at least three years and valid for as
738+ long as you offer spare parts or customer support for that product
739+ model, to give anyone who possesses the object code either (1) a
740+ copy of the Corresponding Source for all the software in the
741+ product that is covered by this License, on a durable physical
742+ medium customarily used for software interchange, for a price no
743+ more than your reasonable cost of physically performing this
744+ conveying of source, or (2) access to copy the
745+ Corresponding Source from a network server at no charge.
746+
747+ c) Convey individual copies of the object code with a copy of the
748+ written offer to provide the Corresponding Source. This
749+ alternative is allowed only occasionally and noncommercially, and
750+ only if you received the object code with such an offer, in accord
751+ with subsection 6b.
752+
753+ d) Convey the object code by offering access from a designated
754+ place (gratis or for a charge), and offer equivalent access to the
755+ Corresponding Source in the same way through the same place at no
756+ further charge. You need not require recipients to copy the
757+ Corresponding Source along with the object code. If the place to
758+ copy the object code is a network server, the Corresponding Source
759+ may be on a different server (operated by you or a third party)
760+ that supports equivalent copying facilities, provided you maintain
761+ clear directions next to the object code saying where to find the
762+ Corresponding Source. Regardless of what server hosts the
763+ Corresponding Source, you remain obligated to ensure that it is
764+ available for as long as needed to satisfy these requirements.
765+
766+ e) Convey the object code using peer-to-peer transmission, provided
767+ you inform other peers where the object code and Corresponding
768+ Source of the work are being offered to the general public at no
769+ charge under subsection 6d.
770+
771+ A separable portion of the object code, whose source code is excluded
772+from the Corresponding Source as a System Library, need not be
773+included in conveying the object code work.
774+
775+ A "User Product" is either (1) a "consumer product", which means any
776+tangible personal property which is normally used for personal, family,
777+or household purposes, or (2) anything designed or sold for incorporation
778+into a dwelling. In determining whether a product is a consumer product,
779+doubtful cases shall be resolved in favor of coverage. For a particular
780+product received by a particular user, "normally used" refers to a
781+typical or common use of that class of product, regardless of the status
782+of the particular user or of the way in which the particular user
783+actually uses, or expects or is expected to use, the product. A product
784+is a consumer product regardless of whether the product has substantial
785+commercial, industrial or non-consumer uses, unless such uses represent
786+the only significant mode of use of the product.
787+
788+ "Installation Information" for a User Product means any methods,
789+procedures, authorization keys, or other information required to install
790+and execute modified versions of a covered work in that User Product from
791+a modified version of its Corresponding Source. The information must
792+suffice to ensure that the continued functioning of the modified object
793+code is in no case prevented or interfered with solely because
794+modification has been made.
795+
796+ If you convey an object code work under this section in, or with, or
797+specifically for use in, a User Product, and the conveying occurs as
798+part of a transaction in which the right of possession and use of the
799+User Product is transferred to the recipient in perpetuity or for a
800+fixed term (regardless of how the transaction is characterized), the
801+Corresponding Source conveyed under this section must be accompanied
802+by the Installation Information. But this requirement does not apply
803+if neither you nor any third party retains the ability to install
804+modified object code on the User Product (for example, the work has
805+been installed in ROM).
806+
807+ The requirement to provide Installation Information does not include a
808+requirement to continue to provide support service, warranty, or updates
809+for a work that has been modified or installed by the recipient, or for
810+the User Product in which it has been modified or installed. Access to a
811+network may be denied when the modification itself materially and
812+adversely affects the operation of the network or violates the rules and
813+protocols for communication across the network.
814+
815+ Corresponding Source conveyed, and Installation Information provided,
816+in accord with this section must be in a format that is publicly
817+documented (and with an implementation available to the public in
818+source code form), and must require no special password or key for
819+unpacking, reading or copying.
820+
821+ 7. Additional Terms.
822+
823+ "Additional permissions" are terms that supplement the terms of this
824+License by making exceptions from one or more of its conditions.
825+Additional permissions that are applicable to the entire Program shall
826+be treated as though they were included in this License, to the extent
827+that they are valid under applicable law. If additional permissions
828+apply only to part of the Program, that part may be used separately
829+under those permissions, but the entire Program remains governed by
830+this License without regard to the additional permissions.
831+
832+ When you convey a copy of a covered work, you may at your option
833+remove any additional permissions from that copy, or from any part of
834+it. (Additional permissions may be written to require their own
835+removal in certain cases when you modify the work.) You may place
836+additional permissions on material, added by you to a covered work,
837+for which you have or can give appropriate copyright permission.
838+
839+ Notwithstanding any other provision of this License, for material you
840+add to a covered work, you may (if authorized by the copyright holders of
841+that material) supplement the terms of this License with terms:
842+
843+ a) Disclaiming warranty or limiting liability differently from the
844+ terms of sections 15 and 16 of this License; or
845+
846+ b) Requiring preservation of specified reasonable legal notices or
847+ author attributions in that material or in the Appropriate Legal
848+ Notices displayed by works containing it; or
849+
850+ c) Prohibiting misrepresentation of the origin of that material, or
851+ requiring that modified versions of such material be marked in
852+ reasonable ways as different from the original version; or
853+
854+ d) Limiting the use for publicity purposes of names of licensors or
855+ authors of the material; or
856+
857+ e) Declining to grant rights under trademark law for use of some
858+ trade names, trademarks, or service marks; or
859+
860+ f) Requiring indemnification of licensors and authors of that
861+ material by anyone who conveys the material (or modified versions of
862+ it) with contractual assumptions of liability to the recipient, for
863+ any liability that these contractual assumptions directly impose on
864+ those licensors and authors.
865+
866+ All other non-permissive additional terms are considered "further
867+restrictions" within the meaning of section 10. If the Program as you
868+received it, or any part of it, contains a notice stating that it is
869+governed by this License along with a term that is a further
870+restriction, you may remove that term. If a license document contains
871+a further restriction but permits relicensing or conveying under this
872+License, you may add to a covered work material governed by the terms
873+of that license document, provided that the further restriction does
874+not survive such relicensing or conveying.
875+
876+ If you add terms to a covered work in accord with this section, you
877+must place, in the relevant source files, a statement of the
878+additional terms that apply to those files, or a notice indicating
879+where to find the applicable terms.
880+
881+ Additional terms, permissive or non-permissive, may be stated in the
882+form of a separately written license, or stated as exceptions;
883+the above requirements apply either way.
884+
885+ 8. Termination.
886+
887+ You may not propagate or modify a covered work except as expressly
888+provided under this License. Any attempt otherwise to propagate or
889+modify it is void, and will automatically terminate your rights under
890+this License (including any patent licenses granted under the third
891+paragraph of section 11).
892+
893+ However, if you cease all violation of this License, then your
894+license from a particular copyright holder is reinstated (a)
895+provisionally, unless and until the copyright holder explicitly and
896+finally terminates your license, and (b) permanently, if the copyright
897+holder fails to notify you of the violation by some reasonable means
898+prior to 60 days after the cessation.
899+
900+ Moreover, your license from a particular copyright holder is
901+reinstated permanently if the copyright holder notifies you of the
902+violation by some reasonable means, this is the first time you have
903+received notice of violation of this License (for any work) from that
904+copyright holder, and you cure the violation prior to 30 days after
905+your receipt of the notice.
906+
907+ Termination of your rights under this section does not terminate the
908+licenses of parties who have received copies or rights from you under
909+this License. If your rights have been terminated and not permanently
910+reinstated, you do not qualify to receive new licenses for the same
911+material under section 10.
912+
913+ 9. Acceptance Not Required for Having Copies.
914+
915+ You are not required to accept this License in order to receive or
916+run a copy of the Program. Ancillary propagation of a covered work
917+occurring solely as a consequence of using peer-to-peer transmission
918+to receive a copy likewise does not require acceptance. However,
919+nothing other than this License grants you permission to propagate or
920+modify any covered work. These actions infringe copyright if you do
921+not accept this License. Therefore, by modifying or propagating a
922+covered work, you indicate your acceptance of this License to do so.
923+
924+ 10. Automatic Licensing of Downstream Recipients.
925+
926+ Each time you convey a covered work, the recipient automatically
927+receives a license from the original licensors, to run, modify and
928+propagate that work, subject to this License. You are not responsible
929+for enforcing compliance by third parties with this License.
930+
931+ An "entity transaction" is a transaction transferring control of an
932+organization, or substantially all assets of one, or subdividing an
933+organization, or merging organizations. If propagation of a covered
934+work results from an entity transaction, each party to that
935+transaction who receives a copy of the work also receives whatever
936+licenses to the work the party's predecessor in interest had or could
937+give under the previous paragraph, plus a right to possession of the
938+Corresponding Source of the work from the predecessor in interest, if
939+the predecessor has it or can get it with reasonable efforts.
940+
941+ You may not impose any further restrictions on the exercise of the
942+rights granted or affirmed under this License. For example, you may
943+not impose a license fee, royalty, or other charge for exercise of
944+rights granted under this License, and you may not initiate litigation
945+(including a cross-claim or counterclaim in a lawsuit) alleging that
946+any patent claim is infringed by making, using, selling, offering for
947+sale, or importing the Program or any portion of it.
948+
949+ 11. Patents.
950+
951+ A "contributor" is a copyright holder who authorizes use under this
952+License of the Program or a work on which the Program is based. The
953+work thus licensed is called the contributor's "contributor version".
954+
955+ A contributor's "essential patent claims" are all patent claims
956+owned or controlled by the contributor, whether already acquired or
957+hereafter acquired, that would be infringed by some manner, permitted
958+by this License, of making, using, or selling its contributor version,
959+but do not include claims that would be infringed only as a
960+consequence of further modification of the contributor version. For
961+purposes of this definition, "control" includes the right to grant
962+patent sublicenses in a manner consistent with the requirements of
963+this License.
964+
965+ Each contributor grants you a non-exclusive, worldwide, royalty-free
966+patent license under the contributor's essential patent claims, to
967+make, use, sell, offer for sale, import and otherwise run, modify and
968+propagate the contents of its contributor version.
969+
970+ In the following three paragraphs, a "patent license" is any express
971+agreement or commitment, however denominated, not to enforce a patent
972+(such as an express permission to practice a patent or covenant not to
973+sue for patent infringement). To "grant" such a patent license to a
974+party means to make such an agreement or commitment not to enforce a
975+patent against the party.
976+
977+ If you convey a covered work, knowingly relying on a patent license,
978+and the Corresponding Source of the work is not available for anyone
979+to copy, free of charge and under the terms of this License, through a
980+publicly available network server or other readily accessible means,
981+then you must either (1) cause the Corresponding Source to be so
982+available, or (2) arrange to deprive yourself of the benefit of the
983+patent license for this particular work, or (3) arrange, in a manner
984+consistent with the requirements of this License, to extend the patent
985+license to downstream recipients. "Knowingly relying" means you have
986+actual knowledge that, but for the patent license, your conveying the
987+covered work in a country, or your recipient's use of the covered work
988+in a country, would infringe one or more identifiable patents in that
989+country that you have reason to believe are valid.
990+
991+ If, pursuant to or in connection with a single transaction or
992+arrangement, you convey, or propagate by procuring conveyance of, a
993+covered work, and grant a patent license to some of the parties
994+receiving the covered work authorizing them to use, propagate, modify
995+or convey a specific copy of the covered work, then the patent license
996+you grant is automatically extended to all recipients of the covered
997+work and works based on it.
998+
999+ A patent license is "discriminatory" if it does not include within
1000+the scope of its coverage, prohibits the exercise of, or is
1001+conditioned on the non-exercise of one or more of the rights that are
1002+specifically granted under this License. You may not convey a covered
1003+work if you are a party to an arrangement with a third party that is
1004+in the business of distributing software, under which you make payment
1005+to the third party based on the extent of your activity of conveying
1006+the work, and under which the third party grants, to any of the
1007+parties who would receive the covered work from you, a discriminatory
1008+patent license (a) in connection with copies of the covered work
1009+conveyed by you (or copies made from those copies), or (b) primarily
1010+for and in connection with specific products or compilations that
1011+contain the covered work, unless you entered into that arrangement,
1012+or that patent license was granted, prior to 28 March 2007.
1013+
1014+ Nothing in this License shall be construed as excluding or limiting
1015+any implied license or other defenses to infringement that may
1016+otherwise be available to you under applicable patent law.
1017+
1018+ 12. No Surrender of Others' Freedom.
1019+
1020+ If conditions are imposed on you (whether by court order, agreement or
1021+otherwise) that contradict the conditions of this License, they do not
1022+excuse you from the conditions of this License. If you cannot convey a
1023+covered work so as to satisfy simultaneously your obligations under this
1024+License and any other pertinent obligations, then as a consequence you may
1025+not convey it at all. For example, if you agree to terms that obligate you
1026+to collect a royalty for further conveying from those to whom you convey
1027+the Program, the only way you could satisfy both those terms and this
1028+License would be to refrain entirely from conveying the Program.
1029+
1030+ 13. Use with the GNU Affero General Public License.
1031+
1032+ Notwithstanding any other provision of this License, you have
1033+permission to link or combine any covered work with a work licensed
1034+under version 3 of the GNU Affero General Public License into a single
1035+combined work, and to convey the resulting work. The terms of this
1036+License will continue to apply to the part which is the covered work,
1037+but the special requirements of the GNU Affero General Public License,
1038+section 13, concerning interaction through a network will apply to the
1039+combination as such.
1040+
1041+ 14. Revised Versions of this License.
1042+
1043+ The Free Software Foundation may publish revised and/or new versions of
1044+the GNU General Public License from time to time. Such new versions will
1045+be similar in spirit to the present version, but may differ in detail to
1046+address new problems or concerns.
1047+
1048+ Each version is given a distinguishing version number. If the
1049+Program specifies that a certain numbered version of the GNU General
1050+Public License "or any later version" applies to it, you have the
1051+option of following the terms and conditions either of that numbered
1052+version or of any later version published by the Free Software
1053+Foundation. If the Program does not specify a version number of the
1054+GNU General Public License, you may choose any version ever published
1055+by the Free Software Foundation.
1056+
1057+ If the Program specifies that a proxy can decide which future
1058+versions of the GNU General Public License can be used, that proxy's
1059+public statement of acceptance of a version permanently authorizes you
1060+to choose that version for the Program.
1061+
1062+ Later license versions may give you additional or different
1063+permissions. However, no additional obligations are imposed on any
1064+author or copyright holder as a result of your choosing to follow a
1065+later version.
1066+
1067+ 15. Disclaimer of Warranty.
1068+
1069+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
1070+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
1071+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
1072+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
1073+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1074+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
1075+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
1076+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1077+
1078+ 16. Limitation of Liability.
1079+
1080+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1081+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
1082+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
1083+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
1084+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
1085+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
1086+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
1087+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
1088+SUCH DAMAGES.
1089+
1090+ 17. Interpretation of Sections 15 and 16.
1091+
1092+ If the disclaimer of warranty and limitation of liability provided
1093+above cannot be given local legal effect according to their terms,
1094+reviewing courts shall apply local law that most closely approximates
1095+an absolute waiver of all civil liability in connection with the
1096+Program, unless a warranty or assumption of liability accompanies a
1097+copy of the Program in return for a fee.
1098+
1099+ END OF TERMS AND CONDITIONS
1100+
1101+ How to Apply These Terms to Your New Programs
1102+
1103+ If you develop a new program, and you want it to be of the greatest
1104+possible use to the public, the best way to achieve this is to make it
1105+free software which everyone can redistribute and change under these terms.
1106+
1107+ To do so, attach the following notices to the program. It is safest
1108+to attach them to the start of each source file to most effectively
1109+state the exclusion of warranty; and each file should have at least
1110+the "copyright" line and a pointer to where the full notice is found.
1111+
1112+ <one line to give the program's name and a brief idea of what it does.>
1113+ Copyright (C) <year> <name of author>
1114+
1115+ This program is free software: you can redistribute it and/or modify
1116+ it under the terms of the GNU General Public License as published by
1117+ the Free Software Foundation, either version 3 of the License, or
1118+ (at your option) any later version.
1119+
1120+ This program is distributed in the hope that it will be useful,
1121+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1122+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1123+ GNU General Public License for more details.
1124+
1125+ You should have received a copy of the GNU General Public License
1126+ along with this program. If not, see <http://www.gnu.org/licenses/>.
1127+
1128+Also add information on how to contact you by electronic and paper mail.
1129+
1130+ If the program does terminal interaction, make it output a short
1131+notice like this when it starts in an interactive mode:
1132+
1133+ <program> Copyright (C) <year> <name of author>
1134+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1135+ This is free software, and you are welcome to redistribute it
1136+ under certain conditions; type `show c' for details.
1137+
1138+The hypothetical commands `show w' and `show c' should show the appropriate
1139+parts of the General Public License. Of course, your program's commands
1140+might be different; for a GUI interface, you would use an "about box".
1141+
1142+ You should also get your employer (if you work as a programmer) or school,
1143+if any, to sign a "copyright disclaimer" for the program, if necessary.
1144+For more information on this, and how to apply and follow the GNU GPL, see
1145+<http://www.gnu.org/licenses/>.
1146+
1147+ The GNU General Public License does not permit incorporating your program
1148+into proprietary programs. If your program is a subroutine library, you
1149+may consider it more useful to permit linking proprietary applications with
1150+the library. If this is what you want to do, use the GNU Lesser General
1151+Public License instead of this License. But first, please read
1152+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
1153+
1154
1155=== renamed file 'COPYING' => 'COPYING.GPL2'
1156=== added file 'COPYING.LGPL-2.1'
1157--- COPYING.LGPL-2.1 1970-01-01 00:00:00 +0000
1158+++ COPYING.LGPL-2.1 2010-01-26 03:57:13 +0000
1159@@ -0,0 +1,510 @@
1160+
1161+ GNU LESSER GENERAL PUBLIC LICENSE
1162+ Version 2.1, February 1999
1163+
1164+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
1165+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1166+ Everyone is permitted to copy and distribute verbatim copies
1167+ of this license document, but changing it is not allowed.
1168+
1169+[This is the first released version of the Lesser GPL. It also counts
1170+ as the successor of the GNU Library Public License, version 2, hence
1171+ the version number 2.1.]
1172+
1173+ Preamble
1174+
1175+ The licenses for most software are designed to take away your
1176+freedom to share and change it. By contrast, the GNU General Public
1177+Licenses are intended to guarantee your freedom to share and change
1178+free software--to make sure the software is free for all its users.
1179+
1180+ This license, the Lesser General Public License, applies to some
1181+specially designated software packages--typically libraries--of the
1182+Free Software Foundation and other authors who decide to use it. You
1183+can use it too, but we suggest you first think carefully about whether
1184+this license or the ordinary General Public License is the better
1185+strategy to use in any particular case, based on the explanations
1186+below.
1187+
1188+ When we speak of free software, we are referring to freedom of use,
1189+not price. Our General Public Licenses are designed to make sure that
1190+you have the freedom to distribute copies of free software (and charge
1191+for this service if you wish); that you receive source code or can get
1192+it if you want it; that you can change the software and use pieces of
1193+it in new free programs; and that you are informed that you can do
1194+these things.
1195+
1196+ To protect your rights, we need to make restrictions that forbid
1197+distributors to deny you these rights or to ask you to surrender these
1198+rights. These restrictions translate to certain responsibilities for
1199+you if you distribute copies of the library or if you modify it.
1200+
1201+ For example, if you distribute copies of the library, whether gratis
1202+or for a fee, you must give the recipients all the rights that we gave
1203+you. You must make sure that they, too, receive or can get the source
1204+code. If you link other code with the library, you must provide
1205+complete object files to the recipients, so that they can relink them
1206+with the library after making changes to the library and recompiling
1207+it. And you must show them these terms so they know their rights.
1208+
1209+ We protect your rights with a two-step method: (1) we copyright the
1210+library, and (2) we offer you this license, which gives you legal
1211+permission to copy, distribute and/or modify the library.
1212+
1213+ To protect each distributor, we want to make it very clear that
1214+there is no warranty for the free library. Also, if the library is
1215+modified by someone else and passed on, the recipients should know
1216+that what they have is not the original version, so that the original
1217+author's reputation will not be affected by problems that might be
1218+introduced by others.
1219+
1220
1221+ Finally, software patents pose a constant threat to the existence of
1222+any free program. We wish to make sure that a company cannot
1223+effectively restrict the users of a free program by obtaining a
1224+restrictive license from a patent holder. Therefore, we insist that
1225+any patent license obtained for a version of the library must be
1226+consistent with the full freedom of use specified in this license.
1227+
1228+ Most GNU software, including some libraries, is covered by the
1229+ordinary GNU General Public License. This license, the GNU Lesser
1230+General Public License, applies to certain designated libraries, and
1231+is quite different from the ordinary General Public License. We use
1232+this license for certain libraries in order to permit linking those
1233+libraries into non-free programs.
1234+
1235+ When a program is linked with a library, whether statically or using
1236+a shared library, the combination of the two is legally speaking a
1237+combined work, a derivative of the original library. The ordinary
1238+General Public License therefore permits such linking only if the
1239+entire combination fits its criteria of freedom. The Lesser General
1240+Public License permits more lax criteria for linking other code with
1241+the library.
1242+
1243+ We call this license the "Lesser" General Public License because it
1244+does Less to protect the user's freedom than the ordinary General
1245+Public License. It also provides other free software developers Less
1246+of an advantage over competing non-free programs. These disadvantages
1247+are the reason we use the ordinary General Public License for many
1248+libraries. However, the Lesser license provides advantages in certain
1249+special circumstances.
1250+
1251+ For example, on rare occasions, there may be a special need to
1252+encourage the widest possible use of a certain library, so that it
1253+becomes a de-facto standard. To achieve this, non-free programs must
1254+be allowed to use the library. A more frequent case is that a free
1255+library does the same job as widely used non-free libraries. In this
1256+case, there is little to gain by limiting the free library to free
1257+software only, so we use the Lesser General Public License.
1258+
1259+ In other cases, permission to use a particular library in non-free
1260+programs enables a greater number of people to use a large body of
1261+free software. For example, permission to use the GNU C Library in
1262+non-free programs enables many more people to use the whole GNU
1263+operating system, as well as its variant, the GNU/Linux operating
1264+system.
1265+
1266+ Although the Lesser General Public License is Less protective of the
1267+users' freedom, it does ensure that the user of a program that is
1268+linked with the Library has the freedom and the wherewithal to run
1269+that program using a modified version of the Library.
1270+
1271+ The precise terms and conditions for copying, distribution and
1272+modification follow. Pay close attention to the difference between a
1273+"work based on the library" and a "work that uses the library". The
1274+former contains code derived from the library, whereas the latter must
1275+be combined with the library in order to run.
1276+
1277
1278+ GNU LESSER GENERAL PUBLIC LICENSE
1279+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
1280+
1281+ 0. This License Agreement applies to any software library or other
1282+program which contains a notice placed by the copyright holder or
1283+other authorized party saying it may be distributed under the terms of
1284+this Lesser General Public License (also called "this License").
1285+Each licensee is addressed as "you".
1286+
1287+ A "library" means a collection of software functions and/or data
1288+prepared so as to be conveniently linked with application programs
1289+(which use some of those functions and data) to form executables.
1290+
1291+ The "Library", below, refers to any such software library or work
1292+which has been distributed under these terms. A "work based on the
1293+Library" means either the Library or any derivative work under
1294+copyright law: that is to say, a work containing the Library or a
1295+portion of it, either verbatim or with modifications and/or translated
1296+straightforwardly into another language. (Hereinafter, translation is
1297+included without limitation in the term "modification".)
1298+
1299+ "Source code" for a work means the preferred form of the work for
1300+making modifications to it. For a library, complete source code means
1301+all the source code for all modules it contains, plus any associated
1302+interface definition files, plus the scripts used to control
1303+compilation and installation of the library.
1304+
1305+ Activities other than copying, distribution and modification are not
1306+covered by this License; they are outside its scope. The act of
1307+running a program using the Library is not restricted, and output from
1308+such a program is covered only if its contents constitute a work based
1309+on the Library (independent of the use of the Library in a tool for
1310+writing it). Whether that is true depends on what the Library does
1311+and what the program that uses the Library does.
1312+
1313+ 1. You may copy and distribute verbatim copies of the Library's
1314+complete source code as you receive it, in any medium, provided that
1315+you conspicuously and appropriately publish on each copy an
1316+appropriate copyright notice and disclaimer of warranty; keep intact
1317+all the notices that refer to this License and to the absence of any
1318+warranty; and distribute a copy of this License along with the
1319+Library.
1320+
1321+ You may charge a fee for the physical act of transferring a copy,
1322+and you may at your option offer warranty protection in exchange for a
1323+fee.
1324+
1325
1326+ 2. You may modify your copy or copies of the Library or any portion
1327+of it, thus forming a work based on the Library, and copy and
1328+distribute such modifications or work under the terms of Section 1
1329+above, provided that you also meet all of these conditions:
1330+
1331+ a) The modified work must itself be a software library.
1332+
1333+ b) You must cause the files modified to carry prominent notices
1334+ stating that you changed the files and the date of any change.
1335+
1336+ c) You must cause the whole of the work to be licensed at no
1337+ charge to all third parties under the terms of this License.
1338+
1339+ d) If a facility in the modified Library refers to a function or a
1340+ table of data to be supplied by an application program that uses
1341+ the facility, other than as an argument passed when the facility
1342+ is invoked, then you must make a good faith effort to ensure that,
1343+ in the event an application does not supply such function or
1344+ table, the facility still operates, and performs whatever part of
1345+ its purpose remains meaningful.
1346+
1347+ (For example, a function in a library to compute square roots has
1348+ a purpose that is entirely well-defined independent of the
1349+ application. Therefore, Subsection 2d requires that any
1350+ application-supplied function or table used by this function must
1351+ be optional: if the application does not supply it, the square
1352+ root function must still compute square roots.)
1353+
1354+These requirements apply to the modified work as a whole. If
1355+identifiable sections of that work are not derived from the Library,
1356+and can be reasonably considered independent and separate works in
1357+themselves, then this License, and its terms, do not apply to those
1358+sections when you distribute them as separate works. But when you
1359+distribute the same sections as part of a whole which is a work based
1360+on the Library, the distribution of the whole must be on the terms of
1361+this License, whose permissions for other licensees extend to the
1362+entire whole, and thus to each and every part regardless of who wrote
1363+it.
1364+
1365+Thus, it is not the intent of this section to claim rights or contest
1366+your rights to work written entirely by you; rather, the intent is to
1367+exercise the right to control the distribution of derivative or
1368+collective works based on the Library.
1369+
1370+In addition, mere aggregation of another work not based on the Library
1371+with the Library (or with a work based on the Library) on a volume of
1372+a storage or distribution medium does not bring the other work under
1373+the scope of this License.
1374+
1375+ 3. You may opt to apply the terms of the ordinary GNU General Public
1376+License instead of this License to a given copy of the Library. To do
1377+this, you must alter all the notices that refer to this License, so
1378+that they refer to the ordinary GNU General Public License, version 2,
1379+instead of to this License. (If a newer version than version 2 of the
1380+ordinary GNU General Public License has appeared, then you can specify
1381+that version instead if you wish.) Do not make any other change in
1382+these notices.
1383+
1384
1385+ Once this change is made in a given copy, it is irreversible for
1386+that copy, so the ordinary GNU General Public License applies to all
1387+subsequent copies and derivative works made from that copy.
1388+
1389+ This option is useful when you wish to copy part of the code of
1390+the Library into a program that is not a library.
1391+
1392+ 4. You may copy and distribute the Library (or a portion or
1393+derivative of it, under Section 2) in object code or executable form
1394+under the terms of Sections 1 and 2 above provided that you accompany
1395+it with the complete corresponding machine-readable source code, which
1396+must be distributed under the terms of Sections 1 and 2 above on a
1397+medium customarily used for software interchange.
1398+
1399+ If distribution of object code is made by offering access to copy
1400+from a designated place, then offering equivalent access to copy the
1401+source code from the same place satisfies the requirement to
1402+distribute the source code, even though third parties are not
1403+compelled to copy the source along with the object code.
1404+
1405+ 5. A program that contains no derivative of any portion of the
1406+Library, but is designed to work with the Library by being compiled or
1407+linked with it, is called a "work that uses the Library". Such a
1408+work, in isolation, is not a derivative work of the Library, and
1409+therefore falls outside the scope of this License.
1410+
1411+ However, linking a "work that uses the Library" with the Library
1412+creates an executable that is a derivative of the Library (because it
1413+contains portions of the Library), rather than a "work that uses the
1414+library". The executable is therefore covered by this License.
1415+Section 6 states terms for distribution of such executables.
1416+
1417+ When a "work that uses the Library" uses material from a header file
1418+that is part of the Library, the object code for the work may be a
1419+derivative work of the Library even though the source code is not.
1420+Whether this is true is especially significant if the work can be
1421+linked without the Library, or if the work is itself a library. The
1422+threshold for this to be true is not precisely defined by law.
1423+
1424+ If such an object file uses only numerical parameters, data
1425+structure layouts and accessors, and small macros and small inline
1426+functions (ten lines or less in length), then the use of the object
1427+file is unrestricted, regardless of whether it is legally a derivative
1428+work. (Executables containing this object code plus portions of the
1429+Library will still fall under Section 6.)
1430+
1431+ Otherwise, if the work is a derivative of the Library, you may
1432+distribute the object code for the work under the terms of Section 6.
1433+Any executables containing that work also fall under Section 6,
1434+whether or not they are linked directly with the Library itself.
1435+
1436
1437+ 6. As an exception to the Sections above, you may also combine or
1438+link a "work that uses the Library" with the Library to produce a
1439+work containing portions of the Library, and distribute that work
1440+under terms of your choice, provided that the terms permit
1441+modification of the work for the customer's own use and reverse
1442+engineering for debugging such modifications.
1443+
1444+ You must give prominent notice with each copy of the work that the
1445+Library is used in it and that the Library and its use are covered by
1446+this License. You must supply a copy of this License. If the work
1447+during execution displays copyright notices, you must include the
1448+copyright notice for the Library among them, as well as a reference
1449+directing the user to the copy of this License. Also, you must do one
1450+of these things:
1451+
1452+ a) Accompany the work with the complete corresponding
1453+ machine-readable source code for the Library including whatever
1454+ changes were used in the work (which must be distributed under
1455+ Sections 1 and 2 above); and, if the work is an executable linked
1456+ with the Library, with the complete machine-readable "work that
1457+ uses the Library", as object code and/or source code, so that the
1458+ user can modify the Library and then relink to produce a modified
1459+ executable containing the modified Library. (It is understood
1460+ that the user who changes the contents of definitions files in the
1461+ Library will not necessarily be able to recompile the application
1462+ to use the modified definitions.)
1463+
1464+ b) Use a suitable shared library mechanism for linking with the
1465+ Library. A suitable mechanism is one that (1) uses at run time a
1466+ copy of the library already present on the user's computer system,
1467+ rather than copying library functions into the executable, and (2)
1468+ will operate properly with a modified version of the library, if
1469+ the user installs one, as long as the modified version is
1470+ interface-compatible with the version that the work was made with.
1471+
1472+ c) Accompany the work with a written offer, valid for at least
1473+ three years, to give the same user the materials specified in
1474+ Subsection 6a, above, for a charge no more than the cost of
1475+ performing this distribution.
1476+
1477+ d) If distribution of the work is made by offering access to copy
1478+ from a designated place, offer equivalent access to copy the above
1479+ specified materials from the same place.
1480+
1481+ e) Verify that the user has already received a copy of these
1482+ materials or that you have already sent this user a copy.
1483+
1484+ For an executable, the required form of the "work that uses the
1485+Library" must include any data and utility programs needed for
1486+reproducing the executable from it. However, as a special exception,
1487+the materials to be distributed need not include anything that is
1488+normally distributed (in either source or binary form) with the major
1489+components (compiler, kernel, and so on) of the operating system on
1490+which the executable runs, unless that component itself accompanies
1491+the executable.
1492+
1493+ It may happen that this requirement contradicts the license
1494+restrictions of other proprietary libraries that do not normally
1495+accompany the operating system. Such a contradiction means you cannot
1496+use both them and the Library together in an executable that you
1497+distribute.
1498+
1499
1500+ 7. You may place library facilities that are a work based on the
1501+Library side-by-side in a single library together with other library
1502+facilities not covered by this License, and distribute such a combined
1503+library, provided that the separate distribution of the work based on
1504+the Library and of the other library facilities is otherwise
1505+permitted, and provided that you do these two things:
1506+
1507+ a) Accompany the combined library with a copy of the same work
1508+ based on the Library, uncombined with any other library
1509+ facilities. This must be distributed under the terms of the
1510+ Sections above.
1511+
1512+ b) Give prominent notice with the combined library of the fact
1513+ that part of it is a work based on the Library, and explaining
1514+ where to find the accompanying uncombined form of the same work.
1515+
1516+ 8. You may not copy, modify, sublicense, link with, or distribute
1517+the Library except as expressly provided under this License. Any
1518+attempt otherwise to copy, modify, sublicense, link with, or
1519+distribute the Library is void, and will automatically terminate your
1520+rights under this License. However, parties who have received copies,
1521+or rights, from you under this License will not have their licenses
1522+terminated so long as such parties remain in full compliance.
1523+
1524+ 9. You are not required to accept this License, since you have not
1525+signed it. However, nothing else grants you permission to modify or
1526+distribute the Library or its derivative works. These actions are
1527+prohibited by law if you do not accept this License. Therefore, by
1528+modifying or distributing the Library (or any work based on the
1529+Library), you indicate your acceptance of this License to do so, and
1530+all its terms and conditions for copying, distributing or modifying
1531+the Library or works based on it.
1532+
1533+ 10. Each time you redistribute the Library (or any work based on the
1534+Library), the recipient automatically receives a license from the
1535+original licensor to copy, distribute, link with or modify the Library
1536+subject to these terms and conditions. You may not impose any further
1537+restrictions on the recipients' exercise of the rights granted herein.
1538+You are not responsible for enforcing compliance by third parties with
1539+this License.
1540+
1541
1542+ 11. If, as a consequence of a court judgment or allegation of patent
1543+infringement or for any other reason (not limited to patent issues),
1544+conditions are imposed on you (whether by court order, agreement or
1545+otherwise) that contradict the conditions of this License, they do not
1546+excuse you from the conditions of this License. If you cannot
1547+distribute so as to satisfy simultaneously your obligations under this
1548+License and any other pertinent obligations, then as a consequence you
1549+may not distribute the Library at all. For example, if a patent
1550+license would not permit royalty-free redistribution of the Library by
1551+all those who receive copies directly or indirectly through you, then
1552+the only way you could satisfy both it and this License would be to
1553+refrain entirely from distribution of the Library.
1554+
1555+If any portion of this section is held invalid or unenforceable under
1556+any particular circumstance, the balance of the section is intended to
1557+apply, and the section as a whole is intended to apply in other
1558+circumstances.
1559+
1560+It is not the purpose of this section to induce you to infringe any
1561+patents or other property right claims or to contest validity of any
1562+such claims; this section has the sole purpose of protecting the
1563+integrity of the free software distribution system which is
1564+implemented by public license practices. Many people have made
1565+generous contributions to the wide range of software distributed
1566+through that system in reliance on consistent application of that
1567+system; it is up to the author/donor to decide if he or she is willing
1568+to distribute software through any other system and a licensee cannot
1569+impose that choice.
1570+
1571+This section is intended to make thoroughly clear what is believed to
1572+be a consequence of the rest of this License.
1573+
1574+ 12. If the distribution and/or use of the Library is restricted in
1575+certain countries either by patents or by copyrighted interfaces, the
1576+original copyright holder who places the Library under this License
1577+may add an explicit geographical distribution limitation excluding those
1578+countries, so that distribution is permitted only in or among
1579+countries not thus excluded. In such case, this License incorporates
1580+the limitation as if written in the body of this License.
1581+
1582+ 13. The Free Software Foundation may publish revised and/or new
1583+versions of the Lesser General Public License from time to time.
1584+Such new versions will be similar in spirit to the present version,
1585+but may differ in detail to address new problems or concerns.
1586+
1587+Each version is given a distinguishing version number. If the Library
1588+specifies a version number of this License which applies to it and
1589+"any later version", you have the option of following the terms and
1590+conditions either of that version or of any later version published by
1591+the Free Software Foundation. If the Library does not specify a
1592+license version number, you may choose any version ever published by
1593+the Free Software Foundation.
1594+
1595
1596+ 14. If you wish to incorporate parts of the Library into other free
1597+programs whose distribution conditions are incompatible with these,
1598+write to the author to ask for permission. For software which is
1599+copyrighted by the Free Software Foundation, write to the Free
1600+Software Foundation; we sometimes make exceptions for this. Our
1601+decision will be guided by the two goals of preserving the free status
1602+of all derivatives of our free software and of promoting the sharing
1603+and reuse of software generally.
1604+
1605+ NO WARRANTY
1606+
1607+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
1608+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
1609+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
1610+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
1611+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
1612+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1613+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
1614+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
1615+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1616+
1617+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
1618+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
1619+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
1620+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
1621+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
1622+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
1623+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
1624+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
1625+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
1626+DAMAGES.
1627+
1628+ END OF TERMS AND CONDITIONS
1629+
1630
1631+ How to Apply These Terms to Your New Libraries
1632+
1633+ If you develop a new library, and you want it to be of the greatest
1634+possible use to the public, we recommend making it free software that
1635+everyone can redistribute and change. You can do so by permitting
1636+redistribution under these terms (or, alternatively, under the terms
1637+of the ordinary General Public License).
1638+
1639+ To apply these terms, attach the following notices to the library.
1640+It is safest to attach them to the start of each source file to most
1641+effectively convey the exclusion of warranty; and each file should
1642+have at least the "copyright" line and a pointer to where the full
1643+notice is found.
1644+
1645+
1646+ <one line to give the library's name and a brief idea of what it does.>
1647+ Copyright (C) <year> <name of author>
1648+
1649+ This library is free software; you can redistribute it and/or
1650+ modify it under the terms of the GNU Lesser General Public
1651+ License as published by the Free Software Foundation; either
1652+ version 2.1 of the License, or (at your option) any later version.
1653+
1654+ This library is distributed in the hope that it will be useful,
1655+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1656+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1657+ Lesser General Public License for more details.
1658+
1659+ You should have received a copy of the GNU Lesser General Public
1660+ License along with this library; if not, write to the Free Software
1661+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1662+
1663+Also add information on how to contact you by electronic and paper mail.
1664+
1665+You should also get your employer (if you work as a programmer) or
1666+your school, if any, to sign a "copyright disclaimer" for the library,
1667+if necessary. Here is a sample; alter the names:
1668+
1669+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
1670+ library `Frob' (a library for tweaking knobs) written by James
1671+ Random Hacker.
1672+
1673+ <signature of Ty Coon>, 1 April 1990
1674+ Ty Coon, President of Vice
1675+
1676+That's all there is to it!
1677+
1678+
1679
1680=== modified file 'Makefile.am'
1681--- Makefile.am 2009-04-07 23:20:36 +0000
1682+++ Makefile.am 2010-01-26 03:57:13 +0000
1683@@ -1,14 +1,22 @@
1684-SUBDIRS = \
1685- src \
1686- po
1687+NULL =
1688+SUBDIRS = \
1689+ applets \
1690+ shared/python \
1691+ po \
1692+ $(NULL)
1693
1694-EXTRA_DIST = \
1695- intltool-extract.in \
1696- intltool-merge.in \
1697- intltool-update.in \
1698+EXTRA_DIST = \
1699+ autogen.sh \
1700+ intltool-extract.in \
1701+ intltool-merge.in \
1702+ intltool-update.in \
1703 po/Makefile.in.in \
1704 po/POTFILES.skip \
1705- autogen.sh
1706+ COPYING.BSD \
1707+ COPYING.CCASAv3.0 \
1708+ COPYING.GPL-3 \
1709+ COPYING.LGPL-2.1 \
1710+ $(NULL)
1711
1712 DISTCLEANFILES = \
1713 intltool-extract \
1714@@ -17,6 +25,14 @@
1715
1716 ACLOCAL_AMFLAGS = -I m4
1717
1718+DISTCHECK_CONFIGURE_FLAGS = --disable-pymod-checks
1719+
1720+i18n-update: po/POTFILES.in po/POTFILES.skip
1721+ (cd po && for lang in `grep ALL_LINGUAS ../configure.ac | cut -d'"' -f2`; do \
1722+ echo -n "Updating $$lang:"; \
1723+ intltool-update $$lang; \
1724+ done)
1725+
1726 gtk_update_icon_cache = gtk-update-icon-cache -f -t ${datadir}/icons/hicolor
1727
1728 install-data-hook: update-icon-cache
1729
1730=== modified file 'Makefile.c-applet'
1731--- Makefile.c-applet 2009-02-01 00:13:07 +0000
1732+++ Makefile.c-applet 2010-01-26 03:57:13 +0000
1733@@ -4,7 +4,7 @@
1734
1735 AM_CFLAGS = \
1736 -I$(srcdir) \
1737- -I$(top_srcdir)/src \
1738+ -I$(top_builddir) \
1739 $(AWN_CFLAGS) \
1740 $(APPLET_CFLAGS) \
1741 $(NULL)
1742@@ -12,3 +12,7 @@
1743 APPLET_LINKER_FLAGS = -module -avoid-version
1744
1745 appletdir = $(libdir)/awn/applets/$(APPLET_NAME)
1746+
1747+EXTRA_DIST += \
1748+ $(desktop_DATA:.desktop=.desktop.in.in) \
1749+ $(NULL)
1750
1751=== modified file 'Makefile.common'
1752--- Makefile.common 2009-02-02 05:33:36 +0000
1753+++ Makefile.common 2010-01-26 03:57:14 +0000
1754@@ -1,3 +1,9 @@
1755 # vim: set ft=automake ts=8 sts=8 sw=8 :
1756 NULL =
1757 applet_datadir = $(APPLETSDIR)/$(APPLET_NAME)
1758+
1759+# shave-related
1760+V = @
1761+Q = $(V:1=)
1762+QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
1763+
1764
1765=== modified file 'Makefile.desktop-files'
1766--- Makefile.desktop-files 2008-12-12 22:27:26 +0000
1767+++ Makefile.desktop-files 2010-01-26 03:57:14 +0000
1768@@ -11,6 +11,6 @@
1769
1770 EXTRA_DIST = \
1771 $(icon_DATA) \
1772- $(desktop_DATA).in
1773+ $(NULL)
1774
1775 CLEANFILES = $(desktop_DATA)
1776
1777=== modified file 'Makefile.python-applet'
1778--- Makefile.python-applet 2009-02-08 21:32:15 +0000
1779+++ Makefile.python-applet 2010-01-26 03:57:14 +0000
1780@@ -5,3 +5,7 @@
1781 appletdir = $(applet_datadir)
1782
1783 dist_applet_SCRIPTS = $(APPLET_MAIN_FILE)
1784+
1785+EXTRA_DIST += \
1786+ $(desktop_DATA:.desktop=.desktop.in) \
1787+ $(NULL)
1788
1789=== modified file 'Makefile.schemas'
1790--- Makefile.schemas 2008-04-20 04:04:19 +0000
1791+++ Makefile.schemas 2010-01-26 03:57:14 +0000
1792@@ -1,25 +1,22 @@
1793-# vim: set ft=automake :
1794-
1795-APPLET_SCHEMA = $(APPLET_NAME).schema-ini
1796-
1797-if GCONF_SCHEMAS
1798-schemasdir = @GCONF_SCHEMA_FILE_DIR@
1799-schemas_FILE = $(APPLET_NAME).schemas
1800-schemas_in_files = $(schemas_FILE).in
1801-schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
1802-
1803-$(schemas_FILE).in: $(APPLET_SCHEMA)
1804- $(AWN_BINDIR)/awn-schema-to-gconf $< $@ "$(APPLET_NAME)"
1805+# vim: set ft=automake ts=8 sts=8 sw=8 :
1806+
1807+schemadir = $(datadir)/avant-window-navigator/schemas
1808+schema_DATA = awn-applet-$(APPLET_NAME).schema-ini
1809+
1810+if GCONF_SCHEMAS_INSTALL
1811+gconfschemasdir = @GCONF_SCHEMA_FILE_DIR@
1812+gconfschemas_in_files =$(schema_DATA:.schema-ini=.schemas.in)
1813+gconfschemas_DATA = $(gconfschemas_in_files:.schemas.in=.schemas)
1814+
1815+%.schemas.in: %.schema-ini
1816+ $(QUIET_GEN)$(LDA_BINDIR)/lda-schema-to-gconf $< $@
1817
1818 @INTLTOOL_SCHEMAS_RULE@
1819
1820-if GCONF_SCHEMAS_INSTALL
1821-install-data-local: $(schemas_DATA)
1822- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)
1823-endif
1824-else
1825-schemasdir = $(datadir)/avant-window-navigator/schemas
1826-schemas_DATA = $(APPLET_SCHEMA)
1827-endif
1828-
1829-EXTRA_DIST += $(APPLET_SCHEMA)
1830+install-data-local: $(gconfschemas_DATA)
1831+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(gconfschemas_DATA)
1832+
1833+CLEANFILES += $(gconfschemas_in_files) $(gconfschemas_DATA)
1834+endif
1835+
1836+EXTRA_DIST += $(schema_DATA)
1837
1838=== modified file 'Makefile.vala-applet'
1839--- Makefile.vala-applet 2008-12-25 20:27:53 +0000
1840+++ Makefile.vala-applet 2010-01-26 03:57:14 +0000
1841@@ -1,19 +1,26 @@
1842 # vim: set ft=automake ts=8 sts=8 sw=8 :
1843 include $(top_srcdir)/Makefile.c-applet
1844
1845-VALA_CC = $(CC) -shared -fPIC $(APPLET_CFLAGS) $(CFLAGS)
1846-VALA_EXTRALDFLAGS = $(foreach flag,$(LDFLAGS),--Xcc="$(flag)") $(foreach flag,$(AM_LDFLAGS),--Xcc="$(flag)")
1847-
1848-BUILT_SOURCES = $(APPLET_NAME).so
1849-
1850-$(APPLET_NAME).so: $(VALA_FILES)
1851- $(VALAC) --cc="$(VALA_CC)" -o $@ $^ --vapidir=$(AWN_VAPIDIR) --pkg=awn $(AM_VALAFLAGS) $(VALAFLAGS) $(VALA_EXTRALDFLAGS)
1852-
1853-install-exec-hook:
1854- test -d "$(DESTDIR)$(appletdir)" || mkdir -p "$(DESTDIR)$(appletdir)"
1855- $(INSTALL) -m 755 $(APPLET_NAME).so "$(DESTDIR)$(appletdir)"
1856-
1857-uninstall-hook:
1858- rm -f "$(appletdir)/$(APPLET_NAME).so"
1859-
1860-CLEANFILES += $(APPLET_NAME).so
1861+####
1862+# Note to applet developers: DO NOT OVERRIDE CPPFLAGS, CFLAGS, OR VALAFLAGS.
1863+# That is what the AM_FOOFLAGS variant is for.
1864+####
1865+
1866+# for shave
1867+QUIET_INSTALL = $(Q:@=@echo ' INSTALL '$@;)
1868+QUIET_VALA = $(Q:@=@echo ' VALAC '$@;)
1869+
1870+BUILT_SOURCES = $(APPLET_NAME).vala.stamp
1871+
1872+VALA_C_FILES = $(VALA_FILES:.vala=.c)
1873+
1874+$(APPLET_NAME).vala.stamp: $(VALA_FILES)
1875+ $(QUIET_VALA)$(VALAC) -C $^ \
1876+ --vapidir=$(top_srcdir)/shared/vala --pkg=build \
1877+ --vapidir=$(LDA_VAPIDIR) \
1878+ --vapidir=$(AWN_VAPIDIR) --pkg=awn \
1879+ $(AM_VALAFLAGS) $(VALAFLAGS)
1880+ touch "$@"
1881+
1882+EXTRA_DIST += $(VALA_FILES)
1883+CLEANFILES += $(APPLET_NAME).vala.stamp
1884
1885=== added directory 'applets'
1886=== renamed file 'src/Makefile.am' => 'applets/Makefile.am'
1887--- src/Makefile.am 2009-03-30 23:21:35 +0000
1888+++ applets/Makefile.am 2010-01-26 03:57:14 +0000
1889@@ -1,90 +1,83 @@
1890 NULL =
1891+
1892+CONDITIONAL_APPLETS =
1893+
1894 if HAVE_VALA
1895 if MAINTAINER_MODE
1896-VALA_TEST = vala-test
1897-endif
1898-VALA_APPLETS = $(VALA_TEST) taskmand simple-launcher standalone-launcher Taskmand-applet
1899-endif
1900-
1901-GCONF_APPLETS =
1902+CONDITIONAL_APPLETS += maintained/vala-test
1903+endif
1904+CONDITIONAL_APPLETS += \
1905+ maintained/garbage \
1906+ maintained/notification-area \
1907+ maintained/showdesktop \
1908+ $(NULL)
1909+endif
1910
1911 if WITH_GCONF
1912 if WITH_GNOME
1913 # --with-gnome --with-gconf
1914-GCONF_APPLETS += \
1915- awnsystemmonitor \
1916- cairo-menu \
1917- filebrowser \
1918- plugger \
1919- stacks \
1920- trasher \
1921+CONDITIONAL_APPLETS += \
1922 $(NULL)
1923 endif
1924 # --with-gconf
1925-GCONF_APPLETS += \
1926- awn-notification-daemon \
1927- calendar \
1928- media-control \
1929+CONDITIONAL_APPLETS += \
1930+ unmaintained/awnsystemmonitor \
1931+ maintained/calendar \
1932+ maintained/notification-daemon \
1933 $(NULL)
1934 endif
1935 # --with-gnome
1936 if WITH_GNOME
1937-GCONF_APPLETS += \
1938- digg \
1939- main-menu \
1940- MiMenu \
1941- pandora \
1942- rtm \
1943- trash \
1944+CONDITIONAL_APPLETS += \
1945+ maintained/cairo-menu \
1946+ unmaintained/main-menu \
1947+ unmaintained/MiMenu \
1948+ unmaintained/pandora \
1949+ unmaintained/stacks \
1950+ maintained/yama \
1951 $(NULL)
1952 endif
1953-if WITH_WEBKIT
1954-WEBKIT_APPLETS = \
1955- webapplet \
1956+# --with-webkit and/or --with-mozilla
1957+if BUILD_WEBAPPLET
1958+CONDITIONAL_APPLETS += \
1959+ maintained/webapplet \
1960 $(NULL)
1961 endif
1962 if MAINTAINER_MODE
1963-PYTHON_TEST = python-test
1964-WOBBLYZINI = wobblyzini
1965+CONDITIONAL_APPLETS += maintained/python-test
1966+CONDITIONAL_APPLETS += maintained/wobblyzini
1967 endif
1968
1969-# please keep alphabetized (except for libawn-extras)
1970-SUBDIRS = \
1971- libawn-extras \
1972- animal-farm \
1973- arss \
1974- awn-meebo \
1975- awnterm \
1976- battery-applet \
1977- cairo-clock \
1978- comic \
1979- comics \
1980- cpufreq \
1981- DesktopManager \
1982- digitalClock \
1983- file-browser-launcher \
1984- mail \
1985- media-icon-back \
1986- media-icon-next \
1987- media-icon-play \
1988- media-player \
1989- mount-applet \
1990- notification-area \
1991- places \
1992- pynot \
1993- pynot-rgba \
1994- $(PYTHON_TEST) \
1995- quit-applet \
1996- separator \
1997- shiny-switcher \
1998- showdesktop \
1999- thinkhdaps \
2000- to-do \
2001- tomboy-applet \
2002- volume-control \
2003- weather \
2004- $(WOBBLYZINI) \
2005- $(GCONF_APPLETS) \
2006- $(VALA_APPLETS) \
2007- $(WEBKIT_APPLETS) \
2008+# please keep alphabetized
2009+SUBDIRS = \
2010+ maintained/animal-farm \
2011+ maintained/awnterm \
2012+ maintained/bandwidth-monitor \
2013+ maintained/battery \
2014+ maintained/cairo-clock \
2015+ maintained/comics \
2016+ maintained/cpufreq \
2017+ maintained/dialect \
2018+ maintained/digital-clock \
2019+ unmaintained/dropper \
2020+ maintained/feeds \
2021+ maintained/file-browser-launcher \
2022+ maintained/hardware-sensors \
2023+ maintained/mail \
2024+ maintained/media-control \
2025+ maintained/media-icons \
2026+ maintained/media-player \
2027+ maintained/mount \
2028+ maintained/places \
2029+ maintained/quit \
2030+ maintained/slickswitcher \
2031+ maintained/shiny-switcher \
2032+ maintained/sysmon \
2033+ maintained/thinkhdaps \
2034+ maintained/to-do \
2035+ maintained/tomboy-applet \
2036+ maintained/volume-control \
2037+ maintained/weather \
2038+ $(CONDITIONAL_APPLETS) \
2039 $(NULL)
2040+# vim: set ts=8 sts=8 sw=8 :
2041
2042=== added directory 'applets/maintained'
2043=== renamed directory 'src/animal-farm' => 'applets/maintained/animal-farm'
2044=== modified file 'applets/maintained/animal-farm/animal-farm.desktop.in'
2045--- src/animal-farm/animal-farm.desktop.in 2009-02-08 10:06:43 +0000
2046+++ applets/maintained/animal-farm/animal-farm.desktop.in 2010-01-26 03:57:14 +0000
2047@@ -1,11 +1,11 @@
2048 [Desktop Entry]
2049 Version=1.0
2050-Name=Animal Farm
2051+_Name=Animal Farm
2052 Type=Application
2053+X-AWN-Type=Applet
2054 X-AWN-AppletType=Python
2055 X-AWN-AppletCategory=Game,Amusement
2056-Comment=Display fortune messages
2057-Exec=animal-farm/animal-farm.py
2058-Icon=animal-farm/icons/lemmling-cartoon-gnu.svg
2059-Name[en_US]=Animal Farm
2060-
2061+_Comment=Display fortune messages
2062+Exec=awn-applet -p %k
2063+X-AWN-AppletExec=animal-farm/animal-farm.py
2064+Icon=animal-farm/icons/lemmling-cartoon-gnu
2065
2066=== modified file 'applets/maintained/animal-farm/animal-farm.py'
2067--- src/animal-farm/animal-farm.py 2009-03-04 23:12:25 +0000
2068+++ applets/maintained/animal-farm/animal-farm.py 2010-01-26 03:57:14 +0000
2069@@ -24,11 +24,10 @@
2070 pygtk.require("2.0")
2071 import gtk
2072
2073-from awn.extras import awnlib
2074+from awn.extras import awnlib, __version__
2075 import random
2076
2077 applet_name = "Animal Farm"
2078-applet_version = "0.3.3"
2079 applet_description = "Applet that displays fortune messages"
2080
2081 images_dir = os.path.join(os.path.dirname(__file__), "icons")
2082@@ -42,67 +41,72 @@
2083 class AnimalFarmApplet:
2084
2085 """Applet that displays fortune messages.
2086-
2087+
2088 """
2089-
2090+
2091 def __init__(self, applet):
2092 self.applet = applet
2093-
2094+
2095 self.iconname = self.previous_iconname = None
2096 self.set_icon()
2097-
2098+
2099 self.setup_main_dialog()
2100-
2101+
2102 applet.connect_size_changed(self.refresh_icon)
2103-
2104+
2105 def setup_main_dialog(self):
2106 self.dialog = self.applet.dialog.new("fortune-dialog")
2107-
2108+
2109+ alignment = gtk.Alignment()
2110+ padding = 6
2111+ alignment.set_padding(padding, padding, padding, padding)
2112+ self.dialog.add(alignment)
2113+
2114 self.label = gtk.Label()
2115- self.dialog.add(self.label)
2116+ alignment.add(self.label)
2117 self.refresh_fortune()
2118-
2119- self.applet.connect("button-press-event", self.button_press_event_cb)
2120- self.dialog.connect("focus-out-event", self.dialog_focus_out_cb)
2121-
2122- def button_press_event_cb(self, widget, event):
2123- if event.button == 1:
2124- if self.dialog.is_active():
2125- self.set_icon()
2126- self.refresh_fortune()
2127- self.applet.dialog.toggle("fortune-dialog")
2128- elif event.button == 2:
2129+
2130+ self.applet.connect("clicked", self.clicked_cb)
2131+ self.applet.connect("middle-clicked", self.middle_click_cb)
2132+
2133+ def clicked_cb(self, widget):
2134+ if self.dialog.is_active():
2135+ self.set_icon()
2136 self.refresh_fortune()
2137- if not self.dialog.is_active():
2138- self.applet.dialog.toggle("fortune-dialog", "show")
2139-
2140+ self.applet.dialog.toggle("fortune-dialog")
2141+
2142+ def middle_click_cb(self, widget):
2143+ self.refresh_fortune()
2144+ if not self.dialog.is_active():
2145+ self.applet.dialog.toggle("fortune-dialog", "show")
2146+
2147 def dialog_focus_out_cb(self, dialog, event):
2148 self.set_icon()
2149 self.refresh_fortune()
2150-
2151+
2152 def set_icon(self):
2153 files = [i for i in os.listdir(images_dir) if i.endswith('.svg') and i != self.iconname and i != self.previous_iconname]
2154-
2155+
2156 self.previous_iconname = self.iconname
2157 self.iconname = files[random.randint(0, len(files) - 1)]
2158-
2159+
2160 self.refresh_icon()
2161-
2162+
2163 def refresh_icon(self):
2164 self.applet.icon.file(os.path.join(images_dir, self.iconname), size=awnlib.Icon.APPLET_SIZE)
2165-
2166+
2167 def refresh_fortune(self):
2168 try:
2169 text = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
2170 except OSError:
2171 text = "Error executing \"" + command + "\"; make sure it is in your path and executable."
2172- self.label.set_text(text)
2173+ self.label.set_text(text.rstrip())
2174
2175
2176 if __name__ == "__main__":
2177 awnlib.init_start(AnimalFarmApplet, {"name": applet_name,
2178 "short": "animal-farm",
2179- "version": applet_version,
2180+ "version": __version__,
2181 "description": applet_description,
2182 "logo": applet_logo,
2183 "author": "Arvind Ganga",
2184
2185=== renamed directory 'src/awnterm' => 'applets/maintained/awnterm'
2186=== modified file 'applets/maintained/awnterm/Makefile.am'
2187--- src/awnterm/Makefile.am 2008-04-24 20:51:28 +0000
2188+++ applets/maintained/awnterm/Makefile.am 2010-01-26 03:57:14 +0000
2189@@ -1,18 +1,24 @@
2190 APPLET_NAME = awnterm
2191 APPLET_CFLAGS = $(VTE_CFLAGS)
2192-include $(top_srcdir)/Makefile.c-applet
2193+VALA_FILES = \
2194+ awn-terminal.vala \
2195+ keybinder.vapi \
2196+ $(NULL)
2197+AM_VALAFLAGS = --pkg=libintl --pkg=vte --pkg=dbus-glib-1
2198+include $(top_srcdir)/Makefile.vala-applet
2199 include $(top_srcdir)/Makefile.schemas
2200+
2201 applet_LTLIBRARIES = awnterm.la
2202 awnterm_la_SOURCES = \
2203- applet.c \
2204- awnterm.c \
2205- awnterm.h \
2206- settings.c \
2207- settings.h \
2208+ $(VALA_C_FILES) \
2209+ keybinder.c \
2210+ eggaccelerators.c \
2211 $(NULL)
2212 awnterm_la_LIBADD = \
2213 $(AWN_LIBS) \
2214 $(VTE_LIBS) \
2215- $(top_builddir)/src/libawn-extras/libawn-extras.la \
2216 $(NULL)
2217 awnterm_la_LDFLAGS = $(APPLET_LINKER_FLAGS)
2218+EXTRA_DIST += \
2219+ eggaccelerators.h \
2220+ keybinder.h
2221
2222=== renamed file 'src/awnterm/awnterm.schema-ini' => 'applets/maintained/awnterm/awn-applet-awnterm.schema-ini'
2223--- src/awnterm/awnterm.schema-ini 2009-01-25 23:49:36 +0000
2224+++ applets/maintained/awnterm/awn-applet-awnterm.schema-ini 2010-01-26 03:57:14 +0000
2225@@ -1,15 +1,20 @@
2226 [DEFAULT/opacity]
2227 type = float
2228-default = 0.8
2229+default = 0.9
2230 description = The applet's opacity level.
2231 description[en_CA] = The applet's opacity level.
2232
2233 [DEFAULT/hide_on_unfocus]
2234-type = bool
2235+type = boolean
2236 default = true
2237 description = Set whether the applet should hide itself when it loses focus.
2238 description[en_CA] = Set whether the applet should hide itself when it loses focus.
2239
2240+[DEFAULT/global_hotkey]
2241+type = string
2242+default =
2243+description = Global hotkey used to activate the terminal.
2244+
2245 [DEFAULT/bg_img]
2246 type = string
2247 default =
2248
2249=== added file 'applets/maintained/awnterm/awn-terminal.vala'
2250--- applets/maintained/awnterm/awn-terminal.vala 1970-01-01 00:00:00 +0000
2251+++ applets/maintained/awnterm/awn-terminal.vala 2010-01-26 03:57:14 +0000
2252@@ -0,0 +1,631 @@
2253+/*
2254+ * Copyright (C) 2009 Michal Hruby <michal.mhr@gmail.com>
2255+ *
2256+ * This program is free software; you can redistribute it and/or modify
2257+ * it under the terms of the GNU General Public License as published by
2258+ * the Free Software Foundation; either version 2 of the License, or
2259+ * (at your option) any later version.
2260+ *
2261+ * This program is distributed in the hope that it will be useful,
2262+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2263+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2264+ * GNU General Public License for more details.
2265+ *
2266+ * You should have received a copy of the GNU General Public License
2267+ * along with this program; if not, write to the Free Software
2268+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2269+ *
2270+ */
2271+
2272+using Gdk;
2273+using Gtk;
2274+using Awn;
2275+using DesktopAgnostic.Config;
2276+
2277+// only here so that config.h is before gi18n-lib.h
2278+private const string not_used = Build.APPLETSDIR;
2279+
2280+[DBus (name = "org.awnproject.Applet.Terminal")]
2281+public interface TerminalDBus : GLib.Object {
2282+ public abstract void toggle (uint32 time_) throws DBus.Error;
2283+}
2284+
2285+public class AwnTerminalApplet : AppletSimple, TerminalDBus
2286+{
2287+ private Client config;
2288+ private Menu menu;
2289+ private Awn.Dialog dialog;
2290+ private Gtk.Notebook notebook;
2291+ private Gtk.FileChooserButton chooser;
2292+ private Gtk.Image preview_image;
2293+ private Gtk.Window prefs_window;
2294+ private Gtk.ListStore model = null;
2295+
2296+ private int number_of_tabs;
2297+
2298+ private float _bg_opacity;
2299+ public float bg_opacity
2300+ {
2301+ get { return _bg_opacity; }
2302+ set { this._bg_opacity = value; this.dialog.set_opacity (value); }
2303+ }
2304+
2305+ public bool hide_on_unfocus
2306+ {
2307+ get { return this.dialog.hide_on_unfocus; }
2308+ set { this.dialog.hide_on_unfocus = value; }
2309+ }
2310+
2311+ private string _background_image = null;
2312+ public string background_image
2313+ {
2314+ get { return this._background_image; }
2315+ set
2316+ {
2317+ this._background_image = value;
2318+ for (int i = 0; i < this.notebook.get_n_pages (); i++)
2319+ {
2320+ Vte.Terminal term = this.notebook.get_nth_page (i) as Vte.Terminal;
2321+ term.set_background_image_file (value);
2322+ }
2323+ }
2324+ }
2325+
2326+ private string _keybinding = null;
2327+ public string keybinding
2328+ {
2329+ get { return _keybinding; }
2330+ set
2331+ {
2332+ debug ("keybinding: %s", value);
2333+ if (this._keybinding != null && this._keybinding.size () > 0)
2334+ {
2335+ // unbind
2336+ Awn.Keybinder.unbind (this._keybinding, this.global_keypress);
2337+ }
2338+ this._keybinding = value;
2339+ if (this._keybinding != null && this._keybinding.size () > 0)
2340+ {
2341+ // bind
2342+ Awn.Keybinder.bind (this._keybinding, this.global_keypress);
2343+ }
2344+
2345+ if (this.model != null)
2346+ {
2347+ Gtk.TreeIter iter;
2348+ if (this.model.get_iter_first (out iter))
2349+ {
2350+ this.model.set (iter, 1,
2351+ this._keybinding != null && this._keybinding.size () > 0 ?
2352+ this._keybinding : _ ("Disabled"));
2353+ }
2354+ }
2355+ }
2356+ }
2357+
2358+ private string _terminal_command = null;
2359+ public string terminal_command
2360+ {
2361+ get { return this._terminal_command; }
2362+ set { this._terminal_command = value; }
2363+ }
2364+
2365+ private TimeVal last_inactive_time;
2366+
2367+ public AwnTerminalApplet (string canonical_name, string uid, int panel_id)
2368+ {
2369+ this.canonical_name = canonical_name;
2370+ this.uid = uid;
2371+ this.panel_id = panel_id;
2372+ this.display_name = "Awn Terminal Applet";
2373+ }
2374+
2375+ construct
2376+ {
2377+ Awn.Keybinder.init ();
2378+ this.last_inactive_time = TimeVal ();
2379+ }
2380+
2381+ public override void
2382+ constructed ()
2383+ {
2384+ base.constructed ();
2385+
2386+ // set icon & tooltip
2387+ this.set_tooltip_text ("Awn Terminal");
2388+ this.set_icon_name ("terminal");
2389+
2390+ // connect applet signals
2391+ this.get_icon ().clicked.connect (this.clicked_cb);
2392+ this.get_icon ().middle_clicked.connect (this.middle_clicked_cb);
2393+ this.get_icon ().context_menu_popup.connect (this.on_context_menu_popup);
2394+
2395+ // construct dialog
2396+ this.dialog = new Awn.Dialog.for_widget (this);
2397+ this.dialog.set_skip_taskbar_hint (false);
2398+ this.number_of_tabs = 0;
2399+
2400+ Gtk.VBox box = new Gtk.VBox (true, 0);
2401+ this.dialog.add (box);
2402+
2403+ this.notebook = new Gtk.Notebook ();
2404+ this.notebook.set_tab_pos (Gtk.PositionType.TOP);
2405+ this.notebook.set_scrollable (true);
2406+ box.add (this.notebook);
2407+
2408+ this.create_new_tab ();
2409+
2410+ this.dialog.hide_on_unfocus = true;
2411+ this.dialog.hide_on_esc = false;
2412+
2413+ this.dialog.notify["is-active"].connect ((obj, pspec) =>
2414+ {
2415+ if ((obj as Awn.Dialog).is_active == false)
2416+ {
2417+ this.last_inactive_time.get_current_time ();
2418+ }
2419+ });
2420+
2421+ // bind config keys
2422+ this.config = Awn.Config.get_default_for_applet (this);
2423+ try
2424+ {
2425+ this.config.bind (GROUP_DEFAULT, "opacity",
2426+ this, "bg-opacity",
2427+ false, BindMethod.FALLBACK);
2428+ this.config.bind (GROUP_DEFAULT, "hide_on_unfocus",
2429+ this, "hide-on-unfocus",
2430+ false, BindMethod.FALLBACK);
2431+ this.config.bind (GROUP_DEFAULT, "global_hotkey",
2432+ this, "keybinding",
2433+ false, BindMethod.FALLBACK);
2434+ this.config.bind (GROUP_DEFAULT, "bg_img",
2435+ this, "background-image",
2436+ false, BindMethod.FALLBACK);
2437+ this.config.bind (GROUP_DEFAULT, "main_terminal",
2438+ this, "terminal-command",
2439+ false, BindMethod.FALLBACK);
2440+ }
2441+ catch (DesktopAgnostic.Config.Error err)
2442+ {
2443+ critical ("Config Error: %s", err.message);
2444+ }
2445+ }
2446+
2447+ private void
2448+ global_keypress (string keystring)
2449+ {
2450+ this.toggle (Awn.Keybinder.get_current_event_time ());
2451+ }
2452+
2453+ public void
2454+ toggle (uint32 time_)
2455+ {
2456+ WidgetFlags flags = this.dialog.get_flags () & WidgetFlags.VISIBLE;
2457+ bool should_hide = flags != 0;
2458+ if (should_hide)
2459+ {
2460+ // should it REALLY hide?
2461+ if (this.dialog.is_active)
2462+ {
2463+ should_hide = true;
2464+ }
2465+ else
2466+ {
2467+ should_hide = false;
2468+ TimeVal cur_time = TimeVal ();
2469+ long sec_diff = cur_time.tv_sec - this.last_inactive_time.tv_sec;
2470+ if (sec_diff <= 1)
2471+ {
2472+ long usec_diff = sec_diff * 1000000 + cur_time.tv_usec -
2473+ this.last_inactive_time.tv_usec;
2474+ if (usec_diff <= 250000) // one fourth of second
2475+ {
2476+ should_hide = true;
2477+ }
2478+ }
2479+ }
2480+ }
2481+ if (should_hide)
2482+ {
2483+ this.dialog.hide ();
2484+ }
2485+ else
2486+ {
2487+ this.dialog.show_all ();
2488+ this.dialog.present_with_time (time_);
2489+ }
2490+ }
2491+
2492+ private void
2493+ create_new_tab ()
2494+ {
2495+ Vte.Terminal terminal = new Vte.Terminal ();
2496+ terminal.set_emulation ("xterm");
2497+ terminal.fork_command (null, null, null, "~/", false, false, false);
2498+ if (this._background_image != null)
2499+ {
2500+ terminal.set_background_image_file (this._background_image);
2501+ }
2502+
2503+ this.number_of_tabs++;
2504+
2505+ Gtk.Label label = new Gtk.Label ("Term #%d".printf (this.number_of_tabs));
2506+ this.notebook.append_page (terminal, label);
2507+ if (this.notebook.get_n_pages () > 1)
2508+ {
2509+ this.notebook.set_show_tabs (true);
2510+ this.dialog.show_all ();
2511+ }
2512+ else
2513+ {
2514+ this.notebook.set_show_tabs (false);
2515+ }
2516+
2517+ Signal.connect_swapped (terminal, "child-exited",
2518+ (GLib.Callback)this.exited_cb, this);
2519+ Signal.connect_swapped (terminal, "key-press-event",
2520+ (GLib.Callback)this.key_press_cb, this);
2521+ }
2522+
2523+ private void
2524+ clicked_cb ()
2525+ {
2526+ WidgetFlags flags = this.dialog.get_flags () & WidgetFlags.VISIBLE;
2527+ if (flags != 0)
2528+ {
2529+ this.dialog.hide ();
2530+ }
2531+ else
2532+ {
2533+ this.dialog.show_all ();
2534+ }
2535+ }
2536+
2537+ private void
2538+ middle_clicked_cb ()
2539+ {
2540+ string terminal = this._terminal_command;
2541+ try
2542+ {
2543+ if (terminal == null || terminal.size () == 0)
2544+ {
2545+ terminal = "gnome-terminal";
2546+ }
2547+ Gdk.spawn_command_line_on_screen (this.get_screen (), terminal);
2548+ }
2549+ catch
2550+ {
2551+ warning ("Unable to run '%s'!", terminal);
2552+ }
2553+ }
2554+
2555+ private bool
2556+ key_press_cb (Gdk.EventKey event, Vte.Terminal terminal)
2557+ {
2558+ Gdk.ModifierType mods = (Gdk.ModifierType) event.state;
2559+ Gdk.ModifierType is_ctrl = mods & Gdk.ModifierType.CONTROL_MASK;
2560+ Gdk.ModifierType is_shift = mods & Gdk.ModifierType.SHIFT_MASK;
2561+ if (is_ctrl != 0 && is_shift != 0)
2562+ {
2563+ unowned string key = Gdk.keyval_name (Gdk.keyval_to_lower (event.keyval));
2564+ if (key == "c")
2565+ {
2566+ terminal.copy_clipboard ();
2567+ }
2568+ else if (key == "v")
2569+ {
2570+ terminal.paste_clipboard ();
2571+ }
2572+ else if (key == "t")
2573+ {
2574+ this.create_new_tab ();
2575+ this.notebook.set_current_page (this.notebook.get_n_pages () - 1);
2576+ }
2577+
2578+ return true;
2579+ }
2580+ else if (is_ctrl != 0)
2581+ {
2582+ unowned string key = Gdk.keyval_name (Gdk.keyval_to_lower (event.keyval));
2583+ if (key == "Page_Up")
2584+ {
2585+ int page = this.notebook.get_current_page () - 1;
2586+ page = page % this.notebook.get_n_pages ();
2587+ this.notebook.set_current_page (page);
2588+ return true;
2589+ }
2590+ else if (key == "Page_Down")
2591+ {
2592+ int page = this.notebook.get_current_page () + 1;
2593+ page = page % this.notebook.get_n_pages ();
2594+ this.notebook.set_current_page (page);
2595+ return true;
2596+ }
2597+ }
2598+ return false;
2599+ }
2600+
2601+ private void
2602+ exited_cb (Vte.Terminal terminal)
2603+ {
2604+ int pages = this.notebook.get_n_pages ();
2605+ if (pages > 1)
2606+ {
2607+ int page = this.notebook.get_current_page ();
2608+ this.notebook.remove_page (page);
2609+
2610+ if (pages == 2)
2611+ {
2612+ this.notebook.set_show_tabs (false);
2613+ }
2614+ this.dialog.show_all ();
2615+ }
2616+ else
2617+ {
2618+ // clear everything
2619+ terminal.reset (true, true);
2620+ // fork new terminal
2621+ terminal.fork_command (null, null, null, "~/", false, false, false);
2622+
2623+ this.dialog.hide ();
2624+ }
2625+ }
2626+
2627+ private void
2628+ on_context_menu_popup (EventButton evt)
2629+ {
2630+ if (this.menu == null)
2631+ {
2632+ ImageMenuItem prefs_item;
2633+ Widget about_item;
2634+
2635+ this.menu = this.create_default_menu () as Menu;
2636+
2637+ prefs_item = new ImageMenuItem.from_stock (STOCK_PREFERENCES, null);
2638+ prefs_item.activate.connect (this.on_prefs_activate);
2639+ prefs_item.show ();
2640+ this.menu.append (prefs_item);
2641+ about_item =
2642+ this.create_about_item_simple ("Copyright © 2009 Michal Hruby" +
2643+ "<michal.mhr@gmail.com>",
2644+ AppletLicense.GPLV2, Build.VERSION);
2645+ about_item.show ();
2646+ this.menu.append (about_item as MenuItem);
2647+ }
2648+ this.menu.set_screen (null);
2649+ this.menu.popup (null, null, null, evt.button, evt.time);
2650+ }
2651+
2652+ private void
2653+ on_prefs_activate ()
2654+ {
2655+ if (this.prefs_window != null)
2656+ {
2657+ this.prefs_window.show_all ();
2658+ return;
2659+ }
2660+
2661+ this.prefs_window = new Gtk.Window (Gtk.WindowType.TOPLEVEL);
2662+ this.prefs_window.set_title (_ ("Preferences"));
2663+ this.prefs_window.set_default_icon_name ("terminal");
2664+ this.prefs_window.set_border_width (6);
2665+
2666+ this.prefs_window.delete_event.connect ((w, e) =>
2667+ {
2668+ w.hide ();
2669+ return true;
2670+ });
2671+
2672+ // main box
2673+ Gtk.Box box = new Gtk.VBox (false, 6);
2674+ this.prefs_window.add (box);
2675+
2676+ Gtk.Widget widget = new Gtk.Label ("");
2677+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Behavior")));
2678+ (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
2679+ box.pack_start (widget, false, false, 0);
2680+
2681+ Gtk.Alignment align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
2682+ align.set_padding (0, 0, 10, 0);
2683+ box.pack_start (align, false, false, 0);
2684+
2685+ Gtk.Box box2 = new Gtk.VBox (false, 6);
2686+ align.add (box2);
2687+
2688+ // focus out behavior checkbox
2689+ widget = new Gtk.CheckButton.with_label (_ ("Hide when focus is lost"));
2690+ (widget as CheckButton).set_active (this.hide_on_unfocus);
2691+ (widget as CheckButton).toggled.connect ((w) =>
2692+ {
2693+ this.hide_on_unfocus = w.get_active ();
2694+ });
2695+
2696+ box2.pack_start (widget, false, false, 0);
2697+
2698+ // keybinding treeview
2699+ Gtk.CellRenderer ren;
2700+ Gtk.TreeViewColumn col;
2701+
2702+ Gtk.TreeView treeview = new Gtk.TreeView ();
2703+ box2.pack_start (treeview, false, false, 0);
2704+ this.model = new Gtk.ListStore (2, typeof (string), typeof (string));
2705+ treeview.set_model (this.model);
2706+
2707+ ren = new CellRendererText ();
2708+ col = new TreeViewColumn.with_attributes (_ ("Action"), ren, "text", 0);
2709+ treeview.append_column (col);
2710+
2711+ ren = new CellRendererAccel ();
2712+ (ren as CellRendererAccel).editable = true;
2713+ (ren as CellRendererAccel).accel_mode = Gtk.CellRendererAccelMode.OTHER;
2714+ (ren as CellRendererAccel).accel_edited.connect (
2715+ (a, path, accel_key, accel_mods, keycode) =>
2716+ {
2717+ uint key;
2718+ Awn.Keybinder.Egg.VirtualModifierType virt_mods;
2719+
2720+ Awn.Keybinder.Egg.keymap_virtualize_modifiers (Gdk.Keymap.get_default (), accel_mods, out virt_mods);
2721+ this.keybinding = Awn.Keybinder.Egg.virtual_accelerator_name (accel_key, virt_mods);
2722+ });
2723+ (ren as CellRendererAccel).accel_cleared.connect (
2724+ (a, path) =>
2725+ {
2726+ this.keybinding = "";
2727+ });
2728+ col = new TreeViewColumn.with_attributes (_ ("Shortcut"), ren, "text",1);
2729+ treeview.append_column (col);
2730+
2731+ // add the actual item
2732+ Gtk.TreeIter iter;
2733+ this.model.append (out iter);
2734+ this.model.set (iter, 0, _ ("Activate"));
2735+ // this will set the keybinding in the model
2736+ this.keybinding = this._keybinding;
2737+
2738+ // background image section
2739+ Gtk.Box section_box = new Gtk.VBox (false, 0);
2740+ box.pack_start (section_box, false, false, 0);
2741+
2742+ widget = new Gtk.Label ("");
2743+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Background image")));
2744+ (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
2745+ section_box.pack_start (widget, false, false, 0);
2746+
2747+ align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
2748+ align.set_padding (0, 0, 10, 0);
2749+ section_box.pack_start (align, false, false, 0);
2750+
2751+ box2 = new Gtk.HBox (false, 3);
2752+ align.add (box2);
2753+
2754+ this.preview_image = new Gtk.Image ();
2755+ this.chooser = new Gtk.FileChooserButton (_ ("Select a file"),
2756+ Gtk.FileChooserAction.OPEN);
2757+ this.chooser.set_filename (this.background_image);
2758+ this.chooser.set_preview_widget (this.preview_image);
2759+ this.chooser.set_size_request (200, -1);
2760+
2761+ this.chooser.file_set.connect ((w) =>
2762+ {
2763+ this.background_image = w.get_filename ();
2764+ });
2765+
2766+ this.chooser.update_preview.connect ((w) =>
2767+ {
2768+ string filename = w.get_preview_filename ();
2769+ try
2770+ {
2771+ Gdk.Pixbuf? pixbuf = new Gdk.Pixbuf.from_file_at_size (filename, 128, 128);
2772+ this.preview_image.set_from_pixbuf (pixbuf);
2773+ w.set_preview_widget_active (true);
2774+ }
2775+ catch
2776+ {
2777+ w.set_preview_widget_active (false);
2778+ }
2779+ });
2780+
2781+ box2.pack_start (this.chooser, true, true, 0);
2782+
2783+ Gtk.Widget button = new Gtk.Button.from_stock (Gtk.STOCK_CLEAR);
2784+ (button as Gtk.Button).clicked.connect ((b) =>
2785+ {
2786+ this.chooser.set_filename ("");
2787+ this.background_image = "";
2788+ });
2789+
2790+ box2.pack_start (button, false, false, 0);
2791+
2792+ // opacity section
2793+ section_box = new Gtk.VBox (false, 0);
2794+ box.pack_start (section_box, false, false, 0);
2795+
2796+ widget = new Gtk.Label ("");
2797+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Terminal opacity")));
2798+ (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
2799+ section_box.pack_start (widget, false, false, 3);
2800+
2801+ align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
2802+ align.set_padding (0, 0, 10, 0);
2803+ section_box.pack_start (align, false, false, 0);
2804+
2805+ widget = new Gtk.HScale.with_range (0.1f, 1.0f, 0.1f);
2806+ (widget as Gtk.Range).set_value (this._bg_opacity);
2807+ (widget as Gtk.Scale).value_changed.connect ((w) =>
2808+ {
2809+ this.bg_opacity = (float)w.get_value ();
2810+ });
2811+ /* bug in Vala's Gtk bindings format-value declared as unowned string
2812+ (widget as Gtk.Scale).format_value.connect ((w, v) =>
2813+ {
2814+ return "%d%%".printf ((int) GLib.Math.rint (v*100.0));
2815+ });
2816+ */
2817+ align.add (widget);
2818+
2819+ // external terminal command section
2820+ section_box = new Gtk.VBox (false, 0);
2821+ box.pack_start (section_box, false, false, 0);
2822+
2823+ widget = new Gtk.Label ("");
2824+ (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("External Terminal")));
2825+ (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
2826+ section_box.pack_start (widget, false, false, 3);
2827+
2828+ align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
2829+ align.set_padding (0, 0, 10, 0);
2830+ section_box.pack_start (align, false, false, 0);
2831+
2832+ widget = new Gtk.Entry ();
2833+ (widget as Gtk.Entry).set_text (this.terminal_command);
2834+ (widget as Gtk.Entry).focus_out_event.connect ((w, e) =>
2835+ {
2836+ this.terminal_command = (w as Gtk.Entry).get_text ();
2837+ });
2838+ align.add (widget);
2839+
2840+ // close button
2841+ box2 = new Gtk.HButtonBox ();
2842+ (box2 as Gtk.ButtonBox).set_layout (Gtk.ButtonBoxStyle.END);
2843+ box.pack_end (box2, false, false, 0);
2844+
2845+ widget = new Gtk.Button.from_stock (Gtk.STOCK_CLOSE);
2846+ box2.pack_start (widget, false, false, 0);
2847+ (widget as Gtk.Button).clicked.connect ((w) =>
2848+ {
2849+ this.prefs_window.hide ();
2850+ });
2851+
2852+ this.prefs_window.show_all ();
2853+ }
2854+}
2855+
2856+public Applet
2857+awn_applet_factory_initp (string canonical_name, string uid, int panel_id)
2858+{
2859+ Intl.setlocale (LocaleCategory.ALL, "");
2860+ Gettext.bindtextdomain (Build.GETTEXT_PACKAGE, Build.LOCALEDIR);
2861+ Gettext.textdomain (Build.GETTEXT_PACKAGE);
2862+
2863+ var conn = DBus.Bus.get (DBus.BusType.SESSION);
2864+ dynamic DBus.Object bus = conn.get_object ("org.freedesktop.DBus",
2865+ "/org/freedesktop/DBus",
2866+ "org.freedesktop.DBus");
2867+
2868+ // try to register service in session bus
2869+ uint result = bus.request_name ("org.awnproject.Applet.Terminal", (uint) 0);
2870+ if (result != DBus.RequestNameReply.PRIMARY_OWNER)
2871+ {
2872+ warning ("Coudln't get ownership of org.awnproject.Applet.Terminal!");
2873+ }
2874+
2875+ AwnTerminalApplet applet = new AwnTerminalApplet (canonical_name,
2876+ uid, panel_id);
2877+
2878+ conn.register_object ("/org/awnproject/Applet/Terminal", applet);
2879+
2880+ return applet;
2881+}
2882+
2883+// vim: set ft=vala et ts=2 sts=2 sw=2 ai :
2884
2885=== modified file 'applets/maintained/awnterm/awnterm.desktop.in.in'
2886--- src/awnterm/awnterm.desktop.in.in 2008-07-04 18:22:52 +0000
2887+++ applets/maintained/awnterm/awnterm.desktop.in.in 2010-01-26 03:57:14 +0000
2888@@ -1,8 +1,10 @@
2889 [Desktop Entry]
2890 Type=Application
2891+X-AWN-Type=Applet
2892 X-AWN-AppletType=C
2893-Name=Awn Terminal Applet
2894-Comment=A simple popup terminal
2895-Exec=@LIBDIR@/awn/applets/awnterm/awnterm.so
2896+_Name=Terminal Applet
2897+_Comment=A simple popup terminal
2898+Exec=awn-applet -p %k
2899+X-AWN-AppletExec=@LIBDIR@/awn/applets/awnterm/awnterm.so
2900 Icon=terminal
2901 X-AWN-AppletCategory=System,TerminalEmulator
2902
2903=== added file 'applets/maintained/awnterm/eggaccelerators.c'
2904--- applets/maintained/awnterm/eggaccelerators.c 1970-01-01 00:00:00 +0000
2905+++ applets/maintained/awnterm/eggaccelerators.c 2010-01-26 03:57:14 +0000
2906@@ -0,0 +1,657 @@
2907+/* eggaccelerators.c
2908+ * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik
2909+ * Developed by Havoc Pennington, Tim Janik
2910+ *
2911+ * This library is free software; you can redistribute it and/or
2912+ * modify it under the terms of the GNU Library General Public
2913+ * License as published by the Free Software Foundation; either
2914+ * version 2 of the License, or (at your option) any later version.
2915+ *
2916+ * This library is distributed in the hope that it will be useful,
2917+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
2918+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2919+ * Library General Public License for more details.
2920+ *
2921+ * You should have received a copy of the GNU Library General Public
2922+ * License along with this library; if not, write to the
2923+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2924+ * Boston, MA 02111-1307, USA.
2925+ */
2926+
2927+#include "eggaccelerators.h"
2928+
2929+#include <string.h>
2930+#include <gdk/gdkx.h>
2931+#include <gdk/gdkkeysyms.h>
2932+
2933+enum
2934+{
2935+ EGG_MODMAP_ENTRY_SHIFT = 0,
2936+ EGG_MODMAP_ENTRY_LOCK = 1,
2937+ EGG_MODMAP_ENTRY_CONTROL = 2,
2938+ EGG_MODMAP_ENTRY_MOD1 = 3,
2939+ EGG_MODMAP_ENTRY_MOD2 = 4,
2940+ EGG_MODMAP_ENTRY_MOD3 = 5,
2941+ EGG_MODMAP_ENTRY_MOD4 = 6,
2942+ EGG_MODMAP_ENTRY_MOD5 = 7,
2943+ EGG_MODMAP_ENTRY_LAST = 8
2944+};
2945+
2946+#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x))
2947+
2948+typedef struct
2949+{
2950+ EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST];
2951+
2952+} EggModmap;
2953+
2954+const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
2955+
2956+static inline gboolean
2957+is_alt (const gchar *string)
2958+{
2959+ return ((string[0] == '<') &&
2960+ (string[1] == 'a' || string[1] == 'A') &&
2961+ (string[2] == 'l' || string[2] == 'L') &&
2962+ (string[3] == 't' || string[3] == 'T') &&
2963+ (string[4] == '>'));
2964+}
2965+
2966+static inline gboolean
2967+is_ctl (const gchar *string)
2968+{
2969+ return ((string[0] == '<') &&
2970+ (string[1] == 'c' || string[1] == 'C') &&
2971+ (string[2] == 't' || string[2] == 'T') &&
2972+ (string[3] == 'l' || string[3] == 'L') &&
2973+ (string[4] == '>'));
2974+}
2975+
2976+static inline gboolean
2977+is_modx (const gchar *string)
2978+{
2979+ return ((string[0] == '<') &&
2980+ (string[1] == 'm' || string[1] == 'M') &&
2981+ (string[2] == 'o' || string[2] == 'O') &&
2982+ (string[3] == 'd' || string[3] == 'D') &&
2983+ (string[4] >= '1' && string[4] <= '5') &&
2984+ (string[5] == '>'));
2985+}
2986+
2987+static inline gboolean
2988+is_ctrl (const gchar *string)
2989+{
2990+ return ((string[0] == '<') &&
2991+ (string[1] == 'c' || string[1] == 'C') &&
2992+ (string[2] == 't' || string[2] == 'T') &&
2993+ (string[3] == 'r' || string[3] == 'R') &&
2994+ (string[4] == 'l' || string[4] == 'L') &&
2995+ (string[5] == '>'));
2996+}
2997+
2998+static inline gboolean
2999+is_shft (const gchar *string)
3000+{
3001+ return ((string[0] == '<') &&
3002+ (string[1] == 's' || string[1] == 'S') &&
3003+ (string[2] == 'h' || string[2] == 'H') &&
3004+ (string[3] == 'f' || string[3] == 'F') &&
3005+ (string[4] == 't' || string[4] == 'T') &&
3006+ (string[5] == '>'));
3007+}
3008+
3009+static inline gboolean
3010+is_shift (const gchar *string)
3011+{
3012+ return ((string[0] == '<') &&
3013+ (string[1] == 's' || string[1] == 'S') &&
3014+ (string[2] == 'h' || string[2] == 'H') &&
3015+ (string[3] == 'i' || string[3] == 'I') &&
3016+ (string[4] == 'f' || string[4] == 'F') &&
3017+ (string[5] == 't' || string[5] == 'T') &&
3018+ (string[6] == '>'));
3019+}
3020+
3021+static inline gboolean
3022+is_control (const gchar *string)
3023+{
3024+ return ((string[0] == '<') &&
3025+ (string[1] == 'c' || string[1] == 'C') &&
3026+ (string[2] == 'o' || string[2] == 'O') &&
3027+ (string[3] == 'n' || string[3] == 'N') &&
3028+ (string[4] == 't' || string[4] == 'T') &&
3029+ (string[5] == 'r' || string[5] == 'R') &&
3030+ (string[6] == 'o' || string[6] == 'O') &&
3031+ (string[7] == 'l' || string[7] == 'L') &&
3032+ (string[8] == '>'));
3033+}
3034+
3035+static inline gboolean
3036+is_release (const gchar *string)
3037+{
3038+ return ((string[0] == '<') &&
3039+ (string[1] == 'r' || string[1] == 'R') &&
3040+ (string[2] == 'e' || string[2] == 'E') &&
3041+ (string[3] == 'l' || string[3] == 'L') &&
3042+ (string[4] == 'e' || string[4] == 'E') &&
3043+ (string[5] == 'a' || string[5] == 'A') &&
3044+ (string[6] == 's' || string[6] == 'S') &&
3045+ (string[7] == 'e' || string[7] == 'E') &&
3046+ (string[8] == '>'));
3047+}
3048+
3049+static inline gboolean
3050+is_meta (const gchar *string)
3051+{
3052+ return ((string[0] == '<') &&
3053+ (string[1] == 'm' || string[1] == 'M') &&
3054+ (string[2] == 'e' || string[2] == 'E') &&
3055+ (string[3] == 't' || string[3] == 'T') &&
3056+ (string[4] == 'a' || string[4] == 'A') &&
3057+ (string[5] == '>'));
3058+}
3059+
3060+static inline gboolean
3061+is_super (const gchar *string)
3062+{
3063+ return ((string[0] == '<') &&
3064+ (string[1] == 's' || string[1] == 'S') &&
3065+ (string[2] == 'u' || string[2] == 'U') &&
3066+ (string[3] == 'p' || string[3] == 'P') &&
3067+ (string[4] == 'e' || string[4] == 'E') &&
3068+ (string[5] == 'r' || string[5] == 'R') &&
3069+ (string[6] == '>'));
3070+}
3071+
3072+static inline gboolean
3073+is_hyper (const gchar *string)
3074+{
3075+ return ((string[0] == '<') &&
3076+ (string[1] == 'h' || string[1] == 'H') &&
3077+ (string[2] == 'y' || string[2] == 'Y') &&
3078+ (string[3] == 'p' || string[3] == 'P') &&
3079+ (string[4] == 'e' || string[4] == 'E') &&
3080+ (string[5] == 'r' || string[5] == 'R') &&
3081+ (string[6] == '>'));
3082+}
3083+
3084+/**
3085+ * egg_accelerator_parse_virtual:
3086+ * @accelerator: string representing an accelerator
3087+ * @accelerator_key: return location for accelerator keyval
3088+ * @accelerator_mods: return location for accelerator modifier mask
3089+ *
3090+ * Parses a string representing a virtual accelerator. The format
3091+ * looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
3092+ * "&lt;Release&gt;z" (the last one is for key release). The parser
3093+ * is fairly liberal and allows lower or upper case, and also
3094+ * abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
3095+ *
3096+ * If the parse fails, @accelerator_key and @accelerator_mods will
3097+ * be set to 0 (zero) and %FALSE will be returned. If the string contains
3098+ * only modifiers, @accelerator_key will be set to 0 but %TRUE will be
3099+ * returned.
3100+ *
3101+ * The virtual vs. concrete accelerator distinction is a relic of
3102+ * how the X Window System works; there are modifiers Mod2-Mod5 that
3103+ * can represent various keyboard keys (numlock, meta, hyper, etc.),
3104+ * the virtual modifier represents the keyboard key, the concrete
3105+ * modifier the actual Mod2-Mod5 bits in the key press event.
3106+ *
3107+ * Returns: %TRUE on success.
3108+ */
3109+gboolean
3110+egg_accelerator_parse_virtual (const gchar *accelerator,
3111+ guint *accelerator_key,
3112+ EggVirtualModifierType *accelerator_mods)
3113+{
3114+ guint keyval;
3115+ GdkModifierType mods;
3116+ gint len;
3117+ gboolean bad_keyval;
3118+
3119+ if (accelerator_key)
3120+ *accelerator_key = 0;
3121+ if (accelerator_mods)
3122+ *accelerator_mods = 0;
3123+
3124+ g_return_val_if_fail (accelerator != NULL, FALSE);
3125+
3126+ bad_keyval = FALSE;
3127+
3128+ keyval = 0;
3129+ mods = 0;
3130+ len = strlen (accelerator);
3131+ while (len)
3132+ {
3133+ if (*accelerator == '<')
3134+ {
3135+ if (len >= 9 && is_release (accelerator))
3136+ {
3137+ accelerator += 9;
3138+ len -= 9;
3139+ mods |= EGG_VIRTUAL_RELEASE_MASK;
3140+ }
3141+ else if (len >= 9 && is_control (accelerator))
3142+ {
3143+ accelerator += 9;
3144+ len -= 9;
3145+ mods |= EGG_VIRTUAL_CONTROL_MASK;
3146+ }
3147+ else if (len >= 7 && is_shift (accelerator))
3148+ {
3149+ accelerator += 7;
3150+ len -= 7;
3151+ mods |= EGG_VIRTUAL_SHIFT_MASK;
3152+ }
3153+ else if (len >= 6 && is_shft (accelerator))
3154+ {
3155+ accelerator += 6;
3156+ len -= 6;
3157+ mods |= EGG_VIRTUAL_SHIFT_MASK;
3158+ }
3159+ else if (len >= 6 && is_ctrl (accelerator))
3160+ {
3161+ accelerator += 6;
3162+ len -= 6;
3163+ mods |= EGG_VIRTUAL_CONTROL_MASK;
3164+ }
3165+ else if (len >= 6 && is_modx (accelerator))
3166+ {
3167+ static const guint mod_vals[] = {
3168+ EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK,
3169+ EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK
3170+ };
3171+
3172+ len -= 6;
3173+ accelerator += 4;
3174+ mods |= mod_vals[*accelerator - '1'];
3175+ accelerator += 2;
3176+ }
3177+ else if (len >= 5 && is_ctl (accelerator))
3178+ {
3179+ accelerator += 5;
3180+ len -= 5;
3181+ mods |= EGG_VIRTUAL_CONTROL_MASK;
3182+ }
3183+ else if (len >= 5 && is_alt (accelerator))
3184+ {
3185+ accelerator += 5;
3186+ len -= 5;
3187+ mods |= EGG_VIRTUAL_ALT_MASK;
3188+ }
3189+ else if (len >= 6 && is_meta (accelerator))
3190+ {
3191+ accelerator += 6;
3192+ len -= 6;
3193+ mods |= EGG_VIRTUAL_META_MASK;
3194+ }
3195+ else if (len >= 7 && is_hyper (accelerator))
3196+ {
3197+ accelerator += 7;
3198+ len -= 7;
3199+ mods |= EGG_VIRTUAL_HYPER_MASK;
3200+ }
3201+ else if (len >= 7 && is_super (accelerator))
3202+ {
3203+ accelerator += 7;
3204+ len -= 7;
3205+ mods |= EGG_VIRTUAL_SUPER_MASK;
3206+ }
3207+ else
3208+ {
3209+ gchar last_ch;
3210+
3211+ last_ch = *accelerator;
3212+ while (last_ch && last_ch != '>')
3213+ {
3214+ last_ch = *accelerator;
3215+ accelerator += 1;
3216+ len -= 1;
3217+ }
3218+ }
3219+ }
3220+ else
3221+ {
3222+ keyval = gdk_keyval_from_name (accelerator);
3223+
3224+ if (keyval == 0)
3225+ bad_keyval = TRUE;
3226+
3227+ accelerator += len;
3228+ len -= len;
3229+ }
3230+ }
3231+
3232+ if (accelerator_key)
3233+ *accelerator_key = gdk_keyval_to_lower (keyval);
3234+ if (accelerator_mods)
3235+ *accelerator_mods = mods;
3236+
3237+ return !bad_keyval;
3238+}
3239+
3240+
3241+/**
3242+ * egg_virtual_accelerator_name:
3243+ * @accelerator_key: accelerator keyval
3244+ * @accelerator_mods: accelerator modifier mask
3245+ * @returns: a newly-allocated accelerator name
3246+ *
3247+ * Converts an accelerator keyval and modifier mask
3248+ * into a string parseable by egg_accelerator_parse_virtual().
3249+ * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK,
3250+ * this function returns "&lt;Control&gt;q".
3251+ *
3252+ * The caller of this function must free the returned string.
3253+ */
3254+gchar*
3255+egg_virtual_accelerator_name (guint accelerator_key,
3256+ EggVirtualModifierType accelerator_mods)
3257+{
3258+ static const gchar text_release[] = "<Release>";
3259+ static const gchar text_shift[] = "<Shift>";
3260+ static const gchar text_control[] = "<Control>";
3261+ static const gchar text_mod1[] = "<Alt>";
3262+ static const gchar text_mod2[] = "<Mod2>";
3263+ static const gchar text_mod3[] = "<Mod3>";
3264+ static const gchar text_mod4[] = "<Mod4>";
3265+ static const gchar text_mod5[] = "<Mod5>";
3266+ static const gchar text_meta[] = "<Meta>";
3267+ static const gchar text_super[] = "<Super>";
3268+ static const gchar text_hyper[] = "<Hyper>";
3269+ guint l;
3270+ gchar *keyval_name;
3271+ gchar *accelerator;
3272+
3273+ accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK;
3274+
3275+ keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
3276+ if (!keyval_name)
3277+ keyval_name = "";
3278+
3279+ l = 0;
3280+ if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
3281+ l += sizeof (text_release) - 1;
3282+ if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
3283+ l += sizeof (text_shift) - 1;
3284+ if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
3285+ l += sizeof (text_control) - 1;
3286+ if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
3287+ l += sizeof (text_mod1) - 1;
3288+ if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
3289+ l += sizeof (text_mod2) - 1;
3290+ if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
3291+ l += sizeof (text_mod3) - 1;
3292+ if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
3293+ l += sizeof (text_mod4) - 1;
3294+ if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
3295+ l += sizeof (text_mod5) - 1;
3296+ if (accelerator_mods & EGG_VIRTUAL_META_MASK)
3297+ l += sizeof (text_meta) - 1;
3298+ if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
3299+ l += sizeof (text_hyper) - 1;
3300+ if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
3301+ l += sizeof (text_super) - 1;
3302+ l += strlen (keyval_name);
3303+
3304+ accelerator = g_new (gchar, l + 1);
3305+
3306+ l = 0;
3307+ accelerator[l] = 0;
3308+ if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
3309+ {
3310+ strcpy (accelerator + l, text_release);
3311+ l += sizeof (text_release) - 1;
3312+ }
3313+ if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
3314+ {
3315+ strcpy (accelerator + l, text_shift);
3316+ l += sizeof (text_shift) - 1;
3317+ }
3318+ if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
3319+ {
3320+ strcpy (accelerator + l, text_control);
3321+ l += sizeof (text_control) - 1;
3322+ }
3323+ if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
3324+ {
3325+ strcpy (accelerator + l, text_mod1);
3326+ l += sizeof (text_mod1) - 1;
3327+ }
3328+ if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
3329+ {
3330+ strcpy (accelerator + l, text_mod2);
3331+ l += sizeof (text_mod2) - 1;
3332+ }
3333+ if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
3334+ {
3335+ strcpy (accelerator + l, text_mod3);
3336+ l += sizeof (text_mod3) - 1;
3337+ }
3338+ if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
3339+ {
3340+ strcpy (accelerator + l, text_mod4);
3341+ l += sizeof (text_mod4) - 1;
3342+ }
3343+ if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
3344+ {
3345+ strcpy (accelerator + l, text_mod5);
3346+ l += sizeof (text_mod5) - 1;
3347+ }
3348+ if (accelerator_mods & EGG_VIRTUAL_META_MASK)
3349+ {
3350+ strcpy (accelerator + l, text_meta);
3351+ l += sizeof (text_meta) - 1;
3352+ }
3353+ if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
3354+ {
3355+ strcpy (accelerator + l, text_hyper);
3356+ l += sizeof (text_hyper) - 1;
3357+ }
3358+ if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
3359+ {
3360+ strcpy (accelerator + l, text_super);
3361+ l += sizeof (text_super) - 1;
3362+ }
3363+
3364+ strcpy (accelerator + l, keyval_name);
3365+
3366+ return accelerator;
3367+}
3368+
3369+void
3370+egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
3371+ EggVirtualModifierType virtual_mods,
3372+ GdkModifierType *concrete_mods)
3373+{
3374+ GdkModifierType concrete;
3375+ int i;
3376+ const EggModmap *modmap;
3377+
3378+ g_return_if_fail (GDK_IS_KEYMAP (keymap));
3379+ g_return_if_fail (concrete_mods != NULL);
3380+
3381+ modmap = egg_keymap_get_modmap (keymap);
3382+
3383+ /* Not so sure about this algorithm. */
3384+
3385+ concrete = 0;
3386+ i = 0;
3387+ while (i < EGG_MODMAP_ENTRY_LAST)
3388+ {
3389+ if (modmap->mapping[i] & virtual_mods)
3390+ concrete |= (1 << i);
3391+
3392+ ++i;
3393+ }
3394+
3395+ *concrete_mods = concrete;
3396+}
3397+
3398+void
3399+egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
3400+ GdkModifierType concrete_mods,
3401+ EggVirtualModifierType *virtual_mods)
3402+{
3403+ GdkModifierType virtual;
3404+ int i;
3405+ const EggModmap *modmap;
3406+
3407+ g_return_if_fail (GDK_IS_KEYMAP (keymap));
3408+ g_return_if_fail (virtual_mods != NULL);
3409+
3410+ modmap = egg_keymap_get_modmap (keymap);
3411+
3412+ /* Not so sure about this algorithm. */
3413+
3414+ virtual = 0;
3415+ i = 0;
3416+ while (i < EGG_MODMAP_ENTRY_LAST)
3417+ {
3418+ if ((1 << i) & concrete_mods)
3419+ {
3420+ EggVirtualModifierType cleaned;
3421+
3422+ cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK |
3423+ EGG_VIRTUAL_MOD3_MASK |
3424+ EGG_VIRTUAL_MOD4_MASK |
3425+ EGG_VIRTUAL_MOD5_MASK);
3426+
3427+ if (cleaned != 0)
3428+ {
3429+ virtual |= cleaned;
3430+ }
3431+ else
3432+ {
3433+ /* Rather than dropping mod2->mod5 if not bound,
3434+ * go ahead and use the concrete names
3435+ */
3436+ virtual |= modmap->mapping[i];
3437+ }
3438+ }
3439+
3440+ ++i;
3441+ }
3442+
3443+ *virtual_mods = virtual;
3444+}
3445+
3446+static void
3447+reload_modmap (GdkKeymap *keymap,
3448+ EggModmap *modmap)
3449+{
3450+ XModifierKeymap *xmodmap;
3451+ int map_size;
3452+ int i;
3453+
3454+ /* FIXME multihead */
3455+ xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
3456+
3457+ memset (modmap->mapping, 0, sizeof (modmap->mapping));
3458+
3459+ /* there are 8 modifiers, and the first 3 are shift, shift lock,
3460+ * and control
3461+ */
3462+ map_size = 8 * xmodmap->max_keypermod;
3463+ i = 3 * xmodmap->max_keypermod;
3464+ while (i < map_size)
3465+ {
3466+ /* get the key code at this point in the map,
3467+ * see if its keysym is one we're interested in
3468+ */
3469+ int keycode = xmodmap->modifiermap[i];
3470+ GdkKeymapKey *keys;
3471+ guint *keyvals;
3472+ int n_entries;
3473+ int j;
3474+ EggVirtualModifierType mask;
3475+
3476+ keys = NULL;
3477+ keyvals = NULL;
3478+ n_entries = 0;
3479+
3480+ gdk_keymap_get_entries_for_keycode (keymap,
3481+ keycode,
3482+ &keys, &keyvals, &n_entries);
3483+
3484+ mask = 0;
3485+ j = 0;
3486+ while (j < n_entries)
3487+ {
3488+ if (keyvals[j] == GDK_Num_Lock)
3489+ mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
3490+ else if (keyvals[j] == GDK_Scroll_Lock)
3491+ mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
3492+ else if (keyvals[j] == GDK_Meta_L ||
3493+ keyvals[j] == GDK_Meta_R)
3494+ mask |= EGG_VIRTUAL_META_MASK;
3495+ else if (keyvals[j] == GDK_Hyper_L ||
3496+ keyvals[j] == GDK_Hyper_R)
3497+ mask |= EGG_VIRTUAL_HYPER_MASK;
3498+ else if (keyvals[j] == GDK_Super_L ||
3499+ keyvals[j] == GDK_Super_R)
3500+ mask |= EGG_VIRTUAL_SUPER_MASK;
3501+ else if (keyvals[j] == GDK_Mode_switch)
3502+ mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
3503+
3504+ ++j;
3505+ }
3506+
3507+ /* Mod1Mask is 1 << 3 for example, i.e. the
3508+ * fourth modifier, i / keyspermod is the modifier
3509+ * index
3510+ */
3511+ modmap->mapping[i/xmodmap->max_keypermod] |= mask;
3512+
3513+ g_free (keyvals);
3514+ g_free (keys);
3515+
3516+ ++i;
3517+ }
3518+
3519+ /* Add in the not-really-virtual fixed entries */
3520+ modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK;
3521+ modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK;
3522+ modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK;
3523+ modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK;
3524+ modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK;
3525+ modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK;
3526+ modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK;
3527+ modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK;
3528+
3529+ XFreeModifiermap (xmodmap);
3530+}
3531+
3532+const EggModmap*
3533+egg_keymap_get_modmap (GdkKeymap *keymap)
3534+{
3535+ EggModmap *modmap;
3536+
3537+ /* This is all a hack, much simpler when we can just
3538+ * modify GDK directly.
3539+ */
3540+
3541+ modmap = g_object_get_data (G_OBJECT (keymap),
3542+ "egg-modmap");
3543+
3544+ if (modmap == NULL)
3545+ {
3546+ modmap = g_new0 (EggModmap, 1);
3547+
3548+ /* FIXME modify keymap change events with an event filter
3549+ * and force a reload if we get one
3550+ */
3551+
3552+ reload_modmap (keymap, modmap);
3553+
3554+ g_object_set_data_full (G_OBJECT (keymap),
3555+ "egg-modmap",
3556+ modmap,
3557+ g_free);
3558+ }
3559+
3560+ g_assert (modmap != NULL);
3561+
3562+ return modmap;
3563+}
3564
3565=== added file 'applets/maintained/awnterm/eggaccelerators.h'
3566--- applets/maintained/awnterm/eggaccelerators.h 1970-01-01 00:00:00 +0000
3567+++ applets/maintained/awnterm/eggaccelerators.h 2010-01-26 03:57:14 +0000
3568@@ -0,0 +1,87 @@
3569+/* eggaccelerators.h
3570+ * Copyright (C) 2002 Red Hat, Inc.
3571+ * Developed by Havoc Pennington
3572+ *
3573+ * This library is free software; you can redistribute it and/or
3574+ * modify it under the terms of the GNU Library General Public
3575+ * License as published by the Free Software Foundation; either
3576+ * version 2 of the License, or (at your option) any later version.
3577+ *
3578+ * This library is distributed in the hope that it will be useful,
3579+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3580+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3581+ * Library General Public License for more details.
3582+ *
3583+ * You should have received a copy of the GNU Library General Public
3584+ * License along with this library; if not, write to the
3585+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3586+ * Boston, MA 02111-1307, USA.
3587+ */
3588+
3589+#ifndef __EGG_ACCELERATORS_H__
3590+#define __EGG_ACCELERATORS_H__
3591+
3592+#include <gtk/gtkaccelgroup.h>
3593+#include <gdk/gdk.h>
3594+
3595+G_BEGIN_DECLS
3596+
3597+/* Where a value is also in GdkModifierType we coincide,
3598+ * otherwise we don't overlap.
3599+ */
3600+typedef enum
3601+{
3602+ EGG_VIRTUAL_SHIFT_MASK = 1 << 0,
3603+ EGG_VIRTUAL_LOCK_MASK = 1 << 1,
3604+ EGG_VIRTUAL_CONTROL_MASK = 1 << 2,
3605+
3606+ EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */
3607+
3608+ EGG_VIRTUAL_MOD2_MASK = 1 << 4,
3609+ EGG_VIRTUAL_MOD3_MASK = 1 << 5,
3610+ EGG_VIRTUAL_MOD4_MASK = 1 << 6,
3611+ EGG_VIRTUAL_MOD5_MASK = 1 << 7,
3612+
3613+#if 0
3614+ GDK_BUTTON1_MASK = 1 << 8,
3615+ GDK_BUTTON2_MASK = 1 << 9,
3616+ GDK_BUTTON3_MASK = 1 << 10,
3617+ GDK_BUTTON4_MASK = 1 << 11,
3618+ GDK_BUTTON5_MASK = 1 << 12,
3619+ /* 13, 14 are used by Xkb for the keyboard group */
3620+#endif
3621+
3622+ EGG_VIRTUAL_META_MASK = 1 << 24,
3623+ EGG_VIRTUAL_SUPER_MASK = 1 << 25,
3624+ EGG_VIRTUAL_HYPER_MASK = 1 << 26,
3625+ EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27,
3626+ EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
3627+ EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
3628+
3629+ /* Also in GdkModifierType */
3630+ EGG_VIRTUAL_RELEASE_MASK = 1 << 30,
3631+
3632+ /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
3633+ * 7 f 0 0 0 0 f f
3634+ */
3635+ EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
3636+
3637+} EggVirtualModifierType;
3638+
3639+gboolean egg_accelerator_parse_virtual (const gchar *accelerator,
3640+ guint *accelerator_key,
3641+ EggVirtualModifierType *accelerator_mods);
3642+void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
3643+ EggVirtualModifierType virtual_mods,
3644+ GdkModifierType *concrete_mods);
3645+void egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
3646+ GdkModifierType concrete_mods,
3647+ EggVirtualModifierType *virtual_mods);
3648+
3649+gchar* egg_virtual_accelerator_name (guint accelerator_key,
3650+ EggVirtualModifierType accelerator_mods);
3651+
3652+G_END_DECLS
3653+
3654+
3655+#endif /* __EGG_ACCELERATORS_H__ */
3656
3657=== added file 'applets/maintained/awnterm/keybinder.c'
3658--- applets/maintained/awnterm/keybinder.c 1970-01-01 00:00:00 +0000
3659+++ applets/maintained/awnterm/keybinder.c 2010-01-26 03:57:14 +0000
3660@@ -0,0 +1,349 @@
3661+//
3662+// This file comes from the Tomboy project.
3663+// http://www.gnome.org/projects/tomboy/
3664+//
3665+/*
3666+ * Copyright (C) 2004-2007 Alex Graveley
3667+ *
3668+ * This library is free software; you can redistribute it and/or
3669+ * modify it under the terms of the GNU Library General Public
3670+ * License as published by the Free Software Foundation; either
3671+ * version 2 of the License, or (at your option) any later version.
3672+ *
3673+ * This library is distributed in the hope that it will be useful,
3674+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
3675+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3676+ * Library General Public License for more details.
3677+ *
3678+ * You should have received a copy of the GNU Library General Public
3679+ * License along with this library; if not, write to the
3680+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3681+ * Boston, MA 02111-1307, USA.
3682+ */
3683+
3684+#include <string.h>
3685+
3686+#include <gdk/gdk.h>
3687+#include <gdk/gdkwindow.h>
3688+#include <gdk/gdkx.h>
3689+#include <X11/Xlib.h>
3690+
3691+#include "eggaccelerators.h"
3692+#include "keybinder.h"
3693+
3694+/* Uncomment the next line to print a debug trace. */
3695+/* #define DEBUG */
3696+
3697+#ifdef DEBUG
3698+# define TRACE(x) x
3699+#else
3700+# define TRACE(x) do {} while (FALSE);
3701+#endif
3702+
3703+typedef struct _Binding {
3704+ AwnBindkeyHandler handler;
3705+ gpointer user_data;
3706+ char *keystring;
3707+ uint keycode;
3708+ uint modifiers;
3709+} Binding;
3710+
3711+static GSList *bindings = NULL;
3712+static guint32 last_event_time = 0;
3713+static gboolean processing_event = FALSE;
3714+
3715+static guint num_lock_mask, caps_lock_mask, scroll_lock_mask;
3716+
3717+static void
3718+lookup_ignorable_modifiers (GdkKeymap *keymap)
3719+{
3720+ egg_keymap_resolve_virtual_modifiers (keymap,
3721+ EGG_VIRTUAL_LOCK_MASK,
3722+ &caps_lock_mask);
3723+
3724+ egg_keymap_resolve_virtual_modifiers (keymap,
3725+ EGG_VIRTUAL_NUM_LOCK_MASK,
3726+ &num_lock_mask);
3727+
3728+ egg_keymap_resolve_virtual_modifiers (keymap,
3729+ EGG_VIRTUAL_SCROLL_LOCK_MASK,
3730+ &scroll_lock_mask);
3731+}
3732+
3733+static void
3734+grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin,
3735+ Binding *binding,
3736+ gboolean grab)
3737+{
3738+ guint mod_masks [] = {
3739+ 0, /* modifier only */
3740+ num_lock_mask,
3741+ caps_lock_mask,
3742+ scroll_lock_mask,
3743+ num_lock_mask | caps_lock_mask,
3744+ num_lock_mask | scroll_lock_mask,
3745+ caps_lock_mask | scroll_lock_mask,
3746+ num_lock_mask | caps_lock_mask | scroll_lock_mask,
3747+ };
3748+ int i;
3749+
3750+ for (i = 0; i < G_N_ELEMENTS (mod_masks); i++) {
3751+ if (grab) {
3752+ XGrabKey (GDK_WINDOW_XDISPLAY (rootwin),
3753+ binding->keycode,
3754+ binding->modifiers | mod_masks [i],
3755+ GDK_WINDOW_XWINDOW (rootwin),
3756+ False,
3757+ GrabModeAsync,
3758+ GrabModeAsync);
3759+ } else {
3760+ XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin),
3761+ binding->keycode,
3762+ binding->modifiers | mod_masks [i],
3763+ GDK_WINDOW_XWINDOW (rootwin));
3764+ }
3765+ }
3766+}
3767+
3768+static gboolean
3769+do_grab_key (Binding *binding)
3770+{
3771+ GdkKeymap *keymap = gdk_keymap_get_default ();
3772+ GdkWindow *rootwin = gdk_get_default_root_window ();
3773+
3774+ EggVirtualModifierType virtual_mods = 0;
3775+ guint keysym = 0;
3776+
3777+ if (keymap == NULL || rootwin == NULL)
3778+ return FALSE;
3779+
3780+ if (!egg_accelerator_parse_virtual (binding->keystring,
3781+ &keysym,
3782+ &virtual_mods))
3783+ return FALSE;
3784+
3785+ TRACE (g_print ("Got accel %d, %d\n", keysym, virtual_mods));
3786+
3787+ binding->keycode = XKeysymToKeycode (GDK_WINDOW_XDISPLAY (rootwin),
3788+ keysym);
3789+ if (binding->keycode == 0)
3790+ return FALSE;
3791+
3792+ TRACE (g_print ("Got keycode %d\n", binding->keycode));
3793+
3794+ egg_keymap_resolve_virtual_modifiers (keymap,
3795+ virtual_mods,
3796+ &binding->modifiers);
3797+
3798+ TRACE (g_print ("Got modmask %d\n", binding->modifiers));
3799+
3800+ gdk_error_trap_push ();
3801+
3802+ grab_ungrab_with_ignorable_modifiers (rootwin,
3803+ binding,
3804+ TRUE /* grab */);
3805+
3806+ gdk_flush ();
3807+
3808+ if (gdk_error_trap_pop ()) {
3809+ g_warning ("Binding '%s' failed!\n", binding->keystring);
3810+ return FALSE;
3811+ }
3812+
3813+ return TRUE;
3814+}
3815+
3816+static gboolean
3817+do_ungrab_key (Binding *binding)
3818+{
3819+ GdkWindow *rootwin = gdk_get_default_root_window ();
3820+
3821+ TRACE (g_print ("Removing grab for '%s'\n", binding->keystring));
3822+
3823+ grab_ungrab_with_ignorable_modifiers (rootwin,
3824+ binding,
3825+ FALSE /* ungrab */);
3826+
3827+ return TRUE;
3828+}
3829+
3830+static GdkFilterReturn
3831+filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
3832+{
3833+ GdkFilterReturn return_val = GDK_FILTER_CONTINUE;
3834+ XEvent *xevent = (XEvent *) gdk_xevent;
3835+ guint event_mods;
3836+ GSList *iter;
3837+
3838+ TRACE (g_print ("Got Event! %d, %d\n", xevent->type, event->type));
3839+
3840+ switch (xevent->type) {
3841+ case KeyPress:
3842+ TRACE (g_print ("Got KeyPress! keycode: %d, modifiers: %d\n",
3843+ xevent->xkey.keycode,
3844+ xevent->xkey.state));
3845+
3846+ /*
3847+ * Set the last event time for use when showing
3848+ * windows to avoid anti-focus-stealing code.
3849+ */
3850+ processing_event = TRUE;
3851+ last_event_time = xevent->xkey.time;
3852+
3853+ event_mods = xevent->xkey.state & ~(num_lock_mask |
3854+ caps_lock_mask |
3855+ scroll_lock_mask);
3856+
3857+ for (iter = bindings; iter != NULL; iter = iter->next) {
3858+ Binding *binding = (Binding *) iter->data;
3859+
3860+ if (binding->keycode == xevent->xkey.keycode &&
3861+ binding->modifiers == event_mods) {
3862+
3863+ TRACE (g_print ("Calling handler for '%s'...\n",
3864+ binding->keystring));
3865+
3866+ (binding->handler) (binding->keystring,
3867+ binding->user_data);
3868+ }
3869+ }
3870+
3871+ processing_event = FALSE;
3872+ break;
3873+ case KeyRelease:
3874+ TRACE (g_print ("Got KeyRelease! \n"));
3875+ break;
3876+ }
3877+
3878+ return return_val;
3879+}
3880+
3881+static void
3882+keymap_changed (GdkKeymap *map)
3883+{
3884+ GdkKeymap *keymap = gdk_keymap_get_default ();
3885+ GSList *iter;
3886+
3887+ TRACE (g_print ("Keymap changed! Regrabbing keys..."));
3888+
3889+ for (iter = bindings; iter != NULL; iter = iter->next) {
3890+ Binding *binding = (Binding *) iter->data;
3891+ do_ungrab_key (binding);
3892+ }
3893+
3894+ lookup_ignorable_modifiers (keymap);
3895+
3896+ for (iter = bindings; iter != NULL; iter = iter->next) {
3897+ Binding *binding = (Binding *) iter->data;
3898+ do_grab_key (binding);
3899+ }
3900+}
3901+
3902+void
3903+awn_keybinder_init (void)
3904+{
3905+ GdkKeymap *keymap = gdk_keymap_get_default ();
3906+ GdkWindow *rootwin = gdk_get_default_root_window ();
3907+
3908+ lookup_ignorable_modifiers (keymap);
3909+
3910+ gdk_window_add_filter (rootwin,
3911+ filter_func,
3912+ NULL);
3913+
3914+ g_signal_connect (keymap,
3915+ "keys_changed",
3916+ G_CALLBACK (keymap_changed),
3917+ NULL);
3918+}
3919+
3920+gboolean
3921+awn_keybinder_bind (const char *keystring,
3922+ AwnBindkeyHandler handler,
3923+ gpointer user_data)
3924+{
3925+ Binding *binding;
3926+ gboolean success;
3927+
3928+ binding = g_new0 (Binding, 1);
3929+ binding->keystring = g_strdup (keystring);
3930+ binding->handler = handler;
3931+ binding->user_data = user_data;
3932+
3933+ /* Sets the binding's keycode and modifiers */
3934+ success = do_grab_key (binding);
3935+
3936+ if (success) {
3937+ bindings = g_slist_prepend (bindings, binding);
3938+ } else {
3939+ g_free (binding->keystring);
3940+ g_free (binding);
3941+ }
3942+
3943+ return success;
3944+}
3945+
3946+gboolean
3947+awn_keybinder_unbind (const char *keystring,
3948+ AwnBindkeyHandler handler,
3949+ gpointer user_data)
3950+{
3951+ GSList *iter;
3952+
3953+ for (iter = bindings; iter != NULL; iter = iter->next) {
3954+ Binding *binding = (Binding *) iter->data;
3955+
3956+ if (strcmp (keystring, binding->keystring) != 0 ||
3957+ handler != binding->handler)
3958+ continue;
3959+
3960+ do_ungrab_key (binding);
3961+
3962+ bindings = g_slist_remove (bindings, binding);
3963+
3964+ g_free (binding->keystring);
3965+ g_free (binding);
3966+ break;
3967+ }
3968+
3969+ return TRUE;
3970+}
3971+
3972+/*
3973+ * From eggcellrenderkeys.c.
3974+ */
3975+gboolean
3976+awn_keybinder_is_modifier (guint keycode)
3977+{
3978+ gint i;
3979+ gint map_size;
3980+ XModifierKeymap *mod_keymap;
3981+ gboolean retval = FALSE;
3982+
3983+ mod_keymap = XGetModifierMapping (gdk_display);
3984+
3985+ map_size = 8 * mod_keymap->max_keypermod;
3986+
3987+ i = 0;
3988+ while (i < map_size) {
3989+ if (keycode == mod_keymap->modifiermap[i]) {
3990+ retval = TRUE;
3991+ break;
3992+ }
3993+ ++i;
3994+ }
3995+
3996+ XFreeModifiermap (mod_keymap);
3997+
3998+ return retval;
3999+}
4000+
4001+guint32
4002+awn_keybinder_get_current_event_time (void)
4003+{
4004+ if (processing_event)
4005+ return last_event_time;
4006+ else
4007+ return GDK_CURRENT_TIME;
4008+}
4009+
4010
4011=== added file 'applets/maintained/awnterm/keybinder.h'
4012--- applets/maintained/awnterm/keybinder.h 1970-01-01 00:00:00 +0000
4013+++ applets/maintained/awnterm/keybinder.h 2010-01-26 03:57:14 +0000
4014@@ -0,0 +1,50 @@
4015+//
4016+// This file comes from the Tomboy project.
4017+// http://www.gnome.org/projects/tomboy/
4018+//
4019+/*
4020+ * Copyright (C) 2004-2007 Alex Graveley
4021+ *
4022+ * This library is free software; you can redistribute it and/or
4023+ * modify it under the terms of the GNU Library General Public
4024+ * License as published by the Free Software Foundation; either
4025+ * version 2 of the License, or (at your option) any later version.
4026+ *
4027+ * This library is distributed in the hope that it will be useful,
4028+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
4029+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4030+ * Library General Public License for more details.
4031+ *
4032+ * You should have received a copy of the GNU Library General Public
4033+ * License along with this library; if not, write to the
4034+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4035+ * Boston, MA 02111-1307, USA.
4036+ */
4037+
4038+#ifndef __AWN_KEY_BINDER_H__
4039+#define __AWN_KEY_BINDER_H__
4040+
4041+#include <glib/gtypes.h>
4042+
4043+G_BEGIN_DECLS
4044+
4045+typedef void (*AwnBindkeyHandler) (const char *keystring, gpointer user_data);
4046+
4047+void awn_keybinder_init (void);
4048+
4049+gboolean awn_keybinder_bind (const char *keystring,
4050+ AwnBindkeyHandler handler,
4051+ gpointer user_data);
4052+
4053+gboolean awn_keybinder_unbind (const char *keystring,
4054+ AwnBindkeyHandler handler,
4055+ gpointer user_data);
4056+
4057+gboolean awn_keybinder_is_modifier (guint keycode);
4058+
4059+guint32 awn_keybinder_get_current_event_time (void);
4060+
4061+G_END_DECLS
4062+
4063+#endif /* __AWN_KEY_BINDER_H__ */
4064+
4065
4066=== added file 'applets/maintained/awnterm/keybinder.vapi'
4067--- applets/maintained/awnterm/keybinder.vapi 1970-01-01 00:00:00 +0000
4068+++ applets/maintained/awnterm/keybinder.vapi 2010-01-26 03:57:14 +0000
4069@@ -0,0 +1,45 @@
4070+namespace Awn {
4071+ namespace Keybinder {
4072+ namespace Egg {
4073+ [CCode (cheader_filename = "eggaccelerators.h", cprefix = "EGG_VIRTUAL_", cname = "EggVirtualModifierType")]
4074+ [Flags]
4075+ public enum VirtualModifierType
4076+ {
4077+ SHIFT_MASK,
4078+ LOCK_MASK,
4079+ CONTROL_MASK,
4080+ ALT_MASK,
4081+ MOD2_MASK,
4082+ MOD3_MASK,
4083+ MOD4_MASK,
4084+ MOD5_MASK,
4085+ META_MASK,
4086+ SUPER_MASK,
4087+ HYPER_MASK,
4088+ MODE_SWITCH_MASK,
4089+ NUM_LOCK_MASK,
4090+ SCROLL_LOCK_MASK,
4091+
4092+ RELEASE_MASK
4093+ }
4094+ [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_accelerator_parse_virtual")]
4095+ public static bool accelerator_parse_virtual (string accelerator, out uint key, out VirtualModifierType mods);
4096+ [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_virtual_accelerator_name")]
4097+ public static string virtual_accelerator_name (uint key, VirtualModifierType mods);
4098+ [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_keymap_virtualize_modifiers")]
4099+ public static void keymap_virtualize_modifiers (Gdk.Keymap keymap, Gdk.ModifierType mods, out VirtualModifierType virtual_mods);
4100+ [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_keymap_resolve_virtual_modifiers")]
4101+ public static void keymap_resolve_virtual_modifiers (Gdk.Keymap keymap, VirtualModifierType virtual_mods, out Gdk.ModifierType mods);
4102+ }
4103+
4104+ [CCode (cheader_filename = "keybinder.h", cprefix = "Awn")]
4105+ public delegate void BindkeyHandler (string keystring);
4106+ [CCode (cheader_filename = "keybinder.h", lower_case_cprefix = "awn_keybinder_")]
4107+ public static void init ();
4108+ public static bool bind (string keystring, BindkeyHandler handler);
4109+ public static bool unbind (string keystring, BindkeyHandler handler);
4110+ public static bool is_modifier (uint keycode);
4111+ public static uint32 get_current_event_time ();
4112+
4113+ }
4114+}
4115
4116=== added directory 'applets/maintained/bandwidth-monitor'
4117=== added file 'applets/maintained/bandwidth-monitor/CHANGELOG'
4118--- applets/maintained/bandwidth-monitor/CHANGELOG 1970-01-01 00:00:00 +0000
4119+++ applets/maintained/bandwidth-monitor/CHANGELOG 2010-01-26 03:57:14 +0000
4120@@ -0,0 +1,126 @@
4121+01/05/2010:
4122+ PEP8 cleanup of all lines > 80 chars
4123+ Rename of classes/variables for space/consistency
4124+ Change of timer values for consistent drawing.
4125+ Removed some unused modules.
4126+ Removed 'blank.png' - initial icon is now created with gtk.gdk.pixbuf_new_from_xpm_data()
4127+
4128+01/03/2010:
4129+ Removed settings.load/load_preferences
4130+ Fix for applet/font-sizing when changing orientation
4131+ Changed instantiation of color objects to use gtk.gdk.color_parse instead of gtk.gdk.Color('#XXX') for older systems
4132+ Changed handling of default preferences/unassigned keys
4133+
4134+
4135+01/02/2010:
4136+ Fixed bug which caused the unit of measure checkbutton to become out of sync with the gconf value
4137+ Changed default interface to '', was wlan0 for some reason..
4138+ PEP8 verified - mostly complaint, a few lines are "too long"
4139+ Replaced icon
4140+ Removed LICENSE file - provided by AWN
4141+ Fixed desktop file version
4142+ Removed "Encoding" from desktop file
4143+ Improved logic for setting device preference values per Mark Lee's suggestion
4144+ Added timeout_add_seconds wrapper function
4145+ Adjusted width calculation if orientation is vertical
4146+ Change version string to use awn.extras.__version__
4147+ Changed email address
4148+
4149+12/20/2009:
4150+ Change logic to graph calculation which corrects the following rendering issues -
4151+ Graph lines drawing outside of border/frame
4152+ Graph normalised top-value was rendering off-screen when applet size smaller than 35
4153+ Graph normalised top-value was rendering very low on the graph when applet size greater than 60
4154+ Changed scaling of initial icon - it was rendering too large and centered text was displayed with an odd alignment to the dock
4155+ Fixed some issues with default values
4156+ Changed short-name to 'bandwidth-monitor' to match schema file
4157+ Corrected path to UI file
4158+ Fixed division by zero error
4159+ Addedd bandwidth-monitor.ui and bwmprefs.py to Makefile.am
4160+
4161+12/19/2009:
4162+ Added preferences to control -
4163+ Enable/Disable drawing of the background
4164+ Enable/Disable drawing of the border
4165+ Select color/opacity of background
4166+ Select color/opacity of border
4167+ Options to control the text representation of throughput
4168+ Display Upload/Download text
4169+ Display Sum text only
4170+ Do not display text - only draw the graph.
4171+ Enable/Disable drawing the zero value in the graph (if true, draw a line at the bottom of the graph for zero value)
4172+
4173+12/18/2009:
4174+ Cleaned up code to make it run faster or use less resources
4175+ Removed everything related to the status of interfaces (Not required, may add later)
4176+ Removed everything related to IP Addresses for interfaces (Not required, may add later)
4177+
4178+12/16/2009:
4179+ Added call to applet.errors.general if read access to /proc/net/dev fails.
4180+ Made changes to TODO file
4181+ Change parser logic for to handle interfaces with less than 11 columns of output in 'netstat -iea'
4182+
4183+12/14/2009:
4184+ Created preferences dialog to manage options -
4185+ An option to select the unit Bytes/bits
4186+ A spinbutton entry for setting the minimum threshold
4187+ A "Devices" pref-pane which allows selection of interfaces into virtual interfaces
4188+ A color picker for upload and download colors for use in the line-graph.
4189+ Fixed division by zero that would occur in some scenarios.
4190+
4191+12/10/2009:
4192+ Added virtual interfaces for SUM and MULTI
4193+ The Sum Interface is a virtual interface which displays the sum throughput of all interfaces that are selected for "Sum"
4194+ The Multi Interface is a virtual interface which displays each individual throughput of the interfaces that are selected for "Multi", each with the colors defined for the interface.
4195+ Added logic to parse and use preferences that are planned
4196+
4197+11/29/2009:
4198+ Changed table generation function to be less verbose
4199+ Fixed regular expression for gathering IP/Netmask
4200+ Changed IP/Netmask tooltip logic
4201+ Changed command for device stats gathering to include administratively down-interfaces
4202+
4203+11/28/2009:
4204+ pep8 verified main program file
4205+ Added a few non-parsed comments to the source file
4206+
4207+11/28/2009:
4208+ Changed initial ratio value to 1 to prevent the graphs from ignoring data transfers below 3200 bytes
4209+ Changed the graph scaling to display the line graph almost center of the graph window below 6400 bytes
4210+ Added items to the TODO list
4211+
4212+11/27/2009:
4213+ Filter out the wmaster0 interface.
4214+ Applied patch from onox:
4215+ Renamed some classes
4216+ Removed functions for things abstracted by AWN
4217+ Cleaned up some of the syntax
4218+ Cleaned up some naming conventions
4219+ Created a new branch repository (previous was setup wrong): lp:~kylehuff/awn-extras/0.4-bandwidth-monitor
4220+
4221+11/27/2009:
4222+ Applied patch from mhr3 which included -
4223+ Changes to applet short-name
4224+ Changes to Makefile.am
4225+ Fixed spelling of "CHANGLOG" to "CHANGELOG"
4226+ Renamed awn-bwm.schema-ini to awn-applet-bwm.schema-ini
4227+ Changed the application of the cairo surface to use applet.set_icon_context()
4228+ Fixed bug which caused rendering the scale of the upload speed off-screen
4229+ Removed references to some obsolete functions/methods/properties
4230+
4231+11/25/2009:
4232+ Eliminated usage of 'ifconfig' command - moved everything to netstat
4233+ Bumped to version v0.3.9.2
4234+ Created launchpad branch - lp:~kylehuff/awn-extras/awn-bwm
4235+
4236+11/24/2009:
4237+ Converted text to OverlayText()
4238+ Cleaned up some functions
4239+ Bumped version to v0.3.9.1
4240+
4241+11/23/2009:
4242+ Implemented API v0.4
4243+ Changed from v0.3.2.8 to v0.3.9.0
4244+
4245+04/18/2006:
4246+ Original release - 0.1
4247
4248=== added file 'applets/maintained/bandwidth-monitor/Makefile.am'
4249--- applets/maintained/bandwidth-monitor/Makefile.am 1970-01-01 00:00:00 +0000
4250+++ applets/maintained/bandwidth-monitor/Makefile.am 2010-01-26 03:57:14 +0000
4251@@ -0,0 +1,16 @@
4252+APPLET_NAME = bandwidth-monitor
4253+APPLET_MAIN_FILE = awn-bwm.py
4254+include $(top_srcdir)/Makefile.python-applet
4255+include $(top_srcdir)/Makefile.schemas
4256+
4257+dist_applet_DATA = \
4258+ CHANGELOG \
4259+ bwmprefs.py \
4260+ bandwidth-monitor.ui \
4261+ $(NULL)
4262+
4263+bwm_iconsdir = $(applet_datadir)/images
4264+dist_bwm_icons_DATA = \
4265+ images/icon.png \
4266+ $(NULL)
4267+
4268
4269=== added file 'applets/maintained/bandwidth-monitor/TODO'
4270--- applets/maintained/bandwidth-monitor/TODO 1970-01-01 00:00:00 +0000
4271+++ applets/maintained/bandwidth-monitor/TODO 2010-01-26 03:57:14 +0000
4272@@ -0,0 +1,19 @@
4273+TODO:
4274+
4275+--- Things that need to happen ---
4276+None Left...
4277+
4278+--- Things I would like ---
4279+Add preference control for applying effect to text (new default = True, always apply)
4280+Auto select interface (maybe based on default route)
4281+Add toggle for enable/disable auto-scaling (so 100Mbps would draw the line at the top of the meter)
4282+
4283+--- Completed TODO's ---
4284+Create preference dialog for selecting the color of the line-graphs, as well as the background
4285+ Done
4286+Ability to select multiple (or all) devices for a sum throughput -
4287+ Done (also created 'multi' interface)
4288+Add preference for specifying minimum threshold for charting data
4289+ Done
4290+
4291+
4292
4293=== added file 'applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini'
4294--- applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini 1970-01-01 00:00:00 +0000
4295+++ applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini 2010-01-26 03:57:14 +0000
4296@@ -0,0 +1,40 @@
4297+[DEFAULT/unit]
4298+type = integer
4299+default = 0
4300+description = The base display unit for transfer speed (0 = bits, 1 = bytes)
4301+[DEFAULT/interface]
4302+type = string
4303+default =
4304+description = The interface currently selected
4305+[DEFAULT/draw_threshold]
4306+type = float
4307+default = 0.0
4308+description = Minimum threshold to draw meter (dependent upon DEFAULT/unit)
4309+[DEFAULT/device_display_parameters]
4310+type = list-string
4311+default = ;
4312+description = Display parameters for interfaces
4313+[DEFAULT/background]
4314+type = boolean
4315+default = true
4316+description = Draw the applet background
4317+[DEFAULT/background_color]
4318+type = string
4319+default = #000000|0.5
4320+description = Color to draw the background
4321+[DEFAULT/border]
4322+type = boolean
4323+default = false
4324+description = Draw the applet border
4325+[DEFAULT/border_color]
4326+type = string
4327+default = #000000|1.0
4328+description = Color to draw the border
4329+[DEFAULT/label_control]
4330+type = integer
4331+default = 2
4332+description = Throughput label control - 0 = no label, 1 = Sum, 2 = Upload/Download
4333+[DEFAULT/graph_zero]
4334+type = integer
4335+default = 0
4336+description = If enabled this will draw a line at the bottom of the graph even if the value is 0. If unchecked, values below 1 are not drawn
4337
4338=== added file 'applets/maintained/bandwidth-monitor/awn-bwm.py'
4339--- applets/maintained/bandwidth-monitor/awn-bwm.py 1970-01-01 00:00:00 +0000
4340+++ applets/maintained/bandwidth-monitor/awn-bwm.py 2010-01-26 03:57:14 +0000
4341@@ -0,0 +1,688 @@
4342+#!/usr/bin/python
4343+# -*- coding: utf-8 -*-
4344+'''
4345+bandwidth-monitor - Network bandwidth monitor.
4346+Copyright (c) 2006-2010 Kyle L. Huff (awn-bwm@curetheitch.com)
4347+url: <http://www.curetheitch.com/projects/awn-bwm/>
4348+Email: awn-bwm@curetheitch.com
4349+
4350+ This program is free software: you can redistribute it and/or modify
4351+ it under the terms of the GNU General Public License as published by
4352+ the Free Software Foundation, either version 3 of the License, or
4353+ (at your option) any later version.
4354+
4355+ This program is distributed in the hope that it will be useful,
4356+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4357+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4358+ GNU General Public License for more details.
4359+
4360+ You should have received a copy of the GNU General Public License
4361+ along with this program. If not, see <http://www.gnu.org/licenses/gpl.txt>.
4362+'''
4363+
4364+from time import time
4365+import os
4366+import re
4367+import sys
4368+
4369+
4370+import gtk
4371+import awn
4372+
4373+from awn.extras import _, awnlib, __version__
4374+import gobject
4375+import cairo
4376+import bwmprefs
4377+
4378+APPLET_NAME = _('Bandwidth Monitor')
4379+APPLET_VERSION = '0.3.9.3'
4380+APPLET_COPYRIGHT = '© 2006-2009 CURE|THE|ITCH'
4381+APPLET_AUTHORS = ['Kyle L. Huff <awn-bwm@curetheitch.com>']
4382+APPLET_DESCRIPTION = _('Network Bandwidth monitor')
4383+APPLET_WEBSITE = 'http://www.curetheitch.com/projects/awn-bwm/'
4384+APPLET_PATH = os.path.dirname(sys.argv[0])
4385+APPLET_ICON = APPLET_PATH + '/images/icon.png'
4386+UI_FILE = os.path.join(os.path.dirname(__file__), 'bandwidth-monitor.ui')
4387+
4388+
4389+class Netstat:
4390+
4391+ def __init__(self, parent, unit):
4392+ self.parent = parent
4393+ self.ifaces = {}
4394+ self.ifaces['Sum Interface'] = {'collection_time': 0,
4395+ 'status': 'V',
4396+ 'prbytes': 0,
4397+ 'ptbytes': 0,
4398+ 'index': 1,
4399+ 'rx_history': [0, 0],
4400+ 'tx_history': [0, 0],
4401+ 'rx_bytes': 0,
4402+ 'tx_bytes': 0,
4403+ 'rx_sum': 0,
4404+ 'tx_sum': 0,
4405+ 'rxtx_sum': 0,
4406+ 'rabytes': 0,
4407+ 'tabytes': 0,
4408+ 'sum_include': False,
4409+ 'multi_include': False,
4410+ 'upload_color': '#ff0000',
4411+ 'download_color': '#ffff00'}
4412+ self.ifaces['Multi Interface'] = {'collection_time': 0,
4413+ 'status': 'V',
4414+ 'prbytes': 0,
4415+ 'ptbytes': 0,
4416+ 'index': 1,
4417+ 'rx_history': [0, 0],
4418+ 'tx_history': [0, 0],
4419+ 'rx_bytes': 0,
4420+ 'tx_bytes': 0,
4421+ 'rx_sum': 0,
4422+ 'tx_sum': 0,
4423+ 'rxtx_sum': 0,
4424+ 'rabytes': 0,
4425+ 'tabytes': 0,
4426+ 'sum_include': False,
4427+ 'multi_include': False}
4428+ self.regenerate = False
4429+ self.update_net_stats()
4430+ gobject.timeout_add(800, self.update_net_stats)
4431+
4432+ def timeout_add_seconds(self, seconds, callback):
4433+ if hasattr(gobject, 'timeout_add_seconds'):
4434+ return gobject.timeout_add_seconds(seconds, callback)
4435+ else:
4436+ return gobject.timeout_add(seconds * 1000, callback)
4437+
4438+ def update_net_stats(self):
4439+ ifcfg_str = os.popen('netstat -eia').read()
4440+ if ifcfg_str:
4441+ ifcfg_str = ifcfg_str.split('\n\n')
4442+ stat_str = 'n'
4443+ devices = []
4444+ # Reset the Sum Interface records to zero
4445+ self.ifaces['Sum Interface']['rx_sum'] = 0
4446+ self.ifaces['Sum Interface']['tx_sum'] = 0
4447+ self.ifaces['Sum Interface']['rx_bytes'] = 0
4448+ self.ifaces['Sum Interface']['tx_bytes'] = 0
4449+ sum_rx_history = 0.0
4450+ sum_tx_history = 0.0
4451+ # Reset the Multi Interface records to zero
4452+ self.ifaces['Multi Interface']['rx_sum'] = 0
4453+ self.ifaces['Multi Interface']['tx_sum'] = 0
4454+ self.ifaces['Multi Interface']['rx_bytes'] = 0
4455+ self.ifaces['Multi Interface']['tx_bytes'] = 0
4456+ multi_rx_history = 0.0
4457+ multi_tx_history = 0.0
4458+ if ifcfg_str and stat_str:
4459+ for device_group in ifcfg_str:
4460+ device_lines = device_group.split('\n')
4461+ if 'Kernel' in device_lines[0]:
4462+ device_lines = device_lines[1:]
4463+ iface = re.split('[\W]+',
4464+ device_lines[0].strip().replace(':', '_'))[0]
4465+ if len(device_lines) > 2:
4466+ try:
4467+ rx_bytes = float(re.search(r'RX bytes:(\d+)\D',
4468+ device_group).group(1))
4469+ tx_bytes = float(re.search(r'TX bytes:(\d+)\D',
4470+ device_group).group(1))
4471+ except:
4472+ rx_bytes = 0
4473+ tx_bytes = 0
4474+ if not iface in self.ifaces:
4475+ ddps = 'device_display_parameters'
4476+ prefs = self.parent.applet.settings[ddps]
4477+ sum_include = True
4478+ multi_include = True
4479+ for device_pref in prefs:
4480+ dpv = device_pref.split('|')
4481+ if dpv[0] == iface:
4482+ sum_include = str(dpv[1])[0].upper() == 'T'
4483+ multi_include = str(dpv[2])[0].upper() == 'T'
4484+ self.ifaces[iface] = {'collection_time': time(),
4485+ 'status': None,
4486+ 'prbytes': rx_bytes,
4487+ 'ptbytes': tx_bytes,
4488+ 'index': 1,
4489+ 'rx_history': [0, 0],
4490+ 'tx_history': [0, 0],
4491+ 'sum_include': sum_include,
4492+ 'multi_include': multi_include,
4493+ 'upload_color': \
4494+ self.parent.prefs.get_color(iface, 'upload'),
4495+ 'download_color': \
4496+ self.parent.prefs.get_color(iface, 'download')}
4497+ collection = (
4498+ time() - self.ifaces[iface]['collection_time'])
4499+ rbytes = ((rx_bytes - self.ifaces[iface]['prbytes'])
4500+ * self.parent.unit) / collection
4501+ tbytes = ((tx_bytes - self.ifaces[iface]['ptbytes'])
4502+ * self.parent.unit) / collection
4503+ rabytes = (rx_bytes - self.ifaces[iface]['prbytes']) \
4504+ / collection
4505+ tabytes = (tx_bytes - self.ifaces[iface]['ptbytes']) \
4506+ / collection
4507+ self.ifaces[iface]['rabytes'] = rabytes
4508+ self.ifaces[iface]['tabytes'] = tabytes
4509+ rxtx_sum = rx_bytes + tx_bytes
4510+ if self.ifaces[iface]['sum_include']:
4511+ self.ifaces['Sum Interface']['rx_sum'] += rx_bytes
4512+ self.ifaces['Sum Interface']['tx_sum'] += tx_bytes
4513+ self.ifaces['Sum Interface']['rx_bytes'] += rbytes
4514+ self.ifaces['Sum Interface']['tx_bytes'] += tbytes
4515+ sum_rx_history += rabytes
4516+ sum_tx_history += tabytes
4517+ if self.ifaces[iface]['multi_include']:
4518+ self.ifaces['Multi Interface']['rx_sum'] += rx_bytes
4519+ self.ifaces['Multi Interface']['tx_sum'] += tx_bytes
4520+ self.ifaces['Multi Interface']['rx_bytes'] += rbytes
4521+ self.ifaces['Multi Interface']['tx_bytes'] += tbytes
4522+ multi_rx_history += rabytes
4523+ multi_tx_history += tabytes
4524+ ifstatus = 'BRMU'
4525+ self.ifaces[iface]['rx_bytes'] = rbytes
4526+ self.ifaces[iface]['tx_bytes'] = tbytes
4527+ self.ifaces[iface]['prbytes'] = rx_bytes
4528+ self.ifaces[iface]['ptbytes'] = tx_bytes
4529+ self.ifaces[iface]['rx_sum'] = rx_bytes
4530+ self.ifaces[iface]['tx_sum'] = tx_bytes
4531+ self.ifaces[iface]['rxtx_sum'] = rxtx_sum
4532+ self.ifaces[iface]['status'] = ifstatus
4533+ self.ifaces[iface]['collection_time'] = time()
4534+ offset = self.parent.meter_scale - 1 \
4535+ if self.parent.border else self.parent.meter_scale
4536+ self.ifaces[iface]['rx_history'] = \
4537+ self.ifaces[iface]['rx_history'][0 - offset:]
4538+ self.ifaces[iface]['rx_history'].append(
4539+ self.ifaces[iface]['rabytes'])
4540+ self.ifaces[iface]['tx_history'] = \
4541+ self.ifaces[iface]['tx_history'][0 - offset:]
4542+ self.ifaces[iface]['tx_history'].append(
4543+ self.ifaces[iface]['tabytes'])
4544+ devices.append(iface)
4545+ self.ifaces['Sum Interface']['rx_history'] = \
4546+ self.ifaces['Sum Interface']['rx_history'][0 - offset:]
4547+ self.ifaces['Sum Interface']['rx_history'].append(sum_rx_history)
4548+ self.ifaces['Sum Interface']['tx_history'] = \
4549+ self.ifaces['Sum Interface']['tx_history'][0 - offset:]
4550+ self.ifaces['Sum Interface']['tx_history'].append(sum_tx_history)
4551+ for dev in self.ifaces.keys():
4552+ if not dev in devices and not 'Sum Interface' in dev \
4553+ and not 'Multi Interface' in dev:
4554+ ''' The device does not exist, remove it.
4555+ del dictionary[key] is faster than dictionary.pop(key) '''
4556+ del self.ifaces[dev]
4557+ self.regenerate = True
4558+ return True
4559+
4560+
4561+class AppletBandwidthMonitor:
4562+
4563+ def __init__(self, applet):
4564+ # Test if user has access to /proc/net/dev
4565+ if not os.access('/proc/net/dev', os.R_OK):
4566+ applet.errors.general((_('Unable to caclulate statistics'), _('''\
4567+Statistics calculation requires read access to /proc/net/dev''')))
4568+ applet.errors.set_error_icon_and_click_to_restart()
4569+ return None
4570+ self.applet = applet
4571+ self.UI_FILE = UI_FILE
4572+ applet.tooltip.set(_('Bandwidth Monitor'))
4573+ self.meter_scale = 25
4574+ icon = gtk.gdk.pixbuf_new_from_xpm_data(['1 1 1 1',
4575+ ' c #000',
4576+ ' '])
4577+ height = self.applet.get_size() * 1.5
4578+ if height != icon.get_height():
4579+ icon = icon.scale_simple(int(height), \
4580+ int(height / 1.5), gtk.gdk.INTERP_BILINEAR)
4581+ self.applet.set_icon_pixbuf(icon)
4582+ self.dialog = applet.dialog.new('main')
4583+ self.vbox = gtk.VBox()
4584+ self.dialog.add(self.vbox)
4585+ button = gtk.Button(_('Change Unit'))
4586+ self.dialog.add(button)
4587+ defaults = {'unit': 8,
4588+ 'interface': '',
4589+ 'draw_threshold': 0.0,
4590+ 'device_display_parameters': [],
4591+ 'background': True,
4592+ 'background_color': '#000000|0.5',
4593+ 'border': False,
4594+ 'border_color': '#000000|1.0',
4595+ 'label_control': 2,
4596+ 'graph_zero': 0}
4597+ for key, value in defaults.items():
4598+ if not key in self.applet.settings:
4599+ self.applet.settings[key] = value
4600+ self.iface = self.applet.settings['interface']
4601+ self.unit = self.applet.settings['unit']
4602+ self.label_control = self.applet.settings['label_control']
4603+ self.background = self.applet.settings['background']
4604+ self.background_color = self.applet.settings['background_color']
4605+ self.border = self.applet.settings['border']
4606+ self.border_color = self.applet.settings['border_color']
4607+ self.graph_zero = self.applet.settings['graph_zero']
4608+ if not self.unit:
4609+ self.change_unit(defaults['unit'])
4610+ if self.applet.settings['draw_threshold'] == 0.0:
4611+ self.ratio = 1
4612+ else:
4613+ ratio = self.applet.settings['draw_threshold']
4614+ self.ratio = ratio * 1024 if self.unit == 1 else ratio * 1024 / 8
4615+ self.prefs = bwmprefs.Preferences(self.applet, self)
4616+ self.netstats = Netstat(self, self.unit)
4617+ applet.tooltip.connect_becomes_visible(self.enter_notify)
4618+ self.table = self.generate_table()
4619+ self.vbox.add(self.table)
4620+ self.upload_ot = awn.OverlayText()
4621+ self.download_ot = awn.OverlayText()
4622+ self.sum_ot = awn.OverlayText()
4623+ self.upload_ot.props.gravity = gtk.gdk.GRAVITY_NORTH
4624+ self.download_ot.props.gravity = gtk.gdk.GRAVITY_SOUTH
4625+ self.sum_ot.props.gravity = gtk.gdk.GRAVITY_NORTH
4626+ applet.add_overlay(self.upload_ot)
4627+ applet.add_overlay(self.download_ot)
4628+ applet.add_overlay(self.sum_ot)
4629+ self.default_font_size = self.upload_ot.props.font_sizing
4630+ self.upload_ot.props.y_override = 4
4631+ self.download_ot.props.y_override = 18
4632+ self.sum_ot.props.y_override = 11
4633+ self.upload_ot.props.apply_effects = True
4634+ self.download_ot.props.apply_effects = True
4635+ self.sum_ot.props.apply_effects = True
4636+ self.upload_ot.props.text = _('Scanning')
4637+ self.download_ot.props.text = _('Devices')
4638+ self.prefs.setup()
4639+ ''' connect the left-click dialog button 'Change Unit' to
4640+ the call_change_unit function, which does not call
4641+ self.change_unit directly, instead it toggles the 'active'
4642+ property of the checkbutton so everything that needs to
4643+ happen, happens. '''
4644+ button.connect('clicked', self.call_change_unit)
4645+ gobject.timeout_add(100, self.first_paint)
4646+ gobject.timeout_add(800, self.subsequent_paint)
4647+
4648+ def change_draw_ratio(self, widget):
4649+ ratio = widget.get_value()
4650+ self.ratio = ratio * 1024 if self.unit == 1 else ratio * 1024 / 8
4651+ self.applet.settings['draw_threshold'] = ratio
4652+
4653+ def call_change_unit(self, *args):
4654+ if self.unit == 8:
4655+ self.prefs.uomCheckbutton.set_property('active', True)
4656+ else:
4657+ self.prefs.uomCheckbutton.set_property('active', False)
4658+
4659+ def change_unit(self, widget=None, scaleThresholdSBtn=None, label=None):
4660+ self.unit = 8 if self.unit == 1 else 1
4661+ # normalize and update the label, and normalize the spinbutton
4662+ if label:
4663+ if self.unit == 1:
4664+ label.set_text(_('KBps'))
4665+ scaleThresholdSBtn.set_value(
4666+ self.applet.settings['draw_threshold'] / 8)
4667+ else:
4668+ label.set_text(_('Kbps'))
4669+ scaleThresholdSBtn.set_value(
4670+ self.applet.settings['draw_threshold'] * 8)
4671+ self.applet.settings['unit'] = self.unit
4672+
4673+ def change_iface(self, widget, iface):
4674+ if widget.get_active():
4675+ # Changed to interface %s' % iface
4676+ self.iface = iface
4677+ self.applet.settings['interface'] = iface
4678+
4679+ def generate_table(self):
4680+ table = gtk.Table(100, 100, False)
4681+ col_iter = 0
4682+ row_iter = 2
4683+ for i in [0, 1, 2, 3, 4, 5, 6]:
4684+ table.set_col_spacing(i, 20)
4685+ table.attach(gtk.Label(''),
4686+ 0, 1, 0, 1,
4687+ xoptions=gtk.EXPAND | gtk.FILL,
4688+ yoptions=gtk.EXPAND | gtk.FILL,
4689+ xpadding=0, ypadding=0)
4690+ table.attach(gtk.Label(_('Interface')),
4691+ 1, 2, 0, 1,
4692+ xoptions=gtk.EXPAND | gtk.FILL,
4693+ yoptions=gtk.EXPAND | gtk.FILL,
4694+ xpadding=0, ypadding=0)
4695+ table.attach(gtk.Label(_('Sent')),
4696+ 2, 3, 0, 1,
4697+ xoptions=gtk.EXPAND | gtk.FILL,
4698+ yoptions=gtk.EXPAND | gtk.FILL,
4699+ xpadding=0, ypadding=0)
4700+ table.attach(gtk.Label(_('Received')),
4701+ 3, 4, 0, 1,
4702+ xoptions=gtk.EXPAND | gtk.FILL,
4703+ yoptions=gtk.EXPAND | gtk.FILL,
4704+ xpadding=0, ypadding=0)
4705+ table.attach(gtk.Label(_('Sending')),
4706+ 4, 5, 0, 1,
4707+ xoptions=gtk.EXPAND | gtk.FILL,
4708+ yoptions=gtk.EXPAND | gtk.FILL,
4709+ xpadding=0, ypadding=0)
4710+ table.attach(gtk.Label(_('Receiving')),
4711+ 5, 6, 0, 1,
4712+ xoptions=gtk.EXPAND | gtk.FILL,
4713+ yoptions=gtk.EXPAND | gtk.FILL,
4714+ xpadding=0, ypadding=0)
4715+ radio = None
4716+ for iface in sorted(self.netstats.ifaces):
4717+ widget = gtk.Label()
4718+ widget.toggle = gtk.RadioButton(group=radio)
4719+ radio = widget.toggle
4720+ if iface == self.iface:
4721+ widget.toggle.set_active(True)
4722+ widget.toggle.connect('clicked', self.change_iface, iface)
4723+ widget.name_label = gtk.Label(str(iface))
4724+ widget.sent_label = gtk.Label(str(
4725+ readable_speed(self.netstats.ifaces[iface]['tx_sum'],
4726+ self.unit, False).strip()))
4727+ widget.received_label = gtk.Label(str(
4728+ readable_speed(self.netstats.ifaces[iface]['rx_sum'],
4729+ self.unit, False).strip()))
4730+ widget.tx_speed_label = gtk.Label(str(
4731+ readable_speed(self.netstats.ifaces[iface]['tx_bytes']
4732+ * self.unit, self.unit).strip()))
4733+ widget.rx_speed_label = gtk.Label(str(
4734+ readable_speed(self.netstats.ifaces[iface]['rx_bytes']
4735+ * self.unit, self.unit).strip()))
4736+ self.netstats.ifaces[iface]['widget'] = widget
4737+ for widget_object in [widget.toggle,
4738+ widget.name_label,
4739+ widget.sent_label,
4740+ widget.received_label,
4741+ widget.tx_speed_label,
4742+ widget.rx_speed_label]:
4743+ table.attach(widget_object,
4744+ col_iter, col_iter + 1,
4745+ row_iter, row_iter + 1,
4746+ xoptions=gtk.EXPAND | gtk.FILL,
4747+ yoptions=gtk.EXPAND | gtk.FILL,
4748+ xpadding=0, ypadding=0)
4749+ col_iter += 1
4750+ row_iter += 1
4751+ col_iter = 0
4752+ return table
4753+
4754+ def enter_notify(self):
4755+ if not self.applet.dialog.is_visible('main'):
4756+ if not self.iface in self.netstats.ifaces:
4757+ self.applet.set_tooltip_text(
4758+ _('Please select a valid Network Device'))
4759+ else:
4760+ self.applet.set_tooltip_text(_('''\
4761+Total Sent: %s - Total Received: %s (All Interfaces)''') % (
4762+ readable_speed(
4763+ self.netstats.ifaces[self.iface]['tx_sum']
4764+ * self.unit, self.unit, False),
4765+ readable_speed(
4766+ self.netstats.ifaces[self.iface]['rx_sum']
4767+ * self.unit, self.unit, False)))
4768+
4769+ def first_paint(self):
4770+ self.repaint()
4771+ return False
4772+
4773+ def subsequent_paint(self):
4774+ self.repaint()
4775+ return True
4776+
4777+ def draw_background(self, ct, x0, y0, x1, y1, radius):
4778+ ct.move_to(x0, y0 + radius)
4779+ ct.curve_to(x0, y0, x0, y0, x0 + radius, y0)
4780+ ct.line_to(x1 - radius, y0)
4781+ ct.curve_to(x1, y0, x1, y0, x1, y0 + radius)
4782+ ct.line_to(x1, y1 - radius)
4783+ ct.curve_to(x1, y1, x1, y1, x1 - radius, y1)
4784+ ct.line_to(x0 + radius, y1)
4785+ ct.curve_to(x0, y1, x0, y1, x0, y1 - radius)
4786+ ct.close_path()
4787+
4788+ def draw_meter(self, ct, width, height, iface, multi=False):
4789+ ratio = self.ratio
4790+ ct.set_line_width(2)
4791+ ''' Create temporary lists to store the values of the transmit
4792+ and receive history, which will be then placed into the
4793+ _total_hist and sorted by size to set the proper
4794+ scale/ratio for the line heights '''
4795+ _rx_hist = [1]
4796+ _tx_hist = [1]
4797+ _total_hist = [1]
4798+ if not multi:
4799+ if iface in self.netstats.ifaces \
4800+ and len(self.netstats.ifaces[iface]['rx_history']):
4801+ _rx_hist = self.netstats.ifaces[iface]['rx_history']
4802+ if iface in self.netstats.ifaces \
4803+ and len(self.netstats.ifaces[iface]['tx_history']):
4804+ _tx_hist = self.netstats.ifaces[iface]['tx_history']
4805+ _total_hist.extend(_rx_hist)
4806+ _total_hist.extend(_tx_hist)
4807+ else:
4808+ for device in self.netstats.ifaces:
4809+ if self.netstats.ifaces[device]['multi_include']:
4810+ _total_hist.extend(
4811+ self.netstats.ifaces[device]['rx_history'])
4812+ if self.netstats.ifaces[iface]['multi_include']:
4813+ _total_hist.extend(
4814+ self.netstats.ifaces[device]['tx_history'])
4815+ _total_hist.sort()
4816+ ''' ratio variable controls the minimum threshold for data -
4817+ i.e. 32000 would not draw graphs for data transfers below
4818+ 3200 bytes - the initial value of ratio if set to the link
4819+ speed will prevent the graph from scaling. If using the
4820+ Multi Interface, the ratio will adjust based on the
4821+ highest throughput metric. '''
4822+ max_val = _total_hist[-1]
4823+ ratio = max_val / 28 if max_val > self.ratio else self.ratio
4824+ # Change the color of the upload line to configured/default
4825+ if iface:
4826+ color = gtk.gdk.color_parse(
4827+ self.netstats.ifaces[iface]['upload_color'])
4828+ ct.set_source_rgba(color.red / 65535.0,
4829+ color.green / 65535.0,
4830+ color.blue / 65535.0, 1.0)
4831+ else:
4832+ ct.set_source_rgba(0.1, 0.1, 0.1, 0.5)
4833+ # Set the initial position and iter to 0
4834+ x_pos = 2 if self.border else 0
4835+ cnt = 0
4836+ # If a transmit history exists, draw it
4837+ if iface in self.netstats.ifaces \
4838+ and len(self.netstats.ifaces[iface]['tx_history']):
4839+ for value in self.netstats.ifaces[iface]['tx_history']:
4840+ x_pos_end = (x_pos - width) + 2 if self.border \
4841+ and x_pos > width else 0
4842+ ct.line_to(x_pos - x_pos_end, self.chart_coords(value, ratio))
4843+ ct.move_to(x_pos, self.chart_coords(value, ratio))
4844+ x_pos += width / self.meter_scale
4845+ cnt += 1
4846+ ct.close_path()
4847+ ct.stroke()
4848+ # Change the color of the download line to configured/default
4849+ if iface:
4850+ color = gtk.gdk.color_parse(
4851+ self.netstats.ifaces[iface]['download_color'])
4852+ ct.set_source_rgba(color.red / 65535.0,
4853+ color.green / 65535.0,
4854+ color.blue / 65535.0, 1.0)
4855+ else:
4856+ ct.set_source_rgba(0.1, 0.1, 0.1, 0.5)
4857+ # Reset the position and iter to 0
4858+ x_pos = 2 if self.border else 0
4859+ cnt = 0
4860+ # If a receive history exists, draw it
4861+ if iface in self.netstats.ifaces \
4862+ and len(self.netstats.ifaces[iface]['rx_history']):
4863+ for value in self.netstats.ifaces[iface]['rx_history']:
4864+ x_pos_end = (x_pos - width) + 2 if self.border \
4865+ and x_pos > width else 0
4866+ ct.line_to(x_pos - x_pos_end, self.chart_coords(value, ratio))
4867+ ct.move_to(x_pos, self.chart_coords(value, ratio))
4868+ x_pos += width / self.meter_scale
4869+ cnt += 1
4870+ ct.close_path()
4871+ ct.stroke()
4872+
4873+ def chart_coords(self, value, ratio=1):
4874+ ratio = 1 if ratio < 1 else ratio
4875+ pos = float(self.applet.get_size()) / 58
4876+ bottom = 2.0 if self.border else 0
4877+ return (self.applet.get_size() - pos \
4878+ * (value / int(ratio))) + self.graph_zero - bottom
4879+
4880+ def repaint(self):
4881+ orientation = self.applet.get_pos_type()
4882+ if orientation in (gtk.POS_LEFT, gtk.POS_RIGHT):
4883+ width = self.applet.get_size()
4884+ self.upload_ot.props.font_sizing = 9
4885+ self.download_ot.props.font_sizing = 9
4886+ self.sum_ot.props.font_sizing = 9
4887+ else:
4888+ width = self.applet.get_size() * 1.5
4889+ self.upload_ot.props.font_sizing = self.default_font_size
4890+ self.download_ot.props.font_sizing = self.default_font_size
4891+ self.sum_ot.props.font_sizing = self.default_font_size
4892+ cs = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width),
4893+ self.applet.get_size())
4894+ ct = cairo.Context(cs)
4895+ ct.set_source_surface(cs)
4896+ ct.set_line_width(2)
4897+ if self.background:
4898+ bgColor, alpha = \
4899+ self.applet.settings['background_color'].split('|')
4900+ bgColor = gtk.gdk.color_parse(bgColor)
4901+ ct.set_source_rgba(bgColor.red / 65535.0,
4902+ bgColor.green / 65535.0,
4903+ bgColor.blue / 65535.0,
4904+ float(alpha))
4905+ self.draw_background(ct, 0, 0, width, self.applet.get_size(), 10)
4906+ ct.fill()
4907+ if self.iface == 'Multi Interface':
4908+ tmp_history = [1]
4909+ for iface in self.netstats.ifaces:
4910+ if self.netstats.ifaces[iface]['multi_include']:
4911+ tmp_history.extend(
4912+ self.netstats.ifaces[iface]['rx_history'])
4913+ tmp_history.extend(
4914+ self.netstats.ifaces[iface]['tx_history'])
4915+ tmp_history.sort()
4916+ max_val = tmp_history[-1]
4917+ self.ratio = max_val / 28 if max_val > self.ratio else 1
4918+ for iface in self.netstats.ifaces:
4919+ if self.netstats.ifaces[iface]['multi_include']:
4920+ self.draw_meter(ct, width, self.applet.get_size(),
4921+ iface, True)
4922+ else:
4923+ self.draw_meter(ct, width, self.applet.get_size(), self.iface)
4924+ if self.iface in self.netstats.ifaces:
4925+ if self.label_control:
4926+ if self.label_control == 2:
4927+ self.sum_ot.props.text = ''
4928+ self.download_ot.props.text = \
4929+ readable_speed(
4930+ self.netstats.ifaces[self.iface]['rx_bytes'],
4931+ self.unit).strip()
4932+ self.upload_ot.props.text = \
4933+ readable_speed(
4934+ self.netstats.ifaces[self.iface]['tx_bytes'],
4935+ self.unit).strip()
4936+ else:
4937+ self.upload_ot.props.text = ''
4938+ self.download_ot.props.text = ''
4939+ self.sum_ot.props.text = \
4940+ readable_speed(
4941+ self.netstats.ifaces[self.iface]['rx_bytes'] \
4942+ + self.netstats.ifaces[self.iface]['tx_bytes'],
4943+ self.unit).strip()
4944+ else:
4945+ self.upload_ot.props.text = ''
4946+ self.download_ot.props.text = ''
4947+ self.sum_ot.props.text = ''
4948+ self.title_text = readable_speed(
4949+ self.netstats.ifaces[self.iface]['tx_bytes'], self.unit)
4950+ else:
4951+ self.upload_ot.props.text = _('No')
4952+ self.download_ot.props.text = _('Device')
4953+ self.title_text = _('Please select a valid device')
4954+ if self.border:
4955+ line_width = 2
4956+ ct.set_line_width(line_width)
4957+ borderColor, alpha = \
4958+ self.applet.settings['border_color'].split('|')
4959+ borderColor = gtk.gdk.color_parse(borderColor)
4960+ ct.set_source_rgba(borderColor.red / 65535.0,
4961+ borderColor.green / 65535.0,
4962+ borderColor.blue / 65535.0,
4963+ float(alpha))
4964+ self.draw_background(ct,
4965+ line_width / 2,
4966+ line_width / 2,
4967+ width - line_width / 2,
4968+ self.applet.get_size() - line_width / 2, 4)
4969+ ct.stroke()
4970+ self.applet.set_icon_context(ct)
4971+ if self.applet.dialog.is_visible('main'):
4972+ for iface in self.netstats.ifaces:
4973+ if not 'widget' in self.netstats.ifaces[iface] \
4974+ or self.netstats.regenerate == True:
4975+ self.netstats.regenerate = False
4976+ self.vbox.remove(self.table)
4977+ self.table = self.generate_table()
4978+ self.vbox.add(self.table)
4979+ self.vbox.show_all()
4980+ self.netstats.ifaces[iface]['widget'].rx_speed_label.set_text(
4981+ str(readable_speed(self.netstats.ifaces[iface]['rx_bytes'],
4982+ self.unit).strip()))
4983+ self.netstats.ifaces[iface]['widget'].tx_speed_label.set_text(
4984+ str(readable_speed(self.netstats.ifaces[iface]['tx_bytes'],
4985+ self.unit).strip()))
4986+ self.netstats.ifaces[iface]['widget'].sent_label.set_text(
4987+ str(readable_speed(self.netstats.ifaces[iface]['tx_sum'] \
4988+ * self.unit, self.unit, False).strip()))
4989+ self.netstats.ifaces[iface]['widget'].received_label.set_text(
4990+ str(readable_speed(self.netstats.ifaces[iface]['rx_sum'] \
4991+ * self.unit, self.unit, False).strip()))
4992+ return True
4993+
4994+
4995+def readable_speed(speed, unit, seconds=True):
4996+ ''' readable_speed(speed) -> string
4997+ speed is in bytes per second
4998+ returns a readable version of the speed given '''
4999+ speed = 0 if speed is None or speed < 0 else speed
5000+ units = ['B ', 'KB', 'MB', 'GB', 'TB'] if unit == 1 \
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches