QUOTE(musicmusic @ May 24 2004, 10:55 PM)
QUOTE(Lyx @ May 24 2004, 07:14 PM)
- would it be possible to intergrate the windowtitle-, statusbar- & copystring-formatting into ui_columns(including access to global variables in both) ? That way, it could be a full replacement for the standard_gui + access to global-vars in the copy-string would allow some nice features
If you mean add separate strings then no, I don't see the point.
As for the global variables and those strings, I didn't do that is that because it would be redundant as you wouldn't be using colour codes set as global variables in those strings, and in this case I would have to create separate strings from the current ones like you say as i can't force everything that uses the current strings to use global variables. It may actually have spped benefits though, as well as convience, as generally statusbar, systray and main window title are updated at same time. Of course, it is pretty much neglible as it is only one track. Note I cant do anything about copy string without reimplementing the command since it is implemented in the core (probably).
Not particulary related, but in actual fact, I think I can put my own strings on the main titelformatting page, but I want to maintain my own editor for global help etc. and it will more or less as good in 0.1.1 anyway.
QUOTE(Lyx @ May 24 2004, 07:14 PM)
- is it possible to make the global-vars also available to other components in foobar? That way, for example a color-theme can also be applied to a foo_osd string
I thought of moving it to a separate component, I just am not sure if it is worth it. In most cases it will only aid convience as you don't have multiple formattings per track like the columns (the only exceptions I can think of right now are albumlist and mass tagger renamer). Having said that, convience is a good enough reason for me, but it also depends on whether stuff in teh string is specific to the ui or even the specific ui component (i.e. foo_ui_columns) and whether anyone will actually implement it into their components to use the global variables. I don't know if it is worth it. And I don't feel like maintaining any more components.
Hmm, first i'd like to explain the intention behind this idea:
One of the nice things about fb2k is the various amount of plugins which change and add stuff to the display. However, what this also means is that preferences get fragmented all over the place.
Example: lets asume i have made a fb2k-style which covers ui_columns, foo_osd, and has a copy-string and a window-title string.
To give this style to someone he would need to:
1. import the style to ui-columns
2. change various settings in ui-columns, like background-color, vis-color, etc.
3. copy'n paste the osd-string
4. change multiple settings in the osd-preferences
5. copy'n paste the copy-string
6. copy'n paste the window-title string
Thats just not feasible. I have stumbled over this config-fragmentation problem multiple times when i wanted to give a style which i made to someone. Especially if the other person is a non-total-geek, this amount of hassle just to try out this style which i made, is nightmare.
So, my idea basically is an extended version of foo_syfm + ui_columns import/export
In the above quote, you mentioned making the global-string like a separate plugin. Below is an idea on how it could look like, work, and the benefits of it.
Because coming up with good names isn't one of my strengths, i will just call it foo_configurator in this example.
Here's how the config-tree of such a plugin in the fb2k-preferences could look like:
CODE
Configurator(incl. import/export)
|
+--Global
|
+--Global (track specific)
|
+--Copy String (mirrored by configurator)
|
+--Window-Title String (mirrored by configurator)
|
+--OSD (created by foo_osd itself)
Import/Export:
--------------------------------------
Here the user can import and export all of the settings described below:
Global String:
--------------------------------------
This string could contain any non-track-specific vars. Most importantly color-theme-config, but also other settings.
But there is more to it: there could not just be user-vars but instead other plugins could look for vars which are specific to that plugin.
Example: "ui_columns_color_background=$rgb(0,30,100)" or "osd_color_window_background=$rgb(0,30,100)", or even "osd_font=Arial, MS Sans Serif"
So in other words, color-themes could even include specific fonts and other settings, across different plugins.
For styles with color-themes this should also result in a speedup - example: because the global-string in ui_currently is track-specific color-themes and a possible config-part in the string gets executed multiple times for each track instead of just one time.
Global String (track-specific):
--------------------------------------
This is what the current global-string of ui_columns does. With the difference that other plugins could as well interface with it. This has no speed benefit and is purely because of convenience, since every plugin which supports it would basically just take the string, and execute it for itself, either for the currently playing track, or another track in the playlist - what to do with this string is the choice of the individual plugins.
This string would probably be mostly interesting for tag-guessing and building track-dependend vars.
Plugin-specific configpages:
--------------------------------------
This is were the real fun begins. I am not sure if this is technically possible, so it may very well be that this is an utopian idea - however, i hope its not.
Other installed plugins could check if foo_configurator is installed, and if yes, create their own config-page in ui_configurator - and mirror some of their settings there.
So, for example the foo_osd plugin could have its config-page at two places - its native one, and a sub-page in ui_configurator. Both pages would be synchronized against each other - so they're basically just a mirror.
Okay, now this would all be total nonsense without a benefit: when importing/exporting configurations, then those sub-pages in ui_configurator would be taken into account as well.
Maybe it could also work the other way around sometimes: not another plugin supporting foo_configurator, but instead foo_configurator i.e. creating a mirror page of the copy-string.
The result of the above - if technically possible - could be that a user just has to download a single config-file containing a foobar-style, import it, and then automatically has all the affected plugins configured to match that style.
Not just colors, but also strings, font-settings, etc.
- Lyx
P.S.: You mentioned that the copy-string may be built into the core. Am i right to guess that since its configured under the standard-gui, that the standard_gui someway interfaces with it? If yes, couldn't any other plugin do this as well then? (i.e. foo_configurator)