MODEL_COL_NUM_COLUMNS
};
+/* This list of types is passed to _gtk_file_system_model_new*() */
+#define MODEL_COLUMN_TYPES \
+ MODEL_COL_NUM_COLUMNS, \
+ G_TYPE_STRING, /* MODEL_COL_NAME */ \
+ G_TYPE_INT64, /* MODEL_COL_SIZE */ \
+ G_TYPE_LONG, /* MODEL_COL_MTIME */ \
+ G_TYPE_FILE, /* MODEL_COL_FILE */ \
+ G_TYPE_STRING, /* MODEL_COL_NAME_COLLATED */ \
+ G_TYPE_BOOLEAN, /* MODEL_COL_IS_FOLDER */ \
+ GDK_TYPE_PIXBUF, /* MODEL_COL_PIXBUF */ \
+ G_TYPE_STRING, /* MODEL_COL_SIZE_TEXT */ \
+ G_TYPE_STRING, /* MODEL_COL_MTIME_TEXT */ \
+ PANGO_TYPE_ELLIPSIZE_MODE /* MODEL_COL_ELLIPSIZE */
+
/* Identifiers for target types */
enum {
GTK_TREE_MODEL_ROW,
GtkTreeViewColumn *column,
GtkFileChooserDefault *impl);
-static void select_func (GtkFileSystemModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data);
-
static void path_bar_clicked (GtkPathBar *path_bar,
GFile *file,
GFile *child,
GtkFileChooserDefault *impl);
static void location_switch_to_path_bar (GtkFileChooserDefault *impl);
+static void stop_loading_and_clear_list_model (GtkFileChooserDefault *impl,
+ gboolean remove_from_treeview);
static void search_stop_searching (GtkFileChooserDefault *impl,
gboolean remove_query);
static void search_clear_model (GtkFileChooserDefault *impl,
if (impl->browse_path_bar_size_group)
g_object_unref (impl->browse_path_bar_size_group);
- load_remove_timer (impl);
-
/* Free all the Models we have */
- if (impl->browse_files_model)
- g_object_unref (impl->browse_files_model);
-
+ stop_loading_and_clear_list_model (impl, FALSE);
search_clear_model (impl, FALSE);
recent_clear_model (impl, FALSE);
+ /* stopping the load above should have cleared this */
+ g_assert (impl->load_timeout_id == 0);
+
g_free (impl->preview_display_name);
g_free (impl->edited_new_text);
GtkWidget *toplevel;
toplevel = gtk_widget_get_toplevel (widget);
- if (!GTK_WIDGET_TOPLEVEL (toplevel))
+ if (!gtk_widget_is_toplevel (toplevel))
return NULL;
else
return GTK_WINDOW (toplevel);
else
gtk_widget_hide (impl->preview_box);
- if (!GTK_WIDGET_MAPPED (impl))
+ if (!gtk_widget_get_mapped (GTK_WIDGET (impl)))
emit_default_size_changed (impl);
}
{
struct get_selected_file_closure *closure = data;
+ if (closure->file)
+ {
+ /* Just in case this function gets run more than once with a multiple selection; we only care about one file */
+ g_object_unref (closure->file);
+ closure->file = NULL;
+ }
+
gtk_tree_model_get (model, iter,
- MODEL_COL_FILE, &closure->file,
+ MODEL_COL_FILE, &closure->file, /* this will give us a reffed file */
-1);
- if (closure->file)
- g_object_unref (closure->file);
}
/* Returns a selected path from the file list */
file = get_selected_file (impl);
active = file && all_folders && (shortcut_find_position (impl, file) == -1);
+ if (file)
+ g_object_unref (file);
}
else
active = all_folders;
if (window
&& widget != window->default_widget
&& !(widget == window->focus_widget &&
- (!window->default_widget || !GTK_WIDGET_SENSITIVE (window->default_widget))))
+ (!window->default_widget || !gtk_widget_get_sensitive (window->default_widget))))
{
gtk_window_activate_default (window);
return TRUE;
{
impl->show_size_column = gtk_check_menu_item_get_active (item);
- if (impl->list_size_column)
- gtk_tree_view_column_set_visible (impl->list_size_column,
- impl->show_size_column);
+ gtk_tree_view_column_set_visible (impl->list_size_column,
+ impl->show_size_column);
}
/* Shows an error dialog about not being able to select a dragged file */
return TRUE;
}
+static void
+set_icon_cell_renderer_fixed_size (GtkFileChooserDefault *impl, GtkCellRenderer *renderer)
+{
+ gtk_cell_renderer_set_fixed_size (renderer,
+ renderer->xpad * 2 + impl->icon_size,
+ renderer->ypad * 2 + impl->icon_size);
+}
+
/* Creates the widgets for the file list */
static GtkWidget *
create_file_list (GtkFileChooserDefault *impl)
g_signal_connect (selection, "changed",
G_CALLBACK (list_selection_changed), impl);
+ /* Keep the column order in sync with update_cell_renderer_attributes() */
+
/* Filename column */
impl->list_name_column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (impl->list_name_column, _("Name"));
renderer = gtk_cell_renderer_pixbuf_new ();
- /* We set a fixed size so that we get an emoty row even if no icons are loaded yet */
- gtk_cell_renderer_set_fixed_size (renderer,
- renderer->xpad * 2 + impl->icon_size,
- renderer->ypad * 2 + impl->icon_size);
+ /* We set a fixed size so that we get an empty slot even if no icons are loaded yet */
+ set_icon_cell_renderer_fixed_size (impl, renderer);
gtk_tree_view_column_pack_start (impl->list_name_column, renderer, FALSE);
impl->list_name_renderer = gtk_cell_renderer_text_new ();
}
else if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY)
{
- if (GTK_WIDGET_HAS_FOCUS (impl->location_entry))
+ if (gtk_widget_has_focus (impl->location_entry))
{
location_mode_set (impl, LOCATION_MODE_PATH_BAR, TRUE);
}
impl->update_current_folder_cancellable = NULL;
}
- if (impl->show_and_select_files_cancellable)
- {
- g_cancellable_cancel (impl->show_and_select_files_cancellable);
- impl->show_and_select_files_cancellable = NULL;
- }
-
if (impl->should_respond_get_info_cancellable)
{
g_cancellable_cancel (impl->should_respond_get_info_cancellable);
cells = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (
gtk_tree_view_get_column (GTK_TREE_VIEW (impl->browse_files_tree_view), 0)));
renderer = GTK_CELL_RENDERER (cells->data);
- gtk_cell_renderer_set_fixed_size (renderer,
- renderer->xpad * 2 + impl->icon_size,
- renderer->ypad * 2 + impl->icon_size);
+ set_icon_cell_renderer_fixed_size (impl, renderer);
g_list_free (cells);
if (impl->browse_files_model)
_gtk_file_system_model_clear_cache (impl->browse_files_model, MODEL_COL_PIXBUF);
GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->size_allocate (widget, allocation);
}
-static gboolean
-get_is_file_filtered (GtkFileChooserDefault *impl,
- GFile *file,
- GFileInfo *file_info)
-{
- GtkFileFilterInfo filter_info;
- GtkFileFilterFlags needed;
- gboolean result;
-
- if (!impl->current_filter)
- return FALSE;
-
- filter_info.contains = GTK_FILE_FILTER_DISPLAY_NAME | GTK_FILE_FILTER_MIME_TYPE;
-
- needed = gtk_file_filter_get_needed (impl->current_filter);
-
- filter_info.display_name = g_file_info_get_display_name (file_info);
- filter_info.mime_type = g_content_type_get_mime_type (g_file_info_get_content_type (file_info));
-
- if (needed & GTK_FILE_FILTER_FILENAME)
- {
- filter_info.filename = g_file_get_path (file);
- if (filter_info.filename)
- filter_info.contains |= GTK_FILE_FILTER_FILENAME;
- }
- else
- filter_info.filename = NULL;
-
- if (needed & GTK_FILE_FILTER_URI)
- {
- filter_info.uri = g_file_get_uri (file);
- if (filter_info.uri)
- filter_info.contains |= GTK_FILE_FILTER_URI;
- }
- else
- filter_info.uri = NULL;
-
- result = gtk_file_filter_filter (impl->current_filter, &filter_info);
-
- g_free ((gchar *)filter_info.filename);
- g_free ((gchar *)filter_info.uri);
- g_free ((gchar *)filter_info.mime_type);
-
- return !result;
-}
-
static void
set_sort_column (GtkFileChooserDefault *impl)
{
gtk_expander_set_expanded (GTK_EXPANDER (impl->save_expander), expand_folders);
impl->show_size_column = show_size_column;
- if (impl->list_size_column)
- gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
+ gtk_tree_view_column_set_visible (impl->list_size_column, show_size_column);
impl->sort_column = sort_column;
impl->sort_order = sort_order;
GtkTreeIter dummy_iter;
GtkTreeModel *tree_model;
- path = gtk_tree_path_new_from_indices (0, -1);
tree_model = gtk_tree_view_get_model (GTK_TREE_VIEW (impl->browse_files_tree_view));
if (!tree_model)
return;
+ path = gtk_tree_path_new_from_indices (0, -1);
+
/* If the list is empty, do nothing. */
if (gtk_tree_model_get_iter (tree_model, &dummy_iter, path))
gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view), path, NULL, FALSE);
gtk_tree_selection_selected_foreach (selection, center_selected_row_foreach_cb, &closure);
}
-struct ShowAndSelectPathsData
-{
- GtkFileChooserDefault *impl;
- GSList *files;
-};
-
-static void
-show_and_select_files_finished_loading (GtkFolder *folder,
- gpointer user_data)
+static gboolean
+show_and_select_files (GtkFileChooserDefault *impl,
+ GSList *files)
{
- gboolean have_hidden;
- gboolean have_filtered;
- GSList *l;
- struct ShowAndSelectPathsData *data = user_data;
-
- have_hidden = FALSE;
- have_filtered = FALSE;
-
- for (l = data->files; l; l = l->next)
- {
- GFile *file;
- GFileInfo *info;
-
- file = l->data;
-
- info = _gtk_folder_get_info (folder, file);
- if (info)
- {
- if (!have_hidden)
- have_hidden = g_file_info_get_is_hidden (info)
- || g_file_info_get_is_backup (info);
-
- if (!have_filtered)
- have_filtered = (! _gtk_file_info_consider_as_directory (info)) &&
- get_is_file_filtered (data->impl, file, info);
-
- g_object_unref (info);
-
- if (have_hidden && have_filtered)
- break; /* we now have all the information we need */
- }
- }
-
- g_signal_handlers_disconnect_by_func (folder,
- show_and_select_files_finished_loading,
- user_data);
-
- if (have_hidden)
- g_object_set (data->impl, "show-hidden", TRUE, NULL);
+ GtkTreeSelection *selection;
+ GtkFileSystemModel *fsmodel;
+ gboolean can_have_hidden, can_have_filtered, selected_a_file;
+ GSList *walk;
- if (have_filtered)
- set_current_filter (data->impl, NULL);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
+ fsmodel = GTK_FILE_SYSTEM_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (impl->browse_files_tree_view)));
+ can_have_hidden = !impl->show_hidden;
+ can_have_filtered = impl->current_filter != NULL;
+ selected_a_file = FALSE;
- for (l = data->files; l; l = l->next)
+ for (walk = files; walk && (can_have_hidden || can_have_filtered); walk = walk->next)
{
- GFile *file;
- GtkTreePath *path;
+ GFile *file = walk->data;
GtkTreeIter iter;
- file = l->data;
- if (!_gtk_file_system_model_get_iter_for_file (data->impl->browse_files_model,
- &iter,
- file))
- return;
-
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (data->impl->browse_files_model), &iter);
- select_func (data->impl->browse_files_model, path, &iter, data->impl);
- gtk_tree_path_free (path);
- }
-
- browse_files_center_selected_row (data->impl);
-
- g_object_unref (data->impl);
- g_slist_foreach (data->files, (GFunc) g_object_unref, NULL);
- g_slist_free (data->files);
- g_free (data);
-}
-
-static void
-show_and_select_files_get_folder_cb (GCancellable *cancellable,
- GtkFolder *folder,
- const GError *error,
- gpointer user_data)
-{
- gboolean cancelled = g_cancellable_is_cancelled (cancellable);
- struct ShowAndSelectPathsData *data = user_data;
-
- if (data->impl->show_and_select_files_cancellable != cancellable)
- goto out;
-
- data->impl->show_and_select_files_cancellable = NULL;
-
- if (cancelled || error)
- goto out;
-
- g_object_unref (cancellable);
-
- if (_gtk_folder_is_finished_loading (folder))
- show_and_select_files_finished_loading (folder, user_data);
- else
- g_signal_connect (folder, "finished-loading",
- G_CALLBACK (show_and_select_files_finished_loading),
- user_data);
-
- return;
-
-out:
- g_object_unref (data->impl);
- g_slist_foreach (data->files, (GFunc) g_object_unref, NULL);
- g_slist_free (data->files);
- g_free (data);
-
- g_object_unref (cancellable);
-}
+ if (!_gtk_file_system_model_get_iter_for_file (fsmodel, &iter, file))
+ continue;
-static gboolean
-show_and_select_files (GtkFileChooserDefault *impl,
- GFile *parent_file,
- GSList *files,
- GError **error)
-{
- struct ShowAndSelectPathsData *info;
+ if (!_gtk_file_system_model_iter_is_visible (fsmodel, &iter))
+ {
+ GFileInfo *info = _gtk_file_system_model_get_info (fsmodel, &iter);
- profile_start ("start", NULL);
+ if (can_have_hidden &&
+ (g_file_info_get_is_hidden (info) ||
+ g_file_info_get_is_backup (info)))
+ {
+ g_object_set (impl, "show-hidden", TRUE, NULL);
+ can_have_hidden = FALSE;
+ }
- if (!files)
- {
- profile_end ("end", NULL);
- return TRUE;
+ if (can_have_filtered)
+ {
+ set_current_filter (impl, NULL);
+ can_have_filtered = FALSE;
+ }
+ }
+
+ if (_gtk_file_system_model_iter_is_visible (fsmodel, &iter))
+ {
+ gtk_tree_selection_select_iter (selection, &iter);
+ selected_a_file = TRUE;
+ }
}
- info = g_new (struct ShowAndSelectPathsData, 1);
- info->impl = g_object_ref (impl);
- info->files = g_slist_copy (files);
- g_slist_foreach (info->files, (GFunc) g_object_ref, NULL);
-
- if (impl->show_and_select_files_cancellable)
- g_cancellable_cancel (impl->show_and_select_files_cancellable);
+ browse_files_center_selected_row (impl);
- impl->show_and_select_files_cancellable =
- _gtk_file_system_get_folder (impl->file_system, parent_file,
- "standard::is-hidden,standard::is-backup,standard::type,standard::name,standard::content-type",
- show_and_select_files_get_folder_cb, info);
-
- profile_end ("end", NULL);
- return TRUE;
+ return selected_a_file;
}
/* Processes the pending operation when a folder is finished loading */
if (impl->pending_select_files)
{
- /* NULL GError */
- show_and_select_files (impl, impl->current_folder, impl->pending_select_files, NULL);
+ show_and_select_files (impl, impl->pending_select_files);
pending_select_files_free (impl);
browse_files_center_selected_row (impl);
}
* that case, the chooser's selection should be what the caller expects,
* as the user can't see that something else got selected. See bug #165264.
*/
- if (GTK_WIDGET_MAPPED (impl) && impl->action == GTK_FILE_CHOOSER_ACTION_OPEN)
+ if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN &&
+ gtk_widget_get_mapped (GTK_WIDGET (impl)))
browse_files_select_first_row (impl);
}
g_assert (impl->pending_select_files == NULL);
}
+static void
+show_error_on_reading_current_folder (GtkFileChooserDefault *impl, GError *error)
+{
+ GFileInfo *info;
+ char *msg;
+
+ info = g_file_query_info (impl->current_folder,
+ G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME,
+ G_FILE_QUERY_INFO_NONE,
+ NULL,
+ NULL);
+ if (info)
+ {
+ msg = g_strdup_printf (_("Could not read the contents of %s"), g_file_info_get_display_name (info));
+ g_object_unref (info);
+ }
+ else
+ msg = g_strdup (_("Could not read the contents of the folder"));
+
+ error_message (impl, msg, error->message);
+ g_free (msg);
+}
+
/* Callback used when the file system model finishes loading */
static void
browse_files_model_finished_loading_cb (GtkFileSystemModel *model,
{
profile_start ("start", NULL);
+ if (error)
+ show_error_on_reading_current_folder (impl, error);
+
if (impl->load_state == LOAD_PRELOAD)
{
load_remove_timer (impl);
}
static void
-stop_loading_and_clear_list_model (GtkFileChooserDefault *impl)
+stop_loading_and_clear_list_model (GtkFileChooserDefault *impl,
+ gboolean remove_from_treeview)
{
load_remove_timer (impl); /* This changes the state to LOAD_EMPTY */
impl->browse_files_model = NULL;
}
- gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), NULL);
+ if (remove_from_treeview)
+ gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), NULL);
}
static char *
gchar *locale_format = NULL;
gchar buf[256];
char *date_str = NULL;
+#ifdef G_OS_WIN32
+ const char *locale, *dot = NULL;
+ gint64 codepage = -1;
+ char charset[20];
+#endif
time_mtime = secs;
localtime_r ((time_t *) &time_mtime, &tm_mtime);
#else
{
- struct tm *ptm = localtime ((time_t *) &timeval.tv_sec);
+ struct tm *ptm = localtime ((time_t *) &time_mtime);
if (!ptm)
{
return date_str;
}
-#define copy_attribute(to, from, attribute) G_STMT_START { \
- GFileAttributeType type; \
- gpointer value; \
-\
- if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL)) \
- g_file_info_set_attribute (to, attribute, type, value); \
-}G_STMT_END
+static void
+copy_attribute (GFileInfo *to, GFileInfo *from, const char *attribute)
+{
+ GFileAttributeType type;
+ gpointer value;
+
+ if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL))
+ g_file_info_set_attribute (to, attribute, type, value);
+}
static void
file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer data)
G_FILE_ATTRIBUTE_THUMBNAIL_PATH ","
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED ","
G_FILE_ATTRIBUTE_STANDARD_ICON,
- 0,
+ G_FILE_QUERY_INFO_NONE,
G_PRIORITY_DEFAULT,
_gtk_file_system_model_get_cancellable (model),
file_system_model_got_thumbnail,
profile_start ("start", NULL);
- stop_loading_and_clear_list_model (impl);
+ stop_loading_and_clear_list_model (impl, TRUE);
set_busy_cursor (impl, TRUE);
- gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), NULL);
impl->browse_files_model =
_gtk_file_system_model_new_for_directory (impl->current_folder,
- MODEL_ATTRIBUTES,
- file_system_model_set,
- impl,
- MODEL_COL_NUM_COLUMNS,
- G_TYPE_STRING,
- G_TYPE_INT64,
- G_TYPE_LONG,
- G_TYPE_FILE,
- G_TYPE_STRING,
- G_TYPE_BOOLEAN,
- GDK_TYPE_PIXBUF,
- G_TYPE_STRING,
- G_TYPE_STRING,
- PANGO_TYPE_ELLIPSIZE_MODE);
+ MODEL_ATTRIBUTES,
+ file_system_model_set,
+ impl,
+ MODEL_COLUMN_TYPES);
_gtk_file_system_model_set_show_hidden (impl->browse_files_model, impl->show_hidden);
_gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), name);
}
-static void
-select_func (GtkFileSystemModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
-{
- GtkFileChooserDefault *impl = user_data;
- GtkTreeSelection *selection;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (impl->browse_files_tree_view));
-
- gtk_tree_selection_select_iter (selection, iter);
-}
-
static gboolean
gtk_file_chooser_default_select_file (GtkFileChooser *chooser,
GFile *file,
files.data = (gpointer) file;
files.next = NULL;
- result = show_and_select_files (impl, parent_file, &files, error);
+ result = show_and_select_files (impl, &files);
g_object_unref (parent_file);
return result;
}
if (impl->preview_widget_active &&
impl->preview_widget &&
- GTK_WIDGET_VISIBLE (impl->preview_widget))
+ gtk_widget_get_visible (impl->preview_widget))
{
gtk_widget_size_request (impl->preview_box, &req);
*default_width += PREVIEW_HBOX_SPACING + req.width;
}
if (impl->extra_widget &&
- GTK_WIDGET_VISIBLE (impl->extra_widget))
+ gtk_widget_get_visible (impl->extra_widget))
{
gtk_widget_size_request (impl->extra_align, &req);
*default_height += GTK_BOX (chooser_embed)->spacing + req.height;
GtkWidget *button;
button = gtk_button_new_with_mnemonic (mnemonic_label);
- GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+ gtk_widget_set_can_default (button, TRUE);
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON));
gtk_widget_show (button);
impl->search_model = _gtk_file_system_model_new (file_system_model_set,
impl,
- MODEL_COL_NUM_COLUMNS,
- G_TYPE_STRING, /* MODEL_COL_NAME */
- G_TYPE_INT64, /* MODEL_COL_SIZE */
- G_TYPE_LONG, /* MODEL_COL_MTIME */
- G_TYPE_FILE, /* MODEL_COL_FILE */
- G_TYPE_STRING, /* MODEL_COL_NAME_COLLATED */
- G_TYPE_BOOLEAN, /* MODEL_COL_IS_FOLDER */
- GDK_TYPE_PIXBUF, /* MODEL_COL_PIXBUF */
- G_TYPE_STRING, /* MODEL_COL_SIZE_TEXT */
- G_TYPE_STRING, /* MODEL_COL_MTIME_TEXT */
- PANGO_TYPE_ELLIPSIZE_MODE /* MODEL_COL_ELLIPSIZE */
- );
+ MODEL_COLUMN_TYPES);
gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (impl->search_model),
MODEL_COL_NAME,
switch (mode)
{
case OPERATION_MODE_BROWSE:
- stop_loading_and_clear_list_model (impl);
+ stop_loading_and_clear_list_model (impl, TRUE);
break;
case OPERATION_MODE_SEARCH:
impl->recent_model = _gtk_file_system_model_new (file_system_model_set,
impl,
- MODEL_COL_NUM_COLUMNS,
- G_TYPE_STRING, /* MODEL_COL_NAME */
- G_TYPE_INT64, /* MODEL_COL_SIZE */
- G_TYPE_LONG, /* MODEL_COL_MTIME */
- G_TYPE_FILE, /* MODEL_COL_FILE */
- G_TYPE_STRING, /* MODEL_COL_NAME_COLLATED */
- G_TYPE_BOOLEAN, /* MODEL_COL_IS_FOLDER */
- GDK_TYPE_PIXBUF, /* MODEL_COL_PIXBUF */
- G_TYPE_STRING, /* MODEL_COL_SIZE_TEXT */
- G_TYPE_STRING, /* MODEL_COL_MTIME_TEXT */
- PANGO_TYPE_ELLIPSIZE_MODE /* MODEL_COL_ELLIPSIZE */
- );
+ MODEL_COLUMN_TYPES);
_gtk_file_system_model_set_filter (impl->recent_model,
impl->current_filter);
recent_hide_entry (impl);
- /* hide the file size column if it's visible */
- gtk_tree_view_column_set_visible (impl->list_size_column, FALSE);
-
file_list_set_sort_column_ids (impl);
recent_start_loading (impl);
}
always_sensitive = impl->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER &&
impl->action != GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER;
+ /* Keep the following column numbers in sync with create_file_list() */
+
/* name */
column = gtk_tree_view_get_column (GTK_TREE_VIEW (impl->browse_files_tree_view), 0);
list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));