From 10c05a2422ac889b042482a8d0350d692d24c5bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 16 Oct 2021 03:45:04 +0200 Subject: [PATCH] sdgui: clean-up It doesn't seem like we'll want to remember the position. --- src/sdgui.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sdgui.c b/src/sdgui.c index 3565bc6..c547760 100644 --- a/src/sdgui.c +++ b/src/sdgui.c @@ -33,7 +33,6 @@ struct dictionary const gchar *filename; ///< Filename StardictDict *dict; ///< Stardict dictionary data gchar *name; ///< Name to show - guint position; ///< Current position }; static struct @@ -94,11 +93,10 @@ search (Dictionary *dict) StardictIterator *iterator = stardict_dict_search (dict->dict, input_utf8, NULL); - dict->position = stardict_iterator_get_offset (iterator); + stardict_view_set_position (STARDICT_VIEW (g.view), + dict->dict, stardict_iterator_get_offset (iterator)); g_object_unref (iterator); - stardict_view_set_position (STARDICT_VIEW (g.view), - dict->dict, dict->position); stardict_view_set_matched (STARDICT_VIEW (g.view), input_utf8); }