View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006248 | MMW v4 | Framework: Scripts/Extensions | public | 2010-01-14 10:18 | 2010-10-10 02:05 |
Reporter | Ludek | Assigned To | |||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 4.0 | Fixed in Version | 4.0 | ||
Summary | 0006248: Scripting: Ability to add a custom Page to the Track Properties Dialog | ||||
Description | This would be nice addition similar to the ability to add a custom "options" page which is already implemented. | ||||
Additional Information | http://www.mediamonkey.com/forum/viewtopic.php?f=19&t=39340 | ||||
Tags | No tags attached. | ||||
Fixed in build | 1307 | ||||
|
Implemented in build 1301. Documented (and provided with sample scripts) here: http://www.mediamonkey.com/wiki/index.php/ISDBUI::AddPropertiesSheet http://www.mediamonkey.com/wiki/index.php/ISDBUI::DeletePropertiesSheet |
|
Well, this is very nice addition, but rusty promised me in e-mail that you are going to add a possibility for users to customize completely the Properties dialog box, in similar way as CATraxx could do. I don't want to be rude, but I don't like the existing Properties dialog at all and I'd like to change its layout completely. |
|
Can you please elaborate what exactly you propose? Like Hiding Existing Tabs and Create New ones according to Scripter needs or? (Personally Hiding existing Properties tabs and creating new using this implementation would be faster for now without compromising basic function of properties Dialog) Current layout is hard coded and also included in Translations which makes things more difficult to exclude in an instance. But in some cases especially for video files Properties dialog layout needs to be changed according to needs. |
|
As I mentioned, CATraxx has forms that could be user-customized as you could do the same thing using Delphi or Visual Basic or similar RAD tool and their form editor. This means that users could decide which controls want to display, they could move controls where they want, resize them at their will, change their captions... I know that implementing such kind of form editor that could enable modifying of dialog box to all users would be to much to ask, but it is much easier if you enable same thing to scripters using MM API. Fortunately, you are almost there since you are already implemented those two new methods. You just need to enable a possibility for scripters to hide existing tabs, for example you could add one more method HidePropertiesSheet with one argument saying which tab should be hidden. Maybe even better, you could use the newly added method DeletePropertiesSheet, but scripters should know IDs of existing sheets (Basic, Details, Classification...). Now, when you already mentioned translations, it would be nice if scripters somehow could get a translation for existing properties. Let say that I want to add one edit box for entering Title and I want to put a label control next to that edit box saying localized "Title". In that case it could be done using e.g. oLabel.Caption = SDB.Localize("Title"). |
|
Just one more thing, if you decide to implement removing of existing tabs. It would be nice if scripters could affect on the order of tabs. They could affect their order for newly created tabs using AddPropertiesSheet consequently, but not for the existing ones. Let say that I want to replace built-in Basic tab with my own one and want to keep other existing tabs. If I remove Basic tab and add my new tab it would be added as the latest one, but I need to place it instead of the existing tab which is the first one. O yes, one more thing, maybe not to much related, but still. I really need a possibility to assign an icon or picture to the button. I need it at least for Add, Del, Up and Down buttons. For example, I have an intention to implement multi-item artist control using the listview control and I need those 4 buttons for manipulating specific items in that control. I don't like to see Add, Del.. as captions on buttons, it could be much nicer to see pictures instead, as you have pictures on buttons beneath the Filter and Views listview. |
|
Enabling full Dialog Editor is something that could be talked later and be used in skinning where skin could control look of Properties dialog. For now HidePropertiesSheet seams more resonable than DeletePropertiesSheet as using PropertiesSheetID in your own scripts that will in some cases (File Formats) hide already created sheet and use different one or customize existing. Something like "If Type AVI than Hide [Lyrics, Album Art] but Show [IMDB, Subtitles] Sheets." or something like that. Re Localization: That is for another topic and for now I can say that I'm in progress of testing speed of proposals made in 0002544 and how to best make things work especially in case of different code pages. Assigning to Ludek for feedback about implementing 1. ParrentID parameter like in http://www.mediamonkey.com/wiki/index.php/ISDBUI::AddOptionSheet where New Sheet will be appended after ParentID 2. HidePropertiesSheet(ParrentID as Long) as Boolean |
|
Speed, Bit, and Image button styles are for another issue. Feel free to open new bug for that. |
|
Hey, I don't insist on full dialog editor at all. It is already great that you added those two methods for scripters. > Something like "If Type AVI than Hide [Lyrics, Album Art] but Show [IMDB, Subtitles] Sheets." or something like that. Yes, you are right, this is nice example. However, I think if you decide to add HidePropertiesSheet, you should also add ShowPropertiesSheet method. Or maybe just ShowPropertiesSheet(iSheetID, bShowSheet), where bShowSheet = True for show, bShowSheet = False for hide. > 1. ParrentID parameter like in http://www.mediamonkey.com/wiki/index.php/ISDBUI::AddOptionSheet [^] where New Sheet will be appended after ParentID Yes, this is very good idea, if it is not too late for you to modify AddPropertiesSheet method before you make the new version of program public. |
|
Re Localization: I have a question. What would happen if I type some string which is already in MM base of translated words, e.g. SDB.Localize("Title")? I suppose you already have "Title" translated on all supported languages, so why scripters should create some new language file for words that are already translated? I am talking about a possibility to replace Basic, Details and Classification sheets with my own, and my new sheets would have labels with same strings as existing ones, i.e. "Title", "Artist", "Album"... |
|
There is actually no need for ShowPropertiesSheet as each new AddPropertiesSheet will return ParrentID, but you are right instead HidePropertiesSheet more understandable would be TogglePropertiesSheet(SheetID as Long) as Boolean where it will toggle Sheet Visibility and return three states: True = Shown False = Hidden Null = SheetId Not found Things needs to be as simple as possible to avoid future issues. Regarding Localization: Please move that to 0002544 bug as that is not related to this bug. |
|
Well, I don't like the solution which toggles some state. There is one problem here that comes to my mind. Let say that I want to replace built-in Lyrics sheet. I could create a new Lyrics sheet using AddPropertiesSheet and I could hide existing Lyrics sheet using some new method during start-up. Now, what happen if both MM and my script decide to show or hide some sheet with the same purpose? For example, the user is selecting AVI file, the program decide to hide built-in Lyrics sheet and my script decide to hide my own Lyrics sheet. Well, so far it is all right if both sheets are hidden, but what happen when the user select some audio file - the program will show built-in Lyrics sheet and my script will show my own Lyrics sheet, so on the end we would have two Lyrics sheets displayed. |
|
You are right. The best approach would be to use two functions ShowPropertiesSheet and HidePropertiesSheet where in IniSheet you will need to put what Sheet will be hidden as By default MM will/should unhide defaults and than in Script Scripter will Hide Unneeded and create his custom Sheets. Which Basically means that several HidePropertiesSheet will be assigned according to $if method we agreed that is useful. Will See What Ludek will say about this, but for now I vote for: HidePropertiesSheet(SheetID as Long) as Boolean ShowPropertiesSheet(SheetID as Long) as Boolean and ParrentID in AddOptionSheet |
|
http://www.mediamonkey.com/wiki/index.php/SDBUI#ISDBUI_members http://www.mediamonkey.com/wiki/index.php/ISDBUI::ShowPropertiesSheet http://www.mediamonkey.com/wiki/index.php/ISDBUI::HidePropertiesSheet Implemented and documented the suggested way in build 1306. |
|
Thank you very much for those added methods, this is really appreciated. However, it would be nice if you also implement my suggestion for sheets order. For example, if I hide existing Basic sheet and create my own Basic sheet, it would be added as the last (rightmost) sheet which is not the best position for it. So, it would be nice if we can specify sheet position during its creation. I think it would be best if you add ParrentID parameter to the AddPropertiesSheet method similar to AddOptionSheet as Peke suggested. |
|
Ok, added parametr Order (Page Index) into the http://www.mediamonkey.com/wiki/index.php/ISDBUI::AddPropertiesSheet Fixed in build 1307. |
|
Great! Thanks again. |
|
Verified 1315 |