[nautilus] desktop-icon-view: adapt the desktop icon view to recent changes
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] desktop-icon-view: adapt the desktop icon view to recent changes
- Date: Thu, 17 Feb 2011 16:29:07 +0000 (UTC)
commit 8544bdb09511cff7edc0382009e6ca0d1f607cd6
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 14 13:52:13 2011 -0500
desktop-icon-view: adapt the desktop icon view to recent changes
src/nautilus-desktop-icon-view.c | 12 +++---------
src/nautilus-icon-view.c | 11 +++++++++--
src/nautilus-icon-view.h | 2 ++
3 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/src/nautilus-desktop-icon-view.c b/src/nautilus-desktop-icon-view.c
index dec51c2..1bf6c42 100644
--- a/src/nautilus-desktop-icon-view.c
+++ b/src/nautilus-desktop-icon-view.c
@@ -96,6 +96,8 @@ G_DEFINE_TYPE (NautilusDesktopIconView, nautilus_desktop_icon_view, NAUTILUS_TYP
static char *desktop_directory;
static time_t desktop_dir_modify_time;
+#define get_icon_container(w) nautilus_icon_view_get_icon_container(NAUTILUS_ICON_VIEW (w))
+
static void
desktop_directory_changed_callback (gpointer callback_data)
{
@@ -103,15 +105,6 @@ desktop_directory_changed_callback (gpointer callback_data)
desktop_directory = nautilus_get_desktop_directory ();
}
-static NautilusIconContainer *
-get_icon_container (NautilusDesktopIconView *icon_view)
-{
- g_return_val_if_fail (NAUTILUS_IS_DESKTOP_ICON_VIEW (icon_view), NULL);
- g_return_val_if_fail (NAUTILUS_IS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view))), NULL);
-
- return NAUTILUS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view)));
-}
-
static void
icon_container_set_workarea (NautilusIconContainer *icon_container,
GdkScreen *screen,
@@ -866,6 +859,7 @@ nautilus_desktop_icon_view_create (NautilusWindowSlot *slot)
view = g_object_new (NAUTILUS_TYPE_DESKTOP_ICON_VIEW,
"window-slot", slot,
+ "show-floating-bar", FALSE,
NULL);
return NAUTILUS_VIEW (view);
}
diff --git a/src/nautilus-icon-view.c b/src/nautilus-icon-view.c
index 42dadda..1003999 100644
--- a/src/nautilus-icon-view.c
+++ b/src/nautilus-icon-view.c
@@ -114,6 +114,8 @@ struct NautilusIconViewDetails
gboolean compact;
gulong clipboard_handler_id;
+
+ GtkWidget *icon_container;
};
@@ -220,7 +222,13 @@ nautilus_icon_view_destroy (GtkWidget *object)
static NautilusIconContainer *
get_icon_container (NautilusIconView *icon_view)
{
- return NAUTILUS_ICON_CONTAINER (gtk_bin_get_child (GTK_BIN (icon_view)));
+ return NAUTILUS_ICON_CONTAINER (icon_view->details->icon_container);
+}
+
+NautilusIconContainer *
+nautilus_icon_view_get_icon_container (NautilusIconView *icon_view)
+{
+ return get_icon_container (icon_view);
}
static gboolean
@@ -463,7 +471,6 @@ nautilus_icon_view_clear (NautilusView *view)
g_slist_free (file_list);
}
-
static gboolean
should_show_file_on_screen (NautilusView *view, NautilusFile *file)
{
diff --git a/src/nautilus-icon-view.h b/src/nautilus-icon-view.h
index b59ccbc..aaa916c 100644
--- a/src/nautilus-icon-view.h
+++ b/src/nautilus-icon-view.h
@@ -132,4 +132,6 @@ 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);
+
#endif /* NAUTILUS_ICON_VIEW_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]