Difference between revisions of "GTK+ File Chooser Dialog"
(Created page with "GIMP (GTK+ 2) GTK+ file chooser For GTK+ dialog, the location bar will not appear while viewing "Recently Used" in the file chooser. In this view, even Ctrl+L shortcut keys ...") |
m (→places) |
||
(5 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | + | The primary user interface for selecting files | |
+ | * File Open | ||
+ | * File Save | ||
− | GTK+ file chooser | + | Applications in Ubuntu / Mint call the GTK+ File Chooser Dialog for this purpose. |
+ | * GTK+ file chooser | ||
− | + | Which includes | |
+ | *GtkFileChooser interface | ||
+ | * GtkFileChooserDialog | ||
− | + | The basic elements of GtkFileSelection widget are: | |
− | + | #A drop-down menu to select parent directories of the current directory | |
− | + | #list of subdirectories of the current directory | |
− | + | #A list of files in the current directory | |
− | + | #An entry to type in the name of the file to load or save | |
− | + | #Optionally, a set of buttons to create new directories and to rename or delete files | |
+ | == customize and configure == | ||
vi /etc/gtk-3.0/settings.ini | vi /etc/gtk-3.0/settings.ini | ||
/home/nicolep/.config/gtk-2.0/gtkfilechooser.ini | /home/nicolep/.config/gtk-2.0/gtkfilechooser.ini | ||
− | |||
− | |||
Line 46: | Line 50: | ||
In Mint 18.3 To customize the list of "Places" that appears in the dialog you can edit the bookmarks file. | In Mint 18.3 To customize the list of "Places" that appears in the dialog you can edit the bookmarks file. | ||
+ | |||
+ | If you're using PCManFM and you click BOOKMARKS -> Add to Bookmarks an entry will be created in the ~/.config/gtk-3.0/bookmarks file | ||
+ | |||
+ | Also in PCManFM you can right-click on a bookmark and remove it, thus resulting in the entry being removed from the bookmarks file as well. | ||
+ | |||
+ | White Space is handled like this in the text file: "My Folder" | ||
+ | file:///office/My%20Folder My Folder | ||
+ | Notice that in the path %20 represents a white space, however, in the following label it is not necessary to use %20 for the white space. | ||
+ | |||
+ | === misc === | ||
+ | |||
+ | GIMP (GTK+ 2) | ||
+ | |||
+ | |||
+ | |||
+ | For GTK+ dialog, the location bar will not appear while viewing "Recently Used" in the file chooser. In this view, even Ctrl+L shortcut keys will not work. | ||
+ | |||
+ | KGtk is the hackish way to use KDE dialogs in GTK+ applications. | ||
+ | |||
+ | * ref: https://superuser.com/questions/944119/replace-gtk-file-dialog-with-alternative | ||
+ | |||
+ | |||
+ | |||
+ | {{:Template:Untidy Entry}} | ||
+ | |||
+ | == references == | ||
+ | * [http://fishsoup.net/bib/FileSelectorFosdem2003/ A new file selector for GTK+ by Owen Taylor] | ||
+ | * [http://lazka.github.io/pgi-docs/Gtk-3.0/classes/FileChooser.html Gtk 3.0, Interfaces, Gtk.FileChooser] | ||
+ | * [http://developer.gnome.org/gtk2/stable/GtkFileChooser.html GNOME GtkFileChooser, File chooser interface used by GtkFileChooserWidget and GtkFileChooserDialog] | ||
+ | * [http://developer.gnome.org/gtk2/stable/GtkSettings.html GNOME GtkSettings] | ||
+ | |||
+ | [[Category:Computer_Technology]] | ||
+ | [[Category:Linux]] |
Latest revision as of 13:43, 3 December 2019
The primary user interface for selecting files
- File Open
- File Save
Applications in Ubuntu / Mint call the GTK+ File Chooser Dialog for this purpose.
- GTK+ file chooser
Which includes
- GtkFileChooser interface
- GtkFileChooserDialog
The basic elements of GtkFileSelection widget are:
- A drop-down menu to select parent directories of the current directory
- list of subdirectories of the current directory
- A list of files in the current directory
- An entry to type in the name of the file to load or save
- Optionally, a set of buttons to create new directories and to rename or delete files
customize and configure
vi /etc/gtk-3.0/settings.ini
/home/nicolep/.config/gtk-2.0/gtkfilechooser.ini
As people already said here, you can set StartupMode=cwd in ~/.config/gtk-2.0/gtkfilechooser.ini. This file exists already, if it is GTK+2, but I am not sure if your screenshot shows GTK+3.
In this case insert this line into your ~/.config/gtk-3.0/settings.ini:
gtk-recent-files-enabled=false
If you want "/" to appear as first view, you need to chdir / before starting the application.
startup mode
In ~/.config/gtk-2.0/gtkfilechooser.ini
change
StartupMode=recent
to
StartupMode=cwd
"recent" and "cwd" are the choices available to the user. An app developer can set an arbitrary start up folder by calling gtk_file_chooser_set_current_folder ().
places
vi ~/.config/gtk-3.0/bookmarks
In Mint 18.3 To customize the list of "Places" that appears in the dialog you can edit the bookmarks file.
If you're using PCManFM and you click BOOKMARKS -> Add to Bookmarks an entry will be created in the ~/.config/gtk-3.0/bookmarks file
Also in PCManFM you can right-click on a bookmark and remove it, thus resulting in the entry being removed from the bookmarks file as well.
White Space is handled like this in the text file: "My Folder"
file:///office/My%20Folder My Folder
Notice that in the path %20 represents a white space, however, in the following label it is not necessary to use %20 for the white space.
misc
GIMP (GTK+ 2)
For GTK+ dialog, the location bar will not appear while viewing "Recently Used" in the file chooser. In this view, even Ctrl+L shortcut keys will not work.
KGtk is the hackish way to use KDE dialogs in GTK+ applications.
Note: This page is notably untidy. Information is unkept or not arranged neatly and in order. Organization is needed to clean up this page including the removal of options and revision of information presentation. You can help. Please contribute by registering your email address and adding your knowledge to this page. The D.U.C.K. wiki was created to be a free informative place that allows an open exchange of accurate information. Learn more... |