From 30aeb4c5f787e54525ac287b56ddbd20ca5aaccc Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Thu, 9 May 2019 12:28:49 +0800 Subject: Don't add apps repeatedly --- capplet/gsm-properties-dialog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/capplet/gsm-properties-dialog.c b/capplet/gsm-properties-dialog.c index 3f7a816..bde8999 100644 --- a/capplet/gsm-properties-dialog.c +++ b/capplet/gsm-properties-dialog.c @@ -181,6 +181,10 @@ append_app (GsmPropertiesDialog *dialog, GspApp *app) { GtkTreeIter iter; + if (find_by_app (GTK_TREE_MODEL (dialog->list_store), + &iter, app)) { + return; + } gtk_list_store_append (dialog->list_store, &iter); _fill_iter_from_app (dialog->list_store, &iter, app); -- cgit v1.2.1