Commit bb124418 authored by Cosimo Cecchi's avatar Cosimo Cecchi

icon-view: rename FMIconView -> NautilusIconView

parent b20ff7a5
......@@ -1531,10 +1531,10 @@ nautilus_application_startup (GApplication *app)
nautilus_global_preferences_init ();
/* register views */
fm_icon_view_register ();
nautilus_icon_view_register ();
fm_desktop_icon_view_register ();
fm_list_view_register ();
fm_compact_view_register ();
nautilus_icon_view_compact_register ();
#if ENABLE_EMPTY_VIEW
fm_empty_view_register ();
#endif /* ENABLE_EMPTY_VIEW */
......
......@@ -81,17 +81,17 @@ struct FMDesktopIconViewDetails
};
static void default_zoom_level_changed (gpointer user_data);
static gboolean real_supports_auto_layout (FMIconView *view);
static gboolean real_supports_scaling (FMIconView *view);
static gboolean real_supports_keep_aligned (FMIconView *view);
static gboolean real_supports_labels_beside_icons (FMIconView *view);
static gboolean real_supports_auto_layout (NautilusIconView *view);
static gboolean real_supports_scaling (NautilusIconView *view);
static gboolean real_supports_keep_aligned (NautilusIconView *view);
static gboolean real_supports_labels_beside_icons (NautilusIconView *view);
static void real_merge_menus (NautilusView *view);
static void real_update_menus (NautilusView *view);
static gboolean real_supports_zooming (NautilusView *view);
static void fm_desktop_icon_view_update_icon_container_fonts (FMDesktopIconView *view);
static void font_changed_callback (gpointer callback_data);
G_DEFINE_TYPE (FMDesktopIconView, fm_desktop_icon_view, FM_TYPE_ICON_VIEW)
G_DEFINE_TYPE (FMDesktopIconView, fm_desktop_icon_view, NAUTILUS_TYPE_ICON_VIEW)
static char *desktop_directory;
static time_t desktop_dir_modify_time;
......@@ -321,10 +321,10 @@ fm_desktop_icon_view_class_init (FMDesktopIconViewClass *class)
NAUTILUS_VIEW_CLASS (class)->update_menus = real_update_menus;
NAUTILUS_VIEW_CLASS (class)->supports_zooming = real_supports_zooming;
FM_ICON_VIEW_CLASS (class)->supports_auto_layout = real_supports_auto_layout;
FM_ICON_VIEW_CLASS (class)->supports_scaling = real_supports_scaling;
FM_ICON_VIEW_CLASS (class)->supports_keep_aligned = real_supports_keep_aligned;
FM_ICON_VIEW_CLASS (class)->supports_labels_beside_icons = real_supports_labels_beside_icons;
NAUTILUS_ICON_VIEW_CLASS (class)->supports_auto_layout = real_supports_auto_layout;
NAUTILUS_ICON_VIEW_CLASS (class)->supports_scaling = real_supports_scaling;
NAUTILUS_ICON_VIEW_CLASS (class)->supports_keep_aligned = real_supports_keep_aligned;
NAUTILUS_ICON_VIEW_CLASS (class)->supports_labels_beside_icons = real_supports_labels_beside_icons;
g_type_class_add_private (class, sizeof (FMDesktopIconViewDetails));
}
......@@ -584,7 +584,7 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
desktop_directory_changed_callback (NULL);
}
fm_icon_view_filter_by_screen (FM_ICON_VIEW (desktop_icon_view), TRUE);
nautilus_icon_view_filter_by_screen (NAUTILUS_ICON_VIEW (desktop_icon_view), TRUE);
icon_container = get_icon_container (desktop_icon_view);
nautilus_icon_container_set_use_drop_shadows (icon_container, TRUE);
fm_icon_container_set_sort_desktop (FM_ICON_CONTAINER (icon_container), TRUE);
......@@ -815,7 +815,7 @@ real_merge_menus (NautilusView *view)
}
static gboolean
real_supports_auto_layout (FMIconView *view)
real_supports_auto_layout (NautilusIconView *view)
{
/* Can't use auto-layout on the desktop, because doing so
* would cause all sorts of complications involving the
......@@ -825,19 +825,19 @@ real_supports_auto_layout (FMIconView *view)
}
static gboolean
real_supports_scaling (FMIconView *view)
real_supports_scaling (NautilusIconView *view)
{
return TRUE;
}
static gboolean
real_supports_keep_aligned (FMIconView *view)
real_supports_keep_aligned (NautilusIconView *view)
{
return TRUE;
}
static gboolean
real_supports_labels_beside_icons (FMIconView *view)
real_supports_labels_beside_icons (NautilusIconView *view)
{
return FALSE;
}
......@@ -854,7 +854,7 @@ real_supports_zooming (NautilusView *view)
static NautilusView *
fm_desktop_icon_view_create (NautilusWindowSlot *slot)
{
FMIconView *view;
NautilusIconView *view;
view = g_object_new (FM_TYPE_DESKTOP_ICON_VIEW,
"window-slot", slot,
......
......@@ -43,12 +43,12 @@
typedef struct FMDesktopIconViewDetails FMDesktopIconViewDetails;
typedef struct {
FMIconView parent;
NautilusIconView parent;
FMDesktopIconViewDetails *details;
} FMDesktopIconView;
typedef struct {
FMIconViewClass parent_class;
NautilusIconViewClass parent_class;
} FMDesktopIconViewClass;
/* GObject support */
......
......@@ -41,7 +41,7 @@ G_DEFINE_TYPE (FMIconContainer, fm_icon_container, NAUTILUS_TYPE_ICON_CONTAINER)
static GQuark attribute_none_q;
static FMIconView *
static NautilusIconView *
get_icon_view (NautilusIconContainer *container)
{
/* Type unsafe comparison for performance */
......@@ -58,7 +58,7 @@ fm_icon_container_get_icon_images (NautilusIconContainer *container,
gboolean *embedded_text_needs_loading,
gboolean *has_window_open)
{
FMIconView *icon_view;
NautilusIconView *icon_view;
char **emblems_to_ignore;
NautilusFile *file;
gboolean use_embedding;
......@@ -84,10 +84,10 @@ fm_icon_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 (!fm_icon_view_is_compact (icon_view) ||
if (!nautilus_icon_view_is_compact (icon_view) ||
nautilus_icon_container_get_zoom_level (container) > NAUTILUS_ZOOM_LEVEL_STANDARD) {
flags |= NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS;
if (fm_icon_view_is_compact (icon_view)) {
if (nautilus_icon_view_is_compact (icon_view)) {
flags |= NAUTILUS_FILE_ICON_FLAGS_FORCE_THUMBNAIL_SIZE;
}
}
......@@ -266,12 +266,12 @@ quarkv_length (GQuark *attributes)
}
/**
* fm_icon_view_get_icon_text_attribute_names:
* nautilus_icon_view_get_icon_text_attribute_names:
*
* Get a list representing which text attributes should be displayed
* beneath an icon. The result is dependent on zoom level and possibly
* user configuration. Don't free the result.
* @view: FMIconView to query.
* @view: NautilusIconView to query.
*
**/
static GQuark *
......@@ -315,7 +315,7 @@ fm_icon_container_get_icon_text (NautilusIconContainer *container,
GQuark *attributes;
char *text_array[4];
int i, j, num_attributes;
FMIconView *icon_view;
NautilusIconView *icon_view;
NautilusFile *file;
gboolean use_additional;
......@@ -341,7 +341,7 @@ fm_icon_container_get_icon_text (NautilusIconContainer *container,
return;
}
if (fm_icon_view_is_compact (icon_view)) {
if (nautilus_icon_view_is_compact (icon_view)) {
*additional_text = NULL;
return;
}
......@@ -494,7 +494,7 @@ fm_icon_container_compare_icons (NautilusIconContainer *container,
NautilusIconData *icon_a,
NautilusIconData *icon_b)
{
FMIconView *icon_view;
NautilusIconView *icon_view;
icon_view = get_icon_view (container);
g_return_val_if_fail (icon_view != NULL, 0);
......@@ -505,7 +505,7 @@ fm_icon_container_compare_icons (NautilusIconContainer *container,
}
/* Type unsafe comparisons for performance */
return fm_icon_view_compare_files (icon_view,
return nautilus_icon_view_compare_files (icon_view,
(NautilusFile *)icon_a,
(NautilusFile *)icon_b);
}
......@@ -525,7 +525,7 @@ fm_icon_container_compare_icons_by_name (NautilusIconContainer *container,
static void
fm_icon_container_freeze_updates (NautilusIconContainer *container)
{
FMIconView *icon_view;
NautilusIconView *icon_view;
icon_view = get_icon_view (container);
g_return_if_fail (icon_view != NULL);
nautilus_view_freeze_updates (NAUTILUS_VIEW (icon_view));
......@@ -534,7 +534,7 @@ fm_icon_container_freeze_updates (NautilusIconContainer *container)
static void
fm_icon_container_unfreeze_updates (NautilusIconContainer *container)
{
FMIconView *icon_view;
NautilusIconView *icon_view;
icon_view = get_icon_view (container);
g_return_if_fail (icon_view != NULL);
nautilus_view_unfreeze_updates (NAUTILUS_VIEW (icon_view));
......@@ -582,11 +582,11 @@ fm_icon_container_init (FMIconContainer *icon_container)
}
NautilusIconContainer *
fm_icon_container_construct (FMIconContainer *icon_container, FMIconView *view)
fm_icon_container_construct (FMIconContainer *icon_container, NautilusIconView *view)
{
AtkObject *atk_obj;
g_return_val_if_fail (FM_IS_ICON_VIEW (view), NULL);
g_return_val_if_fail (NAUTILUS_IS_ICON_VIEW (view), NULL);
icon_container->view = view;
atk_obj = gtk_widget_get_accessible (GTK_WIDGET (icon_container));
......@@ -596,7 +596,7 @@ fm_icon_container_construct (FMIconContainer *icon_container, FMIconView *view)
}
NautilusIconContainer *
fm_icon_container_new (FMIconView *view)
fm_icon_container_new (NautilusIconView *view)
{
return fm_icon_container_construct
(g_object_new (FM_TYPE_ICON_CONTAINER, NULL),
......
......@@ -49,7 +49,7 @@ typedef struct FMIconContainerDetails FMIconContainerDetails;
struct FMIconContainer {
NautilusIconContainer parent;
FMIconView *view;
NautilusIconView *view;
gboolean sort_for_desktop;
};
......@@ -59,8 +59,8 @@ struct FMIconContainerClass {
GType fm_icon_container_get_type (void);
NautilusIconContainer *fm_icon_container_construct (FMIconContainer *icon_container,
FMIconView *view);
NautilusIconContainer *fm_icon_container_new (FMIconView *view);
NautilusIconView *view);
NautilusIconContainer *fm_icon_container_new (NautilusIconView *view);
void fm_icon_container_set_sort_desktop (FMIconContainer *container,
gboolean desktop);
......
This diff is collapsed.
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* fm-icon-view.h - interface for icon view of directory.
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: John Sullivan <sullivan@eazel.com>
*/
#ifndef FM_ICON_VIEW_H
#define FM_ICON_VIEW_H
/* nautilus-icon-view.h - interface for icon view of directory.
*
* 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: John Sullivan <sullivan@eazel.com>
*
*/
#ifndef NAUTILUS_ICON_VIEW_H
#define NAUTILUS_ICON_VIEW_H
#include "nautilus-view.h"
typedef struct FMIconView FMIconView;
typedef struct FMIconViewClass FMIconViewClass;
#define FM_TYPE_ICON_VIEW fm_icon_view_get_type()
#define FM_ICON_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), FM_TYPE_ICON_VIEW, FMIconView))
#define FM_ICON_VIEW_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), FM_TYPE_ICON_VIEW, FMIconViewClass))
#define FM_IS_ICON_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), FM_TYPE_ICON_VIEW))
#define FM_IS_ICON_VIEW_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), FM_TYPE_ICON_VIEW))
#define FM_ICON_VIEW_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_ICON_VIEW, FMIconViewClass))
#define FM_ICON_VIEW_ID "OAFIID:Nautilus_File_Manager_Icon_View"
typedef struct NautilusIconView NautilusIconView;
typedef struct NautilusIconViewClass NautilusIconViewClass;
#define NAUTILUS_TYPE_ICON_VIEW nautilus_icon_view_get_type()
#define NAUTILUS_ICON_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_TYPE_ICON_VIEW, NautilusIconView))
#define NAUTILUS_ICON_VIEW_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_ICON_VIEW, NautilusIconViewClass))
#define NAUTILUS_IS_ICON_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), NAUTILUS_TYPE_ICON_VIEW))
#define NAUTILUS_IS_ICON_VIEW_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_ICON_VIEW))
#define NAUTILUS_ICON_VIEW_GET_CLASS(obj) \
(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 FMIconViewDetails FMIconViewDetails;
typedef struct NautilusIconViewDetails NautilusIconViewDetails;
struct FMIconView {
struct NautilusIconView {
NautilusView parent;
FMIconViewDetails *details;
NautilusIconViewDetails *details;
};
struct FMIconViewClass {
struct NautilusIconViewClass {
NautilusViewClass parent_class;
/* Methods that can be overriden for settings you don't want to come from metadata.
......@@ -60,74 +61,75 @@ struct FMIconViewClass {
/* Note: get_directory_sort_by must return a string that can/will be g_freed.
*/
char * (* get_directory_sort_by) (FMIconView *icon_view,
char * (* get_directory_sort_by) (NautilusIconView *icon_view,
NautilusFile *file);
void (* set_directory_sort_by) (FMIconView *icon_view,
void (* set_directory_sort_by) (NautilusIconView *icon_view,
NautilusFile *file,
const char* sort_by);
gboolean (* get_directory_sort_reversed) (FMIconView *icon_view,
gboolean (* get_directory_sort_reversed) (NautilusIconView *icon_view,
NautilusFile *file);
void (* set_directory_sort_reversed) (FMIconView *icon_view,
void (* set_directory_sort_reversed) (NautilusIconView *icon_view,
NautilusFile *file,
gboolean sort_reversed);
gboolean (* get_directory_auto_layout) (FMIconView *icon_view,
gboolean (* get_directory_auto_layout) (NautilusIconView *icon_view,
NautilusFile *file);
void (* set_directory_auto_layout) (FMIconView *icon_view,
void (* set_directory_auto_layout) (NautilusIconView *icon_view,
NautilusFile *file,
gboolean auto_layout);
gboolean (* get_directory_tighter_layout) (FMIconView *icon_view,
gboolean (* get_directory_tighter_layout) (NautilusIconView *icon_view,
NautilusFile *file);
void (* set_directory_tighter_layout) (FMIconView *icon_view,
void (* set_directory_tighter_layout) (NautilusIconView *icon_view,
NautilusFile *file,
gboolean tighter_layout);
/* Override "clean_up" if your subclass has its own notion of where icons should be positioned */
void (* clean_up) (FMIconView *icon_view);
void (* clean_up) (NautilusIconView *icon_view);
/* supports_auto_layout is a function pointer that subclasses may
* override to control whether or not the automatic layout options
* should be enabled. The default implementation returns TRUE.
*/
gboolean (* supports_auto_layout) (FMIconView *view);
gboolean (* supports_auto_layout) (NautilusIconView *view);
/* supports_manual_layout is a function pointer that subclasses may
* override to control whether or not the manual layout options
* should be enabled. The default implementation returns TRUE iff
* not in compact mode.
*/
gboolean (* supports_manual_layout) (FMIconView *view);
gboolean (* supports_manual_layout) (NautilusIconView *view);
/* supports_scaling is a function pointer that subclasses may
* override to control whether or not the manual layout supports
* scaling. The default implementation returns FALSE
*/
gboolean (* supports_scaling) (FMIconView *view);
gboolean (* supports_scaling) (NautilusIconView *view);
/* supports_auto_layout is a function pointer that subclasses may
* override to control whether snap-to-grid mode
* should be enabled. The default implementation returns FALSE.
*/
gboolean (* supports_keep_aligned) (FMIconView *view);
gboolean (* supports_keep_aligned) (NautilusIconView *view);
/* supports_auto_layout is a function pointer that subclasses may
* override to control whether snap-to-grid mode
* should be enabled. The default implementation returns FALSE.
*/
gboolean (* supports_labels_beside_icons) (FMIconView *view);
gboolean (* supports_labels_beside_icons) (NautilusIconView *view);
};
/* GObject support */
GType fm_icon_view_get_type (void);
int fm_icon_view_compare_files (FMIconView *icon_view,
NautilusFile *a,
NautilusFile *b);
void fm_icon_view_filter_by_screen (FMIconView *icon_view, gboolean filter);
gboolean fm_icon_view_is_compact (FMIconView *icon_view);
void fm_icon_view_register (void);
void fm_compact_view_register (void);
#endif /* FM_ICON_VIEW_H */
GType nautilus_icon_view_get_type (void);
int nautilus_icon_view_compare_files (NautilusIconView *icon_view,
NautilusFile *a,
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);
#endif /* NAUTILUS_ICON_VIEW_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment