[nautilus] Remove compact mode
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Remove compact mode
- Date: Fri, 25 May 2012 20:21:52 +0000 (UTC)
commit 241e462024070d9f79f4816256fc00ff5119e25f
Author: William Jon McCann <jmccann redhat com>
Date: Fri May 25 15:16:34 2012 -0400
Remove compact mode
There is really little difference between compact mode and icon
mode with labels on the side. Well, except for that that horrible
horizontal scrolling.
https://bugzilla.gnome.org/show_bug.cgi?id=676842
libnautilus-private/nautilus-global-preferences.c | 3 -
libnautilus-private/nautilus-global-preferences.h | 7 -
libnautilus-private/nautilus-metadata.c | 1 -
libnautilus-private/nautilus-metadata.h | 2 -
libnautilus-private/nautilus.convert | 4 -
.../org.gnome.nautilus.gschema.xml.in | 22 +--
src/nautilus-application.c | 1 -
src/nautilus-convert-metadata.c | 1 -
src/nautilus-file-management-properties.c | 12 +-
src/nautilus-file-management-properties.ui | 109 +----------
src/nautilus-icon-view-container.c | 11 +-
src/nautilus-icon-view.c | 217 ++------------------
src/nautilus-icon-view.h | 3 -
13 files changed, 25 insertions(+), 368 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.c b/libnautilus-private/nautilus-global-preferences.c
index bb618c6..95600d2 100644
--- a/libnautilus-private/nautilus-global-preferences.c
+++ b/libnautilus-private/nautilus-global-preferences.c
@@ -48,8 +48,6 @@ nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (void)
if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW) {
viewer_iid = NAUTILUS_LIST_VIEW_IID;
- } else if (preference_value == NAUTILUS_DEFAULT_FOLDER_VIEWER_COMPACT_VIEW) {
- viewer_iid = NAUTILUS_COMPACT_VIEW_IID;
} else {
viewer_iid = NAUTILUS_ICON_VIEW_IID;
}
@@ -72,7 +70,6 @@ nautilus_global_preferences_init (void)
nautilus_window_state = g_settings_new("org.gnome.nautilus.window-state");
nautilus_icon_view_preferences = g_settings_new("org.gnome.nautilus.icon-view");
nautilus_list_view_preferences = g_settings_new("org.gnome.nautilus.list-view");
- nautilus_compact_view_preferences = g_settings_new("org.gnome.nautilus.compact-view");
nautilus_desktop_preferences = g_settings_new("org.gnome.nautilus.desktop");
nautilus_tree_sidebar_preferences = g_settings_new("org.gnome.nautilus.sidebar-panels.tree");
gnome_lockdown_preferences = g_settings_new("org.gnome.desktop.lockdown");
diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h
index c9ed637..2dd27da 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -94,14 +94,12 @@ typedef enum
enum
{
NAUTILUS_DEFAULT_FOLDER_VIEWER_ICON_VIEW,
- NAUTILUS_DEFAULT_FOLDER_VIEWER_COMPACT_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_LIST_VIEW,
NAUTILUS_DEFAULT_FOLDER_VIEWER_OTHER
};
/* These IIDs are used by the preferences code and in nautilus-application.c */
#define NAUTILUS_ICON_VIEW_IID "OAFIID:Nautilus_File_Manager_Icon_View"
-#define NAUTILUS_COMPACT_VIEW_IID "OAFIID:Nautilus_File_Manager_Compact_View"
#define NAUTILUS_LIST_VIEW_IID "OAFIID:Nautilus_File_Manager_List_View"
@@ -120,10 +118,6 @@ enum
#define NAUTILUS_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit"
#define NAUTILUS_PREFERENCES_DESKTOP_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit"
-/* Compact View */
-#define NAUTILUS_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
-#define NAUTILUS_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH "all-columns-have-same-width"
-
/* List View */
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "default-visible-columns"
@@ -186,7 +180,6 @@ char *nautilus_global_preferences_get_default_folder_viewer_preference_as_iid (v
GSettings *nautilus_preferences;
GSettings *nautilus_icon_view_preferences;
GSettings *nautilus_list_view_preferences;
-GSettings *nautilus_compact_view_preferences;
GSettings *nautilus_desktop_preferences;
GSettings *nautilus_tree_sidebar_preferences;
GSettings *nautilus_window_state;
diff --git a/libnautilus-private/nautilus-metadata.c b/libnautilus-private/nautilus-metadata.c
index 7e3f8dd..924bb70 100644
--- a/libnautilus-private/nautilus-metadata.c
+++ b/libnautilus-private/nautilus-metadata.c
@@ -39,7 +39,6 @@ static char *used_metadata_names[] = {
NAUTILUS_METADATA_KEY_LIST_VIEW_SORT_REVERSED,
NAUTILUS_METADATA_KEY_LIST_VIEW_VISIBLE_COLUMNS,
NAUTILUS_METADATA_KEY_LIST_VIEW_COLUMN_ORDER,
- NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL,
NAUTILUS_METADATA_KEY_WINDOW_GEOMETRY,
NAUTILUS_METADATA_KEY_WINDOW_SCROLL_POSITION,
NAUTILUS_METADATA_KEY_WINDOW_SHOW_HIDDEN_FILES,
diff --git a/libnautilus-private/nautilus-metadata.h b/libnautilus-private/nautilus-metadata.h
index 7ea4389..cd7762b 100644
--- a/libnautilus-private/nautilus-metadata.h
+++ b/libnautilus-private/nautilus-metadata.h
@@ -52,8 +52,6 @@
#define NAUTILUS_METADATA_KEY_LIST_VIEW_VISIBLE_COLUMNS "nautilus-list-view-visible-columns"
#define NAUTILUS_METADATA_KEY_LIST_VIEW_COLUMN_ORDER "nautilus-list-view-column-order"
-#define NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL "nautilus-compact-view-zoom-level"
-
#define NAUTILUS_METADATA_KEY_WINDOW_GEOMETRY "nautilus-window-geometry"
#define NAUTILUS_METADATA_KEY_WINDOW_SCROLL_POSITION "nautilus-window-scroll-position"
#define NAUTILUS_METADATA_KEY_WINDOW_SHOW_HIDDEN_FILES "nautilus-window-show-hidden-files"
diff --git a/libnautilus-private/nautilus.convert b/libnautilus-private/nautilus.convert
index 83bdb34..d64d79c 100644
--- a/libnautilus-private/nautilus.convert
+++ b/libnautilus-private/nautilus.convert
@@ -29,10 +29,6 @@ default-zoom-level = /apps/nautilus/icon_view/default_zoom_level
thumbnail-size = /apps/nautilus/icon_view/thumbnail_size
text-ellipsis-limit = /apps/nautilus/icon_view/text_ellipsis_limit
-[org.gnome.nautilus.compact-view]
-default-zoom-level = /apps/nautilus/compact_view/default_zoom_level
-all-columns-have-same-width = /apps/nautilus/compact_view/all_columns_have_same_width
-
[org.gnome.nautilus.list-view]
default-zoom-level = /apps/nautilus/list_view/default_zoom_level
default-visible-columns = /apps/nautilus/list_view/default_visible_columns
diff --git a/libnautilus-private/org.gnome.nautilus.gschema.xml.in b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
index 97ff9cb..778e226 100644
--- a/libnautilus-private/org.gnome.nautilus.gschema.xml.in
+++ b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
@@ -18,8 +18,7 @@
<enum id="org.gnome.nautilus.FolderView">
<value nick="icon-view" value="0"/>
- <value nick="compact-view" value="1"/>
- <value nick="list-view" value="2"/>
+ <value nick="list-view" value="1"/>
</enum>
<enum id="org.gnome.nautilus.DateFormat">
@@ -56,7 +55,6 @@
<schema id="org.gnome.nautilus" path="/org/gnome/nautilus/" gettext-domain="nautilus">
<child name="preferences" schema="org.gnome.nautilus.preferences"/>
<child name="icon-view" schema="org.gnome.nautilus.icon-view"/>
- <child name="compact-view" schema="org.gnome.nautilus.compact-view"/>
<child name="list-view" schema="org.gnome.nautilus.list-view"/>
<child name="sidebar-panels" schema="org.gnome.nautilus.sidebar-panels"/>
<child name="desktop" schema="org.gnome.nautilus.desktop"/>
@@ -171,12 +169,13 @@
<key name="default-folder-viewer" enum="org.gnome.nautilus.FolderView">
<aliases>
<alias value='icon_view' target='icon-view'/>
- <alias value='compact_view' target='compact-view'/>
+ <alias value='compact_view' target='icon-view'/>
+ <alias value='compact-view' target='icon-view'/>
<alias value='list_view' target='list-view'/>
</aliases>
<default>'icon-view'</default>
<_summary>Default folder viewer</_summary>
- <_description>When a folder is visited this viewer is used unless you have selected another view for that particular folder. Possible values are "list-view", "icon-view" and "compact-view".</_description>
+ <_description>When a folder is visited this viewer is used unless you have selected another view for that particular folder. Possible values are "list-view", and "icon-view".</_description>
</key>
<key name="date-format" enum="org.gnome.nautilus.DateFormat">
<default>'locale'</default>
@@ -245,19 +244,6 @@
</key>
</schema>
- <schema id="org.gnome.nautilus.compact-view" path="/org/gnome/nautilus/compact-view/" gettext-domain="nautilus">
- <key name="default-zoom-level" enum="org.gnome.nautilus.ZoomLevel">
- <default>'standard'</default>
- <_summary>Default compact view zoom level</_summary>
- <_description>Default zoom level used by the compact view.</_description>
- </key>
- <key name="all-columns-have-same-width" type="b">
- <default>false</default>
- <_summary>All columns have same width</_summary>
- <_description>If this preference is set, all columns in the compact view have the same width. Otherwise, the width of each column is determined seperately.</_description>
- </key>
- </schema>
-
<schema id="org.gnome.nautilus.list-view" path="/org/gnome/nautilus/list-view/" gettext-domain="nautilus">
<key name="default-zoom-level" enum="org.gnome.nautilus.ZoomLevel">
<default>'smaller'</default>
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index e746518..f21b7f3 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -1277,7 +1277,6 @@ nautilus_application_startup (GApplication *app)
nautilus_icon_view_register ();
nautilus_desktop_icon_view_register ();
nautilus_list_view_register ();
- nautilus_icon_view_compact_register ();
#if ENABLE_EMPTY_VIEW
nautilus_empty_view_register ();
#endif
diff --git a/src/nautilus-convert-metadata.c b/src/nautilus-convert-metadata.c
index 1623232..27b40cc 100644
--- a/src/nautilus-convert-metadata.c
+++ b/src/nautilus-convert-metadata.c
@@ -103,7 +103,6 @@ static struct {
{"list_view_sort_reversed", "metadata::" NAUTILUS_METADATA_KEY_LIST_VIEW_SORT_REVERSED},
{"list_view_visible_columns", "metadata::" NAUTILUS_METADATA_KEY_LIST_VIEW_VISIBLE_COLUMNS},
{"list_view_column_order", "metadata::" NAUTILUS_METADATA_KEY_LIST_VIEW_COLUMN_ORDER},
- {"compact_view_zoom_level", "metadata::" NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL},
{"window_geometry", "metadata::" NAUTILUS_METADATA_KEY_WINDOW_GEOMETRY},
{"window_scroll_position", "metadata::" NAUTILUS_METADATA_KEY_WINDOW_SCROLL_POSITION},
{"window_show_hidden_files", "metadata::" NAUTILUS_METADATA_KEY_WINDOW_SHOW_HIDDEN_FILES},
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index d01ca2d..8076c02 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -43,7 +43,6 @@
/* string enum preferences */
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET "default_view_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ICON_VIEW_ZOOM_WIDGET "icon_view_zoom_combobox"
-#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_COMPACT_VIEW_ZOOM_WIDGET "compact_view_zoom_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_ZOOM_WIDGET "list_view_zoom_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SORT_ORDER_WIDGET "sort_order_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DATE_FORMAT_WIDGET "date_format_combobox"
@@ -54,7 +53,6 @@
/* bool preferences */
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET "sort_folders_first_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LABELS_BESIDE_ICONS_WIDGET "labels_beside_icons_checkbutton"
-#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ALL_COLUMNS_SAME_WIDTH "all_columns_same_width_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ALWAYS_USE_BROWSER_WIDGET "always_use_browser_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_CONFIRM_WIDGET "trash_confirm_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_DELETE_WIDGET "trash_delete_checkbutton"
@@ -68,7 +66,6 @@
static const char * const default_view_values[] = {
"icon-view",
"list-view",
- "compact-view",
NULL
};
@@ -711,7 +708,7 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
/* setup UI */
nautilus_file_management_properties_size_group_create (builder,
"views_label",
- 5);
+ 4);
nautilus_file_management_properties_size_group_create (builder,
"captions_label",
3);
@@ -724,9 +721,6 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
bind_builder_bool (builder, nautilus_icon_view_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LABELS_BESIDE_ICONS_WIDGET,
NAUTILUS_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS);
- bind_builder_bool (builder, nautilus_compact_view_preferences,
- NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ALL_COLUMNS_SAME_WIDTH,
- NAUTILUS_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH);
bind_builder_bool (builder, nautilus_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET,
NAUTILUS_PREFERENCES_SORT_DIRECTORIES_FIRST);
@@ -756,10 +750,6 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ICON_VIEW_ZOOM_WIDGET,
NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL,
(const char **) zoom_values);
- bind_builder_enum (builder, nautilus_compact_view_preferences,
- NAUTILUS_FILE_MANAGEMENT_PROPERTIES_COMPACT_VIEW_ZOOM_WIDGET,
- NAUTILUS_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL,
- (const char **) zoom_values);
bind_builder_enum (builder, nautilus_list_view_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_ZOOM_WIDGET,
NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
diff --git a/src/nautilus-file-management-properties.ui b/src/nautilus-file-management-properties.ui
index ce058f4..782e241 100644
--- a/src/nautilus-file-management-properties.ui
+++ b/src/nautilus-file-management-properties.ui
@@ -318,114 +318,7 @@
<child>
<object class="GtkCheckButton" id="labels_beside_icons_checkbutton">
<property name="label" translatable="yes">_Text beside icons</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="vbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkLabel" id="label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Compact View Defaults</b></property>
- <property name="use_markup">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkAlignment" id="alignment">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkBox" id="vbox42">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkBox" id="hbox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="views_label_4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Default zoom level:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">compact_view_zoom_combobox</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="compact_view_zoom_combobox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model4</property>
- <child>
- <object class="GtkCellRendererText" id="renderer4"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="all_columns_same_width_checkbutton">
- <property name="label" translatable="yes">A_ll columns have the same width</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -452,7 +345,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
diff --git a/src/nautilus-icon-view-container.c b/src/nautilus-icon-view-container.c
index c914816..2b0399c 100644
--- a/src/nautilus-icon-view-container.c
+++ b/src/nautilus-icon-view-container.c
@@ -83,12 +83,8 @@ nautilus_icon_view_container_get_icon_images (NautilusIconContainer *container,
*has_window_open = nautilus_file_has_open_window (file);
flags = NAUTILUS_FILE_ICON_FLAGS_USE_MOUNT_ICON_AS_EMBLEM;
- if (!nautilus_icon_view_is_compact (icon_view) ||
- nautilus_icon_container_get_zoom_level (container) > NAUTILUS_ZOOM_LEVEL_STANDARD) {
+ if (nautilus_icon_container_get_zoom_level (container) > NAUTILUS_ZOOM_LEVEL_STANDARD) {
flags |= NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS;
- if (nautilus_icon_view_is_compact (icon_view)) {
- flags |= NAUTILUS_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE;
- }
}
if (use_embedding) {
@@ -359,11 +355,6 @@ nautilus_icon_view_container_get_icon_text (NautilusIconContainer *container,
return;
}
- if (nautilus_icon_view_is_compact (icon_view)) {
- *additional_text = NULL;
- return;
- }
-
if (NAUTILUS_IS_DESKTOP_ICON_FILE (file) ||
nautilus_file_is_nautilus_link (file)) {
/* Don't show the normal extra information for desktop icons,
diff --git a/src/nautilus-icon-view.c b/src/nautilus-icon-view.c
index a44feb7..4d341c0 100644
--- a/src/nautilus-icon-view.c
+++ b/src/nautilus-icon-view.c
@@ -68,8 +68,7 @@
enum
{
- PROP_COMPACT = 1,
- PROP_SUPPORTS_AUTO_LAYOUT,
+ PROP_SUPPORTS_AUTO_LAYOUT = 1,
PROP_SUPPORTS_SCALING,
PROP_SUPPORTS_KEEP_ALIGNED,
PROP_SUPPORTS_LABELS_BESIDE_ICONS,
@@ -108,8 +107,6 @@ struct NautilusIconViewDetails
gboolean filter_by_screen;
int num_screens;
- gboolean compact;
-
gulong clipboard_handler_id;
GtkWidget *icon_container;
@@ -231,7 +228,7 @@ nautilus_icon_view_supports_manual_layout (NautilusIconView *view)
{
g_return_val_if_fail (NAUTILUS_IS_ICON_VIEW (view), FALSE);
- return !nautilus_icon_view_is_compact (view);
+ return TRUE;
}
static gboolean
@@ -867,17 +864,15 @@ get_sort_criterion_by_sort_type (NautilusFileSortType sort_type)
return &sort_criteria[0];
}
-#define DEFAULT_ZOOM_LEVEL(icon_view) icon_view->details->compact ? default_compact_zoom_level : default_zoom_level
+#define DEFAULT_ZOOM_LEVEL(icon_view) default_zoom_level
static NautilusZoomLevel
get_default_zoom_level (NautilusIconView *icon_view)
{
- NautilusZoomLevel default_zoom_level, default_compact_zoom_level;
+ NautilusZoomLevel default_zoom_level;
default_zoom_level = g_settings_get_enum (nautilus_icon_view_preferences,
NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL);
- default_compact_zoom_level = g_settings_get_enum (nautilus_icon_view_preferences,
- NAUTILUS_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL);
return CLAMP (DEFAULT_ZOOM_LEVEL(icon_view), NAUTILUS_ZOOM_LEVEL_SMALLEST, NAUTILUS_ZOOM_LEVEL_LARGEST);
}
@@ -888,9 +883,8 @@ set_labels_beside_icons (NautilusIconView *icon_view)
gboolean labels_beside;
if (nautilus_icon_view_supports_labels_beside_icons (icon_view)) {
- labels_beside = nautilus_icon_view_is_compact (icon_view) ||
- g_settings_get_boolean (nautilus_icon_view_preferences,
- NAUTILUS_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS);
+ labels_beside = g_settings_get_boolean (nautilus_icon_view_preferences,
+ NAUTILUS_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS);
if (labels_beside) {
nautilus_icon_container_set_label_position
@@ -905,18 +899,6 @@ set_labels_beside_icons (NautilusIconView *icon_view)
}
static void
-set_columns_same_width (NautilusIconView *icon_view)
-{
- gboolean all_columns_same_width;
-
- if (nautilus_icon_view_is_compact (icon_view)) {
- all_columns_same_width = g_settings_get_boolean (nautilus_compact_view_preferences,
- NAUTILUS_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH);
- nautilus_icon_container_set_all_columns_same_width (get_icon_container (icon_view), all_columns_same_width);
- }
-}
-
-static void
nautilus_icon_view_begin_loading (NautilusView *view)
{
NautilusIconView *icon_view;
@@ -941,18 +923,9 @@ nautilus_icon_view_begin_loading (NautilusView *view)
/* Set up the zoom level from the metadata. */
if (nautilus_view_supports_zooming (NAUTILUS_VIEW (icon_view))) {
- if (icon_view->details->compact) {
- level = nautilus_file_get_integer_metadata
- (file,
- NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (icon_view));
- } else {
- level = nautilus_file_get_integer_metadata
- (file,
- NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (icon_view));
- }
-
+ level = nautilus_file_get_integer_metadata (file,
+ NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
+ get_default_zoom_level (icon_view));
nautilus_icon_view_set_zoom_level (icon_view, level, TRUE);
}
@@ -972,7 +945,6 @@ nautilus_icon_view_begin_loading (NautilusView *view)
nautilus_icon_view_get_directory_keep_aligned (icon_view, file));
set_labels_beside_icons (icon_view);
- set_columns_same_width (icon_view);
/* We must set auto-layout last, because it invokes the layout_changed
* callback, which works incorrectly if the other layout criteria are
@@ -1049,19 +1021,11 @@ nautilus_icon_view_set_zoom_level (NautilusIconView *view,
return;
}
- if (view->details->compact) {
- nautilus_file_set_integer_metadata
- (nautilus_view_get_directory_as_file (NAUTILUS_VIEW (view)),
- NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (view),
- new_level);
- } else {
- nautilus_file_set_integer_metadata
- (nautilus_view_get_directory_as_file (NAUTILUS_VIEW (view)),
- NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (view),
- new_level);
- }
+ nautilus_file_set_integer_metadata
+ (nautilus_view_get_directory_as_file (NAUTILUS_VIEW (view)),
+ NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
+ get_default_zoom_level (view),
+ new_level);
nautilus_icon_container_set_zoom_level (icon_container, new_level);
@@ -1762,54 +1726,6 @@ nautilus_icon_view_screen_changed (GtkWidget *widget,
}
}
-static gboolean
-nautilus_icon_view_scroll_event (GtkWidget *widget,
- GdkEventScroll *scroll_event)
-{
- NautilusIconView *icon_view;
- GdkEvent *event_copy;
- GdkEventScroll *scroll_event_copy;
- gboolean ret;
-
- icon_view = NAUTILUS_ICON_VIEW (widget);
-
- if (icon_view->details->compact &&
- (scroll_event->direction == GDK_SCROLL_UP ||
- scroll_event->direction == GDK_SCROLL_DOWN ||
- scroll_event->direction == GDK_SCROLL_SMOOTH)) {
- ret = nautilus_view_handle_scroll_event (NAUTILUS_VIEW (icon_view), scroll_event);
- if (!ret) {
- /* in column-wise layout, re-emit vertical mouse scroll events as horizontal ones,
- * if they don't bump zoom */
- event_copy = gdk_event_copy ((GdkEvent *) scroll_event);
- scroll_event_copy = (GdkEventScroll *) event_copy;
-
- /* transform vertical integer smooth scroll events into horizontal events */
- if (scroll_event_copy->direction == GDK_SCROLL_SMOOTH &&
- scroll_event_copy->delta_x == 0) {
- if (scroll_event_copy->delta_y == 1.0) {
- scroll_event_copy->direction = GDK_SCROLL_DOWN;
- } else if (scroll_event_copy->delta_y == -1.0) {
- scroll_event_copy->direction = GDK_SCROLL_UP;
- }
- }
-
- if (scroll_event_copy->direction == GDK_SCROLL_UP) {
- scroll_event_copy->direction = GDK_SCROLL_LEFT;
- } else if (scroll_event_copy->direction == GDK_SCROLL_DOWN) {
- scroll_event_copy->direction = GDK_SCROLL_RIGHT;
- }
-
- ret = GTK_WIDGET_CLASS (nautilus_icon_view_parent_class)->scroll_event (widget, scroll_event_copy);
- gdk_event_free (event_copy);
- }
-
- return ret;
- }
-
- return GTK_WIDGET_CLASS (nautilus_icon_view_parent_class)->scroll_event (widget, scroll_event);
-}
-
static void
selection_changed_callback (NautilusIconContainer *container,
NautilusIconView *icon_view)
@@ -2051,15 +1967,10 @@ default_zoom_level_changed_callback (gpointer callback_data)
if (nautilus_view_supports_zooming (NAUTILUS_VIEW (icon_view))) {
file = nautilus_view_get_directory_as_file (NAUTILUS_VIEW (icon_view));
- if (nautilus_icon_view_is_compact (icon_view)) {
- level = nautilus_file_get_integer_metadata (file,
- NAUTILUS_METADATA_KEY_COMPACT_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (icon_view));
- } else {
- level = nautilus_file_get_integer_metadata (file,
- NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
- get_default_zoom_level (icon_view));
- }
+ level = nautilus_file_get_integer_metadata (file,
+ NAUTILUS_METADATA_KEY_ICON_VIEW_ZOOM_LEVEL,
+ get_default_zoom_level (icon_view));
+
nautilus_view_zoom_to_level (NAUTILUS_VIEW (icon_view), level);
}
}
@@ -2077,19 +1988,6 @@ labels_beside_icons_changed_callback (gpointer callback_data)
}
static void
-all_columns_same_width_changed_callback (gpointer callback_data)
-{
- NautilusIconView *icon_view;
-
- g_assert (NAUTILUS_IS_ICON_VIEW (callback_data));
-
- icon_view = NAUTILUS_ICON_VIEW (callback_data);
-
- set_columns_same_width (icon_view);
-}
-
-
-static void
nautilus_icon_view_sort_directories_first_changed (NautilusView *directory_view)
{
NautilusIconView *icon_view;
@@ -2369,10 +2267,6 @@ icon_view_scroll_to_file (NautilusView *view,
static const char *
nautilus_icon_view_get_id (NautilusView *view)
{
- if (nautilus_icon_view_is_compact (NAUTILUS_ICON_VIEW (view))) {
- return FM_COMPACT_VIEW_ID;
- }
-
return NAUTILUS_ICON_VIEW_ID;
}
@@ -2387,17 +2281,6 @@ nautilus_icon_view_set_property (GObject *object,
icon_view = NAUTILUS_ICON_VIEW (object);
switch (prop_id) {
- case PROP_COMPACT:
- icon_view->details->compact = g_value_get_boolean (value);
- if (icon_view->details->compact) {
- nautilus_icon_container_set_layout_mode (get_icon_container (icon_view),
- gtk_widget_get_direction (GTK_WIDGET(icon_view)) == GTK_TEXT_DIR_RTL ?
- NAUTILUS_ICON_LAYOUT_T_B_R_L :
- NAUTILUS_ICON_LAYOUT_T_B_L_R);
- nautilus_icon_container_set_forced_icon_size (get_icon_container (icon_view),
- NAUTILUS_ICON_SIZE_SMALLEST);
- }
- break;
case PROP_SUPPORTS_AUTO_LAYOUT:
icon_view->details->supports_auto_layout = g_value_get_boolean (value);
break;
@@ -2445,13 +2328,6 @@ nautilus_icon_view_finalize (GObject *object)
text_attribute_names_changed_callback,
icon_view);
- g_signal_handlers_disconnect_by_func (nautilus_compact_view_preferences,
- default_zoom_level_changed_callback,
- icon_view);
- g_signal_handlers_disconnect_by_func (nautilus_compact_view_preferences,
- all_columns_same_width_changed_callback,
- icon_view);
-
G_OBJECT_CLASS (nautilus_icon_view_parent_class)->finalize (object);
}
@@ -2469,7 +2345,6 @@ nautilus_icon_view_class_init (NautilusIconViewClass *klass)
GTK_WIDGET_CLASS (klass)->destroy = nautilus_icon_view_destroy;
GTK_WIDGET_CLASS (klass)->screen_changed = nautilus_icon_view_screen_changed;
- GTK_WIDGET_CLASS (klass)->scroll_event = nautilus_icon_view_scroll_event;
nautilus_view_class->add_file = nautilus_icon_view_add_file;
nautilus_view_class->begin_loading = nautilus_icon_view_begin_loading;
@@ -2507,13 +2382,6 @@ nautilus_icon_view_class_init (NautilusIconViewClass *klass)
nautilus_view_class->get_first_visible_file = icon_view_get_first_visible_file;
nautilus_view_class->scroll_to_file = icon_view_scroll_to_file;
- properties[PROP_COMPACT] =
- g_param_spec_boolean ("compact",
- "Compact",
- "Whether this view provides a compact listing",
- FALSE,
- G_PARAM_WRITABLE |
- G_PARAM_CONSTRUCT_ONLY);
properties[PROP_SUPPORTS_AUTO_LAYOUT] =
g_param_spec_boolean ("supports-auto-layout",
"Supports auto layout",
@@ -2591,15 +2459,6 @@ nautilus_icon_view_init (NautilusIconView *icon_view)
G_CALLBACK (text_attribute_names_changed_callback),
icon_view);
- g_signal_connect_swapped (nautilus_compact_view_preferences,
- "changed::" NAUTILUS_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL,
- G_CALLBACK (default_zoom_level_changed_callback),
- icon_view);
- g_signal_connect_swapped (nautilus_compact_view_preferences,
- "changed::" NAUTILUS_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH,
- G_CALLBACK (all_columns_same_width_changed_callback),
- icon_view);
-
g_signal_connect_object (get_icon_container (icon_view), "handle_netscape_url",
G_CALLBACK (icon_view_handle_netscape_url), icon_view, 0);
g_signal_connect_object (get_icon_container (icon_view), "handle_uri_list",
@@ -2622,19 +2481,6 @@ nautilus_icon_view_create (NautilusWindowSlot *slot)
view = g_object_new (NAUTILUS_TYPE_ICON_VIEW,
"window-slot", slot,
- "compact", FALSE,
- NULL);
- return NAUTILUS_VIEW (view);
-}
-
-static NautilusView *
-nautilus_compact_view_create (NautilusWindowSlot *slot)
-{
- NautilusIconView *view;
-
- view = g_object_new (NAUTILUS_TYPE_ICON_VIEW,
- "window-slot", slot,
- "compact", TRUE,
NULL);
return NAUTILUS_VIEW (view);
}
@@ -2682,26 +2528,6 @@ static NautilusViewInfo nautilus_icon_view = {
nautilus_icon_view_supports_uri
};
-static NautilusViewInfo nautilus_compact_view = {
- FM_COMPACT_VIEW_ID,
- /* translators: this is used in the view selection dropdown
- * of navigation windows and in the preferences dialog */
- N_("Compact View"),
- /* translators: this is used in the view menu */
- N_("_Compact"),
- N_("The compact view encountered an error."),
- N_("The compact view encountered an error while starting up."),
- N_("Display this location with the compact view."),
- nautilus_compact_view_create,
- nautilus_icon_view_supports_uri
-};
-
-gboolean
-nautilus_icon_view_is_compact (NautilusIconView *view)
-{
- return view->details->compact;
-}
-
void
nautilus_icon_view_register (void)
{
@@ -2709,10 +2535,3 @@ nautilus_icon_view_register (void)
nautilus_view_factory_register (&nautilus_icon_view);
}
-void
-nautilus_icon_view_compact_register (void)
-{
- TRANSLATE_VIEW_INFO (nautilus_compact_view)
- nautilus_view_factory_register (&nautilus_compact_view);
-}
-
diff --git a/src/nautilus-icon-view.h b/src/nautilus-icon-view.h
index 7cf0d63..af82f19 100644
--- a/src/nautilus-icon-view.h
+++ b/src/nautilus-icon-view.h
@@ -44,7 +44,6 @@ typedef struct NautilusIconViewClass NautilusIconViewClass;
(G_TYPE_INSTANCE_GET_CLASS ((obj), NAUTILUS_TYPE_ICON_VIEW, NautilusIconViewClass))
#define NAUTILUS_ICON_VIEW_ID "OAFIID:Nautilus_File_Manager_Icon_View"
-#define FM_COMPACT_VIEW_ID "OAFIID:Nautilus_File_Manager_Compact_View"
typedef struct NautilusIconViewDetails NautilusIconViewDetails;
@@ -64,10 +63,8 @@ int nautilus_icon_view_compare_files (NautilusIconView *icon_view,
NautilusFile *b);
void nautilus_icon_view_filter_by_screen (NautilusIconView *icon_view,
gboolean filter);
-gboolean nautilus_icon_view_is_compact (NautilusIconView *icon_view);
void nautilus_icon_view_register (void);
-void nautilus_icon_view_compact_register (void);
NautilusIconContainer * nautilus_icon_view_get_icon_container (NautilusIconView *view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]