panel-loader: Simplify listing panels

Instead of enumerating them, putting that in a GList, then
iterating the GList printing the panel names, simply print
them while enumerating.
This commit is contained in:
Georges Basile Stavracas Neto 2018-11-07 20:25:30 -02:00
parent 31a5d55896
commit 867a35dc89
No known key found for this signature in database
GPG key ID: 886C17EE170D1385
3 changed files with 9 additions and 16 deletions

View file

@ -125,15 +125,7 @@ cc_application_handle_local_options (GApplication *application,
if (g_variant_dict_contains (options, "list"))
{
g_autoptr(GList) panels = NULL;
g_autoptr(GList) l = NULL;
panels = cc_panel_loader_get_panels ();
g_print ("%s\n", _("Available panels:"));
for (l = panels; l != NULL; l = l->next)
g_print ("\t%s\n", (char *) l->data);
cc_panel_loader_list_panels ();
return 0;
}