[mail-notification/f14/master] .
Dmitry Butskoy
buc at fedoraproject.org
Mon Oct 11 14:12:48 UTC 2010
commit 04a490d4fda5d315453d6ea8e6592eb9a5486c88
Author: Dmitry Butskoy <Dmitry at Butskoy.name>
Date: Mon Oct 11 18:12:46 2010 +0400
.
mail-notification-5.4-kde-trayicon.patch | 72 ++++++++++++++++++++++++++++++
mail-notification-5.4-popup-attach.patch | 45 ++++++++++++++++++
mail-notification.spec | 15 +++++-
3 files changed, 129 insertions(+), 3 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 3f7e78b..7cedd31 100644
--- a/mail-notification.spec
+++ b/mail-notification.spec
@@ -1,6 +1,6 @@
Name: mail-notification
Version: 5.4
-Release: 24%{?dist}.1
+Release: 25%{?dist}
Summary: Status icon that informs you if you have new mail
Group: Applications/Internet
@@ -14,6 +14,8 @@ 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
@@ -33,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
@@ -67,6 +72,8 @@ Evolution support for Mail Notification.
%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
@@ -192,8 +199,10 @@ export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
%changelog
-* Tue Oct 05 2010 jkeating - 5.4-24.1
-- Rebuilt for gcc bug 634757
+* 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+
More information about the scm-commits
mailing list