|
|
|
@ -96,13 +96,16 @@ GtkWidget *yacos_cart_item_new(void)
|
|
|
|
|
void yacos_cart_item_set_id(YacosCartItem *self, yacos_tag_id tag_id) |
|
|
|
|
{ |
|
|
|
|
gchar *id_str; |
|
|
|
|
gchar *id_str2; |
|
|
|
|
|
|
|
|
|
self->priv.tag_id = tag_id; |
|
|
|
|
|
|
|
|
|
id_str = yacos_tag_id_to_str(tag_id); |
|
|
|
|
gtk_label_set_text(GTK_LABEL(self->priv.label_id), id_str); |
|
|
|
|
|
|
|
|
|
id_str2 = g_strdup_printf("#%s", id_str); |
|
|
|
|
g_free(id_str); |
|
|
|
|
gtk_label_set_text(GTK_LABEL(self->priv.label_id), id_str2); |
|
|
|
|
|
|
|
|
|
g_free(id_str2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void yacos_cart_item_fetch_meta_cb (SoupSession *session, SoupMessage *msg, gpointer user_data) |
|
|
|
@ -151,6 +154,11 @@ void yacos_cart_item_fetch_meta(YacosCartItem *self)
|
|
|
|
|
gchar *url; |
|
|
|
|
gchar *id_str; |
|
|
|
|
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(self->priv.label_title), "Loading ..."); |
|
|
|
|
gtk_label_set_text(GTK_LABEL(self->priv.label_description), ""); |
|
|
|
|
gtk_label_set_text(GTK_LABEL(self->priv.label_comment), ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
id_str = yacos_tag_id_to_str(self->priv.tag_id); |
|
|
|
|
|
|
|
|
|
url = g_strdup_printf("%s?meta&id=%s", self->priv.api.url_base, id_str); |
|
|
|
@ -163,3 +171,13 @@ void yacos_cart_item_fetch_meta(YacosCartItem *self)
|
|
|
|
|
yacos_cart_item_fetch_meta_cb, |
|
|
|
|
self); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void yacos_cart_item_fetch_image(YacosCartItem *self) |
|
|
|
|
{ |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
yacos_tag_id yacos_cart_item_get_id(YacosCartItem *self) |
|
|
|
|
{ |
|
|
|
|
return self->priv.tag_id; |
|
|
|
|
} |
|
|
|
|