IRC logs for #openttd.dev on OFTC at 2012-11-28
⏴ go to previous day
01:49:00 *** Supercheese has joined #openttd.dev
01:55:50 *** DorpsGek has joined #openttd.dev
01:55:51 *** ChanServ sets mode: +v DorpsGek
03:55:55 *** Knogle has joined #openttd.dev
06:07:24 *** Sturmi has joined #openttd.dev
06:12:04 *** Knogle has joined #openttd.dev
06:13:50 *** Supercheese has joined #openttd.dev
06:18:53 *** Knogle_ has joined #openttd.dev
06:19:26 *** Supercheese has joined #openttd.dev
14:07:33 *** ntoskrnl has joined #openttd.dev
15:15:09 *** Hirundo has joined #openttd.dev
15:23:37 *** welshdragon has joined #openttd.dev
15:53:21 *** welshdragon has joined #openttd.dev
16:38:59 *** Sturmi has joined #openttd.dev
16:55:11 *** frosch123 has joined #openttd.dev
16:55:11 *** ChanServ sets mode: +v frosch123
17:38:46 *** FLHerne has joined #openttd.dev
18:41:03 *** Alberth has joined #openttd.dev
18:41:03 *** ChanServ sets mode: +v Alberth
19:18:49 <frosch123> hmm, what do you guess?
19:19:00 <frosch123> did capslock and shift always behave the same in the osk?
19:19:14 <frosch123> or was the shift broken some years ago?
19:19:21 <frosch123> with noone complaining ever :p
19:21:17 <frosch123> already broken in 1.0 :)
19:26:16 <Alberth> it's not good being able to search that far back :p
19:26:36 <frosch123> pff, i always have them compiled
19:27:07 <Alberth> I have some versions also compiled, but sort of 'when needed' :)
19:27:16 <frosch123> anyway, since i am reworking the osk somewhat to make it work in all cases...
19:27:25 <frosch123> how shall the cursor behave?
19:27:39 <frosch123> shall it stay visible and blinking in the parent window while the osk is open?
19:27:49 <frosch123> it was like that before, but feels a bit weird to me
19:28:26 <Alberth> didn't it echo the typed characters to both windows?
19:28:49 <Alberth> It was years ago that I tried it :)
19:29:05 <frosch123> yes, it does echo them to both
19:29:38 <Alberth> so blink only in the osk, but echo to both instead?
19:30:15 <Alberth> you might get confused what window your typing into
19:31:31 <frosch123> you are always typing in the osk
19:31:41 <frosch123> but, ok, it is a feedback which editbox is selected
19:53:26 *** Eagle_Rainbow has joined #openttd.dev
19:53:26 *** ChanServ sets mode: +v Eagle_Rainbow
19:53:53 <Eagle_Rainbow> @frosch: Thanks for committing the network game list filter patch.
19:54:19 <Eagle_Rainbow> Though, I was a bit surprise - I had expected another code review on it, as I had changed a lot in the latest version
19:56:00 <Alberth> svn revert can be arranged if you want :P
19:56:34 <frosch123> Eagle_Rainbow: it only became smaller iirc :)
19:57:10 <Eagle_Rainbow> Thanks :) But I prefer the "forward-patching approach", i.e. improving code quality with additional commits :)
19:57:22 <Eagle_Rainbow> frosch123: yes, I tried hard to do so... :)
19:58:05 <Eagle_Rainbow> can I assist you with the OSK somehow? Testing for example?
20:01:33 <Eagle_Rainbow> Alberth: IIRC you had a collection of typo fixes in prep?
20:02:03 <Alberth> I collect them, and dump them into trunk every now and then
20:02:16 <Alberth> I also collect doxygen comments
20:02:37 <Eagle_Rainbow> great... I have found some further typos... I'll send you along mine to integrate them into your collection,ok ?
20:03:25 <frosch123> Eagle_Rainbow: i am currently working on it
20:03:43 <frosch123> already fixed a dozen of bugs... still counting :p
20:03:58 <Eagle_Rainbow> yeah, I saw it on the irc logs - that's why I am asking :)
20:04:40 <frosch123> anyway, after that i want to add a new adv setting :p
20:04:52 <frosch123> apparently really noone uses the osk
20:05:09 <frosch123> so i think we should add a osk setting: single click, double click, disabled
20:05:28 <frosch123> in case single click is not selected, we can then also add cusor positioning using the mouse
20:05:37 <frosch123> which is also kind of missing :p
20:05:48 <Eagle_Rainbow> Alberth: you got a pm in the forum with my typos
20:06:01 <Alberth> wouldn't removal of the osk be much easier?
20:06:21 <frosch123> also, isn't everyone working on android ports?
20:06:22 <Eagle_Rainbow> what about keyboard-less devices like ipad et al?
20:06:51 <Eagle_Rainbow> frosch123: my words ;)
20:07:01 <Alberth> I would expect that they have generic solutions for that problem ybh
20:07:34 <Eagle_Rainbow> well, if you are using the device's default edit boxes, iirc
20:07:41 * Eagle_Rainbow is not an expert on mobile device dev.
20:08:58 <Eagle_Rainbow> So, cursor positioning would be enabled automatically, if osk setting would be set to disabled
20:09:26 <Eagle_Rainbow> (assuming that the osk wouldn't be dropped entirely)
20:11:27 <Alberth> lots of dots in your patch :)
20:11:41 <Alberth> and one typo in the fix :)
20:13:36 <frosch123> i changed the focus behaviour
20:13:37 <frosch123> now the osk is focussed when opening, and closed when it loses focus
20:13:42 <frosch123> previously the osk somehow tried to transfer the focus back to the parent whenever it somehow got it
20:13:48 <frosch123> but that failed in various cases
20:15:29 <Eagle_Rainbow> Alberth: argl... :)
20:15:46 <Eagle_Rainbow> frosch123: I'll give your changes a try and attempt to break it somehow :)
20:16:28 <Alberth> if (w->window_class == WC_OSK) w->InvalidateData(); <-- so much simpler :)
20:19:50 <Alberth> src/osk_gui.cpp, around line 200, just below "virtual void OnInvalidateData" line starts with a space
20:20:09 <Eagle_Rainbow> mmh... Pressing both shift and caps looks inconsistent to me... They appear to behave exactly the same (here)
20:21:11 <Alberth> HEBR_EDITING = 0, <-- drop the "= 0" ?
20:22:03 <frosch123> Eagle_Rainbow: shift is released when pressing a character button
20:22:12 <frosch123> caps is locked and inverts
20:22:18 <frosch123> shift + caps inverts twice
20:22:44 <frosch123> also doxygenized the HEBR constants
20:28:17 <Alberth> I am somewhat wondering about the dynamic_cast, but this is the safest solution
20:28:34 <Eagle_Rainbow> More a side-remark: The OSK layout seems to be derived from the system language and not from the OS' keyboard layout: I am having an English Linux here, but with a German keyboard layout - the OSK is then English keyboard layout
20:28:49 <frosch123> well, technically the FindWindowById is no longer needed
20:28:54 <frosch123> since it is always _focused_window
20:29:44 <frosch123> Eagle_Rainbow: the layout depends on the language you selected in ottd
20:29:58 <frosch123> check STR_OSK_KEYBOARD_LAYOUT and STR_OSK_KEYBOARD_LAYOUT_CAPS :)
20:30:05 <frosch123> the layout is "translated" :p
20:30:39 <frosch123> though no idea what the non-latin languages do
20:31:22 <frosch123> greek and hebrew both have the us layout
20:31:34 <Eagle_Rainbow> I'm in arab right now :)
20:31:44 <Eagle_Rainbow> Don't know what I am typing though, but it looks strange
20:31:45 <frosch123> but it is also quite likely that the translators do not understand the meaning of the string, and leave their fingers from it :)
20:32:12 <frosch123> oh, yeah, arabic is translated \o/
20:32:12 <Eagle_Rainbow> The network filter string there looks quite strange...
20:32:28 <Eagle_Rainbow> but that could be due to the missing translation...
20:32:48 <Eagle_Rainbow> but the edit box of the filter string is writing LTR though I am typing arabic letters ....
20:33:05 <Eagle_Rainbow> sorry - need to correct me:
20:33:17 <Eagle_Rainbow> it's typing it RTL, but left-adjusted... :P
20:33:25 <frosch123> yeah, the osk looks quite wrong for arabic
20:33:38 <frosch123> but cursor keys are wrong
20:33:42 <frosch123> cursor might also be wrong
20:33:56 <Eagle_Rainbow> well, they are also mirrored ;)
20:35:03 <frosch123> yeah, the buttons are inverted one time too much :p
20:35:08 <Eagle_Rainbow> the server's info box isn't mirrored properly as well (other story than the patch about which we are debating)
20:35:24 <frosch123> anyway, apparently the whole editbox stuff is incorrect for rtl
20:35:46 <Eagle_Rainbow> looks like this is worth an fs?
20:36:01 <Eagle_Rainbow> Do we have an arabic tester in the community who could give us better feedback?
20:36:37 <frosch123> likely not, else someone would have complained :p
20:37:08 <Eagle_Rainbow> We are just one-eyed men amongst the blinds ;)
20:37:41 <Eagle_Rainbow> well, perhaps we just found the reason for that =:-D
20:40:06 <Eagle_Rainbow> Also Croatian seems to have the standard latin keyboard...
20:40:38 <Eagle_Rainbow> But besides all these localization matters, I can't get it to break...
20:40:51 <Eagle_Rainbow> how about the advanced setting then?
20:41:32 <Eagle_Rainbow> Should I have a look to propose a patch for that, or do you want to do that on your own?
20:41:35 <frosch123> ok, i am going to break the diff into logical committable parts then
20:42:20 <frosch123> i doubt i will get to the adv. setting today :)
20:42:43 <Eagle_Rainbow> ok, then I'll invest the next half an hour on that
20:42:50 <Eagle_Rainbow> perhaps I can get far enough until then...
21:10:25 *** Alberth has left #openttd.dev
21:57:46 <Eagle_Rainbow> frosch123: Just sent you a PM via the forum with how far I got + a screenshot
21:59:11 <frosch123> you cannot use a enum in the settings
21:59:30 <Eagle_Rainbow> well, at least it worked here...
21:59:39 <frosch123> SLE_UINT8 uses reinterpret_cast, so it fails on big endian
21:59:54 <frosch123> so, usually we only use uint8 there
22:00:01 <Eagle_Rainbow> will change that
22:00:28 <Eagle_Rainbow> but you then compare it against the enum values?
22:01:21 <frosch123> sometimes we use no enum at all :p sometimes we use some template class which name i cannot remember
22:01:37 <frosch123> sometimes we define the enum with = 0 and so on
22:01:48 <frosch123> and compare int with enum
22:02:07 <frosch123> full = _osk_activation_mode_states <- hmm, is that common?
22:02:13 <frosch123> i do not remember ever using it :p
22:02:14 <Eagle_Rainbow> ok, then let's move the enum definition to osk_gui
22:02:23 <Eagle_Rainbow> me neither -- but that doesn't say much :)
22:02:32 <frosch123> i think you will only need the enum in misc_gui :p
22:02:33 <Eagle_Rainbow> it's mandatory for SDTC_OMANYs anyway...
22:03:13 <frosch123> is SDTC_OMANY the right thing?
22:03:22 <frosch123> isn't it many out of many?
22:04:00 <frosch123> so you can write "disabled|single" or "single|double|disabled" in the config?
22:04:03 <frosch123> like for transparency options
22:05:04 <Eagle_Rainbow> don't think so...
22:05:10 <Eagle_Rainbow> SDTC_OMANY renders as DDB
22:05:38 <frosch123> i would think SGF_MULTISTRING triggers the DDB
22:05:57 <Eagle_Rainbow> So, you then think SDTC_LIST is the right one?
22:06:45 <frosch123> no idea, but OMANY is definitely used more often than i thought
22:06:51 <frosch123> so, it might as well be correct :)
22:07:11 <Eagle_Rainbow> gimme a sec... I'll try the list first...
22:07:16 <Eagle_Rainbow> it sounds more logical to me...
22:07:57 * Eagle_Rainbow should be careful with "logical" when talking about the settings.ini :p
22:08:21 <frosch123> stuff like the roadside also use OMANY
22:08:25 <frosch123> so it's likely correct :)
22:08:49 <Eagle_Rainbow> still if thousands do it right, it doesn't mean that it isn't wrong ;)
22:09:57 <Eagle_Rainbow> nope - it's OMANY... List seems to be for arrays
22:10:30 <Eagle_Rainbow> and then we also need the full = ... statement
22:10:46 <Eagle_Rainbow> BTW: Do you really want to have the enum definition at misc_gui.cpp?
22:11:02 <Eagle_Rainbow> editbox stuff was moved out there, isn't it?
22:11:07 <frosch123> i am quite sure it's the only place you will need it :p
22:11:36 <frosch123> QueryString::ClickEditBox is there
22:12:04 <Eagle_Rainbow> that's an argument
22:13:15 <Eagle_Rainbow> further things I should change?
22:14:48 <Eagle_Rainbow> Then I'll send you the updated version
22:14:55 <Eagle_Rainbow> BTW: "Many out of many" is MMANY :)
22:15:02 <frosch123> i'll guess we'll have some discussion about the helptext when more people are here
22:15:30 <Eagle_Rainbow> for sure... as already said: Just a first shot that there is written at least something
22:16:53 <Eagle_Rainbow> you've got mail
22:17:22 <Eagle_Rainbow> feel free to change anything there :) This patch is just meant for help...
22:18:24 <Eagle_Rainbow> Then, I'll help myself to bed ;) I'll have to get up early tomorrow...
23:01:05 *** Supercheese has joined #openttd.dev
continue to next day ⏵