Merge lp:~bratsche/ubuntu/maverick/gtk+2.0/disconnect-signal into lp:~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

Proposed by Cody Russell
Status: Merged
Merged at revision: 184
Proposed branch: lp:~bratsche/ubuntu/maverick/gtk+2.0/disconnect-signal
Merge into: lp:~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy
Diff against target: 26 lines (+8/-1)
1 file modified
gtk/gtkmenushell.c (+8/-1)
To merge this branch: bzr merge lp:~bratsche/ubuntu/maverick/gtk+2.0/disconnect-signal
Reviewer Review Type Date Requested Status
David Barth (community) Approve
Ubuntu Development Team Pending
Review via email: mp+33483@code.launchpad.net
To post a comment you must log in.
Revision history for this message
David Barth (dbarth) wrote :

The change looks correct and should prevent crashers on ghost object references.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/gtkmenushell.c'
2--- gtk/gtkmenushell.c 2010-08-23 23:34:44 +0000
3+++ gtk/gtkmenushell.c 2010-08-24 03:28:47 +0000
4@@ -505,6 +505,13 @@
5 GtkMenuShell *menu_shell = GTK_MENU_SHELL (object);
6 GtkMenuShellPrivate *priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
7
8+ if (priv->proxy != NULL)
9+ {
10+ g_signal_handlers_disconnect_by_func (priv->proxy,
11+ show_local_notify,
12+ menu_shell);
13+ }
14+
15 if (priv->mnemonic_hash)
16 _gtk_mnemonic_hash_free (priv->mnemonic_hash);
17 if (priv->key_hash)
18@@ -549,7 +556,7 @@
19 /* insert to proxy */
20 if (priv->proxy != NULL)
21 ubuntu_menu_proxy_insert (priv->proxy,
22- menu_shell,
23+ GTK_WIDGET (menu_shell),
24 child,
25 position);
26 }

Subscribers

People subscribed via source and target branches