summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-12-08 22:03:16 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-12-08 22:03:16 (GMT)
commitda97f9c3b608a238a5862bd67992f65866e1df4f (patch)
tree8da072a0ff21c2e14b3275055abf929409f662dd /src/gui/panels
parent5222fc9258a2b3eb43f836bda3eb6e56b581de33 (diff)
Displayed loaded content in its view panel.
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;
}