Rename selected and unselected to select and unselect + add 'page::forward' and 'page::backwards' signals
This commit is contained in:
parent
f161aa2092
commit
c45e64b795
|
@ -167,7 +167,7 @@ local function app_widget(self, app)
|
||||||
_self._private.active_widget:unselect()
|
_self._private.active_widget:unselect()
|
||||||
end
|
end
|
||||||
_self._private.active_widget = self
|
_self._private.active_widget = self
|
||||||
self:emit_signal("selected")
|
self:emit_signal("select")
|
||||||
self.selected = true
|
self.selected = true
|
||||||
|
|
||||||
if _self.app_template == nil then
|
if _self.app_template == nil then
|
||||||
|
@ -178,7 +178,7 @@ local function app_widget(self, app)
|
||||||
end
|
end
|
||||||
|
|
||||||
function widget:unselect()
|
function widget:unselect()
|
||||||
self:emit_signal("unselected")
|
self:emit_signal("unselect")
|
||||||
self.selected = false
|
self.selected = false
|
||||||
_self._private.active_widget = nil
|
_self._private.active_widget = nil
|
||||||
|
|
||||||
|
@ -427,6 +427,7 @@ function app_launcher:set_favorites(favorites)
|
||||||
self.favorites = favorites
|
self.favorites = favorites
|
||||||
self:sort_apps()
|
self:sort_apps()
|
||||||
self:search() -- Refresh the app list
|
self:search() -- Refresh the app list
|
||||||
|
-- self:search() -- Refresh the app list
|
||||||
end
|
end
|
||||||
|
|
||||||
function app_launcher:search()
|
function app_launcher:search()
|
||||||
|
@ -554,6 +555,8 @@ function app_launcher:page_forward(dir)
|
||||||
end
|
end
|
||||||
app:select()
|
app:select()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:emit_signal("page::forward", dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
function app_launcher:page_backward(dir)
|
function app_launcher:page_backward(dir)
|
||||||
|
@ -597,6 +600,8 @@ function app_launcher:page_backward(dir)
|
||||||
app = self:get_grid().children[#self:get_grid().children]
|
app = self:get_grid().children[#self:get_grid().children]
|
||||||
end
|
end
|
||||||
app:select()
|
app:select()
|
||||||
|
|
||||||
|
self:emit_signal("page::backward", dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
function app_launcher:show()
|
function app_launcher:show()
|
||||||
|
|
Loading…
Reference in New Issue