Re: [PATCH] winecfg = control panel applets patch
On 10.04.2008 09:47, [EMAIL PROTECTED] wrote: However, since control panel does not utilize Unicode yet, the additionalb Bulgarian translation matches the English one. So what's the point of that translation then? Right now it doesn't add anything worthwhile but increases the patch size - not good. You probably increase the chance of your patch being accepted by leaving out that not-really-a-translation. I'd recommend you submit that as a patch at a later point of time. It probably also makes sense to properly unicodify the control panel before supplying a language that needs it. -f.r.
Re: [PATCH] winecfg = control panel applets patch
Frank Richter wrote: On 10.04.2008 09:47, [EMAIL PROTECTED] wrote: However, since control panel does not utilize Unicode yet, the additionalb Bulgarian translation matches the English one. Even for non-Unicode apps you should have no problems with adding a Bulgarian translation to a GUI app (when Bulgarian is selected as your preferred language the active codepage will be chosen accordingly). Maybe you used a wrong charset? You should use the Windows charset or use #pragma (see http://wiki.winehq.org/Developers-Hints?highlight=%28Developers%29#head-ef42a958e4f633dbd4a0ae42649fa02a4d1827fd ) Mikołaj Zalewski
Re: [PATCH] winecfg = control panel applets patch
However, since control panel does not utilize Unicode yet, the additionalb Bulgarian translation matches the English one. So what's the point of that translation then? Right now it doesn't add anything worthwhile but increases the patch size - not good. Well, it was intended as a template and as a forward compatibility thing. (I know, it's REALLY annoying to have a stub mark the beginning of a 400 lines+ of patch. ugh. don't know why that one came to be the first file... It's place is somewhere in-between the icons IMHO.) You probably increase the chance of your patch being accepted by leaving out that not-really-a-translation. I'd recommend you submit that as a patch at a later point of time. It probably also makes sense to properly unicodify the control panel before supplying a language that needs it. Control panel doesn't support Unicode, so I could've dropped all that language mumbo-jumbo alltogether - it indeed adds a lot of overhead and complexity to the entire thing. However, I wanted to provide a forward-compatible solution (and, Dan Kegel said straight: go for Unicode!), rather than coding for-the-moment. (which also explains the *not-so-optimal* way I handled the winecfg mod itself. Now I understand a new tab is to be added... and with a slight modification, a seventh applet will appear. (and it'll require less time to do than to draw the icon) And really, introducing a new capability (home-grown applets), modifying winecfg -and- unicodifying control panel at the same time would've been a tad overkill. I was thinking of (should the control panel be accepted at all) unicodifying the control and providing the right translation for the applets in the next patch, in which case I'd be modifying only the pre-existing .rc rather than poking in the applet source. /Then again, a few languages might not actually require Unicode for those texts, so, someone seeing that it's capable of being translated speaking the right language.../
[PATCH] winecfg = control panel applets patch
Frank Richter wrote: On 10.04.2008 09:47, pure_evil at mail.bg wrote: However, since control panel does not utilize Unicode yet, the additionalb Bulgarian translation matches the English one. Even for non-Unicode apps you should have no problems with adding a Bulgarian translation to a GUI app (when Bulgarian is selected as your preferred language the active codepage will be chosen accordingly). Maybe you used a wrong charset? You should use the Windows charset or use #pragma (see http://wiki.winehq.org/Developers-Hints?highlight=%28Developers%29#head-ef42a958e4f633dbd4a0ae42649fa02a4d1827fd ) Mikołaj Zalewski Hmmm, I'll have to check up on that. The translations themselves are for the description/title that appears under the applet in the control panel. Once launched,(LANG=bg_BG) the winecfg translations take over and no problem there, just the unicode thing looks like rubbish under the icon. And, has twice as many characters as the text itself, which points to a problem within the control, rather than the codepage (?) - most probably, usage of ASCII rather than Unicode in control itself. -ugh if this message also ends up as a new thread I'm gonna shoot KMail and try to get a decent program that doesn't f* up mail lists... suggestions?-
Re: [PATCH] winecfg = control panel applets patch
Hmmm, I'll have to check up on that. The translations themselves are for the description/title that appears under the applet in the control panel. Once launched,(LANG=bg_BG) the winecfg translations take over and no problem there, just the unicode thing looks like rubbish under the icon. And, has twice as many characters as the text itself, which points to a problem within the control, rather than the codepage (?) - most probably, usage of ASCII rather than Unicode in control itself. If there are twice as many characters in the text as there should be then you have probably encoded the file in UTF-8. Try to add '#pragma code_page(65001)' at the top and '#pragma code_page(default)' at the bottom of Bg.rc. By default wrc expects the string to be in the Windows codepage for the specified language. Mikołaj Zalewski
RE: [PATCH] winecfg = control panel applets patch
Hi, This is regarding the control panel applet patch you have submitted to wine-patches. I would like to have the applets should be part of wine's control program. They would be better be as files in the /programs/control/ And you should extend the existing control.exe and winecfg in wine to open these applets. Please correct me if I am wrong. Just my 2 cents. VJ
Re: [PATCH] winecfg = control panel applets patch
[EMAIL PROTECTED] wrote: Allows access to different winecfg tabs via control-panel applets (without showing all of the cfg's tabs when accessed thusly) +LONG APIENTRY EXECUTE_APPLET(HWND hwndCpl, UINT message, LPARAM lParam1, LPARAM lParam2) +{ + + int NumOfApplet = (int)lParam1; + + switch (NumOfApplet) + { + + case 0: You patch is wrapped. Also please for new files follow standard Wine codding style - 4 spaces indentation, no tabs. +/*It would get messier with an or statement everywhere, so...*/ +BOOL Do_App = FALSE; +BOOL Do_Lib = FALSE; +BOOL Do_Graph = FALSE; +BOOL Do_Desktop = FALSE; +BOOL Do_Drives = FALSE; +BOOL Do_Audio = FALSE; +if (display_what_tabs == 2) { Do_Lib = TRUE; } +if (display_what_tabs == 3) { Do_Graph = TRUE; } +if (display_what_tabs == 4) { Do_Desktop = TRUE; } +if (display_what_tabs == 5) { Do_Drives = TRUE; } +if (display_what_tabs == 6) { Do_Audio = TRUE; } + if ( lstrcmpi(CommandLine,applications) == 0 ) display_what_tabs = 1; + if ( lstrcmpi(CommandLine,libraries) == 0 ) display_what_tabs = 2; + if ( lstrcmpi(CommandLine,graphics) == 0 ) display_what_tabs = 3; + if ( lstrcmpi(CommandLine,desktop) == 0 ) display_what_tabs = 4; + if ( lstrcmpi(CommandLine,drives) == 0 ) display_what_tabs = 5; + if ( lstrcmpi(CommandLine,audio) == 0 ) display_what_tabs = 6; This is ugly and redundant. You should make it a bit-mask instead. However with all this you removing really big functionality from the winecfg - ability to set this on per application basis. Vitaliy.
Re: [PATCH] winecfg = control panel applets patch
I would like to have the applets should be part of wine's control program. Hmmm, I followed usual windows proceedings, e.g. the applet is not actually a part of the control panel program itself, it's a .CPL. They would be better be as files in the /programs/control/ Well, cpls are basically DLLs that export a function - CPlApplet - so (based on Dan Kegel's advice) i put them in dlls. They're not *programs* strictly speaking. Hmm, I could use more feedback on that one. And you should extend the existing control.exe and winecfg in wine to open these applets. control.exe opens cpls just fine; I only extended winecfg to make it suitable for being launched from within a cpl to perform only the particular task.
RE: [PATCH] winecfg = control panel applets patch
You patch is wrapped. Also please for new files follow standard Wine codding style - 4 spaces indentation, no tabs. Sorry about that, I'll fix it in the morning. (I should've attached it as a text file :( ) This is ugly and redundant. yes, but at least it's easily readable - same local variable name within one function serves to store the temporal result, and an *input* variable by the same name is used in the other function (to catch that same result). However with all this you removing really big functionality from the winecfg - ability to set this on per application basis. +if (display_what_tabs == 1) +{ Do_App = TRUE; /*well, application settings do require more tabs.*/ + Do_Lib = TRUE; + NUM_PROPERTY_PAGES = 3; +} ^^This (a few lines below) took care of that.^^ This piece of code explains why I went for bools in the first place - for example, you draw the library tab A.) when you want to draw only them (general library settings), B.) when you want application-specific settings (winecfg applications) and C.) when you want the entire winecfg. That would've been a lot messier with a triple or rather than a simple IF (Do_Lib) { }.