summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/panels/history.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/panels/history.c b/src/gui/panels/history.c
index ac33c2c..cfea509 100644
--- a/src/gui/panels/history.c
+++ b/src/gui/panels/history.c
@@ -280,6 +280,7 @@ static void change_history_panel_current_content(GHistoryPanel *panel, GLoadedCo
GList *items; /* Liste des éléments groupés */
GList *i; /* Boucle de parcours #2 */
GDbItem *item; /* Elément à intégrer */
+ char *label; /* Etiquette de représentation */
GtkTreeIter iter; /* Point d'insertion */
if (G_IS_LOADED_BINARY(new))
@@ -335,14 +336,18 @@ static void change_history_panel_current_content(GHistoryPanel *panel, GLoadedCo
{
item = G_DB_ITEM(i->data);
+ label = g_db_item_get_label(item);
+
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
HTC_ITEM, item,
//HTC_PICTURE, G_BOOKMARKS_PANEL_GET_CLASS(panel)->bookmark_img,
HTC_FOREGROUND, g_db_item_is_active(item) ? NULL : "grey",
- HTC_LABEL, g_db_item_get_label(item),
+ HTC_LABEL, label,
-1);
+ free(label);
+
}
g_signal_connect_to_main(collections[k], "content-changed", G_CALLBACK(on_history_changed), panel,
@@ -383,6 +388,7 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
GtkListStore *store; /* Modèle de gestion courant */
GtkTreeModel *model; /* Modèle de gestion générique */
GtkTreeSelection *selection; /* Nouvelle sélection à établir*/
+ char *label; /* Etiquette de représentation */
GtkTreeIter iter; /* Boucle de parcours */
builder = G_PANEL_ITEM(panel)->builder;
@@ -428,14 +434,18 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
{
case DBA_ADD_ITEM:
+ label = g_db_item_get_label(item);
+
gtk_list_store_append(store, &iter);
gtk_list_store_set(store, &iter,
HTC_ITEM, item,
//HTC_PICTURE, G_BOOKMARKS_PANEL_GET_CLASS(panel)->bookmark_img,
HTC_FOREGROUND, g_db_item_is_active(item) ? NULL : "grey",
- HTC_LABEL, g_db_item_get_label(item),
+ HTC_LABEL, label,
-1);
+ free(label);
+
break;
case DBA_REM_ITEM: