Bug 948644 - Gtk::FileChooserButton behaves strange
Summary: Gtk::FileChooserButton behaves strange
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-04 23:03 UTC by Martin Sourada
Modified: 2013-05-28 01:03 UTC (History)
3 users (show)

Fixed In Version: gtk2-2.24.18-1.fc18
Clone Of:
Environment:
Last Closed: 2013-05-28 01:03:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample test case in ruby (709 bytes, application/octet-stream)
2013-04-04 23:03 UTC, Martin Sourada
no flags Details
Sample test case in C (1.30 KB, text/plain)
2013-04-04 23:58 UTC, Martin Sourada
no flags Details

Description Martin Sourada 2013-04-04 23:03:03 UTC
Created attachment 731762 [details]
Sample test case in ruby

Description of problem:
Using Gtk::FileChooserButton to select folders is broken in multiple ways: 
1. Choosing from the drop-down list (home, filesystem, bookmarked folders, ..) does not change #filename
2. Canceling directory choose via dialog sets label to Other... which isn't working
3. Sometimes prints (probably harmless) assertion failure:
 Gtk-CRITICAL **:_gtk_file_system_model_get_iter_for_file: assertion `GTK_IS_FILE_SYSTEM_MODEL (model)' failed


Version-Release number of selected component (if applicable):
rubygem-gtk2-1.2.4-1.fc18.i686

How reproducible:
Always

Steps to Reproduce:
1. Use Gtk:FileChooserButton with Gtk::FileChooser::ACTION_SELECT_FOLDER action in a ruby/gtk2 app
2. Run the app
3. Try to select a folder from the drop-down list
4. Try to check the folder was actually selected
  
Actual results:
#filename is nil, #current_dir as well, file-set signal is not emitted.

Expected results:
#filename is set to the selected directory, #current_dir to its parent, file-set signal is emitted.

Additional info:
I haven't tried yet the same with pure C app, I might get some spare time to try it tomorrow. Ruby sample test case is attached, run with 
$ ruby ./test.rb
(I didn't add shebang)

Comment 1 Martin Sourada 2013-04-04 23:58:09 UTC
Created attachment 731783 [details]
Sample test case in C

So I've just made a C test case and it seems the bug's in gtk2. Build this test case with
$ gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -o test test.c

It's notable that when the same source is compiled against gtk3 it works as expected (only the file-set signal isn't emitted when changing the directory via the drop-down list).

Comment 2 Martin Sourada 2013-04-05 00:04:59 UTC
(In reply to comment #1)
> Created attachment 731783 [details]
> Sample test case in C
> 
> So I've just made a C test case and it seems the bug's in gtk2. Build this
> test case with
> $ gcc `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -o test
> test.c
> 
> It's notable that when the same source is compiled against gtk3 it works as
> expected (only the file-set signal isn't emitted when changing the directory
> via the drop-down list).

Reassigning to gtk2 WRT above.

gtk2-2.24.16-1.fc18.i686
gtk3-3.6.4-1.fc18.i686

Comment 3 Kalev Lember 2013-05-26 00:05:06 UTC
Should be fixed in gtk2 2.24.18. Can you give it a try, please?

Comment 4 Fedora Update System 2013-05-26 00:08:17 UTC
gtk2-2.24.18-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/gtk2-2.24.18-1.fc18

Comment 5 Fedora Update System 2013-05-27 00:33:00 UTC
Package gtk2-2.24.18-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gtk2-2.24.18-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9336/gtk2-2.24.18-1.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-05-28 01:03:40 UTC
gtk2-2.24.18-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


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