aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--configure.in33
-rw-r--r--data/.cvsignore1
-rw-r--r--data/GNOME_Epiphany_NautilusView.server.in22
-rw-r--r--data/Makefile.am11
-rw-r--r--data/ui/.cvsignore6
-rw-r--r--data/ui/Makefile.am5
-rw-r--r--data/ui/nautilus-epiphany-view.xml128
-rw-r--r--doc/reference/Makefile.am5
-rw-r--r--embed/Makefile.am2
-rw-r--r--embed/ephy-embed-popup-control.c705
-rw-r--r--embed/ephy-embed-popup-control.h72
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/ephy-bonobo-extensions.c91
-rw-r--r--lib/ephy-bonobo-extensions.h49
-rw-r--r--po/POTFILES.in4
-rw-r--r--src/Makefile.am17
-rw-r--r--src/ephy-nautilus-view.c636
-rw-r--r--src/ephy-nautilus-view.h59
-rw-r--r--src/ephy-shell.c12
20 files changed, 26 insertions, 1858 deletions
diff --git a/ChangeLog b/ChangeLog
index f72d4a8e5..e99547c7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,29 @@
2004-03-29 Christian Persch <chpe@cvs.gnome.org>
+ * configure.in:
+ * data/.cvsignore:
+ * data/GNOME_Epiphany_NautilusView.server.in:
+ * data/Makefile.am:
+ * data/ui/.cvsignore:
+ * data/ui/Makefile.am:
+ * data/ui/nautilus-epiphany-view.xml:
+ * doc/reference/Makefile.am:
+ * embed/Makefile.am:
+ * embed/ephy-embed-popup-control.c:
+ * embed/ephy-embed-popup-control.h:
+ * lib/Makefile.am:
+ * lib/ephy-bonobo-extensions.c:
+ * lib/ephy-bonobo-extensions.h:
+ * po/POTFILES.in:
+ * src/Makefile.am:
+ * src/ephy-nautilus-view.c:
+ * src/ephy-nautilus-view.h:
+ * src/ephy-shell.c: (ephy_automation_factory_cb):
+
+ Removed the nautilus view.
+
+2004-03-29 Christian Persch <chpe@cvs.gnome.org>
+
* src/ephy-completion-model.h:
Make EphyCompletionColumn a typedef enum, fixes bug #136878.
diff --git a/configure.in b/configure.in
index 0eaaf3985..74d08c3d6 100644
--- a/configure.in
+++ b/configure.in
@@ -24,7 +24,6 @@ LIBBONOBOUI_REQUIRED=2.1.1
LIBXML_REQUIRED=2.6.6
LIBGNOMEVFS_REQUIRED=2.3.1
LIBGLADE_REQUIRED=2.3.1
-LIBNAUTILUS_REQUIRED=2.5
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTK_REQUIRED)
@@ -32,7 +31,6 @@ AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_SUBST(LIBXML_REQUIRED)
AC_SUBST(LIBGNOMEVFS_REQUIRED)
AC_SUBST(LIBGLADE_REQUIRED)
-AC_SUBST(LIBNAUTILUS_REQUIRED)
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
@@ -53,37 +51,6 @@ GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS(error)
GNOME_CXX_WARNINGS(yes, yes)
-dnl ******************************
-dnl Nautilus View checking
-dnl ******************************
-
-build_nautilus_view=no
-AC_ARG_ENABLE(nautilus-view, [ --enable-nautilus-view (auto,yes,no)
- Enable Nautilus View Epiphany Component])
-
-AC_MSG_CHECKING(if NautilusView Epiphany component is wanted)
-if test "x$enable_nautilus_view" = "x" ; then
- enable_nautilus_view=auto
-fi
-if test "x$enable_nautilus_view" = "xauto"; then
- temptest=`pkg-config --cflags libnautilus 2> /dev/null`
- if test "x$temptest" = "x" ; then
- enable_nautilus_view=no
- else
- enable_nautilus_view=yes
- fi
-fi
-AC_MSG_RESULT($enable_nautilus_view)
-
-if test "x$enable_nautilus_view" = "xyes"; then
- PKG_CHECK_MODULES(NAUTILUS_DEPENDENCY, libnautilus >= $LIBNAUTILUS_REQUIRED, \
- [AC_DEFINE(ENABLE_NAUTILUS_VIEW, 1, [Define if the nautilus view has to be built])], \
- [enable_nautilus_view=no])
-fi
-AC_SUBST(NAUTILUS_DEPENDENCY_CFLAGS)
-AC_SUBST(NAUTILUS_DEPENDENCY_LIBS)
-AM_CONDITIONAL(ENABLE_NAUTILUS_VIEW, test "x$enable_nautilus_view" = "xyes")
-
PKG_CHECK_MODULES(EPIPHANY_DEPENDENCY, \
glib-2.0 >= $GLIB_REQUIRED \
gtk+-2.0 >= $GTK_REQUIRED \
diff --git a/data/.cvsignore b/data/.cvsignore
index bbc091564..181c80d45 100644
--- a/data/.cvsignore
+++ b/data/.cvsignore
@@ -1,5 +1,4 @@
GNOME_Epiphany_Automation.server
-GNOME_Epiphany_NautilusView.server
Makefile
Makefile.in
*.schemas
diff --git a/data/GNOME_Epiphany_NautilusView.server.in b/data/GNOME_Epiphany_NautilusView.server.in
deleted file mode 100644
index 15ab31674..000000000
--- a/data/GNOME_Epiphany_NautilusView.server.in
+++ /dev/null
@@ -1,22 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:GNOME_Epiphany_NautilusView" type="factory" location="OAFIID:GNOME_Epiphany_Automation_Factory">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/Unknown:1.0"/>
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Nautilus/View:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" _value="Epiphany Nautilus view"/>
- <oaf_attribute name="description" type="string" _value="Epiphany content view component"/>
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/html"/>
- <item value="text/xml"/>
- <item value="x-directory/webdav"/>
- <item value="x-directory/webdav-prefer-directory"/>
- </oaf_attribute>
- <oaf_attribute name="nautilus:view_as_name" type="string" _value="Web Page"/>
- <oaf_attribute name="nautilus:view_as_label" type="string" _value="View as Web Page"/>
- <oaf_attribute name="nautilus:viewer_label" type="string" _value="Web Page Viewer"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/data/Makefile.am b/data/Makefile.am
index 0fc440e85..74b20670c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -6,14 +6,6 @@ SUBDIRS = ui art glade
dist_pkgdata_DATA = default-prefs.js
-NAUTILUS_VIEW_SERVER = GNOME_Epiphany_NautilusView.server.in
-
-if ENABLE_NAUTILUS_VIEW
-nautilus_server_in_files = $(NAUTILUS_VIEW_SERVER)
-nautilus_server_DATA = GNOME_Epiphany_NautilusView.server
-nautilus_serverdir = $(libdir)/bonobo/servers
-endif
-
server_in_files = GNOME_Epiphany_Automation.server.in
server_DATA = GNOME_Epiphany_Automation.server
serverdir = $(libdir)/bonobo/servers
@@ -49,7 +41,7 @@ if GCONF_SCHEMAS_INSTALL
fi
endif
-EXTRA_DIST = $(NAUTILUS_VIEW_SERVER) \
+EXTRA_DIST = \
$(server_in_files) \
$(schema_in_files) \
$(DESKTOP_IN_FILES) \
@@ -60,7 +52,6 @@ EXTRA_DIST = $(NAUTILUS_VIEW_SERVER) \
check-mime.py
DISTCLEANFILES = \
- $(nautilus_server_DATA) \
$(server_DATA) \
$(Applications_DATA) \
$(schema_DATA) \
diff --git a/data/ui/.cvsignore b/data/ui/.cvsignore
index 9139f3c9c..282522db0 100644
--- a/data/ui/.cvsignore
+++ b/data/ui/.cvsignore
@@ -1,8 +1,2 @@
Makefile
Makefile.in
-epiphany-ui.xml
-nautilus-epiphany-view.xml
-epiphany-toolbar.xml
-epiphany-bookmark-editor-ui.xml
-epiphany-toolbar-popup-ui.xml
-epiphany-history-window-ui.xml
diff --git a/data/ui/Makefile.am b/data/ui/Makefile.am
index ea2da5f20..f834511cd 100644
--- a/data/ui/Makefile.am
+++ b/data/ui/Makefile.am
@@ -1,6 +1,3 @@
-uixmldir = $(pkgdatadir)
-uixml_DATA = nautilus-epiphany-view.xml
-
xmldir = $(pkgdatadir)
xml_DATA = \
epiphany-fs-toolbar.xml \
@@ -9,4 +6,4 @@ xml_DATA = \
epiphany-toolbar.xml \
epiphany-history-window-ui.xml
-EXTRA_DIST = $(uixml_DATA) $(xml_DATA)
+EXTRA_DIST = $(xml_DATA)
diff --git a/data/ui/nautilus-epiphany-view.xml b/data/ui/nautilus-epiphany-view.xml
deleted file mode 100644
index 4858abd3f..000000000
--- a/data/ui/nautilus-epiphany-view.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<Root>
-<commands>
-
- <cmd name="FilePrint" _label="Print"
- _tip="Print the Current File" pixtype="stock" pixname="gtk-print"
- accel="*Control*P"/>
-
- <cmd name="EditCut" _label="Cut" _tip="Cut the Selection"
- pixtype="stock" pixname="gtk-cut"/>
-
- <cmd name="EditCopy" _label="Copy"
- _tip="Copy the Selection" pixtype="stock" pixname="gtk-copy"/>
-
- <cmd name="EditPaste" _label="Paste"
- _tip="Paste the Clipboard" pixtype="stock" pixname="gtk-paste"/>
-
- <cmd name="EditSelectAll" _label="Select All" _tip="Select the Entire Document"
- accel="*Control*A"/>
-
- <cmd name="EditFind" _label="Find" _tip="Search for a String"
- pixtype="stock" pixname="gtk-find" accel="*Control*F"/>
-
-
- <cmd name="EPOpenInNewWindow" _label="Open in New Window"
- pixtype="stock" pixname="gtk-new"/>
-
- <cmd name="EPCopyLinkLocation" _label="Copy Link Address"
- pixtype="stock" pixname="gtk-copy"/>
-
- <cmd name="EPDownloadLink" _label="Download Link"/>
-
- <cmd name="EPOpenImage" _label="Open Image"
- pixtype="stock" pixname="gtk-open"/>
-
- <cmd name="EPOpenImageInNewWindow" _label="Open Image in New Window"/>
-
- <cmd name="EPSaveImageAs" _label="Save Image As..."
- pixtype="stock" pixname="gtk-save"/>
-
- <cmd name="EPSetImageAsBackground" _label="Use Image As Background"/>
-
- <cmd name="EPCopyImageLocation" _label="Copy Image Address"
- pixtype="stock" pixname="gtk-copy"/>
-
- <cmd name="DPCopyLocation" _label="Copy Page Address"
- pixtype="stock" pixname="gtk-copy"/>
-
- <cmd name="DPOpenFrame" _label="Open Frame"
- pixtype="stock" pixname="gtk-open"/>
-
- <cmd name="DPOpenFrameInNewWindow" _label="Open Frame in New Window"/>
-
- <cmd name="DPAddFrameBookmark" _label="Add Bookmark for Frame"
- pixtype="stock" pixname="gtk-add"/>
-
- <cmd name="DPSavePageAs" _label="Save Page As..."
- pixtype="stock" pixname="gtk-save"/>
-
- <cmd name="DPSaveBackgroundAs" _label="Save Background As..."/>
-
- <cmd name="PPVGotoFirst" _label="First"/>
-
- <cmd name="PPVGotoLast" _label="Last"/>
-
- <cmd name="PPVGoBack" _label="Previous"/>
-
- <cmd name="PPVGoForward" _label="Next"/>
-
- <cmd name="EPCopyEmail" _label="Copy Email Address"/>
-
-</commands>
-
-<menu>
- <submenu name="File" _label="_File">
- <menuitem name="FilePrint" verb="" _label="_Print..."/>
- </submenu>
- <submenu name="Edit" _label="_Edit">
- <menuitem name="EditFind" verb="" _label="_Find..."/>
- </submenu>
- <submenu name="View">
- <menuitem name="ViewEncoding" verb="" _label="Text _Encoding..."/>
- </submenu>
-</menu>
-
-<popups>
-
- <popup name="EphyEmbedInputPopup">
- <menuitem name="EditCut" verb=""/>
- <menuitem name="EditCopy" verb=""/>
- <menuitem name="EditPaste" verb=""/>
- </popup>
-
- <popup name="EphyEmbedDocumentPopup">
- <menuitem name="DPSavePageAs" verb=""/>
- <menuitem name="DPSaveBackgroundAs" verb=""/>
- <menuitem name="DPCopyLocation" verb=""/>
- <placeholder name="FrameItems">
- <separator/>
- <menuitem name="DPOpenFrame" verb=""/>
- <menuitem name="DPOpenFrameInNewWindow" verb=""/>
- </placeholder>
- </popup>
-
- <popup name="EphyEmbedElementPopup">
- <placeholder name="LinkItems">
- <menuitem name="EPOpenInNewWindow" verb=""/>
- <menuitem name="EPCopyLinkLocation" verb=""/>
- <menuitem name="EPDownloadLink" verb=""/>
- </placeholder>
- <placeholder name="EmailLinkItems">
- <menuitem name="EPCopyEmail"
- pixtype="stock" pixname="gtk-copy"
- verb=""/>
- </placeholder>
- <placeholder name="BetweenElements1">
- <separator/>
- </placeholder>
- <placeholder name="ImageItems">
- <menuitem name="EPOpenImage" verb=""/>
- <menuitem name="EPOpenImageInNewWindow" verb=""/>
- <menuitem name="EPSaveImageAs" verb=""/>
- <menuitem name="EPSetImageAsBackground" verb=""/>
- <menuitem name="EPCopyImageLocation" verb=""/>
- </placeholder>
- </popup>
-</popups>
-
-</Root>
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index ff7bb9f9e..a86f6ba82 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -131,7 +131,6 @@ IGNORE_HFILES = \
ephy-go-action.h \
ephy-history-window.h \
ephy-location-action.h \
- ephy-nautilus-view.h \
ephy-navigation-action.h \
ephy-notebook.h \
ephy-statusbar.h \
@@ -177,10 +176,6 @@ GTKDOC_LIBS = \
$(EPIPHANY_DEPENDENCY_LIBS) \
$(INTLLIBS)
-if ENABLE_NAUTILUS_VIEW
-GTKDOC_LIBS += $(NAUTILUS_DEPENDENCY_LIBS)
-endif
-
# If you need to override some of the declarations, place them in the
# $(DOC_MODULE)-overrides.txt file and uncomment the second line here.
DOC_OVERRIDES =
diff --git a/embed/Makefile.am b/embed/Makefile.am
index 97cb2138a..c0001dd9c 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -23,7 +23,6 @@ NOINST_H_FILES = \
downloader-view.h \
ephy-download.h \
ephy-embed-dialog.h \
- ephy-embed-popup-control.h \
ephy-favicon-cache.h \
find-dialog.h \
print-dialog.h
@@ -51,7 +50,6 @@ libephyembed_la_SOURCES = \
ephy-embed-dialog.c \
ephy-embed-event.c \
ephy-embed-persist.c \
- ephy-embed-popup-control.c \
ephy-embed-single.c \
ephy-embed-shell.c \
ephy-encodings.c \
diff --git a/embed/ephy-embed-popup-control.c b/embed/ephy-embed-popup-control.c
deleted file mode 100644
index 3a771120f..000000000
--- a/embed/ephy-embed-popup-control.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/*
- * Copyright (C) 2000, 2001, 2002 Ricardo Fernández Pascual
- * Copyright (C) 2003 Marco Pesenti Gritti
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ephy-embed-popup-control.h"
-#include "ephy-embed-factory.h"
-#include "ephy-embed-persist.h"
-#include "ephy-bonobo-extensions.h"
-#include "ephy-prefs.h"
-#include "eel-gconf-extensions.h"
-#include "ephy-file-helpers.h"
-
-#include <gtk/gtkmain.h>
-#include <string.h>
-#include <bonobo/bonobo-ui-component.h>
-#include <glib/gi18n.h>
-#include <gtk/gtkclipboard.h>
-
-typedef enum
-{
- EMBED_POPUP_INPUT,
- EMBED_POPUP_DOCUMENT,
- EMBED_POPUP_ELEMENT
-} EmbedPopupType;
-
-#define EPHY_EMBED_POPUP_CONTROL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_EMBED_POPUP_CONTROL, EphyEmbedPopupControlPrivate))
-
-struct EphyEmbedPopupControlPrivate
-{
- EphyEmbedEvent *event;
- EphyEmbed *embed;
- EmbedEventContext context;
- BonoboUIComponent *ui_component;
- char *selection;
- EmbedPopupType popup_type;
- BonoboControl *control;
-};
-
-static void
-embed_popup_copy_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_copy_email_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_copy_link_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_open_link_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_download_link_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_save_image_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_set_image_as_background_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_copy_image_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_save_page_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_save_background_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_open_frame_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_reload_frame_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-
-static void
-embed_popup_open_image_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname);
-static void
-embed_popup_copy_to_clipboard (EphyEmbedPopupControl *popup, const char *text);
-
-#define DOCUMENT_POPUP_PATH "/popups/EphyEmbedDocumentPopup"
-#define ELEMENT_POPUP_PATH "/popups/EphyEmbedElementPopup"
-#define INPUT_POPUP_PATH "/popups/EphyEmbedInputPopup"
-
-#define EPHY_POPUP_NAVIGATION_ITEMS_PLACEHOLDER "/popups/EphyEmbedDocumentPopup/NavigationItems"
-#define EPHY_POPUP_LINK_ITEMS_PLACEHOLDER "/popups/EphyEmbedElementPopup/LinkItems"
-#define EPHY_POPUP_EMAIL_LINK_ITEMS_PLACEHOLDER "/popups/EphyEmbedElementPopup/EmailLinkItems"
-#define EPHY_POPUP_IMAGE_ITEMS_PLACEHOLDER "/popups/EphyEmbedElementPopup/ImageItems"
-#define EPHY_POPUP_FRAME_ITEMS_PLACEHOLDER "/popups/EphyEmbedDocumentPopup/FrameItems"
-#define EPHY_POPUP_BETWEEN_ELEMENTS1_PLACEHOLDER "/popups/EphyEmbedElementPopup/BetweenElements1"
-#define EPHY_POPUP_SAVE_BG_PATH "/commands/DPSaveBackgroundAs"
-#define EPHY_POPUP_OPEN_IMAGE_PATH "/commands/EPOpenImage"
-
-BonoboUIVerb embed_popup_verbs [] = {
- BONOBO_UI_VERB ("EPCopyLinkLocation", (BonoboUIVerbFn)embed_popup_copy_link_location_cmd),
- BONOBO_UI_VERB ("EPDownloadLink", (BonoboUIVerbFn)embed_popup_download_link_cmd),
- BONOBO_UI_VERB ("EPOpenLink", (BonoboUIVerbFn)embed_popup_open_link_cmd),
- BONOBO_UI_VERB ("EPOpenImage", (BonoboUIVerbFn)embed_popup_open_image_cmd),
- BONOBO_UI_VERB ("EPSaveImageAs", (BonoboUIVerbFn)embed_popup_save_image_as_cmd),
- BONOBO_UI_VERB ("EPSetImageAsBackground", (BonoboUIVerbFn)embed_popup_set_image_as_background_cmd),
- BONOBO_UI_VERB ("EPCopyImageLocation", (BonoboUIVerbFn)embed_popup_copy_image_location_cmd),
-
- BONOBO_UI_VERB ("DPCopyLocation", (BonoboUIVerbFn)embed_popup_copy_location_cmd),
- BONOBO_UI_VERB ("EPCopyEmail", (BonoboUIVerbFn)embed_popup_copy_email_cmd),
- BONOBO_UI_VERB ("DPSavePageAs", (BonoboUIVerbFn)embed_popup_save_page_as_cmd),
- BONOBO_UI_VERB ("DPSaveBackgroundAs", (BonoboUIVerbFn)embed_popup_save_background_as_cmd),
- BONOBO_UI_VERB ("DPOpenFrame", (BonoboUIVerbFn)embed_popup_open_frame_cmd),
- BONOBO_UI_VERB ("DPReloadFrame", (BonoboUIVerbFn)embed_popup_reload_frame_cmd),
-
- BONOBO_UI_VERB_END
-};
-
-enum
-{
- PROP_0,
- PROP_BONOBO_CONTROL
-};
-
-static void
-ephy_embed_popup_control_class_init (EphyEmbedPopupControlClass *klass);
-static void
-ephy_embed_popup_control_init (EphyEmbedPopupControl *gep);
-static void
-ephy_embed_popup_control_finalize (GObject *object);
-static void
-ephy_embed_popup_control_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void
-ephy_embed_popup_control_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static void
-ephy_embed_popup_control_set_control (EphyEmbedPopupControl *p,
- BonoboControl *control);
-
-static GObjectClass *parent_class = NULL;
-
-GType
-ephy_embed_popup_control_get_type (void)
-{
- static GType ephy_embed_popup_control_type = 0;
-
- if (ephy_embed_popup_control_type == 0)
- {
- static const GTypeInfo our_info =
- {
- sizeof (EphyEmbedPopupControlClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ephy_embed_popup_control_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EphyEmbedPopupControl),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ephy_embed_popup_control_init
- };
-
-
- ephy_embed_popup_control_type = g_type_register_static (G_TYPE_OBJECT,
- "EphyEmbedPopupControl",
- &our_info, 0);
- }
-
- return ephy_embed_popup_control_type;
-}
-
-static void
-ephy_embed_popup_control_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- EphyEmbedPopupControl *p = EPHY_EMBED_POPUP_CONTROL (object);
-
- switch (prop_id)
- {
- case PROP_BONOBO_CONTROL:
- ephy_embed_popup_control_set_control (p, g_value_get_object (value));
- break;
- }
-}
-
-static void
-ephy_embed_popup_control_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EphyEmbedPopupControl *p = EPHY_EMBED_POPUP_CONTROL (object);
-
- switch (prop_id)
- {
- case PROP_BONOBO_CONTROL:
- g_value_set_object (value, p->priv->control);
- break;
- }
-}
-
-static void
-ephy_embed_popup_control_class_init (EphyEmbedPopupControlClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_peek_parent (klass);
-
- object_class->finalize = ephy_embed_popup_control_finalize;
- object_class->set_property = ephy_embed_popup_control_set_property;
- object_class->get_property = ephy_embed_popup_control_get_property;
-
- g_object_class_install_property (object_class,
- PROP_BONOBO_CONTROL,
- g_param_spec_object ("BonoboControl",
- "BonoboControl",
- "Bonobo control",
- BONOBO_TYPE_CONTROL,
- G_PARAM_READWRITE));
-
- g_type_class_add_private (object_class, sizeof(EphyEmbedPopupControlPrivate));
-}
-
-static void
-ephy_embed_popup_control_init (EphyEmbedPopupControl *gep)
-{
- gep->priv = EPHY_EMBED_POPUP_CONTROL_GET_PRIVATE (gep);
-
- gep->priv->control = NULL;
- gep->priv->embed = NULL;
- gep->priv->event = NULL;
- gep->priv->ui_component = NULL;
-}
-
-static void
-ephy_embed_popup_control_finalize (GObject *object)
-{
- EphyEmbedPopupControl *gep = EPHY_EMBED_POPUP_CONTROL (object);
-
- if (gep->priv->event)
- {
- g_object_unref (G_OBJECT (gep->priv->event));
- }
-
- g_free (gep->priv->selection);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-ephy_embed_popup_control_set_control (EphyEmbedPopupControl *p,
- BonoboControl *control)
-{
- p->priv->control = control;
-}
-
-EphyEmbedPopupControl *
-ephy_embed_popup_control_new (BonoboControl *control)
-{
- EphyEmbedPopupControl *p;
-
- p = EPHY_EMBED_POPUP_CONTROL (g_object_new (EPHY_TYPE_EMBED_POPUP_CONTROL,
- "BonoboControl", control,
- NULL));
-
- return p;
-}
-
-static const char *
-get_popup_path (EphyEmbedPopupControl *p)
-{
- const char *result = NULL;
-
- switch (p->priv->popup_type)
- {
- case EMBED_POPUP_INPUT:
- result = INPUT_POPUP_PATH;
- break;
- case EMBED_POPUP_ELEMENT:
- result = ELEMENT_POPUP_PATH;
- break;
- case EMBED_POPUP_DOCUMENT:
- result = DOCUMENT_POPUP_PATH;
- break;
- }
-
- return result;
-}
-
-void
-ephy_embed_popup_control_show (EphyEmbedPopupControl *pp,
- EphyEmbed *embed)
-{
- EphyEmbedPopupControl *p = EPHY_EMBED_POPUP_CONTROL (pp);
- BonoboUIComponent *uic = bonobo_control_get_popup_ui_component (p->priv->control);
- const char *path;
- char *path_dst;
-
- p->priv->embed = embed;
- path = get_popup_path (pp);
- path_dst = g_strdup_printf ("/popups/button%d", 2);
-
- /* this is a hack because bonobo apis for showing popups are broken */
- ephy_bonobo_replace_path (uic, path, path_dst);
-
- bonobo_control_do_popup (p->priv->control, 2,
- gtk_get_current_event_time ());
-}
-
-static void
-setup_element_menu (EphyEmbedPopupControl *p)
-{
- gboolean is_link, is_image, is_email_link;
-
- is_image = p->priv->context & EMBED_CONTEXT_IMAGE;
- is_email_link = p->priv->context & EMBED_CONTEXT_EMAIL_LINK;
- is_link = (p->priv->context & EMBED_CONTEXT_LINK) && !is_email_link;
-
- ephy_bonobo_set_hidden (p->priv->ui_component,
- EPHY_POPUP_LINK_ITEMS_PLACEHOLDER,
- !is_link);
- ephy_bonobo_set_hidden (p->priv->ui_component,
- EPHY_POPUP_IMAGE_ITEMS_PLACEHOLDER,
- !is_image);
- ephy_bonobo_set_hidden (p->priv->ui_component,
- EPHY_POPUP_EMAIL_LINK_ITEMS_PLACEHOLDER,
- !is_email_link);
- ephy_bonobo_set_hidden (p->priv->ui_component,
- EPHY_POPUP_BETWEEN_ELEMENTS1_PLACEHOLDER,
- !is_image || (!is_link && !is_email_link));
-}
-
-static void
-setup_document_menu (EphyEmbedPopupControl *p)
-{
- gboolean is_framed;
- const GValue *value;
- gboolean has_background;
-
- ephy_embed_event_get_property (p->priv->event,
- "framed_page", &value);
- is_framed = g_value_get_int (value);
- ephy_bonobo_set_hidden (BONOBO_UI_COMPONENT(p->priv->ui_component),
- EPHY_POPUP_FRAME_ITEMS_PLACEHOLDER, !is_framed);
-
- has_background = ephy_embed_event_has_property (p->priv->event,
- "background_image");
- ephy_bonobo_set_hidden (BONOBO_UI_COMPONENT(p->priv->ui_component),
- EPHY_POPUP_SAVE_BG_PATH, !has_background);
-}
-
-void
-ephy_embed_popup_control_set_event (EphyEmbedPopupControl *p,
- EphyEmbedEvent *event)
-{
- EmbedEventContext context;
-
- if (p->priv->event)
- {
- g_object_unref (G_OBJECT (p->priv->event));
- }
-
- context = ephy_embed_event_get_context (event);
-
- p->priv->context = context;
-
- p->priv->event = event;
- g_object_ref (G_OBJECT(event));
-
- if ((p->priv->context & EMBED_CONTEXT_LINK) ||
- (p->priv->context & EMBED_CONTEXT_EMAIL_LINK) ||
- (p->priv->context & EMBED_CONTEXT_IMAGE))
- {
- setup_element_menu (p);
- p->priv->popup_type = EMBED_POPUP_ELEMENT;
- }
- else if (p->priv->context & EMBED_CONTEXT_INPUT)
- {
- p->priv->popup_type = EMBED_POPUP_INPUT;
- }
- else
- {
- setup_document_menu (p);
- p->priv->popup_type = EMBED_POPUP_DOCUMENT;
- }
-}
-
-void
-ephy_embed_popup_control_connect_verbs (EphyEmbedPopupControl *p,
- BonoboUIComponent *ui_component)
-{
-
- p->priv->ui_component = BONOBO_UI_COMPONENT (ui_component);
-
- bonobo_ui_component_add_verb_list_with_data (BONOBO_UI_COMPONENT(ui_component),
- embed_popup_verbs,
- p);
-}
-
-EphyEmbedEvent *
-ephy_embed_popup_control_get_event (EphyEmbedPopupControl *p)
-{
- g_return_val_if_fail (EPHY_IS_EMBED_POPUP_CONTROL (p), NULL);
-
- return p->priv->event;
-}
-
-static void
-embed_popup_copy_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- char *location;
- location = ephy_embed_get_location (popup->priv->embed, FALSE);
- embed_popup_copy_to_clipboard (popup, location);
- g_free (location);
-}
-
-static void
-embed_popup_copy_email_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "email", &value);
- location = g_value_get_string (value);
- embed_popup_copy_to_clipboard (popup, location);
-}
-
-static void
-embed_popup_copy_link_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "link", &value);
- location = g_value_get_string (value);
- embed_popup_copy_to_clipboard (popup, location);
-}
-
-static void
-save_url (EphyEmbedPopupControl *popup,
- const char *title,
- gboolean ask_dest,
- const char *location)
-{
- GtkWidget *widget, *window;
- EphyEmbedPersist *persist;
-
- widget = GTK_WIDGET (popup->priv->embed);
- window = gtk_widget_get_toplevel (widget);
-
- persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object ("EphyEmbedPersist"));
-
- ephy_embed_persist_set_fc_title (persist, title);
- ephy_embed_persist_set_fc_parent (persist,GTK_WINDOW (window));
- ephy_embed_persist_set_flags
- (persist, ask_dest ? EMBED_PERSIST_ASK_DESTINATION : 0);
- ephy_embed_persist_set_persist_key
- (persist, CONF_STATE_SAVE_DIR);
- ephy_embed_persist_set_source (persist, location);
-
- ephy_embed_persist_save (persist);
-}
-
-static void
-save_property_url (EphyEmbedPopupControl *popup,
- const char *title,
- gboolean ask_dest,
- const char *property)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, property, &value);
- location = g_value_get_string (value);
-
- save_url (popup, title, ask_dest, location);
-}
-
-/* commands */
-
-static void
-embed_popup_open_link_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "link", &value);
- location = g_value_get_string (value);
-
- ephy_embed_load_url (popup->priv->embed, location);
-}
-
-static void
-embed_popup_download_link_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- save_property_url (popup,
- _("Download Link"),
- FALSE,
- "link");
-}
-
-static void
-embed_popup_save_image_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- save_property_url (popup, _("Save Image As"), TRUE, "image");
-}
-
-#define CONF_DESKTOP_BG_PICTURE "/desktop/gnome/background/picture_filename"
-#define CONF_DESKTOP_BG_TYPE "/desktop/gnome/background/picture_options"
-
-static void
-background_download_completed (EphyEmbedPersist *persist,
- gpointer data)
-{
- const char *bg;
- char *type;
-
- bg = ephy_embed_persist_get_dest (persist);
- eel_gconf_set_string (CONF_DESKTOP_BG_PICTURE, bg);
-
- type = eel_gconf_get_string (CONF_DESKTOP_BG_TYPE);
- if (type == NULL || strcmp (type, "none") == 0)
- {
- eel_gconf_set_string (CONF_DESKTOP_BG_TYPE, "wallpaper");
- }
- g_free (type);
-
- g_object_unref (persist);
-}
-
-static void
-embed_popup_set_image_as_background_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- char *dest, *base, *base_converted;
- const GValue *value;
- EphyEmbedPersist *persist;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "image", &value);
- location = g_value_get_string (value);
-
- persist = EPHY_EMBED_PERSIST
- (ephy_embed_factory_new_object ("EphyEmbedPersist"));
-
- base = g_path_get_basename (location);
- base_converted = g_filename_from_utf8 (base, -1, NULL, NULL, NULL);
- dest = g_build_filename (ephy_dot_dir (), base_converted, NULL);
-
- ephy_embed_persist_set_dest (persist, dest);
- ephy_embed_persist_set_flags (persist, EMBED_PERSIST_NO_VIEW);
- ephy_embed_persist_set_source (persist, location);
-
- ephy_embed_persist_save (persist);
-
- g_signal_connect (persist, "completed",
- G_CALLBACK (background_download_completed),
- NULL);
-
- g_free (dest);
- g_free (base);
- g_free (base_converted);
-}
-
-static void
-embed_popup_copy_image_location_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "image", &value);
- location = g_value_get_string (value);
- embed_popup_copy_to_clipboard (popup, location);
-}
-
-static void
-embed_popup_save_page_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- char *location;
-
- location = ephy_embed_get_location (popup->priv->embed, FALSE);
- save_url (popup, _("Save Page As"), TRUE, location);
- g_free (location);
-}
-
-static void
-embed_popup_save_background_as_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- save_property_url (popup, _("Save Background As"),
- TRUE, "background_image");
-}
-
-static void
-embed_popup_open_frame_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- char *location;
-
- location = ephy_embed_get_location (popup->priv->embed, FALSE);
-
- ephy_embed_load_url (popup->priv->embed, location);
-
- g_free (location);
-}
-
-static void
-embed_popup_reload_frame_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- /* FIXME implement */
-}
-
-static void
-embed_popup_open_image_cmd (BonoboUIComponent *uic,
- EphyEmbedPopupControl *popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- const char *location;
- const GValue *value;
-
- info = ephy_embed_popup_control_get_event (popup);
- ephy_embed_event_get_property (info, "image", &value);
- location = g_value_get_string (value);
-
- ephy_embed_load_url (popup->priv->embed, location);
-}
-
-static void
-embed_popup_copy_to_clipboard (EphyEmbedPopupControl *popup, const char *text)
-{
- gtk_clipboard_set_text (gtk_clipboard_get (GDK_NONE),
- text, -1);
- gtk_clipboard_set_text (gtk_clipboard_get (GDK_SELECTION_PRIMARY),
- text, -1);
-}
diff --git a/embed/ephy-embed-popup-control.h b/embed/ephy-embed-popup-control.h
deleted file mode 100644
index bc1fc710e..000000000
--- a/embed/ephy-embed-popup-control.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2000, 2001, 2002 Ricardo Fernández Pascual
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#ifndef EPHY_EMBED_POPUP_CONTROL_H
-#define EPHY_EMBED_POPUP_CONTROL_H
-
-#include <bonobo/bonobo-control.h>
-
-#include "ephy-embed.h"
-#include "ephy-embed-event.h"
-
-G_BEGIN_DECLS
-
-#define EPHY_TYPE_EMBED_POPUP_CONTROL (ephy_embed_popup_control_get_type ())
-#define EPHY_EMBED_POPUP_CONTROL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_EMBED_POPUP_CONTROL, EphyEmbedPopupControl))
-#define EPHY_EMBED_POPUP_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_EMBED_POPUP_CONTROL, EphyEmbedPopupControlClass))
-#define EPHY_IS_EMBED_POPUP_CONTROL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_EMBED_POPUP_CONTROL))
-#define EPHY_IS_EMBED_POPUP_CONTROL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_POPUP_CONTROL))
-#define EPHY_EMBED_POPUP_CONTROL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_EMBED_POPUP_CONTROL, EphyEmbedPopupControlClass))
-
-typedef struct EphyEmbedPopupControlClass EphyEmbedPopupControlClass;
-typedef struct EphyEmbedPopupControl EphyEmbedPopupControl;
-typedef struct EphyEmbedPopupControlPrivate EphyEmbedPopupControlPrivate;
-
-struct EphyEmbedPopupControl
-{
- GObject parent;
-
- /*< private >*/
- EphyEmbedPopupControlPrivate *priv;
-};
-
-struct EphyEmbedPopupControlClass
-{
- GObjectClass parent_class;
-};
-
-GType ephy_embed_popup_control_get_type (void);
-
-EphyEmbedPopupControl *ephy_embed_popup_control_new (BonoboControl *control);
-
-EphyEmbedEvent *ephy_embed_popup_control_get_event (EphyEmbedPopupControl *p);
-
-void ephy_embed_popup_control_set_event (EphyEmbedPopupControl *p,
- EphyEmbedEvent *event);
-
-void ephy_embed_popup_control_connect_verbs (EphyEmbedPopupControl *p,
- BonoboUIComponent *ui_component);
-
-void ephy_embed_popup_control_show (EphyEmbedPopupControl *pp,
- EphyEmbed *embed);
-
-G_END_DECLS
-
-#endif
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4366aa258..397d96aa2 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -16,7 +16,6 @@ header_DATA = $(INST_H_FILES)
NOINST_H_FILES = \
eel-gconf-extensions.h \
- ephy-bonobo-extensions.h \
ephy-debug.h \
ephy-dnd.h \
ephy-file-chooser.h \
@@ -41,7 +40,6 @@ INST_H_FILES = \
libephymisc_la_SOURCES = \
eel-gconf-extensions.c \
- ephy-bonobo-extensions.c \
ephy-debug.c \
ephy-dialog.c \
ephy-dnd.c \
diff --git a/lib/ephy-bonobo-extensions.c b/lib/ephy-bonobo-extensions.c
deleted file mode 100644
index cb1e96d36..000000000
--- a/lib/ephy-bonobo-extensions.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-/* gul-bonobo-extensions.c - implementation of new functions that conceptually
- belong in bonobo. Perhaps some of these will be
- actually rolled into bonobo someday.
-
- This file is based on nautilus-bonobo-extensions.c from
- libnautilus-private.
-
- Copyright (C) 2000, 2001 Eazel, Inc.
-
- The Gnome 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.
-
- The Gnome 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 the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- Authors: John Sullivan <sullivan@eazel.com>
- Darin Adler <darin@bentspoon.com>
-
- $Id$
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "ephy-bonobo-extensions.h"
-#include "ephy-string.h"
-#include <string.h>
-
-#include <bonobo/bonobo-ui-util.h>
-#include <gtk/gtkmain.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <bonobo/bonobo-control.h>
-
-void
-ephy_bonobo_set_hidden (BonoboUIComponent *ui,
- const char *path,
- gboolean hidden)
-{
- if (bonobo_ui_component_get_container (ui)) /* should not do this here... */
- {
- bonobo_ui_component_set_prop (ui, path, "hidden", hidden ? "1" : "0", NULL);
- }
-}
-
-static void
-ephy_bonobo_clear_path (BonoboUIComponent *uic,
- const gchar *path)
-{
- if (bonobo_ui_component_path_exists (uic, path, NULL))
- {
- char *remove_wildcard = g_strdup_printf ("%s/*", path);
- bonobo_ui_component_rm (uic, remove_wildcard, NULL);
- g_free (remove_wildcard);
- }
-}
-
-void
-ephy_bonobo_replace_path (BonoboUIComponent *uic, const gchar *path_src,
- const char *path_dst)
-{
- BonoboUINode *node;
- const char *name;
- char *path_dst_folder;
-
- name = strrchr (path_dst, '/');
- g_return_if_fail (name != NULL);
- path_dst_folder = g_strndup (path_dst, name - path_dst);
- name++;
-
- node = bonobo_ui_component_get_tree (uic, path_src, TRUE, NULL);
- bonobo_ui_node_set_attr (node, "name", name);
-
- ephy_bonobo_clear_path (uic, path_dst);
-
- bonobo_ui_component_set_tree (uic, path_dst_folder, node, NULL);
-
- g_free (path_dst_folder);
- bonobo_ui_node_free (node);
-}
diff --git a/lib/ephy-bonobo-extensions.h b/lib/ephy-bonobo-extensions.h
deleted file mode 100644
index d096eba94..000000000
--- a/lib/ephy-bonobo-extensions.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-/* gul-bonobo-extensions.h - interface for new functions that conceptually
- belong in bonobo. Perhaps some of these will be
- actually rolled into bonobo someday.
-
-
- This file is based on nautilus-bonobo-extensions.h from
- libnautilus-private.
-
-
- Copyright (C) 2000 Eazel, Inc.
-
- The Gnome 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.
-
- The Gnome 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 the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- Author: John Sullivan <sullivan@eazel.com>
-
- $Id$
-*/
-
-#ifndef EPHY_BONOBO_EXTENSIONS_H
-#define EPHY_BONOBO_EXTENSIONS_H
-
-#include <bonobo/bonobo-ui-component.h>
-#include <bonobo/bonobo-control.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gtk/gtkwidget.h>
-
-void ephy_bonobo_set_hidden (BonoboUIComponent *ui,
- const char *path,
- gboolean hidden);
-void ephy_bonobo_replace_path (BonoboUIComponent *uic,
- const gchar *path_src,
- const char *path_dst);
-
-#endif /* EPHY_BONOBO_EXTENSIONS_H */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 44d40fde4..d13d3d663 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
data/GNOME_Epiphany_Automation.server.in
-data/GNOME_Epiphany_NautilusView.server.in
data/bme.desktop.in
data/epiphany-lockdown.schemas.in
data/epiphany.desktop.in
@@ -10,9 +9,7 @@ data/glade/certificate-dialogs.glade
data/glade/epiphany.glade
data/glade/prefs-dialog.glade
data/glade/print.glade
-data/ui/nautilus-epiphany-view.xml
embed/downloader-view.c
-embed/ephy-embed-popup-control.c
embed/ephy-encodings.c
embed/ephy-history.c
embed/mozilla/ContentHandler.cpp
@@ -50,7 +47,6 @@ src/ephy-encoding-menu.c
src/ephy-go-action.c
src/ephy-history-window.c
src/ephy-main.c
-src/ephy-nautilus-view.c
src/ephy-notebook.c
src/ephy-session.c
src/ephy-shell.c
diff --git a/src/Makefile.am b/src/Makefile.am
index 5b3dfa44b..906a6a579 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,10 +13,6 @@ INCLUDES = \
-DPIXMAP_DIR=\""$(datadir)/pixmaps"\" \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\"
-if ENABLE_NAUTILUS_VIEW
-INCLUDES += $(NAUTILUS_DEPENDENCY_CFLAGS)
-endif
-
if MAINTAINER_MODE
INCLUDES += -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED -DBONOBO_DISABLE_DEPRECATED $(WARN_CFLAGS)
@@ -43,14 +39,6 @@ idl_flags = -I$(LIBBONOBO_IDL) -I$(BONOBO_ACTIVATION_IDL)
$(CORBA_SOURCE): $(idls) $(ORBIT_IDL)
$(ORBIT_IDL) $(idl_flags) $(idls)
-if ENABLE_NAUTILUS_VIEW
-nautilus_view_sources = \
- ephy-nautilus-view.c \
- ephy-nautilus-view.h
-else
-nautilus_view_sources =
-endif
-
headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany
header_DATA = $(INST_H_FILES)
@@ -85,7 +73,6 @@ INST_H_FILES = \
libephymain_la_SOURCES = \
$(CORBA_SOURCE) \
- $(nautilus_view_sources) \
ephy-automation.c \
ephy-completion-model.c \
ephy-completion-model.h \
@@ -133,10 +120,6 @@ epiphany_bin_LDADD = \
$(EPIPHANY_DEPENDENCY_LIBS) \
$(INTLLIBS)
-if ENABLE_NAUTILUS_VIEW
-epiphany_bin_LDADD += $(NAUTILUS_DEPENDENCY_LIBS)
-endif
-
BUILT_SOURCES = $(CORBA_SOURCE)
CLEANFILES = $(CORBA_SOURCE)
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c
deleted file mode 100644
index db379cd6d..000000000
--- a/src/ephy-nautilus-view.c
+++ /dev/null
@@ -1,636 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Ricardo Fernández Pascual
- * Copyright (C) 2003 Marco Pesenti Gritti
- * Copyright (C) 2003 Christian Persch
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <libgnome/gnome-macros.h>
-#include <bonobo/bonobo-zoomable.h>
-#include <bonobo/bonobo-ui-util.h>
-#include <string.h>
-
-#include "ephy-embed-factory.h"
-#include "ephy-embed-popup-control.h"
-#include "ephy-nautilus-view.h"
-#include "ephy-embed.h"
-#include "find-dialog.h"
-#include "print-dialog.h"
-#include "ephy-encoding-dialog.h"
-#include "ephy-zoom.h"
-#include "ephy-debug.h"
-
-static void gnv_embed_location_cb (EphyEmbed *embed,
- const char *new_uri,
- EphyNautilusView *view);
-static void gnv_embed_title_cb (EphyEmbed *embed,
- EphyNautilusView *view);
-static void gnv_embed_new_window_cb (EphyEmbed *embed,
- EphyEmbed **new_embed,
- EphyEmbedChrome chromemask,
- EphyNautilusView *view);
-static void gnv_embed_link_message_cb (EphyEmbed *embed,
- EphyNautilusView *view);
-static gint gnv_embed_dom_mouse_click_cb (EphyEmbed *embed,
- EphyEmbedEvent *event,
- EphyNautilusView *view);
-static void gnv_embed_context_menu_cb (EphyEmbed *embed,
- EphyEmbedEvent *event,
- EphyNautilusView *view);
-static void gnv_embed_zoom_change_cb (EphyNautilusView *embed,
- float new_zoom,
- EphyNautilusView *view);
-
-
-static void gnv_load_location_cb (EphyNautilusView *view,
- const char *location,
- gpointer user_data);
-static void gnv_stop_loading_cb (EphyNautilusView *view,
- gpointer user_data);
-static void gnv_bonobo_control_activate_cb (BonoboControl *control,
- gboolean state,
- EphyNautilusView *view);
-
-/* zoomable */
-static void gnv_zoomable_set_zoom_level_cb (BonoboZoomable *zoomable,
- float level,
- EphyNautilusView *view);
-static void gnv_zoomable_zoom_in_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view);
-static void gnv_zoomable_zoom_out_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view);
-static void gnv_zoomable_zoom_to_fit_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view);
-static void gnv_zoomable_zoom_to_default_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view);
-/* commands */
-static void gnv_cmd_file_print (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname);
-static void gnv_cmd_edit_find (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname);
-static void gnv_cmd_select_encoding (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname);
-
-/* popups */
-static EphyNautilusView *gnv_view_from_popup (EphyEmbedPopupControl*popup);
-
-static void gnv_popup_cmd_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname);
-static void gnv_popup_cmd_image_in_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname);
-static void gnv_popup_cmd_frame_in_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname);
-
-#define EPHY_NAUTILUS_VIEW_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_NAUTILUS_VIEW, EphyNautilusViewPrivate))
-
-struct EphyNautilusViewPrivate {
- EphyEmbed *embed;
- char *title;
- char *location;
- int load_percent;
-
- EphyEmbedPopupControl *popup;
- BonoboUIComponent *popup_ui;
- BonoboControl *control;
- BonoboUIComponent *ui;
- BonoboZoomable *zoomable;
-
- EphyDialog *find_dialog;
-};
-
-static BonoboUIVerb ephy_popup_verbs [] = {
- BONOBO_UI_VERB ("EPOpenInNewWindow", (BonoboUIVerbFn) gnv_popup_cmd_new_window),
- BONOBO_UI_VERB ("EPOpenImageInNewWindow", (BonoboUIVerbFn) gnv_popup_cmd_image_in_new_window),
- BONOBO_UI_VERB ("DPOpenFrameInNewWindow", (BonoboUIVerbFn) gnv_popup_cmd_frame_in_new_window),
-
- BONOBO_UI_VERB_END
-};
-
-BonoboUIVerb ephy_verbs [] = {
- BONOBO_UI_VERB ("FilePrint", (BonoboUIVerbFn) gnv_cmd_file_print),
- BONOBO_UI_VERB ("EditFind", (BonoboUIVerbFn) gnv_cmd_edit_find),
- BONOBO_UI_VERB ("ViewEncoding", (BonoboUIVerbFn) gnv_cmd_select_encoding),
- BONOBO_UI_VERB_END
-};
-
-BONOBO_CLASS_BOILERPLATE (EphyNautilusView, ephy_nautilus_view,
- NautilusView, NAUTILUS_TYPE_VIEW)
-
-static gboolean
-disconnected_idle (EphyShell *shell)
-{
- g_object_unref (shell);
-
- return FALSE;
-}
-
-static void
-control_disconnected_cb (BonoboControl *control)
-{
- g_idle_add ((GSourceFunc)disconnected_idle, ephy_shell);
-}
-
-static void
-ephy_nautilus_view_instance_init (EphyNautilusView *view)
-{
- GtkWidget *w;
- EphyNautilusViewPrivate *p = EPHY_NAUTILUS_VIEW_GET_PRIVATE (view);
- float *levels;
- gchar **names;
- guint i;
- BonoboControl *control;
-
- view->priv = p;
-
- view->priv->embed = EPHY_EMBED
- (ephy_embed_factory_new_object ("EphyEmbed"));
-
- g_signal_connect (view->priv->embed, "link_message",
- G_CALLBACK (gnv_embed_link_message_cb),
- view);
- g_signal_connect (view->priv->embed, "ge_location",
- G_CALLBACK (gnv_embed_location_cb),
- view);
- g_signal_connect (view->priv->embed, "title",
- G_CALLBACK (gnv_embed_title_cb),
- view);
- g_signal_connect (view->priv->embed, "ge_new_window",
- G_CALLBACK (gnv_embed_new_window_cb),
- view);
- g_signal_connect (view->priv->embed, "ge_dom_mouse_click",
- G_CALLBACK (gnv_embed_dom_mouse_click_cb),
- view);
- g_signal_connect (view->priv->embed, "ge_context_menu",
- G_CALLBACK (gnv_embed_context_menu_cb),
- view);
- g_signal_connect (view->priv->embed, "ge_zoom_change",
- G_CALLBACK (gnv_embed_zoom_change_cb),
- view);
-
- w = GTK_WIDGET (view->priv->embed);
- gtk_widget_show (w);
-
- nautilus_view_construct (NAUTILUS_VIEW (view), w);
-
- g_signal_connect (G_OBJECT (view), "load_location",
- G_CALLBACK (gnv_load_location_cb), NULL);
-
- g_signal_connect (G_OBJECT (view), "stop_loading",
- G_CALLBACK (gnv_stop_loading_cb), NULL);
-
- control = nautilus_view_get_bonobo_control (NAUTILUS_VIEW (view));
- g_object_ref (ephy_shell);
-
- g_signal_connect (control, "disconnected",
- G_CALLBACK (control_disconnected_cb), NULL);
- g_signal_connect (control,
- "activate",
- G_CALLBACK (gnv_bonobo_control_activate_cb), view);
-
- view->priv->zoomable = bonobo_zoomable_new ();
- bonobo_object_add_interface (BONOBO_OBJECT (view),
- BONOBO_OBJECT (view->priv->zoomable));
-
- /* get zoom levels */
- levels = g_new0 (float, n_zoom_levels);
- names = g_new0 (gchar *, n_zoom_levels);
- for (i = 0; i < n_zoom_levels; i++)
- {
- levels[i] = zoom_levels[i].level;
- names[i] = zoom_levels[i].name;
- }
-
- bonobo_zoomable_set_parameters_full (view->priv->zoomable,
- 1.0,
- levels [0],
- levels [n_zoom_levels-1],
- FALSE, FALSE, TRUE,
- levels,
- (const gchar **) names,
- n_zoom_levels);
-
- g_free (levels);
- g_free (names);
-
- bonobo_object_add_interface (BONOBO_OBJECT (view),
- BONOBO_OBJECT (view->priv->zoomable));
-
- g_signal_connect (view->priv->zoomable, "set_zoom_level",
- G_CALLBACK (gnv_zoomable_set_zoom_level_cb), view);
- g_signal_connect (view->priv->zoomable, "zoom_in",
- G_CALLBACK (gnv_zoomable_zoom_in_cb), view);
- g_signal_connect (view->priv->zoomable, "zoom_out",
- G_CALLBACK (gnv_zoomable_zoom_out_cb), view);
- g_signal_connect (view->priv->zoomable, "zoom_to_fit",
- G_CALLBACK (gnv_zoomable_zoom_to_fit_cb), view);
- g_signal_connect (view->priv->zoomable, "zoom_to_default",
- G_CALLBACK (gnv_zoomable_zoom_to_default_cb), view);
-
- p->control = nautilus_view_get_bonobo_control (NAUTILUS_VIEW (view));
-
- p->popup_ui = bonobo_control_get_popup_ui_component (p->control);
- g_assert (BONOBO_IS_UI_COMPONENT (p->popup_ui));
- bonobo_ui_util_set_ui (p->popup_ui, SHARE_DIR,
- "nautilus-epiphany-view.xml",
- "EphyNautilusView", NULL);
- p->popup = ephy_embed_popup_control_new (p->control);
- ephy_embed_popup_control_connect_verbs
- (EPHY_EMBED_POPUP_CONTROL (p->popup), p->popup_ui);
- g_object_set_data (G_OBJECT (p->popup), "NautilisView", view);
-
- bonobo_ui_component_add_verb_list_with_data (p->popup_ui, ephy_popup_verbs, p->popup);
-}
-
-BonoboObject *
-ephy_nautilus_view_new_component (EphyShell *shell)
-{
- return BONOBO_OBJECT (g_object_new (EPHY_TYPE_NAUTILUS_VIEW, NULL));
-}
-
-static void
-ephy_nautilus_view_finalize (GObject *object)
-{
- EphyNautilusView *view = EPHY_NAUTILUS_VIEW (object);
- EphyNautilusViewPrivate *p = view->priv;
-
- if (p->find_dialog)
- {
- g_object_remove_weak_pointer (G_OBJECT (p->find_dialog),
- (gpointer *) &p->find_dialog);
- g_object_unref (p->find_dialog);
- }
-
- g_object_unref (p->popup);
-
- g_free (p->title);
- g_free (p->location);
-
- GNOME_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
-}
-
-static void
-ephy_nautilus_view_class_init (EphyNautilusViewClass *class)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = ephy_nautilus_view_finalize;
-
- g_type_class_add_private (object_class, sizeof(EphyNautilusViewPrivate));
-}
-
-static gint
-gnv_embed_dom_mouse_click_cb (EphyEmbed *embed,
- EphyEmbedEvent *event,
- EphyNautilusView *view)
-{
- EphyEmbedEventType type;
- EmbedEventContext context;
-
- type = ephy_embed_event_get_event_type (event);
- context = ephy_embed_event_get_context (event);
-
- if (type == EPHY_EMBED_EVENT_MOUSE_BUTTON2
- && (context & EMBED_CONTEXT_LINK))
- {
- const GValue *value;
- const gchar *url;
- ephy_embed_event_get_property (event, "link", &value);
- url = g_value_get_string (value);
-
- g_return_val_if_fail (url, FALSE);
-
- nautilus_view_open_location (NAUTILUS_VIEW (view), url,
- Nautilus_ViewFrame_OPEN_IN_NAVIGATION,
- 0, NULL);
- }
-
- return FALSE;
-}
-
-static void
-gnv_embed_context_menu_cb (EphyEmbed *embed,
- EphyEmbedEvent *event,
- EphyNautilusView *view)
-{
- EphyNautilusViewPrivate *p = view->priv;
-
- ephy_embed_popup_control_set_event (p->popup, event);
- ephy_embed_popup_control_show (p->popup, embed);
-}
-
-static void
-gnv_embed_link_message_cb (EphyEmbed *embed, EphyNautilusView *view)
-{
- char *message;
-
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
-
- message = ephy_embed_get_link_message (embed);
-
- nautilus_view_report_status (NAUTILUS_VIEW (view), message);
-
- g_free (message);
-}
-
-static void
-gnv_embed_location_cb (EphyEmbed *embed, const char *new_uri, EphyNautilusView *view)
-{
- const char *prefixes_to_ignore[] =
- {
- "about:",
- "javascript:",
- NULL
- };
- int i = 0;
-
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- g_return_if_fail (view->priv->embed == embed);
- g_return_if_fail (new_uri != NULL);
-
- /* don't inform nautilus about uris that it can't understand */
- while (prefixes_to_ignore[i] != NULL)
- {
- if (strncmp (prefixes_to_ignore[i], new_uri, strlen (prefixes_to_ignore[i])) == 0)
- {
- return;
- }
- ++i;
- }
-
- nautilus_view_report_location_change (NAUTILUS_VIEW (view), new_uri, NULL, new_uri);
-
- g_free (view->priv->location);
- view->priv->location = g_strdup (new_uri);
-}
-
-static void
-gnv_embed_title_cb (EphyEmbed *embed, EphyNautilusView *view)
-{
- EphyNautilusViewPrivate *p;
-
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- p = view->priv;
- g_return_if_fail (view->priv->embed == embed);
-
- g_free (p->title);
- p->title = ephy_embed_get_title (embed);
-
- nautilus_view_set_title (NAUTILUS_VIEW (view), p->title);
-}
-
-static void
-gnv_load_location_cb (EphyNautilusView *view, const char *location, gpointer user_data)
-{
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- g_return_if_fail (location != NULL);
-
- nautilus_view_report_load_underway (NAUTILUS_VIEW (view));
- ephy_embed_load_url (view->priv->embed, location);
-
-}
-
-static void
-gnv_stop_loading_cb (EphyNautilusView *view, gpointer user_data)
-{
-}
-
-static void
-gnv_embed_new_window_cb (EphyEmbed *embed, EphyEmbed **new_embed,
- EphyEmbedChrome chromemask, EphyNautilusView *view)
-{
- EphyTab *new_tab;
- EphyWindow *window;
-
- window = ephy_window_new ();
- new_tab = ephy_tab_new ();
- gtk_widget_show (GTK_WIDGET (new_tab));
-
- ephy_window_add_tab (window, new_tab, EPHY_NOTEBOOK_INSERT_LAST, FALSE);
-
- *new_embed = ephy_tab_get_embed (new_tab);
-}
-
-static void
-gnv_bonobo_control_activate_cb (BonoboControl *control, gboolean state, EphyNautilusView *view)
-{
- if (state)
- {
- EphyNautilusViewPrivate *p = view->priv;
-
- p->ui = nautilus_view_set_up_ui (NAUTILUS_VIEW (view), SHARE_DIR,
- "nautilus-epiphany-view.xml", "EphyNautilusView");
- g_return_if_fail (BONOBO_IS_UI_COMPONENT (p->ui));
-
- bonobo_ui_component_add_verb_list_with_data (p->ui, ephy_verbs, view);
- }
-}
-
-static EphyNautilusView *
-gnv_view_from_popup (EphyEmbedPopupControl*popup)
-{
- return g_object_get_data (G_OBJECT (popup), "NautilisView");
-}
-
-
-static void
-gnv_popup_cmd_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- EphyNautilusView *view;
- const GValue *value;
-
- view = gnv_view_from_popup (popup);
-
- info = ephy_embed_popup_control_get_event (popup);
-
- ephy_embed_event_get_property (info, "link", &value);
-
- nautilus_view_open_location (NAUTILUS_VIEW (view),
- g_value_get_string (value),
- Nautilus_ViewFrame_OPEN_IN_NAVIGATION,
- 0, NULL);
-}
-
-static void
-gnv_popup_cmd_image_in_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- EphyNautilusView *view;
- const GValue *value;
-
- view = gnv_view_from_popup (popup);
-
- info = ephy_embed_popup_control_get_event (popup);
-
- ephy_embed_event_get_property (info, "image", &value);
-
- nautilus_view_open_location (NAUTILUS_VIEW (view),
- g_value_get_string (value),
- Nautilus_ViewFrame_OPEN_IN_NAVIGATION,
- 0, NULL);
-}
-
-static void
-gnv_popup_cmd_frame_in_new_window (BonoboUIComponent *uic,
- EphyEmbedPopupControl*popup,
- const char* verbname)
-{
- EphyEmbedEvent *info;
- EphyNautilusView *view;
- gchar *location;
-
- view = gnv_view_from_popup (popup);
-
- info = ephy_embed_popup_control_get_event (popup);
-
- location = ephy_embed_get_location (view->priv->embed, FALSE);
-
- nautilus_view_open_location (NAUTILUS_VIEW (view),
- location,
- Nautilus_ViewFrame_OPEN_IN_NAVIGATION,
- 0, NULL);
-
- g_free (location);
-}
-
-static void
-gnv_cmd_select_encoding (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname)
-{
- EphyDialog *dialog;
-
- dialog = EPHY_DIALOG (g_object_new (EPHY_TYPE_ENCODING_DIALOG,
- "embed", view->priv->embed,
- NULL));
-
- ephy_dialog_set_modal (dialog, TRUE);
- ephy_dialog_run (dialog);
- g_object_unref (dialog);
-}
-
-static void
-gnv_cmd_file_print (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname)
-{
- EphyDialog *dialog;
- EphyNautilusViewPrivate *p = view->priv;
-
- dialog = ephy_print_dialog_new (NULL, p->embed, FALSE);
-
- ephy_dialog_set_modal (dialog, TRUE);
- ephy_dialog_run (dialog);
- g_object_unref (dialog);
-}
-
-static void
-gnv_cmd_edit_find (BonoboUIComponent *uic,
- EphyNautilusView *view,
- const char* verbname)
-{
- EphyNautilusViewPrivate *p = view->priv;
-
- if (p->find_dialog == NULL)
- {
- p->find_dialog = find_dialog_new (p->embed);
- g_object_add_weak_pointer (G_OBJECT (p->find_dialog),
- (gpointer *) &p->find_dialog);
- }
-
- ephy_dialog_show (p->find_dialog);
-}
-
-/* zoomable */
-static void
-gnv_zoomable_set_zoom_level_cb (BonoboZoomable *zoomable,
- float level,
- EphyNautilusView *view)
-{
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- ephy_embed_set_zoom (view->priv->embed,
- ephy_zoom_get_nearest_zoom_level (level), TRUE);
-}
-
-static void
-gnv_zoomable_zoom_in_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view)
-{
- float zoom, new_zoom;
-
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
-
- zoom = ephy_embed_get_zoom (view->priv->embed);
-
- new_zoom = ephy_zoom_get_changed_zoom_level (zoom, 1);
- ephy_embed_set_zoom (view->priv->embed, new_zoom, TRUE);
-}
-
-static void
-gnv_zoomable_zoom_out_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view)
-{
- float zoom, new_zoom;
-
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
-
- zoom = ephy_embed_get_zoom (view->priv->embed);
-
- new_zoom = ephy_zoom_get_changed_zoom_level (zoom, -1);
- ephy_embed_set_zoom (view->priv->embed, new_zoom, TRUE);
-}
-
-static void
-gnv_zoomable_zoom_to_fit_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view)
-{
- gnv_zoomable_zoom_to_default_cb (zoomable, view);
-}
-
-static void
-gnv_zoomable_zoom_to_default_cb (BonoboZoomable *zoomable,
- EphyNautilusView *view)
-{
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
- ephy_embed_set_zoom (view->priv->embed, 1.0, TRUE);
-}
-
-static void
-gnv_embed_zoom_change_cb (EphyNautilusView *embed,
- float new_zoom,
- EphyNautilusView *view)
-{
- g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));
-
- bonobo_zoomable_report_zoom_level_changed (view->priv->zoomable,
- new_zoom, NULL);
-}
diff --git a/src/ephy-nautilus-view.h b/src/ephy-nautilus-view.h
deleted file mode 100644
index c8139b931..000000000
--- a/src/ephy-nautilus-view.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2001, 2002 Ricardo Fernández Pascual
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Id$
- */
-
-#ifndef EPHY_NAUTILUS_VIEW_H
-#define EPHY_NAUTILUS_VIEW_H
-
-#include <libnautilus/nautilus-view.h>
-#include "ephy-shell.h"
-
-G_BEGIN_DECLS
-
-#define EPHY_TYPE_NAUTILUS_VIEW (ephy_nautilus_view_get_type ())
-#define EPHY_NAUTILUS_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_NAUTILUS_VIEW, EphyNautilusView))
-#define EPHY_NAUTILUS_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_NAUTILUS_VIEW, EphyNautilusViewClass))
-#define EPHY_IS_NAUTILUS_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_NAUTILUS_VIEW))
-#define EPHY_IS_NAUTILUS_VIEW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_NAUTILUS_VIEW))
-#define EPHY_NAUTILUS_VIEW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_NAUTILUS_VIEW, EphyNautilusViewClass))
-
-typedef struct EphyNautilusView EphyNautilusView;
-typedef struct EphyNautilusViewClass EphyNautilusViewClass;
-typedef struct EphyNautilusViewPrivate EphyNautilusViewPrivate;
-
-struct EphyNautilusView
-{
- NautilusView parent;
-
- /*< private >*/
- EphyNautilusViewPrivate *priv;
-};
-
-struct EphyNautilusViewClass
-{
- NautilusViewClass parent_class;
-};
-
-GType ephy_nautilus_view_get_type (void);
-
-BonoboObject *ephy_nautilus_view_new_component (EphyShell *shell);
-
-G_END_DECLS
-
-#endif
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 7bd229531..390ca3032 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -53,12 +53,6 @@
#include <unistd.h>
#include <libgnomeui/gnome-client.h>
-#ifdef ENABLE_NAUTILUS_VIEW
-#include <bonobo/bonobo-generic-factory.h>
-#include "ephy-nautilus-view.h"
-#endif
-
-#define EPHY_NAUTILUS_VIEW_IID "OAFIID:GNOME_Epiphany_NautilusView"
#define AUTOMATION_IID "OAFIID:GNOME_Epiphany_Automation"
#define SERVER_TIMEOUT 60000
@@ -151,12 +145,6 @@ ephy_automation_factory_cb (BonoboGenericFactory *this_factory,
{
return BONOBO_OBJECT (g_object_new (EPHY_TYPE_AUTOMATION, NULL));
}
-#ifdef ENABLE_NAUTILUS_VIEW
- else if (strcmp (iid, EPHY_NAUTILUS_VIEW_IID) == 0)
- {
- return BONOBO_OBJECT (ephy_nautilus_view_new_component (shell));
- }
-#endif
g_assert_not_reached ();