1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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);
}
}}
|