diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-12-05 00:39:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-12-05 00:39:57 (GMT) |
commit | 1e3fa9b79ebe55698e2aa7d5484baec7e8400a8f (patch) | |
tree | c3581ceb7f8586f2f6822de563927a1246dd33a5 /src/gtkext | |
parent | 6122bb7f34b178d4c07285adae16afcc55294b1f (diff) |
Rewritten the whole API dealing with panels.
Diffstat (limited to 'src/gtkext')
-rw-r--r-- | src/gtkext/tiledgrid.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gtkext/tiledgrid.c b/src/gtkext/tiledgrid.c index 5287352..22b2680 100644 --- a/src/gtkext/tiledgrid.c +++ b/src/gtkext/tiledgrid.c @@ -884,11 +884,11 @@ void gtk_tiled_grid_set_default_main_panel(GtkTiledGrid *tgrid, GPanelItem *pane void gtk_tiled_grid_add(GtkTiledGrid *tgrid, GPanelItem *panel) { - const char *path; /* Chemin d'accès */ + char *path; /* Chemin d'accès */ char *name; /* Nom à donner à l'onglet */ grid_tile_t *tile; /* Tuile d'accueil */ - path = gtk_panel_item_get_path(panel); + path = gtk_panel_item_class_get_path(G_PANEL_ITEM_GET_CLASS(panel)); if (!is_valid_tile_path(path)) { @@ -904,7 +904,7 @@ void gtk_tiled_grid_add(GtkTiledGrid *tgrid, GPanelItem *panel) gtk_dock_station_add_dockable(GTK_DOCK_STATION(tile->widget), GTK_DOCKABLE(panel)); - g_panel_item_set_dock_status(panel, true); + g_panel_item_set_dock_at_startup(panel, true); /* Si c'est la toute première fois... */ if (gtk_widget_get_parent(tile->widget) == NULL) @@ -931,6 +931,8 @@ void gtk_tiled_grid_add(GtkTiledGrid *tgrid, GPanelItem *panel) } + free(path); + } @@ -961,7 +963,7 @@ void gtk_tiled_grid_remove(GtkTiledGrid *tgrid, GPanelItem *panel) gtk_dock_station_remove_dockable(GTK_DOCK_STATION(station), GTK_DOCKABLE(panel)); - g_panel_item_set_dock_status(panel, false); + g_panel_item_set_dock_at_startup(panel, false); if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(station)) == 0) { |