summaryrefslogtreecommitdiff
path: root/src/gui/panels/errors.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels/errors.c')
-rw-r--r--src/gui/panels/errors.c89
1 files changed, 55 insertions, 34 deletions
diff --git a/src/gui/panels/errors.c b/src/gui/panels/errors.c
index 905d87c..d567511 100644
--- a/src/gui/panels/errors.c
+++ b/src/gui/panels/errors.c
@@ -137,7 +137,10 @@ static void g_error_panel_dispose(GErrorPanel *);
static void g_error_panel_finalize(GErrorPanel *);
/* Fournit le nom interne attribué à l'élément réactif. */
-static char *g_error_panel_get_key(const GErrorPanel *);
+static char *g_error_panel_class_get_key(const GErrorPanelClass *);
+
+/* Indique le chemin initial de la localisation d'un panneau. */
+static char *g_error_panel_class_get_path(const GErrorPanelClass *);
/* Organise le tri des erreurs présentées. */
static gint sort_errors_in_panel(GtkTreeModel *, GtkTreeIter *, GtkTreeIter *, gpointer);
@@ -200,7 +203,7 @@ G_DEFINE_TYPE_WITH_CODE(GErrorPanel, g_error_panel, G_TYPE_PANEL_ITEM,
/******************************************************************************
* *
-* Paramètres : klass = classe à initialiser. *
+* Paramètres : class = classe à initialiser. *
* *
* Description : Initialise la classe des panneaux d'affichage des erreurs. *
* *
@@ -210,47 +213,47 @@ G_DEFINE_TYPE_WITH_CODE(GErrorPanel, g_error_panel, G_TYPE_PANEL_ITEM,
* *
******************************************************************************/
-static void g_error_panel_class_init(GErrorPanelClass *klass)
+static void g_error_panel_class_init(GErrorPanelClass *class)
{
GObjectClass *object; /* Autre version de la classe */
GEditorItemClass *item; /* Encore une autre vision... */
- gchar *filename; /* Chemin d'accès à utiliser */
GPanelItemClass *panel; /* Version parente de la classe*/
+ gchar *filename; /* Chemin d'accès à utiliser */
- object = G_OBJECT_CLASS(klass);
+ object = G_OBJECT_CLASS(class);
object->dispose = (GObjectFinalizeFunc/* ! */)g_error_panel_dispose;
object->finalize = (GObjectFinalizeFunc)g_error_panel_finalize;
- item = G_EDITOR_ITEM_CLASS(klass);
+ item = G_EDITOR_ITEM_CLASS(class);
- item->get_key = (get_item_key_fc)g_error_panel_get_key;
+ item->get_key = (get_item_key_fc)g_error_panel_class_get_key;
item->change_content = (change_item_content_fc)change_error_panel_current_content;
+ panel = G_PANEL_ITEM_CLASS(class);
+
+ panel->get_path = (get_panel_path_fc)g_error_panel_class_get_path;
+
+ panel->gid = setup_tiny_global_work_group(1);
+
filename = find_pixmap_file("error_file.png");
assert(filename != NULL);
- klass->format_img = cairo_image_surface_create_from_png(filename);
+ class->format_img = cairo_image_surface_create_from_png(filename);
filename = find_pixmap_file("error_cpu.png");
assert(filename != NULL);
- klass->disass_img = cairo_image_surface_create_from_png(filename);
+ class->disass_img = cairo_image_surface_create_from_png(filename);
filename = find_pixmap_file("error_display.png");
assert(filename != NULL);
- klass->output_img = cairo_image_surface_create_from_png(filename);
+ class->output_img = cairo_image_surface_create_from_png(filename);
g_free(filename);
- panel = G_PANEL_ITEM_CLASS(klass);
-
- panel->unique = true;
-
- panel->gid = setup_tiny_global_work_group(1);
-
}
@@ -280,15 +283,10 @@ static void g_error_panel_init(GErrorPanel *panel)
pitem = G_PANEL_ITEM(panel);
- pitem->personality = PIP_SINGLETON;
-
pitem->widget = G_NAMED_WIDGET(gtk_built_named_widget_new_for_panel(_("Errors"),
_("Disassembling errors"),
PANEL_ERRORS_ID));
- pitem->dock_at_startup = true;
- pitem->path = strdup("Ms");
-
/* Compléments propres */
panel->binary = NULL;
@@ -417,44 +415,67 @@ static void g_error_panel_finalize(GErrorPanel *panel)
/******************************************************************************
* *
-* Paramètres : - *
+* Paramètres : class = classe à consulter. *
* *
-* Description : Crée un panneau présentant la liste des erreurs rencontrées. *
+* Description : Fournit le nom interne attribué à l'élément réactif. *
* *
-* Retour : Adresse de la structure mise en place. *
+* Retour : Désignation (courte) de l'élément de l'éditeur. *
* *
* Remarques : - *
* *
******************************************************************************/
-GPanelItem *g_error_panel_new(void)
+static char *g_error_panel_class_get_key(const GErrorPanelClass *class)
{
- GErrorPanel *result; /* Structure à retourner */
+ char *result; /* Description à renvoyer */
- result = g_object_new(G_TYPE_ERROR_PANEL, NULL);
+ result = strdup(PANEL_ERRORS_ID);
- return G_PANEL_ITEM(result);
+ return result;
}
/******************************************************************************
* *
-* Paramètres : panel = instance à consulter. *
+* Paramètres : class = classe à consulter. *
* *
-* Description : Fournit le nom interne attribué à l'élément réactif. *
+* Description : Indique le chemin initial de la localisation d'un panneau. *
* *
-* Retour : Désignation (courte) de l'élément de l'éditeur. *
+* Retour : Chemin fixé associé à la position initiale. *
* *
* Remarques : - *
* *
******************************************************************************/
-static char *g_error_panel_get_key(const GErrorPanel *panel)
+static char *g_error_panel_class_get_path(const GErrorPanelClass *class)
{
- char *result; /* Description à renvoyer */
+ char *result; /* Emplacement à retourner */
- result = strdup(PANEL_ERRORS_ID);
+ result = strdup("Ms");
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : - *
+* *
+* Description : Crée un panneau présentant la liste des erreurs rencontrées. *
+* *
+* Retour : Adresse de la structure mise en place. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+GPanelItem *g_error_panel_new(void)
+{
+ GPanelItem *result; /* Structure à retourner */
+
+ result = g_object_new(G_TYPE_ERROR_PANEL, NULL);
return result;