Commit da397551 authored by Darin Adler's avatar Darin Adler
Browse files

Instead of ref'ing the control we want to do a "while_alive". The old way

	* libnautilus/nautilus-clipboard.c:
	(nautilus_clipboard_set_up_editable): Instead of ref'ing the
	control we want to do a "while_alive". The old way could be
	dangerous, so I'm glad I caught this.
parent bcd654be
2000-05-25 Darin Adler <darin@eazel.com>
* libnautilus/nautilus-clipboard.c:
(nautilus_clipboard_set_up_editable): Instead of ref'ing the
control we want to do a "while_alive". The old way could be
dangerous, so I'm glad I caught this.
2000-05-25 Darin Adler <darin@eazel.com>
* libnautilus/nautilus-view-frame.c:
(nautilus_view_get_bonobo_control):
Took out an extra bonobo_object_ref that was wreaking havoc.
If we want to make this ref the thing before returning it,
we'll have to get it right.
(nautilus_view_get_bonobo_control): Took out an extra
bonobo_object_ref that was wreaking havoc. If we want to make
this ref the thing before returning it, we'll have to get it
right.
2000-05-25 Darin Adler <darin@eazel.com>
......
......@@ -163,20 +163,14 @@ nautilus_clipboard_set_up_editable (GtkEditable *target,
g_return_if_fail (BONOBO_IS_CONTROL (control));
/* Attach code to add menus when it gets the focus. */
bonobo_object_ref (BONOBO_OBJECT (control));
gtk_signal_connect_full
gtk_signal_connect_while_alive
(GTK_OBJECT (target), "focus_in_event",
GTK_SIGNAL_FUNC (add_menu_items_callback),
NULL, control,
(GtkDestroyNotify) bonobo_object_unref,
FALSE, FALSE);
control, GTK_OBJECT (control));
/* Attach code to remove menus when it loses the focus. */
bonobo_object_ref (BONOBO_OBJECT (control));
gtk_signal_connect_full
gtk_signal_connect_while_alive
(GTK_OBJECT (target), "focus_out_event",
GTK_SIGNAL_FUNC (remove_menu_items_callback),
NULL, control,
(GtkDestroyNotify) bonobo_object_unref,
FALSE, FALSE);
control, GTK_OBJECT (control));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment