summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 22:56:10 -0300
committerPerberos <[email protected]>2011-12-01 22:56:10 -0300
commitc51ef797a707f4e2c6f9688d4378f2b0e9898a66 (patch)
tree019ae92bb53c19b30077545cb14743cbd1b57aef
downloadmate-panel-c51ef797a707f4e2c6f9688d4378f2b0e9898a66.tar.bz2
mate-panel-c51ef797a707f4e2c6f9688d4378f2b0e9898a66.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
-rw-r--r--AUTHORS52
-rw-r--r--COPYING339
-rw-r--r--COPYING-DOCS355
-rw-r--r--COPYING.LIB481
-rw-r--r--ChangeLog3
-rw-r--r--HACKING31
-rw-r--r--MAINTAINERS18
-rw-r--r--Makefile.am53
-rw-r--r--NEWS3
-rw-r--r--README49
-rw-r--r--applets/Makefile.am7
-rw-r--r--applets/Makefile.in677
-rw-r--r--applets/clock/Makefile.am205
-rw-r--r--applets/clock/Makefile.in1595
-rw-r--r--applets/clock/calendar-client.c2169
-rw-r--r--applets/clock/calendar-client.h153
-rw-r--r--applets/clock/calendar-debug.h56
-rw-r--r--applets/clock/calendar-sources.c658
-rw-r--r--applets/clock/calendar-sources.h70
-rw-r--r--applets/clock/calendar-window.c2125
-rw-r--r--applets/clock/calendar-window.h84
-rw-r--r--applets/clock/clock-face.c462
-rw-r--r--applets/clock/clock-face.h64
-rw-r--r--applets/clock/clock-location-tile.c728
-rw-r--r--applets/clock/clock-location-tile.h51
-rw-r--r--applets/clock/clock-location.c894
-rw-r--r--applets/clock/clock-location.h87
-rw-r--r--applets/clock/clock-map.c700
-rw-r--r--applets/clock/clock-map.h43
-rw-r--r--applets/clock/clock-marshallers.list3
-rw-r--r--applets/clock/clock-menu.xml8
-rw-r--r--applets/clock/clock-sunpos.c197
-rw-r--r--applets/clock/clock-sunpos.h8
-rw-r--r--applets/clock/clock-utils.c127
-rw-r--r--applets/clock/clock-utils.h57
-rw-r--r--applets/clock/clock.c3745
-rw-r--r--applets/clock/clock.h41
-rw-r--r--applets/clock/clock.schemas.in313
-rw-r--r--applets/clock/clock.ui1136
-rw-r--r--applets/clock/org.mate.panel.ClockApplet.mate-panel-applet.in.in18
-rw-r--r--applets/clock/org.mate.panel.applet.ClockAppletFactory.service.in3
-rw-r--r--applets/clock/pixmaps/Makefile.am21
-rw-r--r--applets/clock/pixmaps/Makefile.in537
-rw-r--r--applets/clock/pixmaps/clock-calendar-icon.pngbin0 -> 653 bytes
-rw-r--r--applets/clock/pixmaps/clock-face-large.svg291
-rw-r--r--applets/clock/pixmaps/clock-face-small-day.svg290
-rw-r--r--applets/clock/pixmaps/clock-face-small-evening.svg290
-rw-r--r--applets/clock/pixmaps/clock-face-small-morning.svg290
-rw-r--r--applets/clock/pixmaps/clock-face-small-night.svg291
-rw-r--r--applets/clock/pixmaps/clock-face-small.svg290
-rw-r--r--applets/clock/pixmaps/clock-map-location-current.pngbin0 -> 379 bytes
-rw-r--r--applets/clock/pixmaps/clock-map-location-hilight.pngbin0 -> 346 bytes
-rw-r--r--applets/clock/pixmaps/clock-map-location-marker.pngbin0 -> 283 bytes
-rw-r--r--applets/clock/pixmaps/clock-map.pngbin0 -> 25244 bytes
-rw-r--r--applets/clock/pixmaps/clock-map.svg755
-rw-r--r--applets/clock/set-timezone.c291
-rw-r--r--applets/clock/set-timezone.h40
-rw-r--r--applets/clock/system-timezone.c1048
-rw-r--r--applets/clock/system-timezone.h87
-rw-r--r--applets/clock/test-system-timezone.c122
-rw-r--r--applets/fish/Makefile.am111
-rw-r--r--applets/fish/fish-menu.xml4
-rw-r--r--applets/fish/fish.c2012
-rw-r--r--applets/fish/fish.schemas.in91
-rw-r--r--applets/fish/fish.ui444
-rw-r--r--applets/fish/fishanim.pngbin0 -> 4859 bytes
-rw-r--r--applets/fish/footguy.pngbin0 -> 176 bytes
-rw-r--r--applets/fish/monkey.pngbin0 -> 5063 bytes
-rw-r--r--applets/fish/nyan.pngbin0 -> 1211 bytes
-rw-r--r--applets/fish/oldwanda.pngbin0 -> 12996 bytes
-rw-r--r--applets/fish/org.mate.panel.FishApplet.mate-panel-applet.in.in17
-rw-r--r--applets/fish/org.mate.panel.applet.FishAppletFactory.service.in3
-rw-r--r--applets/fish/wanda.pngbin0 -> 13683 bytes
-rw-r--r--applets/fish/wanda.svg3724
-rw-r--r--applets/notification_area/Makefile.am112
-rw-r--r--applets/notification_area/Makefile.in964
-rw-r--r--applets/notification_area/fixedtip.c269
-rw-r--r--applets/notification_area/fixedtip.h72
-rw-r--r--applets/notification_area/main.c267
-rw-r--r--applets/notification_area/na-marshal.c167
-rw-r--r--applets/notification_area/na-marshal.h36
-rw-r--r--applets/notification_area/na-marshal.list3
-rw-r--r--applets/notification_area/na-tray-child.c539
-rw-r--r--applets/notification_area/na-tray-child.h75
-rw-r--r--applets/notification_area/na-tray-manager.c859
-rw-r--r--applets/notification_area/na-tray-manager.h101
-rw-r--r--applets/notification_area/na-tray.c837
-rw-r--r--applets/notification_area/na-tray.h71
-rw-r--r--applets/notification_area/notification-area-menu.xml3
-rw-r--r--applets/notification_area/org.mate.panel.NotificationAreaApplet.mate-panel-applet.in.in17
-rw-r--r--applets/notification_area/org.mate.panel.applet.NotificationAreaAppletFactory.service.in3
-rw-r--r--applets/notification_area/testtray.c220
-rw-r--r--applets/wncklet/Makefile.am115
-rw-r--r--applets/wncklet/Makefile.in1075
-rw-r--r--applets/wncklet/org.mate.panel.Wncklet.mate-panel-applet.in.in50
-rw-r--r--applets/wncklet/org.mate.panel.applet.WnckletFactory.service.in3
-rw-r--r--applets/wncklet/showdesktop-menu.xml3
-rw-r--r--applets/wncklet/showdesktop.c533
-rw-r--r--applets/wncklet/showdesktop.h42
-rw-r--r--applets/wncklet/window-list-menu.xml4
-rw-r--r--applets/wncklet/window-list.c749
-rw-r--r--applets/wncklet/window-list.h25
-rw-r--r--applets/wncklet/window-list.schemas.in77
-rw-r--r--applets/wncklet/window-list.ui443
-rw-r--r--applets/wncklet/window-menu-menu.xml3
-rw-r--r--applets/wncklet/window-menu.c269
-rw-r--r--applets/wncklet/window-menu.h45
-rw-r--r--applets/wncklet/wncklet.c144
-rw-r--r--applets/wncklet/wncklet.h48
-rw-r--r--applets/wncklet/workspace-switcher-menu.xml6
-rw-r--r--applets/wncklet/workspace-switcher.c932
-rw-r--r--applets/wncklet/workspace-switcher.h25
-rw-r--r--applets/wncklet/workspace-switcher.schemas.in52
-rw-r--r--applets/wncklet/workspace-switcher.ui323
-rwxr-xr-xautogen.sh25
-rw-r--r--configure.ac445
-rw-r--r--distro/archlinux/PKGBUILD39
-rw-r--r--distro/archlinux/mate-panel.install31
-rwxr-xr-xdistro/ubuntu/build31
-rwxr-xr-xdistro/ubuntu/postinst15
-rwxr-xr-xdistro/ubuntu/postrm8
-rwxr-xr-xdistro/ubuntu/preinst7
-rwxr-xr-xdistro/ubuntu/prerm16
-rw-r--r--doc/Makefile.am7
-rw-r--r--doc/Makefile.in676
-rw-r--r--doc/panel-keynav.txt84
-rw-r--r--doc/panel-session-handling.txt250
-rw-r--r--doc/reference/Makefile.am3
-rw-r--r--doc/reference/Makefile.in672
-rw-r--r--doc/reference/mate-panel-applet/Makefile.am68
-rw-r--r--doc/reference/mate-panel-applet/Makefile.in804
-rw-r--r--doc/reference/mate-panel-applet/html/applet-popups.html31
-rw-r--r--doc/reference/mate-panel-applet/html/applet-porting.html207
-rw-r--r--doc/reference/mate-panel-applet/html/applet-writing.html93
-rw-r--r--doc/reference/mate-panel-applet/html/home.pngbin0 -> 654 bytes
-rw-r--r--doc/reference/mate-panel-applet/html/index.html64
-rw-r--r--doc/reference/mate-panel-applet/html/index.sgml69
-rw-r--r--doc/reference/mate-panel-applet/html/left.pngbin0 -> 459 bytes
-rw-r--r--doc/reference/mate-panel-applet/html/mate-panel-applet-Panel-Applet-MateConf-Utilities.html655
-rw-r--r--doc/reference/mate-panel-applet/html/mate-panel-applet-mate-panel-applet.html948
-rw-r--r--doc/reference/mate-panel-applet/html/mate-panel-applet.devhelp68
-rw-r--r--doc/reference/mate-panel-applet/html/mate-panel-applet.devhelp275
-rw-r--r--doc/reference/mate-panel-applet/html/mate-panel-applet.html38
-rw-r--r--doc/reference/mate-panel-applet/html/multi-applets.html31
-rw-r--r--doc/reference/mate-panel-applet/html/panel-signals.html31
-rw-r--r--doc/reference/mate-panel-applet/html/right.pngbin0 -> 472 bytes
-rw-r--r--doc/reference/mate-panel-applet/html/server-files.html67
-rw-r--r--doc/reference/mate-panel-applet/html/session-saving.html31
-rw-r--r--doc/reference/mate-panel-applet/html/style.css265
-rw-r--r--doc/reference/mate-panel-applet/html/up.pngbin0 -> 406 bytes
-rw-r--r--doc/reference/mate-panel-applet/mate-panel-applet-docs.sgml385
-rw-r--r--doc/reference/mate-panel-applet/mate-panel-applet-overrides.txt0
-rw-r--r--doc/reference/mate-panel-applet/mate-panel-applet-sections.txt67
-rw-r--r--doc/reference/mate-panel-applet/mate-panel-applet.types3
-rw-r--r--doc/reference/mate-panel-applet/tmpl/mate-panel-applet-mateconf.sgml263
-rw-r--r--doc/reference/mate-panel-applet/tmpl/mate-panel-applet-unused.sgml109
-rw-r--r--doc/reference/mate-panel-applet/tmpl/mate-panel-applet.sgml393
-rw-r--r--help/Makefile.am3
-rw-r--r--help/Makefile.in672
-rw-r--r--help/clock/C/figures/clock_applet.pngbin0 -> 406 bytes
-rw-r--r--help/clock/C/legal.xml64
-rw-r--r--help/clock/C/mate-applet-clock.xml466
-rw-r--r--help/clock/Makefile.am9
-rw-r--r--help/clock/Makefile.in1030
-rw-r--r--help/clock/ar/ar.po377
-rw-r--r--help/clock/ar/figures/clock_applet.pngbin0 -> 2312 bytes
-rw-r--r--help/clock/ca/ca.po373
-rw-r--r--help/clock/ca/figures/clock_applet.pngbin0 -> 1207 bytes
-rw-r--r--help/clock/cs/cs.po672
-rw-r--r--help/clock/cs/figures/clock_applet.pngbin0 -> 879 bytes
-rw-r--r--help/clock/da/da.po716
-rw-r--r--help/clock/de/de.po694
-rw-r--r--help/clock/de/figures/clock_applet.pngbin0 -> 1398 bytes
-rw-r--r--help/clock/el/el.po597
-rw-r--r--help/clock/el/figures/clock_applet.pngbin0 -> 2160 bytes
-rw-r--r--help/clock/en_GB/en_GB.po541
-rw-r--r--help/clock/es/es.po742
-rw-r--r--help/clock/es/figures/clock_applet.pngbin0 -> 1795 bytes
-rw-r--r--help/clock/eu/eu.po375
-rw-r--r--help/clock/eu/figures/clock_applet.pngbin0 -> 1274 bytes
-rw-r--r--help/clock/fi/fi.po420
-rw-r--r--help/clock/fr/figures/clock_applet.pngbin0 -> 1341 bytes
-rw-r--r--help/clock/fr/fr.po685
-rw-r--r--help/clock/it/figures/clock_applet.pngbin0 -> 1574 bytes
-rw-r--r--help/clock/it/it.po374
-rw-r--r--help/clock/ja/figures/clock_applet.pngbin0 -> 1589 bytes
-rw-r--r--help/clock/ja/ja.po696
-rw-r--r--help/clock/ko/figures/clock_applet.pngbin0 -> 418 bytes
-rw-r--r--help/clock/ko/ko.po529
-rw-r--r--help/clock/mate-applet-clock.omf.in11
-rw-r--r--help/clock/nl/figures/clock_applet.pngbin0 -> 406 bytes
-rw-r--r--help/clock/nl/nl.po957
-rw-r--r--help/clock/oc/oc.po466
-rw-r--r--help/clock/pa/pa.po486
-rw-r--r--help/clock/pt/pt.po547
-rw-r--r--help/clock/pt_BR/pt_BR.po545
-rw-r--r--help/clock/ru/ru.po427
-rw-r--r--help/clock/sr/figures/clock_applet.pngbin0 -> 1058 bytes
-rw-r--r--help/clock/sr/sr.po539
-rw-r--r--help/clock/sv/figures/clock_applet.pngbin0 -> 399 bytes
-rw-r--r--help/clock/sv/sv.po394
-rw-r--r--help/clock/th/figures/clock_applet.pngbin0 -> 1235 bytes
-rw-r--r--help/clock/th/th.po414
-rw-r--r--help/clock/uk/figures/clock_applet.pngbin0 -> 1923 bytes
-rw-r--r--help/clock/uk/uk.po538
-rw-r--r--help/clock/zh_CN/figures/clock_applet.pngbin0 -> 1444 bytes
-rw-r--r--help/clock/zh_CN/zh_CN.po676
-rw-r--r--help/clock/zh_HK/zh_HK.po659
-rw-r--r--help/clock/zh_TW/figures/clock_applet.pngbin0 -> 429 bytes
-rw-r--r--help/clock/zh_TW/zh_TW.po702
-rw-r--r--help/fish/C/figures/fish_applet.pngbin0 -> 5818 bytes
-rw-r--r--help/fish/C/legal.xml76
-rw-r--r--help/fish/C/mate-applet-fish.xml265
-rw-r--r--help/fish/Makefile.am9
-rw-r--r--help/fish/Makefile.in1030
-rw-r--r--help/fish/ca/ca.po269
-rw-r--r--help/fish/cs/cs.po453
-rw-r--r--help/fish/de/de.po463
-rw-r--r--help/fish/el/el.po364
-rw-r--r--help/fish/en_GB/en_GB.po409
-rw-r--r--help/fish/es/es.po464
-rw-r--r--help/fish/eu/eu.po271
-rw-r--r--help/fish/fi/fi.po316
-rw-r--r--help/fish/fr/fr.po446
-rw-r--r--help/fish/it/it.po457
-rw-r--r--help/fish/ja/ja.po433
-rw-r--r--help/fish/ko/figures/fish_applet.pngbin0 -> 5818 bytes
-rw-r--r--help/fish/ko/ko.po396
-rw-r--r--help/fish/mate-applet-fish.omf.in11
-rw-r--r--help/fish/oc/oc.po348
-rw-r--r--help/fish/ru/ru.po405
-rw-r--r--help/fish/sv/sv.po284
-rw-r--r--help/fish/th/th.po394
-rw-r--r--help/fish/uk/figures/fish_applet.pngbin0 -> 5818 bytes
-rw-r--r--help/fish/uk/uk.po405
-rw-r--r--help/fish/zh_CN/zh_CN.po421
-rw-r--r--icons/16x16/Makefile.am48
-rw-r--r--icons/16x16/Makefile.in564
-rw-r--r--icons/16x16/mate-panel-clock.pngbin0 -> 887 bytes
-rw-r--r--icons/16x16/mate-panel-clock.xcf.bz2bin0 -> 1399 bytes
-rw-r--r--icons/16x16/mate-panel-drawer.pngbin0 -> 444 bytes
-rw-r--r--icons/16x16/mate-panel-drawer.svg297
-rw-r--r--icons/16x16/mate-panel-fish.pngbin0 -> 740 bytes
-rw-r--r--icons/16x16/mate-panel-fish.xcf.bz2bin0 -> 1450 bytes
-rw-r--r--icons/16x16/mate-panel-force-quit.pngbin0 -> 711 bytes
-rw-r--r--icons/16x16/mate-panel-force-quit.svg144
-rw-r--r--icons/16x16/mate-panel-launcher.pngbin0 -> 571 bytes
-rw-r--r--icons/16x16/mate-panel-launcher.svg488
-rw-r--r--icons/16x16/mate-panel-notification-area.pngbin0 -> 812 bytes
-rw-r--r--icons/16x16/mate-panel-notification-area.svg285
-rw-r--r--icons/16x16/mate-panel-separator.pngbin0 -> 160 bytes
-rw-r--r--icons/16x16/mate-panel-separator.svg105
-rw-r--r--icons/16x16/mate-panel-window-list.pngbin0 -> 390 bytes
-rw-r--r--icons/16x16/mate-panel-window-list.xcf.bz2bin0 -> 657 bytes
-rw-r--r--icons/16x16/mate-panel-window-menu.pngbin0 -> 545 bytes
-rw-r--r--icons/16x16/mate-panel-window-menu.xcf.bz2bin0 -> 900 bytes
-rw-r--r--icons/16x16/mate-panel-workspace-switcher.pngbin0 -> 400 bytes
-rw-r--r--icons/16x16/mate-panel-workspace-switcher.svg186
-rw-r--r--icons/16x16/mate-panel.pngbin0 -> 354 bytes
-rw-r--r--icons/16x16/mate-panel.svg231
-rw-r--r--icons/22x22/Makefile.am48
-rw-r--r--icons/22x22/Makefile.in564
-rw-r--r--icons/22x22/mate-panel-clock.pngbin0 -> 1459 bytes
-rw-r--r--icons/22x22/mate-panel-clock.svg268
-rw-r--r--icons/22x22/mate-panel-drawer.pngbin0 -> 718 bytes
-rw-r--r--icons/22x22/mate-panel-drawer.svg352
-rw-r--r--icons/22x22/mate-panel-fish.pngbin0 -> 1461 bytes
-rw-r--r--icons/22x22/mate-panel-fish.xcf.bz2bin0 -> 2617 bytes
-rw-r--r--icons/22x22/mate-panel-force-quit.pngbin0 -> 1018 bytes
-rw-r--r--icons/22x22/mate-panel-force-quit.xcf.bz2bin0 -> 1598 bytes
-rw-r--r--icons/22x22/mate-panel-launcher.pngbin0 -> 955 bytes
-rw-r--r--icons/22x22/mate-panel-launcher.svg788
-rw-r--r--icons/22x22/mate-panel-notification-area.pngbin0 -> 1267 bytes
-rw-r--r--icons/22x22/mate-panel-notification-area.svg292
-rw-r--r--icons/22x22/mate-panel-separator.pngbin0 -> 165 bytes
-rw-r--r--icons/22x22/mate-panel-separator.svg105
-rw-r--r--icons/22x22/mate-panel-window-list.pngbin0 -> 609 bytes
-rw-r--r--icons/22x22/mate-panel-window-list.xcf.bz2bin0 -> 1174 bytes
-rw-r--r--icons/22x22/mate-panel-window-menu.pngbin0 -> 701 bytes
-rw-r--r--icons/22x22/mate-panel-window-menu.xcf.bz2bin0 -> 1485 bytes
-rw-r--r--icons/22x22/mate-panel-workspace-switcher.pngbin0 -> 537 bytes
-rw-r--r--icons/22x22/mate-panel-workspace-switcher.svg186
-rw-r--r--icons/22x22/mate-panel.pngbin0 -> 394 bytes
-rw-r--r--icons/22x22/mate-panel.svg230
-rw-r--r--icons/24x24/Makefile.am34
-rw-r--r--icons/24x24/Makefile.in550
-rw-r--r--icons/24x24/mate-panel-clock.pngbin0 -> 1510 bytes
-rw-r--r--icons/24x24/mate-panel-drawer.pngbin0 -> 715 bytes
-rw-r--r--icons/24x24/mate-panel-fish.pngbin0 -> 1475 bytes
-rw-r--r--icons/24x24/mate-panel-force-quit.pngbin0 -> 1045 bytes
-rw-r--r--icons/24x24/mate-panel-launcher.pngbin0 -> 1023 bytes
-rw-r--r--icons/24x24/mate-panel-notification-area.pngbin0 -> 1318 bytes
-rw-r--r--icons/24x24/mate-panel-separator.pngbin0 -> 191 bytes
-rw-r--r--icons/24x24/mate-panel-window-list.pngbin0 -> 649 bytes
-rw-r--r--icons/24x24/mate-panel-window-menu.pngbin0 -> 733 bytes
-rw-r--r--icons/24x24/mate-panel-workspace-switcher.pngbin0 -> 560 bytes
-rw-r--r--icons/24x24/mate-panel.pngbin0 -> 430 bytes
-rw-r--r--icons/32x32/Makefile.am48
-rw-r--r--icons/32x32/Makefile.in564
-rw-r--r--icons/32x32/mate-panel-clock.pngbin0 -> 2177 bytes
-rw-r--r--icons/32x32/mate-panel-clock.svg291
-rw-r--r--icons/32x32/mate-panel-drawer.pngbin0 -> 865 bytes
-rw-r--r--icons/32x32/mate-panel-drawer.svg486
-rw-r--r--icons/32x32/mate-panel-fish.pngbin0 -> 1785 bytes
-rw-r--r--icons/32x32/mate-panel-fish.svg656
-rw-r--r--icons/32x32/mate-panel-force-quit.pngbin0 -> 1588 bytes
-rw-r--r--icons/32x32/mate-panel-force-quit.svg362
-rw-r--r--icons/32x32/mate-panel-launcher.pngbin0 -> 1777 bytes
-rw-r--r--icons/32x32/mate-panel-launcher.svg710
-rw-r--r--icons/32x32/mate-panel-notification-area.pngbin0 -> 1712 bytes
-rw-r--r--icons/32x32/mate-panel-notification-area.svg291
-rw-r--r--icons/32x32/mate-panel-separator.pngbin0 -> 176 bytes
-rw-r--r--icons/32x32/mate-panel-separator.svg105
-rw-r--r--icons/32x32/mate-panel-window-list.pngbin0 -> 723 bytes
-rw-r--r--icons/32x32/mate-panel-window-list.svg170
-rw-r--r--icons/32x32/mate-panel-window-menu.pngbin0 -> 830 bytes
-rw-r--r--icons/32x32/mate-panel-window-menu.svg368
-rw-r--r--icons/32x32/mate-panel-workspace-switcher.pngbin0 -> 706 bytes
-rw-r--r--icons/32x32/mate-panel-workspace-switcher.svg452
-rw-r--r--icons/32x32/mate-panel.pngbin0 -> 1070 bytes
-rw-r--r--icons/32x32/mate-panel.svg202
-rw-r--r--icons/48x48/Makefile.am28
-rw-r--r--icons/48x48/Makefile.in544
-rw-r--r--icons/48x48/mate-panel.pngbin0 -> 1523 bytes
-rw-r--r--icons/48x48/mate-panel.svg274
-rw-r--r--icons/Makefile.am10
-rw-r--r--icons/Makefile.in725
-rw-r--r--icons/mate-gegl2-2.pngbin0 -> 10394 bytes
-rw-r--r--icons/mate-gegl2.pngbin0 -> 8359 bytes
-rw-r--r--icons/scalable/Makefile.am34
-rw-r--r--icons/scalable/Makefile.in550
-rw-r--r--icons/scalable/mate-panel-clock.svg450
-rw-r--r--icons/scalable/mate-panel-drawer.svg819
-rw-r--r--icons/scalable/mate-panel-fish.svg658
-rw-r--r--icons/scalable/mate-panel-force-quit.svg347
-rw-r--r--icons/scalable/mate-panel-launcher.svg724
-rw-r--r--icons/scalable/mate-panel-notification-area.svg289
-rw-r--r--icons/scalable/mate-panel-separator.svg105
-rw-r--r--icons/scalable/mate-panel-window-list.svg324
-rw-r--r--icons/scalable/mate-panel-window-menu.svg371
-rw-r--r--icons/scalable/mate-panel-workspace-switcher.svg361
-rw-r--r--icons/scalable/mate-panel.svg274
-rw-r--r--libmate-panel-applet/Makefile.am143
-rw-r--r--libmate-panel-applet/Makefile.in921
-rw-r--r--libmate-panel-applet/TODO14
-rw-r--r--libmate-panel-applet/libmatepanelapplet-3.0-uninstalled.pc.in11
-rw-r--r--libmate-panel-applet/libmatepanelapplet-3.0.pc.in11
-rw-r--r--libmate-panel-applet/mate-panel-applet-factory.c263
-rw-r--r--libmate-panel-applet/mate-panel-applet-factory.h57
-rw-r--r--libmate-panel-applet/mate-panel-applet-marshal.list5
-rw-r--r--libmate-panel-applet/mate-panel-applet-mateconf.c457
-rw-r--r--libmate-panel-applet/mate-panel-applet-mateconf.h90
-rw-r--r--libmate-panel-applet/mate-panel-applet.c2315
-rw-r--r--libmate-panel-applet/mate-panel-applet.h184
-rw-r--r--libmate-panel-applet/org.mate.panel.TestApplet.mate-panel-applet.in10
-rw-r--r--libmate-panel-applet/test-dbus-applet.c211
-rw-r--r--m4/d-type.m449
-rw-r--r--man/Makefile.am5
-rw-r--r--man/Makefile.in553
-rw-r--r--man/mate-panel.127
-rw-r--r--mate-panel/Makefile.am290
-rw-r--r--mate-panel/Makefile.in2222
-rw-r--r--mate-panel/applet.c1449
-rw-r--r--mate-panel/applet.h119
-rw-r--r--mate-panel/button-widget.c902
-rw-r--r--mate-panel/button-widget.h60
-rw-r--r--mate-panel/drawer.c806
-rw-r--r--mate-panel/drawer.h52
-rw-r--r--mate-panel/launcher.c1114
-rw-r--r--mate-panel/launcher.h80
-rw-r--r--mate-panel/libegg/Makefile.am25
-rw-r--r--mate-panel/libegg/Makefile.in622
-rw-r--r--mate-panel/libegg/eggdesktopfile.c1510
-rw-r--r--mate-panel/libegg/eggdesktopfile.h164
-rw-r--r--mate-panel/libegg/eggsmclient-private.h57
-rw-r--r--mate-panel/libegg/eggsmclient-xsmp.c1370
-rw-r--r--mate-panel/libegg/eggsmclient.c604
-rw-r--r--mate-panel/libegg/eggsmclient.h121
-rw-r--r--mate-panel/libmate-panel-applet-private/Makefile.am34
-rw-r--r--mate-panel/libmate-panel-applet-private/Makefile.in644
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applet-container.c790
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applet-container.h118
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applet-frame-dbus.c468
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applet-frame-dbus.h65
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applet-mini.c5
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applets-manager-dbus.c604
-rw-r--r--mate-panel/libmate-panel-applet-private/mate-panel-applets-manager-dbus.h60
-rw-r--r--mate-panel/libpanel-util/Makefile.am39
-rw-r--r--mate-panel/libpanel-util/Makefile.in647
-rw-r--r--mate-panel/libpanel-util/panel-cleanup.c110
-rw-r--r--mate-panel/libpanel-util/panel-cleanup.h51
-rw-r--r--mate-panel/libpanel-util/panel-dbus-service.c307
-rw-r--r--mate-panel/libpanel-util/panel-dbus-service.h78
-rw-r--r--mate-panel/libpanel-util/panel-error.c96
-rw-r--r--mate-panel/libpanel-util/panel-error.h49
-rw-r--r--mate-panel/libpanel-util/panel-glib.c164
-rw-r--r--mate-panel/libpanel-util/panel-glib.h46
-rw-r--r--mate-panel/libpanel-util/panel-gtk.c83
-rw-r--r--mate-panel/libpanel-util/panel-gtk.h42
-rw-r--r--mate-panel/libpanel-util/panel-icon-chooser.c555
-rw-r--r--mate-panel/libpanel-util/panel-icon-chooser.h79
-rw-r--r--mate-panel/libpanel-util/panel-keyfile.c363
-rw-r--r--mate-panel/libpanel-util/panel-keyfile.h79
-rw-r--r--mate-panel/libpanel-util/panel-launch.c234
-rw-r--r--mate-panel/libpanel-util/panel-launch.h65
-rw-r--r--mate-panel/libpanel-util/panel-list.c212
-rw-r--r--mate-panel/libpanel-util/panel-list.h56
-rw-r--r--mate-panel/libpanel-util/panel-session-manager.c192
-rw-r--r--mate-panel/libpanel-util/panel-session-manager.h75
-rw-r--r--mate-panel/libpanel-util/panel-show.c283
-rw-r--r--mate-panel/libpanel-util/panel-show.h54
-rw-r--r--mate-panel/libpanel-util/panel-xdg.c152
-rw-r--r--mate-panel/libpanel-util/panel-xdg.h43
-rw-r--r--mate-panel/main.c153
-rw-r--r--mate-panel/mate-desktop-item-edit.c225
-rw-r--r--mate-panel/mate-panel-add.in325
-rw-r--r--mate-panel/mate-panel-applet-frame.c1002
-rw-r--r--mate-panel/mate-panel-applet-frame.h146
-rw-r--r--mate-panel/mate-panel-applet-info.c113
-rw-r--r--mate-panel/mate-panel-applet-info.h51
-rw-r--r--mate-panel/mate-panel-applets-manager.c201
-rw-r--r--mate-panel/mate-panel-applets-manager.h94
-rw-r--r--mate-panel/mate-panel.desktop.in.in19
-rw-r--r--mate-panel/mate-panelrc4
-rw-r--r--mate-panel/menu.c1914
-rw-r--r--mate-panel/menu.h80
-rw-r--r--mate-panel/nothing.cP1568
-rw-r--r--mate-panel/nothing.h22
-rw-r--r--mate-panel/panel-a11y.c135
-rw-r--r--mate-panel/panel-a11y.h43
-rw-r--r--mate-panel/panel-action-button.c907
-rw-r--r--mate-panel/panel-action-button.h103
-rw-r--r--mate-panel/panel-action-protocol.c158
-rw-r--r--mate-panel/panel-action-protocol.h40
-rw-r--r--mate-panel/panel-addto.c1428
-rw-r--r--mate-panel/panel-addto.h39
-rw-r--r--mate-panel/panel-background-monitor.c440
-rw-r--r--mate-panel/panel-background-monitor.h60
-rw-r--r--mate-panel/panel-background.c1156
-rw-r--r--mate-panel/panel-background.h133
-rw-r--r--mate-panel/panel-bindings.c303
-rw-r--r--mate-panel/panel-bindings.h42
-rw-r--r--mate-panel/panel-compatibility.c1167
-rw-r--r--mate-panel/panel-compatibility.h48
-rw-r--r--mate-panel/panel-compatibility.schemas546
-rw-r--r--mate-panel/panel-config-global.c153
-rw-r--r--mate-panel/panel-config-global.h47
-rw-r--r--mate-panel/panel-context-menu.c307
-rw-r--r--mate-panel/panel-context-menu.h33
-rw-r--r--mate-panel/panel-default-setup.entries657
-rw-r--r--mate-panel/panel-ditem-editor.c1804
-rw-r--r--mate-panel/panel-ditem-editor.h115
-rw-r--r--mate-panel/panel-enums.h110
-rw-r--r--mate-panel/panel-force-quit.c316
-rw-r--r--mate-panel/panel-force-quit.h41
-rw-r--r--mate-panel/panel-frame.c328
-rw-r--r--mate-panel/panel-frame.h69
-rw-r--r--mate-panel/panel-general.schemas.in127
-rw-r--r--mate-panel/panel-global.schemas.in276
-rw-r--r--mate-panel/panel-globals.h41
-rw-r--r--mate-panel/panel-icon-names.h40
-rw-r--r--mate-panel/panel-lockdown.c442
-rw-r--r--mate-panel/panel-lockdown.h55
-rw-r--r--mate-panel/panel-marshal.list3
-rw-r--r--mate-panel/panel-mateconf.c351
-rw-r--r--mate-panel/panel-mateconf.h76
-rw-r--r--mate-panel/panel-menu-bar.c474
-rw-r--r--mate-panel/panel-menu-bar.h83
-rw-r--r--mate-panel/panel-menu-button.c1194
-rw-r--r--mate-panel/panel-menu-button.h98
-rw-r--r--mate-panel/panel-menu-items.c1618
-rw-r--r--mate-panel/panel-menu-items.h99
-rw-r--r--mate-panel/panel-modules.c86
-rw-r--r--mate-panel/panel-modules.h30
-rw-r--r--mate-panel/panel-multiscreen.c784
-rw-r--r--mate-panel/panel-multiscreen.h58
-rw-r--r--mate-panel/panel-object.schemas.in247
-rw-r--r--mate-panel/panel-profile.c2647
-rw-r--r--mate-panel/panel-profile.h188
-rw-r--r--mate-panel/panel-properties-dialog.c999
-rw-r--r--mate-panel/panel-properties-dialog.h40
-rw-r--r--mate-panel/panel-properties-dialog.ui769
-rw-r--r--mate-panel/panel-recent.c243
-rw-r--r--mate-panel/panel-recent.h41
-rw-r--r--mate-panel/panel-reset.c46
-rw-r--r--mate-panel/panel-reset.h37
-rw-r--r--mate-panel/panel-run-dialog.c2041
-rw-r--r--mate-panel/panel-run-dialog.h41
-rw-r--r--mate-panel/panel-run-dialog.ui270
-rw-r--r--mate-panel/panel-separator.c250
-rw-r--r--mate-panel/panel-separator.h71
-rw-r--r--mate-panel/panel-session.c80
-rw-r--r--mate-panel/panel-session.h39
-rw-r--r--mate-panel/panel-shell.c164
-rw-r--r--mate-panel/panel-shell.h37
-rw-r--r--mate-panel/panel-stock-icons.c141
-rw-r--r--mate-panel/panel-stock-icons.h60
-rw-r--r--mate-panel/panel-struts.c516
-rw-r--r--mate-panel/panel-struts.h56
-rw-r--r--mate-panel/panel-test-applets.c388
-rw-r--r--mate-panel/panel-test-applets.ui203
-rw-r--r--mate-panel/panel-toplevel.c5298
-rw-r--r--mate-panel/panel-toplevel.h179
-rw-r--r--mate-panel/panel-toplevel.schemas.in434
-rw-r--r--mate-panel/panel-types.h19
-rw-r--r--mate-panel/panel-util.c1210
-rw-r--r--mate-panel/panel-util.h72
-rw-r--r--mate-panel/panel-widget.c3010
-rw-r--r--mate-panel/panel-widget.h242
-rw-r--r--mate-panel/panel-xutils.c258
-rw-r--r--mate-panel/panel-xutils.h64
-rw-r--r--mate-panel/panel.c1403
-rw-r--r--mate-panel/panel.h57
-rw-r--r--mate-panel/xstuff.c736
-rw-r--r--mate-panel/xstuff.h39
-rw-r--r--matecomponent/Makefile.am3
-rw-r--r--matecomponent/Makefile.in672
-rw-r--r--matecomponent/idl/MATE_Panel.idl51
-rw-r--r--matecomponent/idl/Makefile.am6
-rw-r--r--matecomponent/idl/Makefile.in520
-rw-r--r--matecomponent/libmate-panel-applet/MATE_Panel_TestApplet.server.in31
-rw-r--r--matecomponent/libmate-panel-applet/Makefile.am129
-rw-r--r--matecomponent/libmate-panel-applet/Makefile.in952
-rw-r--r--matecomponent/libmate-panel-applet/TODO14
-rw-r--r--matecomponent/libmate-panel-applet/libmatepanelapplet-2.0-uninstalled.pc.in11
-rw-r--r--matecomponent/libmate-panel-applet/libmatepanelapplet-2.0.pc.in11
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-marshal.list5
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-mateconf.c458
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-mateconf.h90
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-private.h40
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-shell.c105
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet-shell.h62
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet.c1879
-rw-r--r--matecomponent/libmate-panel-applet/mate-panel-applet.h258
-rw-r--r--matecomponent/libmate-panel-applet/panel-test-applets-matecomponent.c349
-rw-r--r--matecomponent/libmate-panel-applet/panel-test-applets-matecomponent.ui203
-rw-r--r--matecomponent/libmate-panel-applet/test-matecomponent-applet.c204
-rw-r--r--matecomponent/panel-module/MATE_Panel_Popup.xml20
-rw-r--r--matecomponent/panel-module/Makefile.am51
-rw-r--r--matecomponent/panel-module/Makefile.in786
-rw-r--r--matecomponent/panel-module/mate-panel-applet-frame-matecomponent.c759
-rw-r--r--matecomponent/panel-module/mate-panel-applet-frame-matecomponent.h65
-rw-r--r--matecomponent/panel-module/mate-panel-applets-manager-matecomponent.c250
-rw-r--r--matecomponent/panel-module/mate-panel-applets-manager-matecomponent.h59
-rw-r--r--matecomponent/panel-module/mate-panel-applets-matecomponent-module.c48
-rw-r--r--po/LINGUAS109
-rw-r--r--po/Makefile.in.in217
-rw-r--r--po/POTFILES.in80
-rw-r--r--po/POTFILES.skip7
-rw-r--r--po/af.po4154
-rw-r--r--po/am.po3084
-rw-r--r--po/ar.po3411
-rw-r--r--po/as.po3490
-rw-r--r--po/ast.po3438
-rw-r--r--po/az.po2979
-rw-r--r--po/be.po3606
-rw-r--r--po/[email protected]3531
-rw-r--r--po/bg.po3289
-rw-r--r--po/bn.po3320
-rw-r--r--po/bn_IN.po3264
-rw-r--r--po/br.po2963
-rw-r--r--po/bs.po3005
-rw-r--r--po/ca.po7962
-rw-r--r--po/[email protected]7944
-rw-r--r--po/crh.po3443
-rw-r--r--po/cs.po3268
-rw-r--r--po/cy.po3750
-rw-r--r--po/da.po5305
-rw-r--r--po/de.po3527
-rw-r--r--po/dz.po3076
-rw-r--r--po/el.po3503
-rw-r--r--po/[email protected]3277
-rw-r--r--po/en_CA.po2854
-rw-r--r--po/en_GB.po3746
-rw-r--r--po/eo.po3443
-rw-r--r--po/es.po3605
-rw-r--r--po/et.po2644
-rw-r--r--po/eu.po3332
-rw-r--r--po/fa.po3805
-rw-r--r--po/fi.po3897
-rw-r--r--po/fr.po3365
-rw-r--r--po/fur.po3385
-rw-r--r--po/fy.po3059
-rw-r--r--po/ga.po3054
-rw-r--r--po/gl.po3340
-rw-r--r--po/gu.po3246
-rw-r--r--po/gv.po3395
-rw-r--r--po/ha.po3544
-rw-r--r--po/he.po3434
-rw-r--r--po/hi.po3244
-rw-r--r--po/hr.po3335
-rw-r--r--po/hu.po3293
-rw-r--r--po/hy.po3231
-rw-r--r--po/id.po3300
-rw-r--r--po/ig.po3493
-rw-r--r--po/is.po3332
-rw-r--r--po/it.po3447
-rw-r--r--po/ja.po3346
-rw-r--r--po/ka.po3422
-rw-r--r--po/kk.po2809
-rw-r--r--po/kn.po3327
-rw-r--r--po/ko.po3221
-rw-r--r--po/ku.po2996
-rw-r--r--po/ky.po2624
-rw-r--r--po/la.po3014
-rw-r--r--po/li.po4056
-rw-r--r--po/lt.po3382
-rw-r--r--po/lv.po3442
-rw-r--r--po/mai.po3162
-rw-r--r--po/mg.po3826
-rw-r--r--po/mi.po2506
-rw-r--r--po/mk.po3358
-rw-r--r--po/ml.po3276
-rw-r--r--po/mn.po2852
-rw-r--r--po/mr.po3220
-rw-r--r--po/ms.po3851
-rw-r--r--po/nb.po3278
-rw-r--r--po/nds.po2993
-rw-r--r--po/ne.po3024
-rw-r--r--po/nl.po3705
-rw-r--r--po/nn.po3691
-rw-r--r--po/nso.po3125
-rw-r--r--po/oc.po3165
-rw-r--r--po/or.po3225
-rw-r--r--po/pa.po3322
-rw-r--r--po/pl.po3281
-rw-r--r--po/ps.po3148
-rw-r--r--po/pt.po4359
-rw-r--r--po/pt_BR.po3651
-rw-r--r--po/ro.po3384
-rw-r--r--po/ru.po2852
-rw-r--r--po/rw.po3037
-rw-r--r--po/si.po2717
-rw-r--r--po/sk.po3641
-rw-r--r--po/sl.po2859
-rw-r--r--po/sq.po3289
-rw-r--r--po/sr.po4134
-rw-r--r--po/[email protected]3331
-rw-r--r--po/[email protected]4134
-rw-r--r--po/sv.po2906
-rw-r--r--po/ta.po3583
-rw-r--r--po/te.po3292
-rw-r--r--po/th.po4245
-rw-r--r--po/tr.po3505
-rw-r--r--po/ug.po3408
-rw-r--r--po/uk.po3327
-rw-r--r--po/uz.po2948
-rw-r--r--po/[email protected]2948
-rw-r--r--po/vi.po2818
-rw-r--r--po/wa.po3731
-rw-r--r--po/xh.po2834
-rw-r--r--po/yi.po2700
-rw-r--r--po/yo.po3496
-rw-r--r--po/zh_CN.po3356
-rw-r--r--po/zh_HK.po3353
-rw-r--r--po/zh_TW.po3483
-rw-r--r--po/zu.po3033
657 files changed, 536681 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..ddbcfc1a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,52 @@
+mate-panel authors
+-------------------
+
+George Lebl <[email protected]>
+Jacob Berkman <[email protected]>
+Miguel de Icaza <[email protected]>
+Federico Mena <[email protected]>
+Tom Tromey <[email protected]>
+Ian Main <[email protected]>
+Elliot Lee <[email protected]>
+Owen Taylor <[email protected]>
+Mark McLoughlin <[email protected]>
+Alex Larsson <[email protected]>
+Martin Baulig <[email protected]>
+Seth Nickell <[email protected]>
+Darin Adler <[email protected]>
+Glynn Foster <[email protected]>
+Stephen Browne <[email protected]>
+Anders Carlsson <[email protected]>
+Padraig O'Briain <[email protected]>
+Ian McKellar <[email protected]>
+Arvind Samptur <[email protected]>
+Vincent Untz <[email protected]>
+
+new libmate-panel-applet authors
+---------------------------
+Carlos Garcia Campos <[email protected]>
+
+old libmate-panel-applet authors
+---------------------------
+
+Mark McLoughlin <[email protected]>
+Padraig O'Briain <[email protected]>
+
+applets authors
+---------------
+
+Miguel de Icaza <[email protected]>
+Jacob Berkman <[email protected]>
+George Lebl <[email protected]>
+Federico Mena <[email protected]>
+Alex Larsson <[email protected]>
+Jaka Mocnik <[email protected]>
+Lennart Poettering <[email protected]>
+Havoc Pennington <[email protected]>
+Vincent Untz <[email protected]>
+
+fish applet authors
+-------------------
+
+Wanda The Fish <[email protected]>
+George Lebl <[email protected]>
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..d159169d
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/COPYING-DOCS b/COPYING-DOCS
new file mode 100644
index 00000000..1d742231
--- /dev/null
+++ b/COPYING-DOCS
@@ -0,0 +1,355 @@
+ GNU Free Documentation License
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/COPYING.LIB b/COPYING.LIB
new file mode 100644
index 00000000..5bc8fb2c
--- /dev/null
+++ b/COPYING.LIB
@@ -0,0 +1,481 @@
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it. You can use it for
+your libraries, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library. If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software. To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+ Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs. This
+license, the GNU Library General Public License, applies to certain
+designated libraries. This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+ The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it. Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program. However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+ Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries. We
+concluded that weaker conditions might promote sharing better.
+
+ However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves. This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them. (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is that this
+will lead to faster development of free libraries.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+ Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License"). Each licensee is
+addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 00000000..108af354
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3 @@
+Amnesia
+
+Check the ChangeLog from gnome-panel at gnome.org
diff --git a/HACKING b/HACKING
new file mode 100644
index 00000000..9f5df32a
--- /dev/null
+++ b/HACKING
@@ -0,0 +1,31 @@
+Hacking on mate-panel
+======================
+
+ + The development occurs in git:
+
+ http://git.gnome.org/browse/mate-panel
+
+ For information on how to access MATE git please read:
+
+ http://live.gnome.org/Git
+
+ + Please send patches as bug reports in MATE Bugzilla:
+
+ https://bugzilla.gnome.org/ (product mate-panel)
+
+ Your patch should be in unified diff form (the -u option to GNU
+ diff). See also:
+
+ http://live.gnome.org/MateLove/SubmittingPatches
+
+ + Please try and send a patch against a recent version of this package.
+ Patches against git master are most preferable.
+
+ + Don't commit any but the most trivial patches without approval.
+
+ + Exceptions to this are:
+
+ - Translators may commit basic i18n related patches to the build
+ setup.
+ - Build sheriff are welcome - in accordance with the relevant build
+ sheriff constraints.
diff --git a/MAINTAINERS b/MAINTAINERS
new file mode 100644
index 00000000..5a559baf
--- /dev/null
+++ b/MAINTAINERS
@@ -0,0 +1,18 @@
+Currently active maintainers
+----------------------------
+
+Vincent Untz
+Userid: vuntz
+
+Non-active maintainers, who have a good understanding of the code
+-----------------------------------------------------------------
+
+#Mark McLoughlin
+
+#Arvind Samptur
+
+#George Lebl
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..db8051e9
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,53 @@
+SUBDIRS = \
+ mate-panel \
+ libmate-panel-applet \
+ applets \
+ doc \
+ help \
+ icons \
+ man \
+ po
+
+if HAVE_MATECOMPONENT
+SUBDIRS += matecomponent
+endif
+
+ACLOCAL_AMFLAGS = -I m4
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --disable-scrollkeeper
+
+EXTRA_DIST = \
+ COPYING-DOCS \
+ HACKING \
+ MAINTAINERS \
+ ChangeLog.pre-git \
+ mate-doc-utils.make
+
+DISTCLEANFILES = \
+ mate-doc-utils.make
+
+MAINTAINERCLEANFILES = \
+ $(srcdir)/INSTALL \
+ $(srcdir)/aclocal.m4 \
+ $(srcdir)/compile \
+ $(srcdir)/config.guess \
+ $(srcdir)/config.h.in \
+ $(srcdir)/config.sub \
+ $(srcdir)/depcomp \
+ $(srcdir)/install-sh \
+ $(srcdir)/ltmain.sh \
+ $(srcdir)/missing \
+ $(srcdir)/mkinstalldirs \
+ `find "$(srcdir)" -type f -name Makefile.in -print` \
+ $(srcdir)/configure \
+ $(srcdir)/gtk-doc.make \
+ $(srcdir)/m4/mate-doc-utils.m4 \
+ $(srcdir)/m4/gtk-doc.m4 \
+ $(srcdir)/m4/intltool.m4 \
+ $(srcdir)/m4/libtool.m4 \
+ $(srcdir)/m4/ltoptions.m4 \
+ $(srcdir)/m4/ltsugar.m4 \
+ $(srcdir)/m4/ltversion.m4 \
+ $(srcdir)/m4/lt~obsolete.m4
+
+-include $(top_srcdir)/git.mk
diff --git a/NEWS b/NEWS
new file mode 100644
index 00000000..df1b506c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,3 @@
+Amnesia
+
+Check the NEWS from gnome-panel at gnome.org
diff --git a/README b/README
new file mode 100644
index 00000000..15efd904
--- /dev/null
+++ b/README
@@ -0,0 +1,49 @@
+mate-panel
+===========
+
+mate-panel contains the MATE panel, the libmate-panel-applet library and
+several applets:
+
+ + the MATE panel is the area on your desktop from which you can run
+ applications and applets, and perform other tasks.
+
+ + the libmate-panel-applet library allows to develop small applications
+ which may be embedded in the panel. These are called applets.
+ Documentation for the API is available with gtk-doc.
+
+ + the applets supplied here include the Workspace Switcher, the Window
+ List, the Window Selector, the Notification Area, the Clock and the
+ infamous 'Wanda the Fish'.
+
+You may download updates to the package from:
+
+ http://download.gnome.org/sources/mate-panel/
+
+To discuss mate-panel, you may use the desktop-devel-list mailing list:
+
+ http://mail.gnome.org/mailman/listinfo/desktop-devel-list
+
+
+Installation
+============
+
+See the file 'INSTALL'. If you are not using a released version of
+mate-panel (for example, if you checked out the code from git), you
+first need to run './autogen.sh'.
+
+
+How to report bugs
+==================
+
+Bugs should be reported to the MATE bug tracking system:
+
+ https://bugzilla.gnome.org/ (product mate-panel)
+
+You will need to create an account for yourself.
+
+Please read the following page on how to prepare a useful bug report:
+
+ https://bugzilla.gnome.org/page.cgi?id=bug-writing.html
+
+Please read the HACKING file for information on where to send changes or
+bugfixes for this package.
diff --git a/applets/Makefile.am b/applets/Makefile.am
new file mode 100644
index 00000000..e1e952db
--- /dev/null
+++ b/applets/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = \
+ clock \
+ fish \
+ notification_area \
+ wncklet
+
+-include $(top_srcdir)/git.mk
diff --git a/applets/Makefile.in b/applets/Makefile.in
new file mode 100644
index 00000000..b95402fe
--- /dev/null
+++ b/applets/Makefile.in
@@ -0,0 +1,677 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+pkgdatadir = $(datadir)/@[email protected]
+pkgincludedir = $(includedir)/@[email protected]
+pkglibdir = $(libdir)/@[email protected]
+pkglibexecdir = $(libexecdir)/@[email protected]
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @[email protected]
+host_triplet = @[email protected]
+subdir = applets
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/d-type.m4 \
+ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/mate-doc-utils.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " [email protected];
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @[email protected]
+ACLOCAL_AMFLAGS = @[email protected]
+ALL_LINGUAS = @[email protected]
+AM_DEFAULT_VERBOSITY = @[email protected]
+AUTOCONF = @[email protected]
+AUTOHEADER = @[email protected]
+AUTOMAKE = @[email protected]
+CATALOGS = @[email protected]
+CATOBJEXT = @[email protected]
+CCDEPMODE = @[email protected]
+CLOCK_CFLAGS = @[email protected]
+CLOCK_EDS_ICONDIR = @[email protected]
+CLOCK_LIBS = @[email protected]
+CPPFLAGS = @[email protected]
+CYGPATH_W = @[email protected]
+DATADIRNAME = @[email protected]
+DISABLE_DEPRECATED = @[email protected]
+DISABLE_DEPRECATED_CFLAGS = @[email protected]
+DISTCHECK_CONFIGURE_FLAGS = @[email protected]
+DLLTOOL = @[email protected]
+DOC_USER_FORMATS = @[email protected]
+DSYMUTIL = @[email protected]
+DUMPBIN = @[email protected]
+EGG_SMCLIENT_CFLAGS = @[email protected]
+EGG_SMCLIENT_LIBS = @[email protected]
+FISH_CFLAGS = @[email protected]
+FISH_LIBS = @[email protected]
+GETTEXT_PACKAGE = @[email protected]
+GIO_QUERYMODULES = @[email protected]
+GLIB_GENMARSHAL = @[email protected]
+GMOFILES = @[email protected]
+GMSGFMT = @[email protected]
+GTKDOC_CHECK = @[email protected]
+GTKDOC_DEPS_CFLAGS = @[email protected]
+GTKDOC_DEPS_LIBS = @[email protected]
+GTKDOC_MKPDF = @[email protected]
+GTKDOC_REBASE = @[email protected]
+HELP_DIR = @[email protected]
+HTML_DIR = @[email protected]
+INSTALL = @[email protected]
+INSTALL_DATA = @[email protected]
+INSTALL_PROGRAM = @[email protected]
+INSTALL_SCRIPT = @[email protected]
+INSTALL_STRIP_PROGRAM = @[email protected]
+INSTOBJEXT = @[email protected]
+INTLLIBS = @[email protected]
+INTLTOOL_EXTRACT = @[email protected]
+INTLTOOL_MERGE = @[email protected]
+INTLTOOL_PERL = @[email protected]
+INTLTOOL_UPDATE = @[email protected]
+INTROSPECTION_CFLAGS = @[email protected]
+INTROSPECTION_COMPILER = @[email protected]
+INTROSPECTION_GENERATE = @[email protected]
+INTROSPECTION_GIRDIR = @[email protected]
+INTROSPECTION_LIBS = @[email protected]
+INTROSPECTION_MAKEFILE = @[email protected]
+INTROSPECTION_SCANNER = @[email protected]
+INTROSPECTION_TYPELIBDIR = @[email protected]
+LDFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_CFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_LIBS = @[email protected]
+LIBMATE_PANEL_APPLET_MATECOMPONENT_CFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_MATECOMPONENT_LIBS = @[email protected]
+LIBOBJS = @[email protected]
+LIBTOOL = @[email protected]
+LIB_MATE_PANEL_APPLET_LT_VERSION = @[email protected]
+LIB_MATE_PANEL_APPLET_MATECOMPONENT_LT_VERSION = @[email protected]
+LTLIBOBJS = @[email protected]
+MAKEINFO = @[email protected]
+MANIFEST_TOOL = @[email protected]
+MATECOMPONENT_ACT_IDLDIR = @[email protected]
+MATECOMPONENT_CFLAGS = @[email protected]
+MATECOMPONENT_IDLDIR = @[email protected]
+MATECOMPONENT_LIBS = @[email protected]
+MATECONFTOOL = @[email protected]
+MATECONF_SCHEMA_CONFIG_SOURCE = @[email protected]
+MATECONF_SCHEMA_FILE_DIR = @[email protected]
+MATECORBA_IDL = @[email protected]
+MKDIR_P = @[email protected]
+MKINSTALLDIRS = @[email protected]
+MSGFMT_OPTS = @[email protected]
+MSGMERGE = @[email protected]
+NETWORK_MANAGER_CFLAGS = @[email protected]
+NETWORK_MANAGER_LIBS = @[email protected]
+NOTIFICATION_AREA_CFLAGS = @[email protected]
+NOTIFICATION_AREA_LIBS = @[email protected]
+OBJDUMP = @[email protected]
+OMF_DIR = @[email protected]
+OTOOL64 = @[email protected]
+PACKAGE = @[email protected]
+PACKAGE_BUGREPORT = @[email protected]
+PACKAGE_NAME = @[email protected]
+PACKAGE_STRING = @[email protected]
+PACKAGE_TARNAME = @[email protected]
+PACKAGE_URL = @[email protected]
+PACKAGE_VERSION = @[email protected]
+PANEL_CFLAGS = @[email protected]
+PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE = @[email protected]
+PANEL_LIBS = @[email protected]
+PANEL_MODULE_MATECOMPONENT_CFLAGS = @[email protected]
+PANEL_MODULE_MATECOMPONENT_LIBS = @[email protected]
+PATH_SEPARATOR = @[email protected]
+PKG_CONFIG = @[email protected]
+PKG_CONFIG_LIBDIR = @[email protected]
+PKG_CONFIG_PATH = @[email protected]
+POFILES = @[email protected]
+PO_IN_DATADIR_FALSE = @[email protected]
+PO_IN_DATADIR_TRUE = @[email protected]
+PYTHON_EXEC_PREFIX = @[email protected]
+PYTHON_PLATFORM = @[email protected]
+PYTHON_PREFIX = @[email protected]
+PYTHON_VERSION = @[email protected]
+REBUILD = @[email protected]
+SET_MAKE = @[email protected]
+TZ_CFLAGS = @[email protected]
+TZ_LIBS = @[email protected]
+USE_NLS = @[email protected]
+VERSION = @[email protected]
+WARN_CFLAGS = @[email protected]
+WNCKLET_CFLAGS = @[email protected]
+WNCKLET_LIBS = @[email protected]
+XGETTEXT = @[email protected]
+XRANDR_CFLAGS = @[email protected]
+XRANDR_LIBS = @[email protected]
+X_CFLAGS = @[email protected]
+X_EXTRA_LIBS = @[email protected]
+X_PRE_LIBS = @[email protected]
+abs_builddir = @[email protected]
+abs_srcdir = @[email protected]
+abs_top_builddir = @[email protected]
+abs_top_srcdir = @[email protected]
+ac_ct_AR = @[email protected]
+ac_ct_CC = @[email protected]
+ac_ct_DUMPBIN = @[email protected]
+am__include = @[email protected]
+am__leading_dot = @[email protected]
+am__quote = @[email protected]
+am__tar = @[email protected]
+am__untar = @[email protected]
+appletsdir = @[email protected]
+build_alias = @[email protected]
+build_cpu = @[email protected]
+build_os = @[email protected]
+build_vendor = @[email protected]
+builddir = @[email protected]
+datadir = @[email protected]
+datarootdir = @[email protected]
+exec_prefix = @[email protected]
+host_alias = @[email protected]
+host_cpu = @[email protected]
+host_os = @[email protected]
+host_vendor = @[email protected]
+htmldir = @[email protected]
+includedir = @[email protected]
+infodir = @[email protected]
+install_sh = @[email protected]
+libexecdir = @[email protected]
+localedir = @[email protected]
+localstatedir = @[email protected]
+mkdir_p = @[email protected]
+modulesdir = @[email protected]
+oldincludedir = @[email protected]
+pkgpyexecdir = @[email protected]
+pkgpythondir = @[email protected]
+program_transform_name = @[email protected]
+pyexecdir = @[email protected]
+pythondir = @[email protected]
+sbindir = @[email protected]
+sharedstatedir = @[email protected]
+sysconfdir = @[email protected]
+target_alias = @[email protected]
+top_build_prefix = @[email protected]
+top_builddir = @[email protected]
+top_srcdir = @[email protected]
+SUBDIRS = \
+ clock \
+ fish \
+ notification_area \
+ wncklet
+
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @[email protected] $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f [email protected]; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu applets/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu applets/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @[email protected] $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @[email protected] $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo [email protected] | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "[email protected]" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo [email protected] | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "[email protected]" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "[email protected]" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/applets/clock/Makefile.am b/applets/clock/Makefile.am
new file mode 100644
index 00000000..afda6eb2
--- /dev/null
+++ b/applets/clock/Makefile.am
@@ -0,0 +1,205 @@
+SUBDIRS = pixmaps
+
+noinst_LTLIBRARIES = libsystem-timezone.la
+noinst_PROGRAMS = test-system-timezone
+
+AM_CPPFLAGS = \
+ $(TZ_CFLAGS) \
+ $(DISABLE_DEPRECATED_CFLAGS)
+
+AM_CFLAGS = $(WARN_CFLAGS)
+
+libsystem_timezone_la_SOURCES = \
+ system-timezone.c \
+ system-timezone.h
+libsystem_timezone_la_LIBADD = $(TZ_LIBS)
+
+if HAVE_LIBECAL
+CALENDAR_SOURCES = \
+ calendar-client.c \
+ calendar-client.h \
+ calendar-sources.c \
+ calendar-sources.h \
+ calendar-debug.h
+endif
+
+CLOCK_SOURCES = \
+ calendar-window.c \
+ calendar-window.h \
+ clock.c \
+ clock.h \
+ clock-face.c \
+ clock-face.h \
+ clock-location.c \
+ clock-location.h \
+ clock-location-tile.c \
+ clock-location-tile.h \
+ clock-map.c \
+ clock-map.h \
+ clock-sunpos.c \
+ clock-sunpos.h \
+ clock-utils.c \
+ clock-utils.h \
+ set-timezone.c \
+ set-timezone.h \
+ $(BUILT_SOURCES) \
+ $(CALENDAR_SOURCES)
+
+CLOCK_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(LIBMATE_PANEL_APPLET_CFLAGS) \
+ $(CLOCK_CFLAGS) \
+ -I$(srcdir)/../../libmate-panel-applet \
+ -I$(top_builddir)/libmate-panel-applet \
+ -DMATELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DBUILDERDIR=\""$(uidir)"\" \
+ -DCLOCK_MENU_UI_DIR=\""$(xmluidir)"\" \
+ -DICONDIR=\""$(datadir)/mate-panel/pixmaps"\" \
+ -DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\"" \
+ -DMATEWEATHER_I_KNOW_THIS_IS_UNSTABLE
+
+CLOCK_LDADD = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(CLOCK_LIBS) \
+ $(LIBMATE_PANEL_APPLET_LIBS) \
+ libsystem-timezone.la \
+ -lm
+
+test_system_timezone_SOURCES = \
+ test-system-timezone.c
+test_system_timezone_LDADD = libsystem-timezone.la
+
+if CLOCK_INPROCESS
+APPLET_IN_PROCESS = true
+APPLET_LOCATION = $(pkglibdir)/libclock-applet.so
+
+clock_appletlibdir = $(pkglibdir)
+clock_appletlib_LTLIBRARIES = libclock-applet.la
+libclock_applet_la_SOURCES = $(CLOCK_SOURCES)
+libclock_applet_la_CPPFLAGS = $(CLOCK_CPPFLAGS)
+libclock_applet_la_LIBADD = $(CLOCK_LDADD)
+libclock_applet_la_LDFLAGS = -module -avoid-version
+libclock_applet_la_CFLAGS = $(AM_CFLAGS)
+$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
+else
+APPLET_IN_PROCESS = false
+APPLET_LOCATION = $(libexecdir)/clock-applet
+
+libexec_PROGRAMS = clock-applet
+clock_applet_SOURCES = $(CLOCK_SOURCES)
+clock_applet_CPPFLAGS = $(CLOCK_CPPFLAGS)
+clock_applet_LDADD = $(CLOCK_LDADD)
+clock_applet_CFLAGS = $(AM_CFLAGS)
+$(clock_applet_OBJECTS): $(BUILT_SOURCES)
+endif
+
+clock-marshallers.c: clock-marshallers.list
+ $(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --body --internal $< > [email protected]
+
+clock-marshallers.h: clock-marshallers.list
+ $(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --internal $< > [email protected]
+
+clock_enum_headers = \
+ $(top_srcdir)/applets/clock/clock-utils.h
+
+clock-typebuiltins.c: @[email protected] $(clock_enum_headers)
+ $(AM_V_GEN)glib-mkenums \
+ --fhead "#include <glib-object.h>\n" \
+ --fhead "#include \"clock-typebuiltins.h\"\n\n" \
+ --fprod "\n/* enumerations from \"@[email protected]\" */" \
+ --fprod "\n#include \"@[email protected]\"\n" \
+ --vhead "static const GEnumValue [email protected][email protected]_values[] = {" \
+ --vtail " { 0, NULL, NULL }\n};\n\n" \
+ --vtail "GType\[email protected][email protected]_get_type (void)\n{\n" \
+ --vtail " static GType type = 0;\n\n" \
+ --vtail " if (!type)\n" \
+ --vtail " type = g_enum_register_static (\"@[email protected]\", [email protected][email protected]_values);\n\n" \
+ --vtail " return type;\n}\n\n" \
+ $(clock_enum_headers) > [email protected]
+
+clock-typebuiltins.h: @[email protected] $(clock_enum_headers)
+ $(AM_V_GEN)glib-mkenums \
+ --fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
+ --fhead "#define __CLOCK_TYPEBUILTINS_H__ 1\n\n" \
+ --fhead "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n" \
+ --ftail "#ifdef __cplusplus\n}\n#endif\n\n" \
+ --ftail "#endif /* __CLOCK_TYPEBUILTINS_H__ */\n" \
+ --fprod "\n/* --- @[email protected] --- */" \
+ --eprod "#define [email protected]@ @[email protected]_get_type()\n" \
+ --eprod "GType @[email protected]_get_type (void);\n" \
+ $(clock_enum_headers) > [email protected]
+
+BUILT_SOURCES = \
+ clock-marshallers.c \
+ clock-marshallers.h \
+ clock-typebuiltins.c \
+ clock-typebuiltins.h
+
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.panel.ClockApplet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
+
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+
+
+if !CLOCK_INPROCESS
+servicedir = $(datadir)/dbus-1/services
+service_in_files = org.mate.panel.applet.ClockAppletFactory.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+org.mate.panel.applet.ClockAppletFactory.service: $(service_in_files)
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+endif
+
+uidir = $(datadir)/mate-panel/ui
+ui_DATA = clock.ui
+
+xmluidir = $(datadir)/mate-panel/ui
+xmlui_DATA = clock-menu.xml
+
+schemasdir = $(MATECONF_SCHEMA_FILE_DIR)
+schemas_in_files = clock.schemas.in
+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+
+
+if MATECONF_SCHEMAS_INSTALL
+install-data-local:
+ if test -z "$(DESTDIR)" ; then \
+ for p in $(schemas_DATA) ; do \
+ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
+ done \
+ fi
+uninstall-local:
+ for p in $(schema_DATA) ; do \
+ MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-uninstall-rule $(top_builddir)/applets/clock/$$p ; \
+ done
+endif
+
+EXTRA_DIST = \
+ org.mate.panel.ClockApplet.mate-panel-applet.in.in \
+ $(schemas_in_files) \
+ $(xmlui_DATA) \
+ $(ui_DATA) \
+ clock-marshallers.list \
+ $(service_in_files)
+
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(applet_DATA) \
+ $(applet_DATA).in \
+ $(service_DATA) \
+ $(schemas_DATA) \
+ $(polkit_DATA) \
+ $(dbus_services_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/applets/clock/Makefile.in b/applets/clock/Makefile.in
new file mode 100644
index 00000000..e51ce949
--- /dev/null
+++ b/applets/clock/Makefile.in
@@ -0,0 +1,1595 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/@[email protected]
+pkgincludedir = $(includedir)/@[email protected]
+pkglibdir = $(libdir)/@[email protected]
+pkglibexecdir = $(libexecdir)/@[email protected]
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @[email protected]
+host_triplet = @[email protected]
+noinst_PROGRAMS = test-system-timezone$(EXEEXT)
[email protected][email protected]_PROGRAMS = clock-applet$(EXEEXT)
+subdir = applets/clock
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/d-type.m4 \
+ $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/mate-doc-utils.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(clock_appletlibdir)" \
+ "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(appletdir)" \
+ "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)" \
+ "$(DESTDIR)$(uidir)" "$(DESTDIR)$(xmluidir)"
+LTLIBRARIES = $(clock_appletlib_LTLIBRARIES) $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am__DEPENDENCIES_2 = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ libsystem-timezone.la
[email protected][email protected]_applet_la_DEPENDENCIES = \
+am__libclock_applet_la_SOURCES_DIST = calendar-window.c \
+ calendar-window.h clock.c clock.h clock-face.c clock-face.h \
+ clock-location.c clock-location.h clock-location-tile.c \
+ clock-location-tile.h clock-map.c clock-map.h clock-sunpos.c \
+ clock-sunpos.h clock-utils.c clock-utils.h set-timezone.c \
+ set-timezone.h clock-marshallers.c clock-marshallers.h \
+ clock-typebuiltins.c clock-typebuiltins.h calendar-client.c \
+ calendar-client.h calendar-sources.c calendar-sources.h \
+ calendar-debug.h
+am__objects_1 = libclock_applet_la-clock-marshallers.lo \
+ libclock_applet_la-clock-typebuiltins.lo
[email protected][email protected] libclock_applet_la-calendar-client.lo \
[email protected][email protected] libclock_applet_la-calendar-sources.lo
+am__objects_3 = libclock_applet_la-calendar-window.lo \
+ libclock_applet_la-clock.lo libclock_applet_la-clock-face.lo \
+ libclock_applet_la-clock-location.lo \
+ libclock_applet_la-clock-location-tile.lo \
+ libclock_applet_la-clock-map.lo \
+ libclock_applet_la-clock-sunpos.lo \
+ libclock_applet_la-clock-utils.lo \
+ libclock_applet_la-set-timezone.lo $(am__objects_1) \
+ $(am__objects_2)
[email protected][email protected]_libclock_applet_la_OBJECTS = \
+libclock_applet_la_OBJECTS = $(am_libclock_applet_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libclock_applet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libclock_applet_la_CFLAGS) $(CFLAGS) \
+ $(libclock_applet_la_LDFLAGS) $(LDFLAGS) -o [email protected]
[email protected][email protected]_libclock_applet_la_rpath = -rpath \
+libsystem_timezone_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_libsystem_timezone_la_OBJECTS = system-timezone.lo
+libsystem_timezone_la_OBJECTS = $(am_libsystem_timezone_la_OBJECTS)
+PROGRAMS = $(libexec_PROGRAMS) $(noinst_PROGRAMS)
+am__clock_applet_SOURCES_DIST = calendar-window.c calendar-window.h \
+ clock.c clock.h clock-face.c clock-face.h clock-location.c \
+ clock-location.h clock-location-tile.c clock-location-tile.h \
+ clock-map.c clock-map.h clock-sunpos.c clock-sunpos.h \
+ clock-utils.c clock-utils.h set-timezone.c set-timezone.h \
+ clock-marshallers.c clock-marshallers.h clock-typebuiltins.c \
+ clock-typebuiltins.h calendar-client.c calendar-client.h \
+ calendar-sources.c calendar-sources.h calendar-debug.h
+am__objects_4 = clock_applet-clock-marshallers.$(OBJEXT) \
+ clock_applet-clock-typebuiltins.$(OBJEXT)
[email protected][email protected] clock_applet-calendar-client.$(OBJEXT) \
[email protected][email protected] clock_applet-calendar-sources.$(OBJEXT)
+am__objects_6 = clock_applet-calendar-window.$(OBJEXT) \
+ clock_applet-clock.$(OBJEXT) clock_applet-clock-face.$(OBJEXT) \
+ clock_applet-clock-location.$(OBJEXT) \
+ clock_applet-clock-location-tile.$(OBJEXT) \
+ clock_applet-clock-map.$(OBJEXT) \
+ clock_applet-clock-sunpos.$(OBJEXT) \
+ clock_applet-clock-utils.$(OBJEXT) \
+ clock_applet-set-timezone.$(OBJEXT) $(am__objects_4) \
+ $(am__objects_5)
[email protected][email protected]_clock_applet_OBJECTS = $(am__objects_6)
+clock_applet_OBJECTS = $(am_clock_applet_OBJECTS)
[email protected][email protected]_applet_DEPENDENCIES = \
+clock_applet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(clock_applet_CFLAGS) \
+ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o [email protected]
+am_test_system_timezone_OBJECTS = test-system-timezone.$(OBJEXT)
+test_system_timezone_OBJECTS = $(am_test_system_timezone_OBJECTS)
+test_system_timezone_DEPENDENCIES = libsystem-timezone.la
+DEFAULT_INCLUDES = [email protected][email protected] -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " [email protected];
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o [email protected]
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " [email protected];
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " [email protected];
+SOURCES = $(libclock_applet_la_SOURCES) \
+ $(libsystem_timezone_la_SOURCES) $(clock_applet_SOURCES) \
+ $(test_system_timezone_SOURCES)
+DIST_SOURCES = $(am__libclock_applet_la_SOURCES_DIST) \
+ $(libsystem_timezone_la_SOURCES) \
+ $(am__clock_applet_SOURCES_DIST) \
+ $(test_system_timezone_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+DATA = $(applet_DATA) $(schemas_DATA) $(service_DATA) $(ui_DATA) \
+ $(xmlui_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @[email protected]
+ACLOCAL_AMFLAGS = @[email protected]
+ALL_LINGUAS = @[email protected]
+AM_DEFAULT_VERBOSITY = @[email protected]
+AUTOCONF = @[email protected]
+AUTOHEADER = @[email protected]
+AUTOMAKE = @[email protected]
+CATALOGS = @[email protected]
+CATOBJEXT = @[email protected]
+CCDEPMODE = @[email protected]
+CLOCK_CFLAGS = @[email protected]
+CLOCK_EDS_ICONDIR = @[email protected]
+CLOCK_LIBS = @[email protected]
+CPPFLAGS = @[email protected]
+CYGPATH_W = @[email protected]
+DATADIRNAME = @[email protected]
+DISABLE_DEPRECATED = @[email protected]
+DISABLE_DEPRECATED_CFLAGS = @[email protected]
+DISTCHECK_CONFIGURE_FLAGS = @[email protected]
+DLLTOOL = @[email protected]
+DOC_USER_FORMATS = @[email protected]
+DSYMUTIL = @[email protected]
+DUMPBIN = @[email protected]
+EGG_SMCLIENT_CFLAGS = @[email protected]
+EGG_SMCLIENT_LIBS = @[email protected]
+FISH_CFLAGS = @[email protected]
+FISH_LIBS = @[email protected]
+GETTEXT_PACKAGE = @[email protected]
+GIO_QUERYMODULES = @[email protected]
+GLIB_GENMARSHAL = @[email protected]
+GMOFILES = @[email protected]
+GMSGFMT = @[email protected]
+GTKDOC_CHECK = @[email protected]
+GTKDOC_DEPS_CFLAGS = @[email protected]
+GTKDOC_DEPS_LIBS = @[email protected]
+GTKDOC_MKPDF = @[email protected]
+GTKDOC_REBASE = @[email protected]
+HELP_DIR = @[email protected]
+HTML_DIR = @[email protected]
+INSTALL = @[email protected]
+INSTALL_DATA = @[email protected]
+INSTALL_PROGRAM = @[email protected]
+INSTALL_SCRIPT = @[email protected]
+INSTALL_STRIP_PROGRAM = @[email protected]
+INSTOBJEXT = @[email protected]
+INTLLIBS = @[email protected]
+INTLTOOL_EXTRACT = @[email protected]
+INTLTOOL_MERGE = @[email protected]
+INTLTOOL_PERL = @[email protected]
+INTLTOOL_UPDATE = @[email protected]
+INTROSPECTION_CFLAGS = @[email protected]
+INTROSPECTION_COMPILER = @[email protected]
+INTROSPECTION_GENERATE = @[email protected]
+INTROSPECTION_GIRDIR = @[email protected]
+INTROSPECTION_LIBS = @[email protected]
+INTROSPECTION_MAKEFILE = @[email protected]
+INTROSPECTION_SCANNER = @[email protected]
+INTROSPECTION_TYPELIBDIR = @[email protected]
+LDFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_CFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_LIBS = @[email protected]
+LIBMATE_PANEL_APPLET_MATECOMPONENT_CFLAGS = @[email protected]
+LIBMATE_PANEL_APPLET_MATECOMPONENT_LIBS = @[email protected]
+LIBOBJS = @[email protected]
+LIBTOOL = @[email protected]
+LIB_MATE_PANEL_APPLET_LT_VERSION = @[email protected]
+LIB_MATE_PANEL_APPLET_MATECOMPONENT_LT_VERSION = @[email protected]
+LTLIBOBJS = @[email protected]
+MAKEINFO = @[email protected]
+MANIFEST_TOOL = @[email protected]
+MATECOMPONENT_ACT_IDLDIR = @[email protected]
+MATECOMPONENT_CFLAGS = @[email protected]
+MATECOMPONENT_IDLDIR = @[email protected]
+MATECOMPONENT_LIBS = @[email protected]
+MATECONFTOOL = @[email protected]
+MATECONF_SCHEMA_CONFIG_SOURCE = @[email protected]
+MATECONF_SCHEMA_FILE_DIR = @[email protected]
+MATECORBA_IDL = @[email protected]
+MKDIR_P = @[email protected]
+MKINSTALLDIRS = @[email protected]
+MSGFMT_OPTS = @[email protected]
+MSGMERGE = @[email protected]
+NETWORK_MANAGER_CFLAGS = @[email protected]
+NETWORK_MANAGER_LIBS = @[email protected]
+NOTIFICATION_AREA_CFLAGS = @[email protected]
+NOTIFICATION_AREA_LIBS = @[email protected]
+OBJDUMP = @[email protected]
+OMF_DIR = @[email protected]
+OTOOL64 = @[email protected]
+PACKAGE = @[email protected]
+PACKAGE_BUGREPORT = @[email protected]
+PACKAGE_NAME = @[email protected]
+PACKAGE_STRING = @[email protected]
+PACKAGE_TARNAME = @[email protected]
+PACKAGE_URL = @[email protected]
+PACKAGE_VERSION = @[email protected]
+PANEL_CFLAGS = @[email protected]
+PANEL_INTLTOOL_MATE_PANEL_APPLET_RULE = @[email protected]
+PANEL_LIBS = @[email protected]
+PANEL_MODULE_MATECOMPONENT_CFLAGS = @[email protected]
+PANEL_MODULE_MATECOMPONENT_LIBS = @[email protected]
+PATH_SEPARATOR = @[email protected]
+PKG_CONFIG = @[email protected]
+PKG_CONFIG_LIBDIR = @[email protected]
+PKG_CONFIG_PATH = @[email protected]
+POFILES = @[email protected]
+PO_IN_DATADIR_FALSE = @[email protected]
+PO_IN_DATADIR_TRUE = @[email protected]
+PYTHON_EXEC_PREFIX = @[email protected]
+PYTHON_PLATFORM = @[email protected]
+PYTHON_PREFIX = @[email protected]
+PYTHON_VERSION = @[email protected]
+REBUILD = @[email protected]
+SET_MAKE = @[email protected]
+TZ_CFLAGS = @[email protected]
+TZ_LIBS = @[email protected]
+USE_NLS = @[email protected]
+VERSION = @[email protected]
+WARN_CFLAGS = @[email protected]
+WNCKLET_CFLAGS = @[email protected]
+WNCKLET_LIBS = @[email protected]
+XGETTEXT = @[email protected]
+XRANDR_CFLAGS = @[email protected]
+XRANDR_LIBS = @[email protected]
+X_CFLAGS = @[email protected]
+X_EXTRA_LIBS = @[email protected]
+X_PRE_LIBS = @[email protected]
+abs_builddir = @[email protected]
+abs_srcdir = @[email protected]
+abs_top_builddir = @[email protected]
+abs_top_srcdir = @[email protected]
+ac_ct_AR = @[email protected]
+ac_ct_CC = @[email protected]
+ac_ct_DUMPBIN = @[email protected]
+am__include = @[email protected]
+am__leading_dot = @[email protected]
+am__quote = @[email protected]
+am__tar = @[email protected]
+am__untar = @[email protected]
+appletsdir = @[email protected]
+build_alias = @[email protected]
+build_cpu = @[email protected]
+build_os = @[email protected]
+build_vendor = @[email protected]
+builddir = @[email protected]
+datadir = @[email protected]
+datarootdir = @[email protected]
+exec_prefix = @[email protected]
+host_alias = @[email protected]
+host_cpu = @[email protected]
+host_os = @[email protected]
+host_vendor = @[email protected]
+htmldir = @[email protected]
+includedir = @[email protected]
+infodir = @[email protected]
+install_sh = @[email protected]
+libexecdir = @[email protected]
+localedir = @[email protected]
+localstatedir = @[email protected]
+mkdir_p = @[email protected]
+modulesdir = @[email protected]
+oldincludedir = @[email protected]
+pkgpyexecdir = @[email protected]
+pkgpythondir = @[email protected]
+program_transform_name = @[email protected]
+pyexecdir = @[email protected]
+pythondir = @[email protected]
+sbindir = @[email protected]
+sharedstatedir = @[email protected]
+sysconfdir = @[email protected]
+target_alias = @[email protected]
+top_build_prefix = @[email protected]
+top_builddir = @[email protected]
+top_srcdir = @[email protected]
+SUBDIRS = pixmaps
+noinst_LTLIBRARIES = libsystem-timezone.la
+AM_CPPFLAGS = \
+ $(TZ_CFLAGS) \
+ $(DISABLE_DEPRECATED_CFLAGS)
+
+AM_CFLAGS = $(WARN_CFLAGS)
+libsystem_timezone_la_SOURCES = \
+ system-timezone.c \
+ system-timezone.h
+
+libsystem_timezone_la_LIBADD = $(TZ_LIBS)
+
+CLOCK_SOURCES = \
+ calendar-window.c \
+ calendar-window.h \
+ clock.c \
+ clock.h \
+ clock-face.c \
+ clock-face.h \
+ clock-location.c \
+ clock-location.h \
+ clock-location-tile.c \
+ clock-location-tile.h \
+ clock-map.c \
+ clock-map.h \
+ clock-sunpos.c \
+ clock-sunpos.h \
+ clock-utils.c \
+ clock-utils.h \
+ set-timezone.c \
+ set-timezone.h \
+ $(BUILT_SOURCES) \
+ $(CALENDAR_SOURCES)
+
+CLOCK_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(LIBMATE_PANEL_APPLET_CFLAGS) \
+ $(CLOCK_CFLAGS) \
+ -I$(srcdir)/../../libmate-panel-applet \
+ -I$(top_builddir)/libmate-panel-applet \
+ -DMATELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DBUILDERDIR=\""$(uidir)"\" \
+ -DCLOCK_MENU_UI_DIR=\""$(xmluidir)"\" \
+ -DICONDIR=\""$(datadir)/mate-panel/pixmaps"\" \
+ -DCLOCK_EDS_ICONDIR="\"$(CLOCK_EDS_ICONDIR)\"" \
+ -DMATEWEATHER_I_KNOW_THIS_IS_UNSTABLE
+
+CLOCK_LDADD = \
+ ../../libmate-panel-applet/libmate-panel-applet-3.la \
+ $(CLOCK_LIBS) \
+ $(LIBMATE_PANEL_APPLET_LIBS) \
+ libsystem-timezone.la \
+ -lm
+
+test_system_timezone_SOURCES = \
+ test-system-timezone.c
+
+test_system_timezone_LDADD = libsystem-timezone.la
[email protected][email protected]_LOCATION = $(libexecdir)/clock-applet
[email protected][email protected]_LOCATION = $(pkglibdir)/libclock-applet.so
[email protected][email protected]_appletlibdir = $(pkglibdir)
[email protected][email protected]_appletlib_LTLIBRARIES = libclock-applet.la
[email protected][email protected]_applet_la_SOURCES = $(CLOCK_SOURCES)
[email protected][email protected]_applet_la_CPPFLAGS = $(CLOCK_CPPFLAGS)
[email protected][email protected]_applet_la_LIBADD = $(CLOCK_LDADD)
[email protected][email protected]_applet_la_LDFLAGS = -module -avoid-version
[email protected][email protected]_applet_la_CFLAGS = $(AM_CFLAGS)
[email protected][email protected]_applet_SOURCES = $(CLOCK_SOURCES)
[email protected][email protected]_applet_CPPFLAGS = $(CLOCK_CPPFLAGS)
[email protected][email protected]_applet_LDADD = $(CLOCK_LDADD)
[email protected][email protected]_applet_CFLAGS = $(AM_CFLAGS)
+clock_enum_headers = \
+ $(top_srcdir)/applets/clock/clock-utils.h
+
+BUILT_SOURCES = \
+ clock-marshallers.c \
+ clock-marshallers.h \
+ clock-typebuiltins.c \
+ clock-typebuiltins.h
+
+appletdir = $(datadir)/mate-panel/applets
+applet_in_files = org.mate.panel.ClockApplet.mate-panel-applet.in
+applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet)
[email protected][email protected] = $(datadir)/dbus-1/services
[email protected][email protected]_in_files = org.mate.panel.applet.ClockAppletFactory.service.in
[email protected][email protected]_DATA = $(service_in_files:.service.in=.service)
+uidir = $(datadir)/mate-panel/ui
+ui_DATA = clock.ui
+xmluidir = $(datadir)/mate-panel/ui
+xmlui_DATA = clock-menu.xml
+schemasdir = $(MATECONF_SCHEMA_FILE_DIR)
+schemas_in_files = clock.schemas.in
+schemas_DATA = $(schemas_in_files:.schemas.in=.schemas)
+EXTRA_DIST = \
+ org.mate.panel.ClockApplet.mate-panel-applet.in.in \
+ $(schemas_in_files) \
+ $(xmlui_DATA) \
+ $(ui_DATA) \
+ clock-marshallers.list \
+ $(service_in_files)
+
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ $(applet_DATA) \
+ $(applet_DATA).in \
+ $(service_DATA) \
+ $(schemas_DATA) \
+ $(polkit_DATA) \
+ $(dbus_services_DATA)
+
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @[email protected] $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f [email protected]; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu applets/clock/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu applets/clock/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/[email protected] $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @[email protected] $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @[email protected] $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-clock_appletlibLTLIBRARIES: $(clock_appletlib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(clock_appletlibdir)" || $(MKDIR_P) "$(DESTDIR)$(clock_appletlibdir)"
+ @list='$(clock_appletlib_LTLIBRARIES)'; test -n "$(clock_appletlibdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(clock_appletlibdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(clock_appletlibdir)"; \
+ }
+
+uninstall-clock_appletlibLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(clock_appletlib_LTLIBRARIES)'; test -n "$(clock_appletlibdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(clock_appletlibdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(clock_appletlibdir)/$$f"; \
+ done
+
+clean-clock_appletlibLTLIBRARIES:
+ -test -z "$(clock_appletlib_LTLIBRARIES)" || rm -f $(clock_appletlib_LTLIBRARIES)
+ @list='$(clock_appletlib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libclock-applet.la: $(libclock_applet_la_OBJECTS) $(libclock_applet_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libclock_applet_la_LINK) $(am_libclock_applet_la_rpath) $(libclock_applet_la_OBJECTS) $(libclock_applet_la_LIBADD) $(LIBS)
+libsystem-timezone.la: $(libsystem_timezone_la_OBJECTS) $(libsystem_timezone_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libsystem_timezone_la_OBJECTS) $(libsystem_timezone_la_LIBADD) $(LIBS)
+install-libexecPROGRAMS: $(libexec_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-libexecPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(libexecdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(libexecdir)" && rm -f $$files
+
+clean-libexecPROGRAMS:
+ @list='$(libexec_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+clock-applet$(EXEEXT): $(clock_applet_OBJECTS) $(clock_applet_DEPENDENCIES)
+ @rm -f clock-applet$(EXEEXT)
+ $(AM_V_CCLD)$(clock_applet_LINK) $(clock_applet_OBJECTS) $(clock_applet_LDADD) $(LIBS)
+test-system-timezone$(EXEEXT): $(test_system_timezone_OBJECTS) $(test_system_timezone_DEPENDENCIES)
+ @rm -f test-system-timezone$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_system_timezone_OBJECTS) $(test_system_timezone_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+
+.c.o:
[email protected][email protected] $(AM_V_CC)$(COMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] $<
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+
+.c.obj:
[email protected][email protected] $(AM_V_CC)$(COMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] `$(CYGPATH_W) '$<'`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
[email protected][email protected] $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
[email protected][email protected] $(AM_V_CC)$(LTCOMPILE) -MT [email protected] -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o [email protected] $<
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+
+libclock_applet_la-calendar-window.lo: calendar-window.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-calendar-window.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-calendar-window.Tpo -c -o libclock_applet_la-calendar-window.lo `test -f 'calendar-window.c' || echo '$(srcdir)/'`calendar-window.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-calendar-window.Tpo $(DEPDIR)/libclock_applet_la-calendar-window.Plo
[email protected][email protected]@[email protected] source='calendar-window.c' object='libclock_applet_la-calendar-window.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-calendar-window.lo `test -f 'calendar-window.c' || echo '$(srcdir)/'`calendar-window.c
+
+libclock_applet_la-clock.lo: clock.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock.Tpo -c -o libclock_applet_la-clock.lo `test -f 'clock.c' || echo '$(srcdir)/'`clock.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock.Tpo $(DEPDIR)/libclock_applet_la-clock.Plo
[email protected][email protected]@[email protected] source='clock.c' object='libclock_applet_la-clock.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock.lo `test -f 'clock.c' || echo '$(srcdir)/'`clock.c
+
+libclock_applet_la-clock-face.lo: clock-face.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-face.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-face.Tpo -c -o libclock_applet_la-clock-face.lo `test -f 'clock-face.c' || echo '$(srcdir)/'`clock-face.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-face.Tpo $(DEPDIR)/libclock_applet_la-clock-face.Plo
[email protected][email protected]@[email protected] source='clock-face.c' object='libclock_applet_la-clock-face.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-face.lo `test -f 'clock-face.c' || echo '$(srcdir)/'`clock-face.c
+
+libclock_applet_la-clock-location.lo: clock-location.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-location.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-location.Tpo -c -o libclock_applet_la-clock-location.lo `test -f 'clock-location.c' || echo '$(srcdir)/'`clock-location.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-location.Tpo $(DEPDIR)/libclock_applet_la-clock-location.Plo
[email protected][email protected]@[email protected] source='clock-location.c' object='libclock_applet_la-clock-location.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-location.lo `test -f 'clock-location.c' || echo '$(srcdir)/'`clock-location.c
+
+libclock_applet_la-clock-location-tile.lo: clock-location-tile.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-location-tile.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-location-tile.Tpo -c -o libclock_applet_la-clock-location-tile.lo `test -f 'clock-location-tile.c' || echo '$(srcdir)/'`clock-location-tile.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-location-tile.Tpo $(DEPDIR)/libclock_applet_la-clock-location-tile.Plo
[email protected][email protected]@[email protected] source='clock-location-tile.c' object='libclock_applet_la-clock-location-tile.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-location-tile.lo `test -f 'clock-location-tile.c' || echo '$(srcdir)/'`clock-location-tile.c
+
+libclock_applet_la-clock-map.lo: clock-map.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-map.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-map.Tpo -c -o libclock_applet_la-clock-map.lo `test -f 'clock-map.c' || echo '$(srcdir)/'`clock-map.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-map.Tpo $(DEPDIR)/libclock_applet_la-clock-map.Plo
[email protected][email protected]@[email protected] source='clock-map.c' object='libclock_applet_la-clock-map.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-map.lo `test -f 'clock-map.c' || echo '$(srcdir)/'`clock-map.c
+
+libclock_applet_la-clock-sunpos.lo: clock-sunpos.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-sunpos.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-sunpos.Tpo -c -o libclock_applet_la-clock-sunpos.lo `test -f 'clock-sunpos.c' || echo '$(srcdir)/'`clock-sunpos.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-sunpos.Tpo $(DEPDIR)/libclock_applet_la-clock-sunpos.Plo
[email protected][email protected]@[email protected] source='clock-sunpos.c' object='libclock_applet_la-clock-sunpos.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-sunpos.lo `test -f 'clock-sunpos.c' || echo '$(srcdir)/'`clock-sunpos.c
+
+libclock_applet_la-clock-utils.lo: clock-utils.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-utils.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-utils.Tpo -c -o libclock_applet_la-clock-utils.lo `test -f 'clock-utils.c' || echo '$(srcdir)/'`clock-utils.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-utils.Tpo $(DEPDIR)/libclock_applet_la-clock-utils.Plo
[email protected][email protected]@[email protected] source='clock-utils.c' object='libclock_applet_la-clock-utils.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-utils.lo `test -f 'clock-utils.c' || echo '$(srcdir)/'`clock-utils.c
+
+libclock_applet_la-set-timezone.lo: set-timezone.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-set-timezone.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-set-timezone.Tpo -c -o libclock_applet_la-set-timezone.lo `test -f 'set-timezone.c' || echo '$(srcdir)/'`set-timezone.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-set-timezone.Tpo $(DEPDIR)/libclock_applet_la-set-timezone.Plo
[email protected][email protected]@[email protected] source='set-timezone.c' object='libclock_applet_la-set-timezone.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-set-timezone.lo `test -f 'set-timezone.c' || echo '$(srcdir)/'`set-timezone.c
+
+libclock_applet_la-clock-marshallers.lo: clock-marshallers.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-marshallers.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-marshallers.Tpo -c -o libclock_applet_la-clock-marshallers.lo `test -f 'clock-marshallers.c' || echo '$(srcdir)/'`clock-marshallers.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-marshallers.Tpo $(DEPDIR)/libclock_applet_la-clock-marshallers.Plo
[email protected][email protected]@[email protected] source='clock-marshallers.c' object='libclock_applet_la-clock-marshallers.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-marshallers.lo `test -f 'clock-marshallers.c' || echo '$(srcdir)/'`clock-marshallers.c
+
+libclock_applet_la-clock-typebuiltins.lo: clock-typebuiltins.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-clock-typebuiltins.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-clock-typebuiltins.Tpo -c -o libclock_applet_la-clock-typebuiltins.lo `test -f 'clock-typebuiltins.c' || echo '$(srcdir)/'`clock-typebuiltins.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-clock-typebuiltins.Tpo $(DEPDIR)/libclock_applet_la-clock-typebuiltins.Plo
[email protected][email protected]@[email protected] source='clock-typebuiltins.c' object='libclock_applet_la-clock-typebuiltins.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-clock-typebuiltins.lo `test -f 'clock-typebuiltins.c' || echo '$(srcdir)/'`clock-typebuiltins.c
+
+libclock_applet_la-calendar-client.lo: calendar-client.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-calendar-client.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-calendar-client.Tpo -c -o libclock_applet_la-calendar-client.lo `test -f 'calendar-client.c' || echo '$(srcdir)/'`calendar-client.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-calendar-client.Tpo $(DEPDIR)/libclock_applet_la-calendar-client.Plo
[email protected][email protected]@[email protected] source='calendar-client.c' object='libclock_applet_la-calendar-client.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-calendar-client.lo `test -f 'calendar-client.c' || echo '$(srcdir)/'`calendar-client.c
+
+libclock_applet_la-calendar-sources.lo: calendar-sources.c
[email protected][email protected] $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -MT libclock_applet_la-calendar-sources.lo -MD -MP -MF $(DEPDIR)/libclock_applet_la-calendar-sources.Tpo -c -o libclock_applet_la-calendar-sources.lo `test -f 'calendar-sources.c' || echo '$(srcdir)/'`calendar-sources.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/libclock_applet_la-calendar-sources.Tpo $(DEPDIR)/libclock_applet_la-calendar-sources.Plo
[email protected][email protected]@[email protected] source='calendar-sources.c' object='libclock_applet_la-calendar-sources.lo' libtool=yes @[email protected]
[email protected][email protected] $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libclock_applet_la_CPPFLAGS) $(CPPFLAGS) $(libclock_applet_la_CFLAGS) $(CFLAGS) -c -o libclock_applet_la-calendar-sources.lo `test -f 'calendar-sources.c' || echo '$(srcdir)/'`calendar-sources.c
+
+clock_applet-calendar-window.o: calendar-window.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-window.o -MD -MP -MF $(DEPDIR)/clock_applet-calendar-window.Tpo -c -o clock_applet-calendar-window.o `test -f 'calendar-window.c' || echo '$(srcdir)/'`calendar-window.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-window.Tpo $(DEPDIR)/clock_applet-calendar-window.Po
[email protected][email protected]@[email protected] source='calendar-window.c' object='clock_applet-calendar-window.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-window.o `test -f 'calendar-window.c' || echo '$(srcdir)/'`calendar-window.c
+
+clock_applet-calendar-window.obj: calendar-window.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-window.obj -MD -MP -MF $(DEPDIR)/clock_applet-calendar-window.Tpo -c -o clock_applet-calendar-window.obj `if test -f 'calendar-window.c'; then $(CYGPATH_W) 'calendar-window.c'; else $(CYGPATH_W) '$(srcdir)/calendar-window.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-window.Tpo $(DEPDIR)/clock_applet-calendar-window.Po
[email protected][email protected]@[email protected] source='calendar-window.c' object='clock_applet-calendar-window.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-window.obj `if test -f 'calendar-window.c'; then $(CYGPATH_W) 'calendar-window.c'; else $(CYGPATH_W) '$(srcdir)/calendar-window.c'; fi`
+
+clock_applet-clock.o: clock.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock.o -MD -MP -MF $(DEPDIR)/clock_applet-clock.Tpo -c -o clock_applet-clock.o `test -f 'clock.c' || echo '$(srcdir)/'`clock.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock.Tpo $(DEPDIR)/clock_applet-clock.Po
[email protected][email protected]@[email protected] source='clock.c' object='clock_applet-clock.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock.o `test -f 'clock.c' || echo '$(srcdir)/'`clock.c
+
+clock_applet-clock.obj: clock.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock.Tpo -c -o clock_applet-clock.obj `if test -f 'clock.c'; then $(CYGPATH_W) 'clock.c'; else $(CYGPATH_W) '$(srcdir)/clock.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock.Tpo $(DEPDIR)/clock_applet-clock.Po
[email protected][email protected]@[email protected] source='clock.c' object='clock_applet-clock.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock.obj `if test -f 'clock.c'; then $(CYGPATH_W) 'clock.c'; else $(CYGPATH_W) '$(srcdir)/clock.c'; fi`
+
+clock_applet-clock-face.o: clock-face.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-face.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-face.Tpo -c -o clock_applet-clock-face.o `test -f 'clock-face.c' || echo '$(srcdir)/'`clock-face.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-face.Tpo $(DEPDIR)/clock_applet-clock-face.Po
[email protected][email protected]@[email protected] source='clock-face.c' object='clock_applet-clock-face.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-face.o `test -f 'clock-face.c' || echo '$(srcdir)/'`clock-face.c
+
+clock_applet-clock-face.obj: clock-face.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-face.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-face.Tpo -c -o clock_applet-clock-face.obj `if test -f 'clock-face.c'; then $(CYGPATH_W) 'clock-face.c'; else $(CYGPATH_W) '$(srcdir)/clock-face.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-face.Tpo $(DEPDIR)/clock_applet-clock-face.Po
[email protected][email protected]@[email protected] source='clock-face.c' object='clock_applet-clock-face.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-face.obj `if test -f 'clock-face.c'; then $(CYGPATH_W) 'clock-face.c'; else $(CYGPATH_W) '$(srcdir)/clock-face.c'; fi`
+
+clock_applet-clock-location.o: clock-location.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-location.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-location.Tpo -c -o clock_applet-clock-location.o `test -f 'clock-location.c' || echo '$(srcdir)/'`clock-location.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-location.Tpo $(DEPDIR)/clock_applet-clock-location.Po
[email protected][email protected]@[email protected] source='clock-location.c' object='clock_applet-clock-location.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-location.o `test -f 'clock-location.c' || echo '$(srcdir)/'`clock-location.c
+
+clock_applet-clock-location.obj: clock-location.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-location.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-location.Tpo -c -o clock_applet-clock-location.obj `if test -f 'clock-location.c'; then $(CYGPATH_W) 'clock-location.c'; else $(CYGPATH_W) '$(srcdir)/clock-location.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-location.Tpo $(DEPDIR)/clock_applet-clock-location.Po
[email protected][email protected]@[email protected] source='clock-location.c' object='clock_applet-clock-location.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-location.obj `if test -f 'clock-location.c'; then $(CYGPATH_W) 'clock-location.c'; else $(CYGPATH_W) '$(srcdir)/clock-location.c'; fi`
+
+clock_applet-clock-location-tile.o: clock-location-tile.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-location-tile.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-location-tile.Tpo -c -o clock_applet-clock-location-tile.o `test -f 'clock-location-tile.c' || echo '$(srcdir)/'`clock-location-tile.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-location-tile.Tpo $(DEPDIR)/clock_applet-clock-location-tile.Po
[email protected][email protected]@[email protected] source='clock-location-tile.c' object='clock_applet-clock-location-tile.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-location-tile.o `test -f 'clock-location-tile.c' || echo '$(srcdir)/'`clock-location-tile.c
+
+clock_applet-clock-location-tile.obj: clock-location-tile.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-location-tile.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-location-tile.Tpo -c -o clock_applet-clock-location-tile.obj `if test -f 'clock-location-tile.c'; then $(CYGPATH_W) 'clock-location-tile.c'; else $(CYGPATH_W) '$(srcdir)/clock-location-tile.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-location-tile.Tpo $(DEPDIR)/clock_applet-clock-location-tile.Po
[email protected][email protected]@[email protected] source='clock-location-tile.c' object='clock_applet-clock-location-tile.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-location-tile.obj `if test -f 'clock-location-tile.c'; then $(CYGPATH_W) 'clock-location-tile.c'; else $(CYGPATH_W) '$(srcdir)/clock-location-tile.c'; fi`
+
+clock_applet-clock-map.o: clock-map.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-map.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-map.Tpo -c -o clock_applet-clock-map.o `test -f 'clock-map.c' || echo '$(srcdir)/'`clock-map.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-map.Tpo $(DEPDIR)/clock_applet-clock-map.Po
[email protected][email protected]@[email protected] source='clock-map.c' object='clock_applet-clock-map.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-map.o `test -f 'clock-map.c' || echo '$(srcdir)/'`clock-map.c
+
+clock_applet-clock-map.obj: clock-map.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-map.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-map.Tpo -c -o clock_applet-clock-map.obj `if test -f 'clock-map.c'; then $(CYGPATH_W) 'clock-map.c'; else $(CYGPATH_W) '$(srcdir)/clock-map.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-map.Tpo $(DEPDIR)/clock_applet-clock-map.Po
[email protected][email protected]@[email protected] source='clock-map.c' object='clock_applet-clock-map.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-map.obj `if test -f 'clock-map.c'; then $(CYGPATH_W) 'clock-map.c'; else $(CYGPATH_W) '$(srcdir)/clock-map.c'; fi`
+
+clock_applet-clock-sunpos.o: clock-sunpos.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-sunpos.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-sunpos.Tpo -c -o clock_applet-clock-sunpos.o `test -f 'clock-sunpos.c' || echo '$(srcdir)/'`clock-sunpos.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-sunpos.Tpo $(DEPDIR)/clock_applet-clock-sunpos.Po
[email protected][email protected]@[email protected] source='clock-sunpos.c' object='clock_applet-clock-sunpos.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-sunpos.o `test -f 'clock-sunpos.c' || echo '$(srcdir)/'`clock-sunpos.c
+
+clock_applet-clock-sunpos.obj: clock-sunpos.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-sunpos.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-sunpos.Tpo -c -o clock_applet-clock-sunpos.obj `if test -f 'clock-sunpos.c'; then $(CYGPATH_W) 'clock-sunpos.c'; else $(CYGPATH_W) '$(srcdir)/clock-sunpos.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-sunpos.Tpo $(DEPDIR)/clock_applet-clock-sunpos.Po
[email protected][email protected]@[email protected] source='clock-sunpos.c' object='clock_applet-clock-sunpos.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-sunpos.obj `if test -f 'clock-sunpos.c'; then $(CYGPATH_W) 'clock-sunpos.c'; else $(CYGPATH_W) '$(srcdir)/clock-sunpos.c'; fi`
+
+clock_applet-clock-utils.o: clock-utils.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-utils.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-utils.Tpo -c -o clock_applet-clock-utils.o `test -f 'clock-utils.c' || echo '$(srcdir)/'`clock-utils.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-utils.Tpo $(DEPDIR)/clock_applet-clock-utils.Po
[email protected][email protected]@[email protected] source='clock-utils.c' object='clock_applet-clock-utils.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-utils.o `test -f 'clock-utils.c' || echo '$(srcdir)/'`clock-utils.c
+
+clock_applet-clock-utils.obj: clock-utils.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-utils.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-utils.Tpo -c -o clock_applet-clock-utils.obj `if test -f 'clock-utils.c'; then $(CYGPATH_W) 'clock-utils.c'; else $(CYGPATH_W) '$(srcdir)/clock-utils.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-utils.Tpo $(DEPDIR)/clock_applet-clock-utils.Po
[email protected][email protected]@[email protected] source='clock-utils.c' object='clock_applet-clock-utils.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-utils.obj `if test -f 'clock-utils.c'; then $(CYGPATH_W) 'clock-utils.c'; else $(CYGPATH_W) '$(srcdir)/clock-utils.c'; fi`
+
+clock_applet-set-timezone.o: set-timezone.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-set-timezone.o -MD -MP -MF $(DEPDIR)/clock_applet-set-timezone.Tpo -c -o clock_applet-set-timezone.o `test -f 'set-timezone.c' || echo '$(srcdir)/'`set-timezone.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-set-timezone.Tpo $(DEPDIR)/clock_applet-set-timezone.Po
[email protected][email protected]@[email protected] source='set-timezone.c' object='clock_applet-set-timezone.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-set-timezone.o `test -f 'set-timezone.c' || echo '$(srcdir)/'`set-timezone.c
+
+clock_applet-set-timezone.obj: set-timezone.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-set-timezone.obj -MD -MP -MF $(DEPDIR)/clock_applet-set-timezone.Tpo -c -o clock_applet-set-timezone.obj `if test -f 'set-timezone.c'; then $(CYGPATH_W) 'set-timezone.c'; else $(CYGPATH_W) '$(srcdir)/set-timezone.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-set-timezone.Tpo $(DEPDIR)/clock_applet-set-timezone.Po
[email protected][email protected]@[email protected] source='set-timezone.c' object='clock_applet-set-timezone.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-set-timezone.obj `if test -f 'set-timezone.c'; then $(CYGPATH_W) 'set-timezone.c'; else $(CYGPATH_W) '$(srcdir)/set-timezone.c'; fi`
+
+clock_applet-clock-marshallers.o: clock-marshallers.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-marshallers.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-marshallers.Tpo -c -o clock_applet-clock-marshallers.o `test -f 'clock-marshallers.c' || echo '$(srcdir)/'`clock-marshallers.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-marshallers.Tpo $(DEPDIR)/clock_applet-clock-marshallers.Po
[email protected][email protected]@[email protected] source='clock-marshallers.c' object='clock_applet-clock-marshallers.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-marshallers.o `test -f 'clock-marshallers.c' || echo '$(srcdir)/'`clock-marshallers.c
+
+clock_applet-clock-marshallers.obj: clock-marshallers.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-marshallers.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-marshallers.Tpo -c -o clock_applet-clock-marshallers.obj `if test -f 'clock-marshallers.c'; then $(CYGPATH_W) 'clock-marshallers.c'; else $(CYGPATH_W) '$(srcdir)/clock-marshallers.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-marshallers.Tpo $(DEPDIR)/clock_applet-clock-marshallers.Po
[email protected][email protected]@[email protected] source='clock-marshallers.c' object='clock_applet-clock-marshallers.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-marshallers.obj `if test -f 'clock-marshallers.c'; then $(CYGPATH_W) 'clock-marshallers.c'; else $(CYGPATH_W) '$(srcdir)/clock-marshallers.c'; fi`
+
+clock_applet-clock-typebuiltins.o: clock-typebuiltins.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-typebuiltins.o -MD -MP -MF $(DEPDIR)/clock_applet-clock-typebuiltins.Tpo -c -o clock_applet-clock-typebuiltins.o `test -f 'clock-typebuiltins.c' || echo '$(srcdir)/'`clock-typebuiltins.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-typebuiltins.Tpo $(DEPDIR)/clock_applet-clock-typebuiltins.Po
[email protected][email protected]@[email protected] source='clock-typebuiltins.c' object='clock_applet-clock-typebuiltins.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-typebuiltins.o `test -f 'clock-typebuiltins.c' || echo '$(srcdir)/'`clock-typebuiltins.c
+
+clock_applet-clock-typebuiltins.obj: clock-typebuiltins.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-clock-typebuiltins.obj -MD -MP -MF $(DEPDIR)/clock_applet-clock-typebuiltins.Tpo -c -o clock_applet-clock-typebuiltins.obj `if test -f 'clock-typebuiltins.c'; then $(CYGPATH_W) 'clock-typebuiltins.c'; else $(CYGPATH_W) '$(srcdir)/clock-typebuiltins.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-clock-typebuiltins.Tpo $(DEPDIR)/clock_applet-clock-typebuiltins.Po
[email protected][email protected]@[email protected] source='clock-typebuiltins.c' object='clock_applet-clock-typebuiltins.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-clock-typebuiltins.obj `if test -f 'clock-typebuiltins.c'; then $(CYGPATH_W) 'clock-typebuiltins.c'; else $(CYGPATH_W) '$(srcdir)/clock-typebuiltins.c'; fi`
+
+clock_applet-calendar-client.o: calendar-client.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-client.o -MD -MP -MF $(DEPDIR)/clock_applet-calendar-client.Tpo -c -o clock_applet-calendar-client.o `test -f 'calendar-client.c' || echo '$(srcdir)/'`calendar-client.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-client.Tpo $(DEPDIR)/clock_applet-calendar-client.Po
[email protected][email protected]@[email protected] source='calendar-client.c' object='clock_applet-calendar-client.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-client.o `test -f 'calendar-client.c' || echo '$(srcdir)/'`calendar-client.c
+
+clock_applet-calendar-client.obj: calendar-client.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-client.obj -MD -MP -MF $(DEPDIR)/clock_applet-calendar-client.Tpo -c -o clock_applet-calendar-client.obj `if test -f 'calendar-client.c'; then $(CYGPATH_W) 'calendar-client.c'; else $(CYGPATH_W) '$(srcdir)/calendar-client.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-client.Tpo $(DEPDIR)/clock_applet-calendar-client.Po
[email protected][email protected]@am__fastdepCC_FALSE@ source='calendar-client.c' object='clock_applet-calendar-client.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-client.obj `if test -f 'calendar-client.c'; then $(CYGPATH_W) 'calendar-client.c'; else $(CYGPATH_W) '$(srcdir)/calendar-client.c'; fi`
+
+clock_applet-calendar-sources.o: calendar-sources.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-sources.o -MD -MP -MF $(DEPDIR)/clock_applet-calendar-sources.Tpo -c -o clock_applet-calendar-sources.o `test -f 'calendar-sources.c' || echo '$(srcdir)/'`calendar-sources.c
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-sources.Tpo $(DEPDIR)/clock_applet-calendar-sources.Po
[email protected][email protected]@[email protected] source='calendar-sources.c' object='clock_applet-calendar-sources.o' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-sources.o `test -f 'calendar-sources.c' || echo '$(srcdir)/'`calendar-sources.c
+
+clock_applet-calendar-sources.obj: calendar-sources.c
[email protected][email protected] $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -MT clock_applet-calendar-sources.obj -MD -MP -MF $(DEPDIR)/clock_applet-calendar-sources.Tpo -c -o clock_applet-calendar-sources.obj `if test -f 'calendar-sources.c'; then $(CYGPATH_W) 'calendar-sources.c'; else $(CYGPATH_W) '$(srcdir)/calendar-sources.c'; fi`
[email protected][email protected] $(AM_V_at)$(am__mv) $(DEPDIR)/clock_applet-calendar-sources.Tpo $(DEPDIR)/clock_applet-calendar-sources.Po
[email protected][email protected]@[email protected] source='calendar-sources.c' object='clock_applet-calendar-sources.obj' libtool=no @[email protected]
[email protected][email protected] $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(clock_applet_CPPFLAGS) $(CPPFLAGS) $(clock_applet_CFLAGS) $(CFLAGS) -c -o clock_applet-calendar-sources.obj `if test -f 'calendar-sources.c'; then $(CYGPATH_W) 'calendar-sources.c'; else $(CYGPATH_W) '$(srcdir)/calendar-sources.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-appletDATA: $(applet_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(appletdir)" || $(MKDIR_P) "$(DESTDIR)$(appletdir)"
+ @list='$(applet_DATA)'; test -n "$(appletdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appletdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(appletdir)" || exit $$?; \
+ done
+
+uninstall-appletDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(applet_DATA)'; test -n "$(appletdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(appletdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(appletdir)" && rm -f $$files
+install-schemasDATA: $(schemas_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(schemasdir)" || $(MKDIR_P) "$(DESTDIR)$(schemasdir)"
+ @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(schemasdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(schemasdir)" || exit $$?; \
+ done
+
+uninstall-schemasDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(schemas_DATA)'; test -n "$(schemasdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(schemasdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(schemasdir)" && rm -f $$files
+install-serviceDATA: $(service_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(servicedir)" || $(MKDIR_P) "$(DESTDIR)$(servicedir)"
+ @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(servicedir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(servicedir)" || exit $$?; \
+ done
+
+uninstall-serviceDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(service_DATA)'; test -n "$(servicedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(servicedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(servicedir)" && rm -f $$files
+install-uiDATA: $(ui_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(uidir)" || $(MKDIR_P) "$(DESTDIR)$(uidir)"
+ @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(uidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(uidir)" || exit $$?; \
+ done
+
+uninstall-uiDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(uidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(uidir)" && rm -f $$files
+install-xmluiDATA: $(xmlui_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(xmluidir)" || $(MKDIR_P) "$(DESTDIR)$(xmluidir)"
+ @list='$(xmlui_DATA)'; test -n "$(xmluidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xmluidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(xmluidir)" || exit $$?; \
+ done
+
+uninstall-xmluiDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(xmlui_DATA)'; test -n "$(xmluidir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(xmluidir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(xmluidir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo [email protected] | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "[email protected]" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo [email protected] | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "[email protected]" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "[email protected]" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(clock_appletlibdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(appletdir)" "$(DESTDIR)$(schemasdir)" "$(DESTDIR)$(servicedir)" "$(DESTDIR)$(uidir)" "$(DESTDIR)$(xmluidir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-recursive
+
+clean-am: clean-clock_appletlibLTLIBRARIES clean-generic \
+ clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-appletDATA install-clock_appletlibLTLIBRARIES \
+ install-data-local install-schemasDATA install-serviceDATA \
+ install-uiDATA install-xmluiDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-libexecPROGRAMS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-appletDATA \
+ uninstall-clock_appletlibLTLIBRARIES uninstall-libexecPROGRAMS \
+ uninstall-local uninstall-schemasDATA uninstall-serviceDATA \
+ uninstall-uiDATA uninstall-xmluiDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean \
+ clean-clock_appletlibLTLIBRARIES clean-generic \
+ clean-libexecPROGRAMS clean-libtool clean-noinstLTLIBRARIES \
+ clean-noinstPROGRAMS ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-appletDATA \
+ install-clock_appletlibLTLIBRARIES install-data \
+ install-data-am install-data-local install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-libexecPROGRAMS \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-schemasDATA install-serviceDATA \
+ install-strip install-uiDATA install-xmluiDATA installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-appletDATA uninstall-clock_appletlibLTLIBRARIES \
+ uninstall-libexecPROGRAMS uninstall-local \
+ uninstall-schemasDATA uninstall-serviceDATA uninstall-uiDATA \
+ uninstall-xmluiDATA
+
[email protected][email protected]$(libclock_applet_la_OBJECTS): $(BUILT_SOURCES)
[email protected][email protected]$(clock_applet_OBJECTS): $(BUILT_SOURCES)
+
+clock-marshallers.c: clock-marshallers.list
+ $(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --body --internal $< > [email protected]
+
+clock-marshallers.h: clock-marshallers.list
+ $(AM_V_GEN)glib-genmarshal --prefix _clock_marshal --header --internal $< > [email protected]
+
+clock-typebuiltins.c: @[email protected] $(clock_enum_headers)
+ $(AM_V_GEN)glib-mkenums \
+ --fhead "#include <glib-object.h>\n" \
+ --fhead "#include \"clock-typebuiltins.h\"\n\n" \
+ --fprod "\n/* enumerations from \"@[email protected]\" */" \
+ --fprod "\n#include \"@[email protected]\"\n" \
+ --vhead "static const GEnumValue [email protected][email protected]_values[] = {" \
+ --vtail " { 0, NULL, NULL }\n};\n\n" \
+ --vtail "GType\[email protected][email protected]_get_type (void)\n{\n" \
+ --vtail " static GType type = 0;\n\n" \
+ --vtail " if (!type)\n" \
+ --vtail " type = g_enum_register_static (\"@[email protected]\", [email protected][email protected]_values);\n\n" \
+ --vtail " return type;\n}\n\n" \
+ $(clock_enum_headers) > [email protected]
+
+clock-typebuiltins.h: @[email protected] $(clock_enum_headers)
+ $(AM_V_GEN)glib-mkenums \
+ --fhead "#ifndef __CLOCK_TYPEBUILTINS_H__\n" \
+ --fhead "#define __CLOCK_TYPEBUILTINS_H__ 1\n\n" \
+ --fhead "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n" \
+ --ftail "#ifdef __cplusplus\n}\n#endif\n\n" \
+ --ftail "#endif /* __CLOCK_TYPEBUILTINS_H__ */\n" \
+ --fprod "\n/* --- @[email protected] --- */" \
+ --eprod "#define [email protected]@ @[email protected]_get_type()\n" \
+ --eprod "GType @[email protected]_get_type (void);\n" \
+ $(clock_enum_headers) > [email protected]
+
+$(applet_in_files): $(applet_in_files).in Makefile
+ $(AM_V_GEN)sed \
+ -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+ -e "s|\@IN_PROCESS\@|$(APPLET_IN_PROCESS)|" \
+ -e "s|\@VERSION\@|$(PACKAGE_VERSION)|" \
+
+
[email protected][email protected] -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \
+
+
[email protected][email protected] if test -z "$(DESTDIR)" ; then \
[email protected][email protected] for p in $(schemas_DATA) ; do \
[email protected][email protected] MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-install-rule $(top_builddir)/applets/clock/$$p ; \
[email protected][email protected] for p in $(schema_DATA) ; do \
[email protected][email protected] MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) $(MATECONFTOOL) --makefile-uninstall-rule $(top_builddir)/applets/clock/$$p ; \
+
+-include $(top_srcdir)/git.mk
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/applets/clock/calendar-client.c b/applets/clock/calendar-client.c
new file mode 100644
index 00000000..77efa137
--- /dev/null
+++ b/applets/clock/calendar-client.c
@@ -0,0 +1,2169 @@
+/*
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Mark McLoughlin <[email protected]>
+ * William Jon McCann <[email protected]>
+ * Martin Grimme <[email protected]>
+ * Christian Kellner <[email protected]>
+ */
+
+#include <config.h>
+
+#include "calendar-client.h"
+
+#include <libintl.h>
+#include <string.h>
+#define HANDLE_LIBICAL_MEMORY
+#include <libecal/e-cal.h>
+#include <libecal/e-cal-time-util.h>
+#include <libecal/e-cal-recur.h>
+
+#include "calendar-sources.h"
+
+#undef CALENDAR_ENABLE_DEBUG
+#include "calendar-debug.h"
+
+#define CALENDAR_CONFIG_PREFIX "/apps/evolution/calendar"
+#define CALENDAR_CONFIG_TIMEZONE CALENDAR_CONFIG_PREFIX "/display/timezone"
+
+#ifndef _
+#define _(x) gettext(x)
+#endif
+
+#ifndef N_
+#define N_(x) x
+#endif
+
+#define CALENDAR_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CALENDAR_TYPE_CLIENT, CalendarClientPrivate))
+
+typedef struct _CalendarClientQuery CalendarClientQuery;
+typedef struct _CalendarClientSource CalendarClientSource;
+
+struct _CalendarClientQuery
+{
+ ECalView *view;
+ GHashTable *events;
+};
+
+struct _CalendarClientSource
+{
+ CalendarClient *client;
+ ECal *source;
+
+ CalendarClientQuery completed_query;
+ CalendarClientQuery in_progress_query;
+
+ guint changed_signal_id;
+
+ guint query_completed : 1;
+ guint query_in_progress : 1;
+};
+
+struct _CalendarClientPrivate
+{
+ CalendarSources *calendar_sources;
+
+ GSList *appointment_sources;
+ GSList *task_sources;
+
+ icaltimezone *zone;
+
+ guint zone_listener;
+ MateConfClient *mateconf_client;
+
+ guint day;
+ guint month;
+ guint year;
+};
+
+static void calendar_client_class_init (CalendarClientClass *klass);
+static void calendar_client_init (CalendarClient *client);
+static void calendar_client_finalize (GObject *object);
+static void calendar_client_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void calendar_client_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
+
+static GSList *calendar_client_update_sources_list (CalendarClient *client,
+ GSList *sources,
+ GSList *esources,
+ guint changed_signal_id);
+static void calendar_client_appointment_sources_changed (CalendarClient *client);
+static void calendar_client_task_sources_changed (CalendarClient *client);
+
+static void calendar_client_stop_query (CalendarClient *client,
+ CalendarClientSource *source,
+ CalendarClientQuery *query);
+static void calendar_client_start_query (CalendarClient *client,
+ CalendarClientSource *source,
+ const char *query);
+
+static void calendar_client_source_finalize (CalendarClientSource *source);
+static void calendar_client_query_finalize (CalendarClientQuery *query);
+
+static void
+calendar_client_update_appointments (CalendarClient *client);
+static void
+calendar_client_update_tasks (CalendarClient *client);
+
+enum
+{
+ PROP_O,
+ PROP_DAY,
+ PROP_MONTH,
+ PROP_YEAR
+};
+
+enum
+{
+ APPOINTMENTS_CHANGED,
+ TASKS_CHANGED,
+ LAST_SIGNAL
+};
+
+static GObjectClass *parent_class = NULL;
+static guint signals [LAST_SIGNAL] = { 0, };
+
+GType
+calendar_client_get_type (void)
+{
+ static GType client_type = 0;
+
+ if (!client_type)
+ {
+ static const GTypeInfo client_info =
+ {
+ sizeof (CalendarClientClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) calendar_client_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (CalendarClient),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) calendar_client_init,
+ };
+
+ client_type = g_type_register_static (G_TYPE_OBJECT,
+ "CalendarClient",
+ &client_info, 0);
+ }
+
+ return client_type;
+}
+
+static void
+calendar_client_class_init (CalendarClientClass *klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ gobject_class->finalize = calendar_client_finalize;
+ gobject_class->set_property = calendar_client_set_property;
+ gobject_class->get_property = calendar_client_get_property;
+
+ g_type_class_add_private (klass, sizeof (CalendarClientPrivate));
+
+ g_object_class_install_property (gobject_class,
+ PROP_DAY,
+ g_param_spec_uint ("day",
+ "Day",
+ "The currently monitored day between 1 and 31 (0 denotes unset)",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_MONTH,
+ g_param_spec_uint ("month",
+ "Month",
+ "The currently monitored month between 0 and 11",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
+
+ g_object_class_install_property (gobject_class,
+ PROP_YEAR,
+ g_param_spec_uint ("year",
+ "Year",
+ "The currently monitored year",
+ 0, G_MAXUINT, 0,
+ G_PARAM_READWRITE));
+
+ signals [APPOINTMENTS_CHANGED] =
+ g_signal_new ("appointments-changed",
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CalendarClientClass, tasks_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
+ signals [TASKS_CHANGED] =
+ g_signal_new ("tasks-changed",
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CalendarClientClass, tasks_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+}
+
+/* Timezone code adapted from evolution/calendar/gui/calendar-config.c */
+/* The current timezone, e.g. "Europe/London". It may be NULL, in which case
+ you should assume UTC. */
+static gchar *
+calendar_client_config_get_timezone (MateConfClient *mateconf_client)
+{
+ char *location;
+
+ location = mateconf_client_get_string (mateconf_client,
+ CALENDAR_CONFIG_TIMEZONE,
+ NULL);
+
+ return location;
+}
+
+static icaltimezone *
+calendar_client_config_get_icaltimezone (MateConfClient *mateconf_client)
+{
+ char *location;
+ icaltimezone *zone = NULL;
+
+ location = calendar_client_config_get_timezone (mateconf_client);
+ if (!location)
+ return icaltimezone_get_utc_timezone ();
+
+ zone = icaltimezone_get_builtin_timezone (location);
+ g_free (location);
+
+ return zone;
+}
+
+static void
+calendar_client_set_timezone (CalendarClient *client)
+{
+ GSList *l;
+ GSList *esources;
+
+ client->priv->zone = calendar_client_config_get_icaltimezone (client->priv->mateconf_client);
+
+ esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources);
+ for (l = esources; l; l = l->next) {
+ ECal *source = l->data;
+
+ e_cal_set_default_timezone (source, client->priv->zone, NULL);
+ }
+}
+
+static void
+calendar_client_timezone_changed_cb (MateConfClient *mateconf_client,
+ guint id,
+ MateConfEntry *entry,
+ CalendarClient *client)
+{
+ calendar_client_set_timezone (client);
+}
+
+static void
+cal_opened_cb (ECal *ecal,
+ ECalendarStatus status,
+ CalendarClientSource *cl_source)
+{
+ ECalSourceType s_type;
+ CalendarClient *client = cl_source->client;
+
+ s_type = e_cal_get_source_type (ecal);
+
+ if (status == E_CALENDAR_STATUS_BUSY &&
+ e_cal_get_load_state (ecal) == E_CAL_LOAD_NOT_LOADED)
+ {
+ e_cal_open_async (ecal, FALSE);
+ return;
+ }
+
+ g_signal_handlers_disconnect_by_func (ecal, cal_opened_cb, cl_source);
+
+ if (status != E_CALENDAR_STATUS_OK)
+ {
+ if (s_type == E_CAL_SOURCE_TYPE_EVENT)
+ client->priv->appointment_sources = g_slist_remove (client->priv->appointment_sources,
+ cl_source);
+ else
+ client->priv->task_sources = g_slist_remove (client->priv->task_sources,
+ cl_source);
+
+ calendar_client_source_finalize (cl_source);
+ g_free (cl_source);
+
+ return;
+ }
+
+ if (s_type == E_CAL_SOURCE_TYPE_EVENT)
+ calendar_client_update_appointments (client);
+ else
+ calendar_client_update_tasks (client);
+}
+
+static void
+load_calendars (CalendarClient *client,
+ CalendarEventType type)
+{
+ GSList *l, *clients;
+
+ switch (type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ clients = client->priv->appointment_sources;
+ break;
+ case CALENDAR_EVENT_TASK:
+ clients = client->priv->task_sources;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ for (l = clients; l != NULL; l = l->next)
+ {
+ ECal *ecal;
+ CalendarClientSource *cl_source = l->data;
+
+ ecal = cl_source->source;
+
+ if (e_cal_get_load_state (ecal) == E_CAL_LOAD_LOADED)
+ continue;
+
+ g_signal_connect (G_OBJECT (ecal), "cal_opened",
+ G_CALLBACK (cal_opened_cb), cl_source);
+ e_cal_open_async (ecal, TRUE);
+ }
+}
+
+static void
+calendar_client_init (CalendarClient *client)
+{
+ GSList *esources;
+
+ client->priv = CALENDAR_CLIENT_GET_PRIVATE (client);
+
+ client->priv->calendar_sources = calendar_sources_get ();
+ client->priv->mateconf_client = mateconf_client_get_default ();
+
+ esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources);
+ client->priv->appointment_sources =
+ calendar_client_update_sources_list (client, NULL, esources, signals [APPOINTMENTS_CHANGED]);
+
+ esources = calendar_sources_get_task_sources (client->priv->calendar_sources);
+ client->priv->task_sources =
+ calendar_client_update_sources_list (client, NULL, esources, signals [TASKS_CHANGED]);
+
+ /* set the timezone before loading the clients */
+ calendar_client_set_timezone (client);
+ load_calendars (client, CALENDAR_EVENT_APPOINTMENT);
+ load_calendars (client, CALENDAR_EVENT_TASK);
+
+ g_signal_connect_swapped (client->priv->calendar_sources,
+ "appointment-sources-changed",
+ G_CALLBACK (calendar_client_appointment_sources_changed),
+ client);
+ g_signal_connect_swapped (client->priv->calendar_sources,
+ "task-sources-changed",
+ G_CALLBACK (calendar_client_task_sources_changed),
+ client);
+
+ mateconf_client_add_dir (client->priv->mateconf_client,
+ CALENDAR_CONFIG_PREFIX,
+ MATECONF_CLIENT_PRELOAD_NONE,
+ NULL);
+
+ client->priv->zone_listener = mateconf_client_notify_add (client->priv->mateconf_client,
+ CALENDAR_CONFIG_TIMEZONE,
+ (MateConfClientNotifyFunc) calendar_client_timezone_changed_cb,
+ client, NULL, NULL);
+
+ client->priv->day = -1;
+ client->priv->month = -1;
+ client->priv->year = -1;
+}
+
+static void
+calendar_client_finalize (GObject *object)
+{
+ CalendarClient *client = CALENDAR_CLIENT (object);
+ GSList *l;
+
+ if (client->priv->zone_listener)
+ {
+ mateconf_client_notify_remove (client->priv->mateconf_client,
+ client->priv->zone_listener);
+ client->priv->zone_listener = 0;
+ }
+
+ mateconf_client_remove_dir (client->priv->mateconf_client,
+ CALENDAR_CONFIG_PREFIX,
+ NULL);
+
+ if (client->priv->mateconf_client)
+ g_object_unref (client->priv->mateconf_client);
+ client->priv->mateconf_client = NULL;
+
+ for (l = client->priv->appointment_sources; l; l = l->next)
+ {
+ calendar_client_source_finalize (l->data);
+ g_free (l->data);
+ }
+ g_slist_free (client->priv->appointment_sources);
+ client->priv->appointment_sources = NULL;
+
+ for (l = client->priv->task_sources; l; l = l->next)
+ {
+ calendar_client_source_finalize (l->data);
+ g_free (l->data);
+ }
+ g_slist_free (client->priv->task_sources);
+ client->priv->task_sources = NULL;
+
+ if (client->priv->calendar_sources)
+ g_object_unref (client->priv->calendar_sources);
+ client->priv->calendar_sources = NULL;
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+calendar_client_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ CalendarClient *client = CALENDAR_CLIENT (object);
+
+ switch (prop_id)
+ {
+ case PROP_DAY:
+ calendar_client_select_day (client, g_value_get_uint (value));
+ break;
+ case PROP_MONTH:
+ calendar_client_select_month (client,
+ g_value_get_uint (value),
+ client->priv->year);
+ break;
+ case PROP_YEAR:
+ calendar_client_select_month (client,
+ client->priv->month,
+ g_value_get_uint (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+calendar_client_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ CalendarClient *client = CALENDAR_CLIENT (object);
+
+ switch (prop_id)
+ {
+ case PROP_DAY:
+ g_value_set_uint (value, client->priv->day);
+ break;
+ case PROP_MONTH:
+ g_value_set_uint (value, client->priv->month);
+ break;
+ case PROP_YEAR:
+ g_value_set_uint (value, client->priv->year);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+CalendarClient *
+calendar_client_new (void)
+{
+ return g_object_new (CALENDAR_TYPE_CLIENT, NULL);
+}
+
+/* @day and @month can happily be out of range as
+ * mktime() will normalize them correctly. From mktime(3):
+ *
+ * "If structure members are outside their legal interval,
+ * they will be normalized (so that, e.g., 40 October is
+ * changed into 9 November)."
+ *
+ * "What?", you say, "Something useful in libc?"
+ */
+static inline time_t
+make_time_for_day_begin (int day,
+ int month,
+ int year)
+{
+ struct tm localtime_tm = { 0, };
+
+ localtime_tm.tm_mday = day;
+ localtime_tm.tm_mon = month;
+ localtime_tm.tm_year = year - 1900;
+ localtime_tm.tm_isdst = -1;
+
+ return mktime (&localtime_tm);
+}
+
+static inline char *
+make_isodate_for_day_begin (int day,
+ int month,
+ int year)
+{
+ time_t utctime;
+
+ utctime = make_time_for_day_begin (day, month, year);
+
+ return utctime != -1 ? isodate_from_time_t (utctime) : NULL;
+}
+
+static time_t
+get_time_from_property (icalcomponent *ical,
+ icalproperty_kind prop_kind,
+ struct icaltimetype (* get_prop_func) (const icalproperty *prop),
+ icaltimezone *default_zone)
+{
+ icalproperty *prop;
+ struct icaltimetype ical_time;
+ icalparameter *param;
+ icaltimezone *timezone = NULL;
+
+ prop = icalcomponent_get_first_property (ical, prop_kind);
+ if (!prop)
+ return 0;
+
+ ical_time = get_prop_func (prop);
+
+ param = icalproperty_get_first_parameter (prop, ICAL_TZID_PARAMETER);
+ if (param)
+ timezone = icaltimezone_get_builtin_timezone_from_tzid (icalparameter_get_tzid (param));
+ else if (icaltime_is_utc (ical_time))
+ timezone = icaltimezone_get_utc_timezone ();
+ else
+ timezone = default_zone;
+
+ return icaltime_as_timet_with_zone (ical_time, timezone);
+}
+
+static char *
+get_ical_uid (icalcomponent *ical)
+{
+ return g_strdup (icalcomponent_get_uid (ical));
+}
+
+static char *
+get_ical_rid (icalcomponent *ical)
+{
+ icalproperty *prop;
+ struct icaltimetype ical_time;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_RECURRENCEID_PROPERTY);
+ if (!prop)
+ return NULL;
+
+ ical_time = icalproperty_get_recurrenceid (prop);
+
+ return icaltime_is_valid_time (ical_time) && !icaltime_is_null_time (ical_time) ?
+ g_strdup (icaltime_as_ical_string (ical_time)) : NULL;
+}
+
+static char *
+get_ical_summary (icalcomponent *ical)
+{
+ icalproperty *prop;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_SUMMARY_PROPERTY);
+ if (!prop)
+ return NULL;
+
+ return g_strdup (icalproperty_get_summary (prop));
+}
+
+static char *
+get_ical_description (icalcomponent *ical)
+{
+ icalproperty *prop;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_DESCRIPTION_PROPERTY);
+ if (!prop)
+ return NULL;
+
+ return g_strdup (icalproperty_get_description (prop));
+}
+
+static inline time_t
+get_ical_start_time (icalcomponent *ical,
+ icaltimezone *default_zone)
+{
+ return get_time_from_property (ical,
+ ICAL_DTSTART_PROPERTY,
+ icalproperty_get_dtstart,
+ default_zone);
+}
+
+static inline time_t
+get_ical_end_time (icalcomponent *ical,
+ icaltimezone *default_zone)
+{
+ return get_time_from_property (ical,
+ ICAL_DTEND_PROPERTY,
+ icalproperty_get_dtend,
+ default_zone);
+}
+
+static gboolean
+get_ical_is_all_day (icalcomponent *ical,
+ time_t start_time,
+ icaltimezone *default_zone)
+{
+ icalproperty *prop;
+ struct tm *start_tm;
+ time_t end_time;
+ struct icaldurationtype duration;
+ struct icaltimetype start_icaltime;
+
+ start_icaltime = icalcomponent_get_dtstart (ical);
+ if (start_icaltime.is_date)
+ return TRUE;
+
+ start_tm = gmtime (&start_time);
+ if (start_tm->tm_sec != 0 ||
+ start_tm->tm_min != 0 ||
+ start_tm->tm_hour != 0)
+ return FALSE;
+
+ if ((end_time = get_ical_end_time (ical, default_zone)))
+ return (end_time - start_time) % 86400 == 0;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_DURATION_PROPERTY);
+ if (!prop)
+ return FALSE;
+
+ duration = icalproperty_get_duration (prop);
+
+ return icaldurationtype_as_int (duration) % 86400 == 0;
+}
+
+static inline time_t
+get_ical_due_time (icalcomponent *ical,
+ icaltimezone *default_zone)
+{
+ return get_time_from_property (ical,
+ ICAL_DUE_PROPERTY,
+ icalproperty_get_due,
+ default_zone);
+}
+
+static guint
+get_ical_percent_complete (icalcomponent *ical)
+{
+ icalproperty *prop;
+ icalproperty_status status;
+ int percent_complete;
+
+ status = icalcomponent_get_status (ical);
+ if (status == ICAL_STATUS_COMPLETED)
+ return 100;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_COMPLETED_PROPERTY);
+ if (prop)
+ return 100;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_PERCENTCOMPLETE_PROPERTY);
+ if (!prop)
+ return 0;
+
+ percent_complete = icalproperty_get_percentcomplete (prop);
+
+ return CLAMP (percent_complete, 0, 100);
+}
+
+static inline time_t
+get_ical_completed_time (icalcomponent *ical,
+ icaltimezone *default_zone)
+{
+ return get_time_from_property (ical,
+ ICAL_COMPLETED_PROPERTY,
+ icalproperty_get_completed,
+ default_zone);
+}
+
+static int
+get_ical_priority (icalcomponent *ical)
+{
+ icalproperty *prop;
+
+ prop = icalcomponent_get_first_property (ical, ICAL_PRIORITY_PROPERTY);
+ if (!prop)
+ return -1;
+
+ return icalproperty_get_priority (prop);
+}
+
+static char *
+get_source_color (ECal *esource)
+{
+ ESource *source;
+
+ g_return_val_if_fail (E_IS_CAL (esource), NULL);
+
+ source = e_cal_get_source (esource);
+
+ return g_strdup (e_source_peek_color_spec (source));
+}
+
+static gchar *
+get_source_uri (ECal *esource)
+{
+ ESource *source;
+ gchar *string;
+ gchar **list;
+
+ g_return_val_if_fail (E_IS_CAL (esource), NULL);
+
+ source = e_cal_get_source (esource);
+ string = g_strdup (e_source_get_uri (source));
+ if (string) {
+ list = g_strsplit (string, ":", 2);
+ g_free (string);
+
+ if (list[0]) {
+ string = g_strdup (list[0]);
+ g_strfreev (list);
+ return string;
+ }
+ g_strfreev (list);
+ }
+ return NULL;
+}
+
+static inline int
+null_safe_strcmp (const char *a,
+ const char *b)
+{
+ return (!a && !b) ? 0 : (a && !b) || (!a && b) ? 1 : strcmp (a, b);
+}
+
+static inline gboolean
+calendar_appointment_equal (CalendarAppointment *a,
+ CalendarAppointment *b)
+{
+ GSList *la, *lb;
+
+ if (g_slist_length (a->occurrences) != g_slist_length (b->occurrences))
+ return FALSE;
+
+ for (la = a->occurrences, lb = b->occurrences; la && lb; la = la->next, lb = lb->next)
+ {
+ CalendarOccurrence *oa = la->data;
+ CalendarOccurrence *ob = lb->data;
+
+ if (oa->start_time != ob->start_time ||
+ oa->end_time != ob->end_time)
+ return FALSE;
+ }
+
+ return
+ null_safe_strcmp (a->uid, b->uid) == 0 &&
+ null_safe_strcmp (a->uri, b->uri) == 0 &&
+ null_safe_strcmp (a->summary, b->summary) == 0 &&
+ null_safe_strcmp (a->description, b->description) == 0 &&
+ null_safe_strcmp (a->color_string, b->color_string) == 0 &&
+ a->start_time == b->start_time &&
+ a->end_time == b->end_time &&
+ a->is_all_day == b->is_all_day;
+}
+
+static void
+calendar_appointment_copy (CalendarAppointment *appointment,
+ CalendarAppointment *appointment_copy)
+{
+ GSList *l;
+
+ g_assert (appointment != NULL);
+ g_assert (appointment_copy != NULL);
+
+ appointment_copy->occurrences = g_slist_copy (appointment->occurrences);
+ for (l = appointment_copy->occurrences; l; l = l->next)
+ {
+ CalendarOccurrence *occurrence = l->data;
+ CalendarOccurrence *occurrence_copy;
+
+ occurrence_copy = g_new0 (CalendarOccurrence, 1);
+ occurrence_copy->start_time = occurrence->start_time;
+ occurrence_copy->end_time = occurrence->end_time;
+
+ l->data = occurrence_copy;
+ }
+
+ appointment_copy->uid = g_strdup (appointment->uid);
+ appointment_copy->uri = g_strdup (appointment->uri);
+ appointment_copy->summary = g_strdup (appointment->summary);
+ appointment_copy->description = g_strdup (appointment->description);
+ appointment_copy->color_string = g_strdup (appointment->color_string);
+ appointment_copy->start_time = appointment->start_time;
+ appointment_copy->end_time = appointment->end_time;
+ appointment_copy->is_all_day = appointment->is_all_day;
+}
+
+static void
+calendar_appointment_finalize (CalendarAppointment *appointment)
+{
+ GSList *l;
+
+ for (l = appointment->occurrences; l; l = l->next)
+ g_free (l->data);
+ g_slist_free (appointment->occurrences);
+ appointment->occurrences = NULL;
+
+ g_free (appointment->uid);
+ appointment->uid = NULL;
+
+ g_free (appointment->rid);
+ appointment->rid = NULL;
+
+ g_free (appointment->uri);
+ appointment->uri = NULL;
+
+ g_free (appointment->summary);
+ appointment->summary = NULL;
+
+ g_free (appointment->description);
+ appointment->description = NULL;
+
+ g_free (appointment->color_string);
+ appointment->color_string = NULL;
+
+ appointment->start_time = 0;
+ appointment->is_all_day = FALSE;
+}
+
+static void
+calendar_appointment_init (CalendarAppointment *appointment,
+ icalcomponent *ical,
+ CalendarClientSource *source,
+ icaltimezone *default_zone)
+{
+ appointment->uid = get_ical_uid (ical);
+ appointment->rid = get_ical_rid (ical);
+ appointment->uri = get_source_uri (source->source);
+ appointment->summary = get_ical_summary (ical);
+ appointment->description = get_ical_description (ical);
+ appointment->color_string = get_source_color (source->source);
+ appointment->start_time = get_ical_start_time (ical, default_zone);
+ appointment->end_time = get_ical_end_time (ical, default_zone);
+ appointment->is_all_day = get_ical_is_all_day (ical,
+ appointment->start_time,
+ default_zone);
+}
+
+static icaltimezone *
+resolve_timezone_id (const char *tzid,
+ ECal *source)
+{
+ icaltimezone *retval;
+
+ retval = icaltimezone_get_builtin_timezone_from_tzid (tzid);
+ if (!retval)
+ {
+ e_cal_get_timezone (source, tzid, &retval, NULL);
+ }
+
+ return retval;
+}
+
+static gboolean
+calendar_appointment_collect_occurrence (ECalComponent *component,
+ time_t occurrence_start,
+ time_t occurrence_end,
+ gpointer data)
+{
+ CalendarOccurrence *occurrence;
+ GSList **collect_loc = data;
+
+ occurrence = g_new0 (CalendarOccurrence, 1);
+ occurrence->start_time = occurrence_start;
+ occurrence->end_time = occurrence_end;
+
+ *collect_loc = g_slist_prepend (*collect_loc, occurrence);
+
+ return TRUE;
+}
+
+static void
+calendar_appointment_generate_ocurrences (CalendarAppointment *appointment,
+ icalcomponent *ical,
+ ECal *source,
+ time_t start,
+ time_t end,
+ icaltimezone *default_zone)
+{
+ ECalComponent *ecal;
+
+ g_assert (appointment->occurrences == NULL);
+
+ ecal = e_cal_component_new ();
+ e_cal_component_set_icalcomponent (ecal,
+ icalcomponent_new_clone (ical));
+
+ e_cal_recur_generate_instances (ecal,
+ start,
+ end,
+ calendar_appointment_collect_occurrence,
+ &appointment->occurrences,
+ (ECalRecurResolveTimezoneFn) resolve_timezone_id,
+ source,
+ default_zone);
+
+ g_object_unref (ecal);
+
+ appointment->occurrences = g_slist_reverse (appointment->occurrences);
+}
+
+static inline gboolean
+calendar_task_equal (CalendarTask *a,
+ CalendarTask *b)
+{
+ return
+ null_safe_strcmp (a->uid, b->uid) == 0 &&
+ null_safe_strcmp (a->summary, b->summary) == 0 &&
+ null_safe_strcmp (a->description, b->description) == 0 &&
+ null_safe_strcmp (a->color_string, b->color_string) == 0 &&
+ a->start_time == b->start_time &&
+ a->due_time == b->due_time &&
+ a->percent_complete == b->percent_complete &&
+ a->completed_time == b->completed_time &&
+ a->priority == b->priority;
+}
+
+static void
+calendar_task_copy (CalendarTask *task,
+ CalendarTask *task_copy)
+{
+ g_assert (task != NULL);
+ g_assert (task_copy != NULL);
+
+ task_copy->uid = g_strdup (task->uid);
+ task_copy->summary = g_strdup (task->summary);
+ task_copy->description = g_strdup (task->description);
+ task_copy->color_string = g_strdup (task->color_string);
+ task_copy->start_time = task->start_time;
+ task_copy->due_time = task->due_time;
+ task_copy->percent_complete = task->percent_complete;
+ task_copy->completed_time = task->completed_time;
+ task_copy->priority = task->priority;
+}
+
+static void
+calendar_task_finalize (CalendarTask *task)
+{
+ g_free (task->uid);
+ task->uid = NULL;
+
+ g_free (task->summary);
+ task->summary = NULL;
+
+ g_free (task->description);
+ task->description = NULL;
+
+ g_free (task->color_string);
+ task->color_string = NULL;
+
+ task->percent_complete = 0;
+}
+
+static void
+calendar_task_init (CalendarTask *task,
+ icalcomponent *ical,
+ CalendarClientSource *source,
+ icaltimezone *default_zone)
+{
+ task->uid = get_ical_uid (ical);
+ task->summary = get_ical_summary (ical);
+ task->description = get_ical_description (ical);
+ task->color_string = get_source_color (source->source);
+ task->start_time = get_ical_start_time (ical, default_zone);
+ task->due_time = get_ical_due_time (ical, default_zone);
+ task->percent_complete = get_ical_percent_complete (ical);
+ task->completed_time = get_ical_completed_time (ical, default_zone);
+ task->priority = get_ical_priority (ical);
+}
+
+void
+calendar_event_free (CalendarEvent *event)
+{
+ switch (event->type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ calendar_appointment_finalize (CALENDAR_APPOINTMENT (event));
+ break;
+ case CALENDAR_EVENT_TASK:
+ calendar_task_finalize (CALENDAR_TASK (event));
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ g_free (event);
+}
+
+static CalendarEvent *
+calendar_event_new (icalcomponent *ical,
+ CalendarClientSource *source,
+ icaltimezone *default_zone)
+{
+ CalendarEvent *event;
+
+ event = g_new0 (CalendarEvent, 1);
+
+ switch (icalcomponent_isa (ical))
+ {
+ case ICAL_VEVENT_COMPONENT:
+ event->type = CALENDAR_EVENT_APPOINTMENT;
+ calendar_appointment_init (CALENDAR_APPOINTMENT (event),
+ ical,
+ source,
+ default_zone);
+ break;
+ case ICAL_VTODO_COMPONENT:
+ event->type = CALENDAR_EVENT_TASK;
+ calendar_task_init (CALENDAR_TASK (event),
+ ical,
+ source,
+ default_zone);
+ break;
+ default:
+ g_warning ("Unknown calendar component type: %d\n",
+ icalcomponent_isa (ical));
+ g_free (event);
+ return NULL;
+ }
+
+ return event;
+}
+
+static CalendarEvent *
+calendar_event_copy (CalendarEvent *event)
+{
+ CalendarEvent *retval;
+
+ if (!event)
+ return NULL;
+
+ retval = g_new0 (CalendarEvent, 1);
+
+ retval->type = event->type;
+
+ switch (event->type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ calendar_appointment_copy (CALENDAR_APPOINTMENT (event),
+ CALENDAR_APPOINTMENT (retval));
+ break;
+ case CALENDAR_EVENT_TASK:
+ calendar_task_copy (CALENDAR_TASK (event),
+ CALENDAR_TASK (retval));
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ return retval;
+}
+
+static char *
+calendar_event_get_uid (CalendarEvent *event)
+{
+ switch (event->type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ return g_strdup_printf ("%s%s", CALENDAR_APPOINTMENT (event)->uid, CALENDAR_APPOINTMENT (event)->rid ? CALENDAR_APPOINTMENT (event)->rid : "");
+ break;
+ case CALENDAR_EVENT_TASK:
+ return g_strdup (CALENDAR_TASK (event)->uid);
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+
+ return NULL;
+}
+
+static gboolean
+calendar_event_equal (CalendarEvent *a,
+ CalendarEvent *b)
+{
+ if (!a && !b)
+ return TRUE;
+
+ if ((a && !b) || (!a && b))
+ return FALSE;
+
+ if (a->type != b->type)
+ return FALSE;
+
+ switch (a->type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ return calendar_appointment_equal (CALENDAR_APPOINTMENT (a),
+ CALENDAR_APPOINTMENT (b));
+ case CALENDAR_EVENT_TASK:
+ return calendar_task_equal (CALENDAR_TASK (a),
+ CALENDAR_TASK (b));
+ default:
+ break;
+ }
+
+ g_assert_not_reached ();
+
+ return FALSE;
+}
+
+static void
+calendar_event_generate_ocurrences (CalendarEvent *event,
+ icalcomponent *ical,
+ ECal *source,
+ time_t start,
+ time_t end,
+ icaltimezone *default_zone)
+{
+ if (event->type != CALENDAR_EVENT_APPOINTMENT)
+ return;
+
+ calendar_appointment_generate_ocurrences (CALENDAR_APPOINTMENT (event),
+ ical,
+ source,
+ start,
+ end,
+ default_zone);
+}
+
+static inline void
+calendar_event_debug_dump (CalendarEvent *event)
+{
+#ifdef CALENDAR_ENABLE_DEBUG
+ switch (event->type)
+ {
+ case CALENDAR_EVENT_APPOINTMENT:
+ {
+ char *start_str;
+ char *end_str;
+ GSList *l;
+
+ start_str = CALENDAR_APPOINTMENT (event)->start_time ?
+ isodate_from_time_t (CALENDAR_APPOINTMENT (event)->start_time) :
+ g_strdup ("(undefined)");
+ end_str = CALENDAR_APPOINTMENT (event)->end_time ?
+ isodate_from_time_t (CALENDAR_APPOINTMENT (event)->end_time) :
+ g_strdup ("(undefined)");
+
+ dprintf ("Appointment: uid '%s', summary '%s', description '%s', "
+ "start_time '%s', end_time '%s', is_all_day %s\n",
+ CALENDAR_APPOINTMENT (event)->uid,
+ CALENDAR_APPOINTMENT (event)->summary,
+ CALENDAR_APPOINTMENT (event)->description,
+ start_str,
+ end_str,
+ CALENDAR_APPOINTMENT (event)->is_all_day ? "(true)" : "(false)");
+
+ g_free (start_str);
+ g_free (end_str);
+
+ dprintf (" Occurrences:\n");
+ for (l = CALENDAR_APPOINTMENT (event)->occurrences; l; l = l->next)
+ {
+ CalendarOccurrence *occurrence = l->data;
+
+ start_str = occurrence->start_time ?
+ isodate_from_time_t (occurrence->start_time) :
+ g_strdup ("(undefined)");
+
+ end_str = occurrence->end_time ?
+ isodate_from_time_t (occurrence->end_time) :
+ g_strdup ("(undefined)");
+
+ dprintf (" start_time '%s', end_time '%s'\n",
+ start_str, end_str);
+
+ g_free (start_str);
+ g_free (end_str);
+ }
+ }
+ break;
+ case CALENDAR_EVENT_TASK:
+ {
+ char *start_str;
+ char *due_str;
+ char *completed_str;
+
+ start_str = CALENDAR_TASK (event)->start_time ?
+ isodate_from_time_t (CALENDAR_TASK (event)->start_time) :
+ g_strdup ("(undefined)");
+ due_str = CALENDAR_TASK (event)->due_time ?
+ isodate_from_time_t (CALENDAR_TASK (event)->due_time) :
+ g_strdup ("(undefined)");
+ completed_str = CALENDAR_TASK (event)->completed_time ?
+ isodate_from_time_t (CALENDAR_TASK (event)->completed_time) :
+ g_strdup ("(undefined)");
+
+ dprintf ("Task: uid '%s', summary '%s', description '%s', "
+ "start_time '%s', due_time '%s', percent_complete %d, completed_time '%s'\n",
+ CALENDAR_TASK (event)->uid,
+ CALENDAR_TASK (event)->summary,
+ CALENDAR_TASK (event)->description,
+ start_str,
+ due_str,
+ CALENDAR_TASK (event)->percent_complete,
+ completed_str);
+
+ g_free (completed_str);
+ }
+ break;
+ default:
+ g_assert_not_reached ();
+ break;
+ }
+#endif
+}
+
+static inline CalendarClientQuery *
+goddamn_this_is_crack (CalendarClientSource *source,
+ ECalView *view,
+ gboolean *emit_signal)
+{
+ g_assert (view != NULL);
+
+ if (source->completed_query.view == view)
+ {
+ if (emit_signal)
+ *emit_signal = TRUE;
+ return &source->completed_query;
+ }
+ else if (source->in_progress_query.view == view)
+ {
+ if (emit_signal)
+ *emit_signal = FALSE;
+ return &source->in_progress_query;
+ }
+
+ g_assert_not_reached ();
+
+ return NULL;
+}
+
+static void
+calendar_client_handle_query_completed (CalendarClientSource *source,
+ ECalendarStatus status,
+ ECalView *view)
+{
+ CalendarClientQuery *query;
+
+ query = goddamn_this_is_crack (source, view, NULL);
+
+ dprintf ("Query %p completed: %s\n", query, e_cal_get_error_message (status));
+
+ if (status != E_CALENDAR_STATUS_OK)
+ {
+ g_warning ("Calendar query failed: %s\n",
+ e_cal_get_error_message (status));
+ calendar_client_stop_query (source->client, source, query);
+ return;
+ }
+
+ g_assert (source->query_in_progress != FALSE);
+ g_assert (query == &source->in_progress_query);
+
+ calendar_client_query_finalize (&source->completed_query);
+
+ source->completed_query = source->in_progress_query;
+ source->query_completed = TRUE;
+
+ source->query_in_progress = FALSE;
+ source->in_progress_query.view = NULL;
+ source->in_progress_query.events = NULL;
+
+ g_signal_emit (source->client, source->changed_signal_id, 0);
+}
+
+static void
+calendar_client_handle_query_result (CalendarClientSource *source,
+ GList *objects,
+ ECalView *view)
+{
+ CalendarClientQuery *query;
+ CalendarClient *client;
+ gboolean emit_signal;
+ gboolean events_changed;
+ GList *l;
+ time_t month_begin;
+ time_t month_end;
+
+ client = source->client;
+
+ query = goddamn_this_is_crack (source, view, &emit_signal);
+
+ dprintf ("Query %p result: %d objects:\n",
+ query, g_list_length (objects));
+
+ month_begin = make_time_for_day_begin (1,
+ client->priv->month,
+ client->priv->year);
+
+ month_end = make_time_for_day_begin (1,
+ client->priv->month + 1,
+ client->priv->year);
+
+ events_changed = FALSE;
+ for (l = objects; l; l = l->next)
+ {
+ CalendarEvent *event;
+ CalendarEvent *old_event;
+ icalcomponent *ical = l->data;
+ char *uid;
+
+ event = calendar_event_new (ical, source, client->priv->zone);
+ if (!event)
+ continue;
+
+ calendar_event_generate_ocurrences (event,
+ ical,
+ source->source,
+ month_begin,
+ month_end,
+ client->priv->zone);
+
+ uid = calendar_event_get_uid (event);
+
+ old_event = g_hash_table_lookup (query->events, uid);
+
+ if (!calendar_event_equal (event, old_event))
+ {
+ dprintf ("Event %s: ", old_event ? "modified" : "added");
+
+ calendar_event_debug_dump (event);
+
+ g_hash_table_replace (query->events, uid, event);
+
+ events_changed = TRUE;
+ }
+ else
+ {
+ g_free (uid);
+ }
+ }
+
+ if (emit_signal && events_changed)
+ {
+ g_signal_emit (source->client, source->changed_signal_id, 0);
+ }
+}
+
+static gboolean
+check_object_remove (gpointer key,
+ gpointer value,
+ gpointer data)
+{
+ char *uid = data;
+ ssize_t len;
+
+ len = strlen (uid);
+
+ if (len <= strlen (key) && strncmp (uid, key, len) == 0)
+ {
+ dprintf ("Event removed: ");
+
+ calendar_event_debug_dump (value);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void
+calendar_client_handle_objects_removed (CalendarClientSource *source,
+ GList *ids,
+ ECalView *view)
+{
+ CalendarClientQuery *query;
+ gboolean emit_signal;
+ gboolean events_changed;
+ GList *l;
+
+ query = goddamn_this_is_crack (source, view, &emit_signal);
+
+ events_changed = FALSE;
+ for (l = ids; l; l = l->next)
+ {
+ CalendarEvent *event;
+ ECalComponentId *id = l->data;
+ char *uid = g_strdup_printf ("%s%s", id->uid, id->rid ? id->rid : "");
+
+ if (!id->rid || !(*id->rid))
+ {
+ int size = g_hash_table_size (query->events);
+
+ g_hash_table_foreach_remove (query->events, check_object_remove, id->uid);
+
+ if (size != g_hash_table_size (query->events))
+ events_changed = TRUE;
+ }
+ else if ((event = g_hash_table_lookup (query->events, uid)))
+ {
+ dprintf ("Event removed: ");
+
+ calendar_event_debug_dump (event);
+
+ g_assert (g_hash_table_remove (query->events, uid));
+
+ events_changed = TRUE;
+ }
+ g_free (uid);
+ }
+
+ if (emit_signal && events_changed)
+ {
+ g_signal_emit (source->client, source->changed_signal_id, 0);
+ }
+}
+
+static void
+calendar_client_query_finalize (CalendarClientQuery *query)
+{
+ if (query->view)
+ g_object_unref (query->view);
+ query->view = NULL;
+
+ if (query->events)
+ g_hash_table_destroy (query->events);
+ query->events = NULL;
+}
+
+static void
+calendar_client_stop_query (CalendarClient *client,
+ CalendarClientSource *source,
+ CalendarClientQuery *query)
+{
+ if (query == &source->in_progress_query)
+ {
+ dprintf ("Stopping in progress query %p\n", query);
+
+ g_assert (source->query_in_progress != FALSE);
+
+ source->query_in_progress = FALSE;
+ }
+ else if (query == &source->completed_query)
+ {
+ dprintf ("Stopping completed query %p\n", query);
+
+ g_assert (source->query_completed != FALSE);
+
+ source->query_completed = FALSE;
+ }
+ else
+ g_assert_not_reached ();
+
+ calendar_client_query_finalize (query);
+}
+
+static void
+calendar_client_start_query (CalendarClient *client,
+ CalendarClientSource *source,
+ const char *query)
+{
+ ECalView *view = NULL;
+ GError *error = NULL;
+
+ if (!e_cal_get_query (source->source, query, &view, &error))
+ {
+ g_warning ("Error preparing the query: '%s': %s\n",
+ query, error->message);
+ g_error_free (error);
+ return;
+ }
+
+ g_assert (view != NULL);
+
+ if (source->query_in_progress)
+ calendar_client_stop_query (client, source, &source->in_progress_query);
+
+ dprintf ("Starting query %p: '%s'\n", &source->in_progress_query, query);
+
+ source->query_in_progress = TRUE;
+ source->in_progress_query.view = view;
+ source->in_progress_query.events =
+ g_hash_table_new_full (g_str_hash,
+ g_str_equal,
+ g_free,
+ (GDestroyNotify) calendar_event_free);
+
+ g_signal_connect_swapped (view, "objects-added",
+ G_CALLBACK (calendar_client_handle_query_result),
+ source);
+ g_signal_connect_swapped (view, "objects-modified",
+ G_CALLBACK (calendar_client_handle_query_result),
+ source);
+ g_signal_connect_swapped (view, "objects-removed",
+ G_CALLBACK (calendar_client_handle_objects_removed),
+ source);
+ g_signal_connect_swapped (view, "view-done",
+ G_CALLBACK (calendar_client_handle_query_completed),
+ source);
+
+ e_cal_view_start (view);
+}
+
+static void
+calendar_client_update_appointments (CalendarClient *client)
+{
+ GSList *l;
+ char *query;
+ char *month_begin;
+ char *month_end;
+
+ if (client->priv->month == -1 ||
+ client->priv->year == -1)
+ return;
+
+ month_begin = make_isodate_for_day_begin (1,
+ client->priv->month,
+ client->priv->year);
+
+ month_end = make_isodate_for_day_begin (1,
+ client->priv->month + 1,
+ client->priv->year);
+
+ query = g_strdup_printf ("occur-in-time-range? (make-time \"%s\") "
+ "(make-time \"%s\")",
+ month_begin, month_end);
+
+ for (l = client->priv->appointment_sources; l; l = l->next)
+ {
+ CalendarClientSource *cs = l->data;
+
+ if (e_cal_get_load_state (cs->source) != E_CAL_LOAD_LOADED)
+ continue;
+
+ calendar_client_start_query (client, cs, query);
+ }
+
+ g_free (month_begin);
+ g_free (month_end);
+ g_free (query);
+}
+
+/* FIXME:
+ * perhaps we should use evo's "hide_completed_tasks" pref?
+ */
+static void
+calendar_client_update_tasks (CalendarClient *client)
+{
+ GSList *l;
+ char *query;
+
+#ifdef FIX_BROKEN_TASKS_QUERY
+ /* FIXME: this doesn't work for tasks without a start or
+ * due date
+ * Look at filter_task() to see the behaviour we
+ * want.
+ */
+
+ char *day_begin;
+ char *day_end;
+
+ if (client->priv->day == -1 ||
+ client->priv->month == -1 ||
+ client->priv->year == -1)
+ return;
+
+ day_begin = make_isodate_for_day_begin (client->priv->day,
+ client->priv->month,
+ client->priv->year);
+
+ day_end = make_isodate_for_day_begin (client->priv->day + 1,
+ client->priv->month,
+ client->priv->year);
+ if (!day_begin || !day_end)
+ {
+ g_warning ("Cannot run query with invalid date: %dd %dy %dm\n",
+ client->priv->day,
+ client->priv->month,
+ client->priv->year);
+ g_free (day_begin);
+ g_free (day_end);
+ return;
+ }
+
+ query = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\") "
+ "(make-time \"%s\")) "
+ "(or (not is-completed?) "
+ "(and (is-completed?) "
+ "(not (completed-before? (make-time \"%s\"))))))",
+ day_begin, day_end, day_begin);
+#else
+ query = g_strdup ("#t");
+#endif /* FIX_BROKEN_TASKS_QUERY */
+
+ for (l = client->priv->task_sources; l; l = l->next)
+ {
+ CalendarClientSource *cs = l->data;
+
+ if (e_cal_get_load_state (cs->source) != E_CAL_LOAD_LOADED)
+ continue;
+
+ calendar_client_start_query (client, cs, query);
+ }
+
+#ifdef FIX_BROKEN_TASKS_QUERY
+ g_free (day_begin);
+ g_free (day_end);
+#endif
+ g_free (query);
+}
+
+static void
+calendar_client_source_finalize (CalendarClientSource *source)
+{
+ source->client = NULL;
+
+ if (source->source) {
+ g_signal_handlers_disconnect_by_func (source->source,
+ cal_opened_cb, source);
+ g_object_unref (source->source);
+ }
+ source->source = NULL;
+
+ calendar_client_query_finalize (&source->completed_query);
+ calendar_client_query_finalize (&source->in_progress_query);
+
+ source->query_completed = FALSE;
+ source->query_in_progress = FALSE;
+}
+
+static int
+compare_calendar_sources (CalendarClientSource *s1,
+ CalendarClientSource *s2)
+{
+ return (s1->source == s2->source) ? 0 : 1;
+}
+
+static GSList *
+calendar_client_update_sources_list (CalendarClient *client,
+ GSList *sources,
+ GSList *esources,
+ guint changed_signal_id)
+{
+ GSList *retval, *l;
+
+ retval = NULL;
+
+ for (l = esources; l; l = l->next)
+ {
+ CalendarClientSource dummy_source;
+ CalendarClientSource *new_source;
+ GSList *s;
+ ECal *esource = l->data;
+
+ dummy_source.source = esource;
+
+ dprintf ("update_sources_list: adding client %s: ",
+ e_source_peek_uid (e_cal_get_source (esource)));
+
+ if ((s = g_slist_find_custom (sources,
+ &dummy_source,
+ (GCompareFunc) compare_calendar_sources)))
+ {
+ dprintf ("already on list\n");
+ new_source = s->data;
+ sources = g_slist_delete_link (sources, s);
+ }
+ else
+ {
+ dprintf ("added\n");
+ new_source = g_new0 (CalendarClientSource, 1);
+ new_source->client = client;
+ new_source->source = g_object_ref (esource);
+ new_source->changed_signal_id = changed_signal_id;
+ }
+
+ retval = g_slist_prepend (retval, new_source);
+ }
+
+ for (l = sources; l; l = l->next)
+ {
+ CalendarClientSource *source = l->data;
+
+ dprintf ("Removing client %s from list\n",
+ e_source_peek_uid (e_cal_get_source (source->source)));
+
+ calendar_client_source_finalize (source);
+ g_free (source);
+ }
+ g_slist_free (sources);
+
+ return retval;
+}
+
+static void
+calendar_client_appointment_sources_changed (CalendarClient *client)
+{
+ GSList *esources;
+
+ dprintf ("appointment_sources_changed: updating ...\n");
+
+ esources = calendar_sources_get_appointment_sources (client->priv->calendar_sources);
+
+ client->priv->appointment_sources =
+ calendar_client_update_sources_list (client,
+ client->priv->appointment_sources,
+ esources,
+ signals [APPOINTMENTS_CHANGED]);
+
+ load_calendars (client, CALENDAR_EVENT_APPOINTMENT);
+ calendar_client_update_appointments (client);
+}
+
+static void
+calendar_client_task_sources_changed (CalendarClient *client)
+{
+ GSList *esources;
+
+ dprintf ("task_sources_changed: updating ...\n");
+
+ esources = calendar_sources_get_task_sources (client->priv->calendar_sources);
+
+ client->priv->task_sources =
+ calendar_client_update_sources_list (client,
+ client->priv->task_sources,
+ esources,
+ signals [TASKS_CHANGED]);
+
+ load_calendars (client, CALENDAR_EVENT_TASK);
+ calendar_client_update_tasks (client);
+}
+
+void
+calendar_client_get_date (CalendarClient *client,
+ guint *year,
+ guint *month,
+ guint *day)
+{
+ g_return_if_fail (CALENDAR_IS_CLIENT (client));
+
+ if (year)
+ *year = client->priv->year;
+
+ if (month)
+ *month = client->priv->month;
+
+ if (day)
+ *day = client->priv->day;
+}
+
+void
+calendar_client_select_month (CalendarClient *client,
+ guint month,
+ guint year)
+{
+ g_return_if_fail (CALENDAR_IS_CLIENT (client));
+ g_return_if_fail (month <= 11);
+
+ if (client->priv->year != year || client->priv->month != month)
+ {
+ client->priv->month = month;
+ client->priv->year = year;
+
+ calendar_client_update_appointments (client);
+ calendar_client_update_tasks (client);
+
+ g_object_freeze_notify (G_OBJECT (client));
+ g_object_notify (G_OBJECT (client), "month");
+ g_object_notify (G_OBJECT (client), "year");
+ g_object_thaw_notify (G_OBJECT (client));
+ }
+}
+
+void
+calendar_client_select_day (CalendarClient *client,
+ guint day)
+{
+ g_return_if_fail (CALENDAR_IS_CLIENT (client));
+ g_return_if_fail (day <= 31);
+
+ if (client->priv->day != day)
+ {
+ client->priv->day = day;
+
+ /* don't need to update appointments unless
+ * the selected month changes
+ */
+#ifdef FIX_BROKEN_TASKS_QUERY
+ calendar_client_update_tasks (client);
+#endif
+
+ g_object_notify (G_OBJECT (client), "day");
+ }
+}
+
+typedef struct
+{
+ CalendarClient *client;
+ GSList *events;
+ time_t start_time;
+ time_t end_time;
+} FilterData;
+
+typedef void (* CalendarEventFilterFunc) (const char *uid,
+ CalendarEvent *event,
+ FilterData *filter_data);
+
+static void
+filter_appointment (const char *uid,
+ CalendarEvent *event,
+ FilterData *filter_data)
+{
+ GSList *occurrences, *l;
+
+ if (event->type != CALENDAR_EVENT_APPOINTMENT)
+ return;
+
+ occurrences = CALENDAR_APPOINTMENT (event)->occurrences;
+ CALENDAR_APPOINTMENT (event)->occurrences = NULL;
+
+ for (l = occurrences; l; l = l->next)
+ {
+ CalendarOccurrence *occurrence = l->data;
+ time_t start_time = occurrence->start_time;
+ time_t end_time = occurrence->end_time;
+
+ if ((start_time >= filter_data->start_time &&
+ start_time < filter_data->end_time) ||
+ (start_time <= filter_data->start_time &&
+ (end_time - 1) > filter_data->start_time))
+ {
+ CalendarEvent *new_event;
+
+ new_event = calendar_event_copy (event);
+
+ CALENDAR_APPOINTMENT (new_event)->start_time = occurrence->start_time;
+ CALENDAR_APPOINTMENT (new_event)->end_time = occurrence->end_time;
+
+ filter_data->events = g_slist_prepend (filter_data->events, new_event);
+ }
+ }
+
+ CALENDAR_APPOINTMENT (event)->occurrences = occurrences;
+}
+
+static void
+filter_task (const char *uid,
+ CalendarEvent *event,
+ FilterData *filter_data)
+{
+#ifdef FIX_BROKEN_TASKS_QUERY
+ CalendarTask *task;
+#endif
+
+ if (event->type != CALENDAR_EVENT_TASK)
+ return;
+
+#ifdef FIX_BROKEN_TASKS_QUERY
+ task = CALENDAR_TASK (event);
+
+ if (task->start_time && task->start_time > filter_data->start_time)
+ return;
+
+ if (task->completed_time &&
+ (task->completed_time < filter_data->start_time ||
+ task->completed_time > filter_data->end_time))
+ return;
+#endif /* FIX_BROKEN_TASKS_QUERY */
+
+ filter_data->events = g_slist_prepend (filter_data->events,
+ calendar_event_copy (event));
+}
+
+static GSList *
+calendar_client_filter_events (CalendarClient *client,
+ GSList *sources,
+ CalendarEventFilterFunc filter_func,
+ time_t start_time,
+ time_t end_time)
+{
+ FilterData filter_data;
+ GSList *l;
+ GSList *retval;
+
+ if (!sources)
+ return NULL;
+
+ filter_data.client = client;
+ filter_data.events = NULL;
+ filter_data.start_time = start_time;
+ filter_data.end_time = end_time;
+
+ retval = NULL;
+ for (l = sources; l; l = l->next)
+ {
+ CalendarClientSource *source = l->data;
+
+ if (source->query_completed)
+ {
+ filter_data.events = NULL;
+ g_hash_table_foreach (source->completed_query.events,
+ (GHFunc) filter_func,
+ &filter_data);
+
+ filter_data.events = g_slist_reverse (filter_data.events);
+
+ retval = g_slist_concat (retval, filter_data.events);
+ }
+ }
+
+ return retval;
+}
+
+GSList *
+calendar_client_get_events (CalendarClient *client,
+ CalendarEventType event_mask)
+{
+ GSList *appointments;
+ GSList *tasks;
+ time_t day_begin;
+ time_t day_end;
+
+ g_return_val_if_fail (CALENDAR_IS_CLIENT (client), NULL);
+ g_return_val_if_fail (client->priv->day != -1 &&
+ client->priv->month != -1 &&
+ client->priv->year != -1, NULL);
+
+ day_begin = make_time_for_day_begin (client->priv->day,
+ client->priv->month,
+ client->priv->year);
+ day_end = make_time_for_day_begin (client->priv->day + 1,
+ client->priv->month,
+ client->priv->year);
+
+ appointments = NULL;
+ if (event_mask & CALENDAR_EVENT_APPOINTMENT)
+ {
+ appointments = calendar_client_filter_events (client,
+ client->priv->appointment_sources,
+ filter_appointment,
+ day_begin,
+ day_end);
+ }
+
+ tasks = NULL;
+ if (event_mask & CALENDAR_EVENT_TASK)
+ {
+ tasks = calendar_client_filter_events (client,
+ client->priv->task_sources,
+ filter_task,
+ day_begin,
+ day_end);
+ }
+
+ return g_slist_concat (appointments, tasks);
+}
+
+static inline int
+day_from_time_t (time_t t)
+{
+ struct tm *tm = localtime (&t);
+
+ g_assert (tm == NULL || (tm->tm_mday >=1 && tm->tm_mday <= 31));
+
+ return tm ? tm->tm_mday : 0;
+}
+
+void
+calendar_client_foreach_appointment_day (CalendarClient *client,
+ CalendarDayIter iter_func,
+ gpointer user_data)
+{
+ GSList *appointments, *l;
+ gboolean marked_days [32] = { FALSE, };
+ time_t month_begin;
+ time_t month_end;
+ int i;
+
+ g_return_if_fail (CALENDAR_IS_CLIENT (client));
+ g_return_if_fail (iter_func != NULL);
+ g_return_if_fail (client->priv->month != -1 &&
+ client->priv->year != -1);
+
+ month_begin = make_time_for_day_begin (1,
+ client->priv->month,
+ client->priv->year);
+ month_end = make_time_for_day_begin (1,
+ client->priv->month + 1,
+ client->priv->year);
+
+ appointments = calendar_client_filter_events (client,
+ client->priv->appointment_sources,
+ filter_appointment,
+ month_begin,
+ month_end);
+ for (l = appointments; l; l = l->next)
+ {
+ CalendarAppointment *appointment = l->data;
+
+ if (appointment->start_time)
+ {
+ time_t day_time = appointment->start_time;
+
+ if (day_time >= month_begin)
+ marked_days [day_from_time_t (day_time)] = TRUE;
+
+ if (appointment->end_time)
+ {
+ int day_offset;
+ int duration = appointment->end_time - appointment->start_time;
+ /* mark the days for the appointment, no need to add an extra one when duration is a multiple of 86400 */
+ for (day_offset = 1; day_offset <= duration / 86400 && duration != day_offset * 86400; day_offset++)
+ {
+ time_t day_tm = appointment->start_time + day_offset * 86400;
+
+ if (day_tm > month_end)
+ break;
+ if (day_tm >= month_begin)
+ marked_days [day_from_time_t (day_tm)] = TRUE;
+ }
+ }
+ }
+ calendar_event_free (CALENDAR_EVENT (appointment));
+ }
+
+ g_slist_free (appointments);
+
+ for (i = 1; i < 32; i++)
+ {
+ if (marked_days [i])
+ iter_func (client, i, user_data);
+ }
+}
+
+void
+calendar_client_set_task_completed (CalendarClient *client,
+ char *task_uid,
+ gboolean task_completed,
+ guint percent_complete)
+{
+ GSList *l;
+ ECal *esource;
+ icalcomponent *ical;
+ icalproperty *prop;
+ icalproperty_status status;
+
+ g_return_if_fail (CALENDAR_IS_CLIENT (client));
+ g_return_if_fail (task_uid != NULL);
+ g_return_if_fail (task_completed == FALSE || percent_complete == 100);
+
+ ical = NULL;
+ esource = NULL;
+ for (l = client->priv->task_sources; l; l = l->next)
+ {
+ CalendarClientSource *source = l->data;
+
+ esource = source->source;
+ e_cal_get_object (esource, task_uid, NULL, &ical, NULL);
+ if (ical)
+ break;
+ }
+
+ if (!ical)
+ {
+ g_warning ("Cannot locate task with uid = '%s'\n", task_uid);
+ return;
+ }
+
+ g_assert (esource != NULL);
+
+ /* Completed time */
+ prop = icalcomponent_get_first_property (ical,
+ ICAL_COMPLETED_PROPERTY);
+ if (task_completed)
+ {
+ struct icaltimetype completed_time;
+
+ completed_time = icaltime_current_time_with_zone (client->priv->zone);
+ if (!prop)
+ {
+ icalcomponent_add_property (ical,
+ icalproperty_new_completed (completed_time));
+ }
+ else
+ {
+ icalproperty_set_completed (prop, completed_time);
+ }
+ }
+ else if (prop)
+ {
+ icalcomponent_remove_property (ical, prop);
+ }
+
+ /* Percent complete */
+ prop = icalcomponent_get_first_property (ical,
+ ICAL_PERCENTCOMPLETE_PROPERTY);
+ if (!prop)
+ {
+ icalcomponent_add_property (ical,
+ icalproperty_new_percentcomplete (percent_complete));
+ }
+ else
+ {
+ icalproperty_set_percentcomplete (prop, percent_complete);
+ }
+
+ /* Status */
+ status = task_completed ? ICAL_STATUS_COMPLETED : ICAL_STATUS_NEEDSACTION;
+ prop = icalcomponent_get_first_property (ical, ICAL_STATUS_PROPERTY);
+ if (prop)
+ {
+ icalproperty_set_status (prop, status);
+ }
+ else
+ {
+ icalcomponent_add_property (ical,
+ icalproperty_new_status (status));
+ }
+
+ e_cal_modify_object (esource, ical, CALOBJ_MOD_ALL, NULL);
+}
diff --git a/applets/clock/calendar-client.h b/applets/clock/calendar-client.h
new file mode 100644
index 00000000..9d502ba0
--- /dev/null
+++ b/applets/clock/calendar-client.h
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Mark McLoughlin <[email protected]>
+ * William Jon McCann <[email protected]>
+ * Martin Grimme <[email protected]>
+ * Christian Kellner <[email protected]>
+ */
+
+#ifndef __CALENDAR_CLIENT_H__
+#define __CALENDAR_CLIENT_H__
+
+#include <glib-object.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum
+{
+ CALENDAR_EVENT_APPOINTMENT = 1 << 0,
+ CALENDAR_EVENT_TASK = 1 << 1,
+ CALENDAR_EVENT_ALL = (1 << 2) - 1
+} CalendarEventType;
+
+#define CALENDAR_TYPE_CLIENT (calendar_client_get_type ())
+#define CALENDAR_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CALENDAR_TYPE_CLIENT, CalendarClient))
+#define CALENDAR_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CALENDAR_TYPE_CLIENT, CalendarClientClass))
+#define CALENDAR_IS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CALENDAR_TYPE_CLIENT))
+#define CALENDAR_IS_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CALENDAR_TYPE_CLIENT))
+#define CALENDAR_CLIENT_GET_CLASS(o)(G_TYPE_INSTANCE_GET_CLASS ((o), CALENDAR_TYPE_CLIENT, CalendarClientClass))
+
+typedef struct _CalendarClient CalendarClient;
+typedef struct _CalendarClientClass CalendarClientClass;
+typedef struct _CalendarClientPrivate CalendarClientPrivate;
+
+struct _CalendarClient
+{
+ GObject parent;
+ CalendarClientPrivate *priv;
+};
+
+struct _CalendarClientClass
+{
+ GObjectClass parent_class;
+
+ void (* appointments_changed) (CalendarClient *client);
+ void (* tasks_changed) (CalendarClient *client);
+};
+
+
+typedef struct
+{
+ time_t start_time;
+ time_t end_time;
+} CalendarOccurrence;
+
+typedef struct
+{
+ char *uid;
+ char *rid;
+ char *uri;
+ char *summary;
+ char *description;
+ char *color_string;
+ time_t start_time;
+ time_t end_time;
+ guint is_all_day : 1;
+
+ /* Only used internally */
+ GSList *occurrences;
+} CalendarAppointment;
+
+typedef struct
+{
+ char *uid;
+ char *summary;
+ char *description;
+ char *color_string;
+ char *url;
+ time_t start_time;
+ time_t due_time;
+ guint percent_complete;
+ time_t completed_time;
+ int priority;
+} CalendarTask;
+
+typedef struct
+{
+ union
+ {
+ CalendarAppointment appointment;
+ CalendarTask task;
+ } event;
+ CalendarEventType type;
+} CalendarEvent;
+
+#define CALENDAR_EVENT(e) ((CalendarEvent *)(e))
+#define CALENDAR_APPOINTMENT(e) ((CalendarAppointment *)(e))
+#define CALENDAR_TASK(e) ((CalendarTask *)(e))
+
+typedef void (* CalendarDayIter) (CalendarClient *client,
+ guint day,
+ gpointer user_data);
+
+
+GType calendar_client_get_type (void) G_GNUC_CONST;
+CalendarClient *calendar_client_new (void);
+
+void calendar_client_get_date (CalendarClient *client,
+ guint *year,
+ guint *month,
+ guint *day);
+void calendar_client_select_month (CalendarClient *client,
+ guint month,
+ guint year);
+void calendar_client_select_day (CalendarClient *client,
+ guint day);
+
+GSList *calendar_client_get_events (CalendarClient *client,
+ CalendarEventType event_mask);
+void calendar_client_foreach_appointment_day (CalendarClient *client,
+ CalendarDayIter iter_func,
+ gpointer user_data);
+
+void calendar_client_set_task_completed (CalendarClient *client,
+ char *task_uid,
+ gboolean task_completed,
+ guint percent_complete);
+
+void calendar_event_free (CalendarEvent *event);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CALENDAR_CLIENT_H__ */
diff --git a/applets/clock/calendar-debug.h b/applets/clock/calendar-debug.h
new file mode 100644
index 00000000..a7ea2a79
--- /dev/null
+++ b/applets/clock/calendar-debug.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Mark McLoughlin <[email protected]>
+ */
+
+#ifndef __CALENDAR_DEBUG_H__
+#define __CALENDAR_DEBUG_H__
+
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef CALENDAR_ENABLE_DEBUG
+
+#include <stdio.h>
+
+#ifdef G_HAVE_ISO_VARARGS
+# define dprintf(...) fprintf (stderr, __VA_ARGS__);
+#elif defined(G_HAVE_GNUC_VARARGS)
+# define dprintf(args...) fprintf (stderr, args);
+#endif
+
+#else /* if !defined (CALENDAR_DEBUG) */
+
+#ifdef G_HAVE_ISO_VARARGS
+# define dprintf(...)
+#elif defined(G_HAVE_GNUC_VARARGS)
+# define dprintf(args...)
+#endif
+
+#endif /* CALENDAR_ENABLE_DEBUG */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CALENDAR_DEBUG_H__ */
diff --git a/applets/clock/calendar-sources.c b/applets/clock/calendar-sources.c
new file mode 100644
index 00000000..721ff062
--- /dev/null
+++ b/applets/clock/calendar-sources.c
@@ -0,0 +1,658 @@
+/*
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Mark McLoughlin <[email protected]>
+ * William Jon McCann <[email protected]>
+ * Martin Grimme <[email protected]>
+ * Christian Kellner <[email protected]>
+ */
+
+#include <config.h>
+
+#include "calendar-sources.h"
+
+#include <libintl.h>
+#include <string.h>
+#include <mateconf/mateconf-client.h>
+#define HANDLE_LIBICAL_MEMORY
+#include <libecal/e-cal.h>
+#include <libedataserver/e-source-list.h>
+#include <libedataserverui/e-passwords.h>
+
+#undef CALENDAR_ENABLE_DEBUG
+#include "calendar-debug.h"
+
+#ifndef _
+#define _(x) gettext(x)
+#endif
+
+#ifndef N_
+#define N_(x) x
+#endif
+
+#define CALENDAR_SOURCES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CALENDAR_TYPE_SOURCES, CalendarSourcesPrivate))
+
+#define CALENDAR_SOURCES_EVO_DIR "/apps/evolution"
+#define CALENDAR_SOURCES_APPOINTMENT_SOURCES_KEY CALENDAR_SOURCES_EVO_DIR "/calendar/sources"
+#define CALENDAR_SOURCES_SELECTED_APPOINTMENT_SOURCES_DIR CALENDAR_SOURCES_EVO_DIR "/calendar/display"
+#define CALENDAR_SOURCES_SELECTED_APPOINTMENT_SOURCES_KEY CALENDAR_SOURCES_SELECTED_APPOINTMENT_SOURCES_DIR "/selected_calendars"
+#define CALENDAR_SOURCES_TASK_SOURCES_KEY CALENDAR_SOURCES_EVO_DIR "/tasks/sources"
+#define CALENDAR_SOURCES_SELECTED_TASK_SOURCES_DIR CALENDAR_SOURCES_EVO_DIR "/calendar/tasks"
+#define CALENDAR_SOURCES_SELECTED_TASK_SOURCES_KEY CALENDAR_SOURCES_SELECTED_TASK_SOURCES_DIR "/selected_tasks"
+
+typedef struct _CalendarSourceData CalendarSourceData;
+
+struct _CalendarSourceData
+{
+ ECalSourceType source_type;
+ CalendarSources *sources;
+ guint changed_signal;
+
+ GSList *clients;
+ GSList *selected_sources;
+ ESourceList *esource_list;
+
+ guint selected_sources_listener;
+ char *selected_sources_dir;
+
+ guint timeout_id;
+
+ guint loaded : 1;
+};
+
+struct _CalendarSourcesPrivate
+{
+ CalendarSourceData appointment_sources;
+ CalendarSourceData task_sources;
+
+ MateConfClient *mateconf_client;
+};
+
+static void calendar_sources_class_init (CalendarSourcesClass *klass);
+static void calendar_sources_init (CalendarSources *sources);
+static void calendar_sources_finalize (GObject *object);
+
+static void backend_died_cb (ECal *client, CalendarSourceData *source_data);
+static void calendar_sources_esource_list_changed (ESourceList *source_list,
+ CalendarSourceData *source_data);
+
+enum
+{
+ APPOINTMENT_SOURCES_CHANGED,
+ TASK_SOURCES_CHANGED,
+ LAST_SIGNAL
+};
+static guint signals [LAST_SIGNAL] = { 0, };
+
+static GObjectClass *parent_class = NULL;
+static CalendarSources *calendar_sources_singleton = NULL;
+
+GType
+calendar_sources_get_type (void)
+{
+ static GType sources_type = 0;
+
+ if (!sources_type)
+ {
+ static const GTypeInfo sources_info =
+ {
+ sizeof (CalendarSourcesClass),
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) calendar_sources_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (CalendarSources),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) calendar_sources_init,
+ };
+
+ sources_type = g_type_register_static (G_TYPE_OBJECT,
+ "CalendarSources",
+ &sources_info, 0);
+ }
+
+ return sources_type;
+}
+
+static void
+calendar_sources_class_init (CalendarSourcesClass *klass)
+{
+ GObjectClass *gobject_class = (GObjectClass *) klass;
+
+ parent_class = g_type_class_peek_parent (klass);
+
+ gobject_class->finalize = calendar_sources_finalize;
+
+ g_type_class_add_private (klass, sizeof (CalendarSourcesPrivate));
+
+ signals [APPOINTMENT_SOURCES_CHANGED] =
+ g_signal_new ("appointment-sources-changed",
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CalendarSourcesClass,
+ appointment_sources_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
+ signals [TASK_SOURCES_CHANGED] =
+ g_signal_new ("task-sources-changed",
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (CalendarSourcesClass,
+ task_sources_changed),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+}
+
+static void
+calendar_sources_init (CalendarSources *sources)
+{
+ sources->priv = CALENDAR_SOURCES_GET_PRIVATE (sources);
+
+ sources->priv->appointment_sources.source_type = E_CAL_SOURCE_TYPE_EVENT;
+ sources->priv->appointment_sources.sources = sources;
+ sources->priv->appointment_sources.changed_signal = signals [APPOINTMENT_SOURCES_CHANGED];
+ sources->priv->appointment_sources.timeout_id = 0;
+
+ sources->priv->task_sources.source_type = E_CAL_SOURCE_TYPE_TODO;
+ sources->priv->task_sources.sources = sources;
+ sources->priv->task_sources.changed_signal = signals [TASK_SOURCES_CHANGED];
+ sources->priv->task_sources.timeout_id = 0;
+
+ sources->priv->mateconf_client = mateconf_client_get_default ();
+}
+
+static void
+calendar_sources_finalize_source_data (CalendarSources *sources,
+ CalendarSourceData *source_data)
+{
+ if (source_data->loaded)
+ {
+ GSList *l;
+
+ if (source_data->selected_sources_dir)
+ {
+ mateconf_client_remove_dir (sources->priv->mateconf_client,
+ source_data->selected_sources_dir,
+ NULL);
+
+ g_free (source_data->selected_sources_dir);
+ source_data->selected_sources_dir = NULL;
+ }
+
+ if (source_data->selected_sources_listener)
+ {
+ mateconf_client_notify_remove (sources->priv->mateconf_client,
+ source_data->selected_sources_listener);
+ source_data->selected_sources_listener = 0;
+ }
+
+ for (l = source_data->clients; l; l = l->next)
+ {
+ g_signal_handlers_disconnect_by_func (G_OBJECT (l->data),
+ G_CALLBACK (backend_died_cb),
+ source_data);
+ g_object_unref (l->data);
+ }
+ g_slist_free (source_data->clients);
+ source_data->clients = NULL;
+
+ if (source_data->esource_list)
+ {
+ g_signal_handlers_disconnect_by_func (source_data->esource_list,
+ G_CALLBACK (calendar_sources_esource_list_changed),
+ source_data);
+ g_object_unref (source_data->esource_list);
+ }
+ source_data->esource_list = NULL;
+
+ for (l = source_data->selected_sources; l; l = l->next)
+ g_free (l->data);
+ g_slist_free (source_data->selected_sources);
+ source_data->selected_sources = NULL;
+
+ if (source_data->timeout_id != 0)
+ {
+ g_source_remove (source_data->timeout_id);
+ source_data->timeout_id = 0;
+ }
+
+ source_data->loaded = FALSE;
+ }
+}
+
+static void
+calendar_sources_finalize (GObject *object)
+{
+ CalendarSources *sources = CALENDAR_SOURCES (object);
+
+ calendar_sources_finalize_source_data (sources, &sources->priv->appointment_sources);
+ calendar_sources_finalize_source_data (sources, &sources->priv->task_sources);
+
+ if (sources->priv->mateconf_client)
+ g_object_unref (sources->priv->mateconf_client);
+ sources->priv->mateconf_client = NULL;
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+CalendarSources *
+calendar_sources_get (void)
+{
+ gpointer singleton_location = &calendar_sources_singleton;
+
+ if (calendar_sources_singleton)
+ return g_object_ref (calendar_sources_singleton);
+
+ calendar_sources_singleton = g_object_new (CALENDAR_TYPE_SOURCES, NULL);
+ g_object_add_weak_pointer (G_OBJECT (calendar_sources_singleton),
+ singleton_location);
+
+ return calendar_sources_singleton;
+}
+
+static gboolean
+is_source_selected (ESource *esource,
+ GSList *selected_sources)
+{
+ const char *uid;
+ GSList *l;
+
+ uid = e_source_peek_uid (esource);
+
+ for (l = selected_sources; l; l = l->next)
+ {
+ const char *source = l->data;
+
+ if (!strcmp (source, uid))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static char *
+auth_func_cb (ECal *ecal,
+ const char *prompt,
+ const char *key,
+ gpointer user_data)
+{
+ ESource *source;
+ const gchar *auth_domain;
+ const gchar *component_name;
+
+ source = e_cal_get_source (ecal);
+ auth_domain = e_source_get_property (source, "auth-domain");
+ component_name = auth_domain ? auth_domain : "Calendar";
+
+ return e_passwords_get_password (component_name, key);
+}
+
+/* The clients are just created here but not loaded */
+static ECal *
+get_ecal_from_source (ESource *esource,
+ ECalSourceType source_type,
+ GSList *existing_clients)
+{
+ ECal *retval;
+
+ if (existing_clients)
+ {
+ GSList *l;
+
+ for (l = existing_clients; l; l = l->next)
+ {
+ ECal *client = E_CAL (l->data);
+
+ if (e_source_equal (esource, e_cal_get_source (client)))
+ {
+ dprintf (" load_esource: found existing source ... returning that\n");
+
+ return g_object_ref (client);
+ }
+ }
+ }
+
+ retval = e_cal_new (esource, source_type);
+ if (!retval)
+ {
+ g_warning ("Could not load source '%s' from '%s'\n",
+ e_source_peek_name (esource),
+ e_source_peek_relative_uri (esource));
+ return NULL;
+ }
+
+ e_cal_set_auth_func (retval, auth_func_cb, NULL);
+
+ return retval;
+}
+
+/* - Order doesn't matter
+ * - Can just compare object pointers since we
+ * re-use client connections
+ */
+static gboolean
+compare_ecal_lists (GSList *a,
+ GSList *b)
+{
+ GSList *l;
+
+ if (g_slist_length (a) != g_slist_length (b))
+ return FALSE;
+
+ for (l = a; l; l = l->next)
+ {
+ if (!g_slist_find (b, l->data))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static inline void
+debug_dump_selected_sources (GSList *selected_sources)
+{
+#ifdef CALENDAR_ENABLE_DEBUG
+ GSList *l;
+
+ dprintf ("Selected sources:\n");
+ for (l = selected_sources; l; l = l->next)
+ {
+ char *source = l->data;
+
+ dprintf (" %s\n", source);
+ }
+ dprintf ("\n");
+#endif
+}
+
+static inline void
+debug_dump_ecal_list (GSList *ecal_list)
+{
+#ifdef CALENDAR_ENABLE_DEBUG
+ GSList *l;
+
+ dprintf ("Loaded clients:\n");
+ for (l = ecal_list; l; l = l->next)
+ {
+ ECal *client = l->data;
+ ESource *source = e_cal_get_source (client);
+
+ dprintf (" %s %s %s\n",
+ e_source_peek_uid (source),
+ e_source_peek_name (source),
+ e_cal_get_uri (client));
+ }
+#endif
+}
+
+static void
+calendar_sources_load_esource_list (CalendarSourceData *source_data);
+
+static gboolean
+backend_restart (gpointer data)
+{
+ CalendarSourceData *source_data = data;
+
+ calendar_sources_load_esource_list (source_data);
+
+ source_data->timeout_id = 0;
+
+ return FALSE;
+}
+
+static void
+backend_died_cb (ECal *client, CalendarSourceData *source_data)
+{
+ const char *uristr;
+
+ source_data->clients = g_slist_remove (source_data->clients, client);
+ if (g_slist_length (source_data->clients) < 1)
+ {
+ g_slist_free (source_data->clients);
+ source_data->clients = NULL;
+ }
+ uristr = e_cal_get_uri (client);
+ g_warning ("The calendar backend for %s has crashed.", uristr);
+
+ if (source_data->timeout_id != 0)
+ {
+ g_source_remove (source_data->timeout_id);
+ source_data->timeout_id = 0;
+ }
+
+ source_data->timeout_id = g_timeout_add_seconds (2, backend_restart,
+ source_data);
+}
+
+static void
+calendar_sources_load_esource_list (CalendarSourceData *source_data)
+{
+ GSList *clients = NULL;
+ GSList *groups, *l;
+ gboolean emit_signal = FALSE;
+
+ g_return_if_fail (source_data->esource_list != NULL);
+
+ debug_dump_selected_sources (source_data->selected_sources);
+
+ dprintf ("Source groups:\n");
+ groups = e_source_list_peek_groups (source_data->esource_list);
+ for (l = groups; l; l = l->next)
+ {
+ GSList *esources, *s;
+
+ dprintf (" %s\n", e_source_group_peek_uid (l->data));
+ dprintf (" sources:\n");
+
+ esources = e_source_group_peek_sources (l->data);
+ for (s = esources; s; s = s->next)
+ {
+ ESource *esource = E_SOURCE (s->data);
+ ECal *client;
+
+ dprintf (" type = '%s' uid = '%s', name = '%s', relative uri = '%s': \n",
+ source_data->source_type == E_CAL_SOURCE_TYPE_EVENT ? "appointment" : "task",
+ e_source_peek_uid (esource),
+ e_source_peek_name (esource),
+ e_source_peek_relative_uri (esource));
+
+ if (is_source_selected (esource, source_data->selected_sources) &&
+ (client = get_ecal_from_source (esource, source_data->source_type, source_data->clients)))
+ {
+ clients = g_slist_prepend (clients, client);
+ }
+ }
+ }
+ dprintf ("\n");
+
+ if (source_data->loaded &&
+ !compare_ecal_lists (source_data->clients, clients))
+ emit_signal = TRUE;
+
+ for (l = source_data->clients; l; l = l->next)
+ {
+ g_signal_handlers_disconnect_by_func (G_OBJECT (l->data),
+ G_CALLBACK (backend_died_cb),
+ source_data);
+
+ g_object_unref (l->data);
+ }
+ g_slist_free (source_data->clients);
+ source_data->clients = g_slist_reverse (clients);
+
+ /* connect to backend_died after we disconnected the previous signal
+ * handlers. If we do it before, we'll lose some handlers (for clients that
+ * were already there before) */
+ for (l = source_data->clients; l; l = l->next)
+ {
+ g_signal_connect (G_OBJECT (l->data), "backend_died",
+ G_CALLBACK (backend_died_cb), source_data);
+ }
+
+ if (emit_signal)
+ {
+ dprintf ("Emitting %s-sources-changed signal\n",
+ source_data->source_type == E_CAL_SOURCE_TYPE_EVENT ? "appointment" : "task");
+ g_signal_emit (source_data->sources, source_data->changed_signal, 0);
+ }
+
+ debug_dump_ecal_list (source_data->clients);
+}
+
+static void
+calendar_sources_esource_list_changed (ESourceList *source_list,
+ CalendarSourceData *source_data)
+
+{
+ dprintf ("ESourceList changed, reloading\n");
+
+ calendar_sources_load_esource_list (source_data);
+}
+
+static void
+calendar_sources_selected_sources_notify (MateConfClient *client,
+ guint cnx_id,
+ MateConfEntry *entry,
+ CalendarSourceData *source_data)
+{
+ GSList *l;
+
+ if (!entry->value ||
+ entry->value->type != MATECONF_VALUE_LIST ||
+ mateconf_value_get_list_type (entry->value) != MATECONF_VALUE_STRING)
+ return;
+
+ dprintf ("Selected sources key (%s) changed, reloading\n", entry->key);
+
+ for (l = source_data->selected_sources; l; l = l->next)
+ g_free (l->data);
+ source_data->selected_sources = NULL;
+
+ for (l = mateconf_value_get_list (entry->value); l; l = l->next)
+ {
+ const char *source = mateconf_value_get_string (l->data);
+
+ source_data->selected_sources =
+ g_slist_prepend (source_data->selected_sources,
+ g_strdup (source));
+ }
+ source_data->selected_sources =
+ g_slist_reverse (source_data->selected_sources);
+
+ calendar_sources_load_esource_list (source_data);
+}
+
+static void
+calendar_sources_load_sources (CalendarSources *sources,
+ CalendarSourceData *source_data,
+ const char *sources_key,
+ const char *selected_sources_key,
+ const char *selected_sources_dir)
+{
+ MateConfClient *mateconf_client;
+ GError *error;
+
+ dprintf ("---------------------------\n");
+ dprintf ("Loading sources:\n");
+ dprintf (" sources_key: %s\n", sources_key);
+ dprintf (" selected_sources_key: %s\n", selected_sources_key);
+ dprintf (" selected_sources_dir: %s\n", selected_sources_dir);
+
+ mateconf_client = sources->priv->mateconf_client;
+
+ error = NULL;
+ source_data->selected_sources = mateconf_client_get_list (mateconf_client,
+ selected_sources_key,
+ MATECONF_VALUE_STRING,
+ &error);
+ if (error)
+ {
+ g_warning ("Failed to get selected sources from '%s': %s\n",
+ selected_sources_key,
+ error->message);
+ g_error_free (error);
+ return;
+ }
+
+ mateconf_client_add_dir (mateconf_client,
+ selected_sources_dir,
+ MATECONF_CLIENT_PRELOAD_NONE,
+ NULL);
+ source_data->selected_sources_dir = g_strdup (selected_sources_dir);
+
+ source_data->selected_sources_listener =
+ mateconf_client_notify_add (mateconf_client,
+ selected_sources_dir,
+ (MateConfClientNotifyFunc) calendar_sources_selected_sources_notify,
+ source_data, NULL, NULL);
+
+ source_data->esource_list = e_source_list_new_for_mateconf (mateconf_client, sources_key);
+ g_signal_connect (source_data->esource_list, "changed",
+ G_CALLBACK (calendar_sources_esource_list_changed),
+ source_data);
+
+ calendar_sources_load_esource_list (source_data);
+
+ source_data->loaded = TRUE;
+
+ dprintf ("---------------------------\n");
+}
+
+GSList *
+calendar_sources_get_appointment_sources (CalendarSources *sources)
+{
+ g_return_val_if_fail (CALENDAR_IS_SOURCES (sources), NULL);
+
+ if (!sources->priv->appointment_sources.loaded)
+ {
+ calendar_sources_load_sources (sources,
+ &sources->priv->appointment_sources,
+ CALENDAR_SOURCES_APPOINTMENT_SOURCES_KEY,
+ CALENDAR_SOURCES_SELECTED_APPOINTMENT_SOURCES_KEY,
+ CALENDAR_SOURCES_SELECTED_APPOINTMENT_SOURCES_DIR);
+ }
+
+ return sources->priv->appointment_sources.clients;
+}
+
+GSList *
+calendar_sources_get_task_sources (CalendarSources *sources)
+{
+ g_return_val_if_fail (CALENDAR_IS_SOURCES (sources), NULL);
+
+ if (!sources->priv->task_sources.loaded)
+ {
+ calendar_sources_load_sources (sources,
+ &sources->priv->task_sources,
+ CALENDAR_SOURCES_TASK_SOURCES_KEY,
+ CALENDAR_SOURCES_SELECTED_TASK_SOURCES_KEY,
+ CALENDAR_SOURCES_SELECTED_TASK_SOURCES_DIR);
+ }
+
+ return sources->priv->task_sources.clients;
+}
diff --git a/applets/clock/calendar-sources.h b/applets/clock/calendar-sources.h
new file mode 100644
index 00000000..3f080c55
--- /dev/null
+++ b/applets/clock/calendar-sources.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2004 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Mark McLoughlin <[email protected]>
+ * William Jon McCann <[email protected]>
+ * Martin Grimme <[email protected]>
+ * Christian Kellner <[email protected]>
+ */
+
+#ifndef __CALENDAR_SOURCES_H__
+#define __CALENDAR_SOURCES_H__
+
+#include <glib-object.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CALENDAR_TYPE_SOURCES (calendar_sources_get_type ())
+#define CALENDAR_SOURCES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CALENDAR_TYPE_SOURCES, CalendarSources))
+#define CALENDAR_SOURCES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), CALENDAR_TYPE_SOURCES, CalendarSourcesClass))
+#define CALENDAR_IS_SOURCES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CALENDAR_TYPE_SOURCES))
+#define CALENDAR_IS_SOURCES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CALENDAR_TYPE_SOURCES))
+#define CALENDAR_SOURCES_GET_CLASS(o)(G_TYPE_INSTANCE_GET_CLASS ((o), CALENDAR_TYPE_SOURCES, CalendarSourcesClass))
+
+typedef struct _CalendarSources CalendarSources;
+typedef struct _CalendarSourcesClass CalendarSourcesClass;
+typedef struct _CalendarSourcesPrivate CalendarSourcesPrivate;
+
+struct _CalendarSources
+{
+ GObject parent;
+ CalendarSourcesPrivate *priv;
+};
+
+struct _CalendarSourcesClass
+{
+ GObjectClass parent_class;
+
+ void (* appointment_sources_changed) (CalendarSources *sources);
+ void (* task_sources_changed) (CalendarSources *sources);
+};
+
+
+GType calendar_sources_get_type (void) G_GNUC_CONST;
+CalendarSources *calendar_sources_get (void);
+GSList *calendar_sources_get_appointment_sources (CalendarSources *sources);
+GSList *calendar_sources_get_task_sources (CalendarSources *sources);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CALENDAR_SOURCES_H__ */
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
new file mode 100644
index 00000000..d675f492
--- /dev/null
+++ b/applets/clock/calendar-window.c
@@ -0,0 +1,2125 @@
+/*
+ * calendar-window.c: toplevel window containing a calendar and
+ * tasks/appointments
+ *
+ * Copyright (C) 2007 Vincent Untz <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Vincent Untz <[email protected]>
+ *
+ * Most of the original code comes from clock.c
+ */
+
+ /*
+ * Evolution calendar integration TODO:
+ * + Fix treeview scrolling and sizing
+ * + Tooltips for tasks/appointments
+ * + Do everything backwards if the clock is on the bottom
+ * + Double clicking appointments/tasks should open them in evo
+ * + Consider using different colours for different sources
+ * + Consider doing a GtkMenu tearoff type thing
+ */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <glib/gi18n.h>
+#include <mateconf/mateconf-client.h>
+
+#define MATE_DESKTOP_USE_UNSTABLE_API
+#include <libmate/mate-desktop-utils.h>
+
+#include "calendar-window.h"
+
+#include "clock.h"
+#include "clock-utils.h"
+#include "clock-typebuiltins.h"
+#ifdef HAVE_LIBECAL
+#include "calendar-client.h"
+#endif
+
+#define CALENDAR_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CALENDAR_TYPE_WINDOW, CalendarWindowPrivate))
+
+#define KEY_LOCATIONS_EXPANDED "expand_locations"
+#ifdef HAVE_LIBECAL
+/* For the following value, take into account the KEY_* that are not inside this #ifdef! */
+# define N_CALENDAR_WINDOW_MATECONF_PREFS 5
+# define KEY_APPOINTMENTS_EXPANDED "expand_appointments"
+# define KEY_BIRTHDAYS_EXPANDED "expand_birthdays"
+# define KEY_TASKS_EXPANDED "expand_tasks"
+# define KEY_WEATHER_EXPANDED "expand_weather"
+
+# define KEY_CALENDAR_APP "/desktop/mate/applications/calendar"
+# define KEY_TASKS_APP "/desktop/mate/applications/tasks"
+#else
+# define N_CALENDAR_WINDOW_MATECONF_PREFS 1
+#endif
+
+enum {
+ EDIT_LOCATIONS,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+struct _CalendarWindowPrivate {
+ GtkWidget *calendar;
+
+ char *prefs_dir;
+
+ gboolean invert_order;
+ gboolean show_weeks;
+ time_t *current_time;
+
+ GtkWidget *locations_list;
+
+#ifdef HAVE_LIBECAL
+ ClockFormat time_format;
+
+ CalendarClient *client;
+
+ GtkWidget *appointment_list;
+ GtkWidget *birthday_list;
+ GtkWidget *weather_list;
+ GtkWidget *task_list;
+
+ GtkListStore *appointments_model;
+ GtkListStore *tasks_model;
+
+ GtkTreeSelection *previous_selection;
+
+ GtkTreeModelFilter *appointments_filter;
+ GtkTreeModelFilter *birthdays_filter;
+ GtkTreeModelFilter *tasks_filter;
+ GtkTreeModelFilter *weather_filter;
+
+ MateConfClient *mateconfclient;
+#endif /* HAVE_LIBECAL */
+};
+
+G_DEFINE_TYPE (CalendarWindow, calendar_window, GTK_TYPE_WINDOW)
+
+enum {
+ PROP_0,
+ PROP_INVERTORDER,
+ PROP_SHOWWEEKS,
+#ifdef HAVE_LIBECAL
+ PROP_TIMEFORMAT,
+#endif
+ PROP_CURRENTTIMEP,
+ PROP_PREFSDIR
+};
+
+static time_t *calendar_window_get_current_time_p (CalendarWindow *calwin);
+static void calendar_window_set_current_time_p (CalendarWindow *calwin,
+ time_t *current_time);
+static const char *calendar_window_get_prefs_dir (CalendarWindow *calwin);
+static void calendar_window_set_prefs_dir (CalendarWindow *calwin,
+ const char *prefs_dir);
+static GtkWidget * create_hig_frame (CalendarWindow *calwin,
+ const char *title,
+ const char *button_label,
+ const char *key,
+ GCallback callback);
+
+#ifdef HAVE_LIBECAL
+
+static void
+clock_launch_calendar_tasks_app (CalendarWindow *calwin,
+ const char *key_program,
+ const char *argument)
+{
+ char **argv;
+ int argc;
+ char *key;
+ char *program;
+ gboolean terminal;
+ char *command_line;
+ GdkScreen *screen;
+ GError *error;
+ gboolean result;
+
+ key = g_strdup_printf ("%s%s", key_program, "/exec");
+ program = mateconf_client_get_string (calwin->priv->mateconfclient,
+ key, NULL);
+ g_free (key);
+
+ key = g_strdup_printf ("%s%s", key_program, "/needs_term");
+ terminal = mateconf_client_get_bool (calwin->priv->mateconfclient,
+ key, NULL);
+ g_free (key);
+
+ if (program == NULL) {
+ g_printerr ("Cannot launch calendar/tasks application: key not set\n");
+ return;
+ }
+
+ command_line = g_find_program_in_path (program);
+ if (command_line == NULL) {
+ g_printerr ("Cannot launch calendar/tasks application: %s in path\n", program);
+ g_free (program);
+ return;
+ }
+ g_free (command_line);
+
+ if (argument) {
+ argc = 2;
+ argv = g_new0 (char *, 3);
+ argv[1] = g_strdup (argument);
+ } else {
+ argc = 1;
+ argv = g_new0 (char *, 2);
+ }
+ argv[0] = program; /* no strdup, and it will get freed for free */
+
+ screen = gtk_widget_get_screen (calwin->priv->calendar);
+ error = NULL;
+
+ if (terminal)
+ mate_desktop_prepend_terminal_to_vector (&argc, &argv);
+
+ result = gdk_spawn_on_screen (screen,
+ NULL, /* working directory */
+ argv,
+ NULL, /* envp */
+ G_SPAWN_SEARCH_PATH,
+ NULL, /* child setup func */
+ NULL, /* user data */
+ NULL, /* child pid */
+ &error);
+
+ if (!result) {
+ g_printerr ("Cannot launch calendar/tasks application: %s\n",
+ error->message);
+ g_error_free (error);
+ }
+
+ g_strfreev (argv);
+}
+
+static void
+clock_launch_calendar_app (CalendarWindow *calwin,
+ const char *argument)
+{
+ clock_launch_calendar_tasks_app (calwin, KEY_CALENDAR_APP, argument);
+}
+
+static void
+clock_launch_tasks_app (CalendarWindow *calwin,
+ const char *argument)
+{
+ clock_launch_calendar_tasks_app (calwin, KEY_TASKS_APP, argument);
+}
+
+static void
+update_frame_visibility (GtkWidget *frame,
+ GtkTreeModel *model)
+{
+ GtkTreeIter iter;
+ gboolean model_empty;
+
+ if (!frame)
+ return;
+
+ model_empty = !gtk_tree_model_get_iter_first (model, &iter);
+
+ if (model_empty)
+ gtk_widget_hide (frame);
+ else
+ gtk_widget_show (frame);
+}
+
+enum {
+ APPOINTMENT_COLUMN_UID,
+ APPOINTMENT_COLUMN_URI,
+ APPOINTMENT_COLUMN_SUMMARY,
+ APPOINTMENT_COLUMN_DESCRIPTION,
+ APPOINTMENT_COLUMN_START_TIME,
+ APPOINTMENT_COLUMN_START_TEXT,
+ APPOINTMENT_COLUMN_END_TIME,
+ APPOINTMENT_COLUMN_ALL_DAY,
+ APPOINTMENT_COLUMN_PIXBUF,
+ N_APPOINTMENT_COLUMNS
+};
+
+enum {
+ TASK_COLUMN_UID,
+ TASK_COLUMN_SUMMARY,
+ TASK_COLUMN_DESCRIPTION,
+ TASK_COLUMN_START_TIME,
+ TASK_COLUMN_DUE_TIME,
+ TASK_COLUMN_PERCENT_COMPLETE,
+ TASK_COLUMN_PERCENT_COMPLETE_TEXT,
+ TASK_COLUMN_COMPLETED,
+ TASK_COLUMN_COMPLETED_TIME,
+ TASK_COLUMN_OVERDUE_ATTR,
+ TASK_COLUMN_COLOR,
+ TASK_COLUMN_PRIORITY,
+ N_TASK_COLUMNS
+};
+
+static char *
+format_time (ClockFormat format,
+ time_t t,
+ guint year,
+ guint month,
+ guint day)
+{
+ struct tm *tm;
+ char *time_format;
+ char result [256] = { 0, };
+
+ if (!t)
+ return NULL;
+
+ tm = localtime (&t);
+ if (!tm)
+ return NULL;
+
+ if (year == (tm->tm_year + 1900) &&
+ month == tm->tm_mon &&
+ day == tm->tm_mday) {
+ if (format == CLOCK_FORMAT_12)
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 12-hours format
+ * (eg, like in the US: 8:10 am). The %p expands to
+ * am/pm. */
+ time_format = g_locale_from_utf8 (_("%l:%M %p"), -1, NULL, NULL, NULL);
+ else
+ /* Translators: This is a strftime format string.
+ * It is used to display the time in 24-hours format
+ * (eg, like in France: 20:10). */
+ time_format = g_locale_from_utf8 (_("%H:%M"), -1, NULL, NULL, NULL);
+ }
+ else {
+ /* Translators: This is a strftime format string.
+ * It is used to display the start date of an appointment, in
+ * the most abbreviated way possible. */
+ time_format = g_locale_from_utf8 (_("%b %d"), -1, NULL, NULL, NULL);
+ }
+
+ strftime (result, sizeof (result), time_format, tm);
+ g_free (time_format);
+
+ return g_locale_to_utf8 (result, -1, NULL, NULL, NULL);
+}
+
+static void
+handle_tasks_changed (CalendarWindow *calwin)
+{
+ GSList *events, *l;
+
+ gtk_list_store_clear (calwin->priv->tasks_model);
+
+ events = calendar_client_get_events (calwin->priv->client,
+ CALENDAR_EVENT_TASK);
+ for (l = events; l; l = l->next) {
+ CalendarTask *task = l->data;
+ GtkTreeIter iter;
+ char *percent_complete_text;
+
+ g_assert (CALENDAR_EVENT (task)->type == CALENDAR_EVENT_TASK);
+
+ /* FIXME: should this format be locale specific ? */
+ percent_complete_text = g_strdup_printf ("%d%%", task->percent_complete);
+
+ gtk_list_store_append (calwin->priv->tasks_model, &iter);
+ gtk_list_store_set (calwin->priv->tasks_model, &iter,
+ TASK_COLUMN_UID, task->uid,
+ TASK_COLUMN_SUMMARY, task->summary,
+ TASK_COLUMN_DESCRIPTION, task->description,
+ TASK_COLUMN_START_TIME, (gint64)task->start_time,
+ TASK_COLUMN_DUE_TIME, (gint64)task->due_time,
+ TASK_COLUMN_PERCENT_COMPLETE, task->percent_complete,
+ TASK_COLUMN_PERCENT_COMPLETE_TEXT, percent_complete_text,
+ TASK_COLUMN_COMPLETED, task->percent_complete == 100,
+ TASK_COLUMN_COMPLETED_TIME, (gint64)task->completed_time,
+ TASK_COLUMN_COLOR, task->color_string,
+ TASK_COLUMN_PRIORITY, task->priority,
+ -1);
+
+ g_free (percent_complete_text);
+ calendar_event_free (CALENDAR_EVENT (task));
+ }
+ g_slist_free (events);
+
+ update_frame_visibility (calwin->priv->task_list,
+ GTK_TREE_MODEL (calwin->priv->tasks_filter));
+}
+
+static void
+handle_task_completed_toggled (CalendarWindow *calwin,
+ const char *path_str,
+ GtkCellRendererToggle *cell)
+{
+ GtkTreePath *child_path, *path;
+ GtkTreeIter iter;
+ char *uid;
+ gboolean task_completed;
+ guint percent_complete;
+
+ path = gtk_tree_path_new_from_string (path_str);
+ child_path = gtk_tree_model_filter_convert_path_to_child_path (calwin->priv->tasks_filter, path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter, child_path);
+ gtk_tree_model_get (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter,
+ TASK_COLUMN_UID, &uid,
+ TASK_COLUMN_COMPLETED, &task_completed,
+ TASK_COLUMN_PERCENT_COMPLETE, &percent_complete,
+ -1);
+
+ task_completed = !task_completed;
+ percent_complete = task_completed ? 100 : 0;
+
+ calendar_client_set_task_completed (calwin->priv->client,
+ uid,
+ task_completed,
+ percent_complete);
+
+ g_free (uid);
+ gtk_tree_path_free (path);
+ gtk_tree_path_free (child_path);
+}
+
+static void
+handle_task_percent_complete_edited (CalendarWindow *calwin,
+ const char *path_str,
+ const char *text,
+ GtkCellRendererText *cell)
+{
+ GtkTreePath *child_path, *path;
+ GtkTreeIter iter;
+ char *uid;
+ int percent_complete;
+ char *error = NULL, *text_copy;
+
+ path = gtk_tree_path_new_from_string (path_str);
+ child_path = gtk_tree_model_filter_convert_path_to_child_path (calwin->priv->tasks_filter, path);
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter, child_path);
+ gtk_tree_model_get (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter, TASK_COLUMN_UID, &uid,
+ -1);
+
+ text_copy = g_strdup (text);
+ text_copy = g_strdelimit (text_copy, "%", ' ');
+ text_copy = g_strstrip (text_copy);
+ percent_complete = (int) g_strtod (text_copy, &error);
+ if (!error || !error [0]) {
+ gboolean task_completed;
+
+ percent_complete = CLAMP (percent_complete, 0, 100);
+ task_completed = (percent_complete == 100);
+
+ calendar_client_set_task_completed (calwin->priv->client,
+ uid,
+ task_completed,
+ percent_complete);
+ }
+
+ g_free (uid);
+ g_free (text_copy);
+ gtk_tree_path_free (path);
+ gtk_tree_path_free (child_path);
+}
+
+static gboolean
+is_appointment (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ gchar *uri;
+
+ gtk_tree_model_get (model, iter, APPOINTMENT_COLUMN_URI, &uri, -1);
+ if (uri)
+ return (g_ascii_strcasecmp (uri, "file") == 0 ||
+ g_ascii_strcasecmp (uri, "webcal") == 0 ||
+ g_ascii_strcasecmp (uri, "caldav") == 0 ||
+ g_ascii_strcasecmp (uri, "exchange") == 0 ||
+ g_ascii_strcasecmp (uri, "groupwise") == 0 ||
+ g_ascii_strcasecmp (uri, "google") == 0);
+ return FALSE;
+}
+
+static gboolean
+is_birthday (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ gchar *uri;
+
+ gtk_tree_model_get (model, iter, APPOINTMENT_COLUMN_URI, &uri, -1);
+ if (uri)
+ return (g_ascii_strcasecmp (uri, "contacts") == 0);
+ return FALSE;
+}
+
+static gboolean
+is_weather (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ gchar *uri;
+
+ gtk_tree_model_get (model, iter, APPOINTMENT_COLUMN_URI, &uri, -1);
+ if (uri)
+ return (g_ascii_strcasecmp (uri, "weather") == 0);
+ return FALSE;
+}
+
+static gboolean
+filter_out_tasks (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ CalendarWindow *calwin)
+{
+ gint64 start_time64;
+ gint64 completed_time64;
+ time_t start_time;
+ time_t completed_time;
+ time_t one_day_ago;
+ gboolean visible;
+
+ gtk_tree_model_get (model, iter,
+ TASK_COLUMN_START_TIME, &start_time64,
+ TASK_COLUMN_COMPLETED_TIME, &completed_time64,
+ -1);
+ start_time = start_time64;
+ completed_time = completed_time64;
+
+ one_day_ago = *(calwin->priv->current_time) - (24 * 60 * 60);
+
+ visible = !start_time || start_time <= *(calwin->priv->current_time);
+ if (visible)
+ visible = !completed_time || completed_time >= one_day_ago;
+
+ return visible;
+}
+
+static void
+modify_task_text_attributes (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GValue *value,
+ gint column,
+ CalendarWindow *calwin)
+{
+ gint64 due_time64;
+ time_t due_time;
+ PangoAttrList *attr_list;
+ PangoAttribute *attr;
+ GtkTreeIter child_iter;
+
+ gtk_tree_model_filter_convert_iter_to_child_iter (GTK_TREE_MODEL_FILTER (model),
+ &child_iter,
+ iter);
+
+ if (column != TASK_COLUMN_OVERDUE_ATTR) {
+ memset (value, 0, sizeof (GValue));
+ gtk_tree_model_get_value (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &child_iter, column, value);
+
+ return;
+ }
+
+ gtk_tree_model_get (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &child_iter, TASK_COLUMN_DUE_TIME, &due_time64,
+ -1);
+ due_time = due_time64;
+
+ if (due_time && due_time > *(calwin->priv->current_time))
+ return;
+
+ attr_list = pango_attr_list_new ();
+
+ attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
+ attr->start_index = 0;
+ attr->end_index = G_MAXINT;
+ pango_attr_list_insert (attr_list, attr);
+
+ g_value_take_boxed (value, attr_list);
+}
+
+static gboolean
+task_activated_cb (GtkTreeView *view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ CalendarWindow *calwin)
+{
+ GtkTreeIter iter;
+ GtkTreePath *child_path;
+ char *uid;
+ char *argument;
+
+ child_path = gtk_tree_model_filter_convert_path_to_child_path (calwin->priv->tasks_filter,
+ path);
+
+ gtk_tree_model_get_iter (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter, child_path);
+ gtk_tree_model_get (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ &iter, TASK_COLUMN_UID, &uid, -1);
+
+ argument = g_strdup_printf ("task:%s", uid);
+
+ clock_launch_tasks_app (calwin, argument);
+
+ g_free (argument);
+ g_free (uid);
+ gtk_tree_path_free (child_path);
+
+ return TRUE;
+}
+
+static void
+set_renderer_pixbuf_color_by_column (GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gint column_number)
+{
+ char *color_string;
+ GdkPixbuf *pixbuf = NULL;
+ GdkColor color;
+
+ gtk_tree_model_get (model, iter, column_number, &color_string, -1);
+
+ if (color_string && gdk_color_parse (color_string, &color)) {
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 16, 16);
+ /* GdkColor has 16 bits per color, gdk_pixbuf only uses 8 bits
+ * per color. So just drop the least significant parts */
+ gdk_pixbuf_fill (pixbuf,
+ (color.red & 0xff00) << 16 |
+ (color.green & 0xff00) << 8 |
+ (color.blue & 0xff00));
+
+ g_object_set (renderer, "visible", pixbuf != NULL, "pixbuf", pixbuf, NULL);
+
+ if (pixbuf)
+ g_object_unref (pixbuf);
+
+ g_free (color_string);
+ }
+}
+
+static void
+set_renderer_pixbuf_pixmap (GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ const char *iconpath)
+{
+ GdkPixbuf *pixbuf = NULL;
+ GError *error = NULL;
+
+ if (!g_file_test (iconpath, G_FILE_TEST_IS_REGULAR)) {
+ g_printerr ("File '%s' does not exist.\n", iconpath);
+ return;
+ }
+
+ pixbuf = gdk_pixbuf_new_from_file (iconpath, &error);
+ if (error) {
+ g_printerr ("Cannot load '%s': %s\n",
+ iconpath, error->message);
+ g_error_free (error);
+ return;
+ }
+
+ g_object_set (renderer,
+ "visible", pixbuf != NULL,
+ "pixbuf", pixbuf,
+ NULL);
+
+ if (pixbuf)
+ g_object_unref (pixbuf);
+}
+
+static void
+set_renderer_pixbuf_pixmap_for_bday (GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gint data_column)
+{
+ const gchar *path = NULL;
+ gchar *type = NULL;
+
+ gtk_tree_model_get (model, iter, data_column, &type, -1);
+ if (!type)
+ return;
+
+ /* type should be in format like this:
+ * pas-id-4121A93E00000001-anniversary
+ * pas-id-41112AF900000003-birthday
+ * ...
+ */
+ if (g_strrstr (type, "birthday") != NULL)
+ path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_birthday_16.png";
+ else if (g_strrstr (type, "anniversary") != NULL)
+ path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_gifts_16.png";
+ else
+ path = CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_miscellaneous_16.png";
+
+ g_free (type);
+
+ set_renderer_pixbuf_pixmap (renderer, model, iter, path);
+}
+
+static void
+set_renderer_pixbuf_pixmap_for_weather (GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter)
+{
+ set_renderer_pixbuf_pixmap (renderer, model, iter,
+ CLOCK_EDS_ICONDIR G_DIR_SEPARATOR_S "category_holiday_16.png");
+}
+
+static void
+task_pixbuf_cell_data_func (GtkTreeViewColumn *column,
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ set_renderer_pixbuf_color_by_column (renderer,
+ model,
+ iter,
+ TASK_COLUMN_COLOR);
+}
+
+static void
+appointment_pixbuf_cell_data_func (GtkTreeViewColumn *column,
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+ set_renderer_pixbuf_color_by_column (renderer,
+ model,
+ iter,
+ APPOINTMENT_COLUMN_PIXBUF);
+}
+static void
+birthday_pixbuf_cell_data_func (GtkTreeViewColumn *column,
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+
+ /* APPOINTMENT_COLUMN_UID contains data to select between
+ * anniversary or birthday
+ */
+ set_renderer_pixbuf_pixmap_for_bday (renderer,
+ model,
+ iter,
+ APPOINTMENT_COLUMN_UID);
+}
+static void
+weather_pixbuf_cell_data_func (GtkTreeViewColumn *column,
+ GtkCellRenderer *renderer,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gpointer data)
+{
+
+ set_renderer_pixbuf_pixmap_for_weather (renderer,
+ model,
+ iter);
+}
+
+static int
+compare_tasks (GtkTreeModel *model,
+ GtkTreeIter *a,
+ GtkTreeIter *b,
+ gpointer user_data)
+{
+ gboolean done_a, done_b;
+ int priority_a, priority_b;
+
+ gtk_tree_model_get (model, a,
+ TASK_COLUMN_COMPLETED, &done_a,
+ TASK_COLUMN_PRIORITY, &priority_a,
+ -1);
+ gtk_tree_model_get (model, b,
+ TASK_COLUMN_COMPLETED, &done_b,
+ TASK_COLUMN_PRIORITY, &priority_b,
+ -1);
+
+ /* Always sort completed tasks last */
+ if (done_a != done_b)
+ return done_a ? -1 : 1;
+
+ /* We change undefined priorities so they appear as "Normal" */
+ if (priority_a <= 0)
+ priority_a = 5;
+ if (priority_b <= 0)
+ priority_b = 5;
+
+ /* We'll just use the ordering of the priority values. */
+ if (priority_a < priority_b)
+ return -1;
+ else if (priority_a > priority_b)
+ return 1;
+ else {
+ gint64 due_time_a64, due_time_b64;
+ time_t due_time_a, due_time_b;
+
+ gtk_tree_model_get (model, a,
+ TASK_COLUMN_DUE_TIME, &due_time_a64, -1);
+ gtk_tree_model_get (model, b,
+ TASK_COLUMN_DUE_TIME, &due_time_b64, -1);
+ due_time_a = due_time_a64;
+ due_time_b = due_time_b64;
+
+ if (due_time_a < due_time_b)
+ return -1;
+ else if (due_time_a > due_time_b)
+ return 1;
+ else {
+ char *summary_a, *summary_b;
+ int res;
+
+ gtk_tree_model_get (model, a, TASK_COLUMN_SUMMARY, &summary_a, -1);
+ gtk_tree_model_get (model, b, TASK_COLUMN_SUMMARY, &summary_b, -1);
+
+ res = g_utf8_collate (summary_a ? summary_a: "",
+ summary_b ? summary_b: "");
+
+ g_free (summary_a);
+ g_free (summary_b);
+
+ return res;
+ }
+ }
+}
+
+static void
+calendar_window_tree_selection_changed (GtkTreeSelection *selection,
+ CalendarWindow *calwin)
+{
+ if (selection == calwin->priv->previous_selection)
+ return;
+
+ if (calwin->priv->previous_selection) {
+ g_signal_handlers_block_by_func (calwin->priv->previous_selection,
+ calendar_window_tree_selection_changed,
+ calwin);
+ gtk_tree_selection_unselect_all (calwin->priv->previous_selection);
+ g_signal_handlers_unblock_by_func (calwin->priv->previous_selection,
+ calendar_window_tree_selection_changed,
+ calwin);
+ }
+
+ calwin->priv->previous_selection = selection;
+}
+
+static void
+edit_tasks (CalendarWindow *calwin)
+{
+ clock_launch_tasks_app (calwin, NULL);
+}
+
+static GtkWidget *
+create_task_list (CalendarWindow *calwin,
+ GtkWidget **tree_view,
+ GtkWidget **scrolled_window)
+{
+ GtkWidget *list;
+ GtkWidget *view;
+ GtkWidget *scrolled;
+ GtkCellRenderer *cell;
+ GtkTreeViewColumn *column;
+ GtkTreeSelection *selection;
+
+ list = create_hig_frame (calwin,
+ _("Tasks"), _("Edit"),
+ KEY_TASKS_EXPANDED,
+ G_CALLBACK (edit_tasks));
+
+ *scrolled_window = scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_SHADOW_IN);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ /* we show the widget before adding to the container, since adding to
+ * the container changes the visibility depending on the state of the
+ * expander */
+ gtk_widget_show (scrolled);
+ gtk_container_add (GTK_CONTAINER (list), scrolled);
+
+ g_assert (calwin->priv->tasks_model != NULL);
+
+ *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (calwin->priv->tasks_filter));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
+
+ g_signal_connect (view, "row-activated",
+ G_CALLBACK (task_activated_cb), calwin);
+
+ /* Source color */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_set_cell_data_func (column, cell,
+ (GtkTreeCellDataFunc) task_pixbuf_cell_data_func,
+ NULL, NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ /* Completed toggle */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_toggle_new ();
+ g_object_set (cell,
+ "activatable", TRUE,
+ NULL);
+ g_signal_connect_swapped (cell, "toggled",
+ G_CALLBACK (handle_task_completed_toggled),
+ calwin);
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_add_attribute (column, cell,
+ "active", TASK_COLUMN_COMPLETED);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ /* Percent complete */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_text_new ();
+ g_object_set (cell,
+ "editable", TRUE,
+ NULL);
+ g_signal_connect_swapped (cell, "edited",
+ G_CALLBACK (handle_task_percent_complete_edited),
+ calwin);
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_add_attribute (column, cell,
+ "text", TASK_COLUMN_PERCENT_COMPLETE_TEXT);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ /* Summary */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_text_new ();
+ g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_set_attributes (column, cell,
+ "text", TASK_COLUMN_SUMMARY,
+ "strikethrough", TASK_COLUMN_COMPLETED,
+ "attributes", TASK_COLUMN_OVERDUE_ATTR,
+ NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+ g_signal_connect (selection, "changed",
+ G_CALLBACK (calendar_window_tree_selection_changed),
+ calwin);
+
+ gtk_container_add (GTK_CONTAINER (scrolled), view);
+
+ gtk_widget_show (view);
+
+ return list;
+}
+
+static void
+mark_day_on_calendar (CalendarClient *client,
+ guint day,
+ CalendarWindow *calwin)
+{
+ gtk_calendar_mark_day (GTK_CALENDAR (calwin->priv->calendar), day);
+}
+
+static void
+handle_appointments_changed (CalendarWindow *calwin)
+{
+ GSList *events, *l;
+ guint year, month, day;
+
+ if (calwin->priv->calendar) {
+ gtk_calendar_clear_marks (GTK_CALENDAR (calwin->priv->calendar));
+
+ calendar_client_foreach_appointment_day (calwin->priv->client,
+ (CalendarDayIter) mark_day_on_calendar,
+ calwin);
+ }
+
+ gtk_list_store_clear (calwin->priv->appointments_model);
+
+ calendar_client_get_date (calwin->priv->client, &year, &month, &day);
+
+ events = calendar_client_get_events (calwin->priv->client,
+ CALENDAR_EVENT_APPOINTMENT);
+ for (l = events; l; l = l->next) {
+ CalendarAppointment *appointment = l->data;
+ GtkTreeIter iter;
+ char *start_text;
+
+ g_assert (CALENDAR_EVENT (appointment)->type == CALENDAR_EVENT_APPOINTMENT);
+
+ if (appointment->is_all_day)
+ start_text = g_strdup (_("All Day"));
+ else
+ start_text = format_time (calwin->priv->time_format,
+ appointment->start_time,
+ year, month, day);
+
+
+ gtk_list_store_append (calwin->priv->appointments_model,
+ &iter);
+ gtk_list_store_set (calwin->priv->appointments_model, &iter,
+ APPOINTMENT_COLUMN_UID, appointment->uid,
+ APPOINTMENT_COLUMN_URI, appointment->uri,
+ APPOINTMENT_COLUMN_SUMMARY, appointment->summary,
+ APPOINTMENT_COLUMN_DESCRIPTION, appointment->description,
+ APPOINTMENT_COLUMN_START_TIME, (gint64)appointment->start_time,
+ APPOINTMENT_COLUMN_START_TEXT, start_text,
+ APPOINTMENT_COLUMN_END_TIME, (gint64)appointment->end_time,
+ APPOINTMENT_COLUMN_ALL_DAY, appointment->is_all_day,
+ APPOINTMENT_COLUMN_PIXBUF, appointment->color_string,
+ -1);
+
+ g_free (start_text);
+ calendar_event_free (CALENDAR_EVENT (appointment));
+ }
+ g_slist_free (events);
+
+ update_frame_visibility (calwin->priv->appointment_list,
+ GTK_TREE_MODEL (calwin->priv->appointments_filter));
+ update_frame_visibility (calwin->priv->birthday_list,
+ GTK_TREE_MODEL (calwin->priv->birthdays_filter));
+ update_frame_visibility (calwin->priv->weather_list,
+ GTK_TREE_MODEL (calwin->priv->weather_filter));
+}
+
+static GtkWidget *
+create_list_for_appointment_model (CalendarWindow *calwin,
+ const char *label,
+ GtkTreeModelFilter **filter,
+ GtkTreeModelFilterVisibleFunc is_for_filter,
+ GtkTreeCellDataFunc set_pixbuf_cell,
+ gboolean show_start,
+ GtkWidget **tree_view,
+ GtkWidget **scrolled_window,
+ const char *key,
+ GCallback callback)
+{
+ GtkWidget *list;
+ GtkWidget *view;
+ GtkWidget *scrolled;
+ GtkCellRenderer *cell;
+ GtkTreeViewColumn *column;
+ GtkTreeSelection *selection;
+
+
+ list = create_hig_frame (calwin, label, _("Edit"), key, callback);
+
+ *scrolled_window = scrolled = gtk_scrolled_window_new (NULL, NULL);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_SHADOW_IN);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
+ GTK_POLICY_NEVER,
+ GTK_POLICY_AUTOMATIC);
+ /* we show the widget before adding to the container, since adding to
+ * the container changes the visibility depending on the state of the
+ * expander */
+ gtk_widget_show (scrolled);
+ gtk_container_add (GTK_CONTAINER (list), scrolled);
+
+ g_assert (calwin->priv->appointments_model != NULL);
+
+ if (!*filter) {
+ *filter =
+ GTK_TREE_MODEL_FILTER (
+ gtk_tree_model_filter_new (GTK_TREE_MODEL (calwin->priv->appointments_model),
+ NULL));
+ gtk_tree_model_filter_set_visible_func (
+ *filter,
+ (GtkTreeModelFilterVisibleFunc) is_for_filter,
+ calwin,
+ NULL);
+ }
+
+ *tree_view = view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (*filter));
+ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE);
+
+ /* Icon */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_pixbuf_new ();
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_set_cell_data_func (column, cell,
+ (GtkTreeCellDataFunc) set_pixbuf_cell,
+ NULL, NULL);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ if (show_start) {
+ /* Start time */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_text_new ();
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_add_attribute (column, cell,
+ "text", APPOINTMENT_COLUMN_START_TEXT);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+ }
+
+ /* Summary */
+ column = gtk_tree_view_column_new ();
+ cell = gtk_cell_renderer_text_new ();
+ g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+ gtk_tree_view_column_pack_start (column, cell, TRUE);
+ gtk_tree_view_column_add_attribute (column, cell,
+ "text", APPOINTMENT_COLUMN_SUMMARY);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), column);
+
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+ g_signal_connect (selection, "changed",
+ G_CALLBACK (calendar_window_tree_selection_changed),
+ calwin);
+
+ gtk_container_add (GTK_CONTAINER (scrolled), view);
+
+ gtk_widget_show (view);
+
+ return list;
+}
+
+static void
+edit_appointments (CalendarWindow *calwin)
+{
+ clock_launch_calendar_app (calwin, NULL);
+}
+
+static GtkWidget *
+create_appointment_list (CalendarWindow *calwin,
+ GtkWidget **tree_view,
+ GtkWidget **scrolled_window)
+{
+ return create_list_for_appointment_model (
+ calwin,
+ _("Appointments"),
+ &calwin->priv->appointments_filter,
+ is_appointment,
+ appointment_pixbuf_cell_data_func,
+ TRUE,
+ tree_view,
+ scrolled_window,
+ KEY_APPOINTMENTS_EXPANDED,
+ G_CALLBACK (edit_appointments));
+}
+
+static void
+edit_birthdays (CalendarWindow *calwin)
+{
+ clock_launch_calendar_app (calwin, NULL);
+}
+
+static GtkWidget *
+create_birthday_list (CalendarWindow *calwin,
+ GtkWidget **tree_view,
+ GtkWidget **scrolled_window)
+{
+ /* FIXME: Figure out how to get rid of useless localized message in front of the summary */
+ return create_list_for_appointment_model (
+ calwin,
+ _("Birthdays and Anniversaries"),
+ &calwin->priv->birthdays_filter,
+ is_birthday,
+ birthday_pixbuf_cell_data_func,
+ FALSE,
+ tree_view,
+ scrolled_window,
+ KEY_BIRTHDAYS_EXPANDED,
+ G_CALLBACK (edit_birthdays));
+}
+
+static void
+edit_weather (CalendarWindow *calwin)
+{
+ clock_launch_calendar_app (calwin, NULL);
+}
+
+
+static GtkWidget *
+create_weather_list (CalendarWindow *calwin,
+ GtkWidget **tree_view,
+ GtkWidget **scrolled_window)
+{
+ return create_list_for_appointment_model (
+ calwin,
+ _("Weather Information"),
+ &calwin->priv->weather_filter,
+ is_weather,
+ weather_pixbuf_cell_data_func,
+ FALSE,
+ tree_view,
+ scrolled_window,
+ KEY_WEATHER_EXPANDED,
+ G_CALLBACK (edit_weather));
+}
+
+static void
+calendar_window_create_tasks_model (CalendarWindow *calwin)
+{
+ GType column_types [N_TASK_COLUMNS] = {
+ G_TYPE_STRING, /* uid */
+ G_TYPE_STRING, /* summary */
+ G_TYPE_STRING, /* description */
+ G_TYPE_INT64, /* start time */
+ G_TYPE_INT64, /* due time */
+ G_TYPE_UINT, /* percent complete */
+ G_TYPE_STRING, /* percent complete text */
+ G_TYPE_BOOLEAN, /* completed */
+ G_TYPE_INT64, /* completed time */
+ PANGO_TYPE_ATTR_LIST, /* summary text attributes */
+ G_TYPE_STRING, /* color */
+ G_TYPE_INT /* priority */
+ };
+
+ calwin->priv->tasks_model = gtk_list_store_newv (N_TASK_COLUMNS,
+ column_types);
+
+ gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (calwin->priv->tasks_model),
+ TASK_COLUMN_PRIORITY,
+ compare_tasks,
+ NULL, NULL);
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (calwin->priv->tasks_model),
+ TASK_COLUMN_PRIORITY,
+ GTK_SORT_ASCENDING);
+
+ calwin->priv->tasks_filter = GTK_TREE_MODEL_FILTER (
+ gtk_tree_model_filter_new (GTK_TREE_MODEL (calwin->priv->tasks_model),
+ NULL));
+ gtk_tree_model_filter_set_visible_func (
+ calwin->priv->tasks_filter,
+ (GtkTreeModelFilterVisibleFunc) filter_out_tasks,
+ calwin,
+ NULL);
+ gtk_tree_model_filter_set_modify_func (
+ calwin->priv->tasks_filter,
+ N_TASK_COLUMNS,
+ column_types,
+ (GtkTreeModelFilterModifyFunc) modify_task_text_attributes,
+ calwin,
+ NULL);
+}
+
+static void
+calendar_window_create_appointments_model (CalendarWindow *calwin)
+{
+ calwin->priv->appointments_model =
+ gtk_list_store_new (N_APPOINTMENT_COLUMNS,
+ G_TYPE_STRING, /* uid */
+ G_TYPE_STRING, /* uri */
+ G_TYPE_STRING, /* summary */
+ G_TYPE_STRING, /* description */
+ G_TYPE_INT64, /* start time */
+ G_TYPE_STRING, /* start time text */
+ G_TYPE_INT64, /* end time */
+ G_TYPE_BOOLEAN, /* all day */
+ G_TYPE_STRING); /* color */
+
+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (calwin->priv->appointments_model),
+ APPOINTMENT_COLUMN_START_TIME,
+ GTK_SORT_ASCENDING);
+}
+
+static void
+calendar_day_activated (GtkCalendar *calendar,
+ CalendarWindow *calwin)
+{
+ unsigned int day;
+ unsigned int month;
+ unsigned int year;
+ time_t date;
+ struct tm utc_date_tm;
+ struct tm local_date_tm = { 0, };
+ char *argument;
+
+ gtk_calendar_get_date (calendar, &year, &month, &day);
+
+ local_date_tm.tm_mday = (int) day;
+ local_date_tm.tm_mon = (int) month;
+ local_date_tm.tm_year = (int) year - 1900;
+ local_date_tm.tm_isdst = -1;
+
+ /* convert the local date picked in the calendar to broken-down UTC */
+ date = mktime (&local_date_tm);
+ gmtime_r (&date, &utc_date_tm);
+
+ /* FIXME: once bug 409200 is fixed, we'll have to make this hh:mm:ss
+ * instead of hhmmss */
+ argument = g_strdup_printf ("calendar:///?startdate="
+ "%.4d%.2d%.2dT%.2d%.2d%.2dZ",
+ utc_date_tm.tm_year + 1900,
+ utc_date_tm.tm_mon + 1,
+ utc_date_tm.tm_mday,
+ utc_date_tm.tm_hour,
+ utc_date_tm.tm_min,
+ 0);
+
+ clock_launch_calendar_app (calwin, argument);
+
+ g_free (argument);
+}
+
+static void
+calendar_day_selected (GtkCalendar *calendar,
+ CalendarWindow *calwin)
+{
+ guint day;
+
+ gtk_calendar_get_date (calendar, NULL, NULL, &day);
+
+ calendar_client_select_day (calwin->priv->client, day);
+
+ handle_appointments_changed (calwin);
+ handle_tasks_changed (calwin);
+}
+
+static void
+calendar_month_selected (GtkCalendar *calendar,
+ CalendarWindow *calwin)
+{
+ guint year, month;
+
+ gtk_calendar_get_date (calendar, &year, &month, NULL);
+
+ calendar_client_select_month (calwin->priv->client, month, year);
+
+ handle_appointments_changed (calwin);
+ handle_tasks_changed (calwin);
+}
+
+typedef struct
+{
+ GtkWidget *calendar;
+ GtkWidget *tree;
+} ConstraintData;
+
+static void
+constrain_list_size (GtkWidget *widget,
+ GtkRequisition *requisition,
+ ConstraintData *constraint)
+{
+ GtkRequisition req;
+ int screen_h;
+ int max_height;
+
+ /* constrain width to the calendar width */
+ gtk_widget_size_request (constraint->calendar, &req);
+ requisition->width = MIN (requisition->width, req.width);
+
+ screen_h = gdk_screen_get_height (gtk_widget_get_screen (widget));
+ /* constrain height to be the tree height up to a max */
+ max_height = (screen_h - req.height) / 3;
+ gtk_widget_size_request (constraint->tree, &req);
+
+ requisition->height = MIN (req.height, max_height);
+ requisition->height += 2 * gtk_widget_get_style (widget)->ythickness;
+}
+
+static void
+setup_list_size_constraint (GtkWidget *widget,
+ GtkWidget *calendar,
+ GtkWidget *tree)
+{
+ ConstraintData *constraint;
+
+ constraint = g_new0 (ConstraintData, 1);
+ constraint->calendar = calendar;
+ constraint->tree = tree;
+
+ g_signal_connect_data (widget, "size-request",
+ G_CALLBACK (constrain_list_size), constraint,
+ (GClosureNotify) g_free, 0);
+}
+
+static void
+expander_activated (GtkExpander *expander,
+ CalendarWindow *calwin)
+{
+ const char *key;
+
+ key = (const gchar*)g_object_get_data (G_OBJECT (expander), "mateconf-key");
+
+ if (mateconf_client_key_is_writable (calwin->priv->mateconfclient,
+ key, NULL)) {
+ mateconf_client_set_bool (calwin->priv->mateconfclient, key,
+ gtk_expander_get_expanded (expander),
+ NULL);
+ }
+}
+
+static void
+expanded_changed (MateConfClient *client,
+ guint cnxn_id,
+ MateConfEntry *entry,
+ GtkExpander *expander)
+{
+ gboolean value;
+
+ if (!entry->value || entry->value->type != MATECONF_VALUE_BOOL)
+ return;
+
+ value = mateconf_value_get_bool (entry->value);
+
+ gtk_expander_set_expanded (expander, value);
+}
+
+static void
+remove_listener (gpointer data)
+{
+ MateConfClient *client;
+
+ client = mateconf_client_get_default ();
+ mateconf_client_notify_remove (client, GPOINTER_TO_UINT (data));
+ g_object_unref (client);
+}
+
+static void
+connect_expander_with_mateconf (CalendarWindow *calwin,
+ GtkWidget *expander,
+ const char *relative_key)
+{
+ char *key;
+ gboolean expanded;
+ guint listener;
+
+ key = g_strdup_printf ("%s/%s",
+ calwin->priv->prefs_dir, relative_key);
+
+ g_object_set_data_full (G_OBJECT (expander), "mateconf-key", (gpointer)key, g_free);
+
+ expanded = mateconf_client_get_bool (calwin->priv->mateconfclient, key,
+ NULL);
+ gtk_expander_set_expanded (GTK_EXPANDER (expander), expanded);
+
+ g_signal_connect_after (expander, "activate",
+ G_CALLBACK (expander_activated),
+ calwin);
+
+ listener = mateconf_client_notify_add (
+ calwin->priv->mateconfclient, key,
+ (MateConfClientNotifyFunc) expanded_changed,
+ expander, NULL, NULL);
+
+ g_object_set_data_full (G_OBJECT (expander), "listener-id",
+ GUINT_TO_POINTER (listener), remove_listener);
+}
+#endif /* HAVE_LIBECAL */
+
+static void
+calendar_window_pack_pim (CalendarWindow *calwin,
+ GtkWidget *vbox)
+{
+#ifdef HAVE_LIBECAL
+ GtkWidget *list;
+ GtkWidget *tree_view;
+ GtkWidget *scrolled_window;
+ guint year, month, day;
+
+ calendar_window_create_tasks_model (calwin);
+ calendar_window_create_appointments_model (calwin);
+
+ list = create_task_list (calwin, &tree_view, &scrolled_window);
+ setup_list_size_constraint (scrolled_window,
+ calwin->priv->calendar, tree_view);
+ update_frame_visibility (list,
+ GTK_TREE_MODEL (calwin->priv->tasks_model));
+ calwin->priv->task_list = list;
+
+ list = create_birthday_list (calwin, &tree_view, &scrolled_window);
+ setup_list_size_constraint (scrolled_window,
+ calwin->priv->calendar, tree_view);
+ update_frame_visibility (list,
+ GTK_TREE_MODEL (calwin->priv->birthdays_filter));
+ calwin->priv->birthday_list = list;
+
+ list = create_weather_list (calwin, &tree_view, &scrolled_window);
+ setup_list_size_constraint (scrolled_window,
+ calwin->priv->calendar, tree_view);
+ update_frame_visibility (list,
+ GTK_TREE_MODEL (calwin->priv->weather_filter));
+ calwin->priv->weather_list = list;
+
+ list = create_appointment_list (calwin, &tree_view, &scrolled_window);
+ setup_list_size_constraint (scrolled_window,
+ calwin->priv->calendar, tree_view);
+ update_frame_visibility (list,
+ GTK_TREE_MODEL (calwin->priv->appointments_filter));
+ calwin->priv->appointment_list = list;
+
+ if (!calwin->priv->invert_order) {
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->task_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->appointment_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->birthday_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->weather_list,
+ TRUE, TRUE, 0);
+ } else {
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->weather_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->birthday_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->appointment_list,
+ TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->task_list,
+ TRUE, TRUE, 0);
+ }
+
+ if (!calwin->priv->client) {
+ calwin->priv->client = calendar_client_new ();
+
+ g_signal_connect_swapped (calwin->priv->client,
+ "tasks-changed",
+ G_CALLBACK (handle_tasks_changed),
+ calwin);
+ g_signal_connect_swapped (calwin->priv->client,
+ "appointments-changed",
+ G_CALLBACK (handle_appointments_changed),
+ calwin);
+ }
+
+ gtk_calendar_get_date (GTK_CALENDAR (calwin->priv->calendar),
+ &year, &month, &day);
+
+ calendar_client_select_day (calwin->priv->client, day);
+ calendar_client_select_month (calwin->priv->client, month, year);
+
+ handle_tasks_changed (calwin);
+ handle_appointments_changed (calwin);
+
+ g_signal_connect (calwin->priv->calendar,
+ "day-selected-double-click",
+ G_CALLBACK (calendar_day_activated),
+ calwin);
+ g_signal_connect (calwin->priv->calendar,
+ "day-selected",
+ G_CALLBACK (calendar_day_selected),
+ calwin);
+ g_signal_connect (calwin->priv->calendar,
+ "month-changed",
+ G_CALLBACK (calendar_month_selected),
+ calwin);
+#endif /* HAVE_LIBECAL */
+}
+
+static GtkWidget *
+calendar_window_create_calendar (CalendarWindow *calwin)
+{
+ GtkWidget *calendar;
+ GtkCalendarDisplayOptions options;
+ struct tm *tm;
+
+ calendar = gtk_calendar_new ();
+ options = gtk_calendar_get_display_options (GTK_CALENDAR (calendar));
+ if (calwin->priv->show_weeks)
+ options |= GTK_CALENDAR_SHOW_WEEK_NUMBERS;
+ else
+ options &= ~(GTK_CALENDAR_SHOW_WEEK_NUMBERS);
+ gtk_calendar_set_display_options (GTK_CALENDAR (calendar), options);
+
+ tm = localtime (calwin->priv->current_time);
+
+ gtk_calendar_select_month (GTK_CALENDAR (calendar),
+ tm->tm_mon,
+ tm->tm_year + 1900);
+ gtk_calendar_select_day (GTK_CALENDAR (calendar), tm->tm_mday);
+
+ return calendar;
+}
+
+static void
+expand_collapse_child (GtkWidget *child,
+ gpointer data)
+{
+ gboolean expanded;
+
+ if (data == child || gtk_widget_is_ancestor (data, child))
+ return;
+
+ expanded = gtk_expander_get_expanded (GTK_EXPANDER (data));
+ g_object_set (child, "visible", expanded, NULL);
+}
+
+static void
+expand_collapse (GtkWidget *expander,
+ GParamSpec *pspec,
+ gpointer data)
+{
+ GtkWidget *box = data;
+
+ gtk_container_foreach (GTK_CONTAINER (box),
+ (GtkCallback)expand_collapse_child,
+ expander);
+}
+
+static void add_child (GtkContainer *container,
+ GtkWidget *child,
+ GtkExpander *expander)
+{
+ expand_collapse_child (child, expander);
+}
+
+static GtkWidget *
+create_hig_frame (CalendarWindow *calwin,
+ const char *title,
+ const char *button_label,
+ const char *key,
+ GCallback callback)
+{
+ GtkWidget *vbox;
+ GtkWidget *alignment;
+ GtkWidget *label;
+ GtkWidget *hbox;
+ GtkWidget *button;
+ char *bold_title;
+ char *text;
+ GtkWidget *expander;
+
+ vbox = gtk_vbox_new (FALSE, 6);
+
+ bold_title = g_strdup_printf ("<b>%s</b>", title);
+ expander = gtk_expander_new (bold_title);
+ g_free (bold_title);
+ gtk_expander_set_use_markup (GTK_EXPANDER (expander), TRUE);
+
+ hbox = gtk_hbox_new (FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), expander, FALSE, FALSE, 0);
+ gtk_widget_show_all (vbox);
+
+ g_signal_connect (expander, "notify::expanded",
+ G_CALLBACK (expand_collapse), hbox);
+ g_signal_connect (expander, "notify::expanded",
+ G_CALLBACK (expand_collapse), vbox);
+
+ /* FIXME: this doesn't really work, since "add" does not
+ * get emitted for e.g. gtk_box_pack_start
+ */
+ g_signal_connect (vbox, "add", G_CALLBACK (add_child), expander);
+ g_signal_connect (hbox, "add", G_CALLBACK (add_child), expander);
+
+ if (button_label) {
+ button = gtk_button_new ();
+ text = g_markup_printf_escaped ("<small>%s</small>", button_label);
+ label = gtk_label_new (text);
+ g_free (text);
+ gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
+ gtk_container_add (GTK_CONTAINER (button), label);
+
+ alignment = gtk_alignment_new (1, 0, 0, 0);
+ gtk_container_add (GTK_CONTAINER (alignment), button);
+ gtk_widget_show_all (alignment);
+
+ gtk_container_add (GTK_CONTAINER (hbox), alignment);
+
+ g_signal_connect_swapped (button, "clicked", callback, calwin);
+ }
+
+#ifdef HAVE_LIBECAL
+ connect_expander_with_mateconf (calwin, expander, key);
+#endif
+
+ return vbox;
+}
+
+static void
+edit_locations (CalendarWindow *calwin)
+{
+ g_signal_emit (calwin, signals[EDIT_LOCATIONS], 0);
+}
+
+static void
+calendar_window_pack_locations (CalendarWindow *calwin, GtkWidget *vbox)
+{
+ calwin->priv->locations_list = create_hig_frame (calwin,
+ _("Locations"), _("Edit"),
+ KEY_LOCATIONS_EXPANDED,
+ G_CALLBACK (edit_locations));
+
+ /* we show the widget before adding to the container, since adding to
+ * the container changes the visibility depending on the state of the
+ * expander */
+ gtk_widget_show (calwin->priv->locations_list);
+ gtk_container_add (GTK_CONTAINER (vbox), calwin->priv->locations_list);
+
+ //gtk_box_pack_start (GTK_BOX (vbox), calwin->priv->locations_list, TRUE, FALSE, 0);
+}
+
+static void
+calendar_window_fill (CalendarWindow *calwin)
+{
+ GtkWidget *frame;
+ GtkWidget *vbox;
+
+ frame = gtk_frame_new (NULL);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
+ gtk_container_add (GTK_CONTAINER (calwin), frame);
+ gtk_widget_show (frame);
+
+ vbox = gtk_vbox_new (FALSE, 6);
+ gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
+ gtk_container_add (GTK_CONTAINER (frame), vbox);
+ gtk_widget_show (vbox);
+
+ calwin->priv->calendar = calendar_window_create_calendar (calwin);
+ gtk_widget_show (calwin->priv->calendar);
+
+ if (!calwin->priv->invert_order) {
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->calendar, TRUE, FALSE, 0);
+ calendar_window_pack_pim (calwin, vbox);
+ calendar_window_pack_locations (calwin, vbox);
+ } else {
+ calendar_window_pack_locations (calwin, vbox);
+ calendar_window_pack_pim (calwin, vbox);
+ gtk_box_pack_start (GTK_BOX (vbox),
+ calwin->priv->calendar, TRUE, FALSE, 0);
+ }
+}
+
+GtkWidget *
+calendar_window_get_locations_box (CalendarWindow *calwin)
+{
+ return calwin->priv->locations_list;
+}
+
+static GObject *
+calendar_window_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_properties)
+{
+ GObject *obj;
+ CalendarWindow *calwin;
+
+ obj = G_OBJECT_CLASS (calendar_window_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_properties);
+
+ calwin = CALENDAR_WINDOW (obj);
+
+ g_assert (calwin->priv->current_time != NULL);
+ g_assert (calwin->priv->prefs_dir != NULL);
+
+ calendar_window_fill (calwin);
+
+ return obj;
+}
+
+static void
+calendar_window_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ CalendarWindow *calwin;
+
+ g_return_if_fail (CALENDAR_IS_WINDOW (object));
+
+ calwin = CALENDAR_WINDOW (object);
+
+ switch (prop_id) {
+ case PROP_INVERTORDER:
+ g_value_set_boolean (value,
+ calendar_window_get_invert_order (calwin));
+ break;
+ case PROP_SHOWWEEKS:
+ g_value_set_boolean (value,
+ calendar_window_get_show_weeks (calwin));
+ break;
+#ifdef HAVE_LIBECAL
+ case PROP_TIMEFORMAT:
+ g_value_set_enum (value,
+ calendar_window_get_time_format (calwin));
+ break;
+#endif
+ case PROP_CURRENTTIMEP:
+ g_value_set_pointer (value,
+ calendar_window_get_current_time_p (calwin));
+ break;
+ case PROP_PREFSDIR:
+ g_value_set_string (value,
+ calendar_window_get_prefs_dir (calwin));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+calendar_window_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ CalendarWindow *calwin;
+
+ g_return_if_fail (CALENDAR_IS_WINDOW (object));
+
+ calwin = CALENDAR_WINDOW (object);
+
+ switch (prop_id) {
+ case PROP_INVERTORDER:
+ calendar_window_set_invert_order (calwin,
+ g_value_get_boolean (value));
+ break;
+ case PROP_SHOWWEEKS:
+ calendar_window_set_show_weeks (calwin,
+ g_value_get_boolean (value));
+ break;
+#ifdef HAVE_LIBECAL
+ case PROP_TIMEFORMAT:
+ calendar_window_set_time_format (calwin,
+ g_value_get_enum (value));
+ break;
+#endif
+ case PROP_CURRENTTIMEP:
+ calendar_window_set_current_time_p (calwin,
+ g_value_get_pointer (value));
+ break;
+ case PROP_PREFSDIR:
+ calendar_window_set_prefs_dir (calwin,
+ g_value_get_string (value));
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ break;
+ }
+}
+
+static void
+calendar_window_destroy (GtkObject *object)
+{
+#ifdef HAVE_LIBECAL
+ CalendarWindow *calwin;
+
+ calwin = CALENDAR_WINDOW (object);
+
+ if (calwin->priv->client)
+ g_object_unref (calwin->priv->client);
+ calwin->priv->client = NULL;
+
+ if (calwin->priv->appointments_model)
+ g_object_unref (calwin->priv->appointments_model);
+ calwin->priv->appointments_model = NULL;
+
+ if (calwin->priv->tasks_model)
+ g_object_unref (calwin->priv->tasks_model);
+ calwin->priv->tasks_model = NULL;
+
+ if (calwin->priv->appointments_filter)
+ g_object_unref (calwin->priv->appointments_filter);
+ calwin->priv->appointments_filter = NULL;
+
+ if (calwin->priv->birthdays_filter)
+ g_object_unref (calwin->priv->birthdays_filter);
+ calwin->priv->birthdays_filter = NULL;
+
+ if (calwin->priv->tasks_filter)
+ g_object_unref (calwin->priv->tasks_filter);
+ calwin->priv->tasks_filter = NULL;
+
+ if (calwin->priv->weather_filter)
+ g_object_unref (calwin->priv->weather_filter);
+ calwin->priv->weather_filter = NULL;
+
+ if (calwin->priv->mateconfclient)
+ g_object_unref (calwin->priv->mateconfclient);
+ calwin->priv->mateconfclient = NULL;
+#endif /* HAVE_LIBECAL */
+
+ GTK_OBJECT_CLASS (calendar_window_parent_class)->destroy (object);
+}
+
+static void
+calendar_window_class_init (CalendarWindowClass *klass)
+{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
+
+ gobject_class->constructor = calendar_window_constructor;
+ gobject_class->get_property = calendar_window_get_property;
+ gobject_class->set_property = calendar_window_set_property;
+
+ gtkobject_class->destroy = calendar_window_destroy;
+
+ g_type_class_add_private (klass, sizeof (CalendarWindowPrivate));
+
+ signals[EDIT_LOCATIONS] = g_signal_new ("edit-locations",
+ G_TYPE_FROM_CLASS (gobject_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (CalendarWindowClass, edit_locations),
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_INVERTORDER,
+ g_param_spec_boolean ("invert-order",
+ "Invert Order",
+ "Invert order of the calendar and tree views",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_SHOWWEEKS,
+ g_param_spec_boolean ("show-weeks",
+ "Show Weeks",
+ "Show weeks in the calendar",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+
+#ifdef HAVE_LIBECAL
+ g_object_class_install_property (
+ gobject_class,
+ PROP_TIMEFORMAT,
+ g_param_spec_enum ("time-format",
+ "Time Format",
+ "Time format used to display time",
+ CLOCK_TYPE_FORMAT,
+ clock_locale_format (),
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+#endif
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_CURRENTTIMEP,
+ g_param_spec_pointer ("current-time",
+ "Current Time",
+ "Pointer to a variable containing the current time",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ g_object_class_install_property (
+ gobject_class,
+ PROP_PREFSDIR,
+ g_param_spec_string ("prefs-dir",
+ "Preferences Directory",
+ "Preferences directory in MateConf",
+ NULL,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+}
+
+static void
+calendar_window_init (CalendarWindow *calwin)
+{
+ GtkWindow *window;
+
+ calwin->priv = CALENDAR_WINDOW_GET_PRIVATE (calwin);
+
+ window = GTK_WINDOW (calwin);
+ gtk_window_set_type_hint (window, GDK_WINDOW_TYPE_HINT_DOCK);
+ gtk_window_set_decorated (window, FALSE);
+ gtk_window_set_resizable (window, FALSE);
+ gtk_window_stick (window);
+ gtk_window_set_title (window, _("Calendar"));
+ gtk_window_set_icon_name (window, CLOCK_ICON);
+
+#ifdef HAVE_LIBECAL
+ calwin->priv->previous_selection = NULL;
+ calwin->priv->mateconfclient = mateconf_client_get_default ();
+#endif
+}
+
+GtkWidget *
+calendar_window_new (time_t *static_current_time,
+ const char *prefs_dir,
+ gboolean invert_order)
+{
+ CalendarWindow *calwin;
+
+ calwin = g_object_new (CALENDAR_TYPE_WINDOW,
+ "type", GTK_WINDOW_TOPLEVEL,
+ "current-time", static_current_time,
+ "invert-order", invert_order,
+ "prefs-dir", prefs_dir,
+ NULL);
+
+ return GTK_WIDGET (calwin);
+}
+
+void
+calendar_window_refresh (CalendarWindow *calwin)
+{
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+#ifdef HAVE_LIBECAL
+ if (calwin->priv->appointments_filter && calwin->priv->appointment_list)
+ gtk_tree_model_filter_refilter (calwin->priv->appointments_filter);
+ if (calwin->priv->birthdays_filter && calwin->priv->birthday_list)
+ gtk_tree_model_filter_refilter (calwin->priv->birthdays_filter);
+ if (calwin->priv->tasks_filter && calwin->priv->task_list)
+ gtk_tree_model_filter_refilter (calwin->priv->tasks_filter);
+ if (calwin->priv->weather_filter && calwin->priv->weather_list)
+ gtk_tree_model_filter_refilter (calwin->priv->weather_filter);
+#endif
+}
+
+gboolean
+calendar_window_get_invert_order (CalendarWindow *calwin)
+{
+ g_return_val_if_fail (CALENDAR_IS_WINDOW (calwin), FALSE);
+
+ return calwin->priv->invert_order;
+}
+
+void
+calendar_window_set_invert_order (CalendarWindow *calwin,
+ gboolean invert_order)
+{
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+ if (invert_order == calwin->priv->invert_order)
+ return;
+
+ calwin->priv->invert_order = invert_order;
+ //FIXME: update the order of the content of the window
+
+ g_object_notify (G_OBJECT (calwin), "invert-order");
+}
+
+gboolean
+calendar_window_get_show_weeks (CalendarWindow *calwin)
+{
+ g_return_val_if_fail (CALENDAR_IS_WINDOW (calwin), FALSE);
+
+ return calwin->priv->show_weeks;
+}
+
+void
+calendar_window_set_show_weeks (CalendarWindow *calwin,
+ gboolean show_weeks)
+{
+ GtkCalendarDisplayOptions options;
+
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+ if (show_weeks == calwin->priv->show_weeks)
+ return;
+
+ calwin->priv->show_weeks = show_weeks;
+
+ if (calwin->priv->calendar) {
+ options = gtk_calendar_get_display_options (GTK_CALENDAR (calwin->priv->calendar));
+
+ if (show_weeks)
+ options |= GTK_CALENDAR_SHOW_WEEK_NUMBERS;
+ else
+ options &= ~(GTK_CALENDAR_SHOW_WEEK_NUMBERS);
+
+ gtk_calendar_set_display_options (GTK_CALENDAR (calwin->priv->calendar),
+ options);
+ }
+
+ g_object_notify (G_OBJECT (calwin), "show-weeks");
+}
+
+ClockFormat
+calendar_window_get_time_format (CalendarWindow *calwin)
+{
+ g_return_val_if_fail (CALENDAR_IS_WINDOW (calwin),
+ CLOCK_FORMAT_INVALID);
+
+#ifdef HAVE_LIBECAL
+ return calwin->priv->time_format;
+#else
+ return CLOCK_FORMAT_INVALID;
+#endif
+}
+
+void
+calendar_window_set_time_format (CalendarWindow *calwin,
+ ClockFormat time_format)
+{
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+#ifdef HAVE_LIBECAL
+ if (time_format != CLOCK_FORMAT_12 && time_format != CLOCK_FORMAT_24)
+ time_format = clock_locale_format ();
+
+ if (time_format == calwin->priv->time_format)
+ return;
+
+ calwin->priv->time_format = time_format;
+ /* Time to display for appointments has changed */
+ if (calwin->priv->appointments_model)
+ handle_appointments_changed (calwin);
+
+ g_object_notify (G_OBJECT (calwin), "time-format");
+#endif
+}
+
+static time_t *
+calendar_window_get_current_time_p (CalendarWindow *calwin)
+{
+ g_return_val_if_fail (CALENDAR_IS_WINDOW (calwin), NULL);
+
+ return calwin->priv->current_time;
+}
+
+static void
+calendar_window_set_current_time_p (CalendarWindow *calwin,
+ time_t *current_time)
+{
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+ if (current_time == calwin->priv->current_time)
+ return;
+
+ calwin->priv->current_time = current_time;
+
+ g_object_notify (G_OBJECT (calwin), "current-time");
+}
+
+static const char *
+calendar_window_get_prefs_dir (CalendarWindow *calwin)
+{
+ g_return_val_if_fail (CALENDAR_IS_WINDOW (calwin), NULL);
+
+ return calwin->priv->prefs_dir;
+}
+
+static void
+calendar_window_set_prefs_dir (CalendarWindow *calwin,
+ const char *prefs_dir)
+{
+ g_return_if_fail (CALENDAR_IS_WINDOW (calwin));
+
+ if (!calwin->priv->prefs_dir && (!prefs_dir || !prefs_dir [0]))
+ return;
+
+ if (calwin->priv->prefs_dir && prefs_dir && prefs_dir [0] &&
+ !strcmp (calwin->priv->prefs_dir, prefs_dir))
+ return;
+
+ if (calwin->priv->prefs_dir)
+ g_free (calwin->priv->prefs_dir);
+ calwin->priv->prefs_dir = NULL;
+
+ if (prefs_dir && prefs_dir [0])
+ calwin->priv->prefs_dir = g_strdup (prefs_dir);
+
+ g_object_notify (G_OBJECT (calwin), "prefs-dir");
+}
diff --git a/applets/clock/calendar-window.h b/applets/clock/calendar-window.h
new file mode 100644
index 00000000..0b0546c8
--- /dev/null
+++ b/applets/clock/calendar-window.h
@@ -0,0 +1,84 @@
+/*
+ * calendar-window.h: toplevel window containing a calendar and
+ * tasks/appointments
+ *
+ * Copyright (C) 2007 Vincent Untz <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Authors:
+ * Vincent Untz <[email protected]>
+ *
+ * Most of the original code comes from clock.c
+ */
+
+#ifndef CALENDAR_WINDOW_H
+#define CALENDAR_WINDOW_H
+
+#include <gtk/gtk.h>
+#include "clock-utils.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CALENDAR_TYPE_WINDOW (calendar_window_get_type ())
+#define CALENDAR_WINDOW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CALENDAR_TYPE_WINDOW, CalendarWindow))
+#define CALENDAR_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), CALENDAR_TYPE_WINDOW, CalendarWindowClass))
+#define CALENDAR_IS_WINDOW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), CALENDAR_TYPE_WINDOW))
+#define CALENDAR_IS_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CALENDAR_TYPE_WINDOW))
+#define CALENDAR_WINDOW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CALENDAR_TYPE_WINDOW, CalendarWindowClass))
+
+typedef struct _CalendarWindow CalendarWindow;
+typedef struct _CalendarWindowClass CalendarWindowClass;
+typedef struct _CalendarWindowPrivate CalendarWindowPrivate;
+
+struct _CalendarWindow {
+ GtkWindow parent_instance;
+
+ CalendarWindowPrivate *priv;
+};
+
+struct _CalendarWindowClass {
+ GtkWindowClass parent_class;
+
+ void (* edit_locations) (CalendarWindow *calwin);
+};
+
+GType calendar_window_get_type (void) G_GNUC_CONST;
+GtkWidget *calendar_window_new (time_t *static_current_time,
+ const char *prefs_dir,
+ gboolean invert_order);
+
+void calendar_window_refresh (CalendarWindow *calwin);
+
+GtkWidget *calendar_window_get_locations_box (CalendarWindow *calwin);
+
+gboolean calendar_window_get_invert_order (CalendarWindow *calwin);
+void calendar_window_set_invert_order (CalendarWindow *calwin,
+ gboolean invert_order);
+gboolean calendar_window_get_show_weeks (CalendarWindow *calwin);
+void calendar_window_set_show_weeks (CalendarWindow *calwin,
+ gboolean show_weeks);
+ClockFormat calendar_window_get_time_format (CalendarWindow *calwin);
+void calendar_window_set_time_format (CalendarWindow *calwin,
+ ClockFormat time_format);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CALENDAR_WINDOW_H */
diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c
new file mode 100644
index 00000000..53f0e4f4
--- /dev/null
+++ b/applets/clock/clock-face.c
@@ -0,0 +1,462 @@
+/**
+ * clock.c
+ *
+ * A GTK+ widget that implements a clock face
+ *
+ * (c) 2007, Peter Teichman
+ * (c) 2005-2006, Davyd Madeley
+ *
+ * Authors:
+ * Davyd Madeley <[email protected]>
+ * Peter Teichman <[email protected]>
+ */
+
+#include <gtk/gtk.h>
+#include <math.h>
+#include <time.h>
+
+#include <librsvg/rsvg.h>
+
+#include "clock-face.h"
+#include "clock-location.h"
+
+static GHashTable *pixbuf_cache = NULL;
+
+#define CLOCK_FACE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), INTL_TYPE_CLOCK_FACE, ClockFacePrivate))
+
+G_DEFINE_TYPE (ClockFace, clock_face, GTK_TYPE_WIDGET)
+
+static void clock_face_finalize (GObject *);
+static gboolean clock_face_expose (GtkWidget *clock, GdkEventExpose *event);
+static void clock_face_size_request (GtkWidget *clock,
+ GtkRequisition *requisition);
+static void clock_face_size_allocate (GtkWidget *clock,
+ GtkAllocation *allocation);
+
+static void update_time_and_face (ClockFace *this,
+ gboolean force_face_loading);
+static void clock_face_load_face (ClockFace *this,
+ gint width, gint height);
+
+typedef struct _ClockFacePrivate ClockFacePrivate;
+
+typedef enum {
+ CLOCK_FACE_MORNING,
+ CLOCK_FACE_DAY,
+ CLOCK_FACE_EVENING,
+ CLOCK_FACE_NIGHT,
+ CLOCK_FACE_INVALID
+} ClockFaceTimeOfDay;
+
+struct _ClockFacePrivate
+{
+ struct tm time; /* the time on the clock face */
+ int minute_offset; /* the offset of the minutes hand */
+
+ ClockFaceSize size;
+ ClockFaceTimeOfDay timeofday;
+ ClockLocation *location;
+ GdkPixbuf *face_pixbuf;
+ GtkWidget *size_widget;
+};
+
+static void
+clock_face_class_init (ClockFaceClass *class)
+{
+ GObjectClass *obj_class;
+ GtkWidgetClass *widget_class;
+
+ obj_class = G_OBJECT_CLASS (class);
+ widget_class = GTK_WIDGET_CLASS (class);
+
+ /* GtkWidget signals */
+ widget_class->expose_event = clock_face_expose;
+ widget_class->size_request = clock_face_size_request;
+ widget_class->size_allocate = clock_face_size_allocate;
+
+ /* GObject signals */
+ obj_class->finalize = clock_face_finalize;
+
+ g_type_class_add_private (obj_class, sizeof (ClockFacePrivate));
+}
+
+static void
+clock_face_init (ClockFace *this)
+{
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (this);
+
+ priv->size = CLOCK_FACE_SMALL;
+ priv->timeofday = CLOCK_FACE_INVALID;
+ priv->location = NULL;
+ priv->size_widget = NULL;
+
+ gtk_widget_set_has_window (GTK_WIDGET (this), FALSE);
+}
+
+static void
+draw (GtkWidget *this, cairo_t *cr)
+{
+ ClockFacePrivate *priv;
+ GtkAllocation allocation;
+ double x, y;
+ double radius;
+ int hours, minutes, seconds;
+
+ /* Hand lengths as a multiple of the clock radius */
+ double hour_length, min_length, sec_length;
+
+ priv = CLOCK_FACE_GET_PRIVATE (this);
+
+ if (priv->size == CLOCK_FACE_LARGE) {
+ hour_length = 0.45;
+ min_length = 0.6;
+ sec_length = 0.65;
+ } else {
+ hour_length = 0.5;
+ min_length = 0.7;
+ sec_length = 0.8; /* not drawn currently */
+ }
+
+ gtk_widget_get_allocation (this, &allocation);
+
+ x = allocation.x + allocation.width / 2;
+ y = allocation.y + allocation.height / 2;
+ radius = MIN (allocation.width / 2,
+ allocation.height / 2) - 5;
+
+ cairo_save (cr);
+ cairo_translate (cr, allocation.x, allocation.y);
+
+ /* clock back */
+ if (priv->face_pixbuf) {
+ GdkWindow *window = gtk_widget_get_window (this);
+ gdk_draw_pixbuf (GDK_DRAWABLE (window),
+ NULL,
+ priv->face_pixbuf,
+ 0, 0,
+ allocation.x,
+ allocation.y,
+ allocation.width,
+ allocation.height,
+ GDK_RGB_DITHER_NONE, 0, 0);
+ }
+
+ cairo_restore (cr);
+
+ /* clock hands */
+ hours = priv->time.tm_hour;
+ minutes = priv->time.tm_min + priv->minute_offset;
+ seconds = priv->time.tm_sec;
+
+ cairo_set_line_width (cr, 1);
+
+ /* hour hand:
+ * the hour hand is rotated 30 degrees (pi/6 r) per hour +
+ * 1/2 a degree (pi/360 r) per minute
+ */
+ cairo_save (cr);
+ cairo_move_to (cr, x, y);
+ cairo_line_to (cr, x + radius * hour_length * sin (M_PI / 6 * hours +
+ M_PI / 360 * minutes),
+ y + radius * hour_length * -cos (M_PI / 6 * hours +
+ M_PI / 360 * minutes));
+ cairo_stroke (cr);
+ cairo_restore (cr);
+ /* minute hand:
+ * the minute hand is rotated 6 degrees (pi/30 r) per minute
+ */
+ cairo_move_to (cr, x, y);
+ cairo_line_to (cr, x + radius * min_length * sin (M_PI / 30 * minutes),
+ y + radius * min_length * -cos (M_PI / 30 * minutes));
+ cairo_stroke (cr);
+
+ /* seconds hand:
+ * operates identically to the minute hand
+ */
+ if (priv->size == CLOCK_FACE_LARGE) {
+ cairo_save (cr);
+ cairo_set_source_rgb (cr, 0.937, 0.161, 0.161); /* tango red */
+ cairo_move_to (cr, x, y);
+ cairo_line_to (cr, x + radius * sec_length * sin (M_PI / 30 * seconds),
+ y + radius * sec_length * -cos (M_PI / 30 * seconds));
+ cairo_stroke (cr);
+ cairo_restore (cr);
+ }
+}
+
+static gboolean
+clock_face_expose (GtkWidget *this, GdkEventExpose *event)
+{
+ cairo_t *cr;
+
+ /* get a cairo_t */
+ cr = gdk_cairo_create (gtk_widget_get_window (this));
+
+ cairo_rectangle (cr,
+ event->area.x, event->area.y,
+ event->area.width, event->area.height);
+ cairo_clip (cr);
+
+ draw (this, cr);
+
+ cairo_destroy (cr);
+
+ return FALSE;
+}
+
+static void
+clock_face_redraw_canvas (ClockFace *this)
+{
+ gtk_widget_queue_draw (GTK_WIDGET (this));
+}
+
+static void
+clock_face_size_request (GtkWidget *this,
+ GtkRequisition *requisition)
+{
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (this);
+
+ if (priv->size_widget != NULL) {
+ GtkRequisition req;
+
+ /* Tie our size to the height of the size_widget */
+ gtk_widget_size_request (GTK_WIDGET (priv->size_widget), &req);
+
+ /* Pad out our height by a little bit - this improves
+ the balance */
+ requisition->width = req.height + req.height / 8;
+ requisition->height = req.height + req.height / 8;
+ } else if (priv->face_pixbuf != NULL) {
+ int w, h;
+
+ /* Use the size of the current pixbuf */
+ w = gdk_pixbuf_get_width (GDK_PIXBUF (priv->face_pixbuf));
+ h = gdk_pixbuf_get_height (GDK_PIXBUF (priv->face_pixbuf));
+
+ requisition->width = w;
+ requisition->height = h;
+ } else {
+ /* we don't know anything, so use known dimensions for the svg
+ * files */
+ if (priv->size == CLOCK_FACE_LARGE) {
+ requisition->width = 50;
+ requisition->height = 50;
+ } else {
+ requisition->width = 36;
+ requisition->height = 36;
+ }
+ }
+}
+
+static void
+clock_face_size_allocate (GtkWidget *this,
+ GtkAllocation *allocation)
+{
+ GtkAllocation this_allocation;
+ GtkAllocation old_allocation;
+
+ gtk_widget_get_allocation (this, &this_allocation);
+
+ old_allocation.width = this_allocation.width;
+ old_allocation.height = this_allocation.height;
+
+ if (GTK_WIDGET_CLASS (clock_face_parent_class)->size_allocate)
+ GTK_WIDGET_CLASS (clock_face_parent_class)->size_allocate (this, allocation);
+
+ if (old_allocation.width == allocation->width &&
+ old_allocation.height == allocation->height)
+ return;
+
+ /* Reload the face for the new size */
+ update_time_and_face (CLOCK_FACE (this), TRUE);
+}
+
+static void
+update_time_and_face (ClockFace *this,
+ gboolean force_face_loading)
+{
+ ClockFacePrivate *priv;
+ ClockFaceTimeOfDay timeofday;
+
+ priv = CLOCK_FACE_GET_PRIVATE (this);
+
+ /* update the time */
+ if (priv->location) {
+ clock_location_localtime (priv->location, &priv->time);
+ } else {
+ time_t timet;
+ time (&timet);
+ localtime_r (&timet, &priv->time);
+ }
+
+ /* FIXME this should be a mateconf setting
+ * Or we could use some code from clock-sun.c?
+ * currently we hardcode
+ * morning 7-9
+ * day 9-17
+ * evening 17-22
+ * night 22-7
+ */
+ if (priv->time.tm_hour < 7)
+ timeofday = CLOCK_FACE_NIGHT;
+ else if (priv->time.tm_hour < 9)
+ timeofday = CLOCK_FACE_MORNING;
+ else if (priv->time.tm_hour < 17)
+ timeofday = CLOCK_FACE_DAY;
+ else if (priv->time.tm_hour < 22)
+ timeofday = CLOCK_FACE_EVENING;
+ else
+ timeofday = CLOCK_FACE_NIGHT;
+
+ if (priv->timeofday != timeofday || force_face_loading) {
+ GtkAllocation allocation;
+ gint width, height;
+
+ priv->timeofday = timeofday;
+
+ gtk_widget_get_allocation (GTK_WIDGET (this), &allocation);
+
+ width = allocation.width;
+ height = allocation.height;
+
+ /* Only load the pixbuf if we have some space allocated.
+ * Note that 1x1 is not really some space... */
+ if (width > 1 && height > 1)
+ clock_face_load_face (this, width, height);
+ }
+}
+
+gboolean
+clock_face_refresh (ClockFace *this)
+{
+ update_time_and_face (this, FALSE);
+ clock_face_redraw_canvas (this);
+
+ return TRUE; /* keep running this event */
+}
+
+GtkWidget *
+clock_face_new (ClockFaceSize size)
+{
+ GObject *obj = g_object_new (INTL_TYPE_CLOCK_FACE, NULL);
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (obj);
+
+ priv->size = size;
+
+ return GTK_WIDGET (obj);
+}
+
+GtkWidget *
+clock_face_new_with_location (ClockFaceSize size,
+ ClockLocation *loc,
+ GtkWidget *size_widget)
+{
+ GObject *obj = g_object_new (INTL_TYPE_CLOCK_FACE, NULL);
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (obj);
+
+ priv->size = size;
+ priv->location = g_object_ref (loc);
+ priv->size_widget = g_object_ref (size_widget);
+
+ return GTK_WIDGET (obj);
+}
+
+static void
+clock_face_finalize (GObject *obj)
+{
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (obj);
+
+ if (priv->location) {
+ g_object_unref (priv->location);
+ priv->location = NULL;
+ }
+
+ if (priv->face_pixbuf) {
+ g_object_unref (priv->face_pixbuf);
+ priv->face_pixbuf = NULL;
+ }
+
+ if (priv->size_widget) {
+ g_object_unref (priv->size_widget);
+ priv->size_widget = NULL;
+ }
+
+ G_OBJECT_CLASS (clock_face_parent_class)->finalize (obj);
+
+ if (pixbuf_cache && g_hash_table_size (pixbuf_cache) == 0) {
+ g_hash_table_destroy (pixbuf_cache);
+ pixbuf_cache = NULL;
+ }
+}
+
+/* The pixbuf is being disposed, so remove it from the cache */
+static void
+remove_pixbuf_from_cache (const char *key,
+ GObject *pixbuf)
+{
+ g_hash_table_remove (pixbuf_cache, key);
+}
+
+static void
+clock_face_load_face (ClockFace *this, gint width, gint height)
+{
+ ClockFacePrivate *priv = CLOCK_FACE_GET_PRIVATE (this);
+ const gchar *size_string[2] = { "small", "large" };
+ const gchar *daytime_string[4] = { "morning", "day", "evening", "night" };
+ gchar *cache_name;
+ gchar *name;
+
+ if (!pixbuf_cache)
+ pixbuf_cache = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, NULL);
+
+ if (priv->face_pixbuf != NULL) {
+ /* This might empty the cache, but it's useless to destroy
+ * it since this object is still alive and might add another
+ * pixbuf in the cache later (eg, a few lines below) */
+ g_object_unref (priv->face_pixbuf);
+ priv->face_pixbuf = NULL;
+ }
+
+ /* Look for the pixbuf in the process-wide cache first */
+ cache_name = g_strdup_printf ("%d-%d-%d-%d",
+ priv->size, priv->timeofday,
+ width, height);
+
+ priv->face_pixbuf = g_hash_table_lookup (pixbuf_cache, cache_name);
+ if (priv->face_pixbuf) {
+ g_object_ref (priv->face_pixbuf);
+ return;
+ }
+
+ /* The pixbuf is not cached, let's load it */
+ name = g_strconcat (ICONDIR, "/clock-face-", size_string[priv->size],
+ "-", daytime_string[priv->timeofday], ".svg",
+ NULL);
+ priv->face_pixbuf = rsvg_pixbuf_from_file_at_size (name,
+ width, height,
+ NULL);
+ g_free (name);
+
+ if (!priv->face_pixbuf) {
+ name = g_strconcat (ICONDIR, "/clock-face-",
+ size_string[priv->size], ".svg", NULL);
+ priv->face_pixbuf = rsvg_pixbuf_from_file_at_size (name,
+ width,
+ height,
+ NULL);
+ g_free (name);
+ }
+
+ /* Save the found pixbuf in the cache */
+ if (priv->face_pixbuf) {
+ g_hash_table_replace (pixbuf_cache,
+ cache_name, priv->face_pixbuf);
+ /* This will handle automatic removal from the cache when
+ * the pixbuf isn't needed anymore */
+ g_object_weak_ref (G_OBJECT (priv->face_pixbuf),
+ (GWeakNotify) remove_pixbuf_from_cache,
+ cache_name);
+ } else
+ g_free (cache_name);
+}
diff --git a/applets/clock/clock-face.h b/applets/clock/clock-face.h
new file mode 100644
index 00000000..3c665c63
--- /dev/null
+++ b/applets/clock/clock-face.h
@@ -0,0 +1,64 @@
+/**
+ * clock.h
+ *
+ * A GTK+ widget that implements a clock face
+ *
+ * (c) 2007, Peter Teichman
+ * (c) 2005-2006, Davyd Madeley
+ *
+ * Authors:
+ * Davyd Madeley <[email protected]>
+ * Peter Teichman <[email protected]>
+ */
+
+#ifndef __INTL_CLOCK_FACE_H__
+#define __INTL_CLOCK_FACE_H__
+
+#include <gtk/gtk.h>
+#include "clock-location.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define INTL_TYPE_CLOCK_FACE (clock_face_get_type ())
+#define CLOCK_FACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), INTL_TYPE_CLOCK_FACE, ClockFace))
+#define CLOCK_FACE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), INTL_CLOCK_FACE, ClockFaceClass))
+#define INTL_IS_CLOCK_FACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INTL_TYPE_CLOCK_FACE))
+#define INTL_IS_CLOCK_FACE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), INTL_TYPE_CLOCK_FACE))
+#define CLOCK_FACE_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), INTL_TYPE_CLOCK_FACE, ClockFaceClass))
+
+typedef struct _ClockFace ClockFace;
+typedef struct _ClockFaceClass ClockFaceClass;
+
+struct _ClockFace
+{
+ GtkWidget parent;
+
+ /* < private > */
+};
+
+struct _ClockFaceClass
+{
+ GtkWidgetClass parent_class;
+};
+
+typedef enum {
+ CLOCK_FACE_SMALL,
+ CLOCK_FACE_LARGE
+} ClockFaceSize;
+
+GType clock_face_get_type (void);
+
+GtkWidget *clock_face_new (ClockFaceSize size);
+GtkWidget *clock_face_new_with_location (ClockFaceSize size,
+ ClockLocation *loc,
+ GtkWidget *size_widget);
+gboolean clock_face_refresh (ClockFace *this);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/applets/clock/clock-location-tile.c b/applet