diff options
author | Darin Adler <darin@src.gnome.org> | 2000-04-05 01:28:31 +0000 |
---|---|---|
committer | Darin Adler <darin@src.gnome.org> | 2000-04-05 01:28:31 +0000 |
commit | cd9618f0c6c13e847f92e6509ff0ae1e3e5369b8 (patch) | |
tree | 1b5ce191296fb53b11a7fb1e9b82533d82ff6ff6 /libnautilus-extensions/nautilus-icon-grid.c | |
parent | dc703c8ba1607c1b77441d13e2b9f55328d35a62 (diff) | |
download | nautilus-cd9618f0c6c13e847f92e6509ff0ae1e3e5369b8.tar.gz |
Finished task 54 (Set background image by drag/drop).
Fixed bug 346 (Bad icon positions when you change user level).
Fixed bug 372 (Better icons for common file types).
* libnautilus/nautilus-background-canvas-group.c:
(nautilus_background_canvas_group_draw): Got rid of the colormap
which is not needed now that we use gtk_rgb instead of gtk_color
calls. Passed in the corner of the canvas as a parameter to
nautilus_background_draw so it knows where the origin of any
repeating pattern should be.
* libnautilus/nautilus-background.h:
* libnautilus/nautilus-background.c: (nautilus_background_draw):
Added parameters to determine where the origin of any repeating
pattern should be. Removed colormap parameter (see above).
(nautilus_background_draw_flat_box): Passed in origin parameters
in call to nautilus_background_draw.
* libnautilus/nautilus-gdk-extensions.h:
* libnautilus/nautilus-gdk-extensions.c:
(nautilus_fill_rectangle_with_gradient): Removed colormap
parameter (see above).
* libnautilus/nautilus-gdk-pixbuf-extensions.c:
(nautilus_gdk_pixbuf_render_to_drawable_tiled): Fixed the tiling
so it will use the dither parameters to set the origin of the
tiles as well.
* libnautilus/nautilus-icon-dnd.c: (receive_dropped_tile_image),
(nautilus_icon_container_receive_dropped_icons): Added code so that
dropping an image file on the window with the shift key held down
will customize the background tile image.
* libnautilus/nautilus-icon-factory.c: (make_full_icon_path),
(get_themed_icon_file_path): Fixed two bugs that prevented
MIME-type-based icons from working correctly. First, got rid of
code that tried to prepend the theme name and "nautilus/" to the
beginning of a full path. Then made sure that it tries the file
name without adding a suffix before it starts trying out suffixes.
* libnautilus/nautilus-icon-grid.c: (nautilus_icon_grid_clear):
Fixed bug where clearing the grid was resetting the visible width.
* components/sample/Makefile.am:
* components/services/startup/Makefile.am:
Turned on -Werror for these two directories.
* components/sample/nautilus-sample-content-view.h:
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_destroy), (bonobo_sample_callback):
Fixed warnings and did some small cleanup.
Diffstat (limited to 'libnautilus-extensions/nautilus-icon-grid.c')
-rw-r--r-- | libnautilus-extensions/nautilus-icon-grid.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libnautilus-extensions/nautilus-icon-grid.c b/libnautilus-extensions/nautilus-icon-grid.c index 50b8b930b..3f2947258 100644 --- a/libnautilus-extensions/nautilus-icon-grid.c +++ b/libnautilus-extensions/nautilus-icon-grid.c @@ -73,8 +73,14 @@ nautilus_icon_grid_clear (NautilusIconGrid *grid) g_list_free (grid->elements[i]); } g_free (grid->elements); - - memset (grid, 0, sizeof (*grid)); + grid->elements = 0; + + grid->bounds.x0 = 0; + grid->bounds.y0 = 0; + grid->bounds.x1 = 0; + grid->bounds.y1 = 0; + grid->first_free_x = 0; + grid->first_free_y = 0; } void @@ -178,7 +184,7 @@ nautilus_icon_grid_set_visible_width (NautilusIconGrid *grid, int visible_width; ArtIRect bounds; - visible_width = floor (world_visible_width / GRID_CELL_WIDTH); + visible_width = MAX(1, floor (world_visible_width / GRID_CELL_WIDTH)); if (visible_width > grid->bounds.x1) { bounds = grid->bounds; |