views: add flow box based view

After all the rework on the window slots, views, and splitting
the desktop, we are finally able to add a flow box based view for
Nautilus.

The GtkFlowBox is still not performance enough to be added as the
default view, not even as an alternative in the user preferences.
However, since the work on this is one of the biggest for Nautilus and
gtk+, the decision was to merge a prototype in order to open the
development, testing and iteration of the code in order to make it
good enough for, in a not so far away future, have it as the main view.

The work merged is not finished, and is an experiment and prototype in
more things than just the GtkFlowBox, we want to create a single shared
model with a complete MVC pattern between all the views. This will need
quite a few iterations to get it right, but once is done right, I hope
it's going to be good enough as an example to any application that wants
multiple types of views with the new widgets of gtk+.

This patch adds the GtkFlowBox view to be optionally used under a
gsetting called use-experimental-views, turned off by default.
parent 370b1ab7
......@@ -211,6 +211,11 @@
<summary>Whether to open the hovered folder after a timeout when drag and drop operation</summary>
<description>If this is set to true, when performing a drag and drop operation the hovered folder will open automatically after a timeout.</description>
</key>
<key type="b" name="use-experimental-views">
<default>false</default>
<summary>Enable new experimental views</summary>
<description>Whether to use new experimental views using latest gtk+ widgets to help giving feedback and shape the future of them.</description>
</key>
</schema>
<schema path="/org/gnome/nautilus/compression/" id="org.gnome.nautilus.compression" gettext-domain="nautilus">
......
......@@ -158,6 +158,8 @@ nautilus_no_main_sources = \
nautilus-canvas-view.h \
nautilus-canvas-view-container.c \
nautilus-canvas-view-container.h \
nautilus-container-max-width.c \
nautilus-container-max-width.h \
nautilus-dbus-manager.c \
nautilus-dbus-manager.h \
nautilus-desktop-item-properties.c \
......@@ -220,6 +222,16 @@ nautilus_no_main_sources = \
nautilus-trash-bar.h \
nautilus-view.c \
nautilus-view.h \
nautilus-view-icon-controller.c \
nautilus-view-icon-controller.h \
nautilus-view-icon-item-ui.c \
nautilus-view-icon-item-ui.h \
nautilus-view-icon-ui.c \
nautilus-view-icon-ui.h \
nautilus-view-item-model.c \
nautilus-view-item-model.h \
nautilus-view-model.c \
nautilus-view-model.h \
nautilus-window-slot.c \
nautilus-window-slot.h \
nautilus-window-slot-dnd.c \
......
......@@ -101,7 +101,7 @@ typedef struct
gboolean supports_scaling;
gboolean supports_keep_aligned;
/* Needed for async operations. Suposedly we would use cancellable and gtask,
/* FIXME: Needed for async operations. Suposedly we would use cancellable and gtask,
* sadly gtkclipboard doesn't support that.
* We follow this pattern for checking validity of the object in the views.
* Ideally we would connect to a weak reference and do a cancellable.
......@@ -447,12 +447,13 @@ nautilus_canvas_view_remove_file (NautilusFilesView *view,
}
static void
nautilus_canvas_view_add_file (NautilusFilesView *view,
NautilusFile *file,
NautilusDirectory *directory)
nautilus_canvas_view_add_files (NautilusFilesView *view,
GList *files,
NautilusDirectory *directory)
{
NautilusCanvasView *canvas_view;
NautilusCanvasContainer *canvas_container;
GList *l;
g_assert (directory == nautilus_files_view_get_model (view));
......@@ -465,10 +466,13 @@ nautilus_canvas_view_add_file (NautilusFilesView *view,
nautilus_canvas_container_reset_scroll_region (canvas_container);
}
if (nautilus_canvas_container_add (canvas_container,
NAUTILUS_CANVAS_ICON_DATA (file)))
for (l = files; l != NULL; l = l->next)
{
nautilus_file_ref (file);
if (nautilus_canvas_container_add (canvas_container,
NAUTILUS_CANVAS_ICON_DATA (l->data)))
{
nautilus_file_ref (NAUTILUS_FILE (l->data));
}
}
}
......@@ -2007,7 +2011,7 @@ nautilus_canvas_view_class_init (NautilusCanvasViewClass *klass)
klass->create_canvas_container = real_create_canvas_container;
nautilus_files_view_class->add_file = nautilus_canvas_view_add_file;
nautilus_files_view_class->add_files = nautilus_canvas_view_add_files;
nautilus_files_view_class->begin_loading = nautilus_canvas_view_begin_loading;
nautilus_files_view_class->bump_zoom_level = nautilus_canvas_view_bump_zoom_level;
nautilus_files_view_class->can_zoom_in = nautilus_canvas_view_can_zoom_in;
......
#include "nautilus-container-max-width.h"
struct _NautilusContainerMaxWidth
{
GtkBin parent_instance;
guint max_width;
};
G_DEFINE_TYPE (NautilusContainerMaxWidth, nautilus_container_max_width, GTK_TYPE_BIN)
enum
{
PROP_0,
PROP_MAX_WIDTH,
N_PROPS
};
void
nautilus_container_max_width_set_max_width (NautilusContainerMaxWidth *self,
guint max_width)
{
self->max_width = max_width;
gtk_widget_queue_allocate (GTK_WIDGET (self));
}
guint
nautilus_container_max_width_get_max_width (NautilusContainerMaxWidth *self)
{
return self->max_width;
}
NautilusContainerMaxWidth *
nautilus_container_max_width_new (void)
{
return g_object_new (NAUTILUS_TYPE_CONTAINER_MAX_WIDTH, NULL);
}
static void
nautilus_container_max_width_finalize (GObject *object)
{
G_OBJECT_CLASS (nautilus_container_max_width_parent_class)->finalize (object);
}
static void
nautilus_container_max_width_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
NautilusContainerMaxWidth *self = NAUTILUS_CONTAINER_MAX_WIDTH (object);
switch (prop_id)
{
case PROP_MAX_WIDTH:
{
g_value_set_int (value, self->max_width);
}
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
}
}
static void
nautilus_container_max_width_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
NautilusContainerMaxWidth *self = NAUTILUS_CONTAINER_MAX_WIDTH (object);
switch (prop_id)
{
case PROP_MAX_WIDTH:
{
nautilus_container_max_width_set_max_width (self, g_value_get_int (value));
}
break;
default:
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
break;
}
}
static void
get_preferred_width (GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
{
GtkWidget *child;
NautilusContainerMaxWidth *self;
GtkStyleContext *style_context;
GtkBorder padding;
self = NAUTILUS_CONTAINER_MAX_WIDTH (widget);
child = gtk_bin_get_child (GTK_BIN (self));
*natural_size = 0;
*minimum_size = 0;
gtk_widget_get_preferred_width (child, minimum_size, natural_size);
*minimum_size = self->max_width == -1 ? *minimum_size : 96;
*natural_size = self->max_width == -1 ? *natural_size :
MAX (*minimum_size, MIN (self->max_width, *natural_size));
style_context = gtk_widget_get_style_context (child);
gtk_style_context_get_padding (style_context,
gtk_widget_get_state_flags (child),
&padding);
*minimum_size += padding.left + padding.right;
*natural_size += padding.left + padding.right;
}
static void
get_preferred_height (GtkWidget *widget,
gint *minimum_size,
gint *natural_size)
{
GtkWidget *child;
NautilusContainerMaxWidth *self;
gint minimum_width = 0;
gint natural_width = 0;
GtkStyleContext *style_context;
GtkBorder padding;
self = NAUTILUS_CONTAINER_MAX_WIDTH (widget);
child = gtk_bin_get_child (GTK_BIN (self));
get_preferred_width (widget, &minimum_width, &natural_width);
natural_width = self->max_width == -1 ? natural_width : MIN (self->max_width, natural_width);
gtk_widget_get_preferred_height_for_width (child, natural_width, minimum_size, natural_size);
style_context = gtk_widget_get_style_context (child);
gtk_style_context_get_padding (style_context,
gtk_widget_get_state_flags (child),
&padding);
*minimum_size += padding.top + padding.bottom;
*natural_size += padding.top + padding.bottom;
}
static void
get_preferred_height_for_width (GtkWidget *widget,
gint width,
gint *minimum_size,
gint *natural_size)
{
get_preferred_height (widget, minimum_size, natural_size);
}
static void
size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GTK_WIDGET_CLASS (nautilus_container_max_width_parent_class)->size_allocate (widget, allocation);
}
static void
get_preferred_width_for_height (GtkWidget *widget,
gint height,
gint *minimum_size,
gint *natural_size)
{
get_preferred_width (widget, minimum_size, natural_size);
}
static void
constructed (GObject *obj)
{
NautilusContainerMaxWidth *self = NAUTILUS_CONTAINER_MAX_WIDTH (obj);
G_OBJECT_CLASS (nautilus_container_max_width_parent_class)->constructed (obj);
/* We want our parent to gives our preferred width */
gtk_widget_set_halign (GTK_WIDGET (self), GTK_ALIGN_CENTER);
self->max_width = -1;
}
static void
nautilus_container_max_width_class_init (NautilusContainerMaxWidthClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
object_class->finalize = nautilus_container_max_width_finalize;
object_class->get_property = nautilus_container_max_width_get_property;
object_class->set_property = nautilus_container_max_width_set_property;
object_class->constructed = constructed;
widget_class->get_preferred_width = get_preferred_width;
widget_class->get_preferred_width_for_height = get_preferred_width_for_height;
widget_class->get_preferred_height = get_preferred_height;
widget_class->get_preferred_height_for_width = get_preferred_height_for_width;
widget_class->size_allocate = size_allocate;
g_object_class_install_property (object_class,
PROP_MAX_WIDTH,
g_param_spec_int ("max-width",
"Max width",
"The max width of the container",
G_MININT,
G_MAXINT,
0,
G_PARAM_READWRITE));
}
static void
nautilus_container_max_width_init (NautilusContainerMaxWidth *self)
{
}
#ifndef NAUTILUS_CONTAINER_MAX_WIDTH_H
#define NAUTILUS_CONTAINER_MAX_WIDTH_H
#include <glib.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define NAUTILUS_TYPE_CONTAINER_MAX_WIDTH (nautilus_container_max_width_get_type())
G_DECLARE_FINAL_TYPE (NautilusContainerMaxWidth, nautilus_container_max_width, NAUTILUS, CONTAINER_MAX_WIDTH, GtkBin)
NautilusContainerMaxWidth *nautilus_container_max_width_new (void);
void nautilus_container_max_width_set_max_width (NautilusContainerMaxWidth *self,
guint max_width);
guint nautilus_container_max_width_get_max_width (NautilusContainerMaxWidth *self);
G_END_DECLS
#endif /* NAUTILUS_CONTAINER_MAX_WIDTH_H */
......@@ -5361,13 +5361,20 @@ nautilus_file_get_thumbnail_icon (NautilusFile *file,
/* We don't want frames around small icons */
if (!gdk_pixbuf_get_has_alpha (file->details->thumbnail) || s >= 128 * scale)
{
if (nautilus_is_video_file (file))
{
nautilus_ui_frame_video (&pixbuf);
}
else
gboolean use_experimental_views;
use_experimental_views = g_settings_get_boolean (nautilus_preferences,
NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS);
if (!use_experimental_views)
{
nautilus_ui_frame_image (&pixbuf);
if (nautilus_is_video_file (file))
{
nautilus_ui_frame_video (&pixbuf);
}
else
{
nautilus_ui_frame_image (&pixbuf);
}
}
}
......
......@@ -35,6 +35,7 @@
#include "nautilus-error-reporting.h"
#include "nautilus-file-undo-manager.h"
#include "nautilus-floating-bar.h"
#include "nautilus-view-icon-controller.h"
#include "nautilus-list-view.h"
#include "nautilus-canvas-view.h"
#include "nautilus-mime-actions.h"
......@@ -130,10 +131,9 @@
#define MIN_COMMON_FILENAME_PREFIX_LENGTH 4
enum
{
ADD_FILE,
ADD_FILES,
BEGIN_FILE_CHANGES,
BEGIN_LOADING,
CLEAR,
......@@ -3632,35 +3632,39 @@ debuting_files_data_free (DebutingFilesData *data)
* it selects and reveals them all.
*/
static void
debuting_files_add_file_callback (NautilusFilesView *view,
NautilusFile *new_file,
NautilusDirectory *directory,
DebutingFilesData *data)
debuting_files_add_files_callback (NautilusFilesView *view,
GList *new_files,
NautilusDirectory *directory,
DebutingFilesData *data)
{
GFile *location;
GList *l;
nautilus_profile_start (NULL);
location = nautilus_file_get_location (new_file);
if (g_hash_table_remove (data->debuting_files, location))
for (l = new_files; l != NULL; l = l->next)
{
nautilus_file_ref (new_file);
data->added_files = g_list_prepend (data->added_files, new_file);
location = nautilus_file_get_location (NAUTILUS_FILE (l->data));
if (g_hash_table_size (data->debuting_files) == 0)
if (g_hash_table_remove (data->debuting_files, location))
{
nautilus_files_view_call_set_selection (view, data->added_files);
nautilus_files_view_reveal_selection (view);
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (debuting_files_add_file_callback),
data);
nautilus_file_ref (NAUTILUS_FILE (l->data));
data->added_files = g_list_prepend (data->added_files, NAUTILUS_FILE (l->data));
}
g_object_unref (location);
}
nautilus_profile_end (NULL);
if (g_hash_table_size (data->debuting_files) == 0)
{
nautilus_files_view_call_set_selection (view, data->added_files);
nautilus_files_view_reveal_selection (view);
g_signal_handlers_disconnect_by_func (view,
G_CALLBACK (debuting_files_add_files_callback),
data);
}
g_object_unref (location);
nautilus_profile_end (NULL);
}
typedef struct
......@@ -3685,13 +3689,18 @@ copy_move_done_data_free (CopyMoveDoneData *data)
}
static void
pre_copy_move_add_file_callback (NautilusFilesView *view,
NautilusFile *new_file,
pre_copy_move_add_files_callback (NautilusFilesView *view,
GList *new_files,
NautilusDirectory *directory,
CopyMoveDoneData *data)
{
nautilus_file_ref (new_file);
data->added_files = g_list_prepend (data->added_files, new_file);
GList *l;
for (l = new_files; l != NULL; l = l->next)
{
nautilus_file_ref (NAUTILUS_FILE (l->data));
data->added_files = g_list_prepend (data->added_files, l->data);
}
}
/* This needs to be called prior to nautilus_file_operations_copy_move.
......@@ -3711,11 +3720,11 @@ pre_copy_move (NautilusFilesView *directory_view)
(gpointer *) &copy_move_done_data->directory_view);
/* We need to run after the default handler adds the folder we want to
* operate on. The ADD_FILE signal is registered as G_SIGNAL_RUN_LAST, so we
* operate on. The ADD_FILES signal is registered as G_SIGNAL_RUN_LAST, so we
* must use connect_after.
*/
g_signal_connect (directory_view, "add-file",
G_CALLBACK (pre_copy_move_add_file_callback), copy_move_done_data);
g_signal_connect (directory_view, "add-files",
G_CALLBACK (pre_copy_move_add_files_callback), copy_move_done_data);
return copy_move_done_data;
}
......@@ -3791,17 +3800,17 @@ copy_move_done_callback (GHashTable *debuting_files,
nautilus_file_list_free (copy_move_done_data->added_files);
copy_move_done_data->added_files = failed_files;
/* We're passed the same data used by pre_copy_move_add_file_callback, so disconnecting
/* We're passed the same data used by pre_copy_move_add_files_callback, so disconnecting
* it will free data. We've already siphoned off the added_files we need, and stashed the
* directory_view pointer.
*/
g_signal_handlers_disconnect_by_func (directory_view,
G_CALLBACK (pre_copy_move_add_file_callback),
G_CALLBACK (pre_copy_move_add_files_callback),
data);
/* Any items in the debuting_files hash table that have
* "FALSE" as their value aren't really being copied
* or moved, so we can't wait for an add_file signal
* or moved, so we can't wait for an add_files signal
* to come in for those.
*/
g_hash_table_foreach_remove (debuting_files,
......@@ -3822,12 +3831,12 @@ copy_move_done_callback (GHashTable *debuting_files,
else
{
/* We need to run after the default handler adds the folder we want to
* operate on. The ADD_FILE signal is registered as G_SIGNAL_RUN_LAST, so we
* operate on. The ADD_FILES signal is registered as G_SIGNAL_RUN_LAST, so we
* must use connect_after.
*/
g_signal_connect_data (directory_view,
"add-file",
G_CALLBACK (debuting_files_add_file_callback),
"add-files",
G_CALLBACK (debuting_files_add_files_callback),
debuting_files_data,
(GClosureNotify) debuting_files_data_free,
G_CONNECT_AFTER);
......@@ -4055,6 +4064,7 @@ process_old_files (NautilusFilesView *view)
GList *files_added, *files_changed, *node;
FileAndDirectory *pending;
GList *selection, *files;
g_autoptr (GList) pending_additions = NULL;
priv = nautilus_files_view_get_instance_private (view);
files_added = priv->old_added_files;
......@@ -4070,8 +4080,7 @@ process_old_files (NautilusFilesView *view)
for (node = files_added; node != NULL; node = node->next)
{
pending = node->data;
g_signal_emit (view,
signals[ADD_FILE], 0, pending->file, pending->directory);
pending_additions = g_list_prepend (pending_additions, pending->file);
/* Acknowledge the files that were pending to be revealed */
if (g_hash_table_contains (priv->pending_reveal, pending->file))
{
......@@ -4081,6 +4090,12 @@ process_old_files (NautilusFilesView *view)
}
}
if (files_added != NULL)
{
g_signal_emit (view,
signals[ADD_FILES], 0, pending_additions, pending->directory);
}
for (node = files_changed; node != NULL; node = node->next)
{
gboolean should_show_file;
......@@ -8013,21 +8028,21 @@ nautilus_files_view_reset_view_menu (NautilusFilesView *view)
{
NautilusFilesViewPrivate *priv;
GActionGroup *view_action_group;
GVariant *variant;
GVariantIter iter;
gboolean show_sort_trash, show_sort_access, show_sort_modification, sort_available;
const gchar *hint;
gboolean sort_available;
g_autofree gchar *zoom_level_percent = NULL;
NautilusFile *file;
view_action_group = nautilus_files_view_get_action_group (view);
priv = nautilus_files_view_get_instance_private (view);
file = nautilus_files_view_get_directory_as_file (NAUTILUS_FILES_VIEW (view));
gtk_widget_set_visible (priv->visible_columns,
g_action_group_has_action (view_action_group, "visible-columns"));
sort_available = g_action_group_get_action_enabled (view_action_group, "sort");
show_sort_trash = show_sort_modification = show_sort_access = FALSE;
gtk_widget_set_visible (priv->sort_menu, sort_available);
gtk_widget_set_visible (priv->sort_trash_time,
nautilus_file_is_in_trash (file));
/* We want to make insensitive available actions but that are not current
* available due to the directory
......@@ -8037,24 +8052,6 @@ nautilus_files_view_reset_view_menu (NautilusFilesView *view)
gtk_widget_set_sensitive (priv->zoom_controls_box,
!nautilus_files_view_is_empty (view));
if (sort_available)
{
variant = g_action_group_get_action_state_hint (view_action_group, "sort");
g_variant_iter_init (&iter, variant);
while (g_variant_iter_next (&iter, "&s", &hint))
{
if (g_strcmp0 (hint, "trash-time") == 0)
{
show_sort_trash = TRUE;
}
}
g_variant_unref (variant);
}
gtk_widget_set_visible (priv->sort_trash_time, show_sort_trash);
zoom_level_percent = g_strdup_printf ("%.0f%%", nautilus_files_view_get_zoom_level_percentage (view) * 100.0);
gtk_label_set_label (GTK_LABEL (priv->zoom_level_label), zoom_level_percent);
}
......@@ -9331,14 +9328,14 @@ nautilus_files_view_class_init (NautilusFilesViewClass *klass)
widget_class->grab_focus = nautilus_files_view_grab_focus;
signals[ADD_FILE] =
g_signal_new ("add-file",
signals[ADD_FILES] =
g_signal_new ("add-files",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (NautilusFilesViewClass, add_file),
G_STRUCT_OFFSET (NautilusFilesViewClass, add_files),
NULL, NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE, 2, NAUTILUS_TYPE_FILE, NAUTILUS_TYPE_DIRECTORY);
G_TYPE_NONE, 2, G_TYPE_POINTER, NAUTILUS_TYPE_DIRECTORY);
signals[BEGIN_FILE_CHANGES] =
g_signal_new ("begin-file-changes",
G_TYPE_FROM_CLASS (klass),
......@@ -9693,12 +9690,22 @@ nautilus_files_view_new (guint id,
NautilusWindowSlot *slot)
{
NautilusFilesView *view = NULL;
gboolean use_experimental_views;
use_experimental_views = g_settings_get_boolean (nautilus_preferences,
NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS);
switch (id)
{
case NAUTILUS_VIEW_GRID_ID:
{
view = nautilus_canvas_view_new (slot);
if (use_experimental_views)
{
view = NAUTILUS_FILES_VIEW (nautilus_view_icon_controller_new (slot));
}
else
{
view = nautilus_canvas_view_new (slot);
}
}
break;
......
......@@ -57,12 +57,12 @@ struct _NautilusFilesViewClass {
*/
void (* begin_file_changes) (NautilusFilesView *view);
/* The 'add_file' signal is emitted to add one file to the view.
/* The 'add_files' signal is emitted to add a set of files to the view.
* It must be replaced by each subclass.
*/
void (* add_file) (NautilusFilesView *view,
NautilusFile *file,
NautilusDirectory *directory);
void (* add_files) (NautilusFilesView *view,
GList *files,
NautilusDirectory *directory);
void (* remove_file) (NautilusFilesView *view,
NautilusFile *file,
NautilusDirectory *directory);
......@@ -324,8 +324,6 @@ char * nautilus_files_view_get_title (NautilusFilesV
gboolean nautilus_files_view_supports_zooming (NautilusFilesView *view);
void nautilus_files_view_bump_zoom_level (NautilusFilesView *view,
int zoom_increment);
void nautilus_files_view_zoom_to_level (NautilusFilesView *view,
gint level);
gboolean nautilus_files_view_can_zoom_in (NautilusFilesView *view);
gboolean nautilus_files_view_can_zoom_out (NautilusFilesView *view);
void nautilus_files_view_update_menus (NautilusFilesView *view);
......
......@@ -93,6 +93,9 @@ typedef enum
/* Icon View */
#define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
/* Experimental views */
#define NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS "use-experimental-views"
/* Which text attributes appear beneath icon names */
#define NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS "captions"
......
......@@ -2062,14 +2062,18 @@ create_and_set_up_tree_view (NautilusListView *view)
}
static void
nautilus_list_view_add_file (NautilusFilesView *view,
NautilusFile *file,
NautilusDirectory *directory)
nautilus_list_view_add_files (NautilusFilesView *view,
GList *files,
NautilusDirectory *directory)
{
NautilusListModel *model;
GList *l;
model = NAUTILUS_LIST_VIEW (view)->details->model;
nautilus_list_model_add_file (model, file, directory);
for (l = files; l != NULL; l = l->next)
{
nautilus_list_model_add_file (model, NAUTILUS_FILE (l->data), directory);
}
}
static char **
......@@ -3496,7 +3500,7 @@ nautilus_list_view_class_init (NautilusListViewClass *class)
G_OBJECT_CLASS (class)->dispose = nautilus_list_view_dispose;
G_OBJECT_CLASS (class)->finalize = nautilus_list_view_finalize;
nautilus_files_view_class->add_file = nautilus_list_view_add_file;
nautilus_files_view_class->add_files = nautilus_list_view_add_files;
nautilus_files_view_class->begin_loading = nautilus_list_view_begin_loading;
nautilus_files_view_class->end_loading = nautilus_list_view_end_loading;
nautilus_files_view_class->bump_zoom_level = nautilus_list_view_bump_zoom_level;
......
This diff is collapsed.
#ifndef NAUTILUS_VIEW_ICON_CONTROLLER_H
#define NAUTILUS_VIEW_ICON_CONTROLLER_H
#include <glib.h>
#include <gtk/gtk.h>
#include "nautilus-files-view.h"
#include "nautilus-window-slot.h"
#include "nautilus-view-model.h"
G_BEGIN_DECLS
#define NAUTILUS_TYPE_VIEW_ICON_CONTROLLER (nautilus_view_icon_controller_get_type())
G_DECLARE_FINAL_TYPE (NautilusViewIconController, nautilus_view_icon_controller, NAUTILUS, VIEW_ICON_CONTROLLER, NautilusFilesView)
NautilusViewIconController *nautilus_view_icon_controller_new (NautilusWindowSlot *slot);
NautilusViewModel * nautilus_view_icon_controller_get_model (NautilusViewIconController *self);
G_END_DECLS
#endif /* NAUTILUS_VIEW_ICON_CONTROLLER_H */