Bug 697437

Summary: GtkFileChooserDialog lacks size column after some operations
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: gtk2Assignee: Cosimo Cecchi <ccecchi>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: balkov, jkachuck, mclasen, syeghiay, tpelka, walters
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: other   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 889172 (view as bug list) Environment:
Last Closed: 2012-06-20 12:58:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 684953, 711169, 756082, 804141, 889172    
Attachments:
Description Flags
Enable-the-size-column-in-recent-files-search.patch none

Description IBM Bug Proxy 2011-04-18 09:21:18 UTC
---Problem Description---
GtkFileChooserDialog lacks size column after some operations.

---uname output---
Linux host 2.6.32-71.el6.i686 #1 SMP Wed Sep 1 01:26:34 EDT 2010 i686 i686 i386 GNU/Linux
 
Machine Type = 8311-48J 
 
---Steps to Reproduce---
 1) Open GtkFileChooserDialog.
   For example,
    1a) Launch gedit
    1b) Choose File - Open
    Confirm the size column is available.
2) Choose "Recently Used" in Place area.
3) Choose "Search" in Place area.
4) Choose home directory
=> Then, the size column disappears,
    even if right click menu shows "Show Size Column" is active.
 
A quick check on Fedora 14 did not show the problem. The GTK version am using is both 

gtk3-2.90.5-1.fc14.i686
gtk2-2.22.0-1.fc14.1.i686

I confirmed this problem did NOT occur on Fedora14. Fedora14 has a size column in "Recently Used" page.
I think this change affected the problem.

I could look at the problem on two RHEL6 machines in our Lab.

They have
> gtk2-2.18.9-4.el6.i386
> (no gtk3)


I was able to nail down the exact patch that fixed this problem. 

More details on the patch:
--------------------------------

commit 682a3c8c75e9b327fa7013be6afd251dc2dbdbc7
Author: Benjamin Otte <otte>
Date:   Thu Jun 25 13:18:04 2009 +0200

    Enable the size column in recent files/search
    
    Previously information about file sizes was not available for search
    results and recent files, so the column was always hidden. As this
    information is now available, we can stop the special handling and use
    the same setting as in browse mode.
[prekarat@d6fc318 gtk+]$ git name-rev 682a3c8c75e9b327fa7013be6afd251dc2dbdbc7
682a3c8c75e9b327fa7013be6afd251dc2dbdbc7 tags/2.19.0~148


The patch solves the problem but it introduced another problem.
The patch shows the size column in "Resent Used" page, but the size value is not correct. All files
in the page have the same and random value.

The symptom doesn't occur on Fedora 14.

Further troubleshooting steps
-------------------------------------

Looking into further patches in the gtk git repo, I found that there are lot of changes to the
gtkfilechooser.c file. 

The following patch implements a new GtkFileSystemModel

commit 18b56b997089595df4c602d8d045a291d69a7ff8
Author: Benjamin Otte <otte>
Date:   Tue Jun 30 15:15:55 2009 +0200

    Implement new GtkFileSystemModel
    
    The new model is mostly API-compatible with the old model (minimal
    changes were required), but is a lot faster and has a lot of very
    desirable features.
    - the model does no longer support a tree, just a list of files in a
      given directory
    - the storage has been moved to a GArray as opposed to a tree
    - no more dependency on GtkFileSystem
    - columns are managed by the creator of the model, so any number of
      nodes can be added as needed. This also makes the API more similar
      to GtkListStore.
    - Values are filled on demand using a function given when creating the
      model.
    - The function can decide to let the model cache returned values or
      decide to be called again the next time the value is queried.
    - implements GtkTreeSortable
    - _gtk_file_system_model_get_value() was added to significantly speed
      up value access, which is necessary when sorting large models.


and there are various other patches on top of it. 

commit	a5390ad49e53522dedc6bbb894e715e7eef91f7f		Consolidate tree models for different browse modes
commit	30c1a1ee2c471f975d6bf3cb0cef608d428c7a77		Replace the cell data computations				
commit	105e6fbc11dbc37a6b863b766b878cad1c63b969		Use the GtkTreeSortable of the filesystem model 
commit	d68bca17711eb2fe7bdb05943bcd2125873d5b94		Use the faster accessor function in the sort functions

Can you please shed some light if we can apply all these patches to fix the problem? Looks like
these are major changes and wanted to know your thoughts if you would include them?

Cheers,
Prem

Comment 1 IBM Bug Proxy 2011-04-18 09:21:24 UTC
Created attachment 492833 [details]
Enable-the-size-column-in-recent-files-search.patch

Comment 3 IBM Bug Proxy 2011-04-27 11:51:25 UTC
------- Comment From prem.karat.ibm.com 2011-04-27 07:47 EDT-------
Hi
Did you get a chance to review this?

Comment 4 IBM Bug Proxy 2011-05-30 10:30:37 UTC
------- Comment From prem.karat.ibm.com 2011-05-30 06:25 EDT-------
(In reply to comment #11)
> Hi
> Did you get a chance to review this?
>
> Cheers,
> Prem

Hi Redhat,

Did you get a chance to look into this?

Cheers,
Prem

Comment 6 RHEL Program Management 2011-07-06 00:27:44 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 7 IBM Bug Proxy 2011-09-21 05:51:16 UTC
------- Comment From prem.karat.ibm.com 2011-09-21 01:48 EDT-------
Hi,

Can you confirm which release this is considered for?

Cheers,
Prem

Comment 8 Joseph Kachuck 2011-09-21 13:33:48 UTC
Hello,
This is currently requested for RHEL 6.3.

Thank You
Joe Kachuck

Comment 10 Cosimo Cecchi 2011-12-16 10:43:56 UTC
After talking with Benjamin, this sounds feasible without importing all the more invasive patches mentioned in this bug report.

We should make sure to do something like

gtk_tree_view_column_set_visible (impl->list_size_column, impl->show_size_column);

in search_switch_to_browse_mode() and recent_switch_to_browse_mode()

Comment 15 IBM Bug Proxy 2012-04-18 05:00:34 UTC
------- Comment From toshiona.com 2012-04-18 04:58 EDT-------
Thank you for the notice. I confirmed RHEL6.3 Alpha2 (RHEL6.3-20120329.0-Server-x86_64) solved the problem.

Comment 17 errata-xmlrpc 2012-06-20 12:58:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0809.html