patchmldonkey, a multi-networks file-sharing client - Patches: patch #3867, bug fixes for the new GTK2 GUI

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3867: bug fixes for the new GTK2 GUI

Submitter:  su_blanc <su_blanc>
Submitted:  Mon 28 Mar 2005 06:40:05 AM UTC
   
 
Category:  Improved interfaces Priority:  7 - High
Status:  Done Assigned to:  None
Open/Closed:  Closed

Jump to the original submission

Thu 07 Apr 2005 04:15:31 PM UTC, comment #8: 

Applied CVS 2-5-30-4

spiralvoice <spiralvoice>
Group administrator
Tue 05 Apr 2005 06:18:54 PM UTC, comment #7: 

i applied this patch in revision 250 . i hope it still works on systems that have iconv in libiconv and not in libc.

Amorphous <amorphous>
Mon 04 Apr 2005 08:37:38 PM UTC, comment #6: 

diff.patch created some problems with the GTK1 GUIs, patch #3883 fixes it.

spiralvoice <spiralvoice>
Group administrator
Mon 04 Apr 2005 07:53:11 PM UTC, comment #5: 

diff.patch has been applied to CVS 2-5-30-2,
diff-1.patch will be in the next release.

spiralvoice <spiralvoice>
Group administrator
Sat 02 Apr 2005 01:39:52 AM UTC, comment #4: 

Finally here it is.
mlnet is now linked to libiconv to proceed with string conversions.
This is no more an option during configuration.
All the strings from the Core to the GUI are now UTF-8 encoded.
All the strings from the Core to the system host are locale encoded (ie when naming a completed file).
If a character cannot be converted it is replaced by a '_'.

Everything is working fine on win32. I still can't test on other platforms => please check and report.

The previous patch description is still valid.
The patch #3304 has been removed.

To compile on MinGW32, you have to download GNU libiconv for Win32.
http://www.gimp.org/~tml/gimp/win32/libiconv-1.9.1.bin.woe32.zip

We'll need to generate dll import libraries for libiconv (only iconv.lib is shiped). Download pexports here:
http://www.emmestech.com/software/cygwin/pexports-0.43/download_pexports.html

$ pexports.exe iconv.dll | sed 's/^_//' > iconv.def
$ pexports.exe charset.dll | sed 's/^_//' > charset.def
$ dlltool --dllname iconv.dll --intput-def iconv.def --output-lib libiconv.dll.a
$ dlltool --dllname charset.dll --input-def charset.def --output-lib libcharset.dll.a
$ ranlib libiconv.dll.a
$ ranlib libcharset.dll.a

put iconv.def, charset.def, libiconv.dll.a and libcharset.dll.a in the MinGW/lib as well as the headers localcharset.h, libcharset.h and iconv.h in MinGW/include.

configure.in has been changed to recognize libiconv under mingw32.

I hope not to much bugs have been introduced with this feature.



su_blanc <su_blanc>
Group Member
Tue 29 Mar 2005 07:26:18 PM UTC, comment #3: 

seems reasonable.

i assume one can not link to the glib part from lablgtk2 without linking to the whole lablgtk2 and pull in the whole bunch of other stuff (x...)? so i guess camomile is the way to go.

Amorphous <amorphous>
Tue 29 Mar 2005 11:45:37 AM UTC, comment #2: 

for the gui protocol, big question each time we change it.
Generally I let this task to the authoritative people (ie the dev).
But when I see the changelog of sancho dated 28/03/05
http://sancho-gui.sourceforge.net/download.phtml
I think they are ready.

Should we keep an updated GTK1 GUI? I don't know but development is limited. I would say why not but maybe only one...

IMO, the gui protocol is not ready regarding the string conversions. And the issue is not only for the GUI but also for the Core.
patch #3304 is inefficient for other GUIs. Conversion is currently done only on MLGUI side. The patch is a step forward but incomplete and currently can raise Error (in case utf8 string cannot be converted to locale - no fallback coded right now).
If we take a look where we might need carefull string conversions/usage, i came to the following diagram:

NET <-[A]-> MLNET <-[B]-> GUI <-[A']-> NET

MLNET <-[C]-> MLNET SYSTEM HOST
GUI <-[C']-> GUI SYSTEM HOST
GUI <-[C'']-> MLNET SYSTEM HOST (Sancho to preview files)

If I had to make a choice, I would implement as follows, considering that MLNET is only able to have ASCII strings:

[A] / [A'] = definetely, there is no magical rule. Anybody from the NET can send strings encoded in ISO-8859-15, IBM866, CP1252 ... The possible approach is to define a rule by preference according the host locale (what is implemented in guiUtf8.ml). If my computer has a local set to french, most likely I will exchange strings in ASCII, ISO-8859-1, ISO-8859-15, CP1252 ... but rarely in BIG5 (chinese).

[B] = should be definetely UTF-8 strings and the encoding done in the Core. High compatibility for all GUIs ... so conversion in mlnet should follow the rule above mentioned.

[C] / [C'] = if the GUI works in UTF-8 strings and if i rename a file, i can send non ASCII chars to the Core. Also when commiting a file, the Core shall be able to write the file name as per the System Host locale but maybe using a string encoded differentely.
For example my computer locale is set to fr_FR.UTF8 but I write a file name with a chinese name encoded in BIG5.
This pb has been raised many times in the BUGS list.

[C''] = as long as the string used to locate the temporary file is ASCII encoded there is no particular issue. That's the case because hashes use only ASCII chars.

The day everybody will use UTF8 locale, there won't be any problem ;-)

So then what to do to implement the strings conversion in mlnet:
1) link to Glib, implementing separate stubs. Todo and to debug.
2) link mlnet with lablgtk2 (Glib implementation is done)
3) link to camomile library.
4) any other suggestion?

I would choose 2).

Note also that the Core does not need to send to the GUI its locale.
Drawbacks : some additional CPU consumption... but nothing is free.

su_blanc <su_blanc>
Group Member
Mon 28 Mar 2005 09:33:25 AM UTC, comment #1: 

nice, good work.

isn't it better to behave for protocol 30 as we did before (so the other guis have time to support the new one)?
what about the two other gtk guis? (should we drop the old gtk gui, both, none?)

a question not related to this patch: is the gui-protocol now clean in regard to all these different languages that use non-ascii characters?

Amorphous <amorphous>
Mon 28 Mar 2005 06:40:05 AM UTC, original submission:  

As I can't test it on Linux right now, please check it carefully.
It's ok on win32.

bug #11988 : GUI-Protocol doesn't send hashes for files not from the donkey-network

Protocol Version 31 (see guiProto.ml):
  Core -> GUI: message 52 [FILE_INFO]
    Field file_uids is now encoded (string list) for protocol > 30 and for all networks (BT, eDonkey, gnutella1/2, fasttrack).
  Core -> GUI: message 48 [SHARED_FILE_INFO]
    Field shared_id (md4 - 16 bytes) has been replaced by shared_uids (string list)
    For protocols < 31, the MD4 sent is now invalid (filled with zeroes). Don't use it !

bug #12390 : GTK2 GUI configuration problem
I made some changes, I hope they work on Linux (win32 no problem). I'm a bit blind to fix this one.
Please report any bug

Other enhancements:

  • BT : add some support to display the files in the shared file list (including counters : requests & uploaded). See bTShare.ml
  • GUI:

    - fix some bugs in text display (while using Pango markup)
    - fix upload/download rate of clients
    - md4 is replaced by uids everywhere (downloads, uploads, results)



su_blanc <su_blanc>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #8645:  3867_2a.patch added by spiralvoice (132KiB - application/octet-stream - for CVS 2-5-30-3 (diff.patch was applied to 2-5-30-2, this is the missing stuff from diff-1.patch))
file #8637:  diff-1.patch added by su_blanc (171KiB - application/octet-stream - Updated. Cancel the previous one)
file #8629:  diff.patch added by su_blanc (40KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-04-07 spiralvoice Open/ClosedOpen Closed
2005-04-05 amorphous StatusIn Progress Done
2005-04-04 spiralvoice Attached File- Added 3867_2a.patch, #4421
2005-04-04 spiralvoice StatusNone In Progress
2005-04-02 su_blanc Attached File- Added diff-1.patch, #4413
2005-03-28 su_blanc Attached File- Added diff.patch, #4405

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code