Zep Report post Posted December 13, 2005 That looks muchly impressive ttl =) Share this post Link to post Share on other sites
Placid Report post Posted December 13, 2005 Very nice ttlanhil :-) Good job old chap :-P Share this post Link to post Share on other sites
ttlanhil Report post Posted December 13, 2005 found a few snags, like when you go from tabs to a chat window... but I think all the bugs should be worked out (code-wise anyway... the channels list could probably do with better instructions and all before being sent to the translators) the drop-down list will close if you click the tab, the X, or mouse-out (because I can... it's easy enough to remove should it be annoying) active channel while on the 'All' tab is coloured in orange History button toggle in/out of console. the tab bar shows up in console and does filter it as well(including the option to show just PMs... this part alone should make a few people happy) the chat window does not have buttons for console/etc, however it won't get any worse than it is now... those not using the tab bar won't have the console button on their screen allatime... but if you can change that, you can use tab/f1 the stuff read from file should be ready to be translated once someone cleans up my late-night notes in the file... first we try to open the language-specific one, if that fails, we try the english one (which will be most of the time). should that fail, there's a much smaller list in the code itself as a backup CK was going to make adjustments to the tab widgets themselves to be able to have the 'X' to close thing, and maybe also some way of side-scrolling the tab bar (I hope). so I haven't bothered with that (however the tooltips for the channels in my patch means the two will likely need a bit of work done to get together... but only a bit) another piccie: (which the client takes for me, BTW ) now for the fun job of pruning just these changes out of my tree so I can submit a patch for yawl to pick to pieces ^_^ Share this post Link to post Share on other sites
Placid Report post Posted December 13, 2005 Its looking really good, although you seriously need a scroll widget or something for those tabs at the top. It looks a bit shoddy there. Share this post Link to post Share on other sites
Roja Report post Posted December 13, 2005 Nice, thanks Ttlanhil Share this post Link to post Share on other sites
ttlanhil Report post Posted December 13, 2005 Its looking really good, although you seriously need a scroll widget or something for those tabs at the top. It looks a bit shoddy there. that's what I was going for at 640x480 I can easily get a screen and a half to two screens worth of tabs even with the short names. I'll leave it for CK to work on the widgets though Share this post Link to post Share on other sites
ttlanhil Report post Posted December 13, 2005 well, cancel the highlighting of the 'active' tab, the way I was doing it had some bugs... and other ways are hiding from me. the part of the patch that would go into the main dev tree is on berlios, patch number 754 the other part is adjustments to the languages files. since I'm too lazy to figure out who to get to read and commit it (CK? lach? someone else?) I'll just put it here for now... hopefully the file is self expanatory, and should be easy for people to translate Share this post Link to post Share on other sites
Placid Report post Posted December 13, 2005 I'll test this when I get back if poss. Share this post Link to post Share on other sites
crusadingknight Report post Posted December 13, 2005 Tabs closing patch: http://rootshell.be/~bremac/patches/chantabs_patch.diff This adds an 'x' which closes each tab, which also sends #lc, and also adds #lc when tabs in the chat window are closed. Share this post Link to post Share on other sites
ttlanhil Report post Posted December 14, 2005 (edited) Tabs closing patch: http://rootshell.be/~bremac/patches/chantabs_patch.diff This adds an 'x' which closes each tab, which also sends #lc, and also adds #lc when tabs in the chat window are closed. long patch... and it turns out it does conflict with mine, because of that space-cleanup... so I'll add the relevant parts from your patch to mine on berlios (shouldn't code cleanup like that be done in a seperate, large patch? like this you have a lot more conflicts) ed: nevermind that... looks like your has already been commited to CVS... meh... now I have to go and change mine... *mutter* ed2: eh... the only conflict is because our patches insert stuff into the same spot in the code... adding my part before or after yours is simple... can't be bothered doing the keep-up-to-date thing with CVS though. if and hen someone tells me it'll go in, I'll do a cleanup vs cvs Edited December 14, 2005 by ttlanhil Share this post Link to post Share on other sites
crusadingknight Report post Posted December 17, 2005 the other part is adjustments to the languages files. since I'm too lazy to figure out who to get to read and commit it (CK? lach? someone else?) I'll just put it here for now... hopefully the file is self expanatory, and should be easy for people to translate Could you possibly use an XML format, ie. <chan-info id="[integer]" name="[string]">Description</chan-info> It's self documenting, because I think there's enough stuff to memorize for translation as it is. Share this post Link to post Share on other sites
ttlanhil Report post Posted December 17, 2005 Could you possibly use an XML format, ie. <chan-info id="[integer]" name="[string]">Description</chan-info> It's self documenting, because I think there's enough stuff to memorize for translation as it is. well, the file probably could, but I haven't played with the EL XML stuff before. Considering that at current all XML stuff seems to be read into pre-defined data structures, that defeats one of my goals for the patch (to be able to easily add/remove/etc channels. currently with XML you seem to only be able to edit without code changes). on the other hand, you could have the file in XML with no root node or anything and just read directly from the file and pretend it's not XML, that's just the format to get the data out of... but then you're not gaining anything I also think translating plain text in one language to another is likely to be easier than XML, but then translators are probably used to XML by now if this is done, you need a bunch of special-case channel numbers ('View all', 'History', et al), which would probably be negative ID numbers. if anyone wants to adjust this to use XML they're welcome to, but at current it accomplishes what I wanted it to and there are other things I want to move on to Share this post Link to post Share on other sites
crusadingknight Report post Posted December 17, 2005 (edited) Could you possibly use an XML format, ie. <chan-info id="[integer]" name="[string]">Description</chan-info> It's self documenting, because I think there's enough stuff to memorize for translation as it is. well, the file probably could, but I haven't played with the EL XML stuff before. Considering that at current all XML stuff seems to be read into pre-defined data structures, that defeats one of my goals for the patch (to be able to easily add/remove/etc channels. currently with XML you seem to only be able to edit without code changes). on the other hand, you could have the file in XML with no root node or anything and just read directly from the file and pretend it's not XML, that's just the format to get the data out of... but then you're not gaining anything I also think translating plain text in one language to another is likely to be easier than XML, but then translators are probably used to XML by now if this is done, you need a bunch of special-case channel numbers ('View all', 'History', et al), which would probably be negative ID numbers. if anyone wants to adjust this to use XML they're welcome to, but at current it accomplishes what I wanted it to and there are other things I want to move on to And dynamically loading a variable number of XML nodes from a root node is easy - take a look in notepad.c, for instance. Plain text is NOT self documenting, and make it a lot easier to make mistakes, especially when you're introducing a tab-dependant format. (\t is translated via some editors.) Dynamic loading is one of the points of XML. EDIT: Removed the first part. Here's the format I'd use: <channels> <!-- "False Channel" Information. --> <display name="[string]">Description</display> .. <!-- Real Channel Information. --> <chan-info id="[integer]" name="[string]">Description</chan-info> .. </channels> Anyway, if you want, I can write the parser for that (simple enough with libxml2), since I can relate to wanting to move on to another patch, etc. Edited December 17, 2005 by crusadingknight Share this post Link to post Share on other sites
ttlanhil Report post Posted December 17, 2005 Anyway, if you want, I can write the parser for that (simple enough with libxml2), since I can relate to wanting to move on to another patch, etc. if you wanna do that, feel free I have what I want out of it, but I'm all for people making it better Share this post Link to post Share on other sites
dns_server Report post Posted December 23, 2005 Looking good, the only thing that we need is to add a button to add a new channel to the list and bring up a new dialog to specify the channel number (with a spinner) and an input to specify the name. Share this post Link to post Share on other sites
ttlanhil Report post Posted December 23, 2005 Looking good, the only thing that we need is to add a button to add a new channel to the list and bring up a new dialog to specify the channel number (with a spinner) and an input to specify the name. and to remove them then? trouble with that is that you'd need to be able to let them remove ones they added... but it'd be better not to let them remove ones already there also currently the window won't take well to adusting the list length in run-time, it could be fixed ithout too much work, but we'd be better off with some sort of list widget that can hold line after line, add its own scrollbars when needed, etc. the frame widget I made a while back almost does this(only need to add a 'insert at end' and 'remove X & reposition following' functions for it to be enough), but it'd have to be adapted to the new widget setup (OO stuff that's currently #ifdef), reviewed, and comitted Share this post Link to post Share on other sites
ttlanhil Report post Posted December 26, 2005 here's an idea, why not use the shortname in #jc and #lc ? (automatically replace it with the number). the amount of work less for the server is probably negligible, but it's a small step in the direction of translation (note: #jc guild can't be done by this as easily) we could also use them for the message "welcome to channel X". again the translation, and the server not having to keep track of which channel is which. ooh, and there's also a slight network advantage to this, it will all reduce the traffic slightly. only downsides I see are that you can't do a server-side renaming of a channel between client updates, and that someone might change the name of a channel and forget about it (and think they joined a different channel) is it worth doing? Share this post Link to post Share on other sites
Roja Report post Posted January 3, 2006 Is this finished? Share this post Link to post Share on other sites
ttlanhil Report post Posted January 3, 2006 CK was going to make an XML version of the channel list. dunno how progress is on that. I'm also planning to change it so that #jc/#lc/@@ understand the names... this will useful to many players, and the game will act more as people suspect (`#jc name` will always match the channel name) there's also a bug in ctrl+pageup/pagedn that makes it cycle through the 'list' and 'history' tabs as well, which I'll fix at the same time Share this post Link to post Share on other sites
Roja Report post Posted January 3, 2006 Ok I'd really like to get these in for the update, so the sooner they can be done the better, i think they're very important for new players. Share this post Link to post Share on other sites
Placid Report post Posted January 3, 2006 tt, I got a segfault on start from a client running your patch (the patch #754 on berlios link). Bactrace is as follows: (gdb) backtrace full #0 0x00002aaaac1b6d40 in strlen () from /lib/libc.so.6 No symbol table info available. #1 0x00002aaaac1897d4 in vfprintf () from /lib/libc.so.6 No symbol table info available. #2 0x000000000042e66f in log_error (message=0x476af8 "Error reading '%s', using default set of channel names") at errors.c:51 ap = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffc7b030, reg_save_area = 0x7fffffc7af60}} #3 0x000000000041f167 in init_channel_names () at chat.c:233 line = "\200\uffff\uffff\uffff\uffff\177\000\000P\000\000\000\000\000\000\0001\000\000\000\000\000\000\000\000\2227\uffff\uffff*\000\000\uffff\032t\001", '\0' <repeats 28 times>, "\uffff\uffff\uffff\uffff\uffff\177\000\000P\000\000\000\000\000\000\0001\000\000\000\000\000\000\000\000\2227\uffff\uffff*\000\000\000\000\000\000\000\000\000\0000\016i\001\000\000\000\0000\016i\001\000\000\000\000\000\2227\uffff\uffff*\000\000(e1\001\000\000\000\000(\000\000\000\000\000\000\000\uffff\uffff\001\000\000\000\000\000 \202\016\004", '\0' <repeats 12 times>, "\002\031\033\uffff\uffff*\000\000`\uffff\235\001\000\000\000\000(e1\001\000\000\000\000`@G\000\000\000\000\000P\uffff\uffff\uffff\uffff\177\000\000\000\000\000\000\000\000\000\000\a\v\u052a"... fname = "./languages/en/strings/channels.txt\000\000\000\000\000\uffff\002\000\000\000\000\000\000\001\000\000\000\000\000\000\000\uffff#A\000\000\000\000\000\uffff\002\000\000\000\000\000\000\uffff\002\000\000\000\000\000\0000\033\210\001\000\000\000\0000#\210\001\000\000\000\000\uffff\002", '\0' <repeats 22 times>, "\uffff9D\000\000\000\000\000/home/alex/eternal//key.ini", '\0' <repeats 14 times>, "\2227\uffff\uffff*\000\000P\037\210\001\000\000\000\000`@G\000\000\000\000\000 \uffff\uffff\uffff\uffff\177\000\000\000%t\001\000\000\000\000P\037\210\001\000\000\000\000"... temp = "t shouldn't be that hard anyway, as this is a small\nisland. Again, if you get lost, ask for help. Oh, BTW, after you\nfinish all 3 tutorials, you will get a reward.\n\000\000\000\000\uffff\uffff\uffffC", '\0' <repeats 12 times>, "\035\uffff\037\uffff\uffff*", '\0' <repeats 19 times>, "p\uffff"... step = 0x2aaaac37a318 "h\uffff\uffff\uffff\uffff\177" offset = 0x0 fin = (FILE *) 0x0 i = 0 cnum = -3690192 #4 0x000000000043ea54 in init_stuff () at init.c:704 file_name = "languages/en/Encyclopedia/index.xml\000\000\000\000\000\232\231\231\231\231\231\uffff?\030\uffff7\uffff\uffff*\000\000{\024\uffffG\uffffz\204?\000\000\000\000\000\000\uffff?", '\0' <repeats 16 times>, "\uffff\210B\000\000\000\000\000\uffff\212G\000\000\000\000\000\005", '\0' <repeats 15 times>, "\uffff\uffff\uffff\177\000\000\000\000Z|G\000\000\000\000\000O|G\000\000\000\000\000D|G\000\000\000\000\0008|G\000\000\000\000\000,|G\000\000\000\000\000 |G\000\000\000\000\000\024|G\000\000\000\000\000\a|G\000\000\000\000\000\uffff{G\000\000\000\000\000\uffff{G\000\000\000\000\000\uffff{G"... #5 0x0000000000446b97 in main (argc=68173824, argv=0x476a01) at main.c:231 No locals. Share this post Link to post Share on other sites
crusadingknight Report post Posted January 3, 2006 OK, I can do the XML patch Thursday, and hopefully get some other stuff done too that day. (Until then, I've got fairly full afternoons). Share this post Link to post Share on other sites
ttlanhil Report post Posted January 4, 2006 tt, I got a segfault on start from a client running your patch (the patch #754 on berlios link). Bactrace is as follows: erm... not much practice with gdb backtraces... hmm... ahh! that LOG_ERROR call (in init_channel_names() ) uses %s but I didn't include the `,fname` change to the patch is as follows (this will go on berlios once I do the other stuff): --- chans.patch Wed Dec 14 02:03:41 2005 +++ chans2.patch Wed Jan 04 12:51:42 2006 @@ -471,7 +471,7 @@ + } + + if (fin == NULL){ //no english one either? okay, a very limited base set -+ LOG_ERROR("Error reading '%s', using default set of channel names"); ++ LOG_ERROR("Error reading '%s', using default set of channel names",fname); + generic_chans(); + return; + }else{ basically... just add the fname part at the end of the line however... for it to get to that message, it didn't find the channel list file. if you didn't grab it, get a copy from here (just as well someone didn't grab that patch, else this bug might have gone unnoticed! ) if you did get it and apply it, then there's a further problem aaand... thursday, eh? looks like I better get stuck into the other stuff, hopefully I'll be all done and have an updated version on berlios when CK is ready to start ^_^ Share this post Link to post Share on other sites
Placid Report post Posted January 4, 2006 tt, I got a segfault on start from a client running your patch (the patch #754 on berlios link). Bactrace is as follows: erm... not much practice with gdb backtraces... hmm... ahh! that LOG_ERROR call (in init_channel_names() ) uses %s but I didn't include the `,fname` change to the patch is as follows (this will go on berlios once I do the other stuff): --- chans.patch Wed Dec 14 02:03:41 2005 +++ chans2.patch Wed Jan 04 12:51:42 2006 @@ -471,7 +471,7 @@ + } + + if (fin == NULL){ //no english one either? okay, a very limited base set -+ LOG_ERROR("Error reading '%s', using default set of channel names"); ++ LOG_ERROR("Error reading '%s', using default set of channel names",fname); + generic_chans(); + return; + }else{ basically... just add the fname part at the end of the line however... for it to get to that message, it didn't find the channel list file. if you didn't grab it, get a copy from here (just as well someone didn't grab that patch, else this bug might have gone unnoticed! ) if you did get it and apply it, then there's a further problem aaand... thursday, eh? looks like I better get stuck into the other stuff, hopefully I'll be all done and have an updated version on berlios when CK is ready to start ^_^ OK thanks, i'll do that later (would prefer using an updated patch from berlios than hacking it all together myself, that just gets messy). If it didn't find the channel list file, shouldn't it: A.) Create one itself B.) Notify the user and carry on gracefully? Share this post Link to post Share on other sites
ttlanhil Report post Posted January 5, 2006 If it didn't find the channel list file, shouldn't it: A.) Create one itself B.) Notify the user and carry on gracefully? b. there's a smaller list in the code itself that's used if it can't find the file first it should check if there's a language-localised version. if not, check in the english directory. if still no, then use the list in the client (because we know it's there). that's the `generic_chans()` function it will LOG_ERROR when this happens though Share this post Link to post Share on other sites