Bug 11849 - importing fonts broken in drakfont
Summary: importing fonts broken in drakfont
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 4
Hardware: All Linux
Priority: Normal major
Target Milestone: Mageia 4
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 11778
  Show dependency treegraph
 
Reported: 2013-12-02 14:33 CET by Frank Griffin
Modified: 2014-07-09 16:06 CEST (History)
7 users (show)

See Also:
Source RPM: drakxtools-16.3-1.mga4
CVE:
Status comment:


Attachments
example (186.91 KB, image/jpeg)
2014-05-12 12:25 CEST, nikos papadopoulos
Details
Fix file selection (606 bytes, patch)
2014-05-12 13:53 CEST, Frédéric "LpSolit" Buclin
Details | Diff

Description Frank Griffin 2013-12-02 14:33:04 CET
In current cauldron, drakfont is using a new filechooser for selecting fonts to import.  If I click Import -> Add, and then use the filechooser to select all fonts in a directory, it returns to the Import popup displaying the font list as "ARRAY" followed by some random character string which I assume identifies the array of fonts to import (previously, it showed a scrollable list of the actual fonts).

If I then click Install, I see an error message in stderr saying that file ARRAY-xxxxxx does not exist, and I get an error popup saying "no font files found".

Obviously, the name of the font file array is being mistaken for the contents of the array.

I notice that when run from the command line, mcc shows that it is loading OpenJDK.  If the new filechooser is Java-based, the error is probably that (arrayname).toString() is mistakenly being used to refer to a readable list of the array elements.  Unless overriden, toString() defaults to returning the internal name of the Java object, not its contents.  If the filechooser is passing back an array of selected elements, you'd (depending on what the display list of chosen fonts actually is) have to either pass the array to it or iterate through the array adding the individual elements to it.

Reproducible: 

Steps to Reproduce:
Frank Griffin 2013-12-02 14:34:57 CET

Summary: importing multiple fonts broken in drakconf => importing multiple fonts broken in drakfont

Comment 1 Thierry Vignaud 2013-12-02 15:24:13 CET
It's not java based. It's a side effect of WebKit.
What reports "rpm -q drakxtools?"

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud

Comment 2 Frank Griffin 2013-12-02 16:19:16 CET
[root@jaglap ~]# rpm -q drakxtools
drakxtools-16.3-1.mga4

Source RPM: drakxtools => drakxtools-16.3-1.mga4

Comment 3 Frank Griffin 2014-01-14 19:03:20 CET
Still happening in current cauldron with drakxtools-16.21-1.

Keywords: NEEDINFO => (none)

Comment 4 Martin Whitaker 2014-02-03 21:59:32 CET
Still present in Mageia 4 release. It happens even if you select a single font file, i.e. font import is completely broken.

CC: (none) => mageia

Comment 5 christian fischer 2014-02-12 22:50:24 CET
hello 
Workarround with Kde4 Tools

CC: (none) => christian-maryse.fischer

Colegota El Villano 2014-03-24 20:10:59 CET

CC: (none) => el_colegota

Comment 6 Frédéric "LpSolit" Buclin 2014-05-06 20:35:13 CEST
Could someone fix this bug? I need to import some fonts from Windows and this bug makes this impossible.

Severity: normal => major
CC: (none) => LpSolit
Hardware: x86_64 => All
Version: Cauldron => 4
Target Milestone: --- => Mageia 4

Comment 7 Frédéric "LpSolit" Buclin 2014-05-06 20:36:13 CEST
As said in comment 4, this problem is also present when importing only one font.

Summary: importing multiple fonts broken in drakfont => importing fonts broken in drakfont

Comment 8 nikos papadopoulos 2014-05-12 12:25:17 CEST
Created attachment 5149 [details]
example

CC: (none) => 231036448

Comment 9 nikos papadopoulos 2014-05-12 12:29:34 CEST
The "Import Windows font" worked for me ( I have Windows in another partition),
but installing one or multiple fonts is not working.
Comment 10 Frédéric "LpSolit" Buclin 2014-05-12 13:53:32 CEST
Created attachment 5150 [details]
Fix file selection

$file_dialog->get_filenames returns an arrayref, not an array. This patch fixes the problem.
Comment 11 Frédéric "LpSolit" Buclin 2014-05-12 13:59:15 CEST
Thierry: could you commit this fix, please?
Comment 12 A Walker 2014-06-26 20:12:37 CEST
Bug is still present in Mageia 4.1.

CC: (none) => AAW

Comment 13 Mageia Robot 2014-06-26 22:35:14 CEST
commit 6b2533b2540385390dc46596d3ef0587cdb720cb
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Thu Jun 26 22:33:57 2014 +0200

    fix installing fonts (Frédéric Buclin, mga#11849)
    
    fallout from gtk2 -> gtk3 switch
    get_filenames() now returns an arrayref instead of a list.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=6b2533b2540385390dc46596d3ef0587cdb720cb
Comment 14 Mageia Robot 2014-06-26 22:35:36 CEST
commit 84f76820747fad90a3ebcc5d9521256f6711a3c8
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Thu Jun 26 22:33:57 2014 +0200

    fix installing fonts (Frédéric Buclin, mga#11849)
    
    fallout from gtk2 -> gtk3 switch
    get_filenames() now returns an arrayref instead of a list.
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=84f76820747fad90a3ebcc5d9521256f6711a3c8
Thierry Vignaud 2014-07-09 15:56:11 CEST

Blocks: (none) => 11778

Comment 15 Thierry Vignaud 2014-07-09 16:06:27 CEST
Closed

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.