Commit 9050adb1 authored by Elliot Lee's avatar Elliot Lee
Browse files

Implement truncate. Use GINT_TO_POINTER and GPOINTER_TO_INT macros for

* libnautilus/bonobo-stream-vfs.[ch]: Implement truncate.
* src/nautilus-zoom-control.c: Use GINT_TO_POINTER and GPOINTER_TO_INT macros
for "proper" int <-> pointer conversion.
parent 071bafd2
......@@ -183,11 +183,11 @@ nautilus_zoom_control_expose (GtkWidget *widget, GdkEventExpose *event)
/* routines to create and handle the zoom menu */
static void
zoom_menu_cb(GtkMenuItem *item, gint zoom_level)
zoom_menu_cb(GtkMenuItem *item, gpointer data)
NautilusZoomControl *zoom_control = NAUTILUS_ZOOM_CONTROL(gtk_object_get_user_data(GTK_OBJECT(item)));
if (zoom_control)
set_zoom_level(zoom_control, zoom_level);
set_zoom_level(zoom_control, GPOINTER_TO_INT(data));
static void
......@@ -196,7 +196,7 @@ create_zoom_menu_item(GtkMenu* menu, GtkWidget *zoom_control, const gchar *item_
GtkWidget *menu_item;
menu_item = gtk_menu_item_new_with_label(item_text);
gtk_signal_connect(GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (zoom_menu_cb), (void*) zoom_index);
gtk_signal_connect(GTK_OBJECT (menu_item), "activate", GTK_SIGNAL_FUNC (zoom_menu_cb), GINT_TO_POINTER(zoom_index));
gtk_object_set_user_data(GTK_OBJECT(menu_item), zoom_control);
gtk_widget_show (menu_item);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment