summaryrefslogtreecommitdiff
path: root/libnautilus-private
diff options
context:
space:
mode:
authorAndy Hertzfeld <andy@src.gnome.org>2000-11-28 01:43:43 +0000
committerAndy Hertzfeld <andy@src.gnome.org>2000-11-28 01:43:43 +0000
commit50998026b5b871f3991c3d5aea1cc59eee7a9414 (patch)
tree293ef62307d1234ffc4ab3c030190ab726e28a09 /libnautilus-private
parent925654470ec482dcf6a4b74aeab50b33eaae8bad (diff)
downloadnautilus-50998026b5b871f3991c3d5aea1cc59eee7a9414.tar.gz
added a new text view component with zooming, settable fonts and
added a new text view component with zooming, settable fonts and text-oriented services. The services are currently hardwired but there will be a framework soon. You may have to delete your /gnome/share/oaf/text-plain.oafinfo to see it in action. * configure.in: * components/Makefile.am: * components/text/.cvsignore: * components/text/Makefile.am: build stuff for the new text view * components/text/main.c: (text_view_object_destroyed), (text_view_make_object), (main): factory object for the text view * components/text/nautilus-text-view-ui.xml: xml file defining the menus for the text view * components/text/nautilus-text-view.oafinfo: oaf definitions for the text view * components/text/nautilus-text-view.h: interface file for the text view * components/text/nautilus-text-view.c: (nautilus_text_view_initialize_class), (nautilus_text_view_initialize), (detach_file), (nautilus_text_view_destroy), (nautilus_text_view_get_nautilus_view), (nautilus_text_view_update), (nautilus_text_view_load_uri), (text_view_load_location_callback), (nautilus_text_view_update_font), (get_selected_text), (text_view_search_callback), (text_view_lookup_callback), (nautilus_text_view_set_font), (handle_ui_event), (merge_bonobo_menu_items), (nautilus_text_view_zoom_to_level), (nautilus_text_view_bump_zoom_level), (zoomable_zoom_in_callback), (zoomable_zoom_out_callback), (zoom_index_from_float), (zoomable_set_zoom_level_callback), (zoomable_zoom_to_fit_callback): implementation for the text view * libnautilus-extensions/nautilus-icon-container.c: (lay_down_icons_horizontal): fixed bug 3485, icon layout not using all of the available space, by tweaking the code to not require the extra space between the columns
Diffstat (limited to 'libnautilus-private')
-rw-r--r--libnautilus-private/nautilus-icon-container.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index 984e20679..b69908117 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -764,7 +764,7 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
GList *p, *line_start;
NautilusIcon *icon;
ArtDRect bounds;
- double canvas_width, line_width, space_width, y;
+ double canvas_width, line_width, space_width, border_space_width, y;
/* Lay out icons a line at a time. */
canvas_width = GTK_WIDGET (container)->allocation.width / GNOME_CANVAS (container)->pixels_per_unit;
@@ -778,9 +778,13 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
nautilus_gnome_canvas_item_get_world_bounds
(GNOME_CANVAS_ITEM (icon->item), &bounds);
space_width = get_icon_space_width (container, &bounds);
-
+
+ /* we don't need the right-hand border space for the rightmost icon, so reduce
+ the space width to compare with */
+ border_space_width = space_width * .75;
+
/* If this icon doesn't fit, lay out the line that's queued up. */
- if (line_start != p && line_width + space_width > canvas_width) {
+ if (line_start != p && line_width + border_space_width > canvas_width) {
lay_down_one_line (container, line_start, p, &y);
line_width = 0;
line_start = p;