summaryrefslogtreecommitdiff
path: root/src/gui/panels/history.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-25 22:20:25 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-25 22:20:25 (GMT)
commit6ed1e4110eb19b78f76154aa095a74414531f04c (patch)
treed1c3562cb6e180baff3c388a3bb3574b0a02213b /src/gui/panels/history.c
parent3dc843b3f7991dcd738a30821ff56c7fe13f1094 (diff)
Prepared history for database items.
Diffstat (limited to 'src/gui/panels/history.c')
-rw-r--r--src/gui/panels/history.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/panels/history.c b/src/gui/panels/history.c
index 57e6a14..df3fde1 100644
--- a/src/gui/panels/history.c
+++ b/src/gui/panels/history.c
@@ -330,6 +330,7 @@ static void change_history_panel_current_content(GHistoryPanel *panel, GLoadedCo
{
g_db_collection_rlock(collections[k]);
+ /*
items = g_db_collection_get_items(collections[k]);
for (i = g_list_first(items); i != NULL; i = g_list_next(i))
@@ -342,13 +343,14 @@ static void change_history_panel_current_content(GHistoryPanel *panel, GLoadedCo
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_FOREGROUND, g_db_item_is_enabled(item) ? NULL : "grey",
HTC_LABEL, label,
-1);
free(label);
}
+ */
//g_signal_connect_to_main(collections[k], "content-changed", G_CALLBACK(on_history_changed), panel,
// g_cclosure_user_marshal_VOID__ENUM_OBJECT);
@@ -440,7 +442,7 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
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_FOREGROUND, g_db_item_is_enabled(item) ? NULL : "grey",
HTC_LABEL, label,
-1);
@@ -459,7 +461,7 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
if (find_changed_item(model, item, &iter))
gtk_list_store_set(store, &iter,
- HTC_FOREGROUND, g_db_item_is_active(item) ? NULL : "grey",
+ HTC_FOREGROUND, g_db_item_is_enabled(item) ? NULL : "grey",
-1);
break;
@@ -480,7 +482,7 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
gtk_tree_model_get(_model, _iter, HTC_ITEM, &item, -1);
- active = g_db_item_is_active(item);
+ active = g_db_item_is_enabled(item);
g_object_unref(G_OBJECT(item));
@@ -566,10 +568,10 @@ static void on_history_selection_change(GtkTreeSelection *selection, GHistoryPan
gtk_tree_model_get(model, &iter, HTC_ITEM, &item, -1);
button = GTK_WIDGET(gtk_builder_get_object(builder, "undo"));
- gtk_widget_set_sensitive(button, g_db_item_is_active(item));
+ gtk_widget_set_sensitive(button, g_db_item_is_enabled(item));
button = GTK_WIDGET(gtk_builder_get_object(builder, "redo"));
- gtk_widget_set_sensitive(button, !g_db_item_is_active(item));
+ gtk_widget_set_sensitive(button, !g_db_item_is_enabled(item));
g_object_unref(G_OBJECT(item));