summaryrefslogtreecommitdiff
path: root/src/gui/editem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editem.c')
-rw-r--r--src/gui/editem.c61
1 files changed, 46 insertions, 15 deletions
diff --git a/src/gui/editem.c b/src/gui/editem.c
index 790ef0c..c8befec 100644
--- a/src/gui/editem.c
+++ b/src/gui/editem.c
@@ -210,13 +210,19 @@ void register_editor_item(GEditorItem *item)
void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary)
{
- GEditorItem *iter; /* Boucle de parcours */
+ GEditorItem *iter; /* Boucle de parcours */
+ GEditorItemClass *klass; /* Classe correspondante */
g_object_set_data(ref, "current_binary", binary);
editem_list_for_each(iter, _editem_list)
- if (iter->update_binary != NULL)
- iter->update_binary(iter, binary);
+ {
+ klass = G_EDITOR_ITEM_GET_CLASS(iter);
+
+ if (klass->update_binary != NULL)
+ klass->update_binary(iter, binary);
+
+ }
}
@@ -236,13 +242,20 @@ void change_editor_items_current_binary(GObject *ref, GLoadedBinary *binary)
void change_editor_items_current_view(GObject *ref, GtkViewPanel *view)
{
- GEditorItem *iter; /* Boucle de parcours */
+ GEditorItem *iter; /* Boucle de parcours */
+ GEditorItemClass *klass; /* Classe correspondante */
g_object_set_data(ref, "current_view", view);
editem_list_for_each(iter, _editem_list)
- if (iter->update_view != NULL)
- iter->update_view(iter, view);
+ {
+ klass = G_EDITOR_ITEM_GET_CLASS(iter);
+
+ if (klass->update_view != NULL)
+ klass->update_view(iter, view);
+
+
+ }
}
@@ -262,11 +275,17 @@ void change_editor_items_current_view(GObject *ref, GtkViewPanel *view)
void change_editor_items_current_view_content(GtkViewPanel *view)
{
- GEditorItem *iter; /* Boucle de parcours */
+ GEditorItem *iter; /* Boucle de parcours */
+ GEditorItemClass *klass; /* Classe correspondante */
editem_list_for_each(iter, _editem_list)
- if (iter->update_content != NULL)
- iter->update_content(iter, view);
+ {
+ klass = G_EDITOR_ITEM_GET_CLASS(iter);
+
+ if (klass->update_content != NULL)
+ klass->update_content(iter, view);
+
+ }
}
@@ -286,11 +305,17 @@ void change_editor_items_current_view_content(GtkViewPanel *view)
void focus_address_in_editor_items(vmpa_t addr, GtkWidget *source)
{
- GEditorItem *iter; /* Boucle de parcours */
+ GEditorItem *iter; /* Boucle de parcours */
+ GEditorItemClass *klass; /* Classe correspondante */
editem_list_for_each(iter, _editem_list)
- if (iter->focus_addr != NULL && iter->widget != source)
- iter->focus_addr(iter, addr, source);
+ {
+ klass = G_EDITOR_ITEM_GET_CLASS(iter);
+
+ if (klass->focus_addr != NULL && iter->widget != source)
+ klass->focus_addr(iter, addr, source);
+
+ }
}
@@ -309,10 +334,16 @@ void focus_address_in_editor_items(vmpa_t addr, GtkWidget *source)
void update_project_area(GStudyProject *project)
{
- GEditorItem *iter; /* Boucle de parcours */
+ GEditorItem *iter; /* Boucle de parcours */
+ GEditorItemClass *klass; /* Classe correspondante */
editem_list_for_each(iter, _editem_list)
- if (iter->update_project != NULL)
- iter->update_project(iter, project);
+ {
+ klass = G_EDITOR_ITEM_GET_CLASS(iter);
+
+ if (klass->update_project != NULL)
+ klass->update_project(iter, project);
+
+ }
}