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

Proposed by moonbeam
Status: Merged
Approved by: Mark Lee
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 Approve
onox (community) Approve
Review via email: mp+12944@code.launchpad.net
To post a comment you must log in.
Revision history for this message
moonbeam (rcryderman) wrote :

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

Revision history for this message
Mark Lee (malept) wrote :

Gentoo ebuild in desktop-effects needs to be updated.

review: Needs Fixing (packaging)
Revision history for this message
onox (onox) wrote :

awnsystemmonitor, notification-daemon, and calendar depend on gconf

review: Needs Fixing
Revision history for this message
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.

Revision history for this message
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...

Revision history for this message
onox (onox) wrote :

notification-daemon seems to have been fixed.

review: Approve
Revision history for this message
Mark Lee (malept) wrote :

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

review: Approve (packaging)
1197. By Mark Lee

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
=== modified file '.bzrignore'
--- .bzrignore 2009-02-14 05:15:29 +0000
+++ .bzrignore 2010-01-26 03:57:13 +0000
@@ -1,7 +1,11 @@
1.deps1.deps
2.libs2.libs
3.pydevproject
4.project
5.settings
3Makefile6Makefile
4Makefile.in7Makefile.in
8*.cdbs-orig
5*.desktop9*.desktop
6*.desktop.in10*.desktop.in
7*.gmo11*.gmo
@@ -10,6 +14,8 @@
10*.loT14*.loT
11*.schemas15*.schemas
12*.schemas.in16*.schemas.in
17*.vala.stamp
18*.vapi
13aclocal.m419aclocal.m4
14autom4te.cache20autom4te.cache
15config.guess21config.guess
@@ -19,32 +25,41 @@
19config.sub25config.sub
20configure26configure
21depcomp27depcomp
28doltcompile
29doltlibtool
30gmon.out
22install-sh31install-sh
23intltool-*32intltool-*
24libtool33libtool
25ltmain.sh34ltmain.sh
26missing35missing
36py-compile
37stamp-h1
38applets/maintained/garbage/*.c
39applets/maintained/notification-area/na-prefs.c
40applets/maintained/notification-area/notification-area.c
41applets/maintained/notification-daemon/notificationdaemon-dbus-glue.h
42applets/maintained/showdesktop/*.c
43applets/maintained/vala-test/*.c
44debian/*.debhelper.log
45debian/*.postinst.debhelper
46debian/*.postrm.debhelper
47debian/*.preinst.debhelper
48debian/*.prerm.debhelper
49debian/*.substvars
50debian/*-trunk/
51debian/files
52debian/stamp-autotools-files
53debian/stamp-makefile-build
54debian/stamp-patched
55debian/tmp/
56m4/intltool.m4
57m4/libtool.m4
58m4/lt*.m4
27po/.intltool-merge-cache59po/.intltool-merge-cache
28po/Makefile.in.in60po/Makefile.in.in
29po/POTFILES61po/POTFILES
30po/stamp-it62po/stamp-it
31py-compile63shared/python/__init__.py
32src/Taskmand-applet/client-bindings.h64shave/shave
33src/Taskmand-applet/server-bindings.h65shave/shave-libtool
34src/affinity/affinity-preferences/affinity-preferences
35src/awn-notification-daemon/src/daemon/notificationdaemon-dbus-glue.h
36src/libawn-extras/awn-extras.pc
37src/libawn-extras/bindings/python/awn_extras.c
38src/libawn-extras/bindings/python/defs.py
39src/taskmand/client-bindings.h
40src/taskmand/data/org.awnproject.taskmand.service
41src/taskmand/server-bindings.h
42src/taskmand/taskmand
43src/simple-launcher/applet.[ch]
44src/standalone-launcher/applet.[ch]
45SRc/standalone-launcher/applet.h
46src/vala-test/applet.[ch]
47stamp-h1
48.pydevproject
49.project
50.settings
5166
=== added file 'COPYING.BSD'
--- COPYING.BSD 1970-01-01 00:00:00 +0000
+++ COPYING.BSD 2010-01-26 03:57:13 +0000
@@ -0,0 +1,26 @@
1Copyright (c) The Regents of the University of California.
2All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions
6are met:
71. Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
92. Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
123. Neither the name of the University nor the names of its contributors
13 may be used to endorse or promote products derived from this software
14 without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26SUCH DAMAGE.
027
=== added file 'COPYING.CCASAv3.0'
--- COPYING.CCASAv3.0 1970-01-01 00:00:00 +0000
+++ COPYING.CCASAv3.0 2010-01-26 03:57:13 +0000
@@ -0,0 +1,350 @@
1Creative Commons Attribution-Share Alike 3.0 License.
2
3 THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
4 COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
5 COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
6 AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
7
8 BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO
9 BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE
10 CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED
11 HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
12
13 1. Definitions
14
15 1. "Adaptation" means a work based upon the Work, or upon the Work and other
16 pre-existing works, such as a translation, adaptation, derivative work,
17 arrangement of music or other alterations of a literary or artistic work, or
18 phonogram or performance and includes cinematographic adaptations or any
19 other form in which the Work may be recast, transformed, or adapted
20 including in any form recognizably derived from the original, except that a
21 work that constitutes a Collection will not be considered an Adaptation for
22 the purpose of this License. For the avoidance of doubt, where the Work is a
23 musical work, performance or phonogram, the synchronization of the Work in
24 timed-relation with a moving image ("synching") will be considered an
25 Adaptation for the purpose of this License.
26
27 2. "Collection" means a collection of literary or artistic works, such as
28 encyclopedias and anthologies, or performances, phonograms or broadcasts, or
29 other works or subject matter other than works listed in Section 1(f) below,
30 which, by reason of the selection and arrangement of their contents,
31 constitute intellectual creations, in which the Work is included in its
32 entirety in unmodified form along with one or more other contributions,
33 each constituting separate and independent works in themselves, which
34 together are assembled into a collective whole. A work that constitutes a
35 Collection will not be considered an Adaptation (as defined below) for the
36 purposes of this License.
37
38 3. "Creative Commons Compatible License" means a license that is listed at
39 http://creativecommons.org/compatiblelicenses that has been approved by
40 Creative Commons as being essentially equivalent to this License, including,
41 at a minimum, because that license: (i) contains terms that have the same
42 purpose, meaning and effect as the License Elements of this License; and,
43 (ii) explicitly permits the relicensing of adaptations of works made
44 available under that license under this License or a Creative Commons
45 jurisdiction license with the same License Elements as this License.
46
47 4. "Distribute" means to make available to the public the original and
48 copies of the Work or Adaptation, as appropriate, through sale or other
49 transfer of ownership.
50
51 5. "License Elements" means the following high-level license attributes
52 as selected by Licensor and indicated in the title of this License:
53 Attribution, ShareAlike.
54
55 6. "Licensor" means the individual, individuals, entity or entities that
56 offer(s) the Work under the terms of this License.
57
58 7. "Original Author" means, in the case of a literary or artistic work, the
59 individual, individuals, entity or entities who created the Work or if no
60 individual or entity can be identified, the publisher; and in addition
61 (i) in the case of a performance the actors, singers, musicians, dancers,
62 and other persons who act, sing, deliver, declaim, play in, interpret or
63 otherwise perform literary or artistic works or expressions of folklore;
64 (ii) in the case of a phonogram the producer being the person or legal
65 entity who first fixes the sounds of a performance or other sounds; and,
66 (iii) in the case of broadcasts, the organization that transmits the
67 broadcast.
68
69 8. "Work" means the literary and/or artistic work offered under the terms
70 of this License including without limitation any production in the literary,
71 scientific and artistic domain, whatever may be the mode or form of its
72 expression including digital form, such as a book, pamphlet and other
73 writing; a lecture, address, sermon or other work of the same nature; a
74 dramatic or dramatico-musical work; a choreographic work or entertainment
75 in dumb show; a musical composition with or without words; a cinematographic
76 work to which are assimilated works expressed by a process analogous to
77 cinematography; a work of drawing, painting, architecture, sculpture,
78 engraving or lithography; a photographic work to which are assimilated works
79 expressed by a process analogous to photography; a work of applied art;
80 an illustration, map, plan, sketch or three-dimensional work relative to
81 geography, topography, architecture or science; a performance; a broadcast;
82 a phonogram; a compilation of data to the extent it is protected as a
83 copyrightable work; or a work performed by a variety or circus performer
84 to the extent it is not otherwise considered a literary or artistic work.
85
86 9. "You" means an individual or entity exercising rights under this License
87 who has not previously violated the terms of this License with respect to
88 the Work, or who has received express permission from the Licensor to
89 exercise rights under this License despite a previous violation.
90
91 10. "Publicly Perform" means to perform public recitations of the Work and
92 to communicate to the public those public recitations, by any means or
93 process, including by wire or wireless means or public digital performances;
94 to make available to the public Works in such a way that members of the
95 public may access these Works from a place and at a place individually
96 chosen by them; to perform the Work to the public by any means or process
97 and the communication to the public of the performances of the Work,
98 including by public digital performance; to broadcast and rebroadcast the
99 Work by any means including signs, sounds or images.
100
101 11. "Reproduce" means to make copies of the Work by any means including
102 without limitation by sound or visual recordings and the right of fixation
103 and reproducing fixations of the Work, including storage of a protected
104 performance or phonogram in digital form or other electronic medium.
105
106 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
107 limit, or restrict any uses free from copyright or rights arising from
108 limitations or exceptions that are provided for in connection with the
109 copyright protection under copyright law or other applicable laws.
110
111 3. License Grant. Subject to the terms and conditions of this License,
112 Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
113 perpetual (for the duration of the applicable copyright) license to
114 exercise the rights in the Work as stated below:
115
116 1. to Reproduce the Work, to incorporate the Work into one or more
117 Collections, and to Reproduce the Work as incorporated in the Collections;
118
119 2. to create and Reproduce Adaptations provided that any such Adaptation,
120 including any translation in any medium, takes reasonable steps to clearly
121 label, demarcate or otherwise identify that changes were made to the
122 original Work. For example, a translation could be marked "The original work
123 was translated from English to Spanish," or a modification could indicate
124 "The original work has been modified.";
125
126 3. to Distribute and Publicly Perform the Work including as incorporated in
127 Collections; and,
128
129 4. to Distribute and Publicly Perform Adaptations.
130 5. For the avoidance of doubt:
131 1. Non-waivable Compulsory License Schemes. In those jurisdictions in
132 which the right to collect royalties through any statutory or compulsory
133 licensing scheme cannot be waived, the Licensor reserves the exclusive right
134 to collect such royalties for any exercise by You of the rights granted
135 under this License;
136 2. Waivable Compulsory License Schemes. In those jurisdictions in
137 which the right to collect royalties through any statutory or compulsory
138 licensing scheme can be waived, the Licensor waives the exclusive right to
139 collect such royalties for any exercise by You of the rights granted under
140 this License; and,
141 3. Voluntary License Schemes. The Licensor waives the right to collect
142 royalties, whether individually or, in the event that the Licensor is a
143 member of a collecting society that administers voluntary licensing schemes,
144 via that society, from any exercise by You of the rights granted under this
145 License.
146
147 The above rights may be exercised in all media and formats whether now known
148 or hereafter devised. The above rights include the right to make such
149 modifications as are technically necessary to exercise the rights in other
150 media and formats. Subject to Section 8(f), all rights not expressly granted
151 by Licensor are hereby reserved.
152
153 4. Restrictions. The license granted in Section 3 above is expressly made
154 subject to and limited by the following restrictions:
155
156 1. You may Distribute or Publicly Perform the Work only under the terms of
157 this License. You must include a copy of, or the Uniform Resource Identifier
158 (URI) for, this License with every copy of the Work You Distribute or
159 Publicly Perform. You may not offer or impose any terms on the Work that
160 restrict the terms of this License or the ability of the recipient of the
161 Work to exercise the rights granted to that recipient under the terms
162 of the License. You may not sublicense the Work. You must keep intact all
163 notices that refer to this License and to the disclaimer of warranties with
164 every copy of the Work You Distribute or Publicly Perform. When You
165 Distribute or Publicly Perform the Work, You may not impose any effective
166 technological measures on the Work that restrict the ability of a recipient
167 of the Work from You to exercise the rights granted to that recipient under
168 the terms of the License. This Section 4(a) applies to the Work as
169 incorporated in a Collection, but this does not require the Collection
170 apart from the Work itself to be made subject to the terms of this License.
171 If You create a Collection, upon notice from any Licensor You must, to the
172 extent practicable, remove from the Collection any credit as required by
173 Section 4©, as requested. If You create an Adaptation, upon notice from
174 any Licensor You must, to the extent practicable, remove from the Adaptation
175 any credit as required by Section 4©, as requested.
176
177 2. You may Distribute or Publicly Perform an Adaptation only under the terms
178 of:
179 (i) this License;
180 (ii) a later version of this License with the same License Elements as this
181 License;
182 (iii) a Creative Commons jurisdiction license (either this or a later
183 license version) that contains the same License Elements as this License
184 (e.g., Attribution-ShareAlike 3.0 US));
185 (iv) a Creative Commons Compatible License. If you license the Adaptation
186 under one of the licenses mentioned in (iv), you must comply with the terms
187 of that license. If you license the Adaptation under the terms of any of
188 the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"),
189 you must comply with the terms of the Applicable License generally and the
190 following provisions:
191 (I) You must include a copy of, or the URI for, the Applicable License with
192 every copy of each Adaptation You Distribute or Publicly Perform;
193 (II) You may not offer or impose any terms on the Adaptation that restrict
194 the terms of the Applicable License or the ability of the recipient of the
195 Adaptation to exercise the rights granted to that recipient under the terms
196 of the Applicable License;
197 (III) You must keep intact all notices that refer to the Applicable License
198 and to the disclaimer of warranties with every copy of the Work as included
199 in the Adaptation You Distribute or Publicly Perform;
200 (IV) when You Distribute or Publicly Perform the Adaptation, You may not
201 impose any effective technological measures on the Adaptation that restrict
202 the ability of a recipient of the Adaptation from You to exercise the
203 rights granted to that recipient under the terms of the Applicable License.
204 This Section 4(b) applies to the Adaptation as incorporated in a
205 Collection, but this does not require the Collection apart from the
206 Adaptation itself to be made subject to the terms of the Applicable License.
207
208 3. If You Distribute, or Publicly Perform the Work or any Adaptations or
209 Collections, You must, unless a request has been made pursuant to Section
210 4(a), keep intact all copyright notices for the Work and provide,
211 reasonable to the medium or means You are utilizing:
212 (i) the name of the Original Author (or pseudonym, if applicable) if
213 supplied, and/or if the Original Author and/or Licensor designate another
214 party or parties (e.g., a sponsor institute, publishing entity, journal)
215 for attribution ("Attribution Parties") in Licensor's copyright notice,
216 terms of service or by other reasonable means, the name of such party or
217 parties;
218 (ii) the title of the Work if supplied;
219 (iii) to the extent reasonably practicable, the URI, if any, that Licensor
220 specifies to be associated with the Work, unless such URI does not refer to
221 the copyright notice or licensing information for the Work; and
222 (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit
223 identifying the use of the Work in the Adaptation (e.g., "French translation
224 of the Work by Original Author," or "Screenplay based on original Work by
225 Original Author"). The credit required by this Section 4© may be
226 implemented in any reasonable manner; provided, however, that in the case
227 of a Adaptation or Collection, at a minimum such credit will appear, if a
228 credit for all contributing authors of the Adaptation or Collection
229 appears, then as part of these credits and in a manner at least as prominent
230 as the credits for the other contributing authors. For the avoidance of
231 doubt, You may only use the credit required by this Section for the purpose
232 of attribution in the manner set out above and, by exercising Your rights
233 under this License, You may not implicitly or explicitly assert or imply
234 any connection with, sponsorship or endorsement by the Original Author,
235 Licensor and/or Attribution Parties, as appropriate, of You or Your use of
236 the Work, without the separate, express prior written permission of the
237 Original Author, Licensor and/or Attribution Parties.
238
239 4. Except as otherwise agreed in writing by the Licensor or as may be
240 otherwise permitted by applicable law, if You Reproduce, Distribute or
241 Publicly Perform the Work either by itself or as part of any Adaptations
242 or Collections, You must not distort, mutilate, modify or take other
243 derogatory action in relation to the Work which would be prejudicial to the
244 Original Author's honor or reputation. Licensor agrees that in those
245 jurisdictions (e.g. Japan), in which any exercise of the right granted in
246 Section 3(b) of this License (the right to make Adaptations) would be
247 deemed to be a distortion, mutilation, modification or other derogatory
248 action prejudicial to the Original Author's honor and reputation, the
249 Licensor will waive or not assert, as appropriate, this Section, to the
250 fullest extent permitted by the applicable national law, to enable You to
251 reasonably exercise Your right under Section 3(b) of this License (right
252 to make Adaptations) but not otherwise.
253
254 5. Representations, Warranties and Disclaimer
255
256 UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
257 OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
258 KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
259 INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
260 FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT
261 OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER
262 OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF
263 IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
264
265 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
266 LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
267 ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
268 ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
269 BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
270
271 7. Termination
272
273 1. This License and the rights granted hereunder will terminate
274 automatically upon any breach by You of the terms of this License.
275 Individuals or entities who have received Adaptations or Collections from
276 You under this License, however, will not have their licenses terminated
277 provided such individuals or entities remain in full compliance with those
278 licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of
279 this License.
280
281 2. Subject to the above terms and conditions, the license granted here is
282 perpetual (for the duration of the applicable copyright in the Work).
283 Notwithstanding the above, Licensor reserves the right to release the Work
284 under different license terms or to stop distributing the Work at any time;
285 provided, however that any such election will not serve to withdraw this
286 License (or any other license that has been, or is required to be, granted
287 under the terms of this License), and this License will continue in full
288 force and effect unless terminated as stated above.
289
290 8. Miscellaneous
291
292 1. Each time You Distribute or Publicly Perform the Work or a Collection,
293 the Licensor offers to the recipient a license to the Work on the same
294 terms and conditions as the license granted to You under this License.
295
296 2. Each time You Distribute or Publicly Perform an Adaptation, Licensor
297 offers to the recipient a license to the original Work on the same terms
298 and conditions as the license granted to You under this License.
299
300 3. If any provision of this License is invalid or unenforceable under
301 applicable law, it shall not affect the validity or enforceability of the
302 remainder of the terms of this License, and without further action by the
303 parties to this agreement, such provision shall be reformed to the minimum
304 extent necessary to make such provision valid and enforceable.
305
306 4. No term or provision of this License shall be deemed waived and no
307 breach consented to unless such waiver or consent shall be in writing and
308 signed by the party to be charged with such waiver or consent.
309
310 5. This License constitutes the entire agreement between the parties with
311 respect to the Work licensed here. There are no understandings, agreements
312 or representations with respect to the Work not specified here. Licensor
313 shall not be bound by any additional provisions that may appear in any
314 communication from You. This License may not be modified without the mutual
315 written agreement of the Licensor and You.
316
317 6. The rights granted under, and the subject matter referenced, in this
318 License were drafted utilizing the terminology of the Berne Convention
319 for the Protection of Literary and Artistic Works (as amended on September
320 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996,
321 the WIPO Performances and Phonograms Treaty of 1996 and the Universal
322 Copyright Convention (as revised on July 24, 1971). These rights and subject
323 matter take effect in the relevant jurisdiction in which the License terms
324 are sought to be enforced according to the corresponding provisions of the
325 implementation of those treaty provisions in the applicable national law.
326 If the standard suite of rights granted under applicable copyright law
327 includes additional rights not granted under this License, such additional
328 rights are deemed to be included in the License; this License is not
329 intended to restrict the license of any rights under applicable law.
330
331 Creative Commons Notice
332
333 Creative Commons is not a party to this License, and makes no warranty
334 whatsoever in connection with the Work. Creative Commons will not be liable
335 to You or any party on any legal theory for any damages whatsoever,
336 including without limitation any general, special, incidental or
337 consequential damages arising in connection to this license. Notwithstanding
338 the foregoing two (2) sentences, if Creative Commons has expressly
339 identified itself as the Licensor hereunder, it shall have all rights and
340 obligations of Licensor.
341
342 Except for the limited purpose of indicating to the public that the Work
343 is licensed under the CCPL, Creative Commons does not authorize the use by
344 either party of the trademark "Creative Commons" or any related trademark
345 or logo of Creative Commons without the prior written consent of Creative
346 Commons. Any permitted use will be in compliance with Creative Commons'
347 then-current trademark usage guidelines, as may be published on its website
348 or otherwise made available upon request from time to time. For the
349 avoidance of doubt, this trademark restriction does not form part of the
350 License.
0351
=== added file 'COPYING.GPL-3'
--- COPYING.GPL-3 1970-01-01 00:00:00 +0000
+++ COPYING.GPL-3 2010-01-26 03:57:13 +0000
@@ -0,0 +1,676 @@
1
2 GNU GENERAL PUBLIC LICENSE
3 Version 3, 29 June 2007
4
5 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9 Preamble
10
11 The GNU General Public License is a free, copyleft license for
12software and other kinds of works.
13
14 The licenses for most software and other practical works are designed
15to take away your freedom to share and change the works. By contrast,
16the GNU General Public License is intended to guarantee your freedom to
17share and change all versions of a program--to make sure it remains free
18software for all its users. We, the Free Software Foundation, use the
19GNU General Public License for most of our software; it applies also to
20any other work released this way by its authors. You can apply it to
21your programs, too.
22
23 When we speak of free software, we are referring to freedom, not
24price. Our General Public Licenses are designed to make sure that you
25have the freedom to distribute copies of free software (and charge for
26them if you wish), that you receive source code or can get it if you
27want it, that you can change the software or use pieces of it in new
28free programs, and that you know you can do these things.
29
30 To protect your rights, we need to prevent others from denying you
31these rights or asking you to surrender the rights. Therefore, you have
32certain responsibilities if you distribute copies of the software, or if
33you modify it: responsibilities to respect the freedom of others.
34
35 For example, if you distribute copies of such a program, whether
36gratis or for a fee, you must pass on to the recipients the same
37freedoms that you received. You must make sure that they, too, receive
38or can get the source code. And you must show them these terms so they
39know their rights.
40
41 Developers that use the GNU GPL protect your rights with two steps:
42(1) assert copyright on the software, and (2) offer you this License
43giving you legal permission to copy, distribute and/or modify it.
44
45 For the developers' and authors' protection, the GPL clearly explains
46that there is no warranty for this free software. For both users' and
47authors' sake, the GPL requires that modified versions be marked as
48changed, so that their problems will not be attributed erroneously to
49authors of previous versions.
50
51 Some devices are designed to deny users access to install or run
52modified versions of the software inside them, although the manufacturer
53can do so. This is fundamentally incompatible with the aim of
54protecting users' freedom to change the software. The systematic
55pattern of such abuse occurs in the area of products for individuals to
56use, which is precisely where it is most unacceptable. Therefore, we
57have designed this version of the GPL to prohibit the practice for those
58products. If such problems arise substantially in other domains, we
59stand ready to extend this provision to those domains in future versions
60of the GPL, as needed to protect the freedom of users.
61
62 Finally, every program is threatened constantly by software patents.
63States should not allow patents to restrict development and use of
64software on general-purpose computers, but in those that do, we wish to
65avoid the special danger that patents applied to a free program could
66make it effectively proprietary. To prevent this, the GPL assures that
67patents cannot be used to render the program non-free.
68
69 The precise terms and conditions for copying, distribution and
70modification follow.
71
72 TERMS AND CONDITIONS
73
74 0. Definitions.
75
76 "This License" refers to version 3 of the GNU General Public License.
77
78 "Copyright" also means copyright-like laws that apply to other kinds of
79works, such as semiconductor masks.
80
81 "The Program" refers to any copyrightable work licensed under this
82License. Each licensee is addressed as "you". "Licensees" and
83"recipients" may be individuals or organizations.
84
85 To "modify" a work means to copy from or adapt all or part of the work
86in a fashion requiring copyright permission, other than the making of an
87exact copy. The resulting work is called a "modified version" of the
88earlier work or a work "based on" the earlier work.
89
90 A "covered work" means either the unmodified Program or a work based
91on the Program.
92
93 To "propagate" a work means to do anything with it that, without
94permission, would make you directly or secondarily liable for
95infringement under applicable copyright law, except executing it on a
96computer or modifying a private copy. Propagation includes copying,
97distribution (with or without modification), making available to the
98public, and in some countries other activities as well.
99
100 To "convey" a work means any kind of propagation that enables other
101parties to make or receive copies. Mere interaction with a user through
102a computer network, with no transfer of a copy, is not conveying.
103
104 An interactive user interface displays "Appropriate Legal Notices"
105to the extent that it includes a convenient and prominently visible
106feature that (1) displays an appropriate copyright notice, and (2)
107tells the user that there is no warranty for the work (except to the
108extent that warranties are provided), that licensees may convey the
109work under this License, and how to view a copy of this License. If
110the interface presents a list of user commands or options, such as a
111menu, a prominent item in the list meets this criterion.
112
113 1. Source Code.
114
115 The "source code" for a work means the preferred form of the work
116for making modifications to it. "Object code" means any non-source
117form of a work.
118
119 A "Standard Interface" means an interface that either is an official
120standard defined by a recognized standards body, or, in the case of
121interfaces specified for a particular programming language, one that
122is widely used among developers working in that language.
123
124 The "System Libraries" of an executable work include anything, other
125than the work as a whole, that (a) is included in the normal form of
126packaging a Major Component, but which is not part of that Major
127Component, and (b) serves only to enable use of the work with that
128Major Component, or to implement a Standard Interface for which an
129implementation is available to the public in source code form. A
130"Major Component", in this context, means a major essential component
131(kernel, window system, and so on) of the specific operating system
132(if any) on which the executable work runs, or a compiler used to
133produce the work, or an object code interpreter used to run it.
134
135 The "Corresponding Source" for a work in object code form means all
136the source code needed to generate, install, and (for an executable
137work) run the object code and to modify the work, including scripts to
138control those activities. However, it does not include the work's
139System Libraries, or general-purpose tools or generally available free
140programs which are used unmodified in performing those activities but
141which are not part of the work. For example, Corresponding Source
142includes interface definition files associated with source files for
143the work, and the source code for shared libraries and dynamically
144linked subprograms that the work is specifically designed to require,
145such as by intimate data communication or control flow between those
146subprograms and other parts of the work.
147
148 The Corresponding Source need not include anything that users
149can regenerate automatically from other parts of the Corresponding
150Source.
151
152 The Corresponding Source for a work in source code form is that
153same work.
154
155 2. Basic Permissions.
156
157 All rights granted under this License are granted for the term of
158copyright on the Program, and are irrevocable provided the stated
159conditions are met. This License explicitly affirms your unlimited
160permission to run the unmodified Program. The output from running a
161covered work is covered by this License only if the output, given its
162content, constitutes a covered work. This License acknowledges your
163rights of fair use or other equivalent, as provided by copyright law.
164
165 You may make, run and propagate covered works that you do not
166convey, without conditions so long as your license otherwise remains
167in force. You may convey covered works to others for the sole purpose
168of having them make modifications exclusively for you, or provide you
169with facilities for running those works, provided that you comply with
170the terms of this License in conveying all material for which you do
171not control copyright. Those thus making or running the covered works
172for you must do so exclusively on your behalf, under your direction
173and control, on terms that prohibit them from making any copies of
174your copyrighted material outside their relationship with you.
175
176 Conveying under any other circumstances is permitted solely under
177the conditions stated below. Sublicensing is not allowed; section 10
178makes it unnecessary.
179
180 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
181
182 No covered work shall be deemed part of an effective technological
183measure under any applicable law fulfilling obligations under article
18411 of the WIPO copyright treaty adopted on 20 December 1996, or
185similar laws prohibiting or restricting circumvention of such
186measures.
187
188 When you convey a covered work, you waive any legal power to forbid
189circumvention of technological measures to the extent such circumvention
190is effected by exercising rights under this License with respect to
191the covered work, and you disclaim any intention to limit operation or
192modification of the work as a means of enforcing, against the work's
193users, your or third parties' legal rights to forbid circumvention of
194technological measures.
195
196 4. Conveying Verbatim Copies.
197
198 You may convey verbatim copies of the Program's source code as you
199receive it, in any medium, provided that you conspicuously and
200appropriately publish on each copy an appropriate copyright notice;
201keep intact all notices stating that this License and any
202non-permissive terms added in accord with section 7 apply to the code;
203keep intact all notices of the absence of any warranty; and give all
204recipients a copy of this License along with the Program.
205
206 You may charge any price or no price for each copy that you convey,
207and you may offer support or warranty protection for a fee.
208
209 5. Conveying Modified Source Versions.
210
211 You may convey a work based on the Program, or the modifications to
212produce it from the Program, in the form of source code under the
213terms of section 4, provided that you also meet all of these conditions:
214
215 a) The work must carry prominent notices stating that you modified
216 it, and giving a relevant date.
217
218 b) The work must carry prominent notices stating that it is
219 released under this License and any conditions added under section
220 7. This requirement modifies the requirement in section 4 to
221 "keep intact all notices".
222
223 c) You must license the entire work, as a whole, under this
224 License to anyone who comes into possession of a copy. This
225 License will therefore apply, along with any applicable section 7
226 additional terms, to the whole of the work, and all its parts,
227 regardless of how they are packaged. This License gives no
228 permission to license the work in any other way, but it does not
229 invalidate such permission if you have separately received it.
230
231 d) If the work has interactive user interfaces, each must display
232 Appropriate Legal Notices; however, if the Program has interactive
233 interfaces that do not display Appropriate Legal Notices, your
234 work need not make them do so.
235
236 A compilation of a covered work with other separate and independent
237works, which are not by their nature extensions of the covered work,
238and which are not combined with it such as to form a larger program,
239in or on a volume of a storage or distribution medium, is called an
240"aggregate" if the compilation and its resulting copyright are not
241used to limit the access or legal rights of the compilation's users
242beyond what the individual works permit. Inclusion of a covered work
243in an aggregate does not cause this License to apply to the other
244parts of the aggregate.
245
246 6. Conveying Non-Source Forms.
247
248 You may convey a covered work in object code form under the terms
249of sections 4 and 5, provided that you also convey the
250machine-readable Corresponding Source under the terms of this License,
251in one of these ways:
252
253 a) Convey the object code in, or embodied in, a physical product
254 (including a physical distribution medium), accompanied by the
255 Corresponding Source fixed on a durable physical medium
256 customarily used for software interchange.
257
258 b) Convey the object code in, or embodied in, a physical product
259 (including a physical distribution medium), accompanied by a
260 written offer, valid for at least three years and valid for as
261 long as you offer spare parts or customer support for that product
262 model, to give anyone who possesses the object code either (1) a
263 copy of the Corresponding Source for all the software in the
264 product that is covered by this License, on a durable physical
265 medium customarily used for software interchange, for a price no
266 more than your reasonable cost of physically performing this
267 conveying of source, or (2) access to copy the
268 Corresponding Source from a network server at no charge.
269
270 c) Convey individual copies of the object code with a copy of the
271 written offer to provide the Corresponding Source. This
272 alternative is allowed only occasionally and noncommercially, and
273 only if you received the object code with such an offer, in accord
274 with subsection 6b.
275
276 d) Convey the object code by offering access from a designated
277 place (gratis or for a charge), and offer equivalent access to the
278 Corresponding Source in the same way through the same place at no
279 further charge. You need not require recipients to copy the
280 Corresponding Source along with the object code. If the place to
281 copy the object code is a network server, the Corresponding Source
282 may be on a different server (operated by you or a third party)
283 that supports equivalent copying facilities, provided you maintain
284 clear directions next to the object code saying where to find the
285 Corresponding Source. Regardless of what server hosts the
286 Corresponding Source, you remain obligated to ensure that it is
287 available for as long as needed to satisfy these requirements.
288
289 e) Convey the object code using peer-to-peer transmission, provided
290 you inform other peers where the object code and Corresponding
291 Source of the work are being offered to the general public at no
292 charge under subsection 6d.
293
294 A separable portion of the object code, whose source code is excluded
295from the Corresponding Source as a System Library, need not be
296included in conveying the object code work.
297
298 A "User Product" is either (1) a "consumer product", which means any
299tangible personal property which is normally used for personal, family,
300or household purposes, or (2) anything designed or sold for incorporation
301into a dwelling. In determining whether a product is a consumer product,
302doubtful cases shall be resolved in favor of coverage. For a particular
303product received by a particular user, "normally used" refers to a
304typical or common use of that class of product, regardless of the status
305of the particular user or of the way in which the particular user
306actually uses, or expects or is expected to use, the product. A product
307is a consumer product regardless of whether the product has substantial
308commercial, industrial or non-consumer uses, unless such uses represent
309the only significant mode of use of the product.
310
311 "Installation Information" for a User Product means any methods,
312procedures, authorization keys, or other information required to install
313and execute modified versions of a covered work in that User Product from
314a modified version of its Corresponding Source. The information must
315suffice to ensure that the continued functioning of the modified object
316code is in no case prevented or interfered with solely because
317modification has been made.
318
319 If you convey an object code work under this section in, or with, or
320specifically for use in, a User Product, and the conveying occurs as
321part of a transaction in which the right of possession and use of the
322User Product is transferred to the recipient in perpetuity or for a
323fixed term (regardless of how the transaction is characterized), the
324Corresponding Source conveyed under this section must be accompanied
325by the Installation Information. But this requirement does not apply
326if neither you nor any third party retains the ability to install
327modified object code on the User Product (for example, the work has
328been installed in ROM).
329
330 The requirement to provide Installation Information does not include a
331requirement to continue to provide support service, warranty, or updates
332for a work that has been modified or installed by the recipient, or for
333the User Product in which it has been modified or installed. Access to a
334network may be denied when the modification itself materially and
335adversely affects the operation of the network or violates the rules and
336protocols for communication across the network.
337
338 Corresponding Source conveyed, and Installation Information provided,
339in accord with this section must be in a format that is publicly
340documented (and with an implementation available to the public in
341source code form), and must require no special password or key for
342unpacking, reading or copying.
343
344 7. Additional Terms.
345
346 "Additional permissions" are terms that supplement the terms of this
347License by making exceptions from one or more of its conditions.
348Additional permissions that are applicable to the entire Program shall
349be treated as though they were included in this License, to the extent
350that they are valid under applicable law. If additional permissions
351apply only to part of the Program, that part may be used separately
352under those permissions, but the entire Program remains governed by
353this License without regard to the additional permissions.
354
355 When you convey a copy of a covered work, you may at your option
356remove any additional permissions from that copy, or from any part of
357it. (Additional permissions may be written to require their own
358removal in certain cases when you modify the work.) You may place
359additional permissions on material, added by you to a covered work,
360for which you have or can give appropriate copyright permission.
361
362 Notwithstanding any other provision of this License, for material you
363add to a covered work, you may (if authorized by the copyright holders of
364that material) supplement the terms of this License with terms:
365
366 a) Disclaiming warranty or limiting liability differently from the
367 terms of sections 15 and 16 of this License; or
368
369 b) Requiring preservation of specified reasonable legal notices or
370 author attributions in that material or in the Appropriate Legal
371 Notices displayed by works containing it; or
372
373 c) Prohibiting misrepresentation of the origin of that material, or
374 requiring that modified versions of such material be marked in
375 reasonable ways as different from the original version; or
376
377 d) Limiting the use for publicity purposes of names of licensors or
378 authors of the material; or
379
380 e) Declining to grant rights under trademark law for use of some
381 trade names, trademarks, or service marks; or
382
383 f) Requiring indemnification of licensors and authors of that
384 material by anyone who conveys the material (or modified versions of
385 it) with contractual assumptions of liability to the recipient, for
386 any liability that these contractual assumptions directly impose on
387 those licensors and authors.
388
389 All other non-permissive additional terms are considered "further
390restrictions" within the meaning of section 10. If the Program as you
391received it, or any part of it, contains a notice stating that it is
392governed by this License along with a term that is a further
393restriction, you may remove that term. If a license document contains
394a further restriction but permits relicensing or conveying under this
395License, you may add to a covered work material governed by the terms
396of that license document, provided that the further restriction does
397not survive such relicensing or conveying.
398
399 If you add terms to a covered work in accord with this section, you
400must place, in the relevant source files, a statement of the
401additional terms that apply to those files, or a notice indicating
402where to find the applicable terms.
403
404 Additional terms, permissive or non-permissive, may be stated in the
405form of a separately written license, or stated as exceptions;
406the above requirements apply either way.
407
408 8. Termination.
409
410 You may not propagate or modify a covered work except as expressly
411provided under this License. Any attempt otherwise to propagate or
412modify it is void, and will automatically terminate your rights under
413this License (including any patent licenses granted under the third
414paragraph of section 11).
415
416 However, if you cease all violation of this License, then your
417license from a particular copyright holder is reinstated (a)
418provisionally, unless and until the copyright holder explicitly and
419finally terminates your license, and (b) permanently, if the copyright
420holder fails to notify you of the violation by some reasonable means
421prior to 60 days after the cessation.
422
423 Moreover, your license from a particular copyright holder is
424reinstated permanently if the copyright holder notifies you of the
425violation by some reasonable means, this is the first time you have
426received notice of violation of this License (for any work) from that
427copyright holder, and you cure the violation prior to 30 days after
428your receipt of the notice.
429
430 Termination of your rights under this section does not terminate the
431licenses of parties who have received copies or rights from you under
432this License. If your rights have been terminated and not permanently
433reinstated, you do not qualify to receive new licenses for the same
434material under section 10.
435
436 9. Acceptance Not Required for Having Copies.
437
438 You are not required to accept this License in order to receive or
439run a copy of the Program. Ancillary propagation of a covered work
440occurring solely as a consequence of using peer-to-peer transmission
441to receive a copy likewise does not require acceptance. However,
442nothing other than this License grants you permission to propagate or
443modify any covered work. These actions infringe copyright if you do
444not accept this License. Therefore, by modifying or propagating a
445covered work, you indicate your acceptance of this License to do so.
446
447 10. Automatic Licensing of Downstream Recipients.
448
449 Each time you convey a covered work, the recipient automatically
450receives a license from the original licensors, to run, modify and
451propagate that work, subject to this License. You are not responsible
452for enforcing compliance by third parties with this License.
453
454 An "entity transaction" is a transaction transferring control of an
455organization, or substantially all assets of one, or subdividing an
456organization, or merging organizations. If propagation of a covered
457work results from an entity transaction, each party to that
458transaction who receives a copy of the work also receives whatever
459licenses to the work the party's predecessor in interest had or could
460give under the previous paragraph, plus a right to possession of the
461Corresponding Source of the work from the predecessor in interest, if
462the predecessor has it or can get it with reasonable efforts.
463
464 You may not impose any further restrictions on the exercise of the
465rights granted or affirmed under this License. For example, you may
466not impose a license fee, royalty, or other charge for exercise of
467rights granted under this License, and you may not initiate litigation
468(including a cross-claim or counterclaim in a lawsuit) alleging that
469any patent claim is infringed by making, using, selling, offering for
470sale, or importing the Program or any portion of it.
471
472 11. Patents.
473
474 A "contributor" is a copyright holder who authorizes use under this
475License of the Program or a work on which the Program is based. The
476work thus licensed is called the contributor's "contributor version".
477
478 A contributor's "essential patent claims" are all patent claims
479owned or controlled by the contributor, whether already acquired or
480hereafter acquired, that would be infringed by some manner, permitted
481by this License, of making, using, or selling its contributor version,
482but do not include claims that would be infringed only as a
483consequence of further modification of the contributor version. For
484purposes of this definition, "control" includes the right to grant
485patent sublicenses in a manner consistent with the requirements of
486this License.
487
488 Each contributor grants you a non-exclusive, worldwide, royalty-free
489patent license under the contributor's essential patent claims, to
490make, use, sell, offer for sale, import and otherwise run, modify and
491propagate the contents of its contributor version.
492
493 In the following three paragraphs, a "patent license" is any express
494agreement or commitment, however denominated, not to enforce a patent
495(such as an express permission to practice a patent or covenant not to
496sue for patent infringement). To "grant" such a patent license to a
497party means to make such an agreement or commitment not to enforce a
498patent against the party.
499
500 If you convey a covered work, knowingly relying on a patent license,
501and the Corresponding Source of the work is not available for anyone
502to copy, free of charge and under the terms of this License, through a
503publicly available network server or other readily accessible means,
504then you must either (1) cause the Corresponding Source to be so
505available, or (2) arrange to deprive yourself of the benefit of the
506patent license for this particular work, or (3) arrange, in a manner
507consistent with the requirements of this License, to extend the patent
508license to downstream recipients. "Knowingly relying" means you have
509actual knowledge that, but for the patent license, your conveying the
510covered work in a country, or your recipient's use of the covered work
511in a country, would infringe one or more identifiable patents in that
512country that you have reason to believe are valid.
513
514 If, pursuant to or in connection with a single transaction or
515arrangement, you convey, or propagate by procuring conveyance of, a
516covered work, and grant a patent license to some of the parties
517receiving the covered work authorizing them to use, propagate, modify
518or convey a specific copy of the covered work, then the patent license
519you grant is automatically extended to all recipients of the covered
520work and works based on it.
521
522 A patent license is "discriminatory" if it does not include within
523the scope of its coverage, prohibits the exercise of, or is
524conditioned on the non-exercise of one or more of the rights that are
525specifically granted under this License. You may not convey a covered
526work if you are a party to an arrangement with a third party that is
527in the business of distributing software, under which you make payment
528to the third party based on the extent of your activity of conveying
529the work, and under which the third party grants, to any of the
530parties who would receive the covered work from you, a discriminatory
531patent license (a) in connection with copies of the covered work
532conveyed by you (or copies made from those copies), or (b) primarily
533for and in connection with specific products or compilations that
534contain the covered work, unless you entered into that arrangement,
535or that patent license was granted, prior to 28 March 2007.
536
537 Nothing in this License shall be construed as excluding or limiting
538any implied license or other defenses to infringement that may
539otherwise be available to you under applicable patent law.
540
541 12. No Surrender of Others' Freedom.
542
543 If conditions are imposed on you (whether by court order, agreement or
544otherwise) that contradict the conditions of this License, they do not
545excuse you from the conditions of this License. If you cannot convey a
546covered work so as to satisfy simultaneously your obligations under this
547License and any other pertinent obligations, then as a consequence you may
548not convey it at all. For example, if you agree to terms that obligate you
549to collect a royalty for further conveying from those to whom you convey
550the Program, the only way you could satisfy both those terms and this
551License would be to refrain entirely from conveying the Program.
552
553 13. Use with the GNU Affero General Public License.
554
555 Notwithstanding any other provision of this License, you have
556permission to link or combine any covered work with a work licensed
557under version 3 of the GNU Affero General Public License into a single
558combined work, and to convey the resulting work. The terms of this
559License will continue to apply to the part which is the covered work,
560but the special requirements of the GNU Affero General Public License,
561section 13, concerning interaction through a network will apply to the
562combination as such.
563
564 14. Revised Versions of this License.
565
566 The Free Software Foundation may publish revised and/or new versions of
567the GNU General Public License from time to time. Such new versions will
568be similar in spirit to the present version, but may differ in detail to
569address new problems or concerns.
570
571 Each version is given a distinguishing version number. If the
572Program specifies that a certain numbered version of the GNU General
573Public License "or any later version" applies to it, you have the
574option of following the terms and conditions either of that numbered
575version or of any later version published by the Free Software
576Foundation. If the Program does not specify a version number of the
577GNU General Public License, you may choose any version ever published
578by the Free Software Foundation.
579
580 If the Program specifies that a proxy can decide which future
581versions of the GNU General Public License can be used, that proxy's
582public statement of acceptance of a version permanently authorizes you
583to choose that version for the Program.
584
585 Later license versions may give you additional or different
586permissions. However, no additional obligations are imposed on any
587author or copyright holder as a result of your choosing to follow a
588later version.
589
590 15. Disclaimer of Warranty.
591
592 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
593APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
594HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
595OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
596THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
597PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
598IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
599ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
600
601 16. Limitation of Liability.
602
603 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
604WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
605THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
606GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
607USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
608DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
609PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
610EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
611SUCH DAMAGES.
612
613 17. Interpretation of Sections 15 and 16.
614
615 If the disclaimer of warranty and limitation of liability provided
616above cannot be given local legal effect according to their terms,
617reviewing courts shall apply local law that most closely approximates
618an absolute waiver of all civil liability in connection with the
619Program, unless a warranty or assumption of liability accompanies a
620copy of the Program in return for a fee.
621
622 END OF TERMS AND CONDITIONS
623
624 How to Apply These Terms to Your New Programs
625
626 If you develop a new program, and you want it to be of the greatest
627possible use to the public, the best way to achieve this is to make it
628free software which everyone can redistribute and change under these terms.
629
630 To do so, attach the following notices to the program. It is safest
631to attach them to the start of each source file to most effectively
632state the exclusion of warranty; and each file should have at least
633the "copyright" line and a pointer to where the full notice is found.
634
635 <one line to give the program's name and a brief idea of what it does.>
636 Copyright (C) <year> <name of author>
637
638 This program is free software: you can redistribute it and/or modify
639 it under the terms of the GNU General Public License as published by
640 the Free Software Foundation, either version 3 of the License, or
641 (at your option) any later version.
642
643 This program is distributed in the hope that it will be useful,
644 but WITHOUT ANY WARRANTY; without even the implied warranty of
645 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
646 GNU General Public License for more details.
647
648 You should have received a copy of the GNU General Public License
649 along with this program. If not, see <http://www.gnu.org/licenses/>.
650
651Also add information on how to contact you by electronic and paper mail.
652
653 If the program does terminal interaction, make it output a short
654notice like this when it starts in an interactive mode:
655
656 <program> Copyright (C) <year> <name of author>
657 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
658 This is free software, and you are welcome to redistribute it
659 under certain conditions; type `show c' for details.
660
661The hypothetical commands `show w' and `show c' should show the appropriate
662parts of the General Public License. Of course, your program's commands
663might be different; for a GUI interface, you would use an "about box".
664
665 You should also get your employer (if you work as a programmer) or school,
666if any, to sign a "copyright disclaimer" for the program, if necessary.
667For more information on this, and how to apply and follow the GNU GPL, see
668<http://www.gnu.org/licenses/>.
669
670 The GNU General Public License does not permit incorporating your program
671into proprietary programs. If your program is a subroutine library, you
672may consider it more useful to permit linking proprietary applications with
673the library. If this is what you want to do, use the GNU Lesser General
674Public License instead of this License. But first, please read
675<http://www.gnu.org/philosophy/why-not-lgpl.html>.
676
0677
=== renamed file 'COPYING' => 'COPYING.GPL2'
=== added file 'COPYING.LGPL-2.1'
--- COPYING.LGPL-2.1 1970-01-01 00:00:00 +0000
+++ COPYING.LGPL-2.1 2010-01-26 03:57:13 +0000
@@ -0,0 +1,510 @@
1
2 GNU LESSER GENERAL PUBLIC LICENSE
3 Version 2.1, February 1999
4
5 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
6 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
7 Everyone is permitted to copy and distribute verbatim copies
8 of this license document, but changing it is not allowed.
9
10[This is the first released version of the Lesser GPL. It also counts
11 as the successor of the GNU Library Public License, version 2, hence
12 the version number 2.1.]
13
14 Preamble
15
16 The licenses for most software are designed to take away your
17freedom to share and change it. By contrast, the GNU General Public
18Licenses are intended to guarantee your freedom to share and change
19free software--to make sure the software is free for all its users.
20
21 This license, the Lesser General Public License, applies to some
22specially designated software packages--typically libraries--of the
23Free Software Foundation and other authors who decide to use it. You
24can use it too, but we suggest you first think carefully about whether
25this license or the ordinary General Public License is the better
26strategy to use in any particular case, based on the explanations
27below.
28
29 When we speak of free software, we are referring to freedom of use,
30not price. Our General Public Licenses are designed to make sure that
31you have the freedom to distribute copies of free software (and charge
32for this service if you wish); that you receive source code or can get
33it if you want it; that you can change the software and use pieces of
34it in new free programs; and that you are informed that you can do
35these things.
36
37 To protect your rights, we need to make restrictions that forbid
38distributors to deny you these rights or to ask you to surrender these
39rights. These restrictions translate to certain responsibilities for
40you if you distribute copies of the library or if you modify it.
41
42 For example, if you distribute copies of the library, whether gratis
43or for a fee, you must give the recipients all the rights that we gave
44you. You must make sure that they, too, receive or can get the source
45code. If you link other code with the library, you must provide
46complete object files to the recipients, so that they can relink them
47with the library after making changes to the library and recompiling
48it. And you must show them these terms so they know their rights.
49
50 We protect your rights with a two-step method: (1) we copyright the
51library, and (2) we offer you this license, which gives you legal
52permission to copy, distribute and/or modify the library.
53
54 To protect each distributor, we want to make it very clear that
55there is no warranty for the free library. Also, if the library is
56modified by someone else and passed on, the recipients should know
57that what they have is not the original version, so that the original
58author's reputation will not be affected by problems that might be
59introduced by others.
60
061
62 Finally, software patents pose a constant threat to the existence of
63any free program. We wish to make sure that a company cannot
64effectively restrict the users of a free program by obtaining a
65restrictive license from a patent holder. Therefore, we insist that
66any patent license obtained for a version of the library must be
67consistent with the full freedom of use specified in this license.
68
69 Most GNU software, including some libraries, is covered by the
70ordinary GNU General Public License. This license, the GNU Lesser
71General Public License, applies to certain designated libraries, and
72is quite different from the ordinary General Public License. We use
73this license for certain libraries in order to permit linking those
74libraries into non-free programs.
75
76 When a program is linked with a library, whether statically or using
77a shared library, the combination of the two is legally speaking a
78combined work, a derivative of the original library. The ordinary
79General Public License therefore permits such linking only if the
80entire combination fits its criteria of freedom. The Lesser General
81Public License permits more lax criteria for linking other code with
82the library.
83
84 We call this license the "Lesser" General Public License because it
85does Less to protect the user's freedom than the ordinary General
86Public License. It also provides other free software developers Less
87of an advantage over competing non-free programs. These disadvantages
88are the reason we use the ordinary General Public License for many
89libraries. However, the Lesser license provides advantages in certain
90special circumstances.
91
92 For example, on rare occasions, there may be a special need to
93encourage the widest possible use of a certain library, so that it
94becomes a de-facto standard. To achieve this, non-free programs must
95be allowed to use the library. A more frequent case is that a free
96library does the same job as widely used non-free libraries. In this
97case, there is little to gain by limiting the free library to free
98software only, so we use the Lesser General Public License.
99
100 In other cases, permission to use a particular library in non-free
101programs enables a greater number of people to use a large body of
102free software. For example, permission to use the GNU C Library in
103non-free programs enables many more people to use the whole GNU
104operating system, as well as its variant, the GNU/Linux operating
105system.
106
107 Although the Lesser General Public License is Less protective of the
108users' freedom, it does ensure that the user of a program that is
109linked with the Library has the freedom and the wherewithal to run
110that program using a modified version of the Library.
111
112 The precise terms and conditions for copying, distribution and
113modification follow. Pay close attention to the difference between a
114"work based on the library" and a "work that uses the library". The
115former contains code derived from the library, whereas the latter must
116be combined with the library in order to run.
117
1118
119 GNU LESSER GENERAL PUBLIC LICENSE
120 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
121
122 0. This License Agreement applies to any software library or other
123program which contains a notice placed by the copyright holder or
124other authorized party saying it may be distributed under the terms of
125this Lesser General Public License (also called "this License").
126Each licensee is addressed as "you".
127
128 A "library" means a collection of software functions and/or data
129prepared so as to be conveniently linked with application programs
130(which use some of those functions and data) to form executables.
131
132 The "Library", below, refers to any such software library or work
133which has been distributed under these terms. A "work based on the
134Library" means either the Library or any derivative work under
135copyright law: that is to say, a work containing the Library or a
136portion of it, either verbatim or with modifications and/or translated
137straightforwardly into another language. (Hereinafter, translation is
138included without limitation in the term "modification".)
139
140 "Source code" for a work means the preferred form of the work for
141making modifications to it. For a library, complete source code means
142all the source code for all modules it contains, plus any associated
143interface definition files, plus the scripts used to control
144compilation and installation of the library.
145
146 Activities other than copying, distribution and modification are not
147covered by this License; they are outside its scope. The act of
148running a program using the Library is not restricted, and output from
149such a program is covered only if its contents constitute a work based
150on the Library (independent of the use of the Library in a tool for
151writing it). Whether that is true depends on what the Library does
152and what the program that uses the Library does.
153
154 1. You may copy and distribute verbatim copies of the Library's
155complete source code as you receive it, in any medium, provided that
156you conspicuously and appropriately publish on each copy an
157appropriate copyright notice and disclaimer of warranty; keep intact
158all the notices that refer to this License and to the absence of any
159warranty; and distribute a copy of this License along with the
160Library.
161
162 You may charge a fee for the physical act of transferring a copy,
163and you may at your option offer warranty protection in exchange for a
164fee.
165
2166
167 2. You may modify your copy or copies of the Library or any portion
168of it, thus forming a work based on the Library, and copy and
169distribute such modifications or work under the terms of Section 1
170above, provided that you also meet all of these conditions:
171
172 a) The modified work must itself be a software library.
173
174 b) You must cause the files modified to carry prominent notices
175 stating that you changed the files and the date of any change.
176
177 c) You must cause the whole of the work to be licensed at no
178 charge to all third parties under the terms of this License.
179
180 d) If a facility in the modified Library refers to a function or a
181 table of data to be supplied by an application program that uses
182 the facility, other than as an argument passed when the facility
183 is invoked, then you must make a good faith effort to ensure that,
184 in the event an application does not supply such function or
185 table, the facility still operates, and performs whatever part of
186 its purpose remains meaningful.
187
188 (For example, a function in a library to compute square roots has
189 a purpose that is entirely well-defined independent of the
190 application. Therefore, Subsection 2d requires that any
191 application-supplied function or table used by this function must
192 be optional: if the application does not supply it, the square
193 root function must still compute square roots.)
194
195These requirements apply to the modified work as a whole. If
196identifiable sections of that work are not derived from the Library,
197and can be reasonably considered independent and separate works in
198themselves, then this License, and its terms, do not apply to those
199sections when you distribute them as separate works. But when you
200distribute the same sections as part of a whole which is a work based
201on the Library, the distribution of the whole must be on the terms of
202this License, whose permissions for other licensees extend to the
203entire whole, and thus to each and every part regardless of who wrote
204it.
205
206Thus, it is not the intent of this section to claim rights or contest
207your rights to work written entirely by you; rather, the intent is to
208exercise the right to control the distribution of derivative or
209collective works based on the Library.
210
211In addition, mere aggregation of another work not based on the Library
212with the Library (or with a work based on the Library) on a volume of
213a storage or distribution medium does not bring the other work under
214the scope of this License.
215
216 3. You may opt to apply the terms of the ordinary GNU General Public
217License instead of this License to a given copy of the Library. To do
218this, you must alter all the notices that refer to this License, so
219that they refer to the ordinary GNU General Public License, version 2,
220instead of to this License. (If a newer version than version 2 of the
221ordinary GNU General Public License has appeared, then you can specify
222that version instead if you wish.) Do not make any other change in
223these notices.
224
3225
226 Once this change is made in a given copy, it is irreversible for
227that copy, so the ordinary GNU General Public License applies to all
228subsequent copies and derivative works made from that copy.
229
230 This option is useful when you wish to copy part of the code of
231the Library into a program that is not a library.
232
233 4. You may copy and distribute the Library (or a portion or
234derivative of it, under Section 2) in object code or executable form
235under the terms of Sections 1 and 2 above provided that you accompany
236it with the complete corresponding machine-readable source code, which
237must be distributed under the terms of Sections 1 and 2 above on a
238medium customarily used for software interchange.
239
240 If distribution of object code is made by offering access to copy
241from a designated place, then offering equivalent access to copy the
242source code from the same place satisfies the requirement to
243distribute the source code, even though third parties are not
244compelled to copy the source along with the object code.
245
246 5. A program that contains no derivative of any portion of the
247Library, but is designed to work with the Library by being compiled or
248linked with it, is called a "work that uses the Library". Such a
249work, in isolation, is not a derivative work of the Library, and
250therefore falls outside the scope of this License.
251
252 However, linking a "work that uses the Library" with the Library
253creates an executable that is a derivative of the Library (because it
254contains portions of the Library), rather than a "work that uses the
255library". The executable is therefore covered by this License.
256Section 6 states terms for distribution of such executables.
257
258 When a "work that uses the Library" uses material from a header file
259that is part of the Library, the object code for the work may be a
260derivative work of the Library even though the source code is not.
261Whether this is true is especially significant if the work can be
262linked without the Library, or if the work is itself a library. The
263threshold for this to be true is not precisely defined by law.
264
265 If such an object file uses only numerical parameters, data
266structure layouts and accessors, and small macros and small inline
267functions (ten lines or less in length), then the use of the object
268file is unrestricted, regardless of whether it is legally a derivative
269work. (Executables containing this object code plus portions of the
270Library will still fall under Section 6.)
271
272 Otherwise, if the work is a derivative of the Library, you may
273distribute the object code for the work under the terms of Section 6.
274Any executables containing that work also fall under Section 6,
275whether or not they are linked directly with the Library itself.
276
4277
278 6. As an exception to the Sections above, you may also combine or
279link a "work that uses the Library" with the Library to produce a
280work containing portions of the Library, and distribute that work
281under terms of your choice, provided that the terms permit
282modification of the work for the customer's own use and reverse
283engineering for debugging such modifications.
284
285 You must give prominent notice with each copy of the work that the
286Library is used in it and that the Library and its use are covered by
287this License. You must supply a copy of this License. If the work
288during execution displays copyright notices, you must include the
289copyright notice for the Library among them, as well as a reference
290directing the user to the copy of this License. Also, you must do one
291of these things:
292
293 a) Accompany the work with the complete corresponding
294 machine-readable source code for the Library including whatever
295 changes were used in the work (which must be distributed under
296 Sections 1 and 2 above); and, if the work is an executable linked
297 with the Library, with the complete machine-readable "work that
298 uses the Library", as object code and/or source code, so that the
299 user can modify the Library and then relink to produce a modified
300 executable containing the modified Library. (It is understood
301 that the user who changes the contents of definitions files in the
302 Library will not necessarily be able to recompile the application
303 to use the modified definitions.)
304
305 b) Use a suitable shared library mechanism for linking with the
306 Library. A suitable mechanism is one that (1) uses at run time a
307 copy of the library already present on the user's computer system,
308 rather than copying library functions into the executable, and (2)
309 will operate properly with a modified version of the library, if
310 the user installs one, as long as the modified version is
311 interface-compatible with the version that the work was made with.
312
313 c) Accompany the work with a written offer, valid for at least
314 three years, to give the same user the materials specified in
315 Subsection 6a, above, for a charge no more than the cost of
316 performing this distribution.
317
318 d) If distribution of the work is made by offering access to copy
319 from a designated place, offer equivalent access to copy the above
320 specified materials from the same place.
321
322 e) Verify that the user has already received a copy of these
323 materials or that you have already sent this user a copy.
324
325 For an executable, the required form of the "work that uses the
326Library" must include any data and utility programs needed for
327reproducing the executable from it. However, as a special exception,
328the materials to be distributed need not include anything that is
329normally distributed (in either source or binary form) with the major
330components (compiler, kernel, and so on) of the operating system on
331which the executable runs, unless that component itself accompanies
332the executable.
333
334 It may happen that this requirement contradicts the license
335restrictions of other proprietary libraries that do not normally
336accompany the operating system. Such a contradiction means you cannot
337use both them and the Library together in an executable that you
338distribute.
339
5340
341 7. You may place library facilities that are a work based on the
342Library side-by-side in a single library together with other library
343facilities not covered by this License, and distribute such a combined
344library, provided that the separate distribution of the work based on
345the Library and of the other library facilities is otherwise
346permitted, and provided that you do these two things:
347
348 a) Accompany the combined library with a copy of the same work
349 based on the Library, uncombined with any other library
350 facilities. This must be distributed under the terms of the
351 Sections above.
352
353 b) Give prominent notice with the combined library of the fact
354 that part of it is a work based on the Library, and explaining
355 where to find the accompanying uncombined form of the same work.
356
357 8. You may not copy, modify, sublicense, link with, or distribute
358the Library except as expressly provided under this License. Any
359attempt otherwise to copy, modify, sublicense, link with, or
360distribute the Library is void, and will automatically terminate your
361rights under this License. However, parties who have received copies,
362or rights, from you under this License will not have their licenses
363terminated so long as such parties remain in full compliance.
364
365 9. You are not required to accept this License, since you have not
366signed it. However, nothing else grants you permission to modify or
367distribute the Library or its derivative works. These actions are
368prohibited by law if you do not accept this License. Therefore, by
369modifying or distributing the Library (or any work based on the
370Library), you indicate your acceptance of this License to do so, and
371all its terms and conditions for copying, distributing or modifying
372the Library or works based on it.
373
374 10. Each time you redistribute the Library (or any work based on the
375Library), the recipient automatically receives a license from the
376original licensor to copy, distribute, link with or modify the Library
377subject to these terms and conditions. You may not impose any further
378restrictions on the recipients' exercise of the rights granted herein.
379You are not responsible for enforcing compliance by third parties with
380this License.
381
6382
383 11. If, as a consequence of a court judgment or allegation of patent
384infringement or for any other reason (not limited to patent issues),
385conditions are imposed on you (whether by court order, agreement or
386otherwise) that contradict the conditions of this License, they do not
387excuse you from the conditions of this License. If you cannot
388distribute so as to satisfy simultaneously your obligations under this
389License and any other pertinent obligations, then as a consequence you
390may not distribute the Library at all. For example, if a patent
391license would not permit royalty-free redistribution of the Library by
392all those who receive copies directly or indirectly through you, then
393the only way you could satisfy both it and this License would be to
394refrain entirely from distribution of the Library.
395
396If any portion of this section is held invalid or unenforceable under
397any particular circumstance, the balance of the section is intended to
398apply, and the section as a whole is intended to apply in other
399circumstances.
400
401It is not the purpose of this section to induce you to infringe any
402patents or other property right claims or to contest validity of any
403such claims; this section has the sole purpose of protecting the
404integrity of the free software distribution system which is
405implemented by public license practices. Many people have made
406generous contributions to the wide range of software distributed
407through that system in reliance on consistent application of that
408system; it is up to the author/donor to decide if he or she is willing
409to distribute software through any other system and a licensee cannot
410impose that choice.
411
412This section is intended to make thoroughly clear what is believed to
413be a consequence of the rest of this License.
414
415 12. If the distribution and/or use of the Library is restricted in
416certain countries either by patents or by copyrighted interfaces, the
417original copyright holder who places the Library under this License
418may add an explicit geographical distribution limitation excluding those
419countries, so that distribution is permitted only in or among
420countries not thus excluded. In such case, this License incorporates
421the limitation as if written in the body of this License.
422
423 13. The Free Software Foundation may publish revised and/or new
424versions of the Lesser General Public License from time to time.
425Such new versions will be similar in spirit to the present version,
426but may differ in detail to address new problems or concerns.
427
428Each version is given a distinguishing version number. If the Library
429specifies a version number of this License which applies to it and
430"any later version", you have the option of following the terms and
431conditions either of that version or of any later version published by
432the Free Software Foundation. If the Library does not specify a
433license version number, you may choose any version ever published by
434the Free Software Foundation.
435
7436
437 14. If you wish to incorporate parts of the Library into other free
438programs whose distribution conditions are incompatible with these,
439write to the author to ask for permission. For software which is
440copyrighted by the Free Software Foundation, write to the Free
441Software Foundation; we sometimes make exceptions for this. Our
442decision will be guided by the two goals of preserving the free status
443of all derivatives of our free software and of promoting the sharing
444and reuse of software generally.
445
446 NO WARRANTY
447
448 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
449WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
450EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
451OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
452KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
453IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
454PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
455LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
456THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
457
458 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
459WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
460AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
461FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
462CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
463LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
464RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
465FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
466SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
467DAMAGES.
468
469 END OF TERMS AND CONDITIONS
470
8471
472 How to Apply These Terms to Your New Libraries
473
474 If you develop a new library, and you want it to be of the greatest
475possible use to the public, we recommend making it free software that
476everyone can redistribute and change. You can do so by permitting
477redistribution under these terms (or, alternatively, under the terms
478of the ordinary General Public License).
479
480 To apply these terms, attach the following notices to the library.
481It is safest to attach them to the start of each source file to most
482effectively convey the exclusion of warranty; and each file should
483have at least the "copyright" line and a pointer to where the full
484notice is found.
485
486
487 <one line to give the library's name and a brief idea of what it does.>
488 Copyright (C) <year> <name of author>
489
490 This library is free software; you can redistribute it and/or
491 modify it under the terms of the GNU Lesser General Public
492 License as published by the Free Software Foundation; either
493 version 2.1 of the License, or (at your option) any later version.
494
495 This library is distributed in the hope that it will be useful,
496 but WITHOUT ANY WARRANTY; without even the implied warranty of
497 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
498 Lesser General Public License for more details.
499
500 You should have received a copy of the GNU Lesser General Public
501 License along with this library; if not, write to the Free Software
502 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
503
504Also add information on how to contact you by electronic and paper mail.
505
506You should also get your employer (if you work as a programmer) or
507your school, if any, to sign a "copyright disclaimer" for the library,
508if necessary. Here is a sample; alter the names:
509
510 Yoyodyne, Inc., hereby disclaims all copyright interest in the
511 library `Frob' (a library for tweaking knobs) written by James
512 Random Hacker.
513
514 <signature of Ty Coon>, 1 April 1990
515 Ty Coon, President of Vice
516
517That's all there is to it!
518
519
9520
=== modified file 'Makefile.am'
--- Makefile.am 2009-04-07 23:20:36 +0000
+++ Makefile.am 2010-01-26 03:57:13 +0000
@@ -1,14 +1,22 @@
1SUBDIRS = \1NULL =
2 src \2SUBDIRS = \
3 po3 applets \
4 shared/python \
5 po \
6 $(NULL)
4 7
5EXTRA_DIST = \8EXTRA_DIST = \
6 intltool-extract.in \9 autogen.sh \
7 intltool-merge.in \10 intltool-extract.in \
8 intltool-update.in \11 intltool-merge.in \
12 intltool-update.in \
9 po/Makefile.in.in \13 po/Makefile.in.in \
10 po/POTFILES.skip \14 po/POTFILES.skip \
11 autogen.sh15 COPYING.BSD \
16 COPYING.CCASAv3.0 \
17 COPYING.GPL-3 \
18 COPYING.LGPL-2.1 \
19 $(NULL)
1220
13DISTCLEANFILES = \21DISTCLEANFILES = \
14 intltool-extract \22 intltool-extract \
@@ -17,6 +25,14 @@
1725
18ACLOCAL_AMFLAGS = -I m426ACLOCAL_AMFLAGS = -I m4
1927
28DISTCHECK_CONFIGURE_FLAGS = --disable-pymod-checks
29
30i18n-update: po/POTFILES.in po/POTFILES.skip
31 (cd po && for lang in `grep ALL_LINGUAS ../configure.ac | cut -d'"' -f2`; do \
32 echo -n "Updating $$lang:"; \
33 intltool-update $$lang; \
34 done)
35
20gtk_update_icon_cache = gtk-update-icon-cache -f -t ${datadir}/icons/hicolor36gtk_update_icon_cache = gtk-update-icon-cache -f -t ${datadir}/icons/hicolor
2137
22install-data-hook: update-icon-cache38install-data-hook: update-icon-cache
2339
=== modified file 'Makefile.c-applet'
--- Makefile.c-applet 2009-02-01 00:13:07 +0000
+++ Makefile.c-applet 2010-01-26 03:57:13 +0000
@@ -4,7 +4,7 @@
44
5AM_CFLAGS = \5AM_CFLAGS = \
6 -I$(srcdir) \6 -I$(srcdir) \
7 -I$(top_srcdir)/src \7 -I$(top_builddir) \
8 $(AWN_CFLAGS) \8 $(AWN_CFLAGS) \
9 $(APPLET_CFLAGS) \9 $(APPLET_CFLAGS) \
10 $(NULL)10 $(NULL)
@@ -12,3 +12,7 @@
12APPLET_LINKER_FLAGS = -module -avoid-version12APPLET_LINKER_FLAGS = -module -avoid-version
1313
14appletdir = $(libdir)/awn/applets/$(APPLET_NAME)14appletdir = $(libdir)/awn/applets/$(APPLET_NAME)
15
16EXTRA_DIST += \
17 $(desktop_DATA:.desktop=.desktop.in.in) \
18 $(NULL)
1519
=== modified file 'Makefile.common'
--- Makefile.common 2009-02-02 05:33:36 +0000
+++ Makefile.common 2010-01-26 03:57:14 +0000
@@ -1,3 +1,9 @@
1# vim: set ft=automake ts=8 sts=8 sw=8 :1# vim: set ft=automake ts=8 sts=8 sw=8 :
2NULL = 2NULL =
3applet_datadir = $(APPLETSDIR)/$(APPLET_NAME)3applet_datadir = $(APPLETSDIR)/$(APPLET_NAME)
4
5# shave-related
6V = @
7Q = $(V:1=)
8QUIET_GEN = $(Q:@=@echo ' GEN '$@;)
9
410
=== modified file 'Makefile.desktop-files'
--- Makefile.desktop-files 2008-12-12 22:27:26 +0000
+++ Makefile.desktop-files 2010-01-26 03:57:14 +0000
@@ -11,6 +11,6 @@
1111
12EXTRA_DIST = \12EXTRA_DIST = \
13 $(icon_DATA) \13 $(icon_DATA) \
14 $(desktop_DATA).in14 $(NULL)
1515
16CLEANFILES = $(desktop_DATA)16CLEANFILES = $(desktop_DATA)
1717
=== modified file 'Makefile.python-applet'
--- Makefile.python-applet 2009-02-08 21:32:15 +0000
+++ Makefile.python-applet 2010-01-26 03:57:14 +0000
@@ -5,3 +5,7 @@
5appletdir = $(applet_datadir)5appletdir = $(applet_datadir)
66
7dist_applet_SCRIPTS = $(APPLET_MAIN_FILE)7dist_applet_SCRIPTS = $(APPLET_MAIN_FILE)
8
9EXTRA_DIST += \
10 $(desktop_DATA:.desktop=.desktop.in) \
11 $(NULL)
812
=== modified file 'Makefile.schemas'
--- Makefile.schemas 2008-04-20 04:04:19 +0000
+++ Makefile.schemas 2010-01-26 03:57:14 +0000
@@ -1,25 +1,22 @@
1# vim: set ft=automake :1# vim: set ft=automake ts=8 sts=8 sw=8 :
22
3APPLET_SCHEMA = $(APPLET_NAME).schema-ini3schemadir = $(datadir)/avant-window-navigator/schemas
44schema_DATA = awn-applet-$(APPLET_NAME).schema-ini
5if GCONF_SCHEMAS5
6schemasdir = @GCONF_SCHEMA_FILE_DIR@6if GCONF_SCHEMAS_INSTALL
7schemas_FILE = $(APPLET_NAME).schemas7gconfschemasdir = @GCONF_SCHEMA_FILE_DIR@
8schemas_in_files = $(schemas_FILE).in8gconfschemas_in_files =$(schema_DATA:.schema-ini=.schemas.in)
9schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)9gconfschemas_DATA = $(gconfschemas_in_files:.schemas.in=.schemas)
1010
11$(schemas_FILE).in: $(APPLET_SCHEMA)11%.schemas.in: %.schema-ini
12 $(AWN_BINDIR)/awn-schema-to-gconf $< $@ "$(APPLET_NAME)"12 $(QUIET_GEN)$(LDA_BINDIR)/lda-schema-to-gconf $< $@
1313
14@INTLTOOL_SCHEMAS_RULE@14@INTLTOOL_SCHEMAS_RULE@
1515
16if GCONF_SCHEMAS_INSTALL16install-data-local: $(gconfschemas_DATA)
17install-data-local: $(schemas_DATA)17 GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(gconfschemas_DATA)
18 GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schemas_DATA)18
19endif19CLEANFILES += $(gconfschemas_in_files) $(gconfschemas_DATA)
20else20endif
21schemasdir = $(datadir)/avant-window-navigator/schemas21
22schemas_DATA = $(APPLET_SCHEMA)22EXTRA_DIST += $(schema_DATA)
23endif
24
25EXTRA_DIST += $(APPLET_SCHEMA)
2623
=== modified file 'Makefile.vala-applet'
--- Makefile.vala-applet 2008-12-25 20:27:53 +0000
+++ Makefile.vala-applet 2010-01-26 03:57:14 +0000
@@ -1,19 +1,26 @@
1# vim: set ft=automake ts=8 sts=8 sw=8 :1# vim: set ft=automake ts=8 sts=8 sw=8 :
2include $(top_srcdir)/Makefile.c-applet2include $(top_srcdir)/Makefile.c-applet
33
4VALA_CC = $(CC) -shared -fPIC $(APPLET_CFLAGS) $(CFLAGS)4####
5VALA_EXTRALDFLAGS = $(foreach flag,$(LDFLAGS),--Xcc="$(flag)") $(foreach flag,$(AM_LDFLAGS),--Xcc="$(flag)")5# Note to applet developers: DO NOT OVERRIDE CPPFLAGS, CFLAGS, OR VALAFLAGS.
66# That is what the AM_FOOFLAGS variant is for.
7BUILT_SOURCES = $(APPLET_NAME).so7####
88
9$(APPLET_NAME).so: $(VALA_FILES)9# for shave
10 $(VALAC) --cc="$(VALA_CC)" -o $@ $^ --vapidir=$(AWN_VAPIDIR) --pkg=awn $(AM_VALAFLAGS) $(VALAFLAGS) $(VALA_EXTRALDFLAGS)10QUIET_INSTALL = $(Q:@=@echo ' INSTALL '$@;)
1111QUIET_VALA = $(Q:@=@echo ' VALAC '$@;)
12install-exec-hook:12
13 test -d "$(DESTDIR)$(appletdir)" || mkdir -p "$(DESTDIR)$(appletdir)"13BUILT_SOURCES = $(APPLET_NAME).vala.stamp
14 $(INSTALL) -m 755 $(APPLET_NAME).so "$(DESTDIR)$(appletdir)"14
1515VALA_C_FILES = $(VALA_FILES:.vala=.c)
16uninstall-hook:16
17 rm -f "$(appletdir)/$(APPLET_NAME).so"17$(APPLET_NAME).vala.stamp: $(VALA_FILES)
1818 $(QUIET_VALA)$(VALAC) -C $^ \
19CLEANFILES += $(APPLET_NAME).so19 --vapidir=$(top_srcdir)/shared/vala --pkg=build \
20 --vapidir=$(LDA_VAPIDIR) \
21 --vapidir=$(AWN_VAPIDIR) --pkg=awn \
22 $(AM_VALAFLAGS) $(VALAFLAGS)
23 touch "$@"
24
25EXTRA_DIST += $(VALA_FILES)
26CLEANFILES += $(APPLET_NAME).vala.stamp
2027
=== added directory 'applets'
=== renamed file 'src/Makefile.am' => 'applets/Makefile.am'
--- src/Makefile.am 2009-03-30 23:21:35 +0000
+++ applets/Makefile.am 2010-01-26 03:57:14 +0000
@@ -1,90 +1,83 @@
1NULL =1NULL =
2
3CONDITIONAL_APPLETS =
4
2if HAVE_VALA5if HAVE_VALA
3if MAINTAINER_MODE6if MAINTAINER_MODE
4VALA_TEST = vala-test7CONDITIONAL_APPLETS += maintained/vala-test
5endif8endif
6VALA_APPLETS = $(VALA_TEST) taskmand simple-launcher standalone-launcher Taskmand-applet 9CONDITIONAL_APPLETS += \
7endif10 maintained/garbage \
811 maintained/notification-area \
9GCONF_APPLETS =12 maintained/showdesktop \
13 $(NULL)
14endif
1015
11if WITH_GCONF16if WITH_GCONF
12if WITH_GNOME17if WITH_GNOME
13# --with-gnome --with-gconf18# --with-gnome --with-gconf
14GCONF_APPLETS += \19CONDITIONAL_APPLETS += \
15 awnsystemmonitor \
16 cairo-menu \
17 filebrowser \
18 plugger \
19 stacks \
20 trasher \
21 $(NULL)20 $(NULL)
22endif21endif
23# --with-gconf22# --with-gconf
24GCONF_APPLETS += \23CONDITIONAL_APPLETS += \
25 awn-notification-daemon \24 unmaintained/awnsystemmonitor \
26 calendar \25 maintained/calendar \
27 media-control \26 maintained/notification-daemon \
28 $(NULL)27 $(NULL)
29endif28endif
30# --with-gnome29# --with-gnome
31if WITH_GNOME30if WITH_GNOME
32GCONF_APPLETS += \31CONDITIONAL_APPLETS += \
33 digg \32 maintained/cairo-menu \
34 main-menu \33 unmaintained/main-menu \
35 MiMenu \34 unmaintained/MiMenu \
36 pandora \35 unmaintained/pandora \
37 rtm \36 unmaintained/stacks \
38 trash \37 maintained/yama \
39 $(NULL)38 $(NULL)
40endif39endif
41if WITH_WEBKIT40# --with-webkit and/or --with-mozilla
42WEBKIT_APPLETS = \41if BUILD_WEBAPPLET
43 webapplet \42CONDITIONAL_APPLETS += \
43 maintained/webapplet \
44 $(NULL)44 $(NULL)
45endif45endif
46if MAINTAINER_MODE46if MAINTAINER_MODE
47PYTHON_TEST = python-test47CONDITIONAL_APPLETS += maintained/python-test
48WOBBLYZINI = wobblyzini48CONDITIONAL_APPLETS += maintained/wobblyzini
49endif49endif
5050
51# please keep alphabetized (except for libawn-extras)51# please keep alphabetized
52SUBDIRS = \52SUBDIRS = \
53 libawn-extras \53 maintained/animal-farm \
54 animal-farm \54 maintained/awnterm \
55 arss \55 maintained/bandwidth-monitor \
56 awn-meebo \56 maintained/battery \
57 awnterm \57 maintained/cairo-clock \
58 battery-applet \58 maintained/comics \
59 cairo-clock \59 maintained/cpufreq \
60 comic \60 maintained/dialect \
61 comics \61 maintained/digital-clock \
62 cpufreq \62 unmaintained/dropper \
63 DesktopManager \63 maintained/feeds \
64 digitalClock \64 maintained/file-browser-launcher \
65 file-browser-launcher \65 maintained/hardware-sensors \
66 mail \66 maintained/mail \
67 media-icon-back \67 maintained/media-control \
68 media-icon-next \68 maintained/media-icons \
69 media-icon-play \69 maintained/media-player \
70 media-player \70 maintained/mount \
71 mount-applet \71 maintained/places \
72 notification-area \72 maintained/quit \
73 places \73 maintained/slickswitcher \
74 pynot \74 maintained/shiny-switcher \
75 pynot-rgba \75 maintained/sysmon \
76 $(PYTHON_TEST) \76 maintained/thinkhdaps \
77 quit-applet \77 maintained/to-do \
78 separator \78 maintained/tomboy-applet \
79 shiny-switcher \79 maintained/volume-control \
80 showdesktop \80 maintained/weather \
81 thinkhdaps \81 $(CONDITIONAL_APPLETS) \
82 to-do \
83 tomboy-applet \
84 volume-control \
85 weather \
86 $(WOBBLYZINI) \
87 $(GCONF_APPLETS) \
88 $(VALA_APPLETS) \
89 $(WEBKIT_APPLETS) \
90 $(NULL)82 $(NULL)
83# vim: set ts=8 sts=8 sw=8 :
9184
=== added directory 'applets/maintained'
=== renamed directory 'src/animal-farm' => 'applets/maintained/animal-farm'
=== modified file 'applets/maintained/animal-farm/animal-farm.desktop.in'
--- src/animal-farm/animal-farm.desktop.in 2009-02-08 10:06:43 +0000
+++ applets/maintained/animal-farm/animal-farm.desktop.in 2010-01-26 03:57:14 +0000
@@ -1,11 +1,11 @@
1[Desktop Entry]1[Desktop Entry]
2Version=1.02Version=1.0
3Name=Animal Farm3_Name=Animal Farm
4Type=Application4Type=Application
5X-AWN-Type=Applet
5X-AWN-AppletType=Python6X-AWN-AppletType=Python
6X-AWN-AppletCategory=Game,Amusement7X-AWN-AppletCategory=Game,Amusement
7Comment=Display fortune messages8_Comment=Display fortune messages
8Exec=animal-farm/animal-farm.py9Exec=awn-applet -p %k
9Icon=animal-farm/icons/lemmling-cartoon-gnu.svg10X-AWN-AppletExec=animal-farm/animal-farm.py
10Name[en_US]=Animal Farm11Icon=animal-farm/icons/lemmling-cartoon-gnu
11
1212
=== modified file 'applets/maintained/animal-farm/animal-farm.py'
--- src/animal-farm/animal-farm.py 2009-03-04 23:12:25 +0000
+++ applets/maintained/animal-farm/animal-farm.py 2010-01-26 03:57:14 +0000
@@ -24,11 +24,10 @@
24pygtk.require("2.0")24pygtk.require("2.0")
25import gtk25import gtk
2626
27from awn.extras import awnlib27from awn.extras import awnlib, __version__
28import random28import random
2929
30applet_name = "Animal Farm"30applet_name = "Animal Farm"
31applet_version = "0.3.3"
32applet_description = "Applet that displays fortune messages"31applet_description = "Applet that displays fortune messages"
3332
34images_dir = os.path.join(os.path.dirname(__file__), "icons")33images_dir = os.path.join(os.path.dirname(__file__), "icons")
@@ -42,67 +41,72 @@
42class AnimalFarmApplet:41class AnimalFarmApplet:
4342
44 """Applet that displays fortune messages.43 """Applet that displays fortune messages.
45 44
46 """45 """
47 46
48 def __init__(self, applet):47 def __init__(self, applet):
49 self.applet = applet48 self.applet = applet
50 49
51 self.iconname = self.previous_iconname = None50 self.iconname = self.previous_iconname = None
52 self.set_icon()51 self.set_icon()
53 52
54 self.setup_main_dialog()53 self.setup_main_dialog()
55 54
56 applet.connect_size_changed(self.refresh_icon)55 applet.connect_size_changed(self.refresh_icon)
57 56
58 def setup_main_dialog(self):57 def setup_main_dialog(self):
59 self.dialog = self.applet.dialog.new("fortune-dialog")58 self.dialog = self.applet.dialog.new("fortune-dialog")
60 59
60 alignment = gtk.Alignment()
61 padding = 6
62 alignment.set_padding(padding, padding, padding, padding)
63 self.dialog.add(alignment)
64
61 self.label = gtk.Label()65 self.label = gtk.Label()
62 self.dialog.add(self.label)66 alignment.add(self.label)
63 self.refresh_fortune()67 self.refresh_fortune()
64 68
65 self.applet.connect("button-press-event", self.button_press_event_cb)69 self.applet.connect("clicked", self.clicked_cb)
66 self.dialog.connect("focus-out-event", self.dialog_focus_out_cb)70 self.applet.connect("middle-clicked", self.middle_click_cb)
67 71
68 def button_press_event_cb(self, widget, event):72 def clicked_cb(self, widget):
69 if event.button == 1:73 if self.dialog.is_active():
70 if self.dialog.is_active():74 self.set_icon()
71 self.set_icon()
72 self.refresh_fortune()
73 self.applet.dialog.toggle("fortune-dialog")
74 elif event.button == 2:
75 self.refresh_fortune()75 self.refresh_fortune()
76 if not self.dialog.is_active():76 self.applet.dialog.toggle("fortune-dialog")
77 self.applet.dialog.toggle("fortune-dialog", "show")77
78 78 def middle_click_cb(self, widget):
79 self.refresh_fortune()
80 if not self.dialog.is_active():
81 self.applet.dialog.toggle("fortune-dialog", "show")
82
79 def dialog_focus_out_cb(self, dialog, event):83 def dialog_focus_out_cb(self, dialog, event):
80 self.set_icon()84 self.set_icon()
81 self.refresh_fortune()85 self.refresh_fortune()
82 86
83 def set_icon(self):87 def set_icon(self):
84 files = [i for i in os.listdir(images_dir) if i.endswith('.svg') and i != self.iconname and i != self.previous_iconname]88 files = [i for i in os.listdir(images_dir) if i.endswith('.svg') and i != self.iconname and i != self.previous_iconname]
85 89
86 self.previous_iconname = self.iconname90 self.previous_iconname = self.iconname
87 self.iconname = files[random.randint(0, len(files) - 1)]91 self.iconname = files[random.randint(0, len(files) - 1)]
88 92
89 self.refresh_icon()93 self.refresh_icon()
90 94
91 def refresh_icon(self):95 def refresh_icon(self):
92 self.applet.icon.file(os.path.join(images_dir, self.iconname), size=awnlib.Icon.APPLET_SIZE)96 self.applet.icon.file(os.path.join(images_dir, self.iconname), size=awnlib.Icon.APPLET_SIZE)
93 97
94 def refresh_fortune(self):98 def refresh_fortune(self):
95 try:99 try:
96 text = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]100 text = subprocess.Popen(command, stdout=subprocess.PIPE).communicate()[0]
97 except OSError:101 except OSError:
98 text = "Error executing \"" + command + "\"; make sure it is in your path and executable."102 text = "Error executing \"" + command + "\"; make sure it is in your path and executable."
99 self.label.set_text(text)103 self.label.set_text(text.rstrip())
100104
101105
102if __name__ == "__main__":106if __name__ == "__main__":
103 awnlib.init_start(AnimalFarmApplet, {"name": applet_name,107 awnlib.init_start(AnimalFarmApplet, {"name": applet_name,
104 "short": "animal-farm",108 "short": "animal-farm",
105 "version": applet_version,109 "version": __version__,
106 "description": applet_description,110 "description": applet_description,
107 "logo": applet_logo,111 "logo": applet_logo,
108 "author": "Arvind Ganga",112 "author": "Arvind Ganga",
109113
=== renamed directory 'src/awnterm' => 'applets/maintained/awnterm'
=== modified file 'applets/maintained/awnterm/Makefile.am'
--- src/awnterm/Makefile.am 2008-04-24 20:51:28 +0000
+++ applets/maintained/awnterm/Makefile.am 2010-01-26 03:57:14 +0000
@@ -1,18 +1,24 @@
1APPLET_NAME = awnterm1APPLET_NAME = awnterm
2APPLET_CFLAGS = $(VTE_CFLAGS)2APPLET_CFLAGS = $(VTE_CFLAGS)
3include $(top_srcdir)/Makefile.c-applet3VALA_FILES = \
4 awn-terminal.vala \
5 keybinder.vapi \
6 $(NULL)
7AM_VALAFLAGS = --pkg=libintl --pkg=vte --pkg=dbus-glib-1
8include $(top_srcdir)/Makefile.vala-applet
4include $(top_srcdir)/Makefile.schemas9include $(top_srcdir)/Makefile.schemas
10
5applet_LTLIBRARIES = awnterm.la11applet_LTLIBRARIES = awnterm.la
6awnterm_la_SOURCES = \12awnterm_la_SOURCES = \
7 applet.c \13 $(VALA_C_FILES) \
8 awnterm.c \14 keybinder.c \
9 awnterm.h \15 eggaccelerators.c \
10 settings.c \
11 settings.h \
12 $(NULL)16 $(NULL)
13awnterm_la_LIBADD = \17awnterm_la_LIBADD = \
14 $(AWN_LIBS) \18 $(AWN_LIBS) \
15 $(VTE_LIBS) \19 $(VTE_LIBS) \
16 $(top_builddir)/src/libawn-extras/libawn-extras.la \
17 $(NULL)20 $(NULL)
18awnterm_la_LDFLAGS = $(APPLET_LINKER_FLAGS)21awnterm_la_LDFLAGS = $(APPLET_LINKER_FLAGS)
22EXTRA_DIST += \
23 eggaccelerators.h \
24 keybinder.h
1925
=== renamed file 'src/awnterm/awnterm.schema-ini' => 'applets/maintained/awnterm/awn-applet-awnterm.schema-ini'
--- src/awnterm/awnterm.schema-ini 2009-01-25 23:49:36 +0000
+++ applets/maintained/awnterm/awn-applet-awnterm.schema-ini 2010-01-26 03:57:14 +0000
@@ -1,15 +1,20 @@
1[DEFAULT/opacity]1[DEFAULT/opacity]
2type = float2type = float
3default = 0.83default = 0.9
4description = The applet's opacity level.4description = The applet's opacity level.
5description[en_CA] = The applet's opacity level.5description[en_CA] = The applet's opacity level.
66
7[DEFAULT/hide_on_unfocus]7[DEFAULT/hide_on_unfocus]
8type = bool8type = boolean
9default = true9default = true
10description = Set whether the applet should hide itself when it loses focus.10description = Set whether the applet should hide itself when it loses focus.
11description[en_CA] = Set whether the applet should hide itself when it loses focus.11description[en_CA] = Set whether the applet should hide itself when it loses focus.
1212
13[DEFAULT/global_hotkey]
14type = string
15default =
16description = Global hotkey used to activate the terminal.
17
13[DEFAULT/bg_img]18[DEFAULT/bg_img]
14type = string19type = string
15default = 20default =
1621
=== added file 'applets/maintained/awnterm/awn-terminal.vala'
--- applets/maintained/awnterm/awn-terminal.vala 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/awn-terminal.vala 2010-01-26 03:57:14 +0000
@@ -0,0 +1,631 @@
1/*
2 * Copyright (C) 2009 Michal Hruby <michal.mhr@gmail.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19
20using Gdk;
21using Gtk;
22using Awn;
23using DesktopAgnostic.Config;
24
25// only here so that config.h is before gi18n-lib.h
26private const string not_used = Build.APPLETSDIR;
27
28[DBus (name = "org.awnproject.Applet.Terminal")]
29public interface TerminalDBus : GLib.Object {
30 public abstract void toggle (uint32 time_) throws DBus.Error;
31}
32
33public class AwnTerminalApplet : AppletSimple, TerminalDBus
34{
35 private Client config;
36 private Menu menu;
37 private Awn.Dialog dialog;
38 private Gtk.Notebook notebook;
39 private Gtk.FileChooserButton chooser;
40 private Gtk.Image preview_image;
41 private Gtk.Window prefs_window;
42 private Gtk.ListStore model = null;
43
44 private int number_of_tabs;
45
46 private float _bg_opacity;
47 public float bg_opacity
48 {
49 get { return _bg_opacity; }
50 set { this._bg_opacity = value; this.dialog.set_opacity (value); }
51 }
52
53 public bool hide_on_unfocus
54 {
55 get { return this.dialog.hide_on_unfocus; }
56 set { this.dialog.hide_on_unfocus = value; }
57 }
58
59 private string _background_image = null;
60 public string background_image
61 {
62 get { return this._background_image; }
63 set
64 {
65 this._background_image = value;
66 for (int i = 0; i < this.notebook.get_n_pages (); i++)
67 {
68 Vte.Terminal term = this.notebook.get_nth_page (i) as Vte.Terminal;
69 term.set_background_image_file (value);
70 }
71 }
72 }
73
74 private string _keybinding = null;
75 public string keybinding
76 {
77 get { return _keybinding; }
78 set
79 {
80 debug ("keybinding: %s", value);
81 if (this._keybinding != null && this._keybinding.size () > 0)
82 {
83 // unbind
84 Awn.Keybinder.unbind (this._keybinding, this.global_keypress);
85 }
86 this._keybinding = value;
87 if (this._keybinding != null && this._keybinding.size () > 0)
88 {
89 // bind
90 Awn.Keybinder.bind (this._keybinding, this.global_keypress);
91 }
92
93 if (this.model != null)
94 {
95 Gtk.TreeIter iter;
96 if (this.model.get_iter_first (out iter))
97 {
98 this.model.set (iter, 1,
99 this._keybinding != null && this._keybinding.size () > 0 ?
100 this._keybinding : _ ("Disabled"));
101 }
102 }
103 }
104 }
105
106 private string _terminal_command = null;
107 public string terminal_command
108 {
109 get { return this._terminal_command; }
110 set { this._terminal_command = value; }
111 }
112
113 private TimeVal last_inactive_time;
114
115 public AwnTerminalApplet (string canonical_name, string uid, int panel_id)
116 {
117 this.canonical_name = canonical_name;
118 this.uid = uid;
119 this.panel_id = panel_id;
120 this.display_name = "Awn Terminal Applet";
121 }
122
123 construct
124 {
125 Awn.Keybinder.init ();
126 this.last_inactive_time = TimeVal ();
127 }
128
129 public override void
130 constructed ()
131 {
132 base.constructed ();
133
134 // set icon & tooltip
135 this.set_tooltip_text ("Awn Terminal");
136 this.set_icon_name ("terminal");
137
138 // connect applet signals
139 this.get_icon ().clicked.connect (this.clicked_cb);
140 this.get_icon ().middle_clicked.connect (this.middle_clicked_cb);
141 this.get_icon ().context_menu_popup.connect (this.on_context_menu_popup);
142
143 // construct dialog
144 this.dialog = new Awn.Dialog.for_widget (this);
145 this.dialog.set_skip_taskbar_hint (false);
146 this.number_of_tabs = 0;
147
148 Gtk.VBox box = new Gtk.VBox (true, 0);
149 this.dialog.add (box);
150
151 this.notebook = new Gtk.Notebook ();
152 this.notebook.set_tab_pos (Gtk.PositionType.TOP);
153 this.notebook.set_scrollable (true);
154 box.add (this.notebook);
155
156 this.create_new_tab ();
157
158 this.dialog.hide_on_unfocus = true;
159 this.dialog.hide_on_esc = false;
160
161 this.dialog.notify["is-active"].connect ((obj, pspec) =>
162 {
163 if ((obj as Awn.Dialog).is_active == false)
164 {
165 this.last_inactive_time.get_current_time ();
166 }
167 });
168
169 // bind config keys
170 this.config = Awn.Config.get_default_for_applet (this);
171 try
172 {
173 this.config.bind (GROUP_DEFAULT, "opacity",
174 this, "bg-opacity",
175 false, BindMethod.FALLBACK);
176 this.config.bind (GROUP_DEFAULT, "hide_on_unfocus",
177 this, "hide-on-unfocus",
178 false, BindMethod.FALLBACK);
179 this.config.bind (GROUP_DEFAULT, "global_hotkey",
180 this, "keybinding",
181 false, BindMethod.FALLBACK);
182 this.config.bind (GROUP_DEFAULT, "bg_img",
183 this, "background-image",
184 false, BindMethod.FALLBACK);
185 this.config.bind (GROUP_DEFAULT, "main_terminal",
186 this, "terminal-command",
187 false, BindMethod.FALLBACK);
188 }
189 catch (DesktopAgnostic.Config.Error err)
190 {
191 critical ("Config Error: %s", err.message);
192 }
193 }
194
195 private void
196 global_keypress (string keystring)
197 {
198 this.toggle (Awn.Keybinder.get_current_event_time ());
199 }
200
201 public void
202 toggle (uint32 time_)
203 {
204 WidgetFlags flags = this.dialog.get_flags () & WidgetFlags.VISIBLE;
205 bool should_hide = flags != 0;
206 if (should_hide)
207 {
208 // should it REALLY hide?
209 if (this.dialog.is_active)
210 {
211 should_hide = true;
212 }
213 else
214 {
215 should_hide = false;
216 TimeVal cur_time = TimeVal ();
217 long sec_diff = cur_time.tv_sec - this.last_inactive_time.tv_sec;
218 if (sec_diff <= 1)
219 {
220 long usec_diff = sec_diff * 1000000 + cur_time.tv_usec -
221 this.last_inactive_time.tv_usec;
222 if (usec_diff <= 250000) // one fourth of second
223 {
224 should_hide = true;
225 }
226 }
227 }
228 }
229 if (should_hide)
230 {
231 this.dialog.hide ();
232 }
233 else
234 {
235 this.dialog.show_all ();
236 this.dialog.present_with_time (time_);
237 }
238 }
239
240 private void
241 create_new_tab ()
242 {
243 Vte.Terminal terminal = new Vte.Terminal ();
244 terminal.set_emulation ("xterm");
245 terminal.fork_command (null, null, null, "~/", false, false, false);
246 if (this._background_image != null)
247 {
248 terminal.set_background_image_file (this._background_image);
249 }
250
251 this.number_of_tabs++;
252
253 Gtk.Label label = new Gtk.Label ("Term #%d".printf (this.number_of_tabs));
254 this.notebook.append_page (terminal, label);
255 if (this.notebook.get_n_pages () > 1)
256 {
257 this.notebook.set_show_tabs (true);
258 this.dialog.show_all ();
259 }
260 else
261 {
262 this.notebook.set_show_tabs (false);
263 }
264
265 Signal.connect_swapped (terminal, "child-exited",
266 (GLib.Callback)this.exited_cb, this);
267 Signal.connect_swapped (terminal, "key-press-event",
268 (GLib.Callback)this.key_press_cb, this);
269 }
270
271 private void
272 clicked_cb ()
273 {
274 WidgetFlags flags = this.dialog.get_flags () & WidgetFlags.VISIBLE;
275 if (flags != 0)
276 {
277 this.dialog.hide ();
278 }
279 else
280 {
281 this.dialog.show_all ();
282 }
283 }
284
285 private void
286 middle_clicked_cb ()
287 {
288 string terminal = this._terminal_command;
289 try
290 {
291 if (terminal == null || terminal.size () == 0)
292 {
293 terminal = "gnome-terminal";
294 }
295 Gdk.spawn_command_line_on_screen (this.get_screen (), terminal);
296 }
297 catch
298 {
299 warning ("Unable to run '%s'!", terminal);
300 }
301 }
302
303 private bool
304 key_press_cb (Gdk.EventKey event, Vte.Terminal terminal)
305 {
306 Gdk.ModifierType mods = (Gdk.ModifierType) event.state;
307 Gdk.ModifierType is_ctrl = mods & Gdk.ModifierType.CONTROL_MASK;
308 Gdk.ModifierType is_shift = mods & Gdk.ModifierType.SHIFT_MASK;
309 if (is_ctrl != 0 && is_shift != 0)
310 {
311 unowned string key = Gdk.keyval_name (Gdk.keyval_to_lower (event.keyval));
312 if (key == "c")
313 {
314 terminal.copy_clipboard ();
315 }
316 else if (key == "v")
317 {
318 terminal.paste_clipboard ();
319 }
320 else if (key == "t")
321 {
322 this.create_new_tab ();
323 this.notebook.set_current_page (this.notebook.get_n_pages () - 1);
324 }
325
326 return true;
327 }
328 else if (is_ctrl != 0)
329 {
330 unowned string key = Gdk.keyval_name (Gdk.keyval_to_lower (event.keyval));
331 if (key == "Page_Up")
332 {
333 int page = this.notebook.get_current_page () - 1;
334 page = page % this.notebook.get_n_pages ();
335 this.notebook.set_current_page (page);
336 return true;
337 }
338 else if (key == "Page_Down")
339 {
340 int page = this.notebook.get_current_page () + 1;
341 page = page % this.notebook.get_n_pages ();
342 this.notebook.set_current_page (page);
343 return true;
344 }
345 }
346 return false;
347 }
348
349 private void
350 exited_cb (Vte.Terminal terminal)
351 {
352 int pages = this.notebook.get_n_pages ();
353 if (pages > 1)
354 {
355 int page = this.notebook.get_current_page ();
356 this.notebook.remove_page (page);
357
358 if (pages == 2)
359 {
360 this.notebook.set_show_tabs (false);
361 }
362 this.dialog.show_all ();
363 }
364 else
365 {
366 // clear everything
367 terminal.reset (true, true);
368 // fork new terminal
369 terminal.fork_command (null, null, null, "~/", false, false, false);
370
371 this.dialog.hide ();
372 }
373 }
374
375 private void
376 on_context_menu_popup (EventButton evt)
377 {
378 if (this.menu == null)
379 {
380 ImageMenuItem prefs_item;
381 Widget about_item;
382
383 this.menu = this.create_default_menu () as Menu;
384
385 prefs_item = new ImageMenuItem.from_stock (STOCK_PREFERENCES, null);
386 prefs_item.activate.connect (this.on_prefs_activate);
387 prefs_item.show ();
388 this.menu.append (prefs_item);
389 about_item =
390 this.create_about_item_simple ("Copyright © 2009 Michal Hruby" +
391 "<michal.mhr@gmail.com>",
392 AppletLicense.GPLV2, Build.VERSION);
393 about_item.show ();
394 this.menu.append (about_item as MenuItem);
395 }
396 this.menu.set_screen (null);
397 this.menu.popup (null, null, null, evt.button, evt.time);
398 }
399
400 private void
401 on_prefs_activate ()
402 {
403 if (this.prefs_window != null)
404 {
405 this.prefs_window.show_all ();
406 return;
407 }
408
409 this.prefs_window = new Gtk.Window (Gtk.WindowType.TOPLEVEL);
410 this.prefs_window.set_title (_ ("Preferences"));
411 this.prefs_window.set_default_icon_name ("terminal");
412 this.prefs_window.set_border_width (6);
413
414 this.prefs_window.delete_event.connect ((w, e) =>
415 {
416 w.hide ();
417 return true;
418 });
419
420 // main box
421 Gtk.Box box = new Gtk.VBox (false, 6);
422 this.prefs_window.add (box);
423
424 Gtk.Widget widget = new Gtk.Label ("");
425 (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Behavior")));
426 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
427 box.pack_start (widget, false, false, 0);
428
429 Gtk.Alignment align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
430 align.set_padding (0, 0, 10, 0);
431 box.pack_start (align, false, false, 0);
432
433 Gtk.Box box2 = new Gtk.VBox (false, 6);
434 align.add (box2);
435
436 // focus out behavior checkbox
437 widget = new Gtk.CheckButton.with_label (_ ("Hide when focus is lost"));
438 (widget as CheckButton).set_active (this.hide_on_unfocus);
439 (widget as CheckButton).toggled.connect ((w) =>
440 {
441 this.hide_on_unfocus = w.get_active ();
442 });
443
444 box2.pack_start (widget, false, false, 0);
445
446 // keybinding treeview
447 Gtk.CellRenderer ren;
448 Gtk.TreeViewColumn col;
449
450 Gtk.TreeView treeview = new Gtk.TreeView ();
451 box2.pack_start (treeview, false, false, 0);
452 this.model = new Gtk.ListStore (2, typeof (string), typeof (string));
453 treeview.set_model (this.model);
454
455 ren = new CellRendererText ();
456 col = new TreeViewColumn.with_attributes (_ ("Action"), ren, "text", 0);
457 treeview.append_column (col);
458
459 ren = new CellRendererAccel ();
460 (ren as CellRendererAccel).editable = true;
461 (ren as CellRendererAccel).accel_mode = Gtk.CellRendererAccelMode.OTHER;
462 (ren as CellRendererAccel).accel_edited.connect (
463 (a, path, accel_key, accel_mods, keycode) =>
464 {
465 uint key;
466 Awn.Keybinder.Egg.VirtualModifierType virt_mods;
467
468 Awn.Keybinder.Egg.keymap_virtualize_modifiers (Gdk.Keymap.get_default (), accel_mods, out virt_mods);
469 this.keybinding = Awn.Keybinder.Egg.virtual_accelerator_name (accel_key, virt_mods);
470 });
471 (ren as CellRendererAccel).accel_cleared.connect (
472 (a, path) =>
473 {
474 this.keybinding = "";
475 });
476 col = new TreeViewColumn.with_attributes (_ ("Shortcut"), ren, "text",1);
477 treeview.append_column (col);
478
479 // add the actual item
480 Gtk.TreeIter iter;
481 this.model.append (out iter);
482 this.model.set (iter, 0, _ ("Activate"));
483 // this will set the keybinding in the model
484 this.keybinding = this._keybinding;
485
486 // background image section
487 Gtk.Box section_box = new Gtk.VBox (false, 0);
488 box.pack_start (section_box, false, false, 0);
489
490 widget = new Gtk.Label ("");
491 (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Background image")));
492 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
493 section_box.pack_start (widget, false, false, 0);
494
495 align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
496 align.set_padding (0, 0, 10, 0);
497 section_box.pack_start (align, false, false, 0);
498
499 box2 = new Gtk.HBox (false, 3);
500 align.add (box2);
501
502 this.preview_image = new Gtk.Image ();
503 this.chooser = new Gtk.FileChooserButton (_ ("Select a file"),
504 Gtk.FileChooserAction.OPEN);
505 this.chooser.set_filename (this.background_image);
506 this.chooser.set_preview_widget (this.preview_image);
507 this.chooser.set_size_request (200, -1);
508
509 this.chooser.file_set.connect ((w) =>
510 {
511 this.background_image = w.get_filename ();
512 });
513
514 this.chooser.update_preview.connect ((w) =>
515 {
516 string filename = w.get_preview_filename ();
517 try
518 {
519 Gdk.Pixbuf? pixbuf = new Gdk.Pixbuf.from_file_at_size (filename, 128, 128);
520 this.preview_image.set_from_pixbuf (pixbuf);
521 w.set_preview_widget_active (true);
522 }
523 catch
524 {
525 w.set_preview_widget_active (false);
526 }
527 });
528
529 box2.pack_start (this.chooser, true, true, 0);
530
531 Gtk.Widget button = new Gtk.Button.from_stock (Gtk.STOCK_CLEAR);
532 (button as Gtk.Button).clicked.connect ((b) =>
533 {
534 this.chooser.set_filename ("");
535 this.background_image = "";
536 });
537
538 box2.pack_start (button, false, false, 0);
539
540 // opacity section
541 section_box = new Gtk.VBox (false, 0);
542 box.pack_start (section_box, false, false, 0);
543
544 widget = new Gtk.Label ("");
545 (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("Terminal opacity")));
546 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
547 section_box.pack_start (widget, false, false, 3);
548
549 align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
550 align.set_padding (0, 0, 10, 0);
551 section_box.pack_start (align, false, false, 0);
552
553 widget = new Gtk.HScale.with_range (0.1f, 1.0f, 0.1f);
554 (widget as Gtk.Range).set_value (this._bg_opacity);
555 (widget as Gtk.Scale).value_changed.connect ((w) =>
556 {
557 this.bg_opacity = (float)w.get_value ();
558 });
559 /* bug in Vala's Gtk bindings format-value declared as unowned string
560 (widget as Gtk.Scale).format_value.connect ((w, v) =>
561 {
562 return "%d%%".printf ((int) GLib.Math.rint (v*100.0));
563 });
564 */
565 align.add (widget);
566
567 // external terminal command section
568 section_box = new Gtk.VBox (false, 0);
569 box.pack_start (section_box, false, false, 0);
570
571 widget = new Gtk.Label ("");
572 (widget as Gtk.Label).set_markup ("<b>%s</b>".printf (_ ("External Terminal")));
573 (widget as Gtk.Label).set_alignment (0.0f, 0.5f);
574 section_box.pack_start (widget, false, false, 3);
575
576 align = new Gtk.Alignment (0.5f, 0.5f, 1.0f, 0.0f);
577 align.set_padding (0, 0, 10, 0);
578 section_box.pack_start (align, false, false, 0);
579
580 widget = new Gtk.Entry ();
581 (widget as Gtk.Entry).set_text (this.terminal_command);
582 (widget as Gtk.Entry).focus_out_event.connect ((w, e) =>
583 {
584 this.terminal_command = (w as Gtk.Entry).get_text ();
585 });
586 align.add (widget);
587
588 // close button
589 box2 = new Gtk.HButtonBox ();
590 (box2 as Gtk.ButtonBox).set_layout (Gtk.ButtonBoxStyle.END);
591 box.pack_end (box2, false, false, 0);
592
593 widget = new Gtk.Button.from_stock (Gtk.STOCK_CLOSE);
594 box2.pack_start (widget, false, false, 0);
595 (widget as Gtk.Button).clicked.connect ((w) =>
596 {
597 this.prefs_window.hide ();
598 });
599
600 this.prefs_window.show_all ();
601 }
602}
603
604public Applet
605awn_applet_factory_initp (string canonical_name, string uid, int panel_id)
606{
607 Intl.setlocale (LocaleCategory.ALL, "");
608 Gettext.bindtextdomain (Build.GETTEXT_PACKAGE, Build.LOCALEDIR);
609 Gettext.textdomain (Build.GETTEXT_PACKAGE);
610
611 var conn = DBus.Bus.get (DBus.BusType.SESSION);
612 dynamic DBus.Object bus = conn.get_object ("org.freedesktop.DBus",
613 "/org/freedesktop/DBus",
614 "org.freedesktop.DBus");
615
616 // try to register service in session bus
617 uint result = bus.request_name ("org.awnproject.Applet.Terminal", (uint) 0);
618 if (result != DBus.RequestNameReply.PRIMARY_OWNER)
619 {
620 warning ("Coudln't get ownership of org.awnproject.Applet.Terminal!");
621 }
622
623 AwnTerminalApplet applet = new AwnTerminalApplet (canonical_name,
624 uid, panel_id);
625
626 conn.register_object ("/org/awnproject/Applet/Terminal", applet);
627
628 return applet;
629}
630
631// vim: set ft=vala et ts=2 sts=2 sw=2 ai :
0632
=== modified file 'applets/maintained/awnterm/awnterm.desktop.in.in'
--- src/awnterm/awnterm.desktop.in.in 2008-07-04 18:22:52 +0000
+++ applets/maintained/awnterm/awnterm.desktop.in.in 2010-01-26 03:57:14 +0000
@@ -1,8 +1,10 @@
1[Desktop Entry]1[Desktop Entry]
2Type=Application2Type=Application
3X-AWN-Type=Applet
3X-AWN-AppletType=C4X-AWN-AppletType=C
4Name=Awn Terminal Applet5_Name=Terminal Applet
5Comment=A simple popup terminal6_Comment=A simple popup terminal
6Exec=@LIBDIR@/awn/applets/awnterm/awnterm.so7Exec=awn-applet -p %k
8X-AWN-AppletExec=@LIBDIR@/awn/applets/awnterm/awnterm.so
7Icon=terminal9Icon=terminal
8X-AWN-AppletCategory=System,TerminalEmulator10X-AWN-AppletCategory=System,TerminalEmulator
911
=== added file 'applets/maintained/awnterm/eggaccelerators.c'
--- applets/maintained/awnterm/eggaccelerators.c 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/eggaccelerators.c 2010-01-26 03:57:14 +0000
@@ -0,0 +1,657 @@
1/* eggaccelerators.c
2 * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik
3 * Developed by Havoc Pennington, Tim Janik
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21#include "eggaccelerators.h"
22
23#include <string.h>
24#include <gdk/gdkx.h>
25#include <gdk/gdkkeysyms.h>
26
27enum
28{
29 EGG_MODMAP_ENTRY_SHIFT = 0,
30 EGG_MODMAP_ENTRY_LOCK = 1,
31 EGG_MODMAP_ENTRY_CONTROL = 2,
32 EGG_MODMAP_ENTRY_MOD1 = 3,
33 EGG_MODMAP_ENTRY_MOD2 = 4,
34 EGG_MODMAP_ENTRY_MOD3 = 5,
35 EGG_MODMAP_ENTRY_MOD4 = 6,
36 EGG_MODMAP_ENTRY_MOD5 = 7,
37 EGG_MODMAP_ENTRY_LAST = 8
38};
39
40#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x))
41
42typedef struct
43{
44 EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST];
45
46} EggModmap;
47
48const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
49
50static inline gboolean
51is_alt (const gchar *string)
52{
53 return ((string[0] == '<') &&
54 (string[1] == 'a' || string[1] == 'A') &&
55 (string[2] == 'l' || string[2] == 'L') &&
56 (string[3] == 't' || string[3] == 'T') &&
57 (string[4] == '>'));
58}
59
60static inline gboolean
61is_ctl (const gchar *string)
62{
63 return ((string[0] == '<') &&
64 (string[1] == 'c' || string[1] == 'C') &&
65 (string[2] == 't' || string[2] == 'T') &&
66 (string[3] == 'l' || string[3] == 'L') &&
67 (string[4] == '>'));
68}
69
70static inline gboolean
71is_modx (const gchar *string)
72{
73 return ((string[0] == '<') &&
74 (string[1] == 'm' || string[1] == 'M') &&
75 (string[2] == 'o' || string[2] == 'O') &&
76 (string[3] == 'd' || string[3] == 'D') &&
77 (string[4] >= '1' && string[4] <= '5') &&
78 (string[5] == '>'));
79}
80
81static inline gboolean
82is_ctrl (const gchar *string)
83{
84 return ((string[0] == '<') &&
85 (string[1] == 'c' || string[1] == 'C') &&
86 (string[2] == 't' || string[2] == 'T') &&
87 (string[3] == 'r' || string[3] == 'R') &&
88 (string[4] == 'l' || string[4] == 'L') &&
89 (string[5] == '>'));
90}
91
92static inline gboolean
93is_shft (const gchar *string)
94{
95 return ((string[0] == '<') &&
96 (string[1] == 's' || string[1] == 'S') &&
97 (string[2] == 'h' || string[2] == 'H') &&
98 (string[3] == 'f' || string[3] == 'F') &&
99 (string[4] == 't' || string[4] == 'T') &&
100 (string[5] == '>'));
101}
102
103static inline gboolean
104is_shift (const gchar *string)
105{
106 return ((string[0] == '<') &&
107 (string[1] == 's' || string[1] == 'S') &&
108 (string[2] == 'h' || string[2] == 'H') &&
109 (string[3] == 'i' || string[3] == 'I') &&
110 (string[4] == 'f' || string[4] == 'F') &&
111 (string[5] == 't' || string[5] == 'T') &&
112 (string[6] == '>'));
113}
114
115static inline gboolean
116is_control (const gchar *string)
117{
118 return ((string[0] == '<') &&
119 (string[1] == 'c' || string[1] == 'C') &&
120 (string[2] == 'o' || string[2] == 'O') &&
121 (string[3] == 'n' || string[3] == 'N') &&
122 (string[4] == 't' || string[4] == 'T') &&
123 (string[5] == 'r' || string[5] == 'R') &&
124 (string[6] == 'o' || string[6] == 'O') &&
125 (string[7] == 'l' || string[7] == 'L') &&
126 (string[8] == '>'));
127}
128
129static inline gboolean
130is_release (const gchar *string)
131{
132 return ((string[0] == '<') &&
133 (string[1] == 'r' || string[1] == 'R') &&
134 (string[2] == 'e' || string[2] == 'E') &&
135 (string[3] == 'l' || string[3] == 'L') &&
136 (string[4] == 'e' || string[4] == 'E') &&
137 (string[5] == 'a' || string[5] == 'A') &&
138 (string[6] == 's' || string[6] == 'S') &&
139 (string[7] == 'e' || string[7] == 'E') &&
140 (string[8] == '>'));
141}
142
143static inline gboolean
144is_meta (const gchar *string)
145{
146 return ((string[0] == '<') &&
147 (string[1] == 'm' || string[1] == 'M') &&
148 (string[2] == 'e' || string[2] == 'E') &&
149 (string[3] == 't' || string[3] == 'T') &&
150 (string[4] == 'a' || string[4] == 'A') &&
151 (string[5] == '>'));
152}
153
154static inline gboolean
155is_super (const gchar *string)
156{
157 return ((string[0] == '<') &&
158 (string[1] == 's' || string[1] == 'S') &&
159 (string[2] == 'u' || string[2] == 'U') &&
160 (string[3] == 'p' || string[3] == 'P') &&
161 (string[4] == 'e' || string[4] == 'E') &&
162 (string[5] == 'r' || string[5] == 'R') &&
163 (string[6] == '>'));
164}
165
166static inline gboolean
167is_hyper (const gchar *string)
168{
169 return ((string[0] == '<') &&
170 (string[1] == 'h' || string[1] == 'H') &&
171 (string[2] == 'y' || string[2] == 'Y') &&
172 (string[3] == 'p' || string[3] == 'P') &&
173 (string[4] == 'e' || string[4] == 'E') &&
174 (string[5] == 'r' || string[5] == 'R') &&
175 (string[6] == '>'));
176}
177
178/**
179 * egg_accelerator_parse_virtual:
180 * @accelerator: string representing an accelerator
181 * @accelerator_key: return location for accelerator keyval
182 * @accelerator_mods: return location for accelerator modifier mask
183 *
184 * Parses a string representing a virtual accelerator. The format
185 * looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
186 * "&lt;Release&gt;z" (the last one is for key release). The parser
187 * is fairly liberal and allows lower or upper case, and also
188 * abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
189 *
190 * If the parse fails, @accelerator_key and @accelerator_mods will
191 * be set to 0 (zero) and %FALSE will be returned. If the string contains
192 * only modifiers, @accelerator_key will be set to 0 but %TRUE will be
193 * returned.
194 *
195 * The virtual vs. concrete accelerator distinction is a relic of
196 * how the X Window System works; there are modifiers Mod2-Mod5 that
197 * can represent various keyboard keys (numlock, meta, hyper, etc.),
198 * the virtual modifier represents the keyboard key, the concrete
199 * modifier the actual Mod2-Mod5 bits in the key press event.
200 *
201 * Returns: %TRUE on success.
202 */
203gboolean
204egg_accelerator_parse_virtual (const gchar *accelerator,
205 guint *accelerator_key,
206 EggVirtualModifierType *accelerator_mods)
207{
208 guint keyval;
209 GdkModifierType mods;
210 gint len;
211 gboolean bad_keyval;
212
213 if (accelerator_key)
214 *accelerator_key = 0;
215 if (accelerator_mods)
216 *accelerator_mods = 0;
217
218 g_return_val_if_fail (accelerator != NULL, FALSE);
219
220 bad_keyval = FALSE;
221
222 keyval = 0;
223 mods = 0;
224 len = strlen (accelerator);
225 while (len)
226 {
227 if (*accelerator == '<')
228 {
229 if (len >= 9 && is_release (accelerator))
230 {
231 accelerator += 9;
232 len -= 9;
233 mods |= EGG_VIRTUAL_RELEASE_MASK;
234 }
235 else if (len >= 9 && is_control (accelerator))
236 {
237 accelerator += 9;
238 len -= 9;
239 mods |= EGG_VIRTUAL_CONTROL_MASK;
240 }
241 else if (len >= 7 && is_shift (accelerator))
242 {
243 accelerator += 7;
244 len -= 7;
245 mods |= EGG_VIRTUAL_SHIFT_MASK;
246 }
247 else if (len >= 6 && is_shft (accelerator))
248 {
249 accelerator += 6;
250 len -= 6;
251 mods |= EGG_VIRTUAL_SHIFT_MASK;
252 }
253 else if (len >= 6 && is_ctrl (accelerator))
254 {
255 accelerator += 6;
256 len -= 6;
257 mods |= EGG_VIRTUAL_CONTROL_MASK;
258 }
259 else if (len >= 6 && is_modx (accelerator))
260 {
261 static const guint mod_vals[] = {
262 EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK,
263 EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK
264 };
265
266 len -= 6;
267 accelerator += 4;
268 mods |= mod_vals[*accelerator - '1'];
269 accelerator += 2;
270 }
271 else if (len >= 5 && is_ctl (accelerator))
272 {
273 accelerator += 5;
274 len -= 5;
275 mods |= EGG_VIRTUAL_CONTROL_MASK;
276 }
277 else if (len >= 5 && is_alt (accelerator))
278 {
279 accelerator += 5;
280 len -= 5;
281 mods |= EGG_VIRTUAL_ALT_MASK;
282 }
283 else if (len >= 6 && is_meta (accelerator))
284 {
285 accelerator += 6;
286 len -= 6;
287 mods |= EGG_VIRTUAL_META_MASK;
288 }
289 else if (len >= 7 && is_hyper (accelerator))
290 {
291 accelerator += 7;
292 len -= 7;
293 mods |= EGG_VIRTUAL_HYPER_MASK;
294 }
295 else if (len >= 7 && is_super (accelerator))
296 {
297 accelerator += 7;
298 len -= 7;
299 mods |= EGG_VIRTUAL_SUPER_MASK;
300 }
301 else
302 {
303 gchar last_ch;
304
305 last_ch = *accelerator;
306 while (last_ch && last_ch != '>')
307 {
308 last_ch = *accelerator;
309 accelerator += 1;
310 len -= 1;
311 }
312 }
313 }
314 else
315 {
316 keyval = gdk_keyval_from_name (accelerator);
317
318 if (keyval == 0)
319 bad_keyval = TRUE;
320
321 accelerator += len;
322 len -= len;
323 }
324 }
325
326 if (accelerator_key)
327 *accelerator_key = gdk_keyval_to_lower (keyval);
328 if (accelerator_mods)
329 *accelerator_mods = mods;
330
331 return !bad_keyval;
332}
333
334
335/**
336 * egg_virtual_accelerator_name:
337 * @accelerator_key: accelerator keyval
338 * @accelerator_mods: accelerator modifier mask
339 * @returns: a newly-allocated accelerator name
340 *
341 * Converts an accelerator keyval and modifier mask
342 * into a string parseable by egg_accelerator_parse_virtual().
343 * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK,
344 * this function returns "&lt;Control&gt;q".
345 *
346 * The caller of this function must free the returned string.
347 */
348gchar*
349egg_virtual_accelerator_name (guint accelerator_key,
350 EggVirtualModifierType accelerator_mods)
351{
352 static const gchar text_release[] = "<Release>";
353 static const gchar text_shift[] = "<Shift>";
354 static const gchar text_control[] = "<Control>";
355 static const gchar text_mod1[] = "<Alt>";
356 static const gchar text_mod2[] = "<Mod2>";
357 static const gchar text_mod3[] = "<Mod3>";
358 static const gchar text_mod4[] = "<Mod4>";
359 static const gchar text_mod5[] = "<Mod5>";
360 static const gchar text_meta[] = "<Meta>";
361 static const gchar text_super[] = "<Super>";
362 static const gchar text_hyper[] = "<Hyper>";
363 guint l;
364 gchar *keyval_name;
365 gchar *accelerator;
366
367 accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK;
368
369 keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
370 if (!keyval_name)
371 keyval_name = "";
372
373 l = 0;
374 if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
375 l += sizeof (text_release) - 1;
376 if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
377 l += sizeof (text_shift) - 1;
378 if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
379 l += sizeof (text_control) - 1;
380 if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
381 l += sizeof (text_mod1) - 1;
382 if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
383 l += sizeof (text_mod2) - 1;
384 if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
385 l += sizeof (text_mod3) - 1;
386 if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
387 l += sizeof (text_mod4) - 1;
388 if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
389 l += sizeof (text_mod5) - 1;
390 if (accelerator_mods & EGG_VIRTUAL_META_MASK)
391 l += sizeof (text_meta) - 1;
392 if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
393 l += sizeof (text_hyper) - 1;
394 if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
395 l += sizeof (text_super) - 1;
396 l += strlen (keyval_name);
397
398 accelerator = g_new (gchar, l + 1);
399
400 l = 0;
401 accelerator[l] = 0;
402 if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
403 {
404 strcpy (accelerator + l, text_release);
405 l += sizeof (text_release) - 1;
406 }
407 if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
408 {
409 strcpy (accelerator + l, text_shift);
410 l += sizeof (text_shift) - 1;
411 }
412 if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
413 {
414 strcpy (accelerator + l, text_control);
415 l += sizeof (text_control) - 1;
416 }
417 if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
418 {
419 strcpy (accelerator + l, text_mod1);
420 l += sizeof (text_mod1) - 1;
421 }
422 if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
423 {
424 strcpy (accelerator + l, text_mod2);
425 l += sizeof (text_mod2) - 1;
426 }
427 if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
428 {
429 strcpy (accelerator + l, text_mod3);
430 l += sizeof (text_mod3) - 1;
431 }
432 if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
433 {
434 strcpy (accelerator + l, text_mod4);
435 l += sizeof (text_mod4) - 1;
436 }
437 if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
438 {
439 strcpy (accelerator + l, text_mod5);
440 l += sizeof (text_mod5) - 1;
441 }
442 if (accelerator_mods & EGG_VIRTUAL_META_MASK)
443 {
444 strcpy (accelerator + l, text_meta);
445 l += sizeof (text_meta) - 1;
446 }
447 if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
448 {
449 strcpy (accelerator + l, text_hyper);
450 l += sizeof (text_hyper) - 1;
451 }
452 if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
453 {
454 strcpy (accelerator + l, text_super);
455 l += sizeof (text_super) - 1;
456 }
457
458 strcpy (accelerator + l, keyval_name);
459
460 return accelerator;
461}
462
463void
464egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
465 EggVirtualModifierType virtual_mods,
466 GdkModifierType *concrete_mods)
467{
468 GdkModifierType concrete;
469 int i;
470 const EggModmap *modmap;
471
472 g_return_if_fail (GDK_IS_KEYMAP (keymap));
473 g_return_if_fail (concrete_mods != NULL);
474
475 modmap = egg_keymap_get_modmap (keymap);
476
477 /* Not so sure about this algorithm. */
478
479 concrete = 0;
480 i = 0;
481 while (i < EGG_MODMAP_ENTRY_LAST)
482 {
483 if (modmap->mapping[i] & virtual_mods)
484 concrete |= (1 << i);
485
486 ++i;
487 }
488
489 *concrete_mods = concrete;
490}
491
492void
493egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
494 GdkModifierType concrete_mods,
495 EggVirtualModifierType *virtual_mods)
496{
497 GdkModifierType virtual;
498 int i;
499 const EggModmap *modmap;
500
501 g_return_if_fail (GDK_IS_KEYMAP (keymap));
502 g_return_if_fail (virtual_mods != NULL);
503
504 modmap = egg_keymap_get_modmap (keymap);
505
506 /* Not so sure about this algorithm. */
507
508 virtual = 0;
509 i = 0;
510 while (i < EGG_MODMAP_ENTRY_LAST)
511 {
512 if ((1 << i) & concrete_mods)
513 {
514 EggVirtualModifierType cleaned;
515
516 cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK |
517 EGG_VIRTUAL_MOD3_MASK |
518 EGG_VIRTUAL_MOD4_MASK |
519 EGG_VIRTUAL_MOD5_MASK);
520
521 if (cleaned != 0)
522 {
523 virtual |= cleaned;
524 }
525 else
526 {
527 /* Rather than dropping mod2->mod5 if not bound,
528 * go ahead and use the concrete names
529 */
530 virtual |= modmap->mapping[i];
531 }
532 }
533
534 ++i;
535 }
536
537 *virtual_mods = virtual;
538}
539
540static void
541reload_modmap (GdkKeymap *keymap,
542 EggModmap *modmap)
543{
544 XModifierKeymap *xmodmap;
545 int map_size;
546 int i;
547
548 /* FIXME multihead */
549 xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
550
551 memset (modmap->mapping, 0, sizeof (modmap->mapping));
552
553 /* there are 8 modifiers, and the first 3 are shift, shift lock,
554 * and control
555 */
556 map_size = 8 * xmodmap->max_keypermod;
557 i = 3 * xmodmap->max_keypermod;
558 while (i < map_size)
559 {
560 /* get the key code at this point in the map,
561 * see if its keysym is one we're interested in
562 */
563 int keycode = xmodmap->modifiermap[i];
564 GdkKeymapKey *keys;
565 guint *keyvals;
566 int n_entries;
567 int j;
568 EggVirtualModifierType mask;
569
570 keys = NULL;
571 keyvals = NULL;
572 n_entries = 0;
573
574 gdk_keymap_get_entries_for_keycode (keymap,
575 keycode,
576 &keys, &keyvals, &n_entries);
577
578 mask = 0;
579 j = 0;
580 while (j < n_entries)
581 {
582 if (keyvals[j] == GDK_Num_Lock)
583 mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
584 else if (keyvals[j] == GDK_Scroll_Lock)
585 mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
586 else if (keyvals[j] == GDK_Meta_L ||
587 keyvals[j] == GDK_Meta_R)
588 mask |= EGG_VIRTUAL_META_MASK;
589 else if (keyvals[j] == GDK_Hyper_L ||
590 keyvals[j] == GDK_Hyper_R)
591 mask |= EGG_VIRTUAL_HYPER_MASK;
592 else if (keyvals[j] == GDK_Super_L ||
593 keyvals[j] == GDK_Super_R)
594 mask |= EGG_VIRTUAL_SUPER_MASK;
595 else if (keyvals[j] == GDK_Mode_switch)
596 mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
597
598 ++j;
599 }
600
601 /* Mod1Mask is 1 << 3 for example, i.e. the
602 * fourth modifier, i / keyspermod is the modifier
603 * index
604 */
605 modmap->mapping[i/xmodmap->max_keypermod] |= mask;
606
607 g_free (keyvals);
608 g_free (keys);
609
610 ++i;
611 }
612
613 /* Add in the not-really-virtual fixed entries */
614 modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK;
615 modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK;
616 modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK;
617 modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK;
618 modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK;
619 modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK;
620 modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK;
621 modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK;
622
623 XFreeModifiermap (xmodmap);
624}
625
626const EggModmap*
627egg_keymap_get_modmap (GdkKeymap *keymap)
628{
629 EggModmap *modmap;
630
631 /* This is all a hack, much simpler when we can just
632 * modify GDK directly.
633 */
634
635 modmap = g_object_get_data (G_OBJECT (keymap),
636 "egg-modmap");
637
638 if (modmap == NULL)
639 {
640 modmap = g_new0 (EggModmap, 1);
641
642 /* FIXME modify keymap change events with an event filter
643 * and force a reload if we get one
644 */
645
646 reload_modmap (keymap, modmap);
647
648 g_object_set_data_full (G_OBJECT (keymap),
649 "egg-modmap",
650 modmap,
651 g_free);
652 }
653
654 g_assert (modmap != NULL);
655
656 return modmap;
657}
0658
=== added file 'applets/maintained/awnterm/eggaccelerators.h'
--- applets/maintained/awnterm/eggaccelerators.h 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/eggaccelerators.h 2010-01-26 03:57:14 +0000
@@ -0,0 +1,87 @@
1/* eggaccelerators.h
2 * Copyright (C) 2002 Red Hat, Inc.
3 * Developed by Havoc Pennington
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21#ifndef __EGG_ACCELERATORS_H__
22#define __EGG_ACCELERATORS_H__
23
24#include <gtk/gtkaccelgroup.h>
25#include <gdk/gdk.h>
26
27G_BEGIN_DECLS
28
29/* Where a value is also in GdkModifierType we coincide,
30 * otherwise we don't overlap.
31 */
32typedef enum
33{
34 EGG_VIRTUAL_SHIFT_MASK = 1 << 0,
35 EGG_VIRTUAL_LOCK_MASK = 1 << 1,
36 EGG_VIRTUAL_CONTROL_MASK = 1 << 2,
37
38 EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */
39
40 EGG_VIRTUAL_MOD2_MASK = 1 << 4,
41 EGG_VIRTUAL_MOD3_MASK = 1 << 5,
42 EGG_VIRTUAL_MOD4_MASK = 1 << 6,
43 EGG_VIRTUAL_MOD5_MASK = 1 << 7,
44
45#if 0
46 GDK_BUTTON1_MASK = 1 << 8,
47 GDK_BUTTON2_MASK = 1 << 9,
48 GDK_BUTTON3_MASK = 1 << 10,
49 GDK_BUTTON4_MASK = 1 << 11,
50 GDK_BUTTON5_MASK = 1 << 12,
51 /* 13, 14 are used by Xkb for the keyboard group */
52#endif
53
54 EGG_VIRTUAL_META_MASK = 1 << 24,
55 EGG_VIRTUAL_SUPER_MASK = 1 << 25,
56 EGG_VIRTUAL_HYPER_MASK = 1 << 26,
57 EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27,
58 EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
59 EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
60
61 /* Also in GdkModifierType */
62 EGG_VIRTUAL_RELEASE_MASK = 1 << 30,
63
64 /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
65 * 7 f 0 0 0 0 f f
66 */
67 EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
68
69} EggVirtualModifierType;
70
71gboolean egg_accelerator_parse_virtual (const gchar *accelerator,
72 guint *accelerator_key,
73 EggVirtualModifierType *accelerator_mods);
74void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
75 EggVirtualModifierType virtual_mods,
76 GdkModifierType *concrete_mods);
77void egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
78 GdkModifierType concrete_mods,
79 EggVirtualModifierType *virtual_mods);
80
81gchar* egg_virtual_accelerator_name (guint accelerator_key,
82 EggVirtualModifierType accelerator_mods);
83
84G_END_DECLS
85
86
87#endif /* __EGG_ACCELERATORS_H__ */
088
=== added file 'applets/maintained/awnterm/keybinder.c'
--- applets/maintained/awnterm/keybinder.c 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/keybinder.c 2010-01-26 03:57:14 +0000
@@ -0,0 +1,349 @@
1//
2// This file comes from the Tomboy project.
3// http://www.gnome.org/projects/tomboy/
4//
5/*
6 * Copyright (C) 2004-2007 Alex Graveley
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
22 */
23
24#include <string.h>
25
26#include <gdk/gdk.h>
27#include <gdk/gdkwindow.h>
28#include <gdk/gdkx.h>
29#include <X11/Xlib.h>
30
31#include "eggaccelerators.h"
32#include "keybinder.h"
33
34/* Uncomment the next line to print a debug trace. */
35/* #define DEBUG */
36
37#ifdef DEBUG
38# define TRACE(x) x
39#else
40# define TRACE(x) do {} while (FALSE);
41#endif
42
43typedef struct _Binding {
44 AwnBindkeyHandler handler;
45 gpointer user_data;
46 char *keystring;
47 uint keycode;
48 uint modifiers;
49} Binding;
50
51static GSList *bindings = NULL;
52static guint32 last_event_time = 0;
53static gboolean processing_event = FALSE;
54
55static guint num_lock_mask, caps_lock_mask, scroll_lock_mask;
56
57static void
58lookup_ignorable_modifiers (GdkKeymap *keymap)
59{
60 egg_keymap_resolve_virtual_modifiers (keymap,
61 EGG_VIRTUAL_LOCK_MASK,
62 &caps_lock_mask);
63
64 egg_keymap_resolve_virtual_modifiers (keymap,
65 EGG_VIRTUAL_NUM_LOCK_MASK,
66 &num_lock_mask);
67
68 egg_keymap_resolve_virtual_modifiers (keymap,
69 EGG_VIRTUAL_SCROLL_LOCK_MASK,
70 &scroll_lock_mask);
71}
72
73static void
74grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin,
75 Binding *binding,
76 gboolean grab)
77{
78 guint mod_masks [] = {
79 0, /* modifier only */
80 num_lock_mask,
81 caps_lock_mask,
82 scroll_lock_mask,
83 num_lock_mask | caps_lock_mask,
84 num_lock_mask | scroll_lock_mask,
85 caps_lock_mask | scroll_lock_mask,
86 num_lock_mask | caps_lock_mask | scroll_lock_mask,
87 };
88 int i;
89
90 for (i = 0; i < G_N_ELEMENTS (mod_masks); i++) {
91 if (grab) {
92 XGrabKey (GDK_WINDOW_XDISPLAY (rootwin),
93 binding->keycode,
94 binding->modifiers | mod_masks [i],
95 GDK_WINDOW_XWINDOW (rootwin),
96 False,
97 GrabModeAsync,
98 GrabModeAsync);
99 } else {
100 XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin),
101 binding->keycode,
102 binding->modifiers | mod_masks [i],
103 GDK_WINDOW_XWINDOW (rootwin));
104 }
105 }
106}
107
108static gboolean
109do_grab_key (Binding *binding)
110{
111 GdkKeymap *keymap = gdk_keymap_get_default ();
112 GdkWindow *rootwin = gdk_get_default_root_window ();
113
114 EggVirtualModifierType virtual_mods = 0;
115 guint keysym = 0;
116
117 if (keymap == NULL || rootwin == NULL)
118 return FALSE;
119
120 if (!egg_accelerator_parse_virtual (binding->keystring,
121 &keysym,
122 &virtual_mods))
123 return FALSE;
124
125 TRACE (g_print ("Got accel %d, %d\n", keysym, virtual_mods));
126
127 binding->keycode = XKeysymToKeycode (GDK_WINDOW_XDISPLAY (rootwin),
128 keysym);
129 if (binding->keycode == 0)
130 return FALSE;
131
132 TRACE (g_print ("Got keycode %d\n", binding->keycode));
133
134 egg_keymap_resolve_virtual_modifiers (keymap,
135 virtual_mods,
136 &binding->modifiers);
137
138 TRACE (g_print ("Got modmask %d\n", binding->modifiers));
139
140 gdk_error_trap_push ();
141
142 grab_ungrab_with_ignorable_modifiers (rootwin,
143 binding,
144 TRUE /* grab */);
145
146 gdk_flush ();
147
148 if (gdk_error_trap_pop ()) {
149 g_warning ("Binding '%s' failed!\n", binding->keystring);
150 return FALSE;
151 }
152
153 return TRUE;
154}
155
156static gboolean
157do_ungrab_key (Binding *binding)
158{
159 GdkWindow *rootwin = gdk_get_default_root_window ();
160
161 TRACE (g_print ("Removing grab for '%s'\n", binding->keystring));
162
163 grab_ungrab_with_ignorable_modifiers (rootwin,
164 binding,
165 FALSE /* ungrab */);
166
167 return TRUE;
168}
169
170static GdkFilterReturn
171filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data)
172{
173 GdkFilterReturn return_val = GDK_FILTER_CONTINUE;
174 XEvent *xevent = (XEvent *) gdk_xevent;
175 guint event_mods;
176 GSList *iter;
177
178 TRACE (g_print ("Got Event! %d, %d\n", xevent->type, event->type));
179
180 switch (xevent->type) {
181 case KeyPress:
182 TRACE (g_print ("Got KeyPress! keycode: %d, modifiers: %d\n",
183 xevent->xkey.keycode,
184 xevent->xkey.state));
185
186 /*
187 * Set the last event time for use when showing
188 * windows to avoid anti-focus-stealing code.
189 */
190 processing_event = TRUE;
191 last_event_time = xevent->xkey.time;
192
193 event_mods = xevent->xkey.state & ~(num_lock_mask |
194 caps_lock_mask |
195 scroll_lock_mask);
196
197 for (iter = bindings; iter != NULL; iter = iter->next) {
198 Binding *binding = (Binding *) iter->data;
199
200 if (binding->keycode == xevent->xkey.keycode &&
201 binding->modifiers == event_mods) {
202
203 TRACE (g_print ("Calling handler for '%s'...\n",
204 binding->keystring));
205
206 (binding->handler) (binding->keystring,
207 binding->user_data);
208 }
209 }
210
211 processing_event = FALSE;
212 break;
213 case KeyRelease:
214 TRACE (g_print ("Got KeyRelease! \n"));
215 break;
216 }
217
218 return return_val;
219}
220
221static void
222keymap_changed (GdkKeymap *map)
223{
224 GdkKeymap *keymap = gdk_keymap_get_default ();
225 GSList *iter;
226
227 TRACE (g_print ("Keymap changed! Regrabbing keys..."));
228
229 for (iter = bindings; iter != NULL; iter = iter->next) {
230 Binding *binding = (Binding *) iter->data;
231 do_ungrab_key (binding);
232 }
233
234 lookup_ignorable_modifiers (keymap);
235
236 for (iter = bindings; iter != NULL; iter = iter->next) {
237 Binding *binding = (Binding *) iter->data;
238 do_grab_key (binding);
239 }
240}
241
242void
243awn_keybinder_init (void)
244{
245 GdkKeymap *keymap = gdk_keymap_get_default ();
246 GdkWindow *rootwin = gdk_get_default_root_window ();
247
248 lookup_ignorable_modifiers (keymap);
249
250 gdk_window_add_filter (rootwin,
251 filter_func,
252 NULL);
253
254 g_signal_connect (keymap,
255 "keys_changed",
256 G_CALLBACK (keymap_changed),
257 NULL);
258}
259
260gboolean
261awn_keybinder_bind (const char *keystring,
262 AwnBindkeyHandler handler,
263 gpointer user_data)
264{
265 Binding *binding;
266 gboolean success;
267
268 binding = g_new0 (Binding, 1);
269 binding->keystring = g_strdup (keystring);
270 binding->handler = handler;
271 binding->user_data = user_data;
272
273 /* Sets the binding's keycode and modifiers */
274 success = do_grab_key (binding);
275
276 if (success) {
277 bindings = g_slist_prepend (bindings, binding);
278 } else {
279 g_free (binding->keystring);
280 g_free (binding);
281 }
282
283 return success;
284}
285
286gboolean
287awn_keybinder_unbind (const char *keystring,
288 AwnBindkeyHandler handler,
289 gpointer user_data)
290{
291 GSList *iter;
292
293 for (iter = bindings; iter != NULL; iter = iter->next) {
294 Binding *binding = (Binding *) iter->data;
295
296 if (strcmp (keystring, binding->keystring) != 0 ||
297 handler != binding->handler)
298 continue;
299
300 do_ungrab_key (binding);
301
302 bindings = g_slist_remove (bindings, binding);
303
304 g_free (binding->keystring);
305 g_free (binding);
306 break;
307 }
308
309 return TRUE;
310}
311
312/*
313 * From eggcellrenderkeys.c.
314 */
315gboolean
316awn_keybinder_is_modifier (guint keycode)
317{
318 gint i;
319 gint map_size;
320 XModifierKeymap *mod_keymap;
321 gboolean retval = FALSE;
322
323 mod_keymap = XGetModifierMapping (gdk_display);
324
325 map_size = 8 * mod_keymap->max_keypermod;
326
327 i = 0;
328 while (i < map_size) {
329 if (keycode == mod_keymap->modifiermap[i]) {
330 retval = TRUE;
331 break;
332 }
333 ++i;
334 }
335
336 XFreeModifiermap (mod_keymap);
337
338 return retval;
339}
340
341guint32
342awn_keybinder_get_current_event_time (void)
343{
344 if (processing_event)
345 return last_event_time;
346 else
347 return GDK_CURRENT_TIME;
348}
349
0350
=== added file 'applets/maintained/awnterm/keybinder.h'
--- applets/maintained/awnterm/keybinder.h 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/keybinder.h 2010-01-26 03:57:14 +0000
@@ -0,0 +1,50 @@
1//
2// This file comes from the Tomboy project.
3// http://www.gnome.org/projects/tomboy/
4//
5/*
6 * Copyright (C) 2004-2007 Alex Graveley
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
17 *
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
22 */
23
24#ifndef __AWN_KEY_BINDER_H__
25#define __AWN_KEY_BINDER_H__
26
27#include <glib/gtypes.h>
28
29G_BEGIN_DECLS
30
31typedef void (*AwnBindkeyHandler) (const char *keystring, gpointer user_data);
32
33void awn_keybinder_init (void);
34
35gboolean awn_keybinder_bind (const char *keystring,
36 AwnBindkeyHandler handler,
37 gpointer user_data);
38
39gboolean awn_keybinder_unbind (const char *keystring,
40 AwnBindkeyHandler handler,
41 gpointer user_data);
42
43gboolean awn_keybinder_is_modifier (guint keycode);
44
45guint32 awn_keybinder_get_current_event_time (void);
46
47G_END_DECLS
48
49#endif /* __AWN_KEY_BINDER_H__ */
50
051
=== added file 'applets/maintained/awnterm/keybinder.vapi'
--- applets/maintained/awnterm/keybinder.vapi 1970-01-01 00:00:00 +0000
+++ applets/maintained/awnterm/keybinder.vapi 2010-01-26 03:57:14 +0000
@@ -0,0 +1,45 @@
1namespace Awn {
2 namespace Keybinder {
3 namespace Egg {
4 [CCode (cheader_filename = "eggaccelerators.h", cprefix = "EGG_VIRTUAL_", cname = "EggVirtualModifierType")]
5 [Flags]
6 public enum VirtualModifierType
7 {
8 SHIFT_MASK,
9 LOCK_MASK,
10 CONTROL_MASK,
11 ALT_MASK,
12 MOD2_MASK,
13 MOD3_MASK,
14 MOD4_MASK,
15 MOD5_MASK,
16 META_MASK,
17 SUPER_MASK,
18 HYPER_MASK,
19 MODE_SWITCH_MASK,
20 NUM_LOCK_MASK,
21 SCROLL_LOCK_MASK,
22
23 RELEASE_MASK
24 }
25 [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_accelerator_parse_virtual")]
26 public static bool accelerator_parse_virtual (string accelerator, out uint key, out VirtualModifierType mods);
27 [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_virtual_accelerator_name")]
28 public static string virtual_accelerator_name (uint key, VirtualModifierType mods);
29 [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_keymap_virtualize_modifiers")]
30 public static void keymap_virtualize_modifiers (Gdk.Keymap keymap, Gdk.ModifierType mods, out VirtualModifierType virtual_mods);
31 [CCode (cheader_filename = "eggaccelerators.h", cname = "egg_keymap_resolve_virtual_modifiers")]
32 public static void keymap_resolve_virtual_modifiers (Gdk.Keymap keymap, VirtualModifierType virtual_mods, out Gdk.ModifierType mods);
33 }
34
35 [CCode (cheader_filename = "keybinder.h", cprefix = "Awn")]
36 public delegate void BindkeyHandler (string keystring);
37 [CCode (cheader_filename = "keybinder.h", lower_case_cprefix = "awn_keybinder_")]
38 public static void init ();
39 public static bool bind (string keystring, BindkeyHandler handler);
40 public static bool unbind (string keystring, BindkeyHandler handler);
41 public static bool is_modifier (uint keycode);
42 public static uint32 get_current_event_time ();
43
44 }
45}
046
=== added directory 'applets/maintained/bandwidth-monitor'
=== added file 'applets/maintained/bandwidth-monitor/CHANGELOG'
--- applets/maintained/bandwidth-monitor/CHANGELOG 1970-01-01 00:00:00 +0000
+++ applets/maintained/bandwidth-monitor/CHANGELOG 2010-01-26 03:57:14 +0000
@@ -0,0 +1,126 @@
101/05/2010:
2 PEP8 cleanup of all lines > 80 chars
3 Rename of classes/variables for space/consistency
4 Change of timer values for consistent drawing.
5 Removed some unused modules.
6 Removed 'blank.png' - initial icon is now created with gtk.gdk.pixbuf_new_from_xpm_data()
7
801/03/2010:
9 Removed settings.load/load_preferences
10 Fix for applet/font-sizing when changing orientation
11 Changed instantiation of color objects to use gtk.gdk.color_parse instead of gtk.gdk.Color('#XXX') for older systems
12 Changed handling of default preferences/unassigned keys
13
14
1501/02/2010:
16 Fixed bug which caused the unit of measure checkbutton to become out of sync with the gconf value
17 Changed default interface to '', was wlan0 for some reason..
18 PEP8 verified - mostly complaint, a few lines are "too long"
19 Replaced icon
20 Removed LICENSE file - provided by AWN
21 Fixed desktop file version
22 Removed "Encoding" from desktop file
23 Improved logic for setting device preference values per Mark Lee's suggestion
24 Added timeout_add_seconds wrapper function
25 Adjusted width calculation if orientation is vertical
26 Change version string to use awn.extras.__version__
27 Changed email address
28
2912/20/2009:
30 Change logic to graph calculation which corrects the following rendering issues -
31 Graph lines drawing outside of border/frame
32 Graph normalised top-value was rendering off-screen when applet size smaller than 35
33 Graph normalised top-value was rendering very low on the graph when applet size greater than 60
34 Changed scaling of initial icon - it was rendering too large and centered text was displayed with an odd alignment to the dock
35 Fixed some issues with default values
36 Changed short-name to 'bandwidth-monitor' to match schema file
37 Corrected path to UI file
38 Fixed division by zero error
39 Addedd bandwidth-monitor.ui and bwmprefs.py to Makefile.am
40
4112/19/2009:
42 Added preferences to control -
43 Enable/Disable drawing of the background
44 Enable/Disable drawing of the border
45 Select color/opacity of background
46 Select color/opacity of border
47 Options to control the text representation of throughput
48 Display Upload/Download text
49 Display Sum text only
50 Do not display text - only draw the graph.
51 Enable/Disable drawing the zero value in the graph (if true, draw a line at the bottom of the graph for zero value)
52
5312/18/2009:
54 Cleaned up code to make it run faster or use less resources
55 Removed everything related to the status of interfaces (Not required, may add later)
56 Removed everything related to IP Addresses for interfaces (Not required, may add later)
57
5812/16/2009:
59 Added call to applet.errors.general if read access to /proc/net/dev fails.
60 Made changes to TODO file
61 Change parser logic for to handle interfaces with less than 11 columns of output in 'netstat -iea'
62
6312/14/2009:
64 Created preferences dialog to manage options -
65 An option to select the unit Bytes/bits
66 A spinbutton entry for setting the minimum threshold
67 A "Devices" pref-pane which allows selection of interfaces into virtual interfaces
68 A color picker for upload and download colors for use in the line-graph.
69 Fixed division by zero that would occur in some scenarios.
70
7112/10/2009:
72 Added virtual interfaces for SUM and MULTI
73 The Sum Interface is a virtual interface which displays the sum throughput of all interfaces that are selected for "Sum"
74 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.
75 Added logic to parse and use preferences that are planned
76
7711/29/2009:
78 Changed table generation function to be less verbose
79 Fixed regular expression for gathering IP/Netmask
80 Changed IP/Netmask tooltip logic
81 Changed command for device stats gathering to include administratively down-interfaces
82
8311/28/2009:
84 pep8 verified main program file
85 Added a few non-parsed comments to the source file
86
8711/28/2009:
88 Changed initial ratio value to 1 to prevent the graphs from ignoring data transfers below 3200 bytes
89 Changed the graph scaling to display the line graph almost center of the graph window below 6400 bytes
90 Added items to the TODO list
91
9211/27/2009:
93 Filter out the wmaster0 interface.
94 Applied patch from onox:
95 Renamed some classes
96 Removed functions for things abstracted by AWN
97 Cleaned up some of the syntax
98 Cleaned up some naming conventions
99 Created a new branch repository (previous was setup wrong): lp:~kylehuff/awn-extras/0.4-bandwidth-monitor
100
10111/27/2009:
102 Applied patch from mhr3 which included -
103 Changes to applet short-name
104 Changes to Makefile.am
105 Fixed spelling of "CHANGLOG" to "CHANGELOG"
106 Renamed awn-bwm.schema-ini to awn-applet-bwm.schema-ini
107 Changed the application of the cairo surface to use applet.set_icon_context()
108 Fixed bug which caused rendering the scale of the upload speed off-screen
109 Removed references to some obsolete functions/methods/properties
110
11111/25/2009:
112 Eliminated usage of 'ifconfig' command - moved everything to netstat
113 Bumped to version v0.3.9.2
114 Created launchpad branch - lp:~kylehuff/awn-extras/awn-bwm
115
11611/24/2009:
117 Converted text to OverlayText()
118 Cleaned up some functions
119 Bumped version to v0.3.9.1
120
12111/23/2009:
122 Implemented API v0.4
123 Changed from v0.3.2.8 to v0.3.9.0
124
12504/18/2006:
126 Original release - 0.1
0127
=== added file 'applets/maintained/bandwidth-monitor/Makefile.am'
--- applets/maintained/bandwidth-monitor/Makefile.am 1970-01-01 00:00:00 +0000
+++ applets/maintained/bandwidth-monitor/Makefile.am 2010-01-26 03:57:14 +0000
@@ -0,0 +1,16 @@
1APPLET_NAME = bandwidth-monitor
2APPLET_MAIN_FILE = awn-bwm.py
3include $(top_srcdir)/Makefile.python-applet
4include $(top_srcdir)/Makefile.schemas
5
6dist_applet_DATA = \
7 CHANGELOG \
8 bwmprefs.py \
9 bandwidth-monitor.ui \
10 $(NULL)
11
12bwm_iconsdir = $(applet_datadir)/images
13dist_bwm_icons_DATA = \
14 images/icon.png \
15 $(NULL)
16
017
=== added file 'applets/maintained/bandwidth-monitor/TODO'
--- applets/maintained/bandwidth-monitor/TODO 1970-01-01 00:00:00 +0000
+++ applets/maintained/bandwidth-monitor/TODO 2010-01-26 03:57:14 +0000
@@ -0,0 +1,19 @@
1TODO:
2
3--- Things that need to happen ---
4None Left...
5
6--- Things I would like ---
7Add preference control for applying effect to text (new default = True, always apply)
8Auto select interface (maybe based on default route)
9Add toggle for enable/disable auto-scaling (so 100Mbps would draw the line at the top of the meter)
10
11--- Completed TODO's ---
12Create preference dialog for selecting the color of the line-graphs, as well as the background
13 Done
14Ability to select multiple (or all) devices for a sum throughput -
15 Done (also created 'multi' interface)
16Add preference for specifying minimum threshold for charting data
17 Done
18
19
020
=== added file 'applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini'
--- applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini 1970-01-01 00:00:00 +0000
+++ applets/maintained/bandwidth-monitor/awn-applet-bandwidth-monitor.schema-ini 2010-01-26 03:57:14 +0000
@@ -0,0 +1,40 @@
1[DEFAULT/unit]
2type = integer
3default = 0
4description = The base display unit for transfer speed (0 = bits, 1 = bytes)
5[DEFAULT/interface]
6type = string
7default =
8description = The interface currently selected
9[DEFAULT/draw_threshold]
10type = float
11default = 0.0
12description = Minimum threshold to draw meter (dependent upon DEFAULT/unit)
13[DEFAULT/device_display_parameters]
14type = list-string
15default = ;
16description = Display parameters for interfaces
17[DEFAULT/background]
18type = boolean
19default = true
20description = Draw the applet background
21[DEFAULT/background_color]
22type = string
23default = #000000|0.5
24description = Color to draw the background
25[DEFAULT/border]
26type = boolean
27default = false
28description = Draw the applet border
29[DEFAULT/border_color]
30type = string
31default = #000000|1.0
32description = Color to draw the border
33[DEFAULT/label_control]
34type = integer
35default = 2
36description = Throughput label control - 0 = no label, 1 = Sum, 2 = Upload/Download
37[DEFAULT/graph_zero]
38type = integer
39default = 0
40description = 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
041
=== added file 'applets/maintained/bandwidth-monitor/awn-bwm.py'
--- applets/maintained/bandwidth-monitor/awn-bwm.py 1970-01-01 00:00:00 +0000
+++ applets/maintained/bandwidth-monitor/awn-bwm.py 2010-01-26 03:57:14 +0000
@@ -0,0 +1,688 @@
1#!/usr/bin/python
2# -*- coding: utf-8 -*-
3'''
4bandwidth-monitor - Network bandwidth monitor.
5Copyright (c) 2006-2010 Kyle L. Huff (awn-bwm@curetheitch.com)
6url: <http://www.curetheitch.com/projects/awn-bwm/>
7Email: awn-bwm@curetheitch.com
8
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/gpl.txt>.
21'''
22
23from time import time
24import os
25import re
26import sys
27
28
29import gtk
30import awn
31
32from awn.extras import _, awnlib, __version__
33import gobject
34import cairo
35import bwmprefs
36
37APPLET_NAME = _('Bandwidth Monitor')
38APPLET_VERSION = '0.3.9.3'
39APPLET_COPYRIGHT = '© 2006-2009 CURE|THE|ITCH'
40APPLET_AUTHORS = ['Kyle L. Huff <awn-bwm@curetheitch.com>']
41APPLET_DESCRIPTION = _('Network Bandwidth monitor')
42APPLET_WEBSITE = 'http://www.curetheitch.com/projects/awn-bwm/'
43APPLET_PATH = os.path.dirname(sys.argv[0])
44APPLET_ICON = APPLET_PATH + '/images/icon.png'
45UI_FILE = os.path.join(os.path.dirname(__file__), 'bandwidth-monitor.ui')
46
47
48class Netstat:
49
50 def __init__(self, parent, unit):
51 self.parent = parent
52 self.ifaces = {}
53 self.ifaces['Sum Interface'] = {'collection_time': 0,
54 'status': 'V',
55 'prbytes': 0,
56 'ptbytes': 0,
57 'index': 1,
58 'rx_history': [0, 0],
59 'tx_history': [0, 0],
60 'rx_bytes': 0,
61 'tx_bytes': 0,
62 'rx_sum': 0,
63 'tx_sum': 0,
64 'rxtx_sum': 0,
65 'rabytes': 0,
66 'tabytes': 0,
67 'sum_include': False,
68 'multi_include': False,
69 'upload_color': '#ff0000',
70 'download_color': '#ffff00'}
71 self.ifaces['Multi Interface'] = {'collection_time': 0,
72 'status': 'V',
73 'prbytes': 0,
74 'ptbytes': 0,
75 'index': 1,
76 'rx_history': [0, 0],
77 'tx_history': [0, 0],
78 'rx_bytes': 0,
79 'tx_bytes': 0,
80 'rx_sum': 0,
81 'tx_sum': 0,
82 'rxtx_sum': 0,
83 'rabytes': 0,
84 'tabytes': 0,
85 'sum_include': False,
86 'multi_include': False}
87 self.regenerate = False
88 self.update_net_stats()
89 gobject.timeout_add(800, self.update_net_stats)
90
91 def timeout_add_seconds(self, seconds, callback):
92 if hasattr(gobject, 'timeout_add_seconds'):
93 return gobject.timeout_add_seconds(seconds, callback)
94 else:
95 return gobject.timeout_add(seconds * 1000, callback)
96
97 def update_net_stats(self):
98 ifcfg_str = os.popen('netstat -eia').read()
99 if ifcfg_str:
100 ifcfg_str = ifcfg_str.split('\n\n')
101 stat_str = 'n'
102 devices = []
103 # Reset the Sum Interface records to zero
104 self.ifaces['Sum Interface']['rx_sum'] = 0
105 self.ifaces['Sum Interface']['tx_sum'] = 0
106 self.ifaces['Sum Interface']['rx_bytes'] = 0
107 self.ifaces['Sum Interface']['tx_bytes'] = 0
108 sum_rx_history = 0.0
109 sum_tx_history = 0.0
110 # Reset the Multi Interface records to zero
111 self.ifaces['Multi Interface']['rx_sum'] = 0
112 self.ifaces['Multi Interface']['tx_sum'] = 0
113 self.ifaces['Multi Interface']['rx_bytes'] = 0
114 self.ifaces['Multi Interface']['tx_bytes'] = 0
115 multi_rx_history = 0.0
116 multi_tx_history = 0.0
117 if ifcfg_str and stat_str:
118 for device_group in ifcfg_str:
119 device_lines = device_group.split('\n')
120 if 'Kernel' in device_lines[0]:
121 device_lines = device_lines[1:]
122 iface = re.split('[\W]+',
123 device_lines[0].strip().replace(':', '_'))[0]
124 if len(device_lines) > 2:
125 try:
126 rx_bytes = float(re.search(r'RX bytes:(\d+)\D',
127 device_group).group(1))
128 tx_bytes = float(re.search(r'TX bytes:(\d+)\D',
129 device_group).group(1))
130 except:
131 rx_bytes = 0
132 tx_bytes = 0
133 if not iface in self.ifaces:
134 ddps = 'device_display_parameters'
135 prefs = self.parent.applet.settings[ddps]
136 sum_include = True
137 multi_include = True
138 for device_pref in prefs:
139 dpv = device_pref.split('|')
140 if dpv[0] == iface:
141 sum_include = str(dpv[1])[0].upper() == 'T'
142 multi_include = str(dpv[2])[0].upper() == 'T'
143 self.ifaces[iface] = {'collection_time': time(),
144 'status': None,
145 'prbytes': rx_bytes,
146 'ptbytes': tx_bytes,
147 'index': 1,
148 'rx_history': [0, 0],
149 'tx_history': [0, 0],
150 'sum_include': sum_include,
151 'multi_include': multi_include,
152 'upload_color': \
153 self.parent.prefs.get_color(iface, 'upload'),
154 'download_color': \
155 self.parent.prefs.get_color(iface, 'download')}
156 collection = (
157 time() - self.ifaces[iface]['collection_time'])
158 rbytes = ((rx_bytes - self.ifaces[iface]['prbytes'])
159 * self.parent.unit) / collection
160 tbytes = ((tx_bytes - self.ifaces[iface]['ptbytes'])
161 * self.parent.unit) / collection
162 rabytes = (rx_bytes - self.ifaces[iface]['prbytes']) \
163 / collection
164 tabytes = (tx_bytes - self.ifaces[iface]['ptbytes']) \
165 / collection
166 self.ifaces[iface]['rabytes'] = rabytes
167 self.ifaces[iface]['tabytes'] = tabytes
168 rxtx_sum = rx_bytes + tx_bytes
169 if self.ifaces[iface]['sum_include']:
170 self.ifaces['Sum Interface']['rx_sum'] += rx_bytes
171 self.ifaces['Sum Interface']['tx_sum'] += tx_bytes
172 self.ifaces['Sum Interface']['rx_bytes'] += rbytes
173 self.ifaces['Sum Interface']['tx_bytes'] += tbytes
174 sum_rx_history += rabytes
175 sum_tx_history += tabytes
176 if self.ifaces[iface]['multi_include']:
177 self.ifaces['Multi Interface']['rx_sum'] += rx_bytes
178 self.ifaces['Multi Interface']['tx_sum'] += tx_bytes
179 self.ifaces['Multi Interface']['rx_bytes'] += rbytes
180 self.ifaces['Multi Interface']['tx_bytes'] += tbytes
181 multi_rx_history += rabytes
182 multi_tx_history += tabytes
183 ifstatus = 'BRMU'
184 self.ifaces[iface]['rx_bytes'] = rbytes
185 self.ifaces[iface]['tx_bytes'] = tbytes
186 self.ifaces[iface]['prbytes'] = rx_bytes
187 self.ifaces[iface]['ptbytes'] = tx_bytes
188 self.ifaces[iface]['rx_sum'] = rx_bytes
189 self.ifaces[iface]['tx_sum'] = tx_bytes
190 self.ifaces[iface]['rxtx_sum'] = rxtx_sum
191 self.ifaces[iface]['status'] = ifstatus
192 self.ifaces[iface]['collection_time'] = time()
193 offset = self.parent.meter_scale - 1 \
194 if self.parent.border else self.parent.meter_scale
195 self.ifaces[iface]['rx_history'] = \
196 self.ifaces[iface]['rx_history'][0 - offset:]
197 self.ifaces[iface]['rx_history'].append(
198 self.ifaces[iface]['rabytes'])
199 self.ifaces[iface]['tx_history'] = \
200 self.ifaces[iface]['tx_history'][0 - offset:]
201 self.ifaces[iface]['tx_history'].append(
202 self.ifaces[iface]['tabytes'])
203 devices.append(iface)
204 self.ifaces['Sum Interface']['rx_history'] = \
205 self.ifaces['Sum Interface']['rx_history'][0 - offset:]
206 self.ifaces['Sum Interface']['rx_history'].append(sum_rx_history)
207 self.ifaces['Sum Interface']['tx_history'] = \
208 self.ifaces['Sum Interface']['tx_history'][0 - offset:]
209 self.ifaces['Sum Interface']['tx_history'].append(sum_tx_history)
210 for dev in self.ifaces.keys():
211 if not dev in devices and not 'Sum Interface' in dev \
212 and not 'Multi Interface' in dev:
213 ''' The device does not exist, remove it.
214 del dictionary[key] is faster than dictionary.pop(key) '''
215 del self.ifaces[dev]
216 self.regenerate = True
217 return True
218
219
220class AppletBandwidthMonitor:
221
222 def __init__(self, applet):
223 # Test if user has access to /proc/net/dev
224 if not os.access('/proc/net/dev', os.R_OK):
225 applet.errors.general((_('Unable to caclulate statistics'), _('''\
226Statistics calculation requires read access to /proc/net/dev''')))
227 applet.errors.set_error_icon_and_click_to_restart()
228 return None
229 self.applet = applet
230 self.UI_FILE = UI_FILE
231 applet.tooltip.set(_('Bandwidth Monitor'))
232 self.meter_scale = 25
233 icon = gtk.gdk.pixbuf_new_from_xpm_data(['1 1 1 1',
234 ' c #000',
235 ' '])
236 height = self.applet.get_size() * 1.5
237 if height != icon.get_height():
238 icon = icon.scale_simple(int(height), \
239 int(height / 1.5), gtk.gdk.INTERP_BILINEAR)
240 self.applet.set_icon_pixbuf(icon)
241 self.dialog = applet.dialog.new('main')
242 self.vbox = gtk.VBox()
243 self.dialog.add(self.vbox)
244 button = gtk.Button(_('Change Unit'))
245 self.dialog.add(button)
246 defaults = {'unit': 8,
247 'interface': '',
248 'draw_threshold': 0.0,
249 'device_display_parameters': [],
250 'background': True,
251 'background_color': '#000000|0.5',
252 'border': False,
253 'border_color': '#000000|1.0',
254 'label_control': 2,
255 'graph_zero': 0}
256 for key, value in defaults.items():
257 if not key in self.applet.settings:
258 self.applet.settings[key] = value
259 self.iface = self.applet.settings['interface']
260 self.unit = self.applet.settings['unit']
261 self.label_control = self.applet.settings['label_control']
262 self.background = self.applet.settings['background']
263 self.background_color = self.applet.settings['background_color']
264 self.border = self.applet.settings['border']
265 self.border_color = self.applet.settings['border_color']
266 self.graph_zero = self.applet.settings['graph_zero']
267 if not self.unit:
268 self.change_unit(defaults['unit'])
269 if self.applet.settings['draw_threshold'] == 0.0:
270 self.ratio = 1
271 else:
272 ratio = self.applet.settings['draw_threshold']
273 self.ratio = ratio * 1024 if self.unit == 1 else ratio * 1024 / 8
274 self.prefs = bwmprefs.Preferences(self.applet, self)
275 self.netstats = Netstat(self, self.unit)
276 applet.tooltip.connect_becomes_visible(self.enter_notify)
277 self.table = self.generate_table()
278 self.vbox.add(self.table)
279 self.upload_ot = awn.OverlayText()
280 self.download_ot = awn.OverlayText()
281 self.sum_ot = awn.OverlayText()
282 self.upload_ot.props.gravity = gtk.gdk.GRAVITY_NORTH
283 self.download_ot.props.gravity = gtk.gdk.GRAVITY_SOUTH
284 self.sum_ot.props.gravity = gtk.gdk.GRAVITY_NORTH
285 applet.add_overlay(self.upload_ot)
286 applet.add_overlay(self.download_ot)
287 applet.add_overlay(self.sum_ot)
288 self.default_font_size = self.upload_ot.props.font_sizing
289 self.upload_ot.props.y_override = 4
290 self.download_ot.props.y_override = 18
291 self.sum_ot.props.y_override = 11
292 self.upload_ot.props.apply_effects = True
293 self.download_ot.props.apply_effects = True
294 self.sum_ot.props.apply_effects = True
295 self.upload_ot.props.text = _('Scanning')
296 self.download_ot.props.text = _('Devices')
297 self.prefs.setup()
298 ''' connect the left-click dialog button 'Change Unit' to
299 the call_change_unit function, which does not call
300 self.change_unit directly, instead it toggles the 'active'
301 property of the checkbutton so everything that needs to
302 happen, happens. '''
303 button.connect('clicked', self.call_change_unit)
304 gobject.timeout_add(100, self.first_paint)
305 gobject.timeout_add(800, self.subsequent_paint)
306
307 def change_draw_ratio(self, widget):
308 ratio = widget.get_value()
309 self.ratio = ratio * 1024 if self.unit == 1 else ratio * 1024 / 8
310 self.applet.settings['draw_threshold'] = ratio
311
312 def call_change_unit(self, *args):
313 if self.unit == 8:
314 self.prefs.uomCheckbutton.set_property('active', True)
315 else:
316 self.prefs.uomCheckbutton.set_property('active', False)
317
318 def change_unit(self, widget=None, scaleThresholdSBtn=None, label=None):
319 self.unit = 8 if self.unit == 1 else 1
320 # normalize and update the label, and normalize the spinbutton
321 if label:
322 if self.unit == 1:
323 label.set_text(_('KBps'))
324 scaleThresholdSBtn.set_value(
325 self.applet.settings['draw_threshold'] / 8)
326 else:
327 label.set_text(_('Kbps'))
328 scaleThresholdSBtn.set_value(
329 self.applet.settings['draw_threshold'] * 8)
330 self.applet.settings['unit'] = self.unit
331
332 def change_iface(self, widget, iface):
333 if widget.get_active():
334 # Changed to interface %s' % iface
335 self.iface = iface
336 self.applet.settings['interface'] = iface
337
338 def generate_table(self):
339 table = gtk.Table(100, 100, False)
340 col_iter = 0
341 row_iter = 2
342 for i in [0, 1, 2, 3, 4, 5, 6]:
343 table.set_col_spacing(i, 20)
344 table.attach(gtk.Label(''),
345 0, 1, 0, 1,
346 xoptions=gtk.EXPAND | gtk.FILL,
347 yoptions=gtk.EXPAND | gtk.FILL,
348 xpadding=0, ypadding=0)
349 table.attach(gtk.Label(_('Interface')),
350 1, 2, 0, 1,
351 xoptions=gtk.EXPAND | gtk.FILL,
352 yoptions=gtk.EXPAND | gtk.FILL,
353 xpadding=0, ypadding=0)
354 table.attach(gtk.Label(_('Sent')),
355 2, 3, 0, 1,
356 xoptions=gtk.EXPAND | gtk.FILL,
357 yoptions=gtk.EXPAND | gtk.FILL,
358 xpadding=0, ypadding=0)
359 table.attach(gtk.Label(_('Received')),
360 3, 4, 0, 1,
361 xoptions=gtk.EXPAND | gtk.FILL,
362 yoptions=gtk.EXPAND | gtk.FILL,
363 xpadding=0, ypadding=0)
364 table.attach(gtk.Label(_('Sending')),
365 4, 5, 0, 1,
366 xoptions=gtk.EXPAND | gtk.FILL,
367 yoptions=gtk.EXPAND | gtk.FILL,
368 xpadding=0, ypadding=0)
369 table.attach(gtk.Label(_('Receiving')),
370 5, 6, 0, 1,
371 xoptions=gtk.EXPAND | gtk.FILL,
372 yoptions=gtk.EXPAND | gtk.FILL,
373 xpadding=0, ypadding=0)
374 radio = None
375 for iface in sorted(self.netstats.ifaces):
376 widget = gtk.Label()
377 widget.toggle = gtk.RadioButton(group=radio)
378 radio = widget.toggle
379 if iface == self.iface:
380 widget.toggle.set_active(True)
381 widget.toggle.connect('clicked', self.change_iface, iface)
382 widget.name_label = gtk.Label(str(iface))
383 widget.sent_label = gtk.Label(str(
384 readable_speed(self.netstats.ifaces[iface]['tx_sum'],
385 self.unit, False).strip()))
386 widget.received_label = gtk.Label(str(
387 readable_speed(self.netstats.ifaces[iface]['rx_sum'],
388 self.unit, False).strip()))
389 widget.tx_speed_label = gtk.Label(str(
390 readable_speed(self.netstats.ifaces[iface]['tx_bytes']
391 * self.unit, self.unit).strip()))
392 widget.rx_speed_label = gtk.Label(str(
393 readable_speed(self.netstats.ifaces[iface]['rx_bytes']
394 * self.unit, self.unit).strip()))
395 self.netstats.ifaces[iface]['widget'] = widget
396 for widget_object in [widget.toggle,
397 widget.name_label,
398 widget.sent_label,
399 widget.received_label,
400 widget.tx_speed_label,
401 widget.rx_speed_label]:
402 table.attach(widget_object,
403 col_iter, col_iter + 1,
404 row_iter, row_iter + 1,
405 xoptions=gtk.EXPAND | gtk.FILL,
406 yoptions=gtk.EXPAND | gtk.FILL,
407 xpadding=0, ypadding=0)
408 col_iter += 1
409 row_iter += 1
410 col_iter = 0
411 return table
412
413 def enter_notify(self):
414 if not self.applet.dialog.is_visible('main'):
415 if not self.iface in self.netstats.ifaces:
416 self.applet.set_tooltip_text(
417 _('Please select a valid Network Device'))
418 else:
419 self.applet.set_tooltip_text(_('''\
420Total Sent: %s - Total Received: %s (All Interfaces)''') % (
421 readable_speed(
422 self.netstats.ifaces[self.iface]['tx_sum']
423 * self.unit, self.unit, False),
424 readable_speed(
425 self.netstats.ifaces[self.iface]['rx_sum']
426 * self.unit, self.unit, False)))
427
428 def first_paint(self):
429 self.repaint()
430 return False
431
432 def subsequent_paint(self):
433 self.repaint()
434 return True
435
436 def draw_background(self, ct, x0, y0, x1, y1, radius):
437 ct.move_to(x0, y0 + radius)
438 ct.curve_to(x0, y0, x0, y0, x0 + radius, y0)
439 ct.line_to(x1 - radius, y0)
440 ct.curve_to(x1, y0, x1, y0, x1, y0 + radius)
441 ct.line_to(x1, y1 - radius)
442 ct.curve_to(x1, y1, x1, y1, x1 - radius, y1)
443 ct.line_to(x0 + radius, y1)
444 ct.curve_to(x0, y1, x0, y1, x0, y1 - radius)
445 ct.close_path()
446
447 def draw_meter(self, ct, width, height, iface, multi=False):
448 ratio = self.ratio
449 ct.set_line_width(2)
450 ''' Create temporary lists to store the values of the transmit
451 and receive history, which will be then placed into the
452 _total_hist and sorted by size to set the proper
453 scale/ratio for the line heights '''
454 _rx_hist = [1]
455 _tx_hist = [1]
456 _total_hist = [1]
457 if not multi:
458 if iface in self.netstats.ifaces \
459 and len(self.netstats.ifaces[iface]['rx_history']):
460 _rx_hist = self.netstats.ifaces[iface]['rx_history']
461 if iface in self.netstats.ifaces \
462 and len(self.netstats.ifaces[iface]['tx_history']):
463 _tx_hist = self.netstats.ifaces[iface]['tx_history']
464 _total_hist.extend(_rx_hist)
465 _total_hist.extend(_tx_hist)
466 else:
467 for device in self.netstats.ifaces:
468 if self.netstats.ifaces[device]['multi_include']:
469 _total_hist.extend(
470 self.netstats.ifaces[device]['rx_history'])
471 if self.netstats.ifaces[iface]['multi_include']:
472 _total_hist.extend(
473 self.netstats.ifaces[device]['tx_history'])
474 _total_hist.sort()
475 ''' ratio variable controls the minimum threshold for data -
476 i.e. 32000 would not draw graphs for data transfers below
477 3200 bytes - the initial value of ratio if set to the link
478 speed will prevent the graph from scaling. If using the
479 Multi Interface, the ratio will adjust based on the
480 highest throughput metric. '''
481 max_val = _total_hist[-1]
482 ratio = max_val / 28 if max_val > self.ratio else self.ratio
483 # Change the color of the upload line to configured/default
484 if iface:
485 color = gtk.gdk.color_parse(
486 self.netstats.ifaces[iface]['upload_color'])
487 ct.set_source_rgba(color.red / 65535.0,
488 color.green / 65535.0,
489 color.blue / 65535.0, 1.0)
490 else:
491 ct.set_source_rgba(0.1, 0.1, 0.1, 0.5)
492 # Set the initial position and iter to 0
493 x_pos = 2 if self.border else 0
494 cnt = 0
495 # If a transmit history exists, draw it
496 if iface in self.netstats.ifaces \
497 and len(self.netstats.ifaces[iface]['tx_history']):
498 for value in self.netstats.ifaces[iface]['tx_history']:
499 x_pos_end = (x_pos - width) + 2 if self.border \
500 and x_pos > width else 0
501 ct.line_to(x_pos - x_pos_end, self.chart_coords(value, ratio))
502 ct.move_to(x_pos, self.chart_coords(value, ratio))
503 x_pos += width / self.meter_scale
504 cnt += 1
505 ct.close_path()
506 ct.stroke()
507 # Change the color of the download line to configured/default
508 if iface:
509 color = gtk.gdk.color_parse(
510 self.netstats.ifaces[iface]['download_color'])
511 ct.set_source_rgba(color.red / 65535.0,
512 color.green / 65535.0,
513 color.blue / 65535.0, 1.0)
514 else:
515 ct.set_source_rgba(0.1, 0.1, 0.1, 0.5)
516 # Reset the position and iter to 0
517 x_pos = 2 if self.border else 0
518 cnt = 0
519 # If a receive history exists, draw it
520 if iface in self.netstats.ifaces \
521 and len(self.netstats.ifaces[iface]['rx_history']):
522 for value in self.netstats.ifaces[iface]['rx_history']:
523 x_pos_end = (x_pos - width) + 2 if self.border \
524 and x_pos > width else 0
525 ct.line_to(x_pos - x_pos_end, self.chart_coords(value, ratio))
526 ct.move_to(x_pos, self.chart_coords(value, ratio))
527 x_pos += width / self.meter_scale
528 cnt += 1
529 ct.close_path()
530 ct.stroke()
531
532 def chart_coords(self, value, ratio=1):
533 ratio = 1 if ratio < 1 else ratio
534 pos = float(self.applet.get_size()) / 58
535 bottom = 2.0 if self.border else 0
536 return (self.applet.get_size() - pos \
537 * (value / int(ratio))) + self.graph_zero - bottom
538
539 def repaint(self):
540 orientation = self.applet.get_pos_type()
541 if orientation in (gtk.POS_LEFT, gtk.POS_RIGHT):
542 width = self.applet.get_size()
543 self.upload_ot.props.font_sizing = 9
544 self.download_ot.props.font_sizing = 9
545 self.sum_ot.props.font_sizing = 9
546 else:
547 width = self.applet.get_size() * 1.5
548 self.upload_ot.props.font_sizing = self.default_font_size
549 self.download_ot.props.font_sizing = self.default_font_size
550 self.sum_ot.props.font_sizing = self.default_font_size
551 cs = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(width),
552 self.applet.get_size())
553 ct = cairo.Context(cs)
554 ct.set_source_surface(cs)
555 ct.set_line_width(2)
556 if self.background:
557 bgColor, alpha = \
558 self.applet.settings['background_color'].split('|')
559 bgColor = gtk.gdk.color_parse(bgColor)
560 ct.set_source_rgba(bgColor.red / 65535.0,
561 bgColor.green / 65535.0,
562 bgColor.blue / 65535.0,
563 float(alpha))
564 self.draw_background(ct, 0, 0, width, self.applet.get_size(), 10)
565 ct.fill()
566 if self.iface == 'Multi Interface':
567 tmp_history = [1]
568 for iface in self.netstats.ifaces:
569 if self.netstats.ifaces[iface]['multi_include']:
570 tmp_history.extend(
571 self.netstats.ifaces[iface]['rx_history'])
572 tmp_history.extend(
573 self.netstats.ifaces[iface]['tx_history'])
574 tmp_history.sort()
575 max_val = tmp_history[-1]
576 self.ratio = max_val / 28 if max_val > self.ratio else 1
577 for iface in self.netstats.ifaces:
578 if self.netstats.ifaces[iface]['multi_include']:
579 self.draw_meter(ct, width, self.applet.get_size(),
580 iface, True)
581 else:
582 self.draw_meter(ct, width, self.applet.get_size(), self.iface)
583 if self.iface in self.netstats.ifaces:
584 if self.label_control:
585 if self.label_control == 2:
586 self.sum_ot.props.text = ''
587 self.download_ot.props.text = \
588 readable_speed(
589 self.netstats.ifaces[self.iface]['rx_bytes'],
590 self.unit).strip()
591 self.upload_ot.props.text = \
592 readable_speed(
593 self.netstats.ifaces[self.iface]['tx_bytes'],
594 self.unit).strip()
595 else:
596 self.upload_ot.props.text = ''
597 self.download_ot.props.text = ''
598 self.sum_ot.props.text = \
599 readable_speed(
600 self.netstats.ifaces[self.iface]['rx_bytes'] \
601 + self.netstats.ifaces[self.iface]['tx_bytes'],
602 self.unit).strip()
603 else:
604 self.upload_ot.props.text = ''
605 self.download_ot.props.text = ''
606 self.sum_ot.props.text = ''
607 self.title_text = readable_speed(
608 self.netstats.ifaces[self.iface]['tx_bytes'], self.unit)
609 else:
610 self.upload_ot.props.text = _('No')
611 self.download_ot.props.text = _('Device')
612 self.title_text = _('Please select a valid device')
613 if self.border:
614 line_width = 2
615 ct.set_line_width(line_width)
616 borderColor, alpha = \
617 self.applet.settings['border_color'].split('|')
618 borderColor = gtk.gdk.color_parse(borderColor)
619 ct.set_source_rgba(borderColor.red / 65535.0,
620 borderColor.green / 65535.0,
621 borderColor.blue / 65535.0,
622 float(alpha))
623 self.draw_background(ct,
624 line_width / 2,
625 line_width / 2,
626 width - line_width / 2,
627 self.applet.get_size() - line_width / 2, 4)
628 ct.stroke()
629 self.applet.set_icon_context(ct)
630 if self.applet.dialog.is_visible('main'):
631 for iface in self.netstats.ifaces:
632 if not 'widget' in self.netstats.ifaces[iface] \
633 or self.netstats.regenerate == True:
634 self.netstats.regenerate = False
635 self.vbox.remove(self.table)
636 self.table = self.generate_table()
637 self.vbox.add(self.table)
638 self.vbox.show_all()
639 self.netstats.ifaces[iface]['widget'].rx_speed_label.set_text(
640 str(readable_speed(self.netstats.ifaces[iface]['rx_bytes'],
641 self.unit).strip()))
642 self.netstats.ifaces[iface]['widget'].tx_speed_label.set_text(
643 str(readable_speed(self.netstats.ifaces[iface]['tx_bytes'],
644 self.unit).strip()))
645 self.netstats.ifaces[iface]['widget'].sent_label.set_text(
646 str(readable_speed(self.netstats.ifaces[iface]['tx_sum'] \
647 * self.unit, self.unit, False).strip()))
648 self.netstats.ifaces[iface]['widget'].received_label.set_text(
649 str(readable_speed(self.netstats.ifaces[iface]['rx_sum'] \
650 * self.unit, self.unit, False).strip()))
651 return True
652
653
654def readable_speed(speed, unit, seconds=True):
655 ''' readable_speed(speed) -> string
656 speed is in bytes per second
657 returns a readable version of the speed given '''
658 speed = 0 if speed is None or speed < 0 else speed
659 units = ['B ', 'KB', 'MB', 'GB', 'TB'] if unit == 1 \
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches