summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-09 12:28:49 +0800
committerVictor Kareh <[email protected]>2019-05-09 15:12:46 -0400
commitb308b10075685132828c6ef0e1f4b47bc850f9c7 (patch)
tree3e92a5f2e68bf570e47f6062d3e87b4cf03a6391
parente7b23fa4db99001ccb45d8dffaf52117662c3ef4 (diff)
downloadmate-session-manager-b308b10075685132828c6ef0e1f4b47bc850f9c7.tar.bz2
mate-session-manager-b308b10075685132828c6ef0e1f4b47bc850f9c7.tar.xz
Don't add apps repeatedly
-rw-r--r--capplet/gsm-properties-dialog.c4
1 files changed, 4 insertions, 0 deletions
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);