aboutsummaryrefslogtreecommitdiff
path: root/src/stardict-view.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-23 00:15:48 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-23 02:12:24 +0200
commit03ebaddff5101449e020dac1301bf8c9df9446ea (patch)
tree224523ae2dfa5f9e62f4641046c410874a35d2d5 /src/stardict-view.c
parent5190601852e3e3a5e06a04aa41c712d860e3ffac (diff)
downloadtdv-03ebaddff5101449e020dac1301bf8c9df9446ea.tar.gz
tdv-03ebaddff5101449e020dac1301bf8c9df9446ea.tar.xz
tdv-03ebaddff5101449e020dac1301bf8c9df9446ea.zip
sdgui: add a file open dialog to the menu
And remove the selection following checkbox from Windows builds.
Diffstat (limited to 'src/stardict-view.c')
-rw-r--r--src/stardict-view.c4
1 files changed, 2 insertions, 2 deletions
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;