+Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
+
+ * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
+ modes to the enum.
+
+ * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
+ (gtk_file_chooser_get_folder_mode): Remove
+
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
+
+ * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
+ modes to the enum.
+
+ * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
+ (gtk_file_chooser_get_folder_mode): Remove
+
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
+
+ * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
+ modes to the enum.
+
+ * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
+ (gtk_file_chooser_get_folder_mode): Remove
+
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
+
+ * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
+ modes to the enum.
+
+ * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
+ (gtk_file_chooser_get_folder_mode): Remove
+
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
+Thu Feb 26 18:25:57 2004 Jonathan Blandford <jrb@gnome.org>
+
+ * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
+ modes to the enum.
+
+ * gtk/gtkfilechooser.c (gtk_file_chooser_set_folder_mode): Remove.
+ (gtk_file_chooser_get_folder_mode): Remove
+
Thu Feb 26 17:29:04 2004 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_wm_protocols_filter): Return
</para>
+<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
+ <para>
+ </para>
+
+@gdkpixbufloader:
+
+<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
+ <para>
+ </para>
+
+@gdkpixbufloader:
+@arg1:
+@arg2:
+@arg3:
+@arg4:
+
+<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
+ <para>
+ </para>
+
+@gdkpixbufloader:
+
+<!-- ##### SIGNAL GdkPixbufLoader::size-prepared ##### -->
+ <para>
+ </para>
+
+@gdkpixbufloader:
+@arg1:
+@arg2:
+
<!-- ##### FUNCTION gdk_pixbuf_loader_new ##### -->
<para>
-->
-<!-- ##### SIGNAL GdkPixbufLoader::area-prepared ##### -->
- <para>
- </para>
-
-@gdkpixbufloader:
-
-<!-- ##### SIGNAL GdkPixbufLoader::area-updated ##### -->
- <para>
- </para>
-
-@gdkpixbufloader:
-@arg1:
-@arg2:
-@arg3:
-@arg4:
-
-<!-- ##### SIGNAL GdkPixbufLoader::closed ##### -->
- <para>
- </para>
-
-@gdkpixbufloader:
-
-<!-- ##### SIGNAL GdkPixbufLoader::size-prepared ##### -->
- <para>
- </para>
-
-@gdkpixbufloader:
-@arg1:
-@arg2:
-
@obj: A GTK+ object.
-<!-- ##### ARG GdkPixbuf:bits-per-sample ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:colorspace ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:has-alpha ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:height ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:n-channels ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:pixels ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:rowstride ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### ARG GdkPixbuf:width ##### -->
-<para>
-
-</para>
-
-
<!-- ##### STRUCT GdkPixbufFrame ##### -->
<para>
This object describes an individual frame of an animation.
</para>
+<!-- ##### ARG GdkPixbuf:bits-per-sample ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:colorspace ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:has-alpha ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:height ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:n-channels ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:pixels ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:rowstride ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG GdkPixbuf:width ##### -->
+<para>
+
+</para>
+
<!-- ##### FUNCTION gdk_pixbuf_get_colorspace ##### -->
<para>
@claim: if %TRUE, claim the selection, otherwise, disclaim it.
@time: the timestamp for claiming the selection.
+<!-- ##### FUNCTION gtk_file_chooser_get_folder_mode ##### -->
+<para>
+
+</para>
+
+@chooser:
+@Returns:
+
+<!-- ##### FUNCTION gtk_file_chooser_set_folder_mode ##### -->
+<para>
+
+</para>
+
+@chooser:
+@folder_mode:
+
<!-- ##### FUNCTION gtk_font_selection_dialog_set_filter ##### -->
<para>
Sets one of the two font filters, to limit the fonts shown.
@Returns:
+<!-- ##### FUNCTION gtk_combo_box_entry_new_text ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
<!-- ##### FUNCTION gtk_combo_box_entry_set_text_column ##### -->
<para>
existing files or to save to a possibly new file.
</para>
-@GTK_FILE_CHOOSER_ACTION_OPEN: Indicates Open mode. The file chooser
+@GTK_FILE_CHOOSER_ACTION_OPEN: Indicates open mode. The file chooser
will only let the user pick an existing file.
-@GTK_FILE_CHOOSER_ACTION_SAVE: Indicates Save mode. The file chooser
+@GTK_FILE_CHOOSER_ACTION_SAVE: Indicates save mode. The file chooser
will let the user pick an existing file, or type in a new
filename.
+@GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER: Indicates an Open mode for
+ selecting folders. The file chooser will let the user pick an
+ existing folder.
+@GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER: Indicates a mode for creating a
+ new folder. The file chooser will let the user name an existing or
+ new folder.
<!-- ##### MACRO GTK_FILE_CHOOSER_ERROR ##### -->
<para>
@Returns:
-<!-- ##### FUNCTION gtk_file_chooser_set_folder_mode ##### -->
-<para>
-
-</para>
-
-@chooser:
-@folder_mode:
-
-
-<!-- ##### FUNCTION gtk_file_chooser_get_folder_mode ##### -->
-<para>
-
-</para>
-
-@chooser:
-@Returns:
-
-
<!-- ##### FUNCTION gtk_file_chooser_set_local_only ##### -->
<para>
</para>
+<!-- ##### SIGNAL GtkRadioButton::group-changed ##### -->
+<para>
+
+</para>
+
+@radiobutton: the object which received the signal.
+
<!-- ##### ARG GtkRadioButton:group ##### -->
<para>
Sets a new group for a radio button.
</para>
+<!-- ##### SIGNAL GtkRadioMenuItem::group-changed ##### -->
+<para>
+
+</para>
+
+@radiomenuitem: the object which received the signal.
+
<!-- ##### FUNCTION gtk_radio_menu_item_new ##### -->
<para>
Creates a new #GtkRadioMenuItem.
@Returns:
+<!-- ##### FUNCTION gtk_rc_reset_styles ##### -->
+<para>
+
+</para>
+
+@settings:
+
+
<!-- ##### FUNCTION gtk_rc_add_default_file ##### -->
<para>
</para>
@white_gc:
@bg_pixmap:
+<!-- ##### SIGNAL GtkStyle::realize ##### -->
+<para>
+
+</para>
+
+@style: the object which received the signal.
+
+<!-- ##### SIGNAL GtkStyle::unrealize ##### -->
+<para>
+
+</para>
+
+@style: the object which received the signal.
+
<!-- ##### FUNCTION gtk_style_new ##### -->
<para>
@height:
+<!-- ##### FUNCTION gtk_draw_insertion_cursor ##### -->
+<para>
+
+</para>
+
+@widget:
+@drawable:
+@area:
+@location:
+@is_primary:
+@direction:
+@draw_arrow:
+
+
<!-- ##### STRUCT GtkBorder ##### -->
<para>
return action;
}
-/**
- * gtk_file_chooser_set_folder_mode:
- * @chooser: a #GtkFileChooser
- * @folder_mode: %TRUE if the file chooser is used to select folders
- * rather than files.
- *
- * Sets whether the file chooser is used to select folders
- * rather than files. If in folder mode, only folders are displayed
- * to the use, and not the individual files inside the folders
- * and the user selects a single folder rather than one or
- * more files.
- *
- * Since: 2.4
- **/
-void
-gtk_file_chooser_set_folder_mode (GtkFileChooser *chooser,
- gboolean folder_mode)
-{
- g_return_if_fail (GTK_IS_FILE_CHOOSER (chooser));
-
- g_object_set (chooser, "folder-mode", folder_mode, NULL);
-}
-
-/**
- * gtk_file_chooser_get_folder_mode:
- * @chooser: a #GtkFileChooser
- *
- * Gets whether the file chooser is used to select folders
- * rather than files. See gtk_file_chooser_set_folder_mode()
- *
- * Return value: %TRUE if the file chooser is used to select
- * folders rather than files.
- *
- * Since: 2.4
- **/
-gboolean
-gtk_file_chooser_get_folder_mode (GtkFileChooser *chooser)
-{
- gboolean folder_mode;
-
- g_return_val_if_fail (GTK_IS_FILE_CHOOSER (chooser), FALSE);
-
- g_object_get (chooser, "folder-mode", &folder_mode, NULL);
-
- return folder_mode;
-}
-
/**
* gtk_file_chooser_set_local_only:
* @chooser: a #GtkFileChooser
* @chooser: a #GtkFileChooser
* @select_multiple: %TRUE if multiple files can be selected.
*
- * Sets whether multiple files can be selected in the file
- * selector. If the file selector if in folder mode (see
- * gtk_file_selector_set_folder_mode()) then only one folder
- * can be selected, without regard to this setting.
+ * Sets whether multiple files can be selected in the file selector. This is
+ * only relevant if the action is set to be GTK_FILE_CHOOSER_ACTION_OPEN or
+ * GTK_FILE_CHOOSER_ACTION_SAVE. It cannot be set with either of the folder
+ * actions.
*
* Since: 2.4
**/
typedef enum
{
GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_FILE_CHOOSER_ACTION_SAVE
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
} GtkFileChooserAction;
GType gtk_file_chooser_get_type (void);
void gtk_file_chooser_set_action (GtkFileChooser *chooser,
GtkFileChooserAction action);
GtkFileChooserAction gtk_file_chooser_get_action (GtkFileChooser *chooser);
-void gtk_file_chooser_set_folder_mode (GtkFileChooser *chooser,
- gboolean folder_mode);
-gboolean gtk_file_chooser_get_folder_mode (GtkFileChooser *chooser);
void gtk_file_chooser_set_local_only (GtkFileChooser *chooser,
gboolean local_only);
gboolean gtk_file_chooser_get_local_only (GtkFileChooser *chooser);
/* Flags */
- guint folder_mode : 1;
guint local_only : 1;
guint preview_widget_active : 1;
guint select_multiple : 1;
static void
gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
{
- impl->folder_mode = FALSE;
impl->local_only = TRUE;
impl->preview_widget_active = TRUE;
impl->select_multiple = FALSE;
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (impl->browse_directories_swin),
GTK_SHADOW_IN);
- if (impl->folder_mode)
- gtk_widget_show (impl->browse_directories_swin);
-
/* Tree */
impl->browse_directories_tree_view = gtk_tree_view_new ();
impl = GTK_FILE_CHOOSER_DEFAULT (data);
- if (impl->folder_mode)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
fs_model = impl->browse_directories_model;
child_iter = *iter;
GtkWidget *tree_view;
GtkTreeSelection *selection;
- if (impl->folder_mode)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
tree_view = impl->browse_directories_tree_view;
else
tree_view = impl->browse_files_tree_view;
struct is_folders_foreach_closure closure;
GtkTreeSelection *selection;
- g_assert (!impl->folder_mode);
-
closure.impl = impl;
closure.all_folders = TRUE;
/* Check selection */
- if (impl->folder_mode)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
tree_view = impl->browse_directories_tree_view;
else
tree_view = impl->browse_files_tree_view;
if (gtk_tree_selection_count_selected_rows (selection) == 0)
active = !shortcut_exists (impl, impl->current_folder);
else
- active = (impl->folder_mode || selection_is_folders (impl));
+ active = (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER ||
+ selection_is_folders (impl));
gtk_widget_set_sensitive (impl->browse_shortcuts_add_button, active);
}
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (impl->browse_files_swin),
GTK_SHADOW_IN);
- if (!impl->folder_mode)
- gtk_widget_show (impl->browse_files_swin);
/* Tree/list view */
{
GtkWidget *child;
- if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
- GtkWidget *top_level;
-
gtk_widget_show (impl->save_widgets);
- top_level = gtk_widget_get_toplevel (GTK_WIDGET (impl));
-
if (gtk_expander_get_expanded (GTK_EXPANDER (impl->save_expander)))
{
gtk_widget_set_sensitive (impl->save_folder_label, FALSE);
/*gtk_widget_set_sensitive (impl->save_folder_combo, FALSE);*/
gtk_widget_show (impl->browse_widgets);
- if (GTK_IS_WINDOW (top_level))
- gtk_window_set_resizable (GTK_WINDOW (top_level), TRUE);
}
else
{
gtk_widget_set_sensitive (impl->save_folder_label, TRUE);
/*gtk_widget_set_sensitive (impl->save_folder_combo, TRUE);*/
gtk_widget_hide (impl->browse_widgets);
- gtk_widget_queue_resize (top_level);
-#if 0
- if (GTK_IS_WINDOW (top_level))
- gtk_window_set_resizable (GTK_WINDOW (top_level), FALSE);
- if (GTK_IS_WINDOW (top_level))
- gtk_window_set_resizable (GTK_WINDOW (top_level), TRUE);
-#endif
}
gtk_widget_show (impl->browse_new_folder_button);
set_select_multiple (impl, FALSE, TRUE);
}
}
- else /* GTK_FILE_CHOOSER_ACTION_OPEN */
+ else if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
gtk_widget_hide (impl->save_widgets);
gtk_widget_show (impl->browse_widgets);
-
- if (impl->folder_mode)
- gtk_widget_show (impl->browse_new_folder_button);
- else
- gtk_widget_hide (impl->browse_new_folder_button);
}
-
- if (impl->folder_mode)
+ /* FIXME: */
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
+ gtk_widget_show (impl->browse_new_folder_button);
gtk_widget_hide (impl->browse_files_swin);
gtk_widget_show (impl->browse_directories_swin);
}
else
{
+ gtk_widget_hide (impl->browse_new_folder_button);
gtk_widget_hide (impl->browse_directories_swin);
gtk_widget_show (impl->browse_files_swin);
}
case GTK_FILE_CHOOSER_PROP_FILTER:
set_current_filter (impl, g_value_get_object (value));
break;
- case GTK_FILE_CHOOSER_PROP_FOLDER_MODE:
- {
- gboolean folder_mode = g_value_get_boolean (value);
- if (folder_mode != impl->folder_mode)
- {
- impl->folder_mode = folder_mode;
- update_appearance (impl);
- }
- }
- break;
case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY:
impl->local_only = g_value_get_boolean (value);
break;
case GTK_FILE_CHOOSER_PROP_FILTER:
g_value_set_object (value, impl->current_filter);
break;
- case GTK_FILE_CHOOSER_PROP_FOLDER_MODE:
- g_value_set_boolean (value, impl->folder_mode);
- break;
case GTK_FILE_CHOOSER_PROP_LOCAL_ONLY:
g_value_set_boolean (value, impl->local_only);
break;
info = data;
- if (info->impl->folder_mode)
+ if (info->impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ info->impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
fs_model = info->impl->browse_directories_model;
sel_iter = *iter;
selection = NULL;
- if (impl->folder_mode)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
+ impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
if (impl->browse_directories_model)
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_directories_tree_view));
if (days_diff > 1 && days_diff < 7)
format = "%A"; /* Days from last week */
else
+ /* FIXME: Get the right format for the locale */
format = _("%d/%b/%Y"); /* Any other date */
if (g_date_strftime (buf, sizeof (buf), format, &mtime) == 0)
GtkFileChooserWidgetPrivate *priv;
GObject *object;
gchar *current_folder;
- gchar *current_folder_uri;
object = parent_class->constructor (type,
n_construct_properties,