debian/0000775000000000000000000000000012300420705007161 5ustar debian/copyright0000664000000000000000000000305212300401760011114 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: evolution-indicator Upstream-Contact: Canonical Ltd. Source: http://launchpad.net/evolution-indicator Files: * License: GPL-3 Copyright: 2009, Canonical Ltd. Files: src/xutils.* License: LGPL-2+ Copyright: 2001, Havoc Pennington License: GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". License: LGPL-2+ 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 Lesser General Public License for more details. . On Debian systems, the complete text of the GNU Lesser General Public Licence can be found in `/usr/share/common-licenses/LGPL-2.1' debian/changelog0000664000000000000000000003324012300420610011030 0ustar evolution-indicator (0.2.20-0ubuntu15) trusty; urgency=medium * debian/patches/evolution-indicator-eds3.6_v2.patch: - don't try to free a static string (lp: #1272469) -- Sebastien Bacher Mon, 17 Feb 2014 15:49:42 +0100 evolution-indicator (0.2.20-0ubuntu13) trusty; urgency=medium * debian/patches/evolution-indicator-eds3.6_v2.patch: - use correct GList type, should fix segfault issues, thanks Xavier Claessens (lp: #1194005) [ Iain Lane ] * Build-Depend on evolution 3.10 -- Sebastien Bacher Mon, 03 Feb 2014 16:28:00 +0000 evolution-indicator (0.2.20-0ubuntu12) trusty; urgency=low * debian/patches/eds-3.10: Remove include of es-event.h, which went away with 3.10 and isn't used anyway. -- Iain Lane Wed, 13 Nov 2013 13:15:04 +0000 evolution-indicator (0.2.20-0ubuntu11) saucy; urgency=low * debian/patches/eds-3.8, debian/control: EDS 3.8 fixes - BD on libecal and check for it in configure.ac. Include the right header. -- Iain Lane Wed, 29 May 2013 16:16:20 +0100 evolution-indicator (0.2.20-0ubuntu10) raring; urgency=low * Drop libindicate-dev, replaced by libmessaging-menu-dev in the previous upload. * Bump standards version, no changes needed. * Add patch description to 01_* patch. -- Dmitrijs Ledkovs Sun, 24 Mar 2013 22:19:01 +0000 evolution-indicator (0.2.20-0ubuntu9) raring; urgency=low * debian/patches/evolution-indicator-eds3.6_v2.patch: port to EDS 3.6 and port to use libmessaging-menu. (LP: #1051882) * debian/control: - add libmessaging-menu-dev to Build-Depends. - switch to debhelper 9. - remove Build-Depends on cdbs. * debian/compat: bump compat level to 9. * debian/rules: - migrate to dh sequencer. * debian/source/format: switch to source format 3.0 (quilt) * debian/patches/series: added, use quilt for patches. * debian/copyright: update and clarify copyright, migrate to DEP-5 format. * debian/patches/add_copying_lgpl_license.patch: add COPYING.LGPL. -- Mathieu Trudel-Lapierre Wed, 05 Dec 2012 16:16:49 -0500 evolution-indicator (0.2.20-0ubuntu8) quantal; urgency=low * debian/control - added build depends for libebackend1.2-dev, libcamel1.2-dev, and libsoup2.4-dev - bumped build depends for evolution-dev to >= 3.4 * debian/patches/02_evo_3_4_build_fixes.patch - ported to the evolution-3.4 APIs * debian/patches/indicate_0_7.patch - merged upstream -- Ken VanDine Fri, 25 May 2012 17:02:25 -0400 evolution-indicator (0.2.20-0ubuntu7) precise; urgency=low * debian/control - bumped build depends for libindicate-dev to 0.6.90 * debian/patches/indicate_0_7.patch - pkgconfig fixes for indicate-0.7 -- Ken VanDine Fri, 10 Feb 2012 14:22:48 -0500 evolution-indicator (0.2.20-0ubuntu6) precise; urgency=low * debian/control - Bump build depends for libunity-dev -- Ken VanDine Fri, 13 Jan 2012 09:43:53 +0100 evolution-indicator (0.2.20-0ubuntu5) precise; urgency=low * Change libgtkhtml-editor-dev (>=4.0) build dependency to libgtkhtml-editor-4.0-dev since libgtkhtml-editor-dev pulls in gtkhtml3.14 due to our epoch; This is basically a no change rebuild since libgtkhtml-editor-4.0-dev is already being pulled in through evolution-dev, but will allow gtkhtml3.14 to fall out of main - update debian/control -- Micah Gersten Fri, 23 Dec 2011 03:00:03 -0600 evolution-indicator (0.2.20-0ubuntu4) precise; urgency=low * debian/control - depend on evolution so evolution-indicator will get removed if evolution is uninstalled (LP: #663988) -- Ken VanDine Tue, 13 Dec 2011 09:59:18 -0500 evolution-indicator (0.2.20-0ubuntu3) oneiric; urgency=low * No change rebuild against latest libcamel -- Ken VanDine Tue, 27 Sep 2011 09:27:59 -0400 evolution-indicator (0.2.20-0ubuntu2) oneiric; urgency=low * No change rebuild with the new libunity -- Sebastien Bacher Fri, 09 Sep 2011 15:37:16 +0200 evolution-indicator (0.2.20-0ubuntu1) oneiric; urgency=low * New upstream release, fix an untranslatable string bug (lp: #437963) -- Sebastien Bacher Fri, 09 Sep 2011 11:27:29 +0200 evolution-indicator (0.2.18-0ubuntu2) oneiric; urgency=low * No-change rebuild against libcamel-1.2-29. -- Martin Pitt Fri, 09 Sep 2011 07:24:34 +0200 evolution-indicator (0.2.18-0ubuntu1) oneiric; urgency=low * New upstream release. - build against indicate-0.6 (LP: #829461) -- Ken VanDine Tue, 23 Aug 2011 22:20:31 -0400 evolution-indicator (0.2.17-0ubuntu1) oneiric; urgency=low * New upstream release. - Use new API for EMEventTargetFolder to retrieve account URI (LP: #803339) -- Mathieu Trudel-Lapierre Wed, 29 Jun 2011 05:12:53 -0400 evolution-indicator (0.2.16-0ubuntu1) oneiric; urgency=low * New upstream release. * debian/control: - Build with evolution 3.0 stack -- Rodrigo Moya Fri, 27 May 2011 15:28:01 +0200 evolution-indicator (0.2.14-0ubuntu4) natty; urgency=low * Rebuild against latest libunity (soname bump) -- Didier Roche Thu, 07 Apr 2011 12:27:59 +0200 evolution-indicator (0.2.14-0ubuntu3) natty; urgency=low * debian/control - Change build depends back to libnotify-dev * src/evolution-indicator.c - Don't use libnotify >= 0.7.0, the plugins need to use the same libnotify as evolution does (LP: #725102) -- Ken VanDine Fri, 25 Feb 2011 13:19:36 -0500 evolution-indicator (0.2.14-0ubuntu2) natty; urgency=low * src/evolution-indicator.c - Added unread counter to the unity launcher * src/evolution-indicator.c - simplify and fix handling POP accounts. Setting a POP account to IMAP and back to POP would cause evolution to crash (LP: #643321) -- Ken VanDine Thu, 24 Feb 2011 00:04:38 -0500 evolution-indicator (0.2.14-0ubuntu1) natty; urgency=low [ Ted Gould ] * New upstream release. * Port to new libindicate [ Ken VanDine ] * debian/control - Bump build depends for libindicate >= 0.4.91 -- Ken VanDine Fri, 14 Jan 2011 15:05:28 -0600 evolution-indicator (0.2.12-0ubuntu1) natty; urgency=low * New upstream release: - adapt to evolution 2.32 - remove deprecated symbols (LP: #655937) -- Didier Roche Tue, 23 Nov 2010 15:30:48 +0100 evolution-indicator (0.2.10-0ubuntu1) maverick; urgency=low * New upstream release: - Work with evolution 2.30.2 (Francesco Marella) * debian/patches/01_no_debug_spamming.patch: - refreshed -- Didier Roche Tue, 22 Jun 2010 15:32:35 +0200 evolution-indicator (0.2.8-0ubuntu1) lucid; urgency=low * Upstream release * Fix ngettext syntax that was causing incorrect translations (LP: #549768) -- Ted Gould Tue, 30 Mar 2010 13:36:57 -0500 evolution-indicator (0.2.7-0ubuntu2) lucid; urgency=low * debian/patches/01_no_debug_spamming.patch: - don't spam the session log with g_debug calls -- Sebastien Bacher Tue, 23 Mar 2010 03:04:20 +0100 evolution-indicator (0.2.7-0ubuntu1) lucid; urgency=low * Upstream Release 0.2.7 * Update to newer libindicate signaling * Add in dynamic command items. * debian/control: No depending on libindicate 0.3.0 or higher. -- Ted Gould Thu, 04 Mar 2010 11:28:52 -0600 evolution-indicator (0.2.6-0ubuntu3) lucid; urgency=low * Rebuild to get the new gtkhtml shlib -- Sebastien Bacher Mon, 25 Jan 2010 18:46:43 +0100 evolution-indicator (0.2.6-0ubuntu2) lucid; urgency=low * debian/patches/launcher_path.patch: - dropped the change is in the new version -- Sebastien Bacher Thu, 21 Jan 2010 22:57:52 +0100 evolution-indicator (0.2.6-0ubuntu1) lucid; urgency=low * New upstream version -- Sebastien Bacher Thu, 21 Jan 2010 22:21:09 +0100 evolution-indicator (0.2.4-0ubuntu6) lucid; urgency=low * debian/patches/launcher_path.patch - Fixed path to evolution.desktop, it moved -- Ken VanDine Thu, 17 Dec 2009 10:00:11 -0500 evolution-indicator (0.2.4-0ubuntu5) lucid; urgency=low * debian/rules: - use the upstream evolution desktop entry there [ Ken VanDine ] * debian/preinst: - fixed the version compare to be friendly on new installs -- Sebastien Bacher Thu, 17 Dec 2009 10:56:28 +0100 evolution-indicator (0.2.4-0ubuntu4) karmic-proposed; urgency=low * debian/rules: use simple-patchsys.mk so the previous change does something -- Sebastien Bacher Wed, 02 Dec 2009 10:03:08 +0100 evolution-indicator (0.2.4-0ubuntu3) karmic-proposed; urgency=low * debian/patches/01_fix_pop3_notifications.patch - Pull revision 55 from trunk to fix notifications for POP3 accounts by adding a indicator for the default Inbox. (LP: #436755) -- Neil J. Patel Fri, 20 Nov 2009 08:23:06 -0600 evolution-indicator (0.2.4-0ubuntu2) karmic; urgency=low * debian/rules: - Moved the indicator launcher to /usr/share (LP: #434097) * debian/postinst: - remove the old indicator from /etc and remove the directory if it is empty -- Ken VanDine Thu, 24 Sep 2009 15:14:30 -0400 evolution-indicator (0.2.4-0ubuntu1) karmic; urgency=low * New upstream version: - don't list the accounts which are not active or not configured to receive (lp: #427501, #427504) -- Sebastien Bacher Thu, 17 Sep 2009 16:24:41 +0200 evolution-indicator (0.2.2-0ubuntu1) karmic; urgency=low * Relayout preferences to match MessagingMenu spec (LP: #427433) - Needed to change the way we capitalise the labels to match the spec -- Neil J. Patel Thu, 10 Sep 2009 18:05:30 +0100 evolution-indicator (0.2.0-0ubuntu2) karmic; urgency=low * debian/rules: - Add evolution-mail launcher to the indicator (LP: #424478) -- Ken VanDine Thu, 10 Sep 2009 14:46:21 -0400 evolution-indicator (0.2.0-0ubuntu1) karmic; urgency=low * New Upstream release (LP: #427396) - debian/control: - Change branch owner in Vcs-Bzr to ~ubuntu-desktop - Added Standards-Version [ Neil J. Patel ] * Bump required version of libindicate to >= 0.2.0 * Support for libindicate 0.2.0 * Updated preferences -- Ken VanDine Thu, 10 Sep 2009 11:21:17 -0400 evolution-indicator (0.1.16-0ubuntu1) karmic; urgency=low * Upstream 0.1.16 (LP: #375443) * Fix build for Karmic (LP: #390360) * debian/control, updating build depends for evolution reshuffling done in Karmic. -- Ted Gould Tue, 04 Aug 2009 18:22:11 +0100 evolution-indicator (0.1.15-0ubuntu1) karmic; urgency=low * Upstream release 0.1.15: Brown paper bag. Missing a '!' in previous release. Now really fixes LP: #359658 * Upstream release 0.1.14: Change to g_strcmp0 to check for a NULL string and not crash when getting it. LP: #359658 -- Ted Gould Mon, 11 May 2009 08:20:11 +0200 evolution-indicator (0.1.13-0ubuntu1) jaunty; urgency=low * New upstream version. * Updating patch to fix internationalization issues so that Evolution translations work along with the indicator's. LP: #352657 -- Ted Gould Tue, 07 Apr 2009 11:06:47 -0500 evolution-indicator (0.1.12-0ubuntu1) jaunty; urgency=low * New upstream version. * Patch from Neil Patel to fix LP: #342429 that looks to X to figure out if an Evolution window is open before sending notifications. * Patch from Timo Jyrinki which fixes LP: #352657 where the plugin was using the wrong gettext domain. -- Ted Gould Mon, 06 Apr 2009 12:09:23 -0500 evolution-indicator (0.1.11-0ubuntu1) jaunty; urgency=low * New upstream version. Makes it so that notifications aren't sent if the Evolution windows have focus. (LP: #342429) -- Ted Gould Thu, 19 Mar 2009 13:11:45 +0100 evolution-indicator (0.1.10-0ubuntu1) jaunty; urgency=low [ Ted Gould ] * New upstream version. - Corrects icon (LP: #337304) - Build fixes to get full distcheck - Counts IDs correctly to remove warnings from applet [ Martin Pitt ] * Add debian/watch. * Add bzr-builddeb configuration (merge mode). Fortunately this doesn't insist on having *only* debian/ in bzr. This gives us the best of both worlds, bzd-bd auto-downloading orig.tar.gz and merging in the pre-generated autoconf stuff, and retaining the possibility of merging directly from trunk, since we keep the full upstream source in this branch. -- Martin Pitt Tue, 17 Mar 2009 10:45:47 +0100 evolution-indicator (0.1.9-0ubuntu1) jaunty; urgency=low * Initial release, based on DX team's PPA packaging branch. (lp:~indicator-applet-developers/evolution-indicator/packaging) * debian/control: Add Homepage:, Vcs-Bzr:, and fix package description. * debian/copyright: Properly describe license and clean up some boilerplate. * debian/rules: Drop some unused cdbs includes. * debian/rules: Remove .a/.la clutter (should be fixed upstream eventually). * debian/rules: Do not generate maintainer script snippets with ldconfig. -- Martin Pitt Tue, 17 Feb 2009 12:58:22 +0100 debian/rules0000775000000000000000000000103312300401760010236 0ustar #!/usr/bin/make -f %: dh $@ --with autoreconf override_dh_makeshlibs: dh_makeshlibs -X* override_dh_auto_install: dh_auto_install # remove .a/.la clutter rm -f debian/evolution-indicator/usr/lib/evolution/*/plugins/*.a rm -f debian/evolution-indicator/usr/lib/evolution/*/plugins/*.la # Add the launcher for evolution mkdir -p debian/evolution-indicator/usr/share/indicators/messages/applications echo /usr/share/applications/evolution.desktop > debian/evolution-indicator/usr/share/indicators/messages/applications/evolution debian/source/0000775000000000000000000000000012300420703010457 5ustar debian/source/format0000664000000000000000000000001412300401760011667 0ustar 3.0 (quilt) debian/source/include-binaries0000664000000000000000000000005312300401760013617 0ustar evolution-indicator-build-deps_1.0_all.deb debian/control0000664000000000000000000000246012300401760010566 0ustar Source: evolution-indicator Section: gnome Priority: extra Maintainer: Ubuntu Core Developers Build-Depends: debhelper (>= 9), autotools-dev, gnome-pkg-tools (>= 0.10), libglib2.0-dev (>= 2.15.5), libpango1.0-dev (>= 1.18.0), libgtk-3-dev (>= 2.10.0), libgconf2-dev (>= 2.16.0), libcairo2-dev (>= 1.2.4), libdbus-1-dev (>= 1.0), libdbus-glib-1-dev (>= 0.7), evolution-dev (>= 3.10), evolution-data-server-dev (>= 3.10), libnotify-dev, libcanberra-dev, libgtkhtml-editor-4.0-dev, libgtkhtml-4.0-dev, libebook1.2-dev, libecal1.2-dev (>= 3.8), libebackend1.2-dev, libcamel1.2-dev (>= 3.4), libsoup2.4-dev, libunity-dev (>= 5.0.0), libmessaging-menu-dev, dh-autoreconf Standards-Version: 3.9.4 Homepage: https://launchpad.net/evolution-indicator Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-desktop/evolution-indicator/ubuntu Package: evolution-indicator Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, evolution Description: GNOME panel indicator applet for Evolution indicator-applet is an applet to display information from various applications consistently in the GNOME panel. . This package provides a plugin for Evolution that uses libindicate and libnotify to provide additional information about Evolution's state. debian/compat0000664000000000000000000000000212300401760010357 0ustar 9 debian/watch0000664000000000000000000000014712300401760010214 0ustar version=3 http://launchpad.net/evolution-indicator/+download .*/evolution-indicator-([0-9.]+)\.tar\.gz debian/docs0000664000000000000000000000002412300401760010030 0ustar AUTHORS README TODO debian/preinst0000664000000000000000000000047312300401760010574 0ustar #!/bin/sh -e case $1 in install|upgrade) if dpkg --compare-versions "$2" lt-nl "0.2.4-0ubuntu1"; then rm "/etc/indicators/messages/applications/evolution" || true rmdir --ignore-fail-on-non-empty "/etc/indicators/messages/applications/" || true fi ;; esac #DEBHELPER# debian/patches/0000775000000000000000000000000012300420703010606 5ustar debian/patches/02_evo_3_4_build_fixes.patch0000664000000000000000000001035512300401760015751 0ustar === modified file 'configure.ac' --- old/configure.ac 2011-09-09 08:45:39 +0000 +++ new/configure.ac 2012-05-25 20:04:30 +0000 @@ -70,7 +70,7 @@ AC_SUBST(GCC_FLAGS) PKG_CHECK_MODULES(DEPS, - indicate-0.6 >= 0.5.90 + indicate-0.7 >= 0.6.90 $EVOLUTION_PLUGIN dbus-1 dbus-glib-1 @@ -78,6 +78,9 @@ libcanberra $GTKHTML_EDITOR unity + libebackend-1.2 + libsoup-2.4 + gconf-2.0 ) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) === modified file 'po/Makefile.in.in' --- old/po/Makefile.in.in 2009-11-19 18:51:08 +0000 +++ new/po/Makefile.in.in 2012-05-25 20:27:00 +0000 @@ -49,8 +49,8 @@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot +MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist +GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ @@ -73,15 +73,20 @@ .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V)) +INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) +INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@; + .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: - $(MSGFMT) -o $@ $< + $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $< .po.gmo: - file=`echo $* | sed 's,.*/,,'`.gmo \ + $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: === modified file 'src/evolution-indicator.c' --- old/src/evolution-indicator.c 2011-06-28 22:10:50 +0000 +++ new/src/evolution-indicator.c 2012-05-25 20:47:06 +0000 @@ -42,6 +42,8 @@ #include #include +#include + #include #include #include @@ -142,7 +144,6 @@ static GdkWindow *root = NULL; gboolean res = FALSE; Window xwindow; - GList *list; EShell *evo_shell; EShellWindow *shell_window; @@ -180,16 +181,9 @@ } evo_shell = e_shell_get_default (); - list = e_shell_get_watched_windows (evo_shell); - - /* Find the first EShellWindow in the list. */ - while (list != NULL && !E_IS_SHELL_WINDOW (list->data)) - list = g_list_next (list); - - g_return_if_fail (list != NULL); /* Get the shell window. */ - shell_window = E_SHELL_WINDOW (list->data); + shell_window = E_SHELL_WINDOW (e_shell_get_active_window (evo_shell)); if (GTK_IS_WINDOW (shell_window)) { @@ -228,10 +222,13 @@ org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t) { gchar *url; + CamelURL *service_url; g_return_if_fail (t != NULL); - url = camel_service_get_url (CAMEL_SERVICE (t->store)); + service_url = camel_service_new_camel_url (CAMEL_SERVICE (t->store)); + url = camel_url_to_string (service_url, 0); + camel_url_free (service_url); if (!t->new) return; @@ -1008,22 +1005,13 @@ if (shell) { GSList *i; - GList *list; - GtkWindow *mail_window = NULL; EShellWindow *shell_window; EShellView *shell_view; GtkAction *action; - list = e_shell_get_watched_windows (shell); - - /* Find the first EShellWindow in the list. */ - while (list != NULL && !E_IS_SHELL_WINDOW (list->data)) - list = g_list_next (list); - - g_return_if_fail (list != NULL); /* Present the shell window. */ - shell_window = E_SHELL_WINDOW (list->data); + shell_window = E_SHELL_WINDOW (e_shell_get_active_window (shell)); if (!evolution_is_focused ()) { gtk_window_present_with_time (GTK_WINDOW (shell_window), timestamp); debian/patches/series0000664000000000000000000000021412300401760012022 0ustar 01_no_debug_spamming.patch 02_evo_3_4_build_fixes.patch evolution-indicator-eds3.6_v2.patch add_copying_lgpl_license.patch eds-3.8 eds-3.10 debian/patches/eds-3.80000664000000000000000000000154112300401760011615 0ustar Description: Depend on libecal and include the right header for eds 3.8 Author: Iain Lane Index: b/configure.ac =================================================================== --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,7 @@ $GTKHTML_EDITOR unity libebackend-1.2 + libecal-1.2 libsoup-2.4 gconf-2.0 messaging-menu Index: b/src/evolution-indicator.c =================================================================== --- a/src/evolution-indicator.c +++ b/src/evolution-indicator.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include debian/patches/add_copying_lgpl_license.patch0000664000000000000000000006274012300401760016642 0ustar Description: Add COPYING.LGPL. Author: Mathieu Trudel-Lapierre Bug-Ubuntu: https://bugs.launchpad.net/bugs/1051882 --- /dev/null +++ evolution-indicator-0.2.20/COPYING.LGPL @@ -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. + + + Copyright (C) + + 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. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! debian/patches/evolution-indicator-eds3.6_v2.patch0000664000000000000000000005056312300402352017245 0ustar From: Sébastien Noel Subject: Port to EDS 3.6 API and to use libmessaging-menu. --- configure.ac | 2 src/evolution-indicator.c | 392 +++++++++++----------------------------------- 2 files changed, 102 insertions(+), 292 deletions(-) Index: ubuntu/configure.ac =================================================================== --- ubuntu.orig/configure.ac 2014-02-17 13:46:27.693945217 +0100 +++ ubuntu/configure.ac 2014-02-17 13:46:55.000000000 +0100 @@ -70,7 +70,6 @@ AC_SUBST(GCC_FLAGS) PKG_CHECK_MODULES(DEPS, - indicate-0.7 >= 0.6.90 $EVOLUTION_PLUGIN dbus-1 dbus-glib-1 @@ -81,6 +80,7 @@ libebackend-1.2 libsoup-2.4 gconf-2.0 + messaging-menu ) AC_SUBST(DEPS_CFLAGS) AC_SUBST(DEPS_LIBS) Index: ubuntu/src/evolution-indicator.c =================================================================== --- ubuntu.orig/src/evolution-indicator.c 2014-02-17 13:46:27.693945217 +0100 +++ ubuntu/src/evolution-indicator.c 2014-02-17 13:47:15.581946811 +0100 @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -44,9 +45,7 @@ #include -#include -#include -#include +#include #include @@ -58,9 +57,6 @@ #define SHOW_BUBBLE CONF_DIR"/show_bubble" #define SHOW_NEW_IN_PANEL CONF_DIR"/show_new_messages_in_panel" -#define ACCOUNT_DIR "/apps/evolution/mail" -#define ACCOUNTS ACCOUNT_DIR"/accounts" - #define EVOLUTION_DESKTOP_FILE "/usr/share/applications/evolution.desktop" #define UNREAD_DATA "unread" @@ -71,7 +67,7 @@ static GStaticMutex mlock = G_STATIC_MUTEX_INIT; static GConfClient *client = NULL; -static IndicateServer *server = NULL; +static MessagingMenuApp *mmapp = NULL; static GSList *indicators = NULL; static gint n_accounts = 0; @@ -91,7 +87,6 @@ static guint play_sound_id = 0; static guint show_bubble_id = 0; static guint show_count_id = 0; -static guint accounts_id = 0; static gint message_count = 0; @@ -101,29 +96,11 @@ int e_plugin_lib_enable (EPlugin *ep, int enable); GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *ep); -static void show_evolution (gpointer arg0, guint timestamp, gpointer arg1); +static void show_evolution (MessagingMenuApp *mmapp, const gchar *url, gpointer user_data); static void show_evolution_in_indicator_applet (void); static void hide_evolution_in_indicator_applet (void); -typedef struct { - gchar *url; - gchar *name; - gchar *parent; - gchar *last_parent; - - gint reap_type; - - gboolean enabled; - -} ParserData; - -enum { - REAP_NONE = 0, - REAP_URL, - REAP_NAME -}; - static GtkWidget * get_cfg_widget (void) { @@ -195,29 +172,6 @@ return FALSE; } -static gint -get_indicator_unread_count (IndicateIndicator *indicator) -{ - return GPOINTER_TO_INT (g_object_get_data (G_OBJECT (indicator), - UNREAD_DATA)); -} - -static void -set_indicator_unread_count (IndicateIndicator *indicator, gint count) -{ - gchar *count_str; - - count_str = g_strdup_printf ("%d", count); - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_COUNT, - count_str); - g_object_set_data (G_OBJECT (indicator), - UNREAD_DATA, - GINT_TO_POINTER (count)); - - g_free (count_str); -} - void org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t) { @@ -240,50 +194,29 @@ } if (evolution_is_focused ()) -{ + { g_debug ("EI: Evolution is focused"); return; } - g_static_mutex_lock (&mlock); + g_static_mutex_lock (&mlock); g_debug ("EI:mail_new_notify: %s", url); message_count += t->new; - + if (show_count) { - IndicateIndicator *indicator = NULL; - GSList *i; - - for (i = indicators; i; i = i->next) - { - IndicateIndicator *indi = i->data; - - if (g_strstr_len (url, - -1, - indicate_indicator_get_property (indi, "url"))) - { - indicator = indi; - break; - } - } - if (indicator) + if (messaging_menu_app_has_source(MESSAGING_MENU_APP (mmapp), url)) { - gint count; - - count = get_indicator_unread_count (indicator); - set_indicator_unread_count (indicator, count + t->new); - - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, - "true"); + messaging_menu_app_set_source_count (MESSAGING_MENU_APP (mmapp), url, message_count); } - else - { - g_warning ("EI: Unable to find account that matches %s", url); + else { +// g_warning ("EI: Unable to find account that matches %s", url); + messaging_menu_app_append_source_with_count (MESSAGING_MENU_APP (mmapp), url, NULL, camel_service_get_display_name(CAMEL_SERVICE (t->store)), message_count); } - } + messaging_menu_app_draw_attention (MESSAGING_MENU_APP (mmapp), url); + } update_unity_launcher_count (); @@ -356,16 +289,17 @@ for (i = indicators; i; i = i->next) { - IndicateIndicator *indicator = i->data; - - set_indicator_unread_count (indicator, 0); - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, - "false"); - - g_debug ("EI: Setting %s to 0 unread messages", - indicate_indicator_get_property (indicator, "name")); + gchar *url = i->data; + if (messaging_menu_app_has_source(MESSAGING_MENU_APP (mmapp), url)) + { + messaging_menu_app_remove_attention(MESSAGING_MENU_APP (mmapp), url); + messaging_menu_app_set_source_count (MESSAGING_MENU_APP (mmapp), url, 0); + g_debug ("EI: Setting %s to 0 unread messages", url); + } + else { + g_warning ("EI: Unable to find account that matches %s", url); + } } message_count = 0; @@ -377,22 +311,10 @@ void update_unity_launcher_count () { - GSList *i; - int count = 0; - g_debug ("EI: update_unity_launcher_count"); - for (i = indicators; i; i = i->next) - { - IndicateIndicator *indicator = i->data; - - count = count + get_indicator_unread_count (indicator); - - g_debug ("EI: Setting count to %d unread messages", count); - - } - unity_launcher_entry_set_count (launcher, count); - if (count > 0) + unity_launcher_entry_set_count (launcher, message_count); + if (message_count > 0) { unity_launcher_entry_set_count_visible (launcher, TRUE); } else { @@ -447,12 +369,10 @@ if (show_count) { - indicate_server_show (server); show_evolution_in_indicator_applet (); } else { - indicate_server_hide (server); hide_evolution_in_indicator_applet (); } @@ -475,130 +395,34 @@ g_debug ("EI: Show Bubbles %s", show_bubble ? "true" : "false"); } -static IndicateIndicator * -find_indicator_for_url (GSList *indicator_list, const gchar *url) +static gchar * +find_indicator_url (GSList *indicator_list, const gchar *url) { GSList *i; for (i = indicator_list; i; i = i->next) { - IndicateIndicator *indicator = i->data; + gchar *i_url = i->data; - if (g_strcmp0 (indicate_indicator_get_property (indicator, "url"), url) + if (g_strcmp0 (i_url, url) == 0) - return indicator; + return i_url; } return NULL; } -static IndicateIndicator * -create_indicator (const gchar *url, const gchar *name) -{ - IndicateIndicator *indicator; - - indicator = indicate_indicator_new (); - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_NAME, - name); - indicate_indicator_set_property (indicator, - "url", - url); - set_indicator_unread_count (indicator, 0); - indicate_indicator_show (indicator); - - /* FIXME: I need to find a way to show a mailbox individually */ - g_signal_connect (indicator, "user-display", - G_CALLBACK (show_evolution), NULL); - - g_debug ("EI: New Indicator: %s %s", name, url); - - return indicator; -} - -static void -start_element_handler (GMarkupParseContext *context, - const gchar *element_name, - const gchar **attribute_names, - const gchar **attribute_values, - gpointer user_data, - GError **error) -{ - ParserData *data = (ParserData *)user_data; - - if (g_strcmp0 (element_name, "account") == 0) - { - gint i = 0; - - while (attribute_names[i] != NULL) - { - if (g_strcmp0 (attribute_names[i], "name") == 0) - { - data->name = g_strdup (attribute_values[i]); - } - else if (g_strcmp0 (attribute_names[i], "enabled") == 0) - { - if (g_strcmp0 (attribute_values[i], "false") == 0) - data->enabled = FALSE; - } - i++; - } - } - else if (g_strcmp0 (element_name, "url") == 0) - data->reap_type = REAP_URL; - else - data->reap_type = REAP_NONE; - - if (data->last_parent) - g_free (data->last_parent); - - data->last_parent = data->parent; - data->parent = g_strdup (element_name); -} - -static void -text_handler (GMarkupParseContext *context, - const gchar *text, - gsize text_len, - gpointer user_data, - GError **error) -{ - ParserData *data = (ParserData *)user_data; - - if (!data->url - && data->reap_type == REAP_URL - && g_strcmp0(data->last_parent, "source") == 0) - { - gchar **tokens; - - tokens = g_strsplit (text, ";", 2); - - data->url = g_strdup (tokens[0]); - - /* Accounts with no configured way to receive mail will not have a URL */ - if (!data->url) - data->enabled = FALSE; - - g_strfreev (tokens); - } -} - static void update_accounts (void) { - GSList *accounts; + ESourceRegistry * registry = NULL; GError *error = NULL; - gint i = 1; - GTimeVal timeval = { 0 }; - - g_get_current_time (&timeval); - accounts = gconf_client_get_list (client, - ACCOUNTS, - GCONF_VALUE_STRING, - &error); - if (accounts == NULL || error) + + registry = e_source_registry_new_sync (NULL, &error); + + if (!registry || error) { - g_warning ("EI: Unable to determine number of accounts, " - "defaulting to '1' (%s)", + g_warning ("Failed to get access to source registry: %s\n" + "defaulting number of account to '1'", error ? error->message : "unknown"); if (error) g_error_free (error); @@ -610,84 +434,76 @@ } else { + GList *accounts = e_source_registry_list_sources (registry, E_SOURCE_EXTENSION_MAIL_ACCOUNT); GSList *old_list; - GSList *a; - static GMarkupParser parser = { - start_element_handler, - NULL, - text_handler, - NULL, - NULL - }; + GList *a; + struct accountData { + gchar *name; + gchar *protocol; + gchar *user; + gchar *host; + guint16 port; + gchar *url; + } data; old_list = indicators; indicators = NULL; for (a = accounts; a; a = a->next) { - gchar *account_info = a->data; - GMarkupParseContext *context; - ParserData data = { NULL, NULL, NULL, NULL, 0, TRUE }; - IndicateIndicator *indicator; - - /* Parse account XML to get some useful details about the account */ - context = g_markup_parse_context_new (&parser, 0, &data, NULL); - g_markup_parse_context_parse (context, - account_info, - strlen (account_info), - NULL); + gchar *url; + ESource *source = E_SOURCE (a->data); + if (e_source_get_removable(source) && e_source_get_enabled(source)) + { + ESourceExtension *extension; + + extension = e_source_get_extension(source, E_SOURCE_EXTENSION_MAIL_ACCOUNT); + data.protocol = e_source_backend_dup_backend_name ((ESourceBackend *)extension); + extension = e_source_get_extension(source, E_SOURCE_EXTENSION_AUTHENTICATION); + data.user = e_source_authentication_dup_user ((ESourceAuthentication *)extension); + data.host = e_source_authentication_dup_host ((ESourceAuthentication *)extension); + data.port = e_source_authentication_get_port ((ESourceAuthentication *)extension); + + if(g_str_has_prefix (data.protocol, "pop")) { + data.name = g_strdup (g_dgettext (EVO_I18N_DOMAIN, "Inbox")); + data.url = g_strdup_printf("%s", "pop:"); + } else { + data.name = e_source_dup_display_name(source); + data.url = g_strdup_printf("%s://%s@%s:%d", data.protocol, g_uri_escape_string(data.user, NULL, FALSE), data.host, data.port); + } /* Check to see account already exists and, if not, create it */ - indicator = find_indicator_for_url (indicators, data.url); - if (indicator) + url = find_indicator_url (indicators, data.url); + if (url) { - old_list = g_slist_remove (old_list, indicator); - indicators = g_slist_append (indicators, indicator); + old_list = g_slist_remove (old_list, url); + indicators = g_slist_append (indicators, url); } else { - if (data.url && g_str_has_prefix (data.url, "pop:")) - { - indicator = create_indicator ("pop:", - g_dgettext (EVO_I18N_DOMAIN, - "Inbox")); - } - else - { - indicator = create_indicator (data.url, data.name); - } - indicators = g_slist_append (indicators, indicator); - + messaging_menu_app_append_source (MESSAGING_MENU_APP (mmapp), data.url, NULL, data.name); + indicators = g_slist_append (indicators, g_strdup(data.url)); g_debug ("EI: New account: %s (%s)", data.name, data.url); } - if (!data.enabled) - indicate_indicator_hide (indicator); - - /* Fake a time */ - g_time_val_add (&timeval, -1000000 * 60 * i); - indicate_indicator_set_property_time (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_TIME, - &timeval); - - i++; + messaging_menu_app_set_source_time (MESSAGING_MENU_APP (mmapp), + data.url, g_get_real_time ()); /* Clean up */ g_free (data.url); g_free (data.name); - g_free (data.parent); - g_free (data.last_parent); - data.reap_type = REAP_NONE; - data.enabled = TRUE; - - g_markup_parse_context_free (context); + g_free (data.protocol); + g_free (data.user); + g_free (data.host); + + } } g_slist_foreach (old_list, (GFunc)g_object_unref, NULL); g_slist_free (old_list); - n_accounts = g_slist_length (accounts); - g_slist_free (accounts); + n_accounts = g_slist_length (indicators); + g_list_free_full (accounts, g_object_unref); } g_debug ("EI: Number of email accounts: %d", n_accounts); @@ -756,11 +572,9 @@ } } - server = indicate_server_ref_default (); - indicate_server_set_type (server, "message"); - indicate_server_set_desktop_file (server, EVOLUTION_DESKTOP_FILE); - g_signal_connect (server, "server-display", - G_CALLBACK (show_evolution), NULL); + mmapp = messaging_menu_app_new ("evolution.desktop"); + messaging_menu_app_register (MESSAGING_MENU_APP (mmapp)); + g_signal_connect (mmapp, "activate-source", G_CALLBACK (show_evolution), NULL); DbusmenuServer * menu_server = dbusmenu_server_new("/messaging/commands"); DbusmenuMenuitem * root = dbusmenu_menuitem_new(); @@ -776,7 +590,6 @@ dbusmenu_menuitem_child_append(root, mi); dbusmenu_server_set_root(menu_server, root); - indicate_server_set_menu(server, menu_server); launcher = unity_launcher_entry_get_for_desktop_file (EVOLUTION_DESKTOP_FILE); @@ -805,20 +618,20 @@ show_count_id = gconf_client_notify_add (client, SHOW_NEW_IN_PANEL, show_new_in_panel_changed, NULL, NULL, NULL); - gconf_client_add_dir (client, ACCOUNT_DIR,GCONF_CLIENT_PRELOAD_NONE, NULL); update_accounts (); +/* + TODO: find a way to be notify on account update accounts_id = gconf_client_notify_add (client, ACCOUNTS, on_accounts_changed, NULL, NULL, NULL); +*/ if (show_count) { - indicate_server_show (server); show_evolution_in_indicator_applet (); } else { - indicate_server_hide (server); hide_evolution_in_indicator_applet (); } } @@ -828,20 +641,16 @@ gconf_client_notify_remove (client, play_sound_id); gconf_client_notify_remove (client, show_bubble_id); gconf_client_notify_remove (client, show_count_id); - gconf_client_notify_remove (client, accounts_id); g_object_unref (client); client = NULL; - + /* Free indicators */ g_slist_foreach (indicators, (GFunc)g_object_unref, NULL); g_slist_free (indicators); indicators = NULL; - /* Free server */ - indicate_server_hide (server); - g_object_unref (server); - server = NULL; + g_object_unref (mmapp); /* Remove evolution from indicator menu */ hide_evolution_in_indicator_applet (); @@ -1003,7 +812,7 @@ */ static void -show_evolution (gpointer arg0, guint timestamp, gpointer arg1) +show_evolution (MessagingMenuApp *mmapp, const gchar *url, gpointer user_data) { #define MAIL_ICON "evolution-mail" EShell *shell = e_shell_get_default (); @@ -1022,7 +831,7 @@ shell_window = E_SHELL_WINDOW (e_shell_get_active_window (shell)); if (!evolution_is_focused ()) { - gtk_window_present_with_time (GTK_WINDOW (shell_window), timestamp); + gtk_window_present (GTK_WINDOW (shell_window)); } /* Switch to the mail view. */ @@ -1033,16 +842,17 @@ /* Setup the indicators */ for (i = indicators; i; i = i->next) { - IndicateIndicator *indicator = i->data; - - set_indicator_unread_count (indicator, 0); - indicate_indicator_set_property (indicator, - INDICATE_INDICATOR_MESSAGES_PROP_ATTENTION, - "false"); - - g_debug ("EI: Setting %s to 0 unread messages", - indicate_indicator_get_property (indicator, "name")); + gchar *url = i->data; + if (messaging_menu_app_has_source(MESSAGING_MENU_APP (mmapp), url)) + { + messaging_menu_app_remove_attention(MESSAGING_MENU_APP (mmapp), url); + messaging_menu_app_set_source_count (MESSAGING_MENU_APP (mmapp), url, 0); + g_debug ("EI: Setting %s to 0 unread messages", url); + } + else { + g_warning ("EI: Unable to find account that matches %s", url); + } } message_count = 0; update_unity_launcher_count (); debian/patches/eds-3.100000664000000000000000000000056312300401760011671 0ustar Index: b/src/evolution-indicator.c =================================================================== --- a/src/evolution-indicator.c +++ b/src/evolution-indicator.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include debian/patches/01_no_debug_spamming.patch0000664000000000000000000000127612300401760015614 0ustar Description: Define empty debug logger, to avoid debug messages. diff -Nur -x '*.orig' -x '*~' ubuntu//src/evolution-indicator.c ubuntu.new//src/evolution-indicator.c --- ubuntu//src/evolution-indicator.c 2010-06-22 15:17:26.421431000 +0200 +++ ubuntu.new//src/evolution-indicator.c 2010-06-22 15:30:01.396114034 +0200 @@ -685,11 +685,19 @@ return; } +void no_debug_log (const gchar *log_domain, GLogLevelFlags log_level, + const gchar *message, gpointer user_data) +{ + return; +} + int e_plugin_lib_enable (EPlugin *ep, int enable) { is_active = enable; + g_log_set_default_handler (no_debug_log, NULL); + if (is_active) { if (notification == NULL)