Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Selection Modes: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="prev" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="next" href="gtkfilechooser-installing-preview.html" title="Installing a Preview widget">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gtk-migrating-GtkFileChooser.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk-migrating-GtkFileChooser.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtkfilechooser-installing-preview.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="gtkfilechooser-selection-modes"></a>Selection Modes</h2></div></div></div>
<p>
      <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> can be used in two modes, to select a single file at a 
      time or to select a set of more than one file.  To set this, use
      <a class="link" href="GtkFileChooser.html#gtk-file-chooser-set-select-multiple" title="gtk_file_chooser_set_select_multiple ()"><code class="function">gtk_file_chooser_set_select_multiple()</code></a>.  In single-selection
      mode, you can use <a class="link" href="GtkFileChooser.html#gtk-file-chooser-get-filename" title="gtk_file_chooser_get_filename"><code class="function">gtk_file_chooser_get_filename()</code></a> to get a file
      name from the local file system or <a class="link" href="GtkFileChooser.html#gtk-file-chooser-get-uri" title="gtk_file_chooser_get_uri ()"><code class="function">gtk_file_chooser_get_uri()</code></a> to
      get a full-formed URI.  In multiple-selection mode, you can use
      <a class="link" href="GtkFileChooser.html#gtk-file-chooser-get-filenames" title="gtk_file_chooser_get_filenames"><code class="function">gtk_file_chooser_get_filenames()</code></a> to get a <a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of filename strings, or
      <a class="link" href="GtkFileChooser.html#gtk-file-chooser-get-uris" title="gtk_file_chooser_get_uris ()"><code class="function">gtk_file_chooser_get_uris()</code></a> to get a list of URI strings.
    </p>
<p>
      Also, you can configure <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> to select files
      or folders.  Consider a backup program that needs to let the
      user select a folder that will be backed up along with its
      subfolders.  To configure whether <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> is used to select
      files or folders, use <a class="link" href="GtkFileChooser.html#gtk-file-chooser-set-action" title="gtk_file_chooser_set_action ()"><code class="function">gtk_file_chooser_set_action()</code></a>.  In
      addition, this lets you configure whether the file chooser will
      be used to select existing files or folders (e.g. for
      "File/Open"), or to type in new filenames (for
      "File/Save As...").
    </p>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>