Bug 521591 - ibus: check if the icon filename is a real file before trying to open it
Summary: ibus: check if the icon filename is a real file before trying to open it
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ibus
Version: 11
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Peng Huang
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-07 07:31 UTC by Harshula Jayasuriya
Modified: 2009-09-15 06:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-15 06:19:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Check if the icon member variable is an empty string and whether it maps to a real file. (1.05 KB, patch)
2009-09-07 07:33 UTC, Harshula Jayasuriya
no flags Details | Diff

Description Harshula Jayasuriya 2009-09-07 07:31:21 UTC
Description of problem:
* In ui/gtk/engineabout.py, the existing code assumes self.__engine_desc.icon contains a valid path to the icon file. However, some engines may not have an icon file, hence the variable can be empty. We need to check the variable before using it.

Version-Release number of selected component (if applicable):
* ibus-1.1.0.20090612-3.fc11.x86_64

How reproducible:
* Always

Steps to Reproduce:
1. Run ibus-setup
2. Click on the "Input Methods" tab and select an input method without its own icon
3. Press the "About" button
  
Actual results:
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hjayasur/ibus-root/share/ibus/setup/main.py", line 201, in __button_engine_about_cb
    about = EngineAbout(engine)
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 36, in __init__
    self.__init_ui()
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 50, in __init_ui
    self.__fill_text_view()
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 59, in __fill_text_view
    text_buffer.insert_pixbuf(iter, self.__load_icon(self.__engine_desc.icon))
  File "/home/hjayasur/ibus-root/share/ibus/setup/engineabout.py", line 92, in __load_icon
    pixbuf = gdk.pixbuf_new_from_file(icon)
glib.GError: Failed to open file '': No such file or directory
------------------------------------------------------------

Expected results:
* Display the "About" window

Comment 1 Harshula Jayasuriya 2009-09-07 07:33:11 UTC
Created attachment 359957 [details]
Check if the icon member variable is an empty string and whether it maps to a real file.

Comment 2 Peng Huang 2009-09-09 06:53:45 UTC
This problem has been fixed in upstream. I will build it for rawhide soon.

Comment 3 Peng Huang 2009-09-15 06:19:42 UTC
Fixed in ibus-1_2_0_20090915-1_fc12


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