[mail-notification/f12/master] fix popup attach window fix tray icon on KDE
Dmitry Butskoy
buc at fedoraproject.org
Mon Oct 11 14:23:57 UTC 2010
commit 845bbe20fc29b9f3210d0b4e575babe707483774
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date: Mon Oct 11 18:23:57 2010 +0400
fix popup attach window
fix tray icon on KDE
mail-notification-5.4-kde-trayicon.patch | 72 ++++++++++++++++++++++++++++++
mail-notification-5.4-popup-attach.patch | 45 ++++++++++++++++++
mail-notification.spec | 55 +++++++++++++++++++++--
3 files changed, 168 insertions(+), 4 deletions(-)
---
diff --git a/mail-notification-5.4-kde-trayicon.patch b/mail-notification-5.4-kde-trayicon.patch
new file mode 100644
index 0000000..a3bdc83
--- /dev/null
+++ b/mail-notification-5.4-kde-trayicon.patch
@@ -0,0 +1,72 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-shell.c mail-notification-5.4-OK/build/src/mn-shell.c
+--- mail-notification-5.4/build/src/mn-shell.c 2010-10-11 17:45:23.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-shell.c 2010-10-11 17:45:48.000000000 +0400
+@@ -313,6 +313,29 @@
+ #undef __GOB_FUNCTION__
+
+ static void
++mn_shell_init_icon_base (MNShell * self)
++{
++ g_return_if_fail (self != NULL);
++ g_return_if_fail (MN_IS_SHELL (self));
++
++ self->icon = MN_MAIL_ICON(mn_mail_icon_new());
++ mn_add_weak_pointer(&self->icon);
++
++ g_object_connect(self->icon,
++ "signal::activate", self_icon_activate_h, self,
++ "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
++ "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
++ "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
++ "swapped-signal::activate-update", self_update, self,
++ "signal::activate-properties", self_icon_activate_properties_h, self,
++ "signal::activate-help", self_icon_activate_help_h, self,
++ "signal::activate-about", self_icon_activate_about_h, self,
++ "swapped-signal::activate-remove", self_quit, self,
++ "signal::destroy", self_icon_destroy_h, self,
++ NULL);
++}
++
++static void
+ mn_shell_init (MNShell * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Shell::init"
+@@ -793,22 +816,7 @@
+ {
+ #line 360 "src/mn-shell.gob"
+
+- self->icon = MN_MAIL_ICON(mn_mail_icon_new());
+- mn_add_weak_pointer(&self->icon);
+-
+- g_object_connect(self->icon,
+- "signal::activate", self_icon_activate_h, self,
+- "signal::activate-mail-reader", self_icon_activate_mail_reader_h, self,
+- "signal::activate-open-latest-message", self_icon_activate_open_latest_message_h, self,
+- "swapped-signal::activate-consider-new-mail-as-read", self_consider_new_mail_as_read, self,
+- "swapped-signal::activate-update", self_update, self,
+- "signal::activate-properties", self_icon_activate_properties_h, self,
+- "signal::activate-help", self_icon_activate_help_h, self,
+- "signal::activate-about", self_icon_activate_about_h, self,
+- "swapped-signal::activate-remove", self_quit, self,
+- "signal::destroy", self_icon_destroy_h, self,
+- NULL);
+-
++ mn_shell_init_icon_base(self);
+ self_update_sensitivity(self);
+ self_update_tooltip(self);
+ self_update_icon(self);
+@@ -1094,7 +1102,13 @@
+ }
+ else
+ {
+- gtk_widget_hide(GTK_WIDGET(self->icon));
++ /* Re-create the icon as a regular gtk_widget_hide causes the
++ * icon to remain visible on non-GNOME environments. We can't
++ * use the callback self_icon_destroy_h here as it can cause an
++ * endless recursion */
++ g_signal_handlers_disconnect_by_func(self->icon, self_icon_destroy_h, self);
++ gtk_widget_destroy(GTK_WIDGET(self->icon));
++ mn_shell_init_icon_base(self);
+ mn_mail_icon_set_blinking(self->icon, FALSE);
+ }
+ }}
diff --git a/mail-notification-5.4-popup-attach.patch b/mail-notification-5.4-popup-attach.patch
new file mode 100644
index 0000000..b8d5f6a
--- /dev/null
+++ b/mail-notification-5.4-popup-attach.patch
@@ -0,0 +1,45 @@
+diff -Nrbu mail-notification-5.4/build/src/mn-popup.c mail-notification-5.4-OK/build/src/mn-popup.c
+--- mail-notification-5.4/build/src/mn-popup.c 2008-05-22 19:47:49.000000000 +0400
++++ mail-notification-5.4-OK/build/src/mn-popup.c 2010-10-11 17:42:32.000000000 +0400
+@@ -177,6 +177,29 @@
+ #undef __GOB_FUNCTION__
+
+ static void
++mn_popup_wait_for_icon_to_become_ready (void)
++{
++ int x, y;
++ int count = 0;
++
++ /* When the tray icon is created, it can still take some time before
++ * it has arrived at the correct position. This is especially the case
++ * on KDE environments. To work around this, add a little delay of at
++ * most 2 seconds before showing a popup which is attached to the notification */
++ do {
++ gdk_window_get_origin (gtk_widget_get_window (mn_shell->icon), &x, &y);
++
++ if (x != 0 || y != 0) {
++ break;
++ }
++
++ g_usleep(G_USEC_PER_SEC / 10);
++ count++;
++ } while (count < 20);
++}
++
++
++static void
+ mn_popup_init (MNPopup * o G_GNUC_UNUSED)
+ {
+ #define __GOB_FUNCTION__ "MN:Popup::init"
+@@ -299,8 +322,10 @@
+ "icon-name", "stock_mail",
+ NULL);
+
+- if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED)
++ if (mn_conf_get_enum_value(MN_TYPE_POPUP_POSITION, MN_CONF_POPUPS_POSITION) == MN_POPUP_POSITION_ATTACHED) {
++ mn_popup_wait_for_icon_to_become_ready();
+ g_object_set(self, "attach-widget", mn_shell->icon, NULL);
++ }
+
+ g_string_free(body, TRUE);
+
diff --git a/mail-notification.spec b/mail-notification.spec
index 2712a7f..7cedd31 100644
--- a/mail-notification.spec
+++ b/mail-notification.spec
@@ -1,6 +1,6 @@
Name: mail-notification
Version: 5.4
-Release: 16%{?dist}
+Release: 25%{?dist}
Summary: Status icon that informs you if you have new mail
Group: Applications/Internet
@@ -11,6 +11,11 @@ Patch0: mail-notification-5.4-evolution.patch
Patch1: mail-notification-5.4-gmime.patch
Patch2: mail-notification-5.4-sasl_encode64.patch
Patch3: mail-notification-5.4-evolution-gtkhtml.patch
+Patch4: mail-notification-5.4-camel_headers.patch
+Patch5: mail-notification-5.4-icons.patch
+Patch6: mail-notification-5.4-weak.patch
+Patch7: mail-notification-5.4-popup-attach.patch
+Patch8: mail-notification-5.4-kde-trayicon.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: gettext
@@ -30,6 +35,9 @@ BuildRequires: perl-XML-Parser
BuildRequires: evolution-devel
BuildRequires: evolution-data-server-devel >= 1.5
+# temporary to work-around some dependency issues in other packages...
+BuildRequires: libICE-devel, libSM-devel
+
Requires: hicolor-icon-theme
Requires(pre): GConf2
@@ -57,10 +65,15 @@ Evolution support for Mail Notification.
%prep
%setup -q
-%patch0 -p0 -b .evolution
+%patch0 -p1 -b .evolution
%patch1 -p1 -b .gmime
%patch2 -p1 -b .sasl_encode64
%patch3 -p1 -b .gtkhtml
+%patch4 -p1 -b .camel_headers
+%patch5 -p1 -b .icons
+%patch6 -p1 -b .weak
+%patch7 -p1 -b .popup_attach
+%patch8 -p1 -b .kde_trayicon
# Drop #line statements in C sources generated bu .gob,
# for the proper debuginfo package
@@ -78,6 +91,7 @@ popd
cc="%{__cc}" \
cflags="$RPM_OPT_FLAGS" \
cppflags="-D_GNU_SOURCE" \
+ libs="-lX11" \
destdir=$RPM_BUILD_ROOT \
prefix=%{_prefix} \
bindir=%{_bindir} \
@@ -104,7 +118,7 @@ rm -rf $RPM_BUILD_ROOT%{_localstatedir}
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
-chmod +x $RPM_BUILD_ROOT%{_libdir}/evolution/2.*/plugins/*.so
+chmod +x $RPM_BUILD_ROOT%{_libdir}/evolution/*/plugins/*.so
desktop-file-install --vendor fedora \
--dir ${RPM_BUILD_ROOT}%{_datadir}/gnome/autostart/ \
@@ -181,10 +195,43 @@ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
%files evolution-plugin
%defattr(-,root,root,-)
-%{_libdir}/evolution/2.*/plugins/*
+%{_libdir}/evolution/*/plugins/*
%changelog
+* Mon Oct 11 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-25
+- fix popup window place
+ (#608372, by Erik van Pienbroek <erik-fedora at vanpienbroek.nl>)
+- fix tray icon freezes on KDE when unread count reaches zero (#641580)
+
+* Fri Sep 17 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-24
+- add support for evolution 2.31+
+ (#633507, by Erik van Pienbroek <erik-fedora at vanpienbroek.nl>)
+ Combined with common evolution patch
+
+* Thu Sep 9 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-23
+- rebuild with new evolution-data-server
+
+* Wed Jul 14 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-22
+- rebuild with new gtkhtml3
+
+* Tue Jun 8 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-21
+- rebuild with new evolution-data-server
+
+* Mon May 24 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-20
+- change icon usage for Fedora 13 (#573809)
+- fix some memory failures (Mat Booth <fedora at matbooth.co.uk>)
+
+* Tue May 4 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-19
+- rebuilt with new evolution-data-server
+
+* Fri Feb 16 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-18
+- rebuilt with gmime-2.6
+- explicitly link with libX11 (#564739)
+
+* Mon Feb 1 2010 Dmitry Butskoy <Dmitry at Butskoy.name> - 5.4-17
+- update evolution patch (#538956, by Matthew Barnes <mbarnes at redhat.com>)
+
* Sat Aug 22 2009 Tomas Mraz <tmraz at redhat.com> - 5.4-16
- rebuilt with new openssl
More information about the scm-commits
mailing list