How to get a directory from the user

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get a directory from the user

Richard Shann
Hi,

I have seen GtkFileChooser for getting a file from the user, but how to
get a directory (folder)?

Richard Shann

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: How to get a directory from the user

Bas Wassink
On 2018-06-04 14:06, Richard Shann wrote:
> Hi,
>
> I have seen GtkFileChooser for getting a file from the user, but how to
> get a directory (folder)?
>
> Richard Shann
>

Use gtk_file_chooser_set_action(chooser,
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);

https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-action
https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#GtkFileChooserAction

/Compyx
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: How to get a directory from the user

Phil Wolff-2
In reply to this post by Richard Shann

void gtk_file_chooser_set_action (GtkFileChooser *chooser,
GtkFileChooserAction action);

set action to FILE_CHOOSER_ACTION_SELECT_FOLDER

On 06/04/2018 05:06, Richard Shann wrote:

> Hi,
>
> I have seen GtkFileChooser for getting a file from the user, but how to
> get a directory (folder)?
>
> Richard Shann
>
> _______________________________________________
> gtk-app-devel-list mailing list
> [hidden email]
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: How to get a directory from the user

Emmanuele Bassi
In reply to this post by Richard Shann
On 4 June 2018 at 13:06, Richard Shann <[hidden email]> wrote:

> Hi,
>
> I have seen GtkFileChooser for getting a file from the user, but how to
> get a directory (folder)?
>
>
You can use GtkFileChooser with GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER as
the action:

 -
https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#GtkFileChooserAction
 -
https://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-set-action

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: How to get a directory from the user

Richard Shann
On Mon, 2018-06-04 at 13:24 +0100, Emmanuele Bassi wrote:

>
>
> On 4 June 2018 at 13:06, Richard Shann <[hidden email]>
> wrote:
> > Hi,
> >
> > I have seen GtkFileChooser for getting a file from the user, but
> > how to
> > get a directory (folder)?
> >
>
> You can use GtkFileChooser with GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
> as the action:

Thank you!

Richard

_______________________________________________
gtk-app-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list