Skip to main content

Topic: foo_uie_playlists_dropdown (Read 404105 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Psyphre
  • [*]
foo_uie_playlists_dropdown
Reply #100
Im having a huge problem. For some reason i cant seem to add the playlist dropdown to my foobar. The dll is installed because I can see its options in the preferences, however when i try to add it to my foobar window it doesnt appear in the list.
Im currently using foobar 0.9.2 beta 3 on XP SP2.

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #101
  • Remember to use the latest Columns UI component, you can download it here.
  • If you already have the latest Columns UI, remember to choose it as your UI: Preferences -> Display -> User interfase module.
  • How exactly do you try to add Dropdown to your foobar? The easiest way is to add it to your toolbar, just right click on it and choose Toolbars -> Playlists Dropdown. You can also add it as a panel in your layout (see Preferences -> Display -> Columns UI -> Layout).
  • Last Edit: 07 June, 2006, 05:23:21 AM by mixcherry
http://foobar2000.pl/ :: unofficial polish forum

  • Psyphre
  • [*]
foo_uie_playlists_dropdown
Reply #102
thx alot!  works perfectly now! appreciate the fast reply

  • roentgen
  • [*][*][*][*]
foo_uie_playlists_dropdown
Reply #103
well... having '-' playlists only to show separators surely wasn't on my wish list ...
Wasn't that your request?:
I'm wonedring... is there some custom sorting available? 'cause I want the drop-down menu to be sorted by name of playlist not by their order on playlist tabs

After doing some serious thinking ...  ... I did not requested having '-' only to show separators!
Anyhow... I did requested sorting by %title% - thanks for implementing
Anyhow... separators are good... but maybe without having '-' playlists ...

Using separators and sorting dropdown list can result in some unpredictable mess

I must have overlooked that one . Sorry

now... something from my own wishlist  : after using the dropdown menu focus should be set on playlist (or pressing Esc key should deselect the menu and set focus on playlist)... so key down would go to the next item in playlist... not to the next playlist
Yes, that would be useful option, I'll add it.

Thank you

  • ANT
  • [*]
foo_uie_playlists_dropdown
Reply #104
hi, thanks a lot for this great component, could you extend the vertical size of the combo box, so as to avoid a vertical scrollbar when there are more than 4 items in it ? thanks~

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #105
hi, thanks a lot for this great component, could you extend the vertical size of the combo box, so as to avoid a vertical scrollbar when there are more than 4 items in it ? thanks~
Sorry, I'm afraid I don't understand your problem... Vertical scrollbar is shown when there are at least 30 items on Dropdown List. Could you please upload a screenshot?
http://foobar2000.pl/ :: unofficial polish forum

  • ANT
  • [*]
foo_uie_playlists_dropdown
Reply #106
Sorry, I'm afraid I don't understand your problem... Vertical scrollbar is shown when there are at least 30 items on Dropdown List. Could you please upload a screenshot?


sure:


I have 6 playlists + 2 separators (empty playlist, named '-')
I noticed that once I had no scrollbar, but now I have it always...

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #107
Sorry, this must be the 'for-testing-purposes-only' version that I accidentally uploaded.

Just try to re-download the file (from here). I checked this two seconds ago and it seems to work well. If the problem still occurs, well, I have no idea what could cause it. Maybe some Visual Style can overwrite the default settings? Do you use StyleXP or WindowBlinds?
http://foobar2000.pl/ :: unofficial polish forum

  • ANT
  • [*]
foo_uie_playlists_dropdown
Reply #108
I redownloaded it, it was not the same file.
but I still have the problem.
after playing with options (enabling / disabling icons, etc), I had no more scrollbars but some of my playlists were hidden !
the next display, that was correct : no scrollbar and all here.
the third display : the scrollbar (because only 4items displayed)
I have as you can see on the screenshot another visual style, but I don't use stylexp nor windows blind. the visual style is Luna element if you want to know it :-)

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #109
Version 0.6 alpha 2v2 (Download)

This is alpha version, so it is meant to test new features (mainly $set_style(...)) and not for 'everyday' usage.

Some changes (aside from minor bug-fixes and small code optimizations):
  • Fixed the bug with empty-lines ('hidden' playlists). I don't know if it was connected with mysteriously appearing scrollbars, so please test it and report if that was fixed too (I couldn't reproduce this problem with this version).
  • Cleaned and improved Preferences Page (now divided into separate tabs).
  • The main improvement is Style Formatting, which you can change on Display Preferences Page. It is similar to Columns UI's 'Custom style spec', so you can use functions:
    • $set_style(back,<background_color>,<selected_background_color>)
    • $set_style(text,<text_color>,<selected_text_color>)
    Colors are in BBGGRR (hex) format, just like in Columns UI. Currently, you cannot use $rgb(...) function inside $set_style(...) functions. Of course, you can use any field that is available on Display tab (e.g. %isplaying%, %size%, etc.).
    I'm planning to add frame styles, too.
  • Alpha 2: Added custom icons. See first page for sample image.
Some known 'bugs':
  • If you have lots of playlists (>50 or so) and use custom styles ($set_style(...) functions), startup time of foobar2000 can be very long (even 3 seconds or so ). This slowness seems to result from something else... (linked to my component, unfortunately)
  • Last Edit: 12 June, 2006, 07:33:52 AM by mixcherry
http://foobar2000.pl/ :: unofficial polish forum

  • mil3s
  • [*][*][*][*]
foo_uie_playlists_dropdown
Reply #110
Is the To Do List correct?

  • mazy
  • [*][*][*][*][*]
foo_uie_playlists_dropdown
Reply #111
amazing, mixcherry ... the only features missing (for me) are:
- customizable name for separator playlists
- feature to disable selection of separator playlist

one request:
- titleformatting field to differentiate between "in control" and "in dropdown list" states (so i could for example specify different background for some playlist only when shown in the dropdown list, not the control itself; or show total # of playlists only in the control, not the list)

screenshot of my "pseudo-separators". i'm using style formatting to disable selection background color on the separators:
info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #112
Is the To Do List correct?
I've updated it just a second ago

amazing, mixcherry ... the only features missing (for me) are:
- customizable name for separator playlists
- feature to disable selection of separator playlist
I'm working on new separators, but the new solution has several +es and -es: the lines will be simple (yet configurable - dotted, dashed, etc.), so you won't be able to put any text on them (e.g. vertical lines, as on your screenshot), but the + is they won't be selectable and won't require 'empty' playlists. Of course, you will be able to achieve the effect that you've already achieved... The simple separators would be for 'less experienced' users. Maybe some sort of solution would be to implement new Playlist Lock, something like 'Un-selectable Playlist'

one request:
- titleformatting field to differentiate between "in control" and "in dropdown list" states (so i could for example specify different background for some playlist only when shown in the dropdown list, not the control itself; or show total # of playlists only in the control, not the list)
I'm afraid this is not possible with standard windows control that I use. Though, this is very good idea, so I'll try to investigate the problem.

screenshot of my "pseudo-separators". i'm using style formatting to disable selection background color on the separators:
This is really amazing! Could you please paste your codes and colours here so I can post them on the first page as an example?

PS. I've uploaded v0.6 alpha 2v2 (see 3 posts above) - could someone please test it with Windows2000? Are there any problems with Preferences Page under Win2k?
  • Last Edit: 12 June, 2006, 08:00:19 AM by mixcherry
http://foobar2000.pl/ :: unofficial polish forum

  • mil3s
  • [*][*][*][*]
foo_uie_playlists_dropdown
Reply #113
I think you've maybe uploaded the wrong version. I can't change icons and the tabs in the preferences are gone.

foo_uie_playlists_dropdown
Reply #114
I think you've maybe uploaded the wrong version. I can't change icons and the tabs in the preferences are gone.
Did you download the one in the first post or 4 posts above this one? The alpha version is the one 4 posts above your post.

  • mazy
  • [*][*][*][*][*]
foo_uie_playlists_dropdown
Reply #115
I should use your screenshots as advertisements for my component  This is really amazing! Could you please paste your codes and colours here so I can post them on the first page as an example?
thank you! as you requested, i'm posting my formatting here and you're free to do whatever you want with it. it could use some work (as some new features are somehow hot-glued to the rest).

separator playlists can be either with empty (or space-filled) names or starting with -. when using -, you can also specify the character to be used for line drawing: -line_character; or text to be used on the separator: -separator_text (separator_text has to be longer than 1 character). also the line can be disabled for index and / or number columns, as in this screenshot (it's just a showcase of what it can do; i wouldn't use that dashed line before send playlist and the thick one):



with the introduction of style formatting, one doesn't have to set colors with the dialogs. you would need the font from here (it's in the rar with fcs files).

padding: 4 (left, right), 0 (top, bottom)
font: Calibri MOD2 8pt Bold

display:
Code: [Select]
//// column widths -----------------------------------------------------------------------------
$puts(ci,1)
$puts(ct,12)
$puts(cl,2)
$puts(cn,2)
$puts(cs,1)
$if(,
$puts(ci,1)
$puts(ct,12)
$puts(cl,7)
$puts(cn,2)
$puts(cs,1)
,)
//// colors  --------------------------------------------------------------------------------------
$puts(cols,cccccc|FFFFFF)
$puts(colse,cccccc|cccccc)
$puts(coli,888888|FFFFFF)
$puts(colt,818181|FFFFFF)
$puts(colti,F9D577|FEEFBF)
$puts(coll,009CE8|E0AD12)
$puts(coln,888888|FFFFFF)
//// other ---------------------------------------------------------------------------------------
// lock name abbr. (toggle: 1 - enabled, nothing - disabled; ex.: $puts(la,) )
$puts(la,1)
// separators for index / number (toggle)
$puts(tsi,)
$puts(tsn,)
//// set-up -------------------------------------------------------------------------------------
//$puts(s,$get(cols)┇$tab($get(cs)))
$if($or($strcmp($replace(%title%, ,),),$stricmp($left(%title%,1),-)),$puts(empty,1)$puts(cols,$get(colse)),)
$if($stricmp($left(%title%,1),-),$ifgreater($len(%title%),2,$puts(stitle,$substr(%title%,2,$len(%title%))),$puts(ss,$substr(%title%,2,2))),)
$puts(s,$get(cols)┇)
//$if(%lock%,,$puts(ct,$add($get(ct),$get(cl))))
//// separators  --------------------------------------------------------------------------------
$if($get(ss),,
//$puts(ss,╴)
$puts(ss,─)
//$puts(ss,–)
)
$if($get(tsi),$puts(si,$repeat($get(ss),6)),)
$puts(st,$if($get(stitle),──┐$get(stitle)┌,)$repeat($get(ss),100))
$if($get(tsn),$puts(sn,$repeat($get(ss),6)),)
// ------------------------------------------------------------------------------------------------
// formatting string

// index
$if($get(empty),$get(cols)$get(si),
$get(coli)$replace($num(%index%,2),0,₀,1,₁,2,₂,3,₃,4,₄,5,₅,6,₆,7,₇,8,₈,9,₉))
$tab($get(ci))
// index-sep
$get(s)
// title
$if($get(empty),$get(st),
$get(colt)
%title%
$get(colti)
//$if(%isactive%,' (active'$if(%isplaying%,', playing')')',$if(%isplaying%,' (playing)'))
$if($and(%isactive%,%isplaying%), '(↔)',$if(%isactive%, '(↓)',$if(%isplaying%, '(→)',)))
)
$tab($get(ct))
// lock
$if(%lock%,
$get(coll)
 '('$if($get(la),$abbr($upper(%lock%)),$lower(%lock%))')'
,)
$tab($get(cl))
// size-sep
$get(s)$if($get(empty),$get(sn),)$tab($get(cn))
// size
$ifgreater(%size%,0,$get(coln)$replace(%size%,0,₀,1,₁,2,₂,3,₃,4,₄,5,₅,6,₆,7,₇,8,₈,9,₉),)
style:
Code: [Select]
$if($or($strcmp($replace(%title%, ,),),$stricmp($left(%title%,1),-)),
$set_style(back,FFFFFF,FFFFFF)
//$set_style(text,CCCCCC,CCCCCC)
,$set_style(back,FFFFFF,F9D577))
$set_style(text,818181,FFFFFF)
info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987

  • mil3s
  • [*][*][*][*]
foo_uie_playlists_dropdown
Reply #116
News? alpha/betas?

  • Squeller
  • [*][*][*][*][*]
foo_uie_playlists_dropdown
Reply #117
PS. I've uploaded v0.6 alpha 2v2 (see 3 posts above) - could someone please test it with Windows2000? Are there any problems with Preferences Page under Win2k?

Code: [Select]
Failed to load DLL: foo_uie_playlists_dropdown.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

Will I need VC8 runtime? Aarrrg then! I have some problems installing vc8 tuntime redistributable...
  • Last Edit: 22 June, 2006, 03:04:07 PM by Squeller

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #118
Same problem here W2K SP4.

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #119
News? alpha/betas?
Sorry, I'm in the middle of my exams session, so I've got not much time to develop the plugin. I'll release it when it's ready  But I am still working on it, and I won't stop until it is *PERFECT*

Code: [Select]
Failed to load DLL: foo_uie_playlists_dropdown.dll
Reason: This component is missing a required dependency, or was made for different version of foobar2000.

Will I need VC8 runtime? Aarrrg then! I have some problems installing vc8 tuntime redistributable...
Same problem here W2K SP4.
Thanks for the bug-report. The VC8 runtime should not be required, so you don't have to install it. I'll fix that in the new version.

NEMO7538, AFAIK, your plugin (QuickSearch) works without any problems on Win2k, and it also supports uxtheme (XP themes on Tab Control). Could you paste some code how do you initialize Uxtheme.dll? And, generally, what do you do to support uxtheme *and* not crash on Win2k? What I do is: add uxtheme.lib in my project's Additional Dependencies, include <uxtheme.h> and run this code on Prefs Page initialization:
Code: [Select]
uxtheme = LoadLibrary(L"UxTheme.dll") != NULL;
INITCOMMONCONTROLSEX InitCtrlEx;

InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
InitCtrlEx.dwICC  = 0;
InitCommonControlsEx(&InitCtrlEx);

And then, on each tab's WM_INITDIALOG:
Code: [Select]
if (uxtheme) { EnableThemeDialogTexture(wnd, ETDT_ENABLETAB); }
http://foobar2000.pl/ :: unofficial polish forum

  • gfngfgf
  • [*][*][*][*][*]
foo_uie_playlists_dropdown
Reply #120
I'll share my experience since I've been told foo_uie_albumart works on win2k after I enabled uxtheme:

Do NOT add "uxtheme.lib" as an "Additional Dependency".  That's why the plugin won't load on Win2K machines.  Keep the "#include <uxtheme.h>".

This is from my header file.  I have two member variables: one is a handle to uxtheme.dll and the other stores the address of the EnableThemeDialogTexture procedure:

Code: [Select]
typedef HRESULT (CALLBACK* DIALOGTHEMEPROC)(HWND,DWORD);
//...
class albumart_config
{
private:
    //...
    HINSTANCE m_hUxtheme;
    DIALOGTHEMEPROC m_EnableThemeDialog;

In the constructor for albumart_config, I do this:

Code: [Select]
    m_hUxtheme = LoadLibrary(_T("uxtheme.dll"));
    m_EnableThemeDialog = NULL;
    if (m_hUxtheme != NULL)
        m_EnableThemeDialog = (DIALOGTHEMEPROC)GetProcAddress(m_hUxtheme, "EnableThemeDialogTexture");

The actual call to EnableThemeDialogTexture looks like this:

Code: [Select]
if (m_hUxtheme != NULL && m_EnableThemeDialog != NULL)
    m_EnableThemeDialog(g_hWndTabDialog[n], ETDT_ENABLETAB);

Finally, in the destructor for albumart_config, I have to release the handle to uxtheme.dll:

Code: [Select]
albumart_config::~albumart_config()
{
    if (m_hUxtheme != NULL)
        FreeLibrary(m_hUxtheme);
}

  • NEMO7538
  • [*][*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #121
I think I do basically the same. I use a separate theme_helper.h component, which contains:
Code: [Select]
#define ETDT_DISABLE        0x00000001
#define ETDT_ENABLE        0x00000002
#define ETDT_USETABTEXTURE  0x00000004
#define ETDT_ENABLETAB      (ETDT_ENABLE  | ETDT_USETABTEXTURE)

typedef HRESULT WINAPI EnableThemeDialogTextureProc(HWND hwnd, DWORD dwFlags);

class theme_helper {
private:
unsigned refcount;
HINSTANCE mod_uxtheme;
EnableThemeDialogTextureProc * pEnableThemeDialogTexture;

public:
theme_helper();

bool load();
bool unload();

LRESULT enable_theme_dialog_texture(HWND wnd, DWORD flags);
};

theme_helper::theme_helper() {
refcount = 0;
mod_uxtheme = NULL;
pEnableThemeDialogTexture = NULL;
}

bool theme_helper::load() {
refcount++;

if (refcount > 1) {
return (pEnableThemeDialogTexture != NULL);
}

mod_uxtheme = uLoadLibrary("uxtheme.dll");
if (mod_uxtheme == NULL) {
return false;
}

pEnableThemeDialogTexture =
(EnableThemeDialogTextureProc *)GetProcAddress(mod_uxtheme, "EnableThemeDialogTexture");

return (pEnableThemeDialogTexture != NULL);
}

bool theme_helper::unload() {
refcount--;

if (refcount > 0) {
return false;
}

if (pEnableThemeDialogTexture != NULL) {
FreeLibrary(mod_uxtheme);
mod_uxtheme = NULL;
pEnableThemeDialogTexture = NULL;
}

return true;
}

LRESULT theme_helper::enable_theme_dialog_texture(HWND wnd, DWORD flags) {
if (pEnableThemeDialogTexture != NULL) {
return pEnableThemeDialogTexture(wnd, flags);
} else {
// TODO: more appropriate return value
return S_OK;
}
}
and in you project:

#include "theme_helper.h"
static theme_helper g_theme_helper;

and then :

in WM_INITDIALOG:
[blockquote]g_theme_helper.load();
g_theme_helper.enable_theme_dialog_texture(wnd, ETDT_ENABLETAB);[/blockquote]
[blockquote](used for the child window of a tab control so may want to change the flags) ....[/blockquote]
in WM_DESTROY:
[blockquote]g_theme_helper.unload();[/blockquote]
  • Last Edit: 23 June, 2006, 12:08:47 AM by NEMO7538

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #122
gfngfgf and NEMO7538, thank you very much! Your answers were very helpful - I've tested it (I've finally got an access to Win2k) and it works
http://foobar2000.pl/ :: unofficial polish forum

  • neomcnasty
  • [*][*]
foo_uie_playlists_dropdown
Reply #123
Hi mixcherry,
I tested your plugin (Version 0.6 alpha 2v2) and it works pretty well but I acknowledged a sporadicly appearing problem with the $set_style function.
I use the following syntax:

Display:
Code: [Select]
%title%$tab()%size%


Style:
Code: [Select]
//set text style
$if(%isplaying%,
$set_style(text,FFFFFF,FFFFFF),
$set_style(text,C3BCB4,C3BCB4))

//set background style
$if(%isactive%,
$set_style(back,70543C,70543C),
$set_style(back,6C5037,6C5037))


Sometimes the text color isn't the one I specified, but mostly black and red.
Because the problem appears only sometimes I don't have a clue when exactly.
I'm using foobar2000 v0.9.2

EDIT: I tried it several times and the problem occures mostly when I scroll the dropdownlist with the mousewheel.
  • Last Edit: 26 June, 2006, 04:11:14 PM by neomcnasty

  • mixcherry
  • [*][*][*][*]
  • Developer
foo_uie_playlists_dropdown
Reply #124
Hi. Thank you for pointing this. It will be fixed in the new version

I think this problem occured due to some weird and rare bug (or feature??...) in titleformat_compiler::remove_forbidden_chars (during removing of (char)3), but I'm not sure.
http://foobar2000.pl/ :: unofficial polish forum