summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ui/grid/grid.rs7
-rw-r--r--src/ui/state.rs1
-rw-r--r--src/ui/window.rs5
3 files changed, 2 insertions, 11 deletions
diff --git a/src/ui/grid/grid.rs b/src/ui/grid/grid.rs
index 687a9d9..c4dbc3b 100644
--- a/src/ui/grid/grid.rs
+++ b/src/ui/grid/grid.rs
@@ -520,13 +520,6 @@ impl Grid {
}
}
-impl Drop for Grid {
- fn drop(&mut self) {
- // TODO(ville): Test that we release all resources.
- self.eb.destroy();
- }
-}
-
/// Handler for grid's drawingarea's draw event. Draws the internal cairo
/// context (`ctx`) surface to the `cr`.
fn drawingarea_draw(cr: &cairo::Context, ctx: &mut Context) {
diff --git a/src/ui/state.rs b/src/ui/state.rs
index fbde150..713dd67 100644
--- a/src/ui/state.rs
+++ b/src/ui/state.rs
@@ -203,7 +203,6 @@ impl UIState {
}
fn grid_destroy(&mut self, grid: &i64) {
- // TODO(ville): Make sure all grid resources are freed.
self.grids.remove(grid).unwrap(); // Drop grid.
if self.windows.contains_key(grid) {
self.windows.remove(grid).unwrap(); // Drop window that the grid belongs to.
diff --git a/src/ui/window.rs b/src/ui/window.rs
index 3418980..7fddbb2 100644
--- a/src/ui/window.rs
+++ b/src/ui/window.rs
@@ -163,17 +163,16 @@ impl Window {
impl Drop for Window {
fn drop(&mut self) {
- // TODO(ville): Test that we release all resources.
if let Some(child) = self.frame.get_child() {
// We don't want to destroy the child widget, so just remove the child from our
// container.
self.frame.remove(&child);
}
- self.frame.destroy();
+ self.fixed.remove(&self.frame);
if let Some(ref win) = self.external_win {
- win.destroy();
+ win.close();
}
}
}