Commit d40eda7e authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford
Browse files

Add two more folder modes to the enum.

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
parent a8c8dff3
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
......
......@@ -76,6 +76,36 @@ fields.
</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>
......@@ -170,33 +200,3 @@ End:
-->
<!-- ##### 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:
......@@ -365,54 +365,6 @@ XlibRGB
@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.
......
......@@ -151,6 +151,46 @@ In the future it will do full alpha compositing.
</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>
......
......@@ -2094,6 +2094,22 @@ Claim or disclaim ownership of the PRIMARY X selection.
@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.
......
......@@ -46,6 +46,14 @@ a text entry field with a dropdown list
@Returns:
<!-- ##### FUNCTION gtk_combo_box_entry_new_text ##### -->
<para>
</para>
@Returns:
<!-- ##### FUNCTION gtk_combo_box_entry_set_text_column ##### -->
<para>
......
......@@ -211,11 +211,17 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
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>
......@@ -259,24 +265,6 @@ update_preview_cb (GtkFileChooser *file_chooser, gpointer data)
@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>
......
......@@ -91,6 +91,13 @@ functions below.
</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.
......
......@@ -55,6 +55,13 @@ the interface functions.
</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.
......
......@@ -721,6 +721,14 @@ Parses resource information directly from a string.
@Returns:
<!-- ##### FUNCTION gtk_rc_reset_styles ##### -->
<para>
</para>
@settings:
<!-- ##### FUNCTION gtk_rc_add_default_file ##### -->
<para>
</para>
......
......@@ -52,6 +52,20 @@ Returns whether the style is attached to a window.
@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>
......@@ -884,6 +898,20 @@ Deprecated alias for gtk_style_apply_default_background().
@height:
<!-- ##### FUNCTION gtk_draw_insertion_cursor ##### -->
<para>
</para>
@widget:
@drawable:
@area:
@location:
@is_primary:
@direction:
@draw_arrow:
<!-- ##### STRUCT GtkBorder ##### -->
<para>
......
......@@ -214,53 +214,6 @@ gtk_file_chooser_get_action (GtkFileChooser *chooser)
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
......@@ -315,10 +268,10 @@ gtk_file_chooser_get_local_only (GtkFileChooser *chooser)
* @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
**/
......
......@@ -35,7 +35,9 @@ typedef struct _GtkFileChooser GtkFileChooser;
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);
......@@ -56,9 +58,6 @@ GQuark gtk_file_chooser_error_quark (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);
......
......@@ -142,7 +142,6 @@ struct _GtkFileChooserDefault
/* Flags */
guint folder_mode : 1;
guint local_only : 1;
guint preview_widget_active : 1;
guint select_multiple : 1;
......@@ -452,7 +451,6 @@ gtk_file_chooser_default_iface_init (GtkFileChooserIface *iface)
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;
......@@ -1112,9 +1110,6 @@ create_folder_tree (GtkFileChooserDefault *impl)
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 ();
......@@ -1255,7 +1250,8 @@ add_bookmark_foreach_cb (GtkTreeModel *model,
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;
......@@ -1278,7 +1274,8 @@ add_bookmark_button_clicked_cb (GtkButton *button,
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;
......@@ -1357,8 +1354,6 @@ selection_is_folders (GtkFileChooserDefault *impl)
struct is_folders_foreach_closure closure;
GtkTreeSelection *selection;
g_assert (!impl->folder_mode);
closure.impl = impl;
closure.all_folders = TRUE;
......@@ -1383,7 +1378,8 @@ bookmarks_check_add_sensitivity (GtkFileChooserDefault *impl)
/* 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;
......@@ -1393,7 +1389,9 @@ bookmarks_check_add_sensitivity (GtkFileChooserDefault *impl)
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);
}
......@@ -1637,8 +1635,6 @@ create_file_list (GtkFileChooserDefault *impl)
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 */
......@@ -2037,34 +2033,22 @@ update_appearance (GtkFileChooserDefault *impl)
{
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);
......@@ -2076,24 +2060,23 @@ update_appearance (GtkFileChooserDefault *impl)
set_select_multiple (impl, FALSE, TRUE);
}
}
else /* GTK_FILE_CHOOSER_ACTION_OPEN */