Commit 3d610fba authored by Elliot Lee's avatar Elliot Lee
Browse files

Almost works (haha).



Almost works (haha).

Only displays one file.
parent 3fd015a8
......@@ -27,15 +27,13 @@ AC_MSG_ERROR([
*** is always available from ftp://ftp.gtk.org/.]))
AM_PATH_GNOME(1.0.0,,AC_MSG_ERROR([*** GNOME 1.0.0 or better is
required.]), gdk_pixbuf gnorba bonobo vfspthread)
required.]), gdk_pixbuf gnorba bonobo vfs)
AC_SUBST(GDK_PIXBUF_CFLAGS)
AC_SUBST(GDK_PIXBUF_LIBS)
AC_SUBST(GNORBA_CFLAGS)
AC_SUBST(GNORBA_LIBS)
AC_SUBST(BONOBO_CFLAGS)
AC_SUBST(BONOBO_LIBS)
VFS_CFLAGS="$VFSPTHREAD_CFLAGS"
VFS_LIBS="$VFSPTHREAD_LIBS"
AC_SUBST(VFS_CFLAGS)
AC_SUBST(VFS_LIBS)
......
......@@ -37,21 +37,10 @@
#include "fm-icon-cache.h"
#include "fm-public-api.h"
enum {
OPEN_FAILED,
OPEN_DONE,
LOAD_FAILED,
LOAD_DONE,
ACTIVATE_URI,
LAST_SIGNAL
};
#define DISPLAY_TIMEOUT_INTERVAL 500
static NautilusViewClientClass *parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
static FMIconCache *icm = NULL;
......@@ -190,13 +179,19 @@ icon_container_activate_cb (GnomeIconContainer *icon_container,
FMDirectoryView *directory_view;
GnomeVFSURI *new_uri;
GnomeVFSFileInfo *info;
Nautilus_NavigationRequestInfo nri;
info = (GnomeVFSFileInfo *) icon_data;
directory_view = FM_DIRECTORY_VIEW (data);
new_uri = gnome_vfs_uri_append_path (directory_view->uri, name);
gtk_signal_emit (GTK_OBJECT (directory_view),
signals[ACTIVATE_URI], new_uri, info->mime_type);
nri.requested_uri = gnome_vfs_uri_to_string(new_uri, 0);
nri.new_window_default = nri.new_window_suggested = Nautilus_V_FALSE;
nri.new_window_enforced = Nautilus_V_UNKNOWN;
nautilus_view_client_request_location_change(NAUTILUS_VIEW_CLIENT(directory_view),
&nri);
g_free(nri.requested_uri);
gnome_vfs_uri_unref (new_uri);
}
......@@ -209,6 +204,8 @@ add_to_icon_container (FMDirectoryView *view,
{
GdkPixbuf *image;
g_return_if_fail(info);
image = fm_icon_cache_get_icon (icon_manager, info);
if (! with_layout || view->icon_layout == NULL) {
......@@ -248,6 +245,8 @@ load_icon_container (FMDirectoryView *view,
info = gnome_vfs_directory_list_get
(view->directory_list, position);
g_return_if_fail(info);
add_to_icon_container (view, icm,
icon_container, info, TRUE);
......@@ -380,13 +379,18 @@ flist_activate_cb (GtkFList *flist,
FMDirectoryView *directory_view;
GnomeVFSURI *new_uri;
GnomeVFSFileInfo *info;
Nautilus_NavigationRequestInfo nri;
info = (GnomeVFSFileInfo *) entry_data;
directory_view = FM_DIRECTORY_VIEW (data);
new_uri = gnome_vfs_uri_append_path (directory_view->uri, info->name);
gtk_signal_emit (GTK_OBJECT (directory_view),
signals[ACTIVATE_URI], new_uri, info->mime_type);
nri.requested_uri = gnome_vfs_uri_to_string(new_uri, 0);
nri.new_window_default = nri.new_window_suggested = Nautilus_V_FALSE;
nri.new_window_enforced = Nautilus_V_UNKNOWN;
nautilus_view_client_request_location_change(NAUTILUS_VIEW_CLIENT(directory_view),
&nri);
g_free(nri.requested_uri);
gnome_vfs_uri_unref (new_uri);
}
......@@ -437,7 +441,8 @@ create_flist (FMDirectoryView *view)
FMIconCache *icon_manager;
if(!icm)
icm = icon_manager = fm_icon_cache_new(NULL);
icm = fm_icon_cache_new(NULL);
icon_manager = icm;
position = gnome_vfs_directory_list_get_first_position
(view->directory_list);
......@@ -599,7 +604,8 @@ display_pending_entries (FMDirectoryView *view)
FM_DEBUG (("Adding %d entries.", view->entries_to_display));
if(!icm)
icm = fm_icon_cache_new(NULL);
icm = fm_icon_cache_new(NULL);
icon_manager = icm;
if (view_has_icon_container (view)) {
icon_container = get_icon_container (view);
......@@ -610,7 +616,8 @@ display_pending_entries (FMDirectoryView *view)
gtk_clist_freeze (GTK_CLIST (flist));
}
for (i = 0; i < view->entries_to_display; i++) {
for (i = 0; i < view->entries_to_display
&& view->current_position != GNOME_VFS_DIRECTORY_LIST_POSITION_NONE; i++) {
GnomeVFSFileInfo *info;
info = gnome_vfs_directory_list_get (view->directory_list,
......@@ -647,7 +654,8 @@ display_icons_not_in_layout (FMDirectoryView *view)
FM_DEBUG (("Adding entries not in layout."));
if (!icm)
icm = icon_manager = fm_icon_cache_new(NULL);
icm = fm_icon_cache_new(NULL);
icon_manager = icm;
icon_container = get_icon_container (view);
g_return_if_fail (icon_container != NULL);
......@@ -720,7 +728,7 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
if (view->directory_list == NULL) {
if (result == GNOME_VFS_OK || result == GNOME_VFS_ERROR_EOF) {
gtk_signal_emit (GTK_OBJECT (view), signals[OPEN_DONE]);
/* gtk_signal_emit (GTK_OBJECT (view), signals[OPEN_DONE]); */
setup_base_uri (view);
......@@ -739,14 +747,16 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
display_timeout_cb,
view);
} else if (entries_read == 0) {
/*
gtk_signal_emit (GTK_OBJECT (view),
signals[OPEN_FAILED]);
*/
}
}
if (view->current_position == GNOME_VFS_DIRECTORY_LIST_POSITION_NONE)
view->current_position
= gnome_vfs_directory_list_get_position (list);
= gnome_vfs_directory_list_get_first_position (list);
view->entries_to_display += entries_read;
......@@ -754,11 +764,11 @@ directory_load_cb (GnomeVFSAsyncHandle *handle,
display_pending_entries (view);
display_icons_not_in_layout (view);
stop_load (view);
gtk_signal_emit (GTK_OBJECT (view), signals[LOAD_DONE]);
/* gtk_signal_emit (GTK_OBJECT (view), signals[LOAD_DONE]); */
} else if (result != GNOME_VFS_OK) {
stop_load (view);
gtk_signal_emit (GTK_OBJECT (view), signals[LOAD_FAILED],
result);
/* gtk_signal_emit (GTK_OBJECT (view), signals[LOAD_FAILED],
result); */
return;
}
}
......@@ -885,9 +895,11 @@ fm_directory_view_load_uri (FMDirectoryView *view,
directory_load_cb, /* callback */
view); /* callback_data */
/*
if (result != GNOME_VFS_OK)
gtk_signal_emit (GTK_OBJECT (view), signals[OPEN_FAILED],
result);
*/
}
void
......
......@@ -43,10 +43,8 @@ icon_set_new (const gchar *name)
{
IconSet *new;
new = g_new (IconSet, 1);
new = g_new0 (IconSet, 1);
new->name = g_strdup (name);
new->plain = NULL;
new->symlink = NULL;
return new;
}
......
......@@ -69,9 +69,9 @@ POA_Nautilus_ViewFrame__epv impl_Nautilus_ViewFrame_epv =
{
NULL, /* _private */
(void(*))&impl_Nautilus_ViewFrame__get_main_window,
(void(*))&impl_Nautilus_ViewFrame_request_status_change,
(void(*))&impl_Nautilus_ViewFrame_request_location_change,
(void(*))&impl_Nautilus_ViewFrame_request_selection_change,
(void(*))&impl_Nautilus_ViewFrame_request_status_change
(void(*))&impl_Nautilus_ViewFrame_request_selection_change
};
static PortableServer_ServantBase__epv base_epv = { NULL};
......
......@@ -69,9 +69,9 @@ POA_Nautilus_ViewFrame__epv impl_Nautilus_ViewFrame_epv =
{
NULL, /* _private */
(void(*))&impl_Nautilus_ViewFrame__get_main_window,
(void(*))&impl_Nautilus_ViewFrame_request_status_change,
(void(*))&impl_Nautilus_ViewFrame_request_location_change,
(void(*))&impl_Nautilus_ViewFrame_request_selection_change,
(void(*))&impl_Nautilus_ViewFrame_request_status_change
(void(*))&impl_Nautilus_ViewFrame_request_selection_change
};
static PortableServer_ServantBase__epv base_epv = { NULL};
......
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