Bug 553665

Summary: [Compiz] Image chooser dialog only accepts images with lower-case extension
Product: [Fedora] Fedora Reporter: Sandro Mani <manisandro>
Component: ccsmAssignee: Izhar Firdaus <kagesenshi.87>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: kagesenshi.87, leigh123linux, manisandro
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ccsm-0.8.2-4.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-01 22:52:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Printscreen of the issue none

Description Sandro Mani 2010-01-08 16:05:37 UTC
Description of problem:
When picking an image for any plugin, only images with lower-case extension get listed.

Version-Release number of selected component (if applicable):
0.8.2-21

How reproducible:
Always

Steps to Reproduce:
1. Place say test.png, test.PNG and test.Png in some folder
2. Open CompizConfig, under any plugin that allows you to choose some image click browse
3. Only test.png appears in the folder.
  
Actual results:


Expected results:


Additional info:

Comment 1 leigh scott 2010-01-08 20:40:06 UTC
I am unable to reproduce the problem here.

http://leigh123linux.fedorapeople.org/pub/Screenshot.png

Comment 2 Sandro Mani 2010-01-08 21:45:55 UTC
Created attachment 382561 [details]
Printscreen of the issue

That's funny... I am able to reproduce the issue no matter which folder or which plugin :s

Comment 3 Sandro Mani 2010-05-01 16:15:14 UTC
Just to quickly come back to this issue, it appears that gtk.FileFilter::add_pattern() is case sensitive (which actually looks like a bug to me). Anyhow, I'd suggest the following changes to
ccm/Widgets.py

@@ -1233,6 +1233,9 @@ class FileButton (gtk.Button):
         filter = gtk.FileFilter ()
         if self._image:
             filter.set_name (_("Images"))
+            filter.add_mime_type ("image/png")
+            filter.add_mime_type ("image/jpeg")
+            filter.add_mime_type ("image/svg+xml")
             filter.add_pattern ("*.png")
             filter.add_pattern ("*.jpg")
             filter.add_pattern ("*.jpeg")

which should make it more robust.

Comment 4 Fedora Update System 2010-05-01 21:51:41 UTC
ccsm-0.8.4-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/ccsm-0.8.4-2.fc13

Comment 5 Fedora Update System 2010-05-01 21:55:09 UTC
ccsm-0.8.2-4.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/ccsm-0.8.2-4.fc12

Comment 6 leigh scott 2010-05-02 08:06:58 UTC
(In reply to comment #3)
> Just to quickly come back to this issue, it appears that
> gtk.FileFilter::add_pattern() is case sensitive (which actually looks like a
> bug to me). Anyhow, I'd suggest the following changes to
> ccm/Widgets.py
> 
> @@ -1233,6 +1233,9 @@ class FileButton (gtk.Button):
>          filter = gtk.FileFilter ()
>          if self._image:
>              filter.set_name (_("Images"))
> +            filter.add_mime_type ("image/png")
> +            filter.add_mime_type ("image/jpeg")
> +            filter.add_mime_type ("image/svg+xml")
>              filter.add_pattern ("*.png")
>              filter.add_pattern ("*.jpg")
>              filter.add_pattern ("*.jpeg")
> 
> which should make it more robust.    

Thank you for posting the patch.

Comment 7 Fedora Update System 2010-05-04 06:07:56 UTC
ccsm-0.8.4-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2010-05-04 06:12:21 UTC
ccsm-0.8.2-4.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.