Commit 24997abb authored by Elliot Lee's avatar Elliot Lee
Browse files

Basic framework is there. Now for URL resolution and loading.



Basic framework is there. Now for URL resolution and loading.
parent 498d1f0a
intl
po
ABOUT-NLS
config.guess
config.sub
ltconfig
ltmain.sh
aclocal.m4
config.h.in
Makefile.in
configure
stamp-h.in
obj
......@@ -7,9 +7,9 @@ test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
PROJECT=hyperbola
PROJECT=nautilus
TEST_TYPE=-f
FILE=src/gui/hyperbola-main.c
FILE=src/Makefile.am
DIE=0
......
......@@ -26,9 +26,13 @@ AC_MSG_ERROR([
*** GLIB 1.2.0 or better is required. The latest version of GLIB
*** 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)
required.]), gdk_pixbuf gnorba bonobo)
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)
AM_PATH_LIBGLADE(,AC_MSG_ERROR([*** Libglade 0.7 or better is needed.]), gnome)
dnl Checks for typedefs, structures, and compiler characteristics.
......
bin_PROGRAMS=nautilus
INCLUDES=$(GNORBA_CFLAGS) $(GNOMEUI_CFLAGS) -DVERSION="\"$(VERSION)\""
LDADD=$(GNORBA_LIBS) $(GNOMEUI_LIBS)
LDADD=$(GNORBA_LIBS) $(GNOMEUI_LIBS) $(BONOBO_LIBS)
nautilus_SOURCES= \
ntl-content-view.h \
......
......@@ -2,6 +2,7 @@
#include "nautilus.h"
#include <gnome.h>
#include <libgnorba/gnorba.h>
#include <bonobo/gnome-bonobo.h>
static int window_count = 0;
static void
......@@ -22,13 +23,16 @@ int main(int argc, char *argv[])
GtkWidget *mainwin;
orb = gnome_CORBA_init_with_popt_table("nautilus", VERSION, &argc, argv, options, 0, &ctx, GNORBA_INIT_SERVER_FUNC, &ev);
bonobo_init(orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL);
mainwin = gtk_widget_new(nautilus_window_get_type(), "app_id", "nautilus", NULL);
bonobo_activate();
nautilus_window_set_initial_state(NAUTILUS_WINDOW(mainwin));
gtk_widget_show(mainwin);
window_count++;
gtk_signal_connect(GTK_OBJECT(mainwin), "destroy", check_for_quit, NULL);
gtk_main();
bonobo_main();
return 0;
}
......@@ -4,6 +4,8 @@
static void nautilus_window_class_init (NautilusWindowClass *klass);
static void nautilus_window_init (NautilusWindow *window);
static void nautilus_window_back (NautilusWindow *window);
static void nautilus_window_fwd (NautilusWindow *window);
static void nautilus_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
......@@ -16,6 +18,8 @@ static void nautilus_window_real_request_location_change (NautilusWindow *window
NautilusLocationReference loc,
GtkWidget *requesting_view);
#define CONTENTS_AS_HBOX
GtkType
nautilus_window_get_type(void)
{
......@@ -183,12 +187,16 @@ nautilus_window_constructed(NautilusWindow *window)
wtmp = gnome_stock_pixmap_widget(GTK_WIDGET(window), GNOME_STOCK_PIXMAP_BACK);
window->btn_back = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(window->btn_back), GTK_RELIEF_NONE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_container_add(GTK_CONTAINER(window->btn_back), wtmp);
gtk_signal_connect(GTK_OBJECT(window->btn_back), "clicked", nautilus_window_back, NULL);
wtmp = gnome_stock_pixmap_widget(GTK_WIDGET(window), GNOME_STOCK_PIXMAP_FORWARD);
window->btn_fwd = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(window->btn_fwd), GTK_RELIEF_NONE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
gtk_container_add(GTK_CONTAINER(window->btn_fwd), wtmp);
gtk_signal_connect(GTK_OBJECT(window->btn_fwd), "clicked", nautilus_window_fwd, NULL);
gtk_box_pack_start(GTK_BOX(menu_hbox), window->btn_back, FALSE, FALSE, GNOME_PAD_SMALL);
gtk_box_pack_start(GTK_BOX(menu_hbox), window->btn_fwd, FALSE, FALSE, GNOME_PAD_SMALL);
......@@ -197,17 +205,21 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
#else
window->content_hbox = gtk_hpaned_new();
gtk_widget_show(window->content_hbox);
#endif
gnome_app_set_contents(app, window->content_hbox);
window->nav_notebook = gtk_notebook_new();
gtk_widget_show(window->nav_notebook);
#if 0
gtk_box_pack_end(GTK_BOX(window->content_hbox), window->nav_notebook, FALSE, FALSE, GNOME_PAD);
window->meta_notebook = gtk_notebook_new();
gtk_widget_show(window->meta_notebook);
#ifdef CONTENTS_AS_HBOX
gtk_box_pack_end(GTK_BOX(window->content_hbox), window->meta_notebook, FALSE, FALSE, GNOME_PAD);
#else
gtk_paned_pack2(GTK_PANED(window->content_hbox), window->nav_notebook, TRUE, TRUE);
gtk_paned_pack2(GTK_PANED(window->content_hbox), window->meta_notebook, TRUE, TRUE);
#endif
gtk_widget_show_all(window->content_hbox);
}
static void
......@@ -240,7 +252,7 @@ nautilus_window_set_arg (GtkObject *object,
{
gtk_widget_ref(GTK_WIDGET(window->content_view));
gtk_container_remove(GTK_CONTAINER(window->content_hbox), GTK_WIDGET(window->content_view));
#if 0
#ifdef CONTENTS_AS_HBOX
gtk_box_pack_start(GTK_BOX(window->content_hbox), new_cv, TRUE, TRUE, GNOME_PAD);
#else
gtk_paned_pack1(GTK_PANED(window->content_hbox), new_cv, TRUE, FALSE);
......@@ -248,7 +260,7 @@ nautilus_window_set_arg (GtkObject *object,
gtk_widget_unref(GTK_WIDGET(window->content_view));
}
else
#if 0
#ifdef CONTENTS_AS_HBOX
gtk_box_pack_start(GTK_BOX(window->content_hbox), new_cv, TRUE, TRUE, GNOME_PAD);
#else
gtk_paned_pack1(GTK_PANED(window->content_hbox), new_cv, TRUE, FALSE);
......@@ -295,55 +307,65 @@ nautilus_window_close (GtkWidget *widget,
}
void
nautilus_window_set_content_view(NautilusWindow *window, GtkWidget *content_view)
nautilus_window_set_content_view(NautilusWindow *window, NautilusView *content_view)
{
gtk_object_set(GTK_OBJECT(window), "content_view", content_view, NULL);
gtk_widget_show(GTK_WIDGET(content_view));
}
static gboolean
nautilus_window_send_show_properties(GtkWidget *dockitem, GdkEventButton *event, NautilusView *nav_view)
nautilus_window_send_show_properties(GtkWidget *dockitem, GdkEventButton *event, NautilusView *meta_view)
{
if(event->button != 3)
return FALSE;
gtk_signal_emit_stop_by_name(GTK_OBJECT(dockitem), "button_press_event");
gtk_signal_emit_by_name(GTK_OBJECT(nav_view), "show_properties");
gtk_signal_emit_by_name(GTK_OBJECT(meta_view), "show_properties");
return TRUE;
}
void
nautilus_window_add_meta_view(NautilusWindow *window, NautilusView *nav_view)
nautilus_window_add_meta_view(NautilusWindow *window, NautilusView *meta_view)
{
GtkWidget *label;
const char *desc;
char cbuf[32];
g_return_if_fail(!g_slist_find(window->nav_views, nav_view));
g_return_if_fail(NAUTILUS_IS_META_VIEW(nav_view));
g_return_if_fail(!g_slist_find(window->meta_views, meta_view));
g_return_if_fail(NAUTILUS_IS_META_VIEW(meta_view));
label = gtk_label_new(nautilus_meta_view_get_description(NAUTILUS_META_VIEW(nav_view)));
desc = nautilus_meta_view_get_description(NAUTILUS_META_VIEW(meta_view));
if(!desc)
{
desc = cbuf;
g_snprintf(cbuf, sizeof(cbuf), "%p", meta_view);
}
label = gtk_label_new(desc);
gtk_widget_show(label);
gtk_notebook_prepend_page(GTK_NOTEBOOK(window->nav_notebook), GTK_WIDGET(nav_view), label);
gtk_widget_show(GTK_WIDGET(nav_view));
gtk_signal_connect(GTK_OBJECT(label), "button_press_event",
GTK_SIGNAL_FUNC(nautilus_window_send_show_properties), meta_view);
gtk_notebook_prepend_page(GTK_NOTEBOOK(window->meta_notebook), GTK_WIDGET(meta_view), label);
gtk_widget_show(GTK_WIDGET(meta_view));
window->nav_views = g_slist_prepend(window->nav_views, nav_view);
window->meta_views = g_slist_prepend(window->meta_views, meta_view);
}
void
nautilus_window_remove_meta_view(NautilusWindow *window, NautilusView *nav_view)
nautilus_window_remove_meta_view(NautilusWindow *window, NautilusView *meta_view)
{
gint pagenum;
g_return_if_fail(g_slist_find(window->nav_views, nav_view));
g_return_if_fail(g_slist_find(window->meta_views, meta_view));
window->nav_views = g_slist_remove(window->nav_views, nav_view);
window->meta_views = g_slist_remove(window->meta_views, meta_view);
pagenum = gtk_notebook_page_num(GTK_NOTEBOOK(window->nav_notebook), GTK_WIDGET(nav_view));
pagenum = gtk_notebook_page_num(GTK_NOTEBOOK(window->meta_notebook), GTK_WIDGET(meta_view));
g_return_if_fail(pagenum >= 0);
gtk_notebook_remove_page(GTK_NOTEBOOK(window->nav_notebook), pagenum);
gtk_notebook_remove_page(GTK_NOTEBOOK(window->meta_notebook), pagenum);
}
void
......@@ -361,14 +383,40 @@ nautilus_window_request_location_change(NautilusWindow *window,
}
static void
nautilus_window_real_request_location_change (NautilusWindow *window,
NautilusLocationReference loc,
GtkWidget *requesting_view)
nautilus_window_change_location(NautilusWindow *window,
NautilusLocationReference loc,
GtkWidget *requesting_view,
gboolean is_back)
{
guint signum;
GSList *cur;
NautilusNavigationInfo loci_spot, *loci;
/* Update history */
if(is_back)
{
window->uris_next = g_slist_prepend(window->uris_next, window->uris_prev->data);
window->uris_prev = g_slist_remove(window->uris_prev, window->uris_prev->data);
}
else
{
char *append_val;
if(window->uris_next && !strcmp(loc, window->uris_next->data))
{
append_val = window->uris_next->data;
window->uris_next = g_slist_remove(window->uris_next, window->uris_next->data);
}
else
{
append_val = g_strdup(loc);
g_slist_foreach(window->uris_next, (GFunc)g_free, NULL);
g_slist_free(window->uris_next);
}
window->uris_prev = g_slist_prepend(window->uris_prev, append_val);
}
gtk_widget_set_sensitive(window->btn_back, window->uris_prev?TRUE:FALSE);
gtk_widget_set_sensitive(window->btn_fwd, window->uris_next?TRUE:FALSE);
memset(&loci_spot, 0, sizeof(loci_spot));
loci = &loci_spot;
loci->requested_uri = loci->actual_uri = loc;
......@@ -377,7 +425,7 @@ nautilus_window_real_request_location_change (NautilusWindow *window,
signum = gtk_signal_lookup("notify_location_change", nautilus_view_get_type());
for(cur = window->nav_views; cur; cur = cur->next)
for(cur = window->meta_views; cur; cur = cur->next)
gtk_signal_emit(GTK_OBJECT(cur->data), signum, loci, window->content_view, requesting_view);
gtk_signal_emit(GTK_OBJECT(window->content_view), signum, loci, window->content_view, requesting_view);
......@@ -388,10 +436,17 @@ nautilus_window_real_request_location_change (NautilusWindow *window,
window->actual_current_uri = loci->actual_uri;
}
static void
nautilus_window_real_request_location_change (NautilusWindow *window,
NautilusLocationReference loc,
GtkWidget *requesting_view)
{
nautilus_window_change_location(window, loc, requesting_view, FALSE);
}
void
nautilus_window_save_state(NautilusWindow *window, const char *config_path)
{
#if 0
GSList *cur;
int n;
guint signum;
......@@ -400,7 +455,7 @@ nautilus_window_save_state(NautilusWindow *window, const char *config_path)
gnome_config_push_prefix(config_path);
if(window->content_view)
{
gnome_config_set_string("content_view_type", gtk_type_name(GTK_OBJECT_TYPE(window->content_view)));
gnome_config_set_string("content_view_type", NAUTILUS_VIEW(window->content_view)->iid);
g_snprintf(cbuf, sizeof(cbuf), "%s/Content_View/", config_path);
gnome_config_push_prefix(cbuf);
......@@ -413,16 +468,21 @@ nautilus_window_save_state(NautilusWindow *window, const char *config_path)
gnome_config_set_string("content_view_type", "NONE");
n = g_slist_length(window->nav_views);
gnome_config_set_int("num_nav_views", n);
n = g_slist_length(window->meta_views);
signum = gtk_signal_lookup("save_state", nautilus_view_get_type());
for(n = 0, cur = window->nav_views; cur; cur = cur->next, n++)
for(n = 0, cur = window->meta_views; cur; cur = cur->next, n++)
{
g_snprintf(cbuf, sizeof(cbuf), "nav_view_%d_type=0", n);
if(!NAUTILUS_VIEW(cur->data)->iid)
{
continue;
n--;
}
gnome_config_set_string(cbuf, gtk_type_name(GTK_OBJECT_TYPE(cur->data)));
g_snprintf(cbuf, sizeof(cbuf), "meta_view_%d_type=0", n);
g_snprintf(cbuf, sizeof(cbuf), "%s/Nav_View_%d/", config_path, n);
gnome_config_set_string(cbuf, NAUTILUS_VIEW(cur->data)->iid);
g_snprintf(cbuf, sizeof(cbuf), "%s/Meta_View_%d/", config_path, n);
gnome_config_push_prefix(cbuf);
......@@ -430,50 +490,45 @@ nautilus_window_save_state(NautilusWindow *window, const char *config_path)
gnome_config_pop_prefix();
}
gnome_config_set_int("num_meta_views", n);
gnome_config_pop_prefix();
#endif
}
void
nautilus_window_set_initial_state(NautilusWindow *window)
{
#if 0
GSList *cur;
GtkRequisition sreq;
GdkGeometry geo;
NautilusView *view;
/* Remove old stuff */
for(cur = window->nav_views; cur; cur = cur->next)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window,
NAUTILUS_VIEW(gtk_widget_new(nautilus_content_gtkhtml_get_type(),
"main_window", window, NULL))
view = NAUTILUS_VIEW(gtk_widget_new(nautilus_content_view_get_type(),
"main_window", window, NULL))
);
nautilus_window_add_meta_view(window, NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_location_get_type(),
"main_window", window, NULL))
);
nautilus_window_add_meta_view(window, NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_history_get_type(),
"main_window", window, NULL))
);
nautilus_window_add_meta_view(window, NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_tree_get_type(),
"main_window", window, NULL))
nautilus_view_load_client(view, "control:clock");
nautilus_window_add_meta_view(window, view = NAUTILUS_VIEW(gtk_widget_new(nautilus_meta_view_get_type(),
"main_window", window, NULL))
);
nautilus_view_load_client(view, "control:clock");
gtk_widget_size_request(GTK_WIDGET(window), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->content_hbox), &sreq);
gtk_widget_size_request(GTK_WIDGET(window->nav_notebook), &sreq);
geo.min_width = window->nav_notebook->requisition.width + MAX(400, GTK_WIDGET(window->content_view)->requisition.width);
geo.min_height = window->nav_notebook->requisition.height + MAX(200, GTK_WIDGET(window->content_view)->requisition.height);
gtk_widget_size_request(GTK_WIDGET(window->meta_notebook), &sreq);
geo.min_width = window->meta_notebook->requisition.width + MAX(400, GTK_WIDGET(window->content_view)->requisition.width);
geo.min_height = window->meta_notebook->requisition.height + MAX(200, GTK_WIDGET(window->content_view)->requisition.height);
geo.base_width = geo.min_width;
geo.base_height = geo.min_height;
gtk_window_set_geometry_hints(GTK_WINDOW(window), NULL, &geo,
GDK_HINT_BASE_SIZE|GDK_HINT_MIN_SIZE);
gtk_window_set_default_size(GTK_WINDOW(window), geo.min_width, geo.min_height);
#ifndef CONTENTS_AS_HBOX
gtk_paned_set_position(GTK_PANED(window->content_hbox), MAX(400, GTK_WIDGET(window->content_view)->requisition.width));
#endif
}
......@@ -481,7 +536,6 @@ nautilus_window_set_initial_state(NautilusWindow *window)
void
nautilus_window_load_state(NautilusWindow *window, const char *config_path)
{
#if 0
char *vtype;
GSList *cur;
int i, n;
......@@ -489,7 +543,7 @@ nautilus_window_load_state(NautilusWindow *window, const char *config_path)
char cbuf[1024];
/* Remove old stuff */
for(cur = window->nav_views; cur; cur = cur->next)
for(cur = window->meta_views; cur; cur = cur->next)
nautilus_window_remove_meta_view(window, NAUTILUS_VIEW(cur->data));
nautilus_window_set_content_view(window, NULL);
......@@ -502,13 +556,9 @@ nautilus_window_load_state(NautilusWindow *window, const char *config_path)
if(vtype && strcmp(vtype, "NONE")) /* Create new content view */
{
GtkWidget *w;
GtkType wt;
wt = gtk_type_from_name(vtype);
g_assert(wt);
g_assert(gtk_type_is_a(wt, NAUTILUS_TYPE_VIEW));
w = gtk_widget_new(wt, "main_window", window, NULL);
w = gtk_widget_new(nautilus_content_view_get_type(), "main_window", window, NULL);
nautilus_view_load_client(NAUTILUS_VIEW(w), vtype);
nautilus_window_set_content_view(window, NAUTILUS_VIEW(w));
g_snprintf(cbuf, sizeof(cbuf), "%s/Content_View/", config_path);
......@@ -520,23 +570,18 @@ nautilus_window_load_state(NautilusWindow *window, const char *config_path)
}
g_free(vtype);
n = gnome_config_get_int("num_nav_views=0");
n = gnome_config_get_int("num_meta_views=0");
for(i = 0; i < n; n++)
{
GtkType nvt;
GtkWidget *nvw;
g_snprintf(cbuf, sizeof(cbuf), "%s/nav_view_%d_type=0", config_path, i);
g_snprintf(cbuf, sizeof(cbuf), "%s/meta_view_%d_type=0", config_path, i);
vtype = gnome_config_get_string(cbuf);
nvt = gtk_type_from_name(vtype);
g_free(vtype);
g_assert(nvt);
g_assert(gtk_type_is_a(nvt, NAUTILUS_TYPE_VIEW));
nvw = gtk_widget_new(nvt, "main_window", window, NULL);
nvw = gtk_widget_new(nautilus_meta_view_get_type(), "main_window", window, NULL);
nautilus_view_load_client(NAUTILUS_VIEW(nvw), vtype);
g_snprintf(cbuf, sizeof(cbuf), "%s/Nav_View_%d/", config_path, i);
g_snprintf(cbuf, sizeof(cbuf), "%s/Meta_View_%d/", config_path, i);
gnome_config_push_prefix(cbuf);
gtk_signal_emit(GTK_OBJECT(cur->data), signum, cbuf);
......@@ -546,5 +591,28 @@ nautilus_window_load_state(NautilusWindow *window, const char *config_path)
}
gnome_config_pop_prefix();
#endif
}
static void
nautilus_window_back (NautilusWindow *window)
{
char *uri;
g_assert(window->uris_prev);
uri = window->uris_prev->data;
nautilus_window_change_location(window, uri, NULL, TRUE);
}
static void
nautilus_window_fwd (NautilusWindow *window)
{
char *uri;
g_assert(window->uris_next);
uri = window->uris_next->data;
nautilus_window_change_location(window, uri, NULL, FALSE);
}
......@@ -3,6 +3,7 @@
#include <libgnomeui/gnome-app.h>
#include "ntl-types.h"
#include "ntl-view.h"
#define NAUTILUS_TYPE_WINDOW (nautilus_window_get_type())
#define NAUTILUS_WINDOW(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_WINDOW, NautilusWindow))
......@@ -28,9 +29,11 @@ struct _NautilusWindow {
GtkWidget *content_view;
GSList *nav_views;
GtkWidget *nav_notebook, *content_hbox, *btn_back, *btn_fwd;
GSList *meta_views;
GtkWidget *meta_notebook, *content_hbox, *btn_back, *btn_fwd;
NautilusLocationReference current_uri, actual_current_uri;
GSList *uris_prev, *uris_next;
};
GtkType nautilus_window_get_type(void);
......@@ -41,5 +44,8 @@ void nautilus_window_request_location_change(NautilusWindow *window,
void nautilus_window_save_state(NautilusWindow *window, const char *config_path);
void nautilus_window_load_state(NautilusWindow *window, const char *config_path);
void nautilus_window_set_initial_state(NautilusWindow *window);
void nautilus_window_set_content_view(NautilusWindow *window, NautilusView *content_view);
void nautilus_window_add_meta_view(NautilusWindow *window, NautilusView *meta_view);
void nautilus_window_remove_meta_view(NautilusWindow *window, NautilusView *meta_view);
#endif
......@@ -4,6 +4,8 @@
static void nautilus_window_class_init (NautilusWindowClass *klass);
static void nautilus_window_init (NautilusWindow *window);
static void nautilus_window_back (NautilusWindow *window);
static void nautilus_window_fwd (NautilusWindow *window);
static void nautilus_window_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
......@@ -16,6 +18,8 @@ static void nautilus_window_real_request_location_change (NautilusWindow *window
NautilusLocationReference loc,
GtkWidget *requesting_view);
#define CONTENTS_AS_HBOX
GtkType
nautilus_window_get_type(void)
{
......@@ -183,12 +187,16 @@ nautilus_window_constructed(NautilusWindow *window)
wtmp = gnome_stock_pixmap_widget(GTK_WIDGET(window), GNOME_STOCK_PIXMAP_BACK);
window->btn_back = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(window->btn_back), GTK_RELIEF_NONE);
gtk_widget_set_sensitive(window->btn_back, FALSE);
gtk_container_add(GTK_CONTAINER(window->btn_back), wtmp);
gtk_signal_connect(GTK_OBJECT(window->btn_back), "clicked", nautilus_window_back, NULL);
wtmp = gnome_stock_pixmap_widget(GTK_WIDGET(window), GNOME_STOCK_PIXMAP_FORWARD);
window->btn_fwd = gtk_button_new();
gtk_button_set_relief(GTK_BUTTON(window->btn_fwd), GTK_RELIEF_NONE);
gtk_widget_set_sensitive(window->btn_fwd, FALSE);
gtk_container_add(GTK_CONTAINER(window->btn_fwd), wtmp);
gtk_signal_connect(GTK_OBJECT(window->btn_fwd), "clicked", nautilus_window_fwd, NULL);
gtk_box_pack_start(GTK_BOX(menu_hbox), window->btn_back, FALSE, FALSE, GNOME_PAD_SMALL);
gtk_box_pack_start(GTK_BOX(menu_hbox), window->btn_fwd, FALSE, FALSE, GNOME_PAD_SMALL);
......@@ -197,17 +205,21 @@ nautilus_window_constructed(NautilusWindow *window)
gtk_window_set_policy(GTK_WINDOW(window), FALSE, TRUE, FALSE);
#ifdef CONTENTS_AS_HBOX
window->content_hbox = gtk_hbox_new(FALSE, GNOME_PAD_SMALL);
#else
window->content_hbox = gtk_hpaned_new();
gtk_widget_show(window->content_hbox);
#endif
gnome_app_set_contents(app, window->content_hbox);
window->nav_notebook = gtk_notebook_new();
gtk_widget_show(window->nav_notebook);
#if 0
gtk_box_pack_end(GTK_BOX(window->content_hbox), window->nav_notebook, FALSE, FALSE, GNOME_PAD);
window->meta_notebook = gtk_notebook_new();
gtk_widget_show(window->meta_notebook);
#ifdef CONTENTS_AS_HBOX
gtk_box_pack_end(GTK_BOX(window->content_hbox), window->meta_notebook, FALSE, FALSE, GNOME_PAD);
#else
gtk_paned_pack2(GTK_PANED(window->content_hbox), window->nav_notebook, TRUE, TRUE);
gtk_paned_pack2(GTK_PANED(window->content_hbox), window->meta_notebook, TRUE, TRUE);
#endif
gtk_widget_show_all(window->content_hbox);
}
static void
......@@ -240,7 +252,7 @@ nautilus_window_set_arg (GtkObject *object,
{
gtk_widget_ref(GTK_WIDGET(window->content_view));
gtk_container_remove(GTK_CONTAINER(window->content_hbox), GTK_WIDGET(window->content_view));
#if 0
#ifdef CONTENTS_AS_HBOX
gtk_box_pack_start(GTK_BOX(window->content_hbox