diff options
Diffstat (limited to 'src/gui/tb/portions.c')
-rw-r--r-- | src/gui/tb/portions.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/tb/portions.c b/src/gui/tb/portions.c index 202cd43..a8eb606 100644 --- a/src/gui/tb/portions.c +++ b/src/gui/tb/portions.c @@ -221,6 +221,7 @@ GEditorItem *create_portions_tb_item(GObject *ref) static void change_portions_tbitem_current_content(GEditorItem *item, GLoadedContent *old, GLoadedContent *new) { GLoadedBinary *binary; /* Autre version de l'instance */ + GtkWidget *widget; /* Elément graphique principal */ GtkBinaryStrip *strip; /* Bande pour binaire */ if (G_IS_LOADED_BINARY(new)) @@ -228,9 +229,17 @@ static void change_portions_tbitem_current_content(GEditorItem *item, GLoadedCon else binary = NULL; - strip = GTK_BINARY_STRIP(g_object_get_data(G_OBJECT(item->widget), "strip")); + widget = g_editor_item_get_widget(item); - gtk_binary_strip_attach(strip, binary); + strip = GTK_BINARY_STRIP(g_object_get_data(G_OBJECT(widget), "strip")); + + if (binary != NULL) + { + gtk_binary_strip_attach(strip, binary); + gtk_widget_show(GTK_WIDGET(widget)); + } + else + gtk_widget_hide(GTK_WIDGET(widget)); } |