summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panels')
-rw-r--r--src/gui/panels/view.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/panels/view.c b/src/gui/panels/view.c
index 26dc820..391c9c6 100644
--- a/src/gui/panels/view.c
+++ b/src/gui/panels/view.c
@@ -29,7 +29,10 @@
#include "../panel-int.h"
+#include "../core/global.h"
+#include "../core/items.h"
#include "../../gtkext/named.h"
+#include "../../plugins/pglist.h"
@@ -250,12 +253,24 @@ static char *g_view_panel_class_get_path(const GViewPanelClass *class)
GPanelItem *g_view_panel_new(GNamedWidget *widget)
{
GPanelItem *result; /* Structure à retourner */
+ GtkTiledGrid *grid; /* Composant d'affichage */
result = g_object_new(G_TYPE_VIEW_PANEL, NULL);
result->widget = widget;
g_object_ref(G_OBJECT(widget));
+ grid = get_tiled_grid();
+
+ g_signal_connect_swapped(result, "dock-request", G_CALLBACK(gtk_tiled_grid_add), grid);
+ g_signal_connect_swapped(result, "undock-request", G_CALLBACK(gtk_tiled_grid_remove), grid);
+
+ gtk_dockable_setup_dnd(GTK_DOCKABLE(result));
+
+ register_editor_item(G_EDITOR_ITEM(result));
+
+ notify_panel_creation(result);
+
return result;
}