-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Unify context menus #9257
Unify context menus #9257
Conversation
@tamland do you think that after this PR it will be possible to extend that so it can be accessed from JSON RPC ? |
Awesome, very good step into the right direction. I really hated all those add(menuItem) scattered everywhere. |
Awesome indeed, this adds a wide range of possibilities. |
@tamland and consider razzeee@222ae61 |
yes, skin related. |
Nice work (haven't looked at all the changes). Personally I'd prefer the I'm also not a huge fan of having a huge list of "interface implementations" hardcoded in the manager initialization. Every implementation should be injected into the manager from some place where it belongs. But that's not easy to do (which is why I haven't solved it yet either in my media importing stuff). |
one thing to keep an eye on is that if users modify an item in the info views (like slecting a new poster), that the underlying window needs to be notified to update the info of this item as well or it will show the old artwork/name f.e. |
222ae2e
to
e984e95
Compare
@Montellese If it wasn't clear, the implementations here was just proof of concept. I don't intend to have them all in one huge header file! The final connection of implementation the manager however is by design done in a central place atm. This is to keep it simple and straight forward, and it's required to have complete control of ordering here. @razzeee I've take the liberty of refactoring the info menus because that turned into way too much boilerplate too fast:) As @Montellese said we should try to find appropriate places to keep the implementations. Keep them coming! |
e984e95
to
7946786
Compare
@tamland: Ah I didn't realize that order matters. Maybe this should be documented in a comment somewhere near the definition or initialization of |
@tamland We will also need a xcode and vs sync when we're done with everything. |
6928b5a
to
f35e665
Compare
I've added a few more menus. I think I'll stop now, otherwise I'll never get done:) Still looking for xcode. Anyone? @anaconda? |
Should I look at vs sync again if you say your done for now? |
Shouldn't be necessary. I've done it manually |
@tamland Last 3 commits here add the new files to Xcode: |
f35e665
to
02d5604
Compare
Thanks @anaconda! |
02d5604
to
6151e66
Compare
jenkins build this please |
6151e66
to
8bd8a0e
Compare
Is this all "under the hood" or does it need any changes to the wiki? (granted, the wiki isn't entirely up-to-date on context menu options as-is) |
Mostly 'under the hood', yes, but there's a few smaller adjustments to the some of the current menus. There will likely be more changes before Krypton though, so I would wait with updating the wiki until it 'settle'. |
That sounds good. Those will probably be picked up as we start to take new screenshots for everything, due to the new skin :) |
context menu cleanup after #9257
if (pItem && pItem->GetVideoInfoTag()->m_playCount > 0) | ||
return OnContextButton(m_viewControl.GetSelectedItem(),CONTEXT_BUTTON_MARK_UNWATCHED); | ||
|
||
if (pItem && pItem->HasAddonInfo()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This is a start at fixing current context menu code and move it to a global item based system (which will also support arbitrary nesting of menus). We already have this for addons, so this PR simply hooks up this system to allow non-addon menus to be added, and adds Interoperability with the old system.
Also adds context menu support to directory providers and ports a few menus as examples.
Next: port all current context menus to
IContextMenuItem
implementations and drop the old ones. Volunteers?:)