diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-03-09 12:55:20 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-03-09 12:55:20 (GMT) |
commit | f8f804cf7ff9a62404b843cf303c762101572784 (patch) | |
tree | c35edc5dc8fb5ded9cc8d975d12a1eac2c3e330a /src/gui/panels/strings.c | |
parent | 235b34006d734d55333a182ffd8bbe7fbf8f54bc (diff) |
Reorganized the whole code dealing with dockable panels.
Diffstat (limited to 'src/gui/panels/strings.c')
-rw-r--r-- | src/gui/panels/strings.c | 51 |
1 files changed, 15 insertions, 36 deletions
diff --git a/src/gui/panels/strings.c b/src/gui/panels/strings.c index 9759e71..0c39b4b 100644 --- a/src/gui/panels/strings.c +++ b/src/gui/panels/strings.c @@ -223,8 +223,20 @@ static void g_strings_panel_init(GStringsPanel *panel) GtkTreeSelection *select; /* Sélection dans la liste */ bool display; /* Affichage si sélection ? */ + /* Eléments de base */ + base = G_EDITOR_ITEM(panel); + base->name = PANEL_STRINGS_ID; + + pitem = G_PANEL_ITEM(panel); + + pitem->personality = PIP_SINGLETON; + pitem->lname = _("Strings"); + pitem->path = "SE"; + + /* Représentation graphique */ + base->widget = gtk_scrolled_window_new(NULL, NULL); gtk_widget_show(base->widget); @@ -234,10 +246,6 @@ static void g_strings_panel_init(GStringsPanel *panel) ref = G_OBJECT(base->widget); g_object_set_data(ref, "panel", panel); - pitem = G_PANEL_ITEM(panel); - - pitem->personality = PIP_SINGLETON; - /* Partie chaînes */ store = gtk_tree_store_new(STC_COUNT, G_TYPE_OBJECT, @@ -408,7 +416,7 @@ static void g_strings_panel_finalize(GStringsPanel *panel) /****************************************************************************** * * -* Paramètres : ref = espace de référencement global. * +* Paramètres : - * * * * Description : Crée un panneau d'affichage des chaînes. * * * @@ -418,46 +426,17 @@ static void g_strings_panel_finalize(GStringsPanel *panel) * * ******************************************************************************/ -GEditorItem *g_strings_panel_new(GObject *ref) +GPanelItem *g_strings_panel_new(void) { - GEditorItem *result; /* Structure à retourner */ + GPanelItem *result; /* Structure à retourner */ result = g_object_new(G_TYPE_STRINGS_PANEL, NULL); - g_panel_item_init_ext(G_PANEL_ITEM(result), ref, PANEL_STRINGS_ID, - _("Strings"), G_EDITOR_ITEM(result)->widget, "SE"); - return result; } -/****************************************************************************** -* * -* Paramètres : ref = espace de référencement global. * -* * -* Description : Construit et intègre un panneau d'affichage des chaînes. * -* * -* Retour : Adresse du panneau mis en place. * -* * -* Remarques : - * -* * -******************************************************************************/ - -GPanelItem *create_strings_panel(GObject *ref) -{ - GEditorItem *result; /* Elément réactif à renvoyer */ - - result = g_strings_panel_new(ref); - - /* Enregistre correctement le tout */ - register_editor_item(result); - - return G_PANEL_ITEM(result); - -} - - /* ---------------------------------------------------------------------------------- */ /* AFFICHAGE A L'AIDE D'UNE LISTE */ |