Commit ece324a6 authored by Rebecca Schulman's avatar Rebecca Schulman Committed by Rebecca Schulman
Browse files

Created initial list view for search results, as a subclass (sort of) of

2000-07-19  Rebecca Schulman  <rebecka@eazel.com>
        Created initial list view for search results, as a subclass (sort of)
	of fm-list-view

	* src/file-manager/fm-list-view.h:
	* src/file-manager/fm-list-view.c: (fm_list_view_initialize_class),
	(fm_list_view_initialize), (fm_list_view_list_is_instantiated),
	(fm_list_view_set_instantiated), (fm_list_view_create_list),
	(fm_list_view_setup_list), (add_to_list), (get_list),
	(fm_list_view_set_zoom_level), (fm_list_view_install_row_images),
	(update_icons):
	added new create_list signal to FM_LIST_VIEW, and instantiate the
	actual widget not in fm_list_view_initialize, but later, so that
	the search subclass can create its own separate clist widget

	* src/file-manager/fm-search-list-view.c:
	(fm_search_list_view_initialize_class),
	(fm_search_list_view_initialize), (fm_search_list_view_add_file),
	(add_to_list), (get_list), (fm_search_list_view_create_list),
	(compare_rows), (sort_criterion_from_column),
	(get_attribute_from_column), (fm_search_list_view_destroy):
	* src/file-manager/fm-search-list-view.h:
	adjusted list-view appearance for search results, by adding a directory
	column to show the actual path of files in a search result directory

	* src/nautilus-application.c: (manufactures), (create_object):
	* src/nautilus.oafinfo:
	register the search list view

	* src/file-manager/Makefile.am: added new fm-search-list-view.* files
parent bfd60480
2000-07-19 Rebecca Schulman <rebecka@eazel.com>
Created initial list view for search results, as a subclass (sort of)
of fm-list-view
* src/file-manager/fm-list-view.h:
* src/file-manager/fm-list-view.c: (fm_list_view_initialize_class),
(fm_list_view_initialize), (fm_list_view_list_is_instantiated),
(fm_list_view_set_instantiated), (fm_list_view_create_list),
(fm_list_view_setup_list), (add_to_list), (get_list),
(fm_list_view_set_zoom_level), (fm_list_view_install_row_images),
(update_icons):
added new create_list signal to FM_LIST_VIEW, and instantiate the
actual widget not in fm_list_view_initialize, but later, so that
the search subclass can create its own separate clist widget
* src/file-manager/fm-search-list-view.c:
(fm_search_list_view_initialize_class),
(fm_search_list_view_initialize), (fm_search_list_view_add_file),
(add_to_list), (get_list), (fm_search_list_view_create_list),
(compare_rows), (sort_criterion_from_column),
(get_attribute_from_column), (fm_search_list_view_destroy):
* src/file-manager/fm-search-list-view.h:
adjusted list-view appearance for search results, by adding a directory
column to show the actual path of files in a search result directory
* src/nautilus-application.c: (manufactures), (create_object):
* src/nautilus.oafinfo:
register the search list view
* src/file-manager/Makefile.am: added new fm-search-list-view.* files
2000-07-19 Robey Pointer <robey@eazel.com>
*
......
......@@ -45,14 +45,30 @@
<item value="x-special/directory"/>
<item value="x-special/webdav-directory"/>
</oaf_attribute>
<oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
</oaf_server>
<oaf_server iid="OAFIID:nautilus_file_manager_search_list_view:b186e381-198e-43cf-9c46-60b6bb35db0b" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Nautilus/View:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Nautilus file manager search results list view"/>
<oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a scrollable list for search results"/>
<oaf_attribute name="bonobo:supported_uri_schemes" type="stringv">
<item value="search"/>
<item value="gnome-search"/>
<item value="medusa"/>
</oaf_attribute>
<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
<item value="x-special/virtual-directory"/>
</oaf_attribute>
<oaf_attribute name="nautilus:view_as_name" type="string" value="Search List"/>
</oaf_server>
<oaf_server iid="OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
......
......@@ -45,14 +45,30 @@
<item value="x-special/directory"/>
<item value="x-special/webdav-directory"/>
</oaf_attribute>
<oaf_attribute name="bonobo:additional_uri_schemes" type="stringv">
<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
</oaf_server>
<oaf_server iid="OAFIID:nautilus_file_manager_search_list_view:b186e381-198e-43cf-9c46-60b6bb35db0b" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Nautilus/View:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="Nautilus file manager search results list view"/>
<oaf_attribute name="description" type="string" value="Nautilus file manager component that shows a scrollable list for search results"/>
<oaf_attribute name="bonobo:supported_uri_schemes" type="stringv">
<item value="search"/>
<item value="gnome-search"/>
<item value="medusa"/>
</oaf_attribute>
<oaf_attribute name="nautilus:view_as_name" type="string" value="List"/>
<oaf_attribute name="bonobo:supported_mime_types" type="stringv">
<item value="x-special/virtual-directory"/>
</oaf_attribute>
<oaf_attribute name="nautilus:view_as_name" type="string" value="Search List"/>
</oaf_server>
<oaf_server iid="OAFIID:nautilus_shell:cd5183b2-3913-4b74-9b8e-10528b0de08d" type="factory" location="OAFIID:nautilus_factory:bd1e1862-92d7-4391-963e-37583f0daef3">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/Unknown:1.0"/>
......
......@@ -43,7 +43,9 @@ libnautilus_file_manager_la_SOURCES= \
fm-list-view.c \
fm-list-view.h \
fm-properties-window.c \
fm-properties-window.h
fm-properties-window.h \
fm-search-list-view.c \
fm-search-list-view.h
dfos-corba.h: GNOME_Desktop_FileOperationService.h
......
......@@ -24,6 +24,7 @@
#include <config.h>
#include "fm-list-view.h"
#include "fm-list-view-private.h"
#include <gtk/gtkhbox.h>
#include <gtk/gtkmenu.h>
......@@ -41,10 +42,21 @@
#include <libnautilus-extensions/nautilus-metadata.h>
#include <libnautilus-extensions/nautilus-string.h>
enum {
CREATE_LIST,
GET_ICON_SIZE,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL];
struct FMListViewDetails
{
int sort_column;
gboolean sort_reversed;
gboolean search_directory;
gboolean list_instantiated;
guint zoom_level;
NautilusZoomLevel default_zoom_level;
};
......@@ -107,7 +119,7 @@ static void context_click_selection_callback (GtkCList
FMListView *list_view);
static void context_click_background_callback (GtkCList *clist,
FMListView *list_view);
static void create_list (FMListView *list_view);
static void list_activate_callback (NautilusList *list,
GList *file_list,
gpointer data);
......@@ -129,15 +141,16 @@ static gboolean fm_list_view_can_zoom_in (FMDirectoryVi
static gboolean fm_list_view_can_zoom_out (FMDirectoryView *view);
static GtkWidget * fm_list_view_get_background_widget (FMDirectoryView *view);
static void fm_list_view_clear (FMDirectoryView *view);
static guint fm_list_view_get_icon_size (FMListView *list_view);
static GList * fm_list_view_get_selection (FMDirectoryView *view);
static NautilusZoomLevel fm_list_view_get_zoom_level (FMListView *list_view);
static void fm_list_view_initialize (gpointer object,
gpointer klass);
static void fm_list_view_initialize_class (gpointer klass);
static void fm_list_view_initialize_class (gpointer klass);
static void fm_list_view_destroy (GtkObject *object);
static void fm_list_view_done_adding_files (FMDirectoryView *view);
static void fm_list_view_select_all (FMDirectoryView *view);
static void fm_list_view_set_selection (FMDirectoryView *view, GList *selection);
static void fm_list_view_set_zoom_level (FMListView *list_view,
NautilusZoomLevel new_level,
......@@ -145,13 +158,17 @@ static void fm_list_view_set_zoom_level (FMListView
static void fm_list_view_sort_items (FMListView *list_view,
int column,
gboolean reversed);
static void fm_list_view_update_click_mode (FMListView *icon_view);
const char * get_attribute_from_column (int column);
static void fm_list_view_update_click_mode (FMListView *icon_view);
static void fm_list_view_create_list (FMListView *list_view);
static const char * get_attribute_from_column (int column);
int get_column_from_attribute (const char *value);
int get_sort_column_from_attribute (const char *value);
static NautilusList * get_list (FMListView *list_view);
static void install_row_images (FMListView *list_view,
guint row);
static int sort_criterion_from_column (int column);
static void update_icons (FMListView *list_view);
static void click_policy_changed_callback (gpointer user_data);
......@@ -166,12 +183,13 @@ fm_list_view_initialize_class (gpointer klass)
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
FMDirectoryViewClass *fm_directory_view_class;
FMListViewClass *fm_list_view_klass;
object_class = GTK_OBJECT_CLASS (klass);
fm_directory_view_class = FM_DIRECTORY_VIEW_CLASS (klass);
widget_class = (GtkWidgetClass *) klass;
fm_list_view_klass = FM_LIST_VIEW_CLASS (klass);
fm_directory_view_class->add_file = fm_list_view_add_file;
fm_directory_view_class->begin_adding_files = fm_list_view_begin_adding_files;
fm_directory_view_class->begin_loading = fm_list_view_begin_loading;
......@@ -189,6 +207,17 @@ fm_list_view_initialize_class (gpointer klass)
fm_directory_view_class->set_selection = fm_list_view_set_selection;
object_class->destroy = fm_list_view_destroy;
signals[CREATE_LIST] =
gtk_signal_new ("create_list",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (FMListViewClass, create_list),
gtk_marshal_NONE__BOXED,
GTK_TYPE_NONE, 1, GTK_TYPE_BOXED);
fm_list_view_klass->create_list = fm_list_view_create_list;
}
static void
......@@ -209,8 +238,7 @@ fm_list_view_initialize (gpointer object, gpointer klass)
list_view->details->zoom_level = NAUTILUS_ZOOM_LEVEL_SMALLER;
list_view->details->sort_column = LIST_VIEW_COLUMN_NONE;
list_view->details->default_zoom_level = NAUTILUS_ZOOM_LEVEL_SMALLER;
create_list (list_view);
list_view->details->list_instantiated = FALSE;
/* Register to find out about icon theme changes */
gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (),
......@@ -222,6 +250,7 @@ fm_list_view_initialize (gpointer object, gpointer klass)
nautilus_preferences_add_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
click_policy_changed_callback,
list_view);
}
static void
......@@ -653,8 +682,20 @@ fm_list_get_sort_column_index (GtkWidget *widget, FMListView *list_view)
return FM_LIST_VIEW (list_view)->details->sort_column;
}
gboolean
fm_list_view_list_is_instantiated (FMListView *list_view)
{
return list_view->details->list_instantiated;
}
void
fm_list_view_set_instantiated (FMListView *list_view)
{
list_view->details->list_instantiated = TRUE;
}
static void
create_list (FMListView *list_view)
fm_list_view_create_list (FMListView *list_view)
{
NautilusList *list;
GtkCList *clist;
......@@ -703,7 +744,6 @@ create_list (FMListView *list_view)
int i;
g_return_if_fail (FM_IS_LIST_VIEW (list_view));
list = NAUTILUS_LIST (nautilus_list_new_with_titles (LIST_VIEW_COLUMN_COUNT, titles));
clist = GTK_CLIST (list);
......@@ -736,10 +776,24 @@ create_list (FMListView *list_view)
}
}
gtk_clist_set_auto_sort (clist, TRUE);
gtk_clist_set_compare_func (clist, compare_rows);
gtk_container_add (GTK_CONTAINER (list_view), GTK_WIDGET (list));
fm_list_view_setup_list (list_view);
}
void
fm_list_view_setup_list (FMListView *list_view)
{
NautilusList *list;
g_return_if_fail (FM_IS_LIST_VIEW (list_view));
list = get_list (list_view);
GTK_WIDGET_SET_FLAGS (list, GTK_CAN_FOCUS);
gtk_signal_connect (GTK_OBJECT (list),
......@@ -791,7 +845,6 @@ create_list (FMListView *list_view)
GTK_SIGNAL_FUNC (fm_list_get_sort_column_index),
list_view);
gtk_container_add (GTK_CONTAINER (list_view), GTK_WIDGET (list));
/* Make height tall enough for icons to look good.
* This must be done after the list widget is realized, due to
......@@ -871,7 +924,7 @@ add_to_list (FMListView *list_view, NautilusFile *file)
nautilus_list_mark_cell_as_link (list, new_row, LIST_VIEW_COLUMN_NAME);
gtk_object_set_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY, NULL);
install_row_images (list_view, new_row);
fm_list_view_install_row_images (list_view, new_row);
g_strfreev (text);
......@@ -882,6 +935,10 @@ static NautilusList *
get_list (FMListView *list_view)
{
g_return_val_if_fail (FM_IS_LIST_VIEW (list_view), NULL);
if (fm_list_view_list_is_instantiated (list_view) == FALSE) {
(* FM_LIST_VIEW_CLASS (GTK_OBJECT (list_view)->klass)->create_list) (list_view);
fm_list_view_set_instantiated (list_view);
}
g_return_val_if_fail (NAUTILUS_IS_LIST (GTK_BIN (list_view)->child), NULL);
return NAUTILUS_LIST (GTK_BIN (list_view)->child);
......@@ -1094,7 +1151,7 @@ fm_list_view_done_adding_files (FMDirectoryView *view)
gtk_clist_thaw (GTK_CLIST (get_list (FM_LIST_VIEW (view))));
}
static guint
guint
fm_list_view_get_icon_size (FMListView *list_view)
{
g_return_val_if_fail (FM_IS_LIST_VIEW (list_view), NAUTILUS_ICON_SIZE_STANDARD);
......@@ -1184,7 +1241,7 @@ fm_list_view_set_zoom_level (FMListView *list_view,
fm_list_view_get_icon_size (list_view));
for (row = 0; row < clist->rows; ++row) {
install_row_images (list_view, row);
fm_list_view_install_row_images (list_view, row);
}
gtk_clist_thaw (clist);
......@@ -1279,7 +1336,7 @@ fm_list_view_sort_items (FMListView *list_view,
*
* Return value: The string to be saved in the metadata.
*/
const char *
static const char *
get_attribute_from_column (int column)
{
switch (column) {
......@@ -1385,15 +1442,15 @@ fm_list_view_get_emblem_pixbufs_for_file (FMListView *list_view,
}
/**
* install_row_images:
* fm_list_view_install_row_images:
*
* Put the icon and emblems for a file into the specified row.
* @list_view: FMDirectoryView in which to install icon.
* @row: target row index
*
**/
static void
install_row_images (FMListView *list_view, guint row)
void
fm_list_view_install_row_images (FMListView *list_view, guint row)
{
NautilusList *list;
GtkCList *clist;
......@@ -1452,7 +1509,7 @@ update_icons (FMListView *list_view)
list = get_list (list_view);
for (row = 0; row < GTK_CLIST (list)->rows; ++row) {
install_row_images (list_view, row);
fm_list_view_install_row_images (list_view, row);
}
}
......
......@@ -25,8 +25,10 @@
#ifndef FM_LIST_VIEW_H
#define FM_LIST_VIEW_H
#include <gtk/gtkclist.h>
#include "fm-directory-view.h"
typedef struct FMListView FMListView;
typedef struct FMListViewClass FMListViewClass;
......@@ -45,6 +47,12 @@ struct FMListView {
struct FMListViewClass {
FMDirectoryViewClass parent_class;
/* 'create_list' sets up the columns. Subclasses
can use this to create a list view with different columns
than the standard */
void (* create_list) (FMListView *list_view);
};
/* GtkObject support */
......
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* fm-search-list-view.c - implementation of list view of a virtual directory,
based on FMListView.
Copyright (C) 2000 Eazel, Inc.
The Gnome Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the Gnome Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Authors: Rebecca Schulman <rebecka@eazel.com>
*/
/* Perhaps this would be better off as a set of actual special cases rather than a subclass?
We haven't changed much, and there is a lot of copied code (duplicate functionality)*/
#include <config.h>
#include <glib.h>
#include <gtk/gtkclist.h>
#include <libgnomeui/gnome-pixmap.h>
#include <libgnome/gnome-i18n.h>
#include <libnautilus-extensions/nautilus-gtk-macros.h>
#include <libnautilus-extensions/nautilus-list.h>
#include "fm-list-view.h"
#include "fm-list-view-private.h"
#include "fm-search-list-view.h"
#define PENDING_USER_DATA_KEY "pending user data"
#define SEARCH_LIST_VIEW_COLUMN_NONE -1
#define SEARCH_LIST_VIEW_COLUMN_ICON 0
#define SEARCH_LIST_VIEW_COLUMN_EMBLEMS 1
#define SEARCH_LIST_VIEW_COLUMN_ACTUAL_PATH 2
#define SEARCH_LIST_VIEW_COLUMN_NAME 3
#define SEARCH_LIST_VIEW_COLUMN_SIZE 4
#define SEARCH_LIST_VIEW_COLUMN_MIME_TYPE 5
#define SEARCH_LIST_VIEW_COLUMN_DATE_MODIFIED 6
#define SEARCH_LIST_VIEW_COLUMN_COUNT 7
#define SEARCH_LIST_VIEW_ICON_ATTRIBUTE "icon"
#define SEARCH_LIST_VIEW_EMBLEMS_ATTRIBUTE "emblems"
#define SEARCH_LIST_VIEW_ACTUAL_PATH_ATTRIBUTE "actual_path"
#define SEARCH_LIST_VIEW_NAME_ATTRIBUTE "name"
#define SEARCH_LIST_VIEW_SIZE_ATTRIBUTE "size"
#define SEARCH_LIST_VIEW_MIME_TYPE_ATTRIBUTE "type"
#define SEARCH_LIST_VIEW_DATE_MODIFIED_ATTRIBUTE "date_modified"
#define LIST_VIEW_DEFAULT_SORTING_ATTRIBUTE LIST_VIEW_NAME_ATTRIBUTE
static void fm_search_list_view_create_list (FMListView *list_view);
static void fm_search_list_view_initialize (gpointer object,
gpointer klass);
static void fm_search_list_view_initialize_class (gpointer klass);
static void fm_search_list_view_add_file (FMDirectoryView *list_view,
NautilusFile *file);
static void fm_search_list_view_destroy (GtkObject *object);
static int compare_rows (GtkCList *clist,
gconstpointer ptr1,
gconstpointer ptr2);
static NautilusList * get_list (FMSearchListView *list_view);
static int add_to_list (FMSearchListView *list_view,
NautilusFile *file);
static int sort_criterion_from_column (int column);
const char * get_attribute_from_column (int column);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (FMSearchListView, fm_search_list_view, FM_TYPE_LIST_VIEW);
static void
fm_search_list_view_initialize_class (gpointer klass)
{
GtkObjectClass *object_class;
FMDirectoryViewClass *fm_directory_view_class;
FMListViewClass *fm_list_view_class;
object_class = GTK_OBJECT_CLASS (klass);
fm_directory_view_class = FM_DIRECTORY_VIEW_CLASS (klass);
fm_list_view_class = FM_LIST_VIEW_CLASS (klass);
/* Override list view's add_file method */
fm_directory_view_class->add_file = fm_search_list_view_add_file;
fm_list_view_class->create_list = fm_search_list_view_create_list;
object_class->destroy = fm_search_list_view_destroy;
}
static void
fm_search_list_view_initialize (gpointer object,
gpointer klass)
{
}
static void
fm_search_list_view_add_file (FMDirectoryView *view, NautilusFile *file)
{
g_return_if_fail (FM_IS_SEARCH_LIST_VIEW (view));
/* We are allowed to get the same icon twice, so don't re-add it. */
if (gtk_clist_find_row_from_data (GTK_CLIST (get_list (FM_SEARCH_LIST_VIEW (view))), file) < 0) {
add_to_list (FM_SEARCH_LIST_VIEW (view), file);
}
}
static int
add_to_list (FMSearchListView *list_view, NautilusFile *file)
{
NautilusList *list;
GtkCList *clist;
char **text;
int new_row;
int column;
g_return_val_if_fail (FM_IS_DIRECTORY_VIEW (list_view), -1);
g_return_val_if_fail (NAUTILUS_IS_FILE (file), -1);
nautilus_file_ref (file);
/* One extra slot so it's NULL-terminated */
text = g_new0 (char *, SEARCH_LIST_VIEW_COLUMN_COUNT+1);
for (column = 0; column < SEARCH_LIST_VIEW_COLUMN_COUNT; ++column) {
/* No text in icon column */
if (column != SEARCH_LIST_VIEW_COLUMN_ICON) {
text[column] =
nautilus_file_get_string_attribute_with_default
(file, get_attribute_from_column (column));
}
}
list = get_list (list_view);
clist = GTK_CLIST (list);
/* Temporarily set user data value as hack for the problem
* that compare_rows is called before the row data can be set.
*/
gtk_object_set_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY, file);
/* Note that since list is auto-sorted new_row isn't necessarily last row. */
new_row = gtk_clist_append (clist, text);
gtk_clist_set_row_data (clist, new_row, file);
nautilus_list_mark_cell_as_link (list, new_row, SEARCH_LIST_VIEW_COLUMN_NAME);
gtk_object_set_data (GTK_OBJECT (clist), PENDING_USER_DATA_KEY, NULL);
fm_list_view_install_row_images (FM_LIST_VIEW (list_view), new_row);
g_strfreev (text);
return new_row;
}
static NautilusList *
get_list (FMSearchListView *list_view)
{
g_return_val_if_fail (FM_IS_SEARCH_LIST_VIEW (list_view), NULL);
if (fm_list_view_list_is_instantiated (FM_LIST_VIEW (list_view)) == FALSE) {
fm_search_list_view_create_list (FM_LIST_VIEW (list_view));
}
g_return_val_if_fail (NAUTILUS_IS_LIST (GTK_BIN (list_view)->child), NULL);
return NAUTILUS_LIST (GTK_BIN (list_view)->child);
}
static void
fm_search_list_view_create_list (FMListView *search_list_view)
{
NautilusList *list;
GtkCList *clist;
/* FIXME bugzilla.eazel.com 666:
* title setup should allow for columns not being resizable at all,
* justification, editable or not, type/format,
* not being usable as a sort order criteria, etc.
* for now just set up name, min, max and current width
*/
const char * const titles[] = {
NULL, /* Icon */
NULL, /* Emblems */
_("Directory"),
_("Name"),
_("Size"),
_("Type"),
_("Date Modified"),
};
guint widths[] = {
fm_list_view_get_icon_size (FM_LIST_VIEW (search_list_view)), /* Icon */
40, /* Emblems */
200, /* Directory Name */
130, /* File Name */
55, /* Size */
95, /* Type */
100, /* Modified */
};
guint min_widths[] = {
fm_list_view_get_icon_size (FM_LIST_VIEW (search_list_view)), /* Icon */
20, /* Emblems */
30, /* Directory Name */
30, /* File Name */
20, /* Size */
20, /* Type */
30, /* Modified */