New function, extracted from size_allocate. (size_allocate): Call

* libnautilus-extensions/nautilus-icon-container.c:
	(world_width_changed): New function, extracted from size_allocate.
	(size_allocate): Call world-width-changed.
	(nautilus_icon_container_set_zoom_level): Call world_width_changed.
	This makes zooming relayout when in auto-layout mode.

	* src/nautilus-window-menus.c:
	(append_bookmark_to_menu): Added line where bookmark is set in
	BookmarkHolder. This had been accidentally deleted, breaking all
	bookmarks.
This commit is contained in:
John Sullivan 2000-04-19 21:15:06 +00:00
parent 2fc5547054
commit f1614ccd12
5 changed files with 43 additions and 22 deletions

View file

@ -1,3 +1,16 @@
2000-04-19 John Sullivan <sullivan@eazel.com>
* libnautilus-extensions/nautilus-icon-container.c:
(world_width_changed): New function, extracted from size_allocate.
(size_allocate): Call world-width-changed.
(nautilus_icon_container_set_zoom_level): Call world_width_changed.
This makes zooming relayout when in auto-layout mode.
* src/nautilus-window-menus.c:
(append_bookmark_to_menu): Added line where bookmark is set in
BookmarkHolder. This had been accidentally deleted, breaking all
bookmarks.
2000-04-19 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in (ALL_LINGUAS): Added Danish language

View file

@ -23,7 +23,6 @@
*/
#include <config.h>
#include "nautilus-icon-container.h"
#include <math.h>
@ -1445,20 +1444,15 @@ size_request (GtkWidget *widget,
}
static void
size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
world_width_changed (NautilusIconContainer *container, int new_width)
{
NautilusIconContainer *container;
NautilusIconGrid *grid;
double world_width;
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
container = NAUTILUS_ICON_CONTAINER (widget);
grid = container->details->grid;
gnome_canvas_c2w (GNOME_CANVAS (container),
allocation->width, 0,
new_width, 0,
&world_width, NULL);
nautilus_icon_grid_set_visible_width (grid, world_width);
@ -1469,6 +1463,15 @@ size_allocate (GtkWidget *widget,
set_scroll_region (container);
}
static void
size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
world_width_changed (NAUTILUS_ICON_CONTAINER (widget), widget->allocation.width);
}
static void
realize (GtkWidget *widget)
{
@ -2600,6 +2603,8 @@ nautilus_icon_container_set_zoom_level(NautilusIconContainer *container, int new
gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (container), pixels_per_unit);
nautilus_icon_container_request_update_all (container);
world_width_changed (container, GTK_WIDGET (container)->allocation.width);
}
/**

View file

@ -23,7 +23,6 @@
*/
#include <config.h>
#include "nautilus-icon-container.h"
#include <math.h>
@ -1445,20 +1444,15 @@ size_request (GtkWidget *widget,
}
static void
size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
world_width_changed (NautilusIconContainer *container, int new_width)
{
NautilusIconContainer *container;
NautilusIconGrid *grid;
double world_width;
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
container = NAUTILUS_ICON_CONTAINER (widget);
grid = container->details->grid;
gnome_canvas_c2w (GNOME_CANVAS (container),
allocation->width, 0,
new_width, 0,
&world_width, NULL);
nautilus_icon_grid_set_visible_width (grid, world_width);
@ -1469,6 +1463,15 @@ size_allocate (GtkWidget *widget,
set_scroll_region (container);
}
static void
size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
NAUTILUS_CALL_PARENT_CLASS (GTK_WIDGET_CLASS, size_allocate, (widget, allocation));
world_width_changed (NAUTILUS_ICON_CONTAINER (widget), widget->allocation.width);
}
static void
realize (GtkWidget *widget)
{
@ -2600,6 +2603,8 @@ nautilus_icon_container_set_zoom_level(NautilusIconContainer *container, int new
gnome_canvas_set_pixels_per_unit (GNOME_CANVAS (container), pixels_per_unit);
nautilus_icon_container_request_update_all (container);
world_width_changed (container, GTK_WIDGET (container)->allocation.width);
}
/**

View file

@ -335,6 +335,7 @@ append_bookmark_to_menu (NautilusWindow *window,
bookmark_holder = g_new (BookmarkHolder, 1);
bookmark_holder->window = window;
bookmark_holder->bookmark = bookmark;
/* We double the underscores here to escape them so Bonobo will know they are
* not keyboard accelerator character prefixes. If we ever find we need to
@ -405,9 +406,7 @@ clear_appended_bookmark_items (NautilusWindow *window,
p->data,
&func,
(gpointer *)&holder);
if (holder != NULL) {
g_free (holder);
}
g_free (holder);
bonobo_ui_handler_menu_remove (window->uih, p->data);
}
else if (strcmp ((const char *) p->data, last_static_item_path) == 0) {

View file

@ -335,6 +335,7 @@ append_bookmark_to_menu (NautilusWindow *window,
bookmark_holder = g_new (BookmarkHolder, 1);
bookmark_holder->window = window;
bookmark_holder->bookmark = bookmark;
/* We double the underscores here to escape them so Bonobo will know they are
* not keyboard accelerator character prefixes. If we ever find we need to
@ -405,9 +406,7 @@ clear_appended_bookmark_items (NautilusWindow *window,
p->data,
&func,
(gpointer *)&holder);
if (holder != NULL) {
g_free (holder);
}
g_free (holder);
bonobo_ui_handler_menu_remove (window->uih, p->data);
}
else if (strcmp ((const char *) p->data, last_static_item_path) == 0) {