Commit 8e279e3c authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

sync with home, may not compile, will fix momentarily

1999-12-17  Havoc Pennington  <hp@redhat.com>

        * src/file-manager/fm-directory-view.c: Change to use
	        get_current_icon_cache() (it wasn't ever freeing the icon
cache anyway)

        * src/file-manager/fm-icon-cache.c (fm_get_current_icon_cache):
	        function to get a global icon cache, we will share this throughout
		        the program.
parent 26f7c8b1
1999-12-17 Havoc Pennington <hp@redhat.com>
* src/file-manager/fm-directory-view.c: Change to use
get_current_icon_cache() (it wasn't ever freeing the icon cache anyway)
* src/file-manager/fm-icon-cache.c (fm_get_current_icon_cache):
function to get a global icon cache, we will share this throughout
the program.
1999-12-19 Havoc Pennington <hp@pobox.com>
* src/file-manager/desktop-canvas.c
......@@ -24,6 +33,7 @@
* src/ntl-window.c, src/ntl-window.h: Added calls to
allow/disallow some of the toolbar operations.
>>>>>>> 1.39
1999-12-17 Havoc Pennington <hp@redhat.com>
* src/ntl-window.c (nautilus_window_realize): set the mini icon.
......
......@@ -19,6 +19,8 @@ libntl_file_manager_la_SOURCES= \
fm-icon-cache.h \
desktop-canvas.c \
desktop-canvas.h \
desktop-item.c \
desktop-item.h \
desktop-layout.h \
desktop-layout.c \
desktop-window.c \
......@@ -38,8 +40,12 @@ libntl_file_manager_la_SOURCES= \
noinst_PROGRAMS=gnome-desktop
gnome_desktop_SOURCES= \
fm-icon-cache.c \
fm-icon-cache.h \
desktop-canvas.c \
desktop-canvas.h \
desktop-item.c \
desktop-item.h \
desktop-layout.h \
desktop-layout.c \
desktop-menu.h \
......
......@@ -25,6 +25,7 @@
#include <gnome.h>
#include <gtk/gtk.h>
#include "desktop-menu.h"
#include "fm-icon-cache.h"
static void desktop_canvas_class_init (DesktopCanvasClass *class);
static void desktop_canvas_init (DesktopCanvas *dcanvas);
......@@ -96,6 +97,8 @@ desktop_canvas_init (DesktopCanvas *dcanvas)
the popup */
gnome_popup_menu_attach(dcanvas->popup, GTK_WIDGET(dcanvas), NULL);
dcanvas->layout = desktop_layout_new();
dcanvas->desktop_dir_list = NULL;
dcanvas->entries_loaded_id = 0;
}
......@@ -137,7 +140,8 @@ desktop_canvas_finalize (GtkObject *object)
canvas = DESKTOP_CANVAS(object);
desktop_background_info_unref(canvas->background_info);
desktop_layout_unref(canvas->layout);
(* GTK_OBJECT_CLASS(parent_class)->finalize) (object);
}
......@@ -179,7 +183,10 @@ desktop_canvas_size_allocate(GtkWidget *widget,
allocation->width,
allocation->height);
desktop_layout_set_size(DESKTOP_CANVAS(widget)->layout,
0, 0,
allocation->width,
allocation->height);
if (GTK_WIDGET_CLASS (parent_class)->size_allocate)
(* GTK_WIDGET_CLASS (parent_class)->size_allocate) (widget,
......@@ -278,6 +285,7 @@ update_bg_idle(gpointer data)
case DesktopBackgroundSolid:
set_widget_color(GTK_WIDGET(canvas), canvas->background_info->solid_color);
break;
default:
g_warning("FIXME background features not all implemented yet");
break;
......
......@@ -137,7 +137,7 @@ desktop_layout_item_unref (DesktopLayoutItem *item)
}
gpointer
desktop_item_get_user_data (DesktopLayoutItem *item)
desktop_layout_item_get_user_data (DesktopLayoutItem *item)
{
return item->user_data;
}
......@@ -255,6 +255,8 @@ desktop_layout_set_size (DesktopLayout *layout,
layout->y = y;
layout->width = width;
layout->height = height;
desktop_layout_arrange(layout, FALSE);
}
void
......@@ -266,6 +268,8 @@ desktop_layout_set_mode (DesktopLayout *layout,
layout->rows_not_columns = rows_not_columns;
layout->hmode = hmode;
layout->vmode = vmode;
desktop_layout_arrange(layout, FALSE);
}
void
......@@ -274,6 +278,8 @@ desktop_layout_add_item (DesktopLayout *layout,
{
desktop_layout_item_ref(item);
layout->items = g_list_prepend(layout->items, item);
desktop_layout_arrange(layout, FALSE);
}
void
......@@ -282,6 +288,8 @@ desktop_layout_remove_item (DesktopLayout *layout,
{
layout->items = g_list_remove(layout->items, item);
desktop_layout_item_unref(item);
desktop_layout_arrange(layout, FALSE);
}
......
......@@ -73,7 +73,7 @@ DesktopLayoutItem *desktop_layout_item_new (DesktopLayoutSizeRequestF
gpointer user_data);
void desktop_layout_item_ref (DesktopLayoutItem *item);
void desktop_layout_item_unref (DesktopLayoutItem *item);
gpointer desktop_item_get_user_data (DesktopLayoutItem *item);
gpointer desktop_layout_item_get_user_data (DesktopLayoutItem *item);
/* get the last allocation we were given; pass NULL for any dimensions
......@@ -110,7 +110,7 @@ void desktop_layout_remove_item (DesktopLayout
/* Redo the layout, ignoring all x/y positions from size requests
(i.e. arrange icons after the user has made a big mess). */
void desktop_layout_arrange (DesktopLayout *layout,
gboolean ignore_position_requests);
gboolean ignore_position_requests);
END_GNOME_DECLS
......
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