diff options
Diffstat (limited to 'src/gui/panels/log.c')
-rw-r--r-- | src/gui/panels/log.c | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/src/gui/panels/log.c b/src/gui/panels/log.c index 7893666..1b8c6bc 100644 --- a/src/gui/panels/log.c +++ b/src/gui/panels/log.c @@ -33,6 +33,7 @@ #include "panel-int.h" +#include "../core/panels.h" @@ -157,16 +158,24 @@ static void g_log_panel_init(GLogPanel *panel) GtkCellRenderer *renderer; /* Moteur de rendu de colonne */ GtkTreeViewColumn *column; /* Colonne de la liste */ - base = G_EDITOR_ITEM(panel); + /* Eléments de base */ - scrolled = gtk_scrolled_window_new(NULL, NULL); - gtk_widget_show(scrolled); + base = G_EDITOR_ITEM(panel); - base->widget = scrolled; + base->name = PANEL_LOG_ID; pitem = G_PANEL_ITEM(panel); pitem->personality = PIP_SINGLETON; + pitem->lname = _("Misc information"); + pitem->path = "S"; + + /* Représentation graphique */ + + scrolled = gtk_scrolled_window_new(NULL, NULL); + gtk_widget_show(scrolled); + + base->widget = scrolled; /* Construction graphique */ @@ -244,7 +253,7 @@ static void g_log_panel_finalize(GLogPanel *panel) /****************************************************************************** * * -* Paramètres : ref = espace de référencement global. * +* Paramètres : - * * * * Description : Crée un panneau d'affichage des messages système. * * * @@ -254,15 +263,12 @@ static void g_log_panel_finalize(GLogPanel *panel) * * ******************************************************************************/ -GEditorItem *g_log_panel_new(GObject *ref) +GPanelItem *g_log_panel_new(void) { - GEditorItem *result; /* Structure à retourner */ + GPanelItem *result; /* Structure à retourner */ result = g_object_new(G_TYPE_LOG_PANEL, NULL); - g_panel_item_init_ext(G_PANEL_ITEM(result), ref, PANEL_LOG_ID, - _("Misc information"), G_EDITOR_ITEM(result)->widget, "S"); - return result; } @@ -270,32 +276,6 @@ GEditorItem *g_log_panel_new(GObject *ref) /****************************************************************************** * * -* Paramètres : ref = espace de référencement global. * -* * -* Description : Construit le panneau d'affichage des messages système. * -* * -* Retour : Adresse du panneau mis en place. * -* * -* Remarques : - * -* * -******************************************************************************/ - -GPanelItem *create_log_panel(GObject *ref) -{ - GEditorItem *result; /* Elément réactif à renvoyer */ - - result = g_log_panel_new(ref); - - /* Enregistre correctement le tout */ - register_editor_item(result); - - return G_PANEL_ITEM(result); - -} - - -/****************************************************************************** -* * * Paramètres : type = espèce du message à ajouter. * * msg = message à faire apparaître à l'écran. * * * @@ -332,7 +312,7 @@ static void _log_simple_message(LogMessageType type, char *msg) GPanelItem *item; /* Intermédiaire mis en place */ log_data *data; /* Paramètres à joindre */ - item = g_panel_item_get(PANEL_LOG_ID); + item = get_panel_item_by_name(PANEL_LOG_ID); data = (log_data *)calloc(1, sizeof(log_data)); |