summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-08-05 21:25:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-08-05 21:25:55 (GMT)
commitb5c6bcea25b1b840fd6c8e89a4a3c9fbd83ba84b (patch)
treede253301956b1cf249ae27cf1af146c3184af67f /src/gui/panels
parentd0a25ef16eef28d0cc355b00f5874c6c28004c78 (diff)
Run updates on collected items activity changes.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@567 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui/panels')
-rw-r--r--src/gui/panels/bookmarks.c1
-rw-r--r--src/gui/panels/history.c19
2 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/panels/bookmarks.c b/src/gui/panels/bookmarks.c
index 5b0649c..977cbc9 100644
--- a/src/gui/panels/bookmarks.c
+++ b/src/gui/panels/bookmarks.c
@@ -530,6 +530,7 @@ static void reload_bookmarks_into_treeview(GBookmarksPanel *panel, GLoadedBinary
for (b = g_list_first(items); b != NULL; b = g_list_next(b))
{
bookmark = G_DB_BOOKMARK(b->data);
+ if (!g_db_item_is_active(G_DB_ITEM(bookmark))) continue;
addr = g_db_bookmark_get_address(bookmark);
diff --git a/src/gui/panels/history.c b/src/gui/panels/history.c
index 7d0cdd5..74945c7 100644
--- a/src/gui/panels/history.c
+++ b/src/gui/panels/history.c
@@ -450,11 +450,13 @@ static void change_history_panel_current_binary(GHistoryPanel *panel, GLoadedBin
static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *item, GHistoryPanel *panel)
{
GtkTreeModel *model; /* Modèle de gestion courant */
- GtkTreeIter iter; /* Boucle de parcours */
GtkTreeSelection *selection; /* Nouvelle sélection à établir*/
+ GtkTreeIter iter; /* Boucle de parcours */
model = GTK_TREE_MODEL(panel->store);
+ selection = gtk_tree_view_get_selection(panel->treeview);
+
/* Mise à jour de la liste affichée */
bool find_changed_item(GtkTreeModel *_model, GDbItem *target, GtkTreeIter *_found)
@@ -544,11 +546,14 @@ static void on_history_changed(GDbCollection *collec, DBAction action, GDbItem *
gtk_tree_model_foreach(model, (GtkTreeModelForeachFunc)find_last_active, &iter);
- selection = gtk_tree_view_get_selection(panel->treeview);
gtk_tree_selection_select_iter(selection, &iter);
}
+ /* Actualisation des accès */
+
+ on_history_selection_change(selection, panel);
+
}
@@ -620,6 +625,16 @@ static void on_history_selection_change(GtkTreeSelection *selection, GHistoryPan
}
+ else
+ {
+ button = GTK_WIDGET(g_object_get_data(G_OBJECT(panel), "undo"));
+ gtk_widget_set_sensitive(button, FALSE);
+
+ button = GTK_WIDGET(g_object_get_data(G_OBJECT(panel), "redo"));
+ gtk_widget_set_sensitive(button, FALSE);
+
+ }
+
}