[gnome-builder] flatpak: add keywords and priority to runtime preferences



commit 38cfba9061a3d5e161af85ca3cf1a44aa06a0c58
Author: Christian Hergert <chergert redhat com>
Date:   Sat Feb 18 12:53:29 2017 -0800

    flatpak: add keywords and priority to runtime preferences
    
    We want to use the sort order for row priority (for which we still need
    to sort upfront). Additionally, we want the rows to be searchable by name
    when the preferences search is used.

 plugins/flatpak/gbp-flatpak-preferences-addin.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-preferences-addin.c b/plugins/flatpak/gbp-flatpak-preferences-addin.c
index 909f8fb..eac2153 100644
--- a/plugins/flatpak/gbp-flatpak-preferences-addin.c
+++ b/plugins/flatpak/gbp-flatpak-preferences-addin.c
@@ -122,6 +122,7 @@ add_runtimes (GbpFlatpakPreferencesAddin *self,
               const gchar *name = flatpak_ref_get_name (FLATPAK_REF (ref));
               const gchar *branch = flatpak_ref_get_branch (FLATPAK_REF (ref));
               const gchar *arch = flatpak_ref_get_arch (FLATPAK_REF (ref));
+              g_autofree gchar *keywords = NULL;
               GtkWidget *row;
               guint id;
 
@@ -135,8 +136,11 @@ add_runtimes (GbpFlatpakPreferencesAddin *self,
               if (is_ignored (name))
                 continue;
 
+              /* translators: keywords are used to match search keywords in preferences */
+              keywords = g_strdup_printf (_("flatpak %s %s %s"), name, branch, arch);
+
               row = create_row (self, name, arch, branch);
-              id = ide_preferences_add_custom (preferences, "sdk", "flatpak-runtimes", row, NULL, 0);
+              id = ide_preferences_add_custom (preferences, "sdk", "flatpak-runtimes", row, keywords, j);
               g_array_append_val (self->ids, id);
             }
         }


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