Commit 0018d98d authored by Maciej Stachowiak's avatar Maciej Stachowiak

Renamed from libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,

	* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h,
	libnautilus/ntl-content-view-frame.c,
	libnautilus/ntl-content-view-frame.h,
	libnautilus/ntl-meta-view-frame.c,
	libnautilus/ntl-meta-view-frame.h: Renamed from
	libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
	libnautilus/ntl-content-view-client.c,
	libnautilus/ntl-content-view-client.h,
	libnautilus/ntl-meta-view-client.c,
	libnautilus/ntl-meta-view-client.h.
	* libnautilus/Makefile.am, libnautilus/libnautilus.h: reflect this
	renaming.
parent e0ad6560
2000-01-10 Maciej Stachowiak <mjs@eazel.com>
* libnautilus/ntl-view-frame.c, libnautilus/ntl-view-frame.h,
libnautilus/ntl-content-view-frame.c,
libnautilus/ntl-content-view-frame.h,
libnautilus/ntl-meta-view-frame.c,
libnautilus/ntl-meta-view-frame.h: Renamed from
libnautilus/ntl-view-client.c, libnautilus/ntl-view-client.h,
libnautilus/ntl-content-view-client.c,
libnautilus/ntl-content-view-client.h,
libnautilus/ntl-meta-view-client.c,
libnautilus/ntl-meta-view-client.h.
* libnautilus/Makefile.am, libnautilus/libnautilus.h: reflect this
renaming.
2000-01-10 Darin Adler <darin@eazel.com>
* ntl-window-msgs.c: (nautilus_window_request_progress_change):
......
......@@ -28,9 +28,9 @@ libnautilusinclude_HEADERS= \
nautilus-lib-self-check-functions.h \
nautilus-self-checks.h \
nautilus-string.h \
ntl-content-view-client.h \
ntl-meta-view-client.h \
ntl-view-client.h
ntl-content-view-frame.h \
ntl-meta-view-frame.h \
ntl-view-frame.h
libnautilus_la_SOURCES=$(nautilus_idl_sources) \
gdk-extensions.c \
......@@ -46,9 +46,9 @@ libnautilus_la_SOURCES=$(nautilus_idl_sources) \
nautilus-lib-self-check-functions.c \
nautilus-self-checks.c \
nautilus-string.c \
ntl-content-view-client.c \
ntl-meta-view-client.c \
ntl-view-client.c \
ntl-content-view-frame.c \
ntl-meta-view-frame.c \
ntl-view-frame.c \
$(fsextension_idl_sources)
libnautilus_la_LDFLAGS=$(GNOME_LIBS) \
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus clients.
* libnautilus: A library for nautilus view components.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
......@@ -29,8 +29,8 @@
#include <bonobo/gnome-bonobo.h>
#include <libnautilus/nautilus.h>
#include <libnautilus/ntl-view-client.h>
#include <libnautilus/ntl-meta-view-client.h>
#include <libnautilus/ntl-content-view-client.h>
#include <libnautilus/ntl-view-frame.h>
#include <libnautilus/ntl-meta-view-frame.h>
#include <libnautilus/ntl-content-view-frame.h>
#endif
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus view implementations.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-content-view-client.c: Implementation for object that
represents the frame a nautilus content view plugs into. */
#include "libnautilus.h"
typedef struct {
POA_Nautilus_View servant;
gpointer gnome_object;
NautilusContentViewFrame *view;
} impl_POA_Nautilus_ContentView;
extern POA_Nautilus_View__epv libnautilus_Nautilus_View_epv;
static POA_Nautilus_ContentView__epv impl_Nautilus_ContentView_epv = {
NULL /* _private */
};
static PortableServer_ServantBase__epv base_epv = { NULL, NULL, NULL };
static POA_Nautilus_ContentView__vepv impl_Nautilus_ContentView_vepv =
{
&base_epv,
NULL,
&libnautilus_Nautilus_View_epv,
&impl_Nautilus_ContentView_epv
};
static void nautilus_content_view_frame_init (NautilusContentViewFrame *view);
static void nautilus_content_view_frame_destroy (NautilusContentViewFrame *view);
static void nautilus_content_view_frame_class_init (NautilusContentViewFrameClass *klass);
GtkType
nautilus_content_view_frame_get_type (void)
{
static GtkType view_frame_type = 0;
if (!view_frame_type)
{
const GtkTypeInfo view_frame_info =
{
"NautilusContentViewFrame",
sizeof (NautilusContentViewFrame),
sizeof (NautilusContentViewFrameClass),
(GtkClassInitFunc) nautilus_content_view_frame_class_init,
(GtkObjectInitFunc) nautilus_content_view_frame_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
view_frame_type = gtk_type_unique (nautilus_view_frame_get_type(), &view_frame_info);
}
return view_frame_type;
}
static void
nautilus_content_view_frame_init (NautilusContentViewFrame *view)
{
}
static void
nautilus_content_view_frame_destroy (NautilusContentViewFrame *view)
{
NautilusViewFrameClass *klass = NAUTILUS_VIEW_FRAME_CLASS(GTK_OBJECT(view)->klass);
if(((GtkObjectClass *)klass->parent_class)->destroy)
((GtkObjectClass *)klass->parent_class)->destroy((GtkObject *)view);
}
static void
nautilus_content_view_frame_class_init (NautilusContentViewFrameClass *klass)
{
NautilusViewFrameClass *view_class = ((NautilusViewFrameClass *)klass);
GTK_OBJECT_CLASS(klass)->destroy = (void (*)(GtkObject *))nautilus_content_view_frame_destroy;
view_class->servant_init_func = POA_Nautilus_ContentView__init;
view_class->servant_destroy_func = POA_Nautilus_ContentView__fini;
view_class->vepv = &impl_Nautilus_ContentView_vepv;
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus view implementations.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-content-view-client.h: Interface for object that represents a
the frame a nautilus content view plugs into. */
#ifndef NTL_CONTENT_VIEW_FRAME_H
#define NTL_CONTENT_VIEW_FRAME_H
#include <libnautilus/ntl-view-client.h>
#define NAUTILUS_TYPE_CONTENT_VIEW_FRAME (nautilus_content_view_frame_get_type ())
#define NAUTILUS_CONTENT_VIEW_FRAME(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_CONTENT_VIEW_FRAME, NautilusContentViewFrame))
#define NAUTILUS_CONTENT_VIEW_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_CONTENT_VIEW_FRAME, NautilusContentViewFrameClass))
#define NAUTILUS_IS_CONTENT_VIEW_FRAME(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_CONTENT_VIEW_FRAME))
#define NAUTILUS_IS_CONTENT_VIEW_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_CONTENT_VIEW_FRAME))
typedef struct _NautilusContentViewFrame NautilusContentViewFrame;
typedef struct _NautilusContentViewFrameClass NautilusContentViewFrameClass;
struct _NautilusContentViewFrameClass {
NautilusViewFrameClass parent_spot;
};
struct _NautilusContentViewFrame {
NautilusViewFrame parent;
};
GtkType nautilus_content_view_frame_get_type (void);
#endif
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus view implementations.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-meta-view-client.c: Implementation for object that represents a
nautilus meta view implementation. */
#include "libnautilus.h"
typedef struct {
POA_Nautilus_View servant;
gpointer gnome_object;
NautilusMetaViewFrame *view;
} impl_POA_Nautilus_MetaView;
extern POA_Nautilus_View__epv libnautilus_Nautilus_View_epv;
static POA_Nautilus_MetaView__epv impl_Nautilus_MetaView_epv = {
NULL /* _private */
};
static PortableServer_ServantBase__epv base_epv = { NULL, NULL, NULL };
static POA_Nautilus_MetaView__vepv impl_Nautilus_MetaView_vepv =
{
&base_epv,
NULL,
&libnautilus_Nautilus_View_epv,
&impl_Nautilus_MetaView_epv
};
static void nautilus_meta_view_frame_init (NautilusMetaViewFrame *view);
static void nautilus_meta_view_frame_destroy (NautilusMetaViewFrame *view);
static void nautilus_meta_view_frame_class_init (NautilusMetaViewFrameClass *klass);
GtkType
nautilus_meta_view_frame_get_type (void)
{
static GtkType view_frame_type = 0;
if (!view_frame_type)
{
const GtkTypeInfo view_frame_info =
{
"NautilusMetaViewFrame",
sizeof (NautilusMetaViewFrame),
sizeof (NautilusMetaViewFrameClass),
(GtkClassInitFunc) nautilus_meta_view_frame_class_init,
(GtkObjectInitFunc) nautilus_meta_view_frame_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
view_frame_type = gtk_type_unique (nautilus_view_frame_get_type(), &view_frame_info);
}
return view_frame_type;
}
static void
nautilus_meta_view_frame_init (NautilusMetaViewFrame *view)
{
}
static void
nautilus_meta_view_frame_destroy (NautilusMetaViewFrame *view)
{
NautilusViewFrameClass *klass = NAUTILUS_VIEW_FRAME_CLASS(GTK_OBJECT(view)->klass);
if(((GtkObjectClass *)klass->parent_class)->destroy)
((GtkObjectClass *)klass->parent_class)->destroy((GtkObject *)view);
}
static void
nautilus_meta_view_frame_class_init (NautilusMetaViewFrameClass *klass)
{
NautilusViewFrameClass *view_class = ((NautilusViewFrameClass *)klass);
GTK_OBJECT_CLASS(klass)->destroy = (void (*)(GtkObject *))nautilus_meta_view_frame_destroy;
view_class->servant_init_func = POA_Nautilus_MetaView__init;
view_class->servant_destroy_func = POA_Nautilus_MetaView__fini;
view_class->vepv = &impl_Nautilus_MetaView_vepv;
}
void
nautilus_meta_view_frame_set_label(NautilusMetaViewFrame *mvc, const char *label)
{
GnomeObject *ctl;
GnomePropertyBag *bag;
ctl = nautilus_view_frame_get_gnome_object(NAUTILUS_VIEW_FRAME(mvc));
bag = gnome_control_get_property_bag(GNOME_CONTROL(ctl));
if(!bag)
{
bag = gnome_property_bag_new();
gnome_control_set_property_bag(GNOME_CONTROL(ctl), bag);
}
gnome_property_bag_add(bag, "label", "string",
g_strdup(label), g_strdup(label),
_("Label"), GNOME_PROPERTY_READ_ONLY);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus view implementations.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-meta-view-client.h: Interface for object that represents the
frame a nautilus meta view plugs into. */
#ifndef NTL_META_VIEW_FRAME_H
#define NTL_META_VIEW_FRAME_H
#include <libnautilus/ntl-view-client.h>
#define NAUTILUS_TYPE_META_VIEW_FRAME (nautilus_meta_view_frame_get_type ())
#define NAUTILUS_META_VIEW_FRAME(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_META_VIEW_FRAME, NautilusMetaViewFrame))
#define NAUTILUS_META_VIEW_FRAME_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_META_VIEW_FRAME, NautilusMetaViewFrameClass))
#define NAUTILUS_IS_META_VIEW_FRAME(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_META_VIEW_FRAME))
#define NAUTILUS_IS_META_VIEW_FRAME_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), NAUTILUS_TYPE_META_VIEW_FRAME))
typedef struct _NautilusMetaViewFrame NautilusMetaViewFrame;
typedef struct _NautilusMetaViewFrameClass NautilusMetaViewFrameClass;
struct _NautilusMetaViewFrameClass {
NautilusViewFrameClass parent_spot;
};
struct _NautilusMetaViewFrame {
NautilusViewFrame parent;
};
GtkType nautilus_meta_view_frame_get_type (void);
void nautilus_meta_view_frame_set_label(NautilusMetaViewFrame *mvc,
const char *label);
#endif
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 2 -*- */
/*
* libnautilus: A library for nautilus view implementations.
*
* Copyright (C) 1999, 2000 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Author: Elliot Lee <sopwith@redhat.com>
*
*/
/* ntl-view-client.c: Implementation for object that represents a
nautilus view implementation. */
#include <gtk/gtk.h>
#include "libnautilus.h"
typedef struct {
POA_Nautilus_View servant;
gpointer gnome_object;
NautilusViewFrame *view;
} impl_POA_Nautilus_View;
static void
impl_Nautilus_View_save_state(impl_POA_Nautilus_View * servant,
CORBA_char * config_path,
CORBA_Environment * ev);
static void
impl_Nautilus_View_load_state(impl_POA_Nautilus_View * servant,
CORBA_char * config_path,
CORBA_Environment * ev);
static void
impl_Nautilus_View_notify_location_change(impl_POA_Nautilus_View * servant,
Nautilus_NavigationInfo * navinfo,
CORBA_Environment * ev);
static void
impl_Nautilus_View_show_properties(impl_POA_Nautilus_View * servant,
CORBA_Environment * ev);
static void
impl_Nautilus_View_notify_selection_change(impl_POA_Nautilus_View * servant,
Nautilus_SelectionInfo * selinfo,
CORBA_Environment * ev);
static void
impl_Nautilus_View_stop_location_change(impl_POA_Nautilus_View * servant,
CORBA_Environment * ev);
POA_Nautilus_View__epv libnautilus_Nautilus_View_epv =
{
NULL, /* _private */
(gpointer) & impl_Nautilus_View_save_state,
(gpointer) & impl_Nautilus_View_load_state,
(gpointer) & impl_Nautilus_View_notify_location_change,
(gpointer) & impl_Nautilus_View_show_properties,
(gpointer) & impl_Nautilus_View_notify_selection_change,
(gpointer) & impl_Nautilus_View_stop_location_change
};
static PortableServer_ServantBase__epv base_epv = { NULL, NULL, NULL };
static POA_Nautilus_View__vepv impl_Nautilus_View_vepv =
{
&base_epv,
NULL,
&libnautilus_Nautilus_View_epv
};
static void
impl_Nautilus_View_save_state(impl_POA_Nautilus_View * servant,
CORBA_char * config_path,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "save_state", config_path);
}
static void
impl_Nautilus_View_load_state(impl_POA_Nautilus_View * servant,
CORBA_char * config_path,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "load_state", config_path);
}
static void
impl_Nautilus_View_notify_location_change(impl_POA_Nautilus_View * servant,
Nautilus_NavigationInfo * navinfo,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "notify_location_change", navinfo);
}
static void
impl_Nautilus_View_show_properties(impl_POA_Nautilus_View * servant,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "show_properties");
}
static void
impl_Nautilus_View_notify_selection_change(impl_POA_Nautilus_View * servant,
Nautilus_SelectionInfo * selinfo,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "notify_selection_change", selinfo);
}
static void
impl_Nautilus_View_stop_location_change(impl_POA_Nautilus_View * servant,
CORBA_Environment * ev)
{
gtk_signal_emit_by_name(GTK_OBJECT(servant->view), "stop_location_change");
}
static void
impl_Nautilus_View__destroy(GnomeObject *obj, impl_POA_Nautilus_View *servant)
{
PortableServer_ObjectId *objid;
CORBA_Environment ev;
void (*servant_destroy_func)(PortableServer_Servant servant, CORBA_Environment *ev);
CORBA_exception_init(&ev);
servant_destroy_func = NAUTILUS_VIEW_FRAME_CLASS(GTK_OBJECT(servant->view)->klass)->servant_destroy_func;
objid = PortableServer_POA_servant_to_id(bonobo_poa(), servant, &ev);
PortableServer_POA_deactivate_object(bonobo_poa(), objid, &ev);
CORBA_free(objid);
obj->servant = NULL;
servant_destroy_func((PortableServer_Servant) servant, &ev);
g_free(servant);
CORBA_exception_free(&ev);
}
static GnomeObject *
impl_Nautilus_View__create(NautilusViewFrame *view, CORBA_Environment * ev)
{
GnomeObject *retval;
impl_POA_Nautilus_View *newservant;
void (*servant_init_func)(PortableServer_Servant servant, CORBA_Environment *ev);
NautilusViewFrameClass *view_class = NAUTILUS_VIEW_FRAME_CLASS(GTK_OBJECT(view)->klass);
servant_init_func = view_class->servant_init_func;
newservant = g_new0(impl_POA_Nautilus_View, 1);
newservant->servant.vepv = view_class->vepv;
if(!newservant->servant.vepv->GNOME_Unknown_epv)
newservant->servant.vepv->GNOME_Unknown_epv = gnome_object_get_epv();
servant_init_func((PortableServer_Servant) newservant, ev);
newservant->view = view;
retval = gnome_object_new_from_servant(newservant);
gtk_signal_connect(GTK_OBJECT(retval), "destroy", GTK_SIGNAL_FUNC(impl_Nautilus_View__destroy), newservant);
return retval;
}
static void nautilus_view_frame_init (NautilusViewFrame *view);
static void nautilus_view_frame_destroy (NautilusViewFrame *view);
static void nautilus_view_frame_class_init (NautilusViewFrameClass *klass);
static void nautilus_view_frame_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_view_frame_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void nautilus_view_frame_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void nautilus_view_frame_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
GtkType
nautilus_view_frame_get_type (void)
{
static GtkType view_frame_type = 0;