Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion po/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ msgstr "Obtenir plus d’informations"
# Dans le contexte d'App Store - "Get" serait plutôt traduit en "Télécharger" ou comme ici en "Installer"
#: src/bz-rich-app-tile.blp:158
msgid "Get"
msgstr "Installer"
msgstr "/"

#: src/bz-rich-app-tile.blp:173
msgid "Uninstall"
Expand Down
3 changes: 1 addition & 2 deletions src/bz-rich-app-tile.blp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ template $BzRichAppTile: $BzListTile {

StackPage {
name: "get";
child: Button {
child: Button get_button {
sensitive: bind $invert_boolean(
$is_zero(template.group as <$BzEntryGroup>.installable-and-available) as <bool>
) as <bool>;
Expand All @@ -179,7 +179,6 @@ template $BzRichAppTile: $BzListTile {
"medium-pill",
]

label: _("Get");
valign: center;
clicked => $install_button_clicked_cb(template);
};
Expand Down
14 changes: 12 additions & 2 deletions src/bz-rich-app-tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct _BzRichAppTile
GListModel *all_trackers;

GtkWidget *picture_box;
GtkWidget *get_button;
BzTransactIconInfo *transact_icon_info;
};

Expand Down Expand Up @@ -349,6 +350,7 @@ bz_rich_app_tile_class_init (BzRichAppTileClass *klass)
gtk_widget_class_bind_template_callback (widget_class, run_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, cancel_button_clicked_cb);
gtk_widget_class_bind_template_child (widget_class, BzRichAppTile, picture_box);
gtk_widget_class_bind_template_child (widget_class, BzRichAppTile, get_button);
gtk_widget_class_bind_template_child (widget_class, BzRichAppTile, transact_icon_info);

gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_BUTTON);
Expand All @@ -357,11 +359,19 @@ bz_rich_app_tile_class_init (BzRichAppTileClass *klass)
static void
bz_rich_app_tile_init (BzRichAppTile *self)
{
BzStateInfo *state = NULL;
BzTransactionManager *manager = NULL;
BzStateInfo *state = NULL;
BzTransactionManager *manager = NULL;
const char *get_label = NULL;

gtk_widget_init_template (GTK_WIDGET (self));

/* Translators: If you can't find a short enough translation, use "/" to use an icon instead. */
get_label = _ ("Get");
if (get_label != NULL && *get_label != '\0' && g_strcmp0 (get_label, "/") != 0)
gtk_button_set_label (GTK_BUTTON (self->get_button), get_label);
else
gtk_button_set_icon_name (GTK_BUTTON (self->get_button), "folder-download-symbolic");

state = bz_state_info_get_default ();
manager = bz_state_info_get_transaction_manager (state);
if (manager != NULL)
Expand Down
Loading