Fix two critical GObject warnings

This commit is contained in:
Geert Janssens 2017-03-13 16:17:49 +01:00
parent 68091faa80
commit d439d37980
2 changed files with 2 additions and 7 deletions

View File

@ -746,6 +746,7 @@ gnc_item_edit_set_popup (GncItemEdit *item_edit,
gnc_item_edit_hide_popup_toggle (item_edit); gnc_item_edit_hide_popup_toggle (item_edit);
} }
if (gtk_widget_get_realized(GTK_WIDGET(item_edit)))
gnc_item_edit_update (item_edit); gnc_item_edit_update (item_edit);
} }

View File

@ -687,10 +687,6 @@ gnucash_sheet_finalize (GObject *object)
/* Clean up IMContext and unref */ /* Clean up IMContext and unref */
gnucash_sheet_im_context_reset(sheet); gnucash_sheet_im_context_reset(sheet);
g_object_unref (sheet->im_context); g_object_unref (sheet->im_context);
/* This has to come after the parent destroy, so the item edit
destruction can do its disconnects. */
g_object_unref (sheet->entry);
} }
@ -1414,8 +1410,6 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
if (button_1) if (button_1)
gnucash_sheet_check_grab (sheet); gnucash_sheet_check_grab (sheet);
gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &new_virt_loc);
if (do_popup) if (do_popup)
gtk_menu_popup(GTK_MENU(sheet->popup), NULL, NULL, NULL, gtk_menu_popup(GTK_MENU(sheet->popup), NULL, NULL, NULL,
sheet->popup_data, event->button, event->time); sheet->popup_data, event->button, event->time);