GTK File Chooser Expanded by Default

Monday, March 13. 2006

Ever felt annoyed by that stupid GTK 2.x file chooser, which hides the folders by default and you have to click on Browse for other folders each time you wish to save a file in a folder other than the few provided in that weird Save in folder drop down list?

Default GTK File Chooser

And of course it's once again the "Users are stupid" mentality of Gnome, which even does not offer an option for the user to have it expanded by default. So I googled and found a description along with a patch for Gentoo, which expands the folders in the GTK file chooser dialog by default.

GTK File Chooser with Expanded Folders

I applied this patch to the SuSE 10.0 source RPM and it works. Here is my description on how to create a RPM including the patch and for the people who trust me I also offer the patched RPMs for download.

HOW TO CREATE A PATCHED RPM

The following has been tested with GTK+ 2.8.3 on SuSE Linux 10.0. I guess it may work on other distributions with other versions of GTK, too, since the patch is very, very simple.

  1. Create the following directories:
    • ~/packages/BUILD
    • ~/packages/RPMS
    • ~/packages/RPMS/i586
    • ~/packages/SOURCES
    • ~/packages/SPECS
    • ~/packages/SRPMS
    • ~/packages/tmp
  2. Install the SuSE GTK source RPM file: rpm -ihv gtk2-2.8.3-4.src.rpm.
  3. cd ~/packages/SOURCES
  4. Extract the source archive: tar jxvf gtk+-2.8.3.tar.bz2
  5. cd gtk+-2.8.3
  6. Download the patch into the directory ~/packages/SOURCES/gtk+-2.8.3 or simply use wget: wget http://twc.sshunet.nl/~mpsindla/files/gtk+-dialog.patch
  7. Apply the patch: patch -p1 < gtk+-dialog.patch
  8. Go back to the sources directory: cd .. and create a new source code archive that contains the patched files: tar jcvf gtk+-2.8.3.tar.bz2 gtk+-2.8.3.
  9. Create the new RPM files: rpmbuild -ba ~/packages/SPECS/gtk2.spec
  10. Go and get a cup of coffee
  11. If everything succeeds you should get three RPM files in the directory ~/packages/RPMS/i586:
    • gtk2-2.8.3-4.i586.rpm
    • gtk2-devel-2.8.3-4.i586.rpm
    • gtk2-doc-2.8.3-4.i586.rpm
  12. Install these RPMs: rpm -ihv --force ~/packages/RPMS/i586/gtk2-* (the option --force is necessary to force RPM to reinstall the packages since you already have them installed on your system most probably)

If you managed to create a patched RPM for other versions of SuSE Linux or other distributions and are able to provide your packages for download feel free to add a comment with your download links.

And finally for the people with SuSE 10.0 who do not want to compile GTK here are my RPM packages:


Twitter Bookmark GTK File Chooser Expanded by Default  at del.icio.us Facebook Google Bookmarks Digg GTK File Chooser Expanded by Default Bookmark GTK File Chooser Expanded by Default  at YahooMyWeb

Trackbacks


Trackback specific URI for this entry
    No Trackbacks

Comments


    No comments

Add Comment

HTML-Tags will be converted to Entities.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA