diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-06-13 14:05:50 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-06-13 14:05:50 (GMT) |
commit | ecb9ecc486049fe3bec6ecaeeb27f08f67bf0ef0 (patch) | |
tree | c4d84575960583ad61981adef6ed8f958ef9d817 /src/gtkext/gtkdockpanel.c | |
parent | fc8324b66dee0abf0a5e5e3cc570e1aed96b80c8 (diff) |
Made the GUI offer to change the view of the current analyzed binary.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@73 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/gtkdockpanel.c')
-rw-r--r-- | src/gtkext/gtkdockpanel.c | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/src/gtkext/gtkdockpanel.c b/src/gtkext/gtkdockpanel.c index e7bd14b..41b71aa 100644 --- a/src/gtkext/gtkdockpanel.c +++ b/src/gtkext/gtkdockpanel.c @@ -514,23 +514,35 @@ static void gtk_dock_panel_drag_end_cb(GtkDockPanel *dpanel, GdkDragContext *con /****************************************************************************** * * -* Paramètres : dpanel = composant à l'origine de la manoeuvre. * -* context = contexte de l'opération de "Drag and drop". * -* data = adresse non utilisée ici. * +* Paramètres : dpanel = composant dont le contenu est à parcourir. * +* name = désignation humaine du membre à retrouver. * * * -* Description : Nettoie les traces d'un "Drag and drop". * +* Description : Retrouve un membre du panneau d'après son nom. * * * -* Retour : - * +* Retour : Membre trouvé ou NULL si aucun. * * * * Remarques : - * * * ******************************************************************************/ -static void gtk_dock_panel_drag_data_delete_cb(GtkDockPanel *dpanel, GdkDragContext *context, gpointer data) +GtkDockItem *gtk_dock_panel_item_from_name(GtkDockPanel *dpanel, const char *name) { + GtkDockItem *result; /* Trouvaille à remonter */ + GList *iter; /* Boucle de parcours */ + const char *tmp; /* Autre nom à consulter */ + result = NULL; + for (iter = dpanel->ditems; iter != NULL && result == NULL; iter = g_list_next(iter)) + { + tmp = gtk_dock_item_get_name(GTK_DOCK_ITEM(iter->data)); + + if (strcmp(name, tmp) == 0) + result = GTK_DOCK_ITEM(iter->data); + } + + return result; } @@ -574,6 +586,32 @@ void gtk_dock_panel_add_item(GtkDockPanel *dpanel, GtkDockItem *ditem) * * * Paramètres : dpanel = composant GTK à mettre à jour. * * ditem = nouvel élément à sortir. * +* panel = nouveau panneau à présenter. * +* * +* Description : Remplace le panneau d'un membre actuellement affiché. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void gtk_dock_panel_replace_item_content(GtkDockPanel *dpanel, GtkDockItem *ditem, GtkWidget *panel) +{ + gtk_widget_ref(gtk_dock_item_get_panel(ditem)); + gtk_container_remove(GTK_CONTAINER(dpanel->notebook), gtk_dock_item_get_panel(ditem)); + + gtk_dock_item_set_panel(ditem, panel); + + gtk_container_add(GTK_CONTAINER(dpanel->notebook), gtk_dock_item_get_panel(ditem)); + +} + + +/****************************************************************************** +* * +* Paramètres : dpanel = composant GTK à mettre à jour. * +* ditem = nouvel élément à sortir. * * * * Description : Supprime un paquet d'informations à la station dockable. * * * @@ -593,6 +631,7 @@ void gtk_dock_panel_remove_item(GtkDockPanel *dpanel, GtkDockItem *ditem) printf("[rem %p from %p] list len :: %u\n", ditem, dpanel, g_list_length(dpanel->ditems)); + gtk_widget_ref(gtk_dock_item_get_panel(ditem)); gtk_container_remove(GTK_CONTAINER(dpanel->notebook), gtk_dock_item_get_panel(ditem)); //gtk_notebook_remove_page(dpanel->notebook, pos); |