| View previous topic :: View next topic |
| Good stuff? |
| It rules |
|
81% |
[ 22 ] |
| It sucks (I'd rather have the stock file selector) |
|
18% |
[ 5 ] |
|
| Total Votes : 27 |
|
| Author |
Message |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Fri Aug 08, 2003 6:05 am Post subject: New file selector for GTK+ 2.2.4 [updated 24-01-2004] |
|
|
This patch changes the file selector in GTK+ 2.2.4. Feel free to post suggestions or feature requests.
Note: this is not a replacement for the new 2.4 dialog. It just changes the old GtkFileSelector file dialog.
Changes to the original file dialog:
- The file selector now has Back, Up, Reload, Home, Bookmarks, Terminal and File Manager buttons. All toolbar buttons have tooltips.
- The file operation buttons are turned into toolbar buttons with nice icons.
- Removed the . and .. from the file list; they are now replaced by the Reload and Up buttons.
- UI cleanups: I changed the spacing in order to make the dialog look nicer and more HIG-compliant.
- The file list now has a Date and Size field. These can be disabled by setting the environment variable GTK_FILESEL_SIMPLE to 1.
- Removed the "Selection: /foo" label since it's kind of redundant. This also gives more space to the file list.
- The pulldown menu has been changed to a combo box. This can also be accessed using Ctrl+L.
- It will remember the last directory you visited, even when the GtkFileSelector widget is destroyed.
- If the app is linked to gnome-vfs, the file selector will display each file's file type name. If the app is linked to libgnomeui too, the file selector will also display the file icons. This feature does not add any dependancies to gnome-vfs or libgnomeui! Pure GTK+ will work like before, but GNOME apps will "magically" gain the ability to display file types and icons.
- Adds a filter combo box (code by Daniel Speyer).
Here's a screenshot:
This file selector is a bit more usable and looks a bit nicer. It's a full replacement for the old file selector, but is still fully compatible. Apps that modify the file selector, like Gimp, will continue to work correctly.
I've also written a script for easily upgrading to your existing GTK+ 2.2.x installation to a patched version. Fedora Core 1 users can install the RPM I built.
You can download the script or the patches here. _________________ All Your Packages Are Belong To Us
Last edited by FooBarWidget on Sat May 29, 2004 4:09 am; edited 23 times in total |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
|
| Back to top |
|
 |
ACK!! Guru

Joined: 08 Oct 2002 Posts: 596 Location: Virginia
|
Posted: Fri Aug 08, 2003 9:37 am Post subject: Re: New file selector for GTK+ 2.2.2 |
|
|
This is nice. Sure it does not go that far beyond what is currently seen in the XD2 file selector hack but it is a killer coherent start towards a usable file selector.
I have only one major criticism. There needs to be a list view so users can sort file entries by size, type and date. When trying to attach a file to an email in Evolution for example this would be very helpful especially when navigating a data dir with lots of small output files. _________________ "UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things." - Doug Gwyn |
|
| Back to top |
|
 |
Tank Newbie

Joined: 09 Jul 2003 Posts: 19
|
Posted: Fri Aug 08, 2003 9:59 am Post subject: |
|
|
Very nice, indeed. A good step in the right direction... _________________ Using Linux means you'll have more money for the important things in life. Like beer. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 6:46 am Post subject: |
|
|
OK I've added some more features to the file dialog.
- New toolbar buttons: Terminal and File Manager. Launches an appriopriate terminal or file manager in the current folder. It will launch Nautilus or Konqueror, depending on which desktop you're currently running.
- The widgets are now more compact so there's more size for the actual file list.
- The file list now has a Date and Size field. So you can now sort by size and date! These can be disabled by setting the environment variable GTK_FILESEL_SIMPLE to 1.
- Edit Bookmarks will now launch gedit when available.
- Removed the "Selection: /foo" label since it's kind of redundant. This also gives more space to the file list.
Any more suggestions or feature requests? _________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
Guest
|
Posted: Sun Aug 17, 2003 7:24 am Post subject: |
|
|
Is there a way to uninstall the patches?
Since running your install script, all my desktop icons are messed up, they don't render properly and get mixed up with others etc. The flicker round the place, so I wanted to undo your patch to see if that is the cause (which I expect it is because nothing else has changed on the system).
Thanks. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 7:41 am Post subject: |
|
|
If your original GTK+ was installed by RPM, simply reinstall the RPM. Grab your distributor's CD an force a reinstall of gtk+-2.0.something.rpm.
My guess is that something (?) went wrong during the compilation on your system. The only things I have changed are the toolbar and the file selector. What distribution are you using? _________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
ventricle Newbie

Joined: 17 Aug 2003 Posts: 10 Location: Australia
|
Posted: Sun Aug 17, 2003 7:51 am Post subject: |
|
|
Hi,
I'm using Gentoo. I'll rebuild gtk+ and see how I go. If this doesn't work, I'll just have to rebuild everything. Just compile time
I do find it wierd that the desktop drawing (nautilus) and the file menu icons are broken, considering your limited changes. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 8:18 am Post subject: |
|
|
Gentoo's build system allows you to specify additional patches right? So instead of using my install script, you could try using the individual patches in combination with Gentoo's build system. _________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
claus_s Moderator

Joined: 08 Jul 2003 Posts: 361 Location: Germany
|
Posted: Sun Aug 17, 2003 8:42 am Post subject: |
|
|
| FooBarWidget wrote: | | Any more suggestions or feature requests? |
Well, you ask so be prepared to get an answer.
- The nautilus icon could be improved, I believe. What about a small IF sequence and use a File-Icon of the default desktop ? (I needed to have a look into my menu to even recognice it as the nautilus icon - yes, shame on me).
- Is the second row (the drop-down entry) really necessary? Does anybody (or any app) uses it on a regular basis (I don't). If not, removing it, improves the look of the selector a lot.
- I think, an additional improve in look can be reach be making it a little bit more wider so that it matches the 4:3 monitor ratio)
- I do not know if that's possible: Would it be hard to let the selector pop up in the middle of the screen if the app doesn't use any specific options?
- Would it be problematic to add "Selection:" before the selection field?
- There are two nice icons in the ROX filer which improve handling: a list to change between normal and list view (normal view is good to have when you're using long filenames for multimedia files, for example), and an eye to show hidden files (ROX adds them to the list but, IMHO, to show only hidden files would be even better).
Add an additional field (drop-down) for "File-Type" and it would be the best file selector I've ever seen.
Regards. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 8:55 am Post subject: |
|
|
| Quote: | | The nautilus icon could be improved, I believe. What about a small IF sequence and use a File-Icon of the default desktop ? (I needed to have a look into my menu to even recognice it as the nautilus icon - yes, shame on me). |
Good idea. Only one problem: the icon I current use *is* the Nautilus icon (at least for GNOME 1; dunno where the GNOME 2 icon is). Do you know a better one?
| Quote: | | Is the second row (the drop-down entry) really necessary? Does anybody (or any app) uses it on a regular basis (I don't). If not, removing it, improves the look of the selector a lot. |
I do use it from time to time. And it's really the only way to see which directory you're currently in. Do you have anything in mind other than removing it completely?
| Quote: | | I think, an additional improve in look can be reach be making it a little bit more wider so that it matches the 4:3 monitor ratio) |
I already made it wider than the old file selector. The default size is now 500x420.
500 / 4 * 3 = 375, so it's already wider than the 4:3 ratio.
| Quote: | | I do not know if that's possible: Would it be hard to let the selector pop up in the middle of the screen if the app doesn't use any specific options? |
Doesn't it already pop up in the center already? It either pops up in the center of the screen, or in the center of the main window if there is one.
| Quote: | | Would it be problematic to add "Selection:" before the selection field? |
Actually I removed it on purpose because it seems redundant. Why do you want it back?
| Quote: | | There are two nice icons in the ROX filer which improve handling: a list to change between normal and list view (normal view is good to have when you're using long filenames for multimedia files, for example) |
I'm not sure what you're talking about. How do they look like?
| Quote: | | Add an additional field (drop-down) for "File-Type" and it would be the best file selector I've ever seen. |
This is not possible. A new API call is needed for applications to use this feature. The current API is too limited and has no concept of file type filters. You'll have to wait for the GTK+ 2.4 file selector.
In the mean time, you can use shell patterns. Just type *.txt and press Tab to filter out all *.txt files. _________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
claus_s Moderator

Joined: 08 Jul 2003 Posts: 361 Location: Germany
|
Posted: Sun Aug 17, 2003 9:59 am Post subject: |
|
|
Wow, thanks for the fast and detailed answer!
| FooBarWidget wrote: |
Good idea. Only one problem: the icon I current use *is* the Nautilus icon (at least for GNOME 1; dunno where the GNOME 2 icon is). Do you know a better one? |
Yes, it is the original nautilus icon, also on gnome2. However, I think most users will not know that it is. Most ppl probably associate a "normal file" icon with nautilus. For example, gthumb2 also uses a file icon to let users switch between "normal" view and "file selection" view. Thus, I think, a normal file icon would be the best idea (even as a default for Nautilus).
In your (gnome2) menu, see applications -> desktop options -> file options for what I mean.
| Quote: |
I do use it from time to time. And it's really the only way to see which directory you're currently in. Do you have anything in mind other than removing it completely?
|
Well, it messes the look of the selector because it's placed in the center and changes it size. That's my whole critic. Making it a "text drop down list" (sorry for the expression - I don't know it's true name) with fixed size across the selector width might do the trick.
| Quote: | I already made it wider than the old file selector. The default size is now 500x420.
500 / 4 * 3 = 375, so it's already wider than the 4:3 ratio.
|
Then it's not the ratio, please see below for a suggestion.
| Quote: | | Doesn't it already pop up in the center already? It either pops up in the center of the screen, or in the center of the main window if there is one. |
Indeed! I had an old gtk1 app in mind when thinking about it. I use a similar theme for gtk1 and 2 so I didn't notice. I'm sorry.
| Quote: | | Actually I removed it on purpose because it seems redundant. Why do you want it back? |
Well, i though about the word "Selection:", only, but please see below.
| Quote: | | I'm not sure what you're talking about. How do they look like? |
Hm, the ROX Homepage has no screenshots of it's new version. However, what do you and others think about the functionality? Showing hidden files (only) at a single click is also something I missed most in nautilus.
| Quote: | | This is not possible. A new API call is needed for applications to use this feature. The current API is too limited and has no concept of file type filters. You'll have to wait for the GTK+ 2.4 file selector. |
Yes, I know. That's why I didn't added it to the list but just told at the end.
Well, give me a few hours to rebuild your screenshot of the selector (and a day to get a webspace to upload it to). I already tested a few "designs" yesterday. Maybe they're worth to be considered and discussed.
All above points (directory, rastio, selection and the two items) will then be more clear, I think. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 10:45 am Post subject: |
|
|
| Quote: | Yes, it is the original nautilus icon, also on gnome2. However, I think most users will not know that it is. Most ppl probably associate a "normal file" icon with nautilus. For example, gthumb2 also uses a file icon to let users switch between "normal" view and "file selection" view. Thus, I think, a normal file icon would be the best idea (even as a default for Nautilus).
In your (gnome2) menu, see applications -> desktop options -> file options for what I mean. |
The Folder icon is already reserved for New Folder. I think users would think "New file" instead of "File manager" if I put a File icon on the toolbar.
| Quote: | | Well, it messes the look of the selector because it's placed in the center and changes it size. That's my whole critic. Making it a "text drop down list" (sorry for the expression - I don't know it's true name) with fixed size across the selector width might do the trick. |
OK I've changed this. I will post a new patch soon.
| Quote: | | Then it's not the ratio, please see below for a suggestion. |
Ah wait, I made a little math error. It should have been 420/3*4.
I've changed the default size to 560*420 now.
| Quote: | | Hm, the ROX Homepage has no screenshots of it's new version. However, what do you and others think about the functionality? Showing hidden files (only) at a single click is also something I missed most in nautilus. |
You can just type . and then hit Tab. _________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
ventricle Newbie

Joined: 17 Aug 2003 Posts: 10 Location: Australia
|
Posted: Sun Aug 17, 2003 10:50 am Post subject: |
|
|
| Quote: | | Gentoo's build system allows you to specify additional patches right? So instead of using my install script, you could try using the individual patches in combination with Gentoo's build system. |
You have to write an ebuild for this, to get it to work, and I've not ever done one, your script I'm sure is OK. Rebuilding GTK+ did not work, so I'm now recompiling Gnome, to see how it goes.
I do remember the same type of problem occurring when I tried to upgrade to Gnome 2.3.x to see what it was like, however I reverted because of a lot of little issues, so maybe something else has crept in there causing this. I'll find out how things go when the compile is finished. In the meantime, fluxbox will be good enough to keep mozilla happy...
I think it is a good idea what you are doing with this file selector. |
|
| Back to top |
|
 |
FooBarWidget Dedicated User

Joined: 16 Jul 2002 Posts: 219
|
Posted: Sun Aug 17, 2003 4:14 pm Post subject: |
|
|
OK I posted another patch. Changes:
- Fixed a crash bug.
- Made the default window size 560*420 (respect 4:3 ratio).
- The pulldown menu doesn't change size anymore.
- It will remember the last directory you visited, even when the GtkFileSelector widget is destroyed.
_________________ All Your Packages Are Belong To Us |
|
| Back to top |
|
 |
|