-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support configurable extra plugin lookup path #2693
Changes from all commits
338888e
112d624
c150dad
0bc825a
aaaba6d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ local order = { | |
"highlight_options", | ||
"change_font", | ||
"hyphenation", | ||
"read_timer", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to prefer this plugin to be placed in tools? IMO, it's more like a "reading experience". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does seem a touch out of place with the other rendering options. There should at least be a separator in between if it goes in the typeset menu. I didn't want to make things controversial by changing the menu around (and I didn't have time to think about it anyway) but it should be something more like -- rendering stuff
"page_overlap",
"switch_zoom_mode",
"set_render_style",
--sep, I don't think highlight options go with anything else really
"highlight_options",
--sep, font-related (typeset) stuff
"change_font",
"floating_punctuation",
"hyphenation",
--sep, "reading experience" stuff
"read_timer"
--speed reading? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Firstly, for consistent reason. It's placed under tools tab in filemanager. We should either keep it consistent between apps or only enable it in reader. Secondly, that tab is named typeset, which means anything that controls rendering results. A timer doesn't fit into this category. With the new UX proposed by @baskerville and the new separator feature, we can combine navigation and typeset into one read menu, then it makes more sense to put timer there. |
||
}, | ||
setting = { | ||
"read_from_right_to_left", | ||
|
@@ -43,6 +42,7 @@ local order = { | |
"status_bar", | ||
}, | ||
tools = { | ||
"read_timer", | ||
"calibre_wireless_connection", | ||
"evernote", | ||
"goodreads", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
local InfoMessage = require("ui/widget/infomessage") | ||
-- This is a debug plugin, remove the following if block to enable it | ||
if true then | ||
return { disabled = true, } | ||
end | ||
|
||
local InfoMessage = require("ui/widget/infomessage") -- luacheck:ignore | ||
local UIManager = require("ui/uimanager") | ||
local WidgetContainer = require("ui/widget/container/widgetcontainer") | ||
local _ = require("gettext") | ||
|
||
local Hello = WidgetContainer:new{ | ||
name = 'Hello', | ||
is_doc_only = false, | ||
disabled = true, -- This is a debug plugin | ||
} | ||
|
||
function Hello:init() | ||
self.ui.menu:registerToMainMenu(self) | ||
end | ||
|
||
function Hello:addToMainMenu(tab_item_table) | ||
table.insert(tab_item_table.plugins, { | ||
function Hello:addToMainMenu(menu_items) | ||
menu_items.hello_world = { | ||
text = _("Hello World"), | ||
callback = function() | ||
UIManager:show(InfoMessage:new{ | ||
text = _("Hello, docless plugin world"), | ||
text = _("Hello, plugin world"), | ||
}) | ||
end, | ||
}) | ||
} | ||
end | ||
|
||
return Hello |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
local Device = require("device") | ||
|
||
local command | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we directly add DataStorage:getDataDir()/plugins/ to this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't really expect many people to use this feature right now. We can always add a default path to the list if it turns out to be a popular feature. My preference is to not introduce this extra lookup overhead to all users for now.