diff options
author | John Sullivan <sullivan@src.gnome.org> | 2000-02-08 00:41:23 +0000 |
---|---|---|
committer | John Sullivan <sullivan@src.gnome.org> | 2000-02-08 00:41:23 +0000 |
commit | 7b726aa67f31cdc098befadb4e01d7d7bbd03ef8 (patch) | |
tree | 5f32369a79d32cd684406e06bcbe898e9f268ade /libnautilus-private | |
parent | f8db5f0606532fb7d4da774716830b0c3ef45f6f (diff) | |
download | nautilus-7b726aa67f31cdc098befadb4e01d7d7bbd03ef8.tar.gz |
Add support for FMDirectoryView subclasses to add additional background context
menu items; first (primitive) cut at UI for choosing which text to display
beneath icons, will improve soon.
Diffstat (limited to 'libnautilus-private')
-rw-r--r-- | libnautilus-private/gnome-icon-container.c | 28 | ||||
-rw-r--r-- | libnautilus-private/gnome-icon-container.h | 2 |
2 files changed, 24 insertions, 6 deletions
diff --git a/libnautilus-private/gnome-icon-container.c b/libnautilus-private/gnome-icon-container.c index 13f13429a..04e1c054d 100644 --- a/libnautilus-private/gnome-icon-container.c +++ b/libnautilus-private/gnome-icon-container.c @@ -70,8 +70,8 @@ static void gnome_icon_container_initialize_class (GnomeIconContainerClass *class); static void gnome_icon_container_initialize (GnomeIconContainer *container); -static void synch_icon_with_controller (GnomeIconContainer *container, - GnomeIconContainerIcon *icon); +static void request_update_one (GnomeIconContainer *container, + GnomeIconContainerIcon *icon); NAUTILUS_DEFINE_CLASS_BOILERPLATE (GnomeIconContainer, gnome_icon_container, GNOME_TYPE_CANVAS) @@ -122,7 +122,7 @@ icon_new (GnomeIconContainer *container, nautilus_icons_view_icon_item_get_type (), NULL); - synch_icon_with_controller (container, new); + request_update_one (container, new); return new; } @@ -2274,7 +2274,7 @@ setup_icon_in_container (GnomeIconContainer *container, } static void -synch_icon_with_controller (GnomeIconContainer *container, GnomeIconContainerIcon *icon) +request_update_one (GnomeIconContainer *container, GnomeIconContainerIcon *icon) { GnomeIconContainerDetails *details; GdkPixbuf *image; @@ -2370,7 +2370,6 @@ gnome_icon_container_set_zoom_level(GnomeIconContainer *container, int new_level { int pinned_level; double pixels_per_unit; - GList *p; GnomeIconContainerDetails *details; details = container->details; @@ -2390,13 +2389,30 @@ gnome_icon_container_set_zoom_level(GnomeIconContainer *container, int new_level / NAUTILUS_ICON_SIZE_STANDARD; gnome_canvas_set_pixels_per_unit(GNOME_CANVAS(container), pixels_per_unit); + gnome_icon_container_request_update_all (container); +} + +/** + * gnome_icon_container_request_update_all: + * For each icon, synchronizes the displayed information (image, text) with the + * information from the model. + * + * @container: An icon container. + **/ +void +gnome_icon_container_request_update_all (GnomeIconContainer *container) +{ + GList *p; + GnomeIconContainerDetails *details; + + details = container->details; for (p = details->icons; p != NULL; p = p->next) { GnomeIconContainerIcon *icon; icon = p->data; - synch_icon_with_controller (container, icon); + request_update_one (container, icon); } } diff --git a/libnautilus-private/gnome-icon-container.h b/libnautilus-private/gnome-icon-container.h index afc919362..7d9b3859c 100644 --- a/libnautilus-private/gnome-icon-container.h +++ b/libnautilus-private/gnome-icon-container.h @@ -83,6 +83,8 @@ void gnome_icon_container_add_auto (GnomeIconContainer void gnome_icon_container_relayout (GnomeIconContainer *view); void gnome_icon_container_line_up (GnomeIconContainer *view); +void gnome_icon_container_request_update_all (GnomeIconContainer *container); + GList * gnome_icon_container_get_selection (GnomeIconContainer *view); gint gnome_icon_container_get_zoom_level (GnomeIconContainer *view); |