Remove wibox.hierarchy:get_parent()

It's unused.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2015-09-06 09:57:52 +02:00
parent 5406ac6fe1
commit 45323f2801
2 changed files with 0 additions and 15 deletions

View File

@ -96,11 +96,6 @@ function hierarchy.new(context, widget, width, height, redraw_callback, layout_c
return hierarchy_new(context, widget, width, height, redraw_callback, layout_callback, callback_arg, nil) return hierarchy_new(context, widget, width, height, redraw_callback, layout_callback, callback_arg, nil)
end end
--- Get the parent hierarchy of this widget hierarchy (or nil).
function hierarchy:get_parent()
return self._parent
end
--- Get the widget that this hierarchy manages. --- Get the widget that this hierarchy manages.
function hierarchy:get_widget() function hierarchy:get_widget()
return self._widget return self._widget

View File

@ -34,10 +34,6 @@ describe("wibox.hierarchy", function()
instance = hierarchy.new(context, widget, 10, 20, nop, nop) instance = hierarchy.new(context, widget, 10, 20, nop, nop)
end) end)
it("get_parent", function()
assert.is_nil(instance:get_parent())
end)
it("get_widget", function() it("get_widget", function()
assert.is.equal(instance:get_widget(), widget) assert.is.equal(instance:get_widget(), widget)
end) end)
@ -155,12 +151,6 @@ describe("wibox.hierarchy", function()
hierarchy_child = children[1] hierarchy_child = children[1]
end) end)
it("get_parent", function()
assert.is.equal(hierarchy_child:get_parent(), hierarchy_intermediate)
assert.is.equal(hierarchy_intermediate:get_parent(), hierarchy_parent)
assert.is_nil(hierarchy_parent:get_parent())
end)
it("get_widget", function() it("get_widget", function()
assert.is.equal(hierarchy_child:get_widget(), child) assert.is.equal(hierarchy_child:get_widget(), child)
assert.is.equal(hierarchy_intermediate:get_widget(), intermediate) assert.is.equal(hierarchy_intermediate:get_widget(), intermediate)