Commit 41c02775 authored by Ramiro Estrugo's avatar Ramiro Estrugo
Browse files

Hook up click policy preference. Bug 374.

parent 1e1b709a
2000-04-18 Ramiro Estrugo <ramiro@eazel.com>
Hook up click policy preference. Bug 374.
* libnautilus-extensions/nautilus-global-preferences.h,
libnautilus-extensions/nautilus-global-preferences.c:
Rename CLICK_ACTIVATION_TYPE to CLICK_POLICY.
* libnautilus-extensions/nautilus-icon-container.c:
(click_policy_changed_callback): New preferences callback to keep
track of click policy changes.
(destroy): Unregister click_policy_changed callback on destroy.
(nautilus_icon_container_initialize): Initialize the
single_click_mode from preferences and register callback to keep
track of changes in click policy.
Also anal gtk style formatting of the private prototypes and
sophisticated alphabetization of libnautilus-extensions headers.
* libnautilus-extensions/nautilus-list.c:
(click_policy_changed_callback): New preferences callback to keep
track of click policy changes.
(nautilus_list_initialize): Initialize the single_click_mode from
preferences and register callback to keep track of changes in
click policy.
(nautilus_list_destroy): Unregister click_policy_changed callback
on destroy.
Also anal gtk style formatting of the private prototypes and
sophisticated alphabetization of libnautilus-extensions headers.
2000-04-18 Ramiro Estrugo <ramiro@eazel.com>
* nautilus-widgets/nautilus-preferences.c,
......
......@@ -169,15 +169,15 @@ global_preferences_create_dialog (void)
* Clicking pane
*/
icon_view_pane = nautilus_preferences_box_add_pane (preference_box,
"Icon View",
"Icon View something");
"Click Policy",
"Click Policy something");
nautilus_preferences_pane_add_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane), "Number of clicks");
nautilus_preferences_pane_add_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane), "Click Policy");
nautilus_preferences_pane_add_item_to_nth_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane),
0,
preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_PREFERENCE_ITEM_ENUM);
return prefs_dialog;
......@@ -270,22 +270,22 @@ global_preferences_register_for_ui (NautilusPreferences *preferences)
/* Click activation type */
nautilus_preferences_set_info (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
"Click activation type",
NAUTILUS_PREFERENCES_CLICK_POLICY,
"Click policy",
NAUTILUS_PREFERENCE_ENUM,
(gconstpointer) NAUTILUS_CLICK_ACTIVATION_SINGLE);
(gconstpointer) NAUTILUS_CLICK_POLICY_SINGLE);
nautilus_preferences_enum_add_entry (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
"single",
"Single Click",
NAUTILUS_CLICK_ACTIVATION_SINGLE);
NAUTILUS_CLICK_POLICY_SINGLE);
nautilus_preferences_enum_add_entry (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
"double",
"Double Click",
NAUTILUS_CLICK_ACTIVATION_DOUBLE);
NAUTILUS_CLICK_POLICY_DOUBLE);
/* User level */
nautilus_preferences_set_info (preferences,
......
......@@ -54,12 +54,12 @@ BEGIN_GNOME_DECLS
#define NAUTILUS_PREFERENCES_ICON_THEME "/nautilus/preferences/icon_theme"
/* Single/Double click preference */
#define NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE "/nautilus/preferences/click_activation_type"
#define NAUTILUS_PREFERENCES_CLICK_POLICY "/nautilus/preferences/click_policy"
enum
{
NAUTILUS_CLICK_ACTIVATION_SINGLE,
NAUTILUS_CLICK_ACTIVATION_DOUBLE
NAUTILUS_CLICK_POLICY_SINGLE,
NAUTILUS_CLICK_POLICY_DOUBLE
};
void nautilus_global_preferences_startup (void);
......
......@@ -23,6 +23,7 @@
*/
#include <config.h>
#include "nautilus-icon-container.h"
#include <math.h>
......@@ -34,10 +35,11 @@
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include "nautilus-glib-extensions.h"
#include "nautilus-gdk-pixbuf-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-global-preferences.h"
#include "nautilus-gnome-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-icon-text-item.h"
#include "nautilus-lib-self-check-functions.h"
......@@ -72,28 +74,31 @@
*/
#define MAXIMUM_INITIAL_ICON_SIZE 2
static void activate_selected_items (NautilusIconContainer *container);
static void nautilus_icon_container_initialize_class (NautilusIconContainerClass *class);
static void nautilus_icon_container_initialize (NautilusIconContainer *container);
static void compute_stretch (StretchState *start,
StretchState *current);
static NautilusIcon *get_first_selected_icon (NautilusIconContainer *container);
static NautilusIcon *get_nth_selected_icon (NautilusIconContainer *container,
int index);
static void activate_selected_items (NautilusIconContainer *container);
static void nautilus_icon_container_initialize_class (NautilusIconContainerClass *class);
static void nautilus_icon_container_initialize (NautilusIconContainer *container);
static void compute_stretch (StretchState *start,
StretchState *current);
static NautilusIcon *get_first_selected_icon (NautilusIconContainer *container);
static NautilusIcon *get_nth_selected_icon (NautilusIconContainer *container,
int index);
static gboolean has_multiple_selection (NautilusIconContainer *container);
static void icon_destroy (NautilusIconContainer *container,
NautilusIcon *icon);
static guint icon_get_actual_size (NautilusIcon *icon);
static void end_renaming_mode (NautilusIconContainer *container,
gboolean commit);
static void hide_rename_widget (NautilusIconContainer *container,
NautilusIcon *icon);
static void click_policy_changed_callback (NautilusPreferences *preferences,
const char *name,
gpointer user_data);
#if 0
static gboolean has_selection (NautilusIconContainer *container);
static gboolean has_selection (NautilusIconContainer *container);
static void update_rename_widget_text (NautilusIconContainer *container,
NautilusIcon *icon,
char *new_text);
#endif
static gboolean has_multiple_selection (NautilusIconContainer *container);
static void icon_destroy (NautilusIconContainer *container,
NautilusIcon *icon);
static guint icon_get_actual_size (NautilusIcon *icon);
static void end_renaming_mode (NautilusIconContainer *container, gboolean commit);
#if 0
static void update_rename_widget_text (NautilusIconContainer *container,
NautilusIcon *icon, char *new_text);
#endif
static void hide_rename_widget (NautilusIconContainer *container, NautilusIcon *icon);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusIconContainer, nautilus_icon_container, GNOME_TYPE_CANVAS)
......@@ -1370,6 +1375,11 @@ destroy (GtkObject *object)
if (container->details->label_font[i] != NULL)
gdk_font_unref (container->details->label_font[i]);
}
nautilus_preferences_remove_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
click_policy_changed_callback,
container);
g_free (container->details);
......@@ -2006,9 +2016,6 @@ nautilus_icon_container_initialize (NautilusIconContainer *container)
details->label_font[NAUTILUS_ZOOM_LEVEL_LARGER] = load_font ("-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*");
details->label_font[NAUTILUS_ZOOM_LEVEL_LARGEST] = load_font ("-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*");
/* FIXME: Read this from preferences. */
details->single_click_mode = TRUE;
container->details = details;
/* Set up DnD. */
......@@ -2025,6 +2032,18 @@ nautilus_icon_container_initialize (NautilusIconContainer *container)
container->details->rename_widget = NULL;
container->details->original_text = NULL;
/* Initialize the single click mode from preferences */
details->single_click_mode =
(nautilus_preferences_get_enum (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_CLICK_POLICY_SINGLE) == NAUTILUS_CLICK_POLICY_SINGLE);
/* Keep track of changes in clicking policy */
nautilus_preferences_add_enum_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
click_policy_changed_callback,
container);
}
......@@ -3090,6 +3109,26 @@ hide_rename_widget (NautilusIconContainer *container, NautilusIcon *icon)
nautilus_icon_canvas_item_set_renaming (icon->item, container->details->renaming);
}
static void
click_policy_changed_callback (NautilusPreferences *preferences,
const char *name,
gpointer user_data)
{
NautilusIconContainer *container;
g_assert (NAUTILUS_IS_PREFERENCES (preferences));
g_assert (name != NULL);
g_assert (strcmp (name, NAUTILUS_PREFERENCES_CLICK_POLICY) == 0);
g_assert (NAUTILUS_IS_ICON_CONTAINER (user_data));
container = NAUTILUS_ICON_CONTAINER (user_data);
container->details->single_click_mode =
(nautilus_preferences_get_enum (preferences,
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_CLICK_POLICY_SINGLE) == NAUTILUS_CLICK_POLICY_SINGLE);
}
void
nautilus_self_check_icon_container (void)
{
......
......@@ -35,13 +35,13 @@
#include <gtk/gtkenums.h>
#include <gtk/gtkmain.h>
#include <glib.h>
#include "nautilus-gdk-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-background.h"
#include "nautilus-gdk-extensions.h"
#include "nautilus-gdk-pixbuf-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-global-preferences.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-background.h"
#include "nautilus-list-column-title.h"
/* Timeout for making the row currently selected for keyboard operation
......@@ -144,67 +144,105 @@ static GtkTargetEntry nautilus_list_dnd_target_table[] = {
{ "application/x-color", 0, TARGET_COLOR }
};
static void activate_row (NautilusList *list, gint row);
static int get_cell_horizontal_start_position (GtkCList *clist, GtkCListRow *clist_row,
int column, int content_width);
static void get_cell_style (GtkCList *clist, GtkCListRow *clist_row,
gint state, gint column, GtkStyle **style,
GdkGC **fg_gc, GdkGC **bg_gc);
static void nautilus_list_initialize_class (NautilusListClass *class);
static void nautilus_list_initialize (NautilusList *list);
static void nautilus_list_destroy (GtkObject *object);
static gint nautilus_list_button_press (GtkWidget *widget, GdkEventButton *event);
static gint nautilus_list_button_release (GtkWidget *widget, GdkEventButton *event);
static gint nautilus_list_motion (GtkWidget *widget, GdkEventMotion *event);
static void nautilus_list_drag_begin (GtkWidget *widget, GdkDragContext *context);
static void nautilus_list_drag_end (GtkWidget *widget, GdkDragContext *context);
static void nautilus_list_drag_data_get (GtkWidget *widget, GdkDragContext *context,
GtkSelectionData *data, guint info, guint time);
static void nautilus_list_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time);
static gboolean nautilus_list_drag_motion (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint time);
static gboolean nautilus_list_drag_drop (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, guint time);
static void nautilus_list_drag_data_received (GtkWidget *widget, GdkDragContext *context,
gint x, gint y, GtkSelectionData *data,
guint info, guint time);
static void nautilus_list_clear_keyboard_focus (NautilusList *list);
static void nautilus_list_draw_focus (GtkWidget *widget);
static int nautilus_list_get_first_selected_row (NautilusList *list);
static int nautilus_list_get_last_selected_row (NautilusList *list);
static gint nautilus_list_key_press (GtkWidget *widget,
GdkEventKey *event);
static void nautilus_list_unselect_all (GtkCList *clist);
static void nautilus_list_select_all (GtkCList *clist);
static void reveal_row (NautilusList *list, int row);
static void schedule_keyboard_row_reveal (NautilusList *list, int row);
static void unschedule_keyboard_row_reveal (NautilusList *list);
static void emit_selection_changed (NautilusList *clist);
static void nautilus_list_clear (GtkCList *clist);
static void draw_row (GtkCList *list, GdkRectangle *area, gint row, GtkCListRow *clist_row);
static void nautilus_list_realize (GtkWidget *widget);
static void nautilus_list_set_cell_contents (GtkCList *clist,
GtkCListRow *clist_row,
gint column,
GtkCellType type,
const gchar *text,
guint8 spacing,
GdkPixmap *pixmap,
GdkBitmap *mask);
static void nautilus_list_size_request (GtkWidget *widget, GtkRequisition *requisition);
static void nautilus_list_resize_column (GtkCList *widget, int column, int width);
static void nautilus_list_column_resize_track_start (GtkWidget *widget, int column);
static void nautilus_list_column_resize_track (GtkWidget *widget, int column);
static void nautilus_list_column_resize_track_end (GtkWidget *widget, int column);
static gboolean row_set_selected (NautilusList *list, int row, GtkCListRow *clist_row, gboolean select);
static gboolean select_row_unselect_others (NautilusList *list, int row_to_select);
static void activate_row (NautilusList *list,
gint row);
static int get_cell_horizontal_start_position (GtkCList *clist,
GtkCListRow *clist_row,
int column,
int content_width);
static void get_cell_style (GtkCList *clist,
GtkCListRow *clist_row,
gint state,
gint column,
GtkStyle **style,
GdkGC **fg_gc,
GdkGC **bg_gc);
static void nautilus_list_initialize_class (NautilusListClass *class);
static void nautilus_list_initialize (NautilusList *list);
static void nautilus_list_destroy (GtkObject *object);
static gint nautilus_list_button_press (GtkWidget *widget,
GdkEventButton *event);
static gint nautilus_list_button_release (GtkWidget *widget,
GdkEventButton *event);
static gint nautilus_list_motion (GtkWidget *widget,
GdkEventMotion *event);
static void nautilus_list_drag_begin (GtkWidget *widget,
GdkDragContext *context);
static void nautilus_list_drag_end (GtkWidget *widget,
GdkDragContext *context);
static void nautilus_list_drag_data_get (GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *data,
guint info,
guint time);
static void nautilus_list_drag_leave (GtkWidget *widget,
GdkDragContext *context,
guint time);
static gboolean nautilus_list_drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time);
static gboolean nautilus_list_drag_drop (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time);
static void nautilus_list_drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time);
static void nautilus_list_clear_keyboard_focus (NautilusList *list);
static void nautilus_list_draw_focus (GtkWidget *widget);
static int nautilus_list_get_first_selected_row (NautilusList *list);
static int nautilus_list_get_last_selected_row (NautilusList *list);
static gint nautilus_list_key_press (GtkWidget *widget,
GdkEventKey *event);
static void nautilus_list_unselect_all (GtkCList *clist);
static void nautilus_list_select_all (GtkCList *clist);
static void reveal_row (NautilusList *list,
int row);
static void schedule_keyboard_row_reveal (NautilusList *list,
int row);
static void unschedule_keyboard_row_reveal (NautilusList *list);
static void emit_selection_changed (NautilusList *clist);
static void nautilus_list_clear (GtkCList *clist);
static void draw_row (GtkCList *list,
GdkRectangle *area,
gint row,
GtkCListRow *clist_row);
static void nautilus_list_realize (GtkWidget *widget);
static void nautilus_list_set_cell_contents (GtkCList *clist,
GtkCListRow *clist_row,
gint column,
GtkCellType type,
const gchar *text,
guint8 spacing,
GdkPixmap *pixmap,
GdkBitmap *mask);
static void nautilus_list_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void nautilus_list_resize_column (GtkCList *widget,
int column,
int width);
static void nautilus_list_column_resize_track_start (GtkWidget *widget,
int column);
static void nautilus_list_column_resize_track (GtkWidget *widget,
int column);
static void nautilus_list_column_resize_track_end (GtkWidget *widget,
int column);
static gboolean row_set_selected (NautilusList *list,
int row,
GtkCListRow *clist_row,
gboolean select);
static gboolean select_row_unselect_others (NautilusList *list,
int row_to_select);
static void click_policy_changed_callback (NautilusPreferences *preferences,
const char *name,
gpointer user_data);
NAUTILUS_DEFINE_CLASS_BOILERPLATE (NautilusList, nautilus_list, GTK_TYPE_CLIST)
......@@ -337,9 +375,6 @@ nautilus_list_initialize (NautilusList *list)
list->details = g_new0 (NautilusListDetails, 1);
list->details->anchor_row = -1;
/* This should be read from preferences */
list->details->single_click_mode = TRUE;
/* GtkCList does not specify pointer motion by default */
gtk_widget_add_events (GTK_WIDGET (list), GDK_POINTER_MOTION_MASK);
......@@ -361,6 +396,18 @@ nautilus_list_initialize (NautilusList *list)
list);
list->details->title = GTK_WIDGET (nautilus_list_column_title_new());
/* Initialize the single click mode from preferences */
list->details->single_click_mode =
(nautilus_preferences_get_enum (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_CLICK_POLICY_SINGLE) == NAUTILUS_CLICK_POLICY_SINGLE);
/* Keep track of changes in clicking policy */
nautilus_preferences_add_enum_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
click_policy_changed_callback,
list);
}
static void
......@@ -372,6 +419,11 @@ nautilus_list_destroy (GtkObject *object)
unschedule_keyboard_row_reveal (list);
nautilus_preferences_remove_callback (nautilus_preferences_get_global_preferences (),
NAUTILUS_PREFERENCES_CLICK_POLICY,
click_policy_changed_callback,
list);
g_free (list->details);
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
......@@ -2172,6 +2224,26 @@ nautilus_list_clear (GtkCList *clist)
NAUTILUS_CALL_PARENT_CLASS (GTK_CLIST_CLASS, clear, (clist));
}
static void
click_policy_changed_callback (NautilusPreferences *preferences,
const char *name,
gpointer user_data)
{
NautilusList *list;
g_assert (NAUTILUS_IS_PREFERENCES (preferences));
g_assert (name != NULL);
g_assert (strcmp (name, NAUTILUS_PREFERENCES_CLICK_POLICY) == 0);
g_assert (NAUTILUS_IS_LIST (user_data));
list = NAUTILUS_LIST (user_data);
list->details->single_click_mode =
(nautilus_preferences_get_enum (preferences,
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_CLICK_POLICY_SINGLE) == NAUTILUS_CLICK_POLICY_SINGLE);
}
/**
* nautilus_list_new_with_titles:
......
......@@ -169,15 +169,15 @@ global_preferences_create_dialog (void)
* Clicking pane
*/
icon_view_pane = nautilus_preferences_box_add_pane (preference_box,
"Icon View",
"Icon View something");
"Click Policy",
"Click Policy something");
nautilus_preferences_pane_add_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane), "Number of clicks");
nautilus_preferences_pane_add_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane), "Click Policy");
nautilus_preferences_pane_add_item_to_nth_group (NAUTILUS_PREFERENCES_PANE (icon_view_pane),
0,
preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
NAUTILUS_PREFERENCE_ITEM_ENUM);
return prefs_dialog;
......@@ -270,22 +270,22 @@ global_preferences_register_for_ui (NautilusPreferences *preferences)
/* Click activation type */
nautilus_preferences_set_info (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
"Click activation type",
NAUTILUS_PREFERENCES_CLICK_POLICY,
"Click policy",
NAUTILUS_PREFERENCE_ENUM,
(gconstpointer) NAUTILUS_CLICK_ACTIVATION_SINGLE);
(gconstpointer) NAUTILUS_CLICK_POLICY_SINGLE);
nautilus_preferences_enum_add_entry (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
"single",
"Single Click",
NAUTILUS_CLICK_ACTIVATION_SINGLE);
NAUTILUS_CLICK_POLICY_SINGLE);
nautilus_preferences_enum_add_entry (preferences,
NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE,
NAUTILUS_PREFERENCES_CLICK_POLICY,
"double",
"Double Click",
NAUTILUS_CLICK_ACTIVATION_DOUBLE);
NAUTILUS_CLICK_POLICY_DOUBLE);
/* User level */
nautilus_preferences_set_info (preferences,
......
......@@ -54,12 +54,12 @@ BEGIN_GNOME_DECLS
#define NAUTILUS_PREFERENCES_ICON_THEME "/nautilus/preferences/icon_theme"
/* Single/Double click preference */
#define NAUTILUS_PREFERENCES_CLICK_ACTIVATION_TYPE "/nautilus/preferences/click_activation_type"
#define NAUTILUS_PREFERENCES_CLICK_POLICY "/nautilus/preferences/click_policy"
enum
{
NAUTILUS_CLICK_ACTIVATION_SINGLE,
NAUTILUS_CLICK_ACTIVATION_DOUBLE
NAUTILUS_CLICK_POLICY_SINGLE,
NAUTILUS_CLICK_POLICY_DOUBLE
};
void nautilus_global_preferences_startup (void);
......
......@@ -23,6 +23,7 @@
*/
#include <config.h>
#include "nautilus-icon-container.h"
#include <math.h>
......@@ -34,10 +35,11 @@
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
#include <gdk-pixbuf/gnome-canvas-pixbuf.h>
#include "nautilus-glib-extensions.h"
#include "nautilus-gdk-pixbuf-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-glib-extensions.h"
#include "nautilus-global-preferences.h"
#include "nautilus-gnome-extensions.h"
#include "nautilus-gtk-extensions.h"
#include "nautilus-gtk-macros.h"
#include "nautilus-icon-text-item.h"
#include "nautilus-lib-self-check-functions.h"
......@@ -72,28 +74,31 @@
*/
#define MAXIMUM_INITIAL_ICON_SIZE 2
static void activate_selected_items (NautilusIconContainer *container);
static void nautilus_icon_container_initialize_class (NautilusIconContainerClass *class);
static void nautilus_icon_container_initialize (NautilusIconContainer *container);
static void compute_stretch (StretchState *start,
StretchState *current);
static NautilusIcon *get_first_selected_icon (NautilusIconContainer *container);
static NautilusIcon *get_nth_selected_icon (NautilusIconContainer *container,
int index);
static void activate_selected_items (NautilusIconContainer *container);
static void nautilus_icon_container_initialize_class (NautilusIconContainerClass *class);
static void nautilus_icon_container_initialize (NautilusIconContainer *container);
static void compute_stretch (StretchState *start,
StretchState *current);
static NautilusIcon *get_first_selected_icon (NautilusIconContainer *container);
static NautilusIcon *get_nth_selected_icon (NautilusIconContainer *container,
int index);
static gboolean has_multiple_selection (NautilusIconContainer *container);
static void icon_destroy (NautilusIconContainer *container,
NautilusIcon *icon);