diff options
author | Richard Hughes <richard@hughsie.com> | 2010-01-14 10:05:23 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-01-14 10:05:23 +0000 |
commit | bc6218abc7d52f4af04c4ad06a84cfa96a23786f (patch) | |
tree | 512d127a63abd228174f42226cd35557134d0e31 /client | |
parent | 0f3b83cf400e1f7eaf33758088488297ccea6438 (diff) |
Show the translated role and status when using pkgenpack
Diffstat (limited to 'client')
-rw-r--r-- | client/pk-generate-pack.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c index f9d20596..ba5bedc7 100644 --- a/client/pk-generate-pack.c +++ b/client/pk-generate-pack.c @@ -84,7 +84,20 @@ static void pk_generate_pack_progress_cb (PkProgress *progress, PkProgressType type, gpointer data) { gint percentage; + PkRoleEnum role; PkStatusEnum status; + const gchar *text; + + /* role */ + if (type == PK_PROGRESS_TYPE_ROLE) { + g_object_get (progress, + "role", &role, + NULL); + + /* show new role on the bar */ + text = pk_role_enum_to_localised_present (role); + pk_progress_bar_start (progressbar, text); + } /* percentage */ if (type == PK_PROGRESS_TYPE_PERCENTAGE) { @@ -101,8 +114,10 @@ pk_generate_pack_progress_cb (PkProgress *progress, PkProgressType type, gpointe NULL); if (status == PK_STATUS_ENUM_FINISHED) return; - /* TODO: translate */ - pk_progress_bar_start (progressbar, pk_status_enum_to_string (status)); + + /* show status on the bar */ + text = pk_status_enum_to_localised_text (status); + pk_progress_bar_start (progressbar, text); } } |