Re: [Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes

2009-02-10 Thread Ticket System
#268: [PATCH] Allow using SI-based size prefixes
--+-
  Reporter:  bilbo|   Owner:  bilbo   
  Type:  enhancement  |  Status:  accepted
  Priority:  major|   Milestone:  4.7 
 Component:  mc-core  | Version:  4.6.2   
Resolution:   |Keywords:  rework  
  Blocking:   |   Blockedby:  
--+-

Comment(by slyfox):

  What do you mean by 'nongettextized M and K duplication' ?

 Ideally,
{, k, m, g, t, p, e, z, y, NULL};
 could be internationalized via gettext (in far future :])

 and this looks like identifier duplication:
 xtra = kilobyte_si?k:K;
 ...
 xtra = kilobyte_si?m:M;

 can be changed to suffix[1,2]/suffix_ic[1,2] (with little code
 restructurements: move suffix* definitions upper). But will it be more
 readable?

 Tried to apply patch and didn't find this config option in menus. Is it
 intended for use in '~/.mc/ini' file only?

-- 
Ticket URL: www.midnight-commander.org/ticket/268#comment:5
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes

2009-02-09 Thread Ticket System
#268: [PATCH] Allow using SI-based size prefixes
--+-
  Reporter:  bilbo|   Owner:  bilbo   
  Type:  enhancement  |  Status:  accepted
  Priority:  major|   Milestone:  4.7 
 Component:  mc-core  | Version:  4.6.2   
Resolution:   |Keywords:  review  
  Blocking:   |   Blockedby:  
--+-
Changes (by bilbo):

  * owner:  = bilbo
  * status:  new = accepted


-- 
Ticket URL: www.midnight-commander.org/ticket/268#comment:2
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


[Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes

2009-02-09 Thread Ticket System
#268: [PATCH] Allow using SI-based size prefixes
-+--
 Reporter:  bilbo|   Owner:   
 Type:  enhancement  |  Status:  new  
 Priority:  major|   Milestone:  4.7  
Component:  mc-core  | Version:  4.6.2
 Keywords:   |Blocking:   
Blockedby:   |  
-+--
 I have created a patch that allows switching between old (default) 1024
 based binary prefixes and SI (1000 based) size prefixes when displaying
 file sizes. I personally prefer 1000-based prefixes, so this patch gives
 user a choice to use them too if they want.

-- 
Ticket URL: www.midnight-commander.org/ticket/268
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes

2009-02-09 Thread Ticket System
#268: [PATCH] Allow using SI-based size prefixes
--+-
  Reporter:  bilbo|   Owner:  bilbo   
  Type:  enhancement  |  Status:  accepted
  Priority:  major|   Milestone:  4.7 
 Component:  mc-core  | Version:  4.6.2   
Resolution:   |Keywords:  rework  
  Blocking:   |   Blockedby:  
--+-

Comment(by bilbo):

 Oops, I overlooked this. I have attached a fixed patch.

 What do you mean by 'nongettextized M and K duplication' ?

-- 
Ticket URL: www.midnight-commander.org/ticket/268#comment:4
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [Midnight Commander] #268: [PATCH] Allow using SI-based size prefixes

2009-02-09 Thread Ticket System
#268: [PATCH] Allow using SI-based size prefixes
--+-
  Reporter:  bilbo|   Owner:  bilbo   
  Type:  enhancement  |  Status:  accepted
  Priority:  major|   Milestone:  4.7 
 Component:  mc-core  | Version:  4.6.2   
Resolution:   |Keywords:  rework  
  Blocking:   |   Blockedby:  
--+-
Changes (by slyfox):

  * keywords:  review = rework


Comment:

 Look here:

279 /*
280  * If true, SI units (1000 based) will be used for
281  * larger units (kilobyte, megabyte, ...).
282  * If false binary units (1024 based) will be used.
283  */
284 bool kilobyte_si = 0;

 and here:

393 if (kilobyte_si) {
394 size = (size + 512)  10;
395 } else {
396 size = (size + 500) / 1000;
397 }

 Looks like condition shoud be inverted.

 The rest looks fine
 (except, maybe, already been there nongettextized M and K
 duplication).

-- 
Ticket URL: www.midnight-commander.org/ticket/268#comment:3
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel