Commit 4078ef56 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Emmanuele Bassi

GtkFileChooser search fixes and recent files support. (#435342)

2007-05-11  Emmanuele Bassi  <ebassi@gnome.org>

	GtkFileChooser search fixes and recent files support.  (#435342)

	* gtk/gtkfilechooserprivate.h:
	* gtk/gtkfilechooserdefault.c: Add support for showing the
	recently used files list as a special shortcut item.

svn path=/trunk/; revision=17824
parent b5d60d48
2007-05-11 Emmanuele Bassi <ebassi@gnome.org>
GtkFileChooser search fixes and recent files support. (#435342)
* gtk/gtkfilechooserprivate.h:
* gtk/gtkfilechooserdefault.c: Add support for showing the
recently used files list as a special shortcut item.
2007-05-11 Emmanuele Bassi <ebassi@gnome.org>
GtkFileChooser search fixes and recent files support. (#435342)
......
......@@ -56,6 +56,8 @@
#include "gtkpathbar.h"
#include "gtkprivate.h"
#include "gtkradiobutton.h"
#include "gtkrecentfilter.h"
#include "gtkrecentmanager.h"
#include "gtkscrolledwindow.h"
#include "gtkseparatormenuitem.h"
#include "gtksizegroup.h"
......@@ -165,6 +167,7 @@ enum {
LOCATION_TOGGLE_POPUP,
SHOW_HIDDEN,
SEARCH_SHORTCUT,
RECENT_SHORTCUT,
LAST_SIGNAL
};
......@@ -187,7 +190,8 @@ typedef enum {
SHORTCUT_TYPE_PATH,
SHORTCUT_TYPE_VOLUME,
SHORTCUT_TYPE_SEPARATOR,
SHORTCUT_TYPE_SEARCH
SHORTCUT_TYPE_SEARCH,
SHORTCUT_TYPE_RECENT
} ShortcutType;
/* Column numbers for the file list */
......@@ -213,6 +217,15 @@ enum {
SEARCH_MODEL_COL_NUM_COLUMNS
};
enum {
RECENT_MODEL_COL_PATH,
RECENT_MODEL_COL_DISPLAY_NAME,
RECENT_MODEL_COL_INFO,
RECENT_MODEL_COL_IS_FOLDER,
RECENT_MODEL_COL_HANDLE,
RECENT_MODEL_COL_NUM_COLUMNS
};
/* Identifiers for target types */
enum {
GTK_TREE_MODEL_ROW,
......@@ -261,6 +274,8 @@ search_is_possible (GtkFileChooserDefault *impl)
typedef enum {
SHORTCUTS_SEARCH,
SHORTCUTS_SEARCH_SEPARATOR,
SHORTCUTS_RECENT,
SHORTCUTS_RECENT_SEPARATOR,
SHORTCUTS_HOME,
SHORTCUTS_DESKTOP,
SHORTCUTS_VOLUMES,
......@@ -359,6 +374,7 @@ static void quick_bookmark_handler (GtkFileChooserDefault *impl,
gint bookmark_index);
static void show_hidden_handler (GtkFileChooserDefault *impl);
static void search_shortcut_handler (GtkFileChooserDefault *impl);
static void recent_shortcut_handler (GtkFileChooserDefault *impl);
static void update_appearance (GtkFileChooserDefault *impl);
static void set_current_filter (GtkFileChooserDefault *impl,
......@@ -466,6 +482,14 @@ static GSList *search_get_selected_paths (GtkFileChooserDefault *impl);
static void search_entry_activate_cb (GtkEntry *entry,
gpointer data);
static void recent_manager_update (GtkFileChooserDefault *impl);
static void recent_stop_loading (GtkFileChooserDefault *impl);
static void recent_clear_model (GtkFileChooserDefault *impl,
gboolean remove_from_treeview);
static gboolean recent_should_respond (GtkFileChooserDefault *impl);
static void recent_switch_to_browse_mode (GtkFileChooserDefault *impl);
static GSList * recent_get_selected_paths (GtkFileChooserDefault *impl);
/* Drag and drop interface declarations */
......@@ -607,6 +631,14 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[RECENT_SHORTCUT] =
_gtk_binding_signal_new ("recent-shortcut",
G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
G_CALLBACK (recent_shortcut_handler),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
binding_set = gtk_binding_set_by_class (class);
......@@ -677,6 +709,10 @@ _gtk_file_chooser_default_class_init (GtkFileChooserDefaultClass *class)
GDK_s, GDK_MOD1_MASK,
"search-shortcut",
0);
gtk_binding_entry_add_signal (binding_set,
GDK_r, GDK_MOD1_MASK,
"recent-shortcut",
0);
for (i = 0; i < 10; i++)
gtk_binding_entry_add_signal (binding_set,
......@@ -909,7 +945,8 @@ gtk_file_chooser_default_finalize (GObject *object)
if (impl->sort_model)
g_object_unref (impl->sort_model);
search_clear_model (impl, TRUE);
search_clear_model (impl, FALSE);
recent_clear_model (impl, FALSE);
g_free (impl->preview_display_name);
......@@ -1170,6 +1207,12 @@ render_search_icon (GtkFileChooserDefault *impl)
return gtk_widget_render_icon (GTK_WIDGET (impl), GTK_STOCK_FIND, GTK_ICON_SIZE_MENU, NULL);
}
static GdkPixbuf *
render_recent_icon (GtkFileChooserDefault *impl)
{
return gtk_widget_render_icon (GTK_WIDGET (impl), GTK_STOCK_FILE, GTK_ICON_SIZE_MENU, NULL);
}
/* Re-reads all the icons for the shortcuts, used when the theme changes */
struct ReloadIconsData
......@@ -1317,6 +1360,10 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
{
pixbuf = render_search_icon (impl);
}
else if (shortcut_type == SHORTCUT_TYPE_RECENT)
{
pixbuf = render_recent_icon (impl);
}
}
}
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter));
......@@ -1775,6 +1822,30 @@ shortcuts_append_search (GtkFileChooserDefault *impl)
impl->has_search = TRUE;
}
static void
shortcuts_append_recent (GtkFileChooserDefault *impl)
{
GdkPixbuf *pixbuf;
GtkTreeIter iter;
pixbuf = render_recent_icon (impl);
gtk_list_store_append (impl->shortcuts_model, &iter);
gtk_list_store_set (impl->shortcuts_model, &iter,
SHORTCUTS_COL_PIXBUF, pixbuf,
SHORTCUTS_COL_PIXBUF_VISIBLE, TRUE,
SHORTCUTS_COL_NAME, _("Recently Used"),
SHORTCUTS_COL_DATA, NULL,
SHORTCUTS_COL_TYPE, SHORTCUT_TYPE_RECENT,
SHORTCUTS_COL_REMOVABLE, FALSE,
-1);
if (pixbuf)
g_object_unref (pixbuf);
impl->has_recent = TRUE;
}
/* Appends an item for the user's home directory to the shortcuts model */
static void
shortcuts_append_home (GtkFileChooserDefault *impl)
......@@ -1898,6 +1969,16 @@ shortcuts_get_index (GtkFileChooserDefault *impl,
n += impl->has_search ? 1 : 0;
if (where == SHORTCUTS_RECENT)
goto out;
n += impl->has_recent ? 1 : 0;
if (where == SHORTCUTS_RECENT_SEPARATOR)
goto out;
n += impl->has_recent ? 1 : 0;
if (where == SHORTCUTS_HOME)
goto out;
......@@ -2020,6 +2101,7 @@ shortcuts_insert_separator (GtkFileChooserDefault *impl,
GtkTreeIter iter;
g_assert (where == SHORTCUTS_SEARCH_SEPARATOR ||
where == SHORTCUTS_RECENT_SEPARATOR ||
where == SHORTCUTS_BOOKMARKS_SEPARATOR ||
where == SHORTCUTS_CURRENT_FOLDER_SEPARATOR);
......@@ -2236,6 +2318,12 @@ shortcuts_model_create (GtkFileChooserDefault *impl)
shortcuts_insert_separator (impl, SHORTCUTS_SEARCH_SEPARATOR);
}
if (impl->recent_manager)
{
shortcuts_append_recent (impl);
shortcuts_insert_separator (impl, SHORTCUTS_RECENT_SEPARATOR);
}
if (impl->file_system)
{
shortcuts_append_home (impl);
......@@ -2782,7 +2870,11 @@ bookmarks_check_add_sensitivity (GtkFileChooserDefault *impl)
gboolean active;
gchar *tip;
if (impl->operation_mode == OPERATION_MODE_SEARCH)
/* FIXME - Find a way to enable bookmarking items returned by
* a search query or inside the recently used files list
*/
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT)
{
gtk_widget_set_sensitive (impl->browse_shortcuts_add_button, FALSE);
......@@ -4112,7 +4204,7 @@ file_list_update_popup_menu (GtkFileChooserDefault *impl)
{
file_list_build_popup_menu (impl);
/* FMQ: handle OPERATION_MODE_SEARCH */
/* FIXME - handle OPERATION_MODE_SEARCH and OPERATION_MODE_RECENT */
/* The sensitivity of the Add to Bookmarks item is set in
* bookmarks_check_add_sensitivity()
......@@ -4231,6 +4323,10 @@ file_list_set_sort_column_ids (GtkFileChooserDefault *impl)
name_id = SEARCH_MODEL_COL_PATH;
mtime_id = SEARCH_MODEL_COL_STAT;
break;
case OPERATION_MODE_RECENT:
name_id = RECENT_MODEL_COL_PATH;
mtime_id = RECENT_MODEL_COL_INFO;
break;
}
gtk_tree_view_column_set_sort_column_id (impl->list_name_column, name_id);
......@@ -4512,6 +4608,19 @@ shortcuts_combo_filter_func (GtkTreeModel *model,
}
}
if (impl->has_recent)
{
idx = shortcuts_get_index (impl, SHORTCUTS_RECENT);
if (idx == indices[0])
retval = FALSE;
else
{
idx = shortcuts_get_index (impl, SHORTCUTS_RECENT_SEPARATOR);
if (idx == indices[0])
retval = FALSE;
}
}
gtk_tree_path_free (tree_path);
return retval;
......@@ -4727,6 +4836,14 @@ location_entry_set_initial_text (GtkFileChooserDefault *impl)
static void
location_switch_to_filename_entry (GtkFileChooserDefault *impl)
{
/* when in search or recent files mode, we are not showing the
* location_entry_box container, so there's no point in switching
* to it.
*/
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT)
return;
if (impl->location_entry)
gtk_widget_destroy (impl->location_entry);
......@@ -4959,8 +5076,10 @@ gtk_file_chooser_default_constructor (GType type,
gtk_widget_push_composite_child ();
/* Shortcuts model */
/* Recent files manager */
recent_manager_update (impl);
/* Shortcuts model */
shortcuts_model_create (impl);
/* The browse widgets */
......@@ -5486,6 +5605,7 @@ gtk_file_chooser_default_dispose (GObject *object)
}
search_stop_searching (impl, TRUE);
recent_stop_loading (impl);
remove_settings_signal (impl, gtk_widget_get_screen (GTK_WIDGET (impl)));
......@@ -5618,6 +5738,24 @@ check_icon_theme (GtkFileChooserDefault *impl)
profile_end ("end", NULL);
}
static void
recent_manager_update (GtkFileChooserDefault *impl)
{
GtkRecentManager *manager;
profile_start ("start", NULL);
if (gtk_widget_has_screen (GTK_WIDGET (impl)))
manager = gtk_recent_manager_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)));
else
manager = gtk_recent_manager_get_default ();
if (impl->recent_manager != manager)
impl->recent_manager = manager;
profile_end ("end", NULL);
}
static void
gtk_file_chooser_default_style_set (GtkWidget *widget,
GtkStyle *previous_style)
......@@ -5658,6 +5796,7 @@ gtk_file_chooser_default_screen_changed (GtkWidget *widget,
remove_settings_signal (impl, previous_screen);
check_icon_theme (impl);
recent_manager_update (impl);
g_signal_emit_by_name (widget, "default-size-changed");
......@@ -6415,7 +6554,9 @@ update_chooser_entry (GtkFileChooserDefault *impl)
struct update_chooser_entry_selected_foreach_closure closure;
const char *file_part;
if (impl->operation_mode == OPERATION_MODE_SEARCH || !impl->location_entry)
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT ||
!impl->location_entry)
return;
if (!(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
......@@ -6472,13 +6613,20 @@ update_chooser_entry (GtkFileChooserDefault *impl)
impl->browse_files_last_selected_name);
}
else
else if (impl->operation_mode == OPERATION_MODE_SEARCH)
{
gtk_tree_model_get (GTK_TREE_MODEL (impl->search_model),
&closure.first_selected_iter,
SEARCH_MODEL_COL_DISPLAY_NAME, &file_part,
-1);
}
else if (impl->operation_mode == OPERATION_MODE_RECENT)
{
gtk_tree_model_get (GTK_TREE_MODEL (impl->recent_model),
&closure.first_selected_iter,
RECENT_MODEL_COL_DISPLAY_NAME, &file_part,
-1);
}
}
else
{
......@@ -6692,7 +6840,17 @@ gtk_file_chooser_default_update_current_folder (GtkFileChooser *chooser,
profile_start ("start", (char *) path);
switch (impl->operation_mode)
{
case OPERATION_MODE_SEARCH:
search_switch_to_browse_mode (impl);
break;
case OPERATION_MODE_RECENT:
recent_switch_to_browse_mode (impl);
break;
case OPERATION_MODE_BROWSE:
break;
}
g_assert (path != NULL);
......@@ -6736,7 +6894,8 @@ gtk_file_chooser_default_get_current_folder (GtkFileChooser *chooser)
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
if (impl->operation_mode == OPERATION_MODE_SEARCH)
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT)
return NULL;
if (impl->reload_state == RELOAD_EMPTY)
......@@ -6801,8 +6960,12 @@ gtk_file_chooser_default_select_path (GtkFileChooser *chooser,
if (!parent_path)
return _gtk_file_chooser_set_current_folder_path (chooser, path, error);
if (impl->operation_mode == OPERATION_MODE_SEARCH || impl->load_state == LOAD_EMPTY)
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT ||
impl->load_state == LOAD_EMPTY)
{
same_path = FALSE;
}
else
{
g_assert (impl->current_folder != NULL);
......@@ -6898,7 +7061,8 @@ gtk_file_chooser_default_select_all (GtkFileChooser *chooser)
{
GtkFileChooserDefault *impl = GTK_FILE_CHOOSER_DEFAULT (chooser);
if (impl->operation_mode == OPERATION_MODE_SEARCH)
if (impl->operation_mode == OPERATION_MODE_SEARCH ||
impl->operation_mode == OPERATION_MODE_RECENT)
{
GtkTreeSelection *selection;
......@@ -7051,6 +7215,9 @@ gtk_file_chooser_default_get_paths (GtkFileChooser *chooser)
if (impl->operation_mode == OPERATION_MODE_SEARCH)
return search_get_selected_paths (impl);
if (impl->operation_mode == OPERATION_MODE_RECENT)
return recent_get_selected_paths (impl);
info.impl = impl;
info.result = NULL;
info.path_from_entry = NULL;
......@@ -7117,8 +7284,8 @@ gtk_file_chooser_default_get_paths (GtkFileChooser *chooser)
else
{
/* The focus is on a dialog's action area button or something else */
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
goto file_entry;
else
goto file_list;
......@@ -8088,6 +8255,9 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
if (impl->operation_mode == OPERATION_MODE_SEARCH)
return search_should_respond (impl);
if (impl->operation_mode == OPERATION_MODE_RECENT)
return recent_should_respond (impl);
selection_check (impl, &num_selected, &all_files, &all_folders);
if (num_selected > 2)
......@@ -8161,14 +8331,14 @@ gtk_file_chooser_default_should_respond (GtkFileChooserEmbed *chooser_embed)
error = NULL;
if (is_folder)
{
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
{
change_folder_and_display_error (impl, path, TRUE);
retval = FALSE;
}
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER
|| GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
{
/* The folder already exists, so we do not need to create it.
* Just respond to terminate the dialog.
......@@ -8270,16 +8440,16 @@ gtk_file_chooser_default_initial_focus (GtkFileChooserEmbed *chooser_embed)
impl = GTK_FILE_CHOOSER_DEFAULT (chooser_embed);
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN
|| impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
if (impl->location_mode == LOCATION_MODE_PATH_BAR)
widget = impl->browse_files_tree_view;
else
widget = impl->location_entry;
}
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
|| impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
else if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE ||
impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER)
widget = impl->location_entry;
else
{
......@@ -8602,8 +8772,7 @@ search_stop_searching (GtkFileChooserDefault *impl,
static void
search_switch_to_browse_mode (GtkFileChooserDefault *impl)
{
if (impl->operation_mode == OPERATION_MODE_BROWSE)
return;
g_assert (impl->operation_mode != OPERATION_MODE_BROWSE);
search_stop_searching (impl, FALSE);
search_clear_model (impl, TRUE);
......@@ -8856,23 +9025,486 @@ search_setup_widgets (GtkFileChooserDefault *impl)
static void
search_activate (GtkFileChooserDefault *impl)
{
OperationMode previous_mode;
if (impl->operation_mode == OPERATION_MODE_SEARCH)
{
gtk_widget_grab_focus (impl->search_entry);
return;
}
previous_mode = impl->operation_mode;
impl->operation_mode = OPERATION_MODE_SEARCH;
switch (previous_mode)
{
case OPERATION_MODE_RECENT:
recent_stop_loading (impl);
recent_clear_model (impl, TRUE);
break;
case OPERATION_MODE_BROWSE:
stop_loading_and_clear_list_model (impl);
break;
case OPERATION_MODE_SEARCH:
g_assert_not_reached ();
break;
}
g_assert (impl->search_hbox == NULL);
g_assert (impl->search_entry == NULL);
g_assert (impl->search_model == NULL);
stop_loading_and_clear_list_model (impl);
search_setup_widgets (impl);
file_list_set_sort_column_ids (impl);
}
/*
* Recent files support
*/
/* Frees the data in the recent_model */
static void
recent_clear_model (GtkFileChooserDefault *impl,
gboolean remove_from_treeview)
{
GtkTreeModel *model;
GtkTreeIter iter;
if (!impl->recent_model)
return;
model = GTK_TREE_MODEL (impl->recent_model);
if (gtk_tree_model_get_iter_first (model, &iter))
{
do
{
GtkFilePath *file_path;
GtkFileSystemHandle *handle;
GtkRecentInfo *recent_info;
gchar *display_name;
gtk_tree_model_get (model, &iter,
RECENT_MODEL_COL_DISPLAY_NAME, &display_name,
RECENT_MODEL_COL_PATH, &file_path,
RECENT_MODEL_COL_HANDLE, &handle,
RECENT_MODEL_COL_INFO, &recent_info,
-1);
if (handle)
gtk_file_system_cancel_operation (handle);
gtk_file_path_free (file_path);
gtk_recent_info_unref (recent_info);
g_free (display_name);
}
while (gtk_tree_model_iter_next (model, &iter));
}
g_object_unref (impl->recent_model);
impl->recent_model = NULL;
if (remove_from_treeview)
gtk_tree_view_set_model (GTK_TREE_VIEW (impl->browse_files_tree_view), NULL);
}
/* Stops any ongoing loading of the recent files list; does
* not touch the recent_model
*/
static void
recent_stop_loading (GtkFileChooserDefault *impl)
{
if (impl->load_recent_id)
{
g_source_remove (impl->load_recent_id);
impl->load_recent_id = 0;
}
}
/* Stops any pending load, clears the file list, and switches
* back to OPERATION_MODE_BROWSE
*/
static void
recent_switch_to_browse_mode (GtkFileChooserDefault *impl)
{
g_assert (impl->operation_mode != OPERATION_MODE_BROWSE);
recent_stop_loading (impl);
recent_clear_model (impl, TRUE);
gtk_widget_show (impl->browse_path_bar);
gtk_widget_show (impl->browse_new_folder_button);
if (impl->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
impl->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
{
gtk_widget_show (impl->location_button);
if (impl->location_mode == LOCATION_MODE_FILENAME_ENTRY)
gtk_widget_show (impl->location_entry_box);
}
impl->operation_mode = OPERATION_MODE_BROWSE;
file_list_set_sort_column_ids (impl);
}
/* Sort callback from the modification time column */
static gint
recent_column_mtime_sort_func (GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b,
gpointer user_data)
{
GtkRecentInfo *info_a, *info_b;
gtk_tree_model_get (model, a, RECENT_MODEL_COL_INFO, &info_a, -1);
gtk_tree_model_get (model, b, RECENT_MODEL_COL_INFO, &info_b, -1);
if (gtk_recent_info_get_modified (info_a) < gtk_recent_info_get_modified (info_b))
return -1;
else if (gtk_recent_info_get_modified (info_a) > gtk_recent_info_get_modified (info_b))
return 1;
else
return 0;
}
static void
recent_setup_model (GtkFileChooserDefault *impl)
{
g_assert (impl->recent_model == NULL);
/* We store these columns in the search model:
*
* RECENT_MODEL_COL_PATH - a pointer to GtkFilePath for the hit's URI,
* stored as a pointer and not as a GTK_TYPE_FILE_PATH;
* RECENT_MODEL_COL_DISPLAY_NAME - a string with the display name,
* stored as a pointer and not as a G_TYPE_STRING;
* RECENT_MODEL_COL_INFO - GtkRecentInfo, stored as a pointer and not
* as a GTK_TYPE_RECENT_INFO;
* RECENT_MODEL_COL_IS_FOLDER - boolean flag;
* RECENT_MODEL_COL_HANDLE - GtkFileSystemHandle, stored as a pointer
* and not as a GTK_TYPE_FILE_SYSTEM_HANDLE;
*
* Keep this in sync with the enumeration defined near the beginning of
* this file.
*/
impl->recent_model = gtk_list_store_new (RECENT_MODEL_COL_NUM_COLUMNS,
G_TYPE_POINTER,
G_TYPE_POINTER,