From 03ebaddff5101449e020dac1301bf8c9df9446ea Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Sat, 23 Oct 2021 00:15:48 +0200 Subject: sdgui: add a file open dialog to the menu And remove the selection following checkbox from Windows builds. --- src/stardict-view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stardict-view.c') diff --git a/src/stardict-view.c b/src/stardict-view.c index f7e12c9..1e65b0c 100644 --- a/src/stardict-view.c +++ b/src/stardict-view.c @@ -533,14 +533,14 @@ stardict_view_set_position (StardictView *self, StardictDict *dict, guint position) { g_return_if_fail (STARDICT_IS_VIEW (self)); - g_return_if_fail (STARDICT_IS_DICT (dict)); + g_return_if_fail (dict == NULL || STARDICT_IS_DICT (dict)); // Update the minimum size, if appropriate (almost never) if (!self->dict != !dict) gtk_widget_queue_resize (GTK_WIDGET (self)); g_clear_object (&self->dict); - self->dict = g_object_ref (dict); + self->dict = dict ? g_object_ref (dict) : NULL; self->top_position = position; self->top_offset = 0; -- cgit v1.2.3-70-g09d2