[gnome-builder] flatpak: be more flexible with row comparisons



commit 4d6174c7e646fae49368de90044dff31503d4f00
Author: Christian Hergert <chergert redhat com>
Date:   Sat Apr 13 13:49:47 2019 -0700

    flatpak: be more flexible with row comparisons

 src/plugins/flatpak/gbp-flatpak-install-dialog.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/flatpak/gbp-flatpak-install-dialog.c 
b/src/plugins/flatpak/gbp-flatpak-install-dialog.c
index 0c891e369..13bda2652 100644
--- a/src/plugins/flatpak/gbp-flatpak-install-dialog.c
+++ b/src/plugins/flatpak/gbp-flatpak-install-dialog.c
@@ -235,9 +235,7 @@ gbp_flatpak_install_dialog_contains (GbpFlatpakInstallDialog *self,
   GtkTreeIter iter;
 
   g_assert (GBP_IS_FLATPAK_INSTALL_DIALOG (self));
-  g_assert (name);
-  g_assert (arch);
-  g_assert (branch);
+  g_assert (name != NULL);
 
   if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (self->liststore1), &iter))
     {
@@ -253,9 +251,9 @@ gbp_flatpak_install_dialog_contains (GbpFlatpakInstallDialog *self,
                               2, &item_branch,
                               -1);
 
-          if (g_str_equal (item_name, name) &&
-              g_str_equal (item_arch, arch) &&
-              g_str_equal (item_branch, branch))
+          if (ide_str_equal0 (item_name, name) &&
+              (!arch || ide_str_equal0 (item_arch, arch)) &&
+              (!branch || ide_str_equal0 (item_branch, branch)))
             return TRUE;
         }
       while (gtk_tree_model_iter_next (GTK_TREE_MODEL (self->liststore1), &iter));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]