summaryrefslogtreecommitdiff
path: root/app/flatpak-builtins-list.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2019-04-23 15:45:06 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2019-04-24 13:31:35 +0000
commitc84db7714e32fb08bf642b1a1c72b010169c4f9c (patch)
tree772eeb032cedd042c8ad0da6f90cd7eef2dbe8e4 /app/flatpak-builtins-list.c
parentbd18eab6ce128d17f67771a52f335e62d076ea77 (diff)
downloadflatpak-c84db7714e32fb08bf642b1a1c72b010169c4f9c.tar.gz
list/remote-ls/search: Split description field
Instead of combining name and comment we split them into two columns. We also disable the comment column by default for list and remote-ls as it is very poor in long tables. However, it is still there for search where it seems more useful. Also, the Application column title changed to Application ID to make it clearer what it is compared to the "Name" column. Closes: #2852 Approved by: alexlarsson
Diffstat (limited to 'app/flatpak-builtins-list.c')
-rw-r--r--app/flatpak-builtins-list.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/flatpak-builtins-list.c b/app/flatpak-builtins-list.c
index 37706e6f..d2c71976 100644
--- a/app/flatpak-builtins-list.c
+++ b/app/flatpak-builtins-list.c
@@ -54,8 +54,9 @@ static GOptionEntry options[] = {
};
static Column all_columns[] = {
- { "description", N_("Description"), N_("Show the description"), 1, FLATPAK_ELLIPSIZE_MODE_END, 1, 1 },
- { "application", N_("Application"), N_("Show the application ID"), 1, FLATPAK_ELLIPSIZE_MODE_START, 0, 1 },
+ { "name", N_("Name"), N_("Show the name"), 1, FLATPAK_ELLIPSIZE_MODE_END, 1, 1 },
+ { "description", N_("Description"), N_("Show the description"), 1, FLATPAK_ELLIPSIZE_MODE_END, 1, 0 },
+ { "application", N_("Application ID"), N_("Show the application ID"), 1, FLATPAK_ELLIPSIZE_MODE_START, 0, 1 },
{ "version", N_("Version"), N_("Show the version"), 1, FLATPAK_ELLIPSIZE_MODE_NONE, 1, 1 },
{ "branch", N_("Branch"), N_("Show the branch"), 1, FLATPAK_ELLIPSIZE_MODE_NONE, 0, 1 },
{ "arch", N_("Arch"), N_("Show the architecture"), 1, FLATPAK_ELLIPSIZE_MODE_NONE, 0, 1, 1 },
@@ -284,15 +285,15 @@ print_table_for_refs (gboolean print_apps,
for (k = 0; columns[k].name; k++)
{
- if (strcmp (columns[k].name, "description") == 0)
+ if (strcmp (columns[k].name, "name") == 0)
{
- g_autofree char *description = NULL;
const char *name = appdata_name ? appdata_name : strrchr (parts[1], '.') + 1;
- if (appdata_summary)
- description = g_strconcat (name, " - ", appdata_summary, NULL);
- else
- description = g_strdup (name);
+ flatpak_table_printer_add_column (printer, name);
+ }
+ else if (strcmp (columns[k].name, "description") == 0)
+ {
+ const char *description = appdata_summary ? appdata_summary : "";
flatpak_table_printer_add_column (printer, description);
}
else if (strcmp (columns[k].name, "version") == 0)