Re: [Fwd: [PATCH] Zooming for the list view and other small cleanups]
- From: David Emory Watson <dwatson cs ucr edu>
- To: Alex Larsson <alexl redhat com>
- Cc: nautilus-list gnome org
- Subject: Re: [Fwd: [PATCH] Zooming for the list view and other small cleanups]
- Date: 01 May 2002 18:17:29 -0400
There's actually one small bug left in here, but I don't think Linus
knows about it, so...
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5256
diff -p -u -r1.5256 ChangeLog
--- ChangeLog 29 Apr 2002 01:50:25 -0000 1.5256
+++ ChangeLog 1 May 2002 22:12:11 -0000
@@ -1,3 +1,33 @@
+2002-05-01 David Emory Watson <dwatson cs ucr edu>
+
+ Implement zooming for the list view and other small cleanups.
+
+ * src/file-manager/fm-list-view.c:
+ (create_and_set_up_tree_view): Keep track of cell renderers and don't
+ make the file name column resizable since it interferes with zooming.
+ (fm_list_view_begin_loading): Set initial zoom level.
+ (set_zoom_level_from_metadata_and_preferences),
+ (fm_list_view_set_zoom_level),
+ (fm_list_view_bump_zoom_level),
+ (fm_list_view_zoom_to_level),
+ (fm_list_view_restore_default_zoom_level),
+ (fm_list_view_can_zoom_in),
+ (fm_list_view_can_zoom_out),
+ (default_zoom_level_changed): Impl.
+ (fm_list_view_class_init): Hook up zoom auto value.
+ (fm_list_view_instance_init): Use while_alive to monitor changes to
+ default_zoom_level and click_policy.
+ (fm_list_view_finalize): Update click_policy callback.
+
+ Added a column for each pixbuf size to the model.
+
+ * src/file-manager/fm-list-model.c,
+ src/file-manager/fm-list-model.h:
+ (fm_list_model_get_column_type): Update.
+ (fm_list_model_get_column_id_from_zoom_level),
+ (fm_list_model_get_zoom_level_from_column_id): Impl.
+ (fm_list_model_get_value): Update.
+
=== nautilus 1.1.14 ===
2002-04-28 Alexander Larsson <alla lysator liu se>
Index: src/file-manager/fm-list-model.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-model.c,v
retrieving revision 1.13
diff -p -u -r1.13 fm-list-model.c
--- src/file-manager/fm-list-model.c 24 Apr 2002 14:40:56 -0000 1.13
+++ src/file-manager/fm-list-model.c 1 May 2002 22:12:19 -0000
@@ -94,7 +94,13 @@ fm_list_model_get_column_type (GtkTreeMo
case FM_LIST_MODEL_TYPE_COLUMN:
case FM_LIST_MODEL_DATE_MODIFIED_COLUMN:
return G_TYPE_STRING;
- case FM_LIST_MODEL_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALLEST_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALLER_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALL_ICON_COLUMN:
+ case FM_LIST_MODEL_STANDARD_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGE_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGER_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGEST_ICON_COLUMN:
return GDK_TYPE_PIXBUF;
case FM_LIST_MODEL_FILE_NAME_IS_EDITABLE_COLUMN:
return G_TYPE_BOOLEAN;
@@ -158,7 +164,6 @@ fm_list_model_get_path (GtkTreeModel *tr
return path;
}
-
static void
fm_list_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, int column, GValue *value)
{
@@ -166,7 +171,9 @@ fm_list_model_get_value (GtkTreeModel *t
NautilusFile *file;
char *str;
GdkPixbuf *icon;
-
+ int icon_size;
+ NautilusZoomLevel zoom_level;
+
model = (FMListModel *)tree_model;
g_return_if_fail (model->details->stamp == iter->stamp);
@@ -185,10 +192,18 @@ fm_list_model_get_value (GtkTreeModel *t
str = nautilus_file_get_string_attribute_with_default (file, "name");
g_value_set_string_take_ownership (value, str);
break;
- case FM_LIST_MODEL_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALLEST_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALLER_ICON_COLUMN:
+ case FM_LIST_MODEL_SMALL_ICON_COLUMN:
+ case FM_LIST_MODEL_STANDARD_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGE_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGER_ICON_COLUMN:
+ case FM_LIST_MODEL_LARGEST_ICON_COLUMN:
g_value_init (value, GDK_TYPE_PIXBUF);
- icon = nautilus_icon_factory_get_pixbuf_for_file (file, NULL, NAUTILUS_ICON_SIZE_SMALLER);
+ zoom_level = fm_list_model_get_zoom_level_from_column_id (column);
+ icon_size = nautilus_get_icon_size_for_zoom_level (zoom_level);
+ icon = nautilus_icon_factory_get_pixbuf_for_file (file, NULL, icon_size);
g_value_set_object (value, icon);
g_object_unref (icon);
break;
@@ -751,6 +766,52 @@ fm_list_model_get_sort_column_id_from_so
}
g_return_val_if_reached (-1);
+}
+
+NautilusZoomLevel
+fm_list_model_get_zoom_level_from_column_id (int column)
+{
+ switch (column) {
+ case FM_LIST_MODEL_SMALLEST_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_SMALLEST;
+ case FM_LIST_MODEL_SMALLER_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_SMALLER;
+ case FM_LIST_MODEL_SMALL_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_SMALL;
+ case FM_LIST_MODEL_STANDARD_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_STANDARD;
+ case FM_LIST_MODEL_LARGE_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_LARGE;
+ case FM_LIST_MODEL_LARGER_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_LARGER;
+ case FM_LIST_MODEL_LARGEST_ICON_COLUMN:
+ return NAUTILUS_ZOOM_LEVEL_LARGEST;
+ }
+
+ g_return_val_if_reached (NAUTILUS_ZOOM_LEVEL_STANDARD);
+}
+
+int
+fm_list_model_get_column_id_from_zoom_level (NautilusZoomLevel zoom_level)
+{
+ switch (zoom_level) {
+ case NAUTILUS_ZOOM_LEVEL_SMALLEST:
+ return FM_LIST_MODEL_SMALLEST_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_SMALLER:
+ return FM_LIST_MODEL_SMALLER_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_SMALL:
+ return FM_LIST_MODEL_SMALL_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_STANDARD:
+ return FM_LIST_MODEL_STANDARD_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_LARGE:
+ return FM_LIST_MODEL_LARGE_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_LARGER:
+ return FM_LIST_MODEL_LARGER_ICON_COLUMN;
+ case NAUTILUS_ZOOM_LEVEL_LARGEST:
+ return FM_LIST_MODEL_LARGEST_ICON_COLUMN;
+ }
+
+ g_return_val_if_reached (FM_LIST_MODEL_STANDARD_ICON_COLUMN);
}
static void
Index: src/file-manager/fm-list-model.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-model.h,v
retrieving revision 1.4
diff -p -u -r1.4 fm-list-model.h
--- src/file-manager/fm-list-model.h 24 Apr 2002 00:16:50 -0000 1.4
+++ src/file-manager/fm-list-model.h 1 May 2002 22:12:19 -0000
@@ -24,6 +24,7 @@
#include <gtk/gtktreemodel.h>
#include <libnautilus-private/nautilus-file.h>
+#include <libnautilus-private/nautilus-icon-factory.h>
#ifndef FM_LIST_MODEL_H
#define FM_LIST_MODEL_H
@@ -36,7 +37,13 @@
enum {
FM_LIST_MODEL_FILE_COLUMN,
- FM_LIST_MODEL_ICON_COLUMN,
+ FM_LIST_MODEL_SMALLEST_ICON_COLUMN,
+ FM_LIST_MODEL_SMALLER_ICON_COLUMN,
+ FM_LIST_MODEL_SMALL_ICON_COLUMN,
+ FM_LIST_MODEL_STANDARD_ICON_COLUMN,
+ FM_LIST_MODEL_LARGE_ICON_COLUMN,
+ FM_LIST_MODEL_LARGER_ICON_COLUMN,
+ FM_LIST_MODEL_LARGEST_ICON_COLUMN,
FM_LIST_MODEL_NAME_COLUMN,
FM_LIST_MODEL_SIZE_COLUMN,
FM_LIST_MODEL_TYPE_COLUMN,
@@ -73,5 +80,8 @@ void fm_list_model_set_should_sort_d
int fm_list_model_get_sort_column_id_from_attribute (const char *attribute);
int fm_list_model_get_sort_column_id_from_sort_type (NautilusFileSortType sort_type);
char *fm_list_model_get_attribute_from_sort_column_id (int sort_column_id);
+
+NautilusZoomLevel fm_list_model_get_zoom_level_from_column_id (int column);
+int fm_list_model_get_column_id_from_zoom_level (NautilusZoomLevel zoom_level);
#endif /* FM_LIST_MODEL_H */
Index: src/file-manager/fm-list-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-view.c,v
retrieving revision 1.168
diff -p -u -r1.168 fm-list-view.c
--- src/file-manager/fm-list-view.c 24 Apr 2002 00:16:50 -0000 1.168
+++ src/file-manager/fm-list-view.c 1 May 2002 22:12:20 -0000
@@ -22,6 +22,7 @@
Authors: John Sullivan <sullivan eazel com>
Anders Carlsson <andersca gnu org>
+ David Emory Watson <dwatson cs ucr edu>
*/
#include <config.h>
@@ -46,7 +47,14 @@ struct FMListViewDetails {
FMListModel *model;
GtkTreeViewColumn *file_name_column;
- GtkCellRendererText *file_name_cell;
+
+ GtkCellRendererPixbuf *pixbuf_cell;
+ GtkCellRendererText *file_name_cell;
+ GtkCellRendererText *size_cell;
+ GtkCellRendererText *type_cell;
+ GtkCellRendererText *date_modified_cell;
+
+ NautilusZoomLevel zoom_level;
};
static GtkTargetEntry drag_types [] = {
@@ -64,9 +72,12 @@ static GtkTargetEntry drag_types [] = {
static NautilusFileSortType default_sort_order_auto_value;
static gboolean default_sort_reversed_auto_value;
+static NautilusZoomLevel default_zoom_level_auto_value;
-static GList * fm_list_view_get_selection (FMDirectoryView *view);
-
+static GList * fm_list_view_get_selection (FMDirectoryView *view);
+static void fm_list_view_set_zoom_level (FMListView *view,
+ NautilusZoomLevel new_level,
+ gboolean always_set_level);
GNOME_CLASS_BOILERPLATE (FMListView, fm_list_view,
FMDirectoryView, FM_TYPE_DIRECTORY_VIEW)
@@ -227,7 +238,7 @@ cell_renderer_edited (GtkCellRendererTex
}
static void
-click_policy_changed (gpointer callback_data)
+click_policy_changed_callback (gpointer callback_data)
{
FMListView *view;
@@ -277,9 +288,10 @@ create_and_set_up_tree_view (FMListView
gtk_tree_view_enable_model_drag_source (view->details->tree_view, 0, drag_types, G_N_ELEMENTS (drag_types),
GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK);
-
+
/* Create the file name column */
cell = gtk_cell_renderer_pixbuf_new ();
+ view->details->pixbuf_cell = (GtkCellRendererPixbuf *)cell;
view->details->file_name_column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_sort_column_id (view->details->file_name_column, FM_LIST_MODEL_NAME_COLUMN);
@@ -287,11 +299,9 @@ create_and_set_up_tree_view (FMListView
gtk_tree_view_column_set_resizable (view->details->file_name_column, TRUE);
gtk_tree_view_column_pack_start (view->details->file_name_column, cell, FALSE);
- gtk_tree_view_column_set_attributes (view->details->file_name_column, cell,
- "pixbuf", FM_LIST_MODEL_ICON_COLUMN,
- NULL);
cell = gtk_cell_renderer_text_new ();
+ view->details->file_name_cell = (GtkCellRendererText *)cell;
g_signal_connect (cell, "edited", G_CALLBACK (cell_renderer_edited), view);
gtk_tree_view_column_pack_start (view->details->file_name_column, cell, TRUE);
@@ -301,14 +311,9 @@ create_and_set_up_tree_view (FMListView
NULL);
gtk_tree_view_append_column (view->details->tree_view, view->details->file_name_column);
- /* Set up underline of file name. */
- view->details->file_name_cell = (GtkCellRendererText *)cell;
- eel_preferences_add_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
- click_policy_changed, view);
- click_policy_changed (view);
-
/* Create the size column */
cell = gtk_cell_renderer_text_new ();
+ view->details->size_cell = (GtkCellRendererText *)cell;
g_object_set (G_OBJECT (cell),
"xalign", 1.0,
NULL);
@@ -322,6 +327,7 @@ create_and_set_up_tree_view (FMListView
/* Create the type column */
cell = gtk_cell_renderer_text_new ();
+ view->details->type_cell = (GtkCellRendererText *)cell;
column = gtk_tree_view_column_new_with_attributes (_("Type"),
cell,
"text", FM_LIST_MODEL_TYPE_COLUMN,
@@ -332,6 +338,7 @@ create_and_set_up_tree_view (FMListView
/* Create the date modified column */
cell = gtk_cell_renderer_text_new ();
+ view->details->date_modified_cell = (GtkCellRendererText *)cell;
column = gtk_tree_view_column_new_with_attributes (_("Date Modified"),
cell,
"text", FM_LIST_MODEL_DATE_MODIFIED_COLUMN,
@@ -380,6 +387,21 @@ set_sort_order_from_metadata_and_prefere
}
static void
+set_zoom_level_from_metadata_and_preferences (FMListView *list_view)
+{
+ NautilusFile *file;
+ int level;
+
+ if (fm_directory_view_supports_zooming (FM_DIRECTORY_VIEW (list_view))) {
+ file = fm_directory_view_get_directory_as_file (FM_DIRECTORY_VIEW (list_view));
+ level = nautilus_file_get_integer_metadata (file,
+ NAUTILUS_METADATA_KEY_LIST_VIEW_ZOOM_LEVEL,
+ default_zoom_level_auto_value);
+ fm_list_view_set_zoom_level (list_view, level, TRUE);
+ }
+}
+
+static void
fm_list_view_begin_loading (FMDirectoryView *view)
{
FMListView *list_view;
@@ -390,6 +412,7 @@ fm_list_view_begin_loading (FMDirectoryV
fm_directory_view_get_directory_as_file (view));
set_sort_order_from_metadata_and_preferences (list_view);
+ set_zoom_level_from_metadata_and_preferences (list_view);
}
static void
@@ -496,10 +519,128 @@ fm_list_view_reset_to_defaults (FMDirect
(GTK_TREE_SORTABLE (FM_LIST_VIEW (view)->details->model),
fm_list_model_get_sort_column_id_from_sort_type (default_sort_order_auto_value),
default_sort_reversed_auto_value ? GTK_SORT_DESCENDING : GTK_SORT_ASCENDING);
+
fm_directory_view_restore_default_zoom_level (view);
}
static void
+fm_list_view_set_zoom_level (FMListView *view,
+ NautilusZoomLevel new_level,
+ gboolean always_set_level)
+{
+ static double pango_scale[7] = { PANGO_SCALE_XX_SMALL, PANGO_SCALE_X_SMALL, PANGO_SCALE_SMALL,
+ PANGO_SCALE_MEDIUM,
+ PANGO_SCALE_LARGE, PANGO_SCALE_X_LARGE, PANGO_SCALE_XX_LARGE };
+ int icon_size;
+ int column;
+
+ g_return_if_fail (FM_IS_LIST_VIEW (view));
+ g_return_if_fail (new_level >= NAUTILUS_ZOOM_LEVEL_SMALLEST &&
+ new_level <= NAUTILUS_ZOOM_LEVEL_LARGEST);
+
+ if (view->details->zoom_level == new_level) {
+ if (always_set_level) {
+ fm_directory_view_set_zoom_level (FM_DIRECTORY_VIEW(view), new_level);
+ }
+ return;
+ }
+
+ view->details->zoom_level = new_level;
+ fm_directory_view_set_zoom_level (FM_DIRECTORY_VIEW(view), new_level);
+
+ nautilus_file_set_integer_metadata
+ (fm_directory_view_get_directory_as_file (FM_DIRECTORY_VIEW (view)),
+ NAUTILUS_METADATA_KEY_LIST_VIEW_ZOOM_LEVEL,
+ default_zoom_level_auto_value,
+ new_level);
+
+ /* Select correctly scaled icons. */
+ column = fm_list_model_get_column_id_from_zoom_level (new_level);
+ gtk_tree_view_column_set_attributes (view->details->file_name_column,
+ GTK_CELL_RENDERER (view->details->pixbuf_cell),
+ "pixbuf", column,
+ NULL);
+
+ /* Scale text. */
+ g_object_set (G_OBJECT (view->details->file_name_cell),
+ "scale", pango_scale[new_level],
+ NULL);
+ g_object_set (G_OBJECT (view->details->size_cell),
+ "scale", pango_scale[new_level],
+ NULL);
+ g_object_set (G_OBJECT (view->details->type_cell),
+ "scale", pango_scale[new_level],
+ NULL);
+ g_object_set (G_OBJECT (view->details->date_modified_cell),
+ "scale", pango_scale[new_level],
+ NULL);
+
+ /* Make all rows the same size. */
+ icon_size = nautilus_get_icon_size_for_zoom_level (new_level);
+ gtk_cell_renderer_set_fixed_size (GTK_CELL_RENDERER (view->details->pixbuf_cell),
+ -1, icon_size);
+
+ fm_directory_view_update_menus (FM_DIRECTORY_VIEW (view));
+}
+
+static void
+fm_list_view_bump_zoom_level (FMDirectoryView *view, int zoom_increment)
+{
+ FMListView *list_view;
+ NautilusZoomLevel new_level;
+
+ g_return_if_fail (FM_IS_LIST_VIEW (view));
+
+ list_view = FM_LIST_VIEW (view);
+ new_level = list_view->details->zoom_level + zoom_increment;
+
+ if (new_level >= NAUTILUS_ZOOM_LEVEL_SMALLEST &&
+ new_level <= NAUTILUS_ZOOM_LEVEL_LARGEST) {
+ fm_list_view_set_zoom_level (list_view, new_level, FALSE);
+ }
+}
+
+static void
+fm_list_view_zoom_to_level (FMDirectoryView *view, int zoom_level)
+{
+ FMListView *list_view;
+
+ g_return_if_fail (FM_IS_LIST_VIEW (view));
+
+ list_view = FM_LIST_VIEW (view);
+
+ fm_list_view_set_zoom_level (list_view, zoom_level, FALSE);
+}
+
+static void
+fm_list_view_restore_default_zoom_level (FMDirectoryView *view)
+{
+ FMListView *list_view;
+
+ g_return_if_fail (FM_IS_LIST_VIEW (view));
+
+ list_view = FM_LIST_VIEW (view);
+
+ fm_list_view_set_zoom_level (list_view, default_zoom_level_auto_value, FALSE);
+}
+
+static gboolean
+fm_list_view_can_zoom_in (FMDirectoryView *view)
+{
+ g_return_val_if_fail (FM_IS_LIST_VIEW (view), FALSE);
+
+ return FM_LIST_VIEW (view)->details->zoom_level < NAUTILUS_ZOOM_LEVEL_LARGEST;
+}
+
+static gboolean
+fm_list_view_can_zoom_out (FMDirectoryView *view)
+{
+ g_return_val_if_fail (FM_IS_LIST_VIEW (view), FALSE);
+
+ return FM_LIST_VIEW (view)->details->zoom_level > NAUTILUS_ZOOM_LEVEL_SMALLEST;
+}
+
+static void
fm_list_view_start_renaming_file (FMDirectoryView *view, NautilusFile *file)
{
FMListView *list_view;
@@ -521,6 +662,16 @@ fm_list_view_start_renaming_file (FMDire
}
static void
+default_zoom_level_changed_callback (gpointer callback_data)
+{
+ FMListView *list_view;
+
+ list_view = FM_LIST_VIEW (callback_data);
+
+ set_zoom_level_from_metadata_and_preferences (list_view);
+}
+
+static void
fm_list_view_sort_directories_first_changed (FMDirectoryView *view)
{
FMListView *list_view;
@@ -538,9 +689,6 @@ fm_list_view_finalize (GObject *object)
list_view = FM_LIST_VIEW (object);
- eel_preferences_remove_callback (NAUTILUS_PREFERENCES_CLICK_POLICY,
- click_policy_changed, list_view);
-
g_free (list_view->details);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -569,20 +717,17 @@ fm_list_view_class_init (FMListViewClass
fm_directory_view_class->add_file = fm_list_view_add_file;
fm_directory_view_class->begin_loading = fm_list_view_begin_loading;
-#if GNOME2_CONVERSION_COMPLETE
- fm_directory_view_class->bump_zoom_level = xxx;
- fm_directory_view_class->can_zoom_in = xxx;
- fm_directory_view_class->can_zoom_out = xxx;
-#endif
+ fm_directory_view_class->bump_zoom_level = fm_list_view_bump_zoom_level;
+ fm_directory_view_class->zoom_to_level = fm_list_view_zoom_to_level;
+ fm_directory_view_class->can_zoom_in = fm_list_view_can_zoom_in;
+ fm_directory_view_class->can_zoom_out = fm_list_view_can_zoom_out;
fm_directory_view_class->clear = fm_list_view_clear;
fm_directory_view_class->file_changed = fm_list_view_file_changed;
fm_directory_view_class->get_background_widget = fm_list_view_get_background_widget;
fm_directory_view_class->get_selection = fm_list_view_get_selection;
fm_directory_view_class->is_empty = fm_list_view_is_empty;
fm_directory_view_class->reset_to_defaults = fm_list_view_reset_to_defaults;
-#if GNOME2_CONVERSION_COMPLETE
- fm_directory_view_class->restore_default_zoom_level = xxx;
-#endif
+ fm_directory_view_class->restore_default_zoom_level = fm_list_view_restore_default_zoom_level;
fm_directory_view_class->remove_file = fm_list_view_remove_file;
fm_directory_view_class->select_all = fm_list_view_select_all;
fm_directory_view_class->set_selection = fm_list_view_set_selection;
@@ -594,6 +739,8 @@ fm_list_view_class_init (FMListViewClass
(int *) &default_sort_order_auto_value);
eel_preferences_add_auto_boolean (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER,
&default_sort_reversed_auto_value);
+ eel_preferences_add_auto_enum (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
+ (int *) &default_zoom_level_auto_value);
}
static void
@@ -602,6 +749,15 @@ fm_list_view_instance_init (FMListView *
list_view->details = g_new0 (FMListViewDetails, 1);
create_and_set_up_tree_view (list_view);
+
+ eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
+ default_zoom_level_changed_callback,
+ list_view, G_OBJECT (list_view));
+ eel_preferences_add_callback_while_alive (NAUTILUS_PREFERENCES_CLICK_POLICY,
+ click_policy_changed_callback,
+ list_view, G_OBJECT (list_view));
+
+ click_policy_changed_callback (list_view);
fm_list_view_sort_directories_first_changed (FM_DIRECTORY_VIEW (list_view));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]