Commit 284df9be authored by Sébastien Wilmet's avatar Sébastien Wilmet

Prevent a crash with GeditStatusMenuButton

The problem is not fixed at the source (in GeditWindow). But at least it
will not crash anymore.

GeditWindow dives deep in the containment hierarchy and connects to some
GeditDocument signals. And it seems that a signal is not correctly
disconnected and is called when GeditWindow is disposed. The code in
GeditWindow is messy and there are other problems (getting the buffer
with gtk_text_view_get_buffer() can return another buffer than the one
that the signal was connected to, especially during destroys).
parent 2f2efd1f
......@@ -147,12 +147,16 @@ void
gedit_status_menu_button_set_label (GeditStatusMenuButton *button,
const gchar *label)
g_return_if_fail (GEDIT_IS_STATUS_MENU_BUTTON (button));
gtk_label_set_markup (GTK_LABEL (button->label), label);
const gchar *
gedit_status_menu_button_get_label (GeditStatusMenuButton *button)
g_return_val_if_fail (GEDIT_IS_STATUS_MENU_BUTTON (button), NULL);
return gtk_label_get_label (GTK_LABEL (button->label));
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