2000-04-19 03:55:01 +00:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2000 Eazel, 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: Ramiro Estrugo <ramiro@eazel.com>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* nautilus-mozilla-content-view.c - Mozilla content view component.
|
|
|
|
*
|
2000-05-09 22:35:45 +00:00
|
|
|
* This component uses the mozilla gecko layout engine via the gtk_moz_embed
|
|
|
|
* widget to display and munge html.
|
2000-04-19 03:55:01 +00:00
|
|
|
*/
|
|
|
|
|
2000-08-09 10:10:06 +00:00
|
|
|
#define nopeDEBUG_ramiro 1
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
#include <config.h>
|
|
|
|
#include "nautilus-mozilla-content-view.h"
|
|
|
|
|
|
|
|
#include "gtkmozembed.h"
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-06-29 21:04:42 +00:00
|
|
|
#include "mozilla-preferences.h"
|
2000-08-31 22:05:28 +00:00
|
|
|
#include "mozilla-components.h"
|
2000-09-05 10:59:43 +00:00
|
|
|
#include "mozilla-events.h"
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
#include <bonobo/bonobo-control.h>
|
2000-09-29 20:26:01 +00:00
|
|
|
#include <gconf/gconf.h>
|
|
|
|
#include <gconf/gconf-client.h>
|
2000-04-19 03:55:01 +00:00
|
|
|
#include <gtk/gtksignal.h>
|
|
|
|
#include <libgnome/gnome-i18n.h>
|
|
|
|
#include <libgnomeui/gnome-stock.h>
|
2000-09-01 00:52:46 +00:00
|
|
|
#include <libgnomevfs/gnome-vfs.h>
|
2000-09-29 20:26:01 +00:00
|
|
|
#include <stdlib.h>
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-05-24 02:23:48 +00:00
|
|
|
struct NautilusMozillaContentViewDetails {
|
2000-04-19 03:55:01 +00:00
|
|
|
char *uri;
|
|
|
|
GtkWidget *mozilla;
|
[removed] [removed]
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_initialize),
(hardware_view_notify_location_change_callback):
* components/hardware/nautilus-hardware-view.h:
* components/help/hyperbola-nav-index.c:
(hyperbola_navigation_index_select_row):
* components/help/hyperbola-nav-search.c:
(hyperbola_navigation_search_select_row),
(hyperbola_navigation_search_new):
* components/html/ntl-web-browser.c: (browser_url_load_done),
(browser_vfs_callback), (browser_goto_url_real),
(browser_goto_url), (browser_select_url), (browser_title_changed),
(browser_notify_location_change), (make_obj):
* components/loser/content/main.c: (loser_make_object):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_initialize),
(loser_notify_location_change_callback):
* components/loser/content/nautilus-content-loser.h:
* components/loser/sidebar/main.c: (loser_make_object):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_initialize),
(loser_notify_location_change_callback):
* components/mozilla/main.c: (mozilla_make_object):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_request_location_change),
(mozilla_notify_location_change_callback),
(mozilla_title_changed_callback), (mozilla_link_message_callback):
* components/mozilla/nautilus-mozilla-content-view.h:
* components/music/main.c: (music_view_make_object):
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize), (click_column_callback),
(music_view_notify_location_change_callback),
(nautilus_music_view_drag_data_received):
* components/music/nautilus-music-view.h:
* components/rpmview/main.c: (rpm_view_make_object):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize),
(rpm_view_notify_location_change_callback):
* components/rpmview/nautilus-rpm-view.h:
* components/sample/main.c: (sample_make_object):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_initialize),
(sample_notify_location_change_callback):
* components/sample/nautilus-sample-content-view.h:
* components/services/startup/nautilus-view/main.c:
(services_make_object):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(go_to_uri), (nautilus_service_startup_view_initialize),
(service_main_notify_location_change_cb):
* components/services/startup/nautilus-view/nautilus-service-startup-view.h:
* libnautilus/Makefile.am:
* libnautilus/libnautilus.h:
* libnautilus/nautilus-content-view-frame.c: [removed]
* libnautilus/nautilus-content-view-frame.h: [removed]
* libnautilus/nautilus-view-component.idl:
* libnautilus/nautilus-view-frame-private.h:
* libnautilus/nautilus-view-frame.c:
(impl_Nautilus_View_save_state), (impl_Nautilus_View_load_state),
(impl_Nautilus_View_notify_location_change),
(impl_Nautilus_View_show_properties),
(impl_Nautilus_View_notify_selection_change),
(impl_Nautilus_View_stop_location_change),
(impl_Nautilus_View__destroy), (impl_Nautilus_View__create),
(nautilus_view_initialize_class), (nautilus_view_initialize),
(nautilus_view_new), (nautilus_view_new_from_bonobo_control),
(get_view_frame), (nautilus_view_request_location_change),
(nautilus_view_request_selection_change),
(nautilus_view_request_status_change),
(nautilus_view_request_progress_change),
(nautilus_view_request_title_change),
(nautilus_view_get_bonobo_control),
(nautilus_view_get_main_window):
* libnautilus/nautilus-view-frame.h:
* src/Makefile.am:
* src/file-manager/fm-directory-view.c: (get_bonobo_control),
(fm_directory_view_initialize), (display_selection_info),
(fm_directory_view_send_selection_change),
(notify_location_change_callback), (stop_location_change_callback),
(done_loading), (fm_directory_view_activate_file_internal),
(finish_loading_uri):
* src/file-manager/fm-directory-view.h:
* src/ntl-app.c: (impl_Nautilus_Application_create_object):
* src/ntl-content-view.c: [removed]
* src/ntl-content-view.h: [removed]
* src/ntl-uri-map.c: (make_oaf_query_with_known_mime_type),
(make_oaf_query_with_uri_scheme_only):
* src/ntl-view-frame-svr.c: (impl_Nautilus_ViewFrame__destroy),
(impl_Nautilus_ViewFrame__create),
(impl_Nautilus_ViewFrame__get_main_window),
(impl_Nautilus_ViewFrame_request_location_change),
(impl_Nautilus_ViewFrame_request_selection_change),
(impl_Nautilus_ViewFrame_request_status_change),
(impl_Nautilus_ViewFrame_request_progress_change),
(impl_Nautilus_ViewFrame_request_title_change):
* src/ntl-view-private.h:
* src/ntl-view.c: (nautilus_view_frame_class_init),
(nautilus_view_frame_set_arg), (nautilus_view_frame_get_arg),
(nautilus_view_frame_request_location_change),
(nautilus_view_frame_request_selection_change),
(nautilus_view_frame_request_status_change),
(nautilus_view_frame_request_progress_change),
(nautilus_view_frame_request_title_change),
(nautilus_view_frame_set_label), (nautilus_view_frame_activate):
* src/ntl-view.h:
* src/ntl-window-msgs.c: (nautilus_window_request_title_change),
(nautilus_window_load_meta_view),
(nautilus_window_request_location_change),
(nautilus_window_load_content_view):
* src/ntl-window-msgs.h:
* src/ntl-window-private.h:
* src/ntl-window.c:
(nautilus_window_request_title_change_callback),
(nautilus_window_connect_content_view),
(nautilus_window_real_set_content_view):
Got rid of ContentView and ContentViewFrame.
2000-05-25 01:49:32 +00:00
|
|
|
NautilusView *nautilus_view;
|
2000-05-09 22:35:45 +00:00
|
|
|
GdkCursor *busy_cursor;
|
2000-09-29 01:17:04 +00:00
|
|
|
gboolean got_called_by_nautilus;
|
2000-04-19 03:55:01 +00:00
|
|
|
};
|
|
|
|
|
2000-09-29 20:26:01 +00:00
|
|
|
static const char PROXY_KEY[] = "/system/gnome-vfs/http-proxy";
|
|
|
|
static const char USE_PROXY_KEY[] = "/system/gnome-vfs/use-http-proxy";
|
|
|
|
|
2000-06-02 10:44:30 +00:00
|
|
|
static void nautilus_mozilla_content_view_initialize_class (NautilusMozillaContentViewClass *klass);
|
|
|
|
static void nautilus_mozilla_content_view_initialize (NautilusMozillaContentView *view);
|
|
|
|
static void nautilus_mozilla_content_view_destroy (GtkObject *object);
|
Some build fixes.
* acconfig.h:
* configure.in:
Removed the NAUTILUS_PREFIX that I added. I did it wrong.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_pixmap_file):
* components/hardware/nautilus-hardware-view.c:
(setup_overview_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title), (setup_signup_form), (setup_config_form):
* libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf):
* libnautilus-extensions/nautilus-icon-factory.c:
(make_full_icon_path):
* src/nautilus-application.c: (display_caveat):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(nautilus_emblem_dialog_new), (make_category_link):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize):
Replaced most uses of gnome_pixmap_file on "nautilus/"
with a call to a new nautilus_pixmap_file in an attempt to
make installations where nautilus has a different prefix
from gnome-libs work. I now think this is a waste of time,
but Mathieu Lacage says this is still an improvement.
* components/help/Makefile.am:
* components/help/hyperbola-filefmt.c: (fmt_map_entry):
Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX.
* components/websearch/ntl-web-search.c:
(web_search_populate_engines):
Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX.
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_set_busy_cursor),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_clear_busy_cursor),
(mozilla_load_location_callback), (bonobo_mozilla_callback),
(mozilla_merge_bonobo_items_callback),
(mozilla_title_changed_callback),
(mozilla_location_changed_callback), (mozilla_net_status_callback),
(mozilla_link_message_callback), (mozilla_progress_callback),
(mozilla_open_uri_callback):
Took a cut at fixing the Mozilla component for the new API.
Ramiro will have to take care of the rest.
* components/services/install/lib/Makefile.am:
* components/services/time/command-line/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/time/service/Makefile.am:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/sample/command-line/Makefile.am:
* components/services/trilobite/sample/service/Makefile.am:
* libnautilus/Makefile.am:
Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested
in the form of a patch by Martijn van Beers.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory),
(nautilus_get_pixmap_directory):
* libnautilus-extensions/nautilus-link-set.c:
(get_link_set_document):
* src/Makefile.am:
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_data_get), (make_drag_image),
(get_xml_path), (make_properties_from_directory):
* src/nautilus-link-set-window.c: (get_link_set_names):
* src/file-manager/Makefile.am:
* src/file-manager/fm-properties-window.c: (get_property_names):
Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_uri_from_local_path): Added a new helper function for
use when you have a path and need a URI. This does a better job
than just adding a "file://" on the front.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c:
(get_first_callback), (nautilus_gtk_container_get_first_child):
* src/nautilus-window-toolbars.c: (setup_button):
* src/nautilus-window.c:
(replace_special_current_view_in_content_view_menu):
Implemented the first_child function and used it where appropriate.
* libnautilus-extensions/nautilus-preferences-item.c:
(add_icon_themes): Use nautilus_get_pixmap_directory intead of
misusing gnome_pixmap_file by calling it on a directory name.
* nautilus-installer/src/support.c: (create_pixmap),
(create_image): Added FIXMEs since it isn't clear if this code
will work with a Nautilus prefix that's not the same as the
gnome-libs prefix.
* Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
|
|
|
static void mozilla_load_location_callback (NautilusView *nautilus_view,
|
|
|
|
const char *location,
|
2000-06-02 10:44:30 +00:00
|
|
|
NautilusMozillaContentView *view);
|
|
|
|
static void mozilla_merge_bonobo_items_callback (BonoboObject *control,
|
|
|
|
gboolean state,
|
|
|
|
gpointer user_data);
|
2000-04-19 05:06:01 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
/* Mozilla embed widget callbacks */
|
2000-06-02 10:44:30 +00:00
|
|
|
static void mozilla_title_changed_callback (GtkMozEmbed *mozilla,
|
|
|
|
gpointer user_data);
|
|
|
|
static void mozilla_location_changed_callback (GtkMozEmbed *mozilla,
|
2000-08-09 07:58:55 +00:00
|
|
|
gpointer user_data);
|
2000-09-05 10:59:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* The name of these callbacks changed at M17
|
|
|
|
*/
|
|
|
|
#if (MOZILLA_MILESTONE >= 17)
|
2000-08-09 07:58:55 +00:00
|
|
|
static void mozilla_net_state_callback (GtkMozEmbed *mozilla,
|
|
|
|
gint state,
|
|
|
|
guint status,
|
2000-06-02 10:44:30 +00:00
|
|
|
gpointer user_data);
|
2000-08-09 07:58:55 +00:00
|
|
|
#else
|
2000-06-02 10:44:30 +00:00
|
|
|
static void mozilla_net_status_callback (GtkMozEmbed *mozilla,
|
|
|
|
gint flags,
|
|
|
|
gpointer user_data);
|
2000-08-09 07:58:55 +00:00
|
|
|
#endif
|
2000-06-02 10:44:30 +00:00
|
|
|
static void mozilla_link_message_callback (GtkMozEmbed *mozilla,
|
|
|
|
gpointer user_data);
|
|
|
|
static void mozilla_progress_callback (GtkMozEmbed *mozilla,
|
|
|
|
gint max_progress,
|
|
|
|
gint current_progress,
|
|
|
|
gpointer user_data);
|
|
|
|
static gint mozilla_open_uri_callback (GtkMozEmbed *mozilla,
|
|
|
|
const char *uri,
|
|
|
|
gpointer user_data);
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* For M18, we peek dom events to deal with eazel: uris (and all other special uris)
|
|
|
|
*/
|
|
|
|
#if (MOZILLA_MILESTONE >= 18)
|
|
|
|
static gint mozilla_dom_mouse_click_callback (GtkMozEmbed *mozilla,
|
|
|
|
gpointer dom_event,
|
|
|
|
gpointer user_data);
|
|
|
|
#endif /* MOZILLA_MILESTONE >= 18 */
|
|
|
|
|
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
/* Other mozilla content view functions */
|
2000-06-02 10:44:30 +00:00
|
|
|
static void mozilla_content_view_set_busy_cursor (NautilusMozillaContentView *view);
|
|
|
|
static void mozilla_content_view_clear_busy_cursor (NautilusMozillaContentView *view);
|
|
|
|
static gboolean mozilla_is_uri_handled_by_nautilus (const char *uri);
|
|
|
|
|
2000-04-19 05:06:01 +00:00
|
|
|
static GtkVBoxClass *parent_class = NULL;
|
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
static void
|
|
|
|
nautilus_mozilla_content_view_initialize_class (NautilusMozillaContentViewClass *klass)
|
|
|
|
{
|
|
|
|
GtkObjectClass *object_class;
|
|
|
|
|
|
|
|
object_class = GTK_OBJECT_CLASS (klass);
|
2000-04-19 05:06:01 +00:00
|
|
|
|
|
|
|
parent_class = gtk_type_class (GTK_TYPE_VBOX);
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
object_class->destroy = nautilus_mozilla_content_view_destroy;
|
|
|
|
}
|
|
|
|
|
2000-08-31 22:05:28 +00:00
|
|
|
static gboolean mozilla_one_time_happenings = FALSE;
|
2000-06-29 21:04:42 +00:00
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
static void
|
|
|
|
nautilus_mozilla_content_view_initialize (NautilusMozillaContentView *view)
|
|
|
|
{
|
2000-09-29 20:26:01 +00:00
|
|
|
GConfClient *gconf_client;
|
Update for GConf HEAD (0.9)
* README:
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize):
* components/services/install/lib/eazel-install-metadata.c:
(check_gconf_init), (get_conf_string), (get_conf_int),
(get_conf_boolean):
* components/services/install/lib/eazel-install-types.c:
(categorydata_new):
* components/services/nautilus-dependent-shared/Makefile.am:
* components/services/trilobite/libtrilobite/trilobite-redirect.c:
(check_gconf_init), (wipe_redirect_table), (add_redirect),
(trilobite_redirect_lookup), (trilobite_get_services_address):
* configure.in:
* libnautilus-extensions/nautilus-global-preferences.c:
(global_preferences_get_sidebar_panel_view_identifiers),
(register_proxy_preferences):
* libnautilus-extensions/nautilus-preferences-private.h:
* libnautilus-extensions/nautilus-preferences.c:
(preferences_hash_node_add_by_user_level_callbacks),
(preferences_hash_node_add_callback),
(preferences_make_make_gconf_key),
(preferences_gconf_by_user_level_callback),
(preferences_gconf_callback), (preferences_initialize_if_needed),
(nautilus_preferences_set_boolean),
(nautilus_preferences_get_boolean),
(nautilus_preferences_set_string_list),
(nautilus_preferences_get_string_list),
(nautilus_preferences_set_enum), (nautilus_preferences_get_enum),
(nautilus_preferences_set), (nautilus_preferences_get),
(nautilus_preferences_handle_error):
* libnautilus-extensions/nautilus-user-level-manager.c:
(user_level_manager_new), (user_level_set_default_if_needed),
(gconf_user_level_changed_callback),
(nautilus_user_level_manager_set_user_level),
(user_level_manager_get_user_level_as_string),
(nautilus_user_level_manager_set_default_value_if_needed),
(nautilus_user_level_manager_compare_preference_between_user_levels
):
Update for GConf HEAD (0.9)
2000-10-03 12:55:56 +00:00
|
|
|
GError *error = NULL;
|
2000-09-29 20:26:01 +00:00
|
|
|
char *argv[] = { "nautilus-mozilla-component", NULL };
|
|
|
|
char *proxy_string = NULL;
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
view->details = g_new0 (NautilusMozillaContentViewDetails, 1);
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
view->details->uri = NULL;
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-09-29 01:17:04 +00:00
|
|
|
view->details->got_called_by_nautilus = FALSE;
|
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
/* Conjure up the beast. May God have mercy on our souls. */
|
2000-05-24 02:22:36 +00:00
|
|
|
view->details->mozilla = gtk_moz_embed_new ();
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-08-31 22:05:28 +00:00
|
|
|
if (!mozilla_one_time_happenings)
|
2000-06-29 21:04:42 +00:00
|
|
|
{
|
2000-08-31 22:05:28 +00:00
|
|
|
mozilla_one_time_happenings = TRUE;
|
2000-09-05 10:59:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set some mozilla preferences
|
|
|
|
*/
|
2000-06-29 21:04:42 +00:00
|
|
|
mozilla_preference_set_boolean ("nglayout.widget.gfxscrollbars", FALSE);
|
|
|
|
mozilla_preference_set_boolean ("security.checkloaduri", FALSE);
|
|
|
|
mozilla_preference_set ("general.useragent.misc", "Nautilus");
|
2000-08-31 22:05:28 +00:00
|
|
|
|
2000-09-29 20:26:01 +00:00
|
|
|
/* Locate and set proxy preferences */
|
|
|
|
if (gconf_init (1, argv, &error)) {
|
|
|
|
gconf_client = gconf_client_get_default ();
|
|
|
|
if (gconf_client != NULL) {
|
|
|
|
if (gconf_client_get_bool (gconf_client, USE_PROXY_KEY, &error)) {
|
|
|
|
proxy_string = gconf_client_get_string (gconf_client, PROXY_KEY, &error);
|
|
|
|
if (proxy_string != NULL) {
|
|
|
|
char *proxy, *port;
|
|
|
|
port = strchr (proxy_string, ':');
|
|
|
|
if (port != NULL) {
|
|
|
|
proxy = g_strdup (proxy_string);
|
|
|
|
proxy [port - proxy_string] = '\0';
|
|
|
|
port++;
|
|
|
|
|
|
|
|
mozilla_preference_set ("network.proxy.http", proxy);
|
|
|
|
mozilla_preference_set_int ("network.proxy.http_port", atoi (port));
|
|
|
|
|
|
|
|
/* 1, Configure proxy settings manually */
|
|
|
|
mozilla_preference_set_int ("network.proxy.type", 1);
|
|
|
|
|
|
|
|
g_free (proxy_string);
|
|
|
|
g_free (proxy);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* Default is 3, which conects to internet hosts directly */
|
|
|
|
mozilla_preference_set_int ("network.proxy.type", 3);
|
|
|
|
}
|
|
|
|
gtk_object_unref (GTK_OBJECT (gconf_client));
|
|
|
|
}
|
|
|
|
}
|
2000-06-29 21:04:42 +00:00
|
|
|
}
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
/* Add callbacks to the beast */
|
2000-09-05 10:59:43 +00:00
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"title",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_title_changed_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"location",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_location_changed_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The name of these callbacks changed at M17
|
|
|
|
*/
|
|
|
|
#if (MOZILLA_MILESTONE >= 17)
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"net_state",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_net_state_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
2000-08-09 07:58:55 +00:00
|
|
|
#else
|
2000-09-05 10:59:43 +00:00
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"net_status",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_net_status_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
2000-08-09 07:58:55 +00:00
|
|
|
#endif
|
2000-09-05 10:59:43 +00:00
|
|
|
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"link_message",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_link_message_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"progress",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_progress_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"open_uri",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_open_uri_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For M18, we peek dom events to deal with eazel: uris (and all other special uris)
|
|
|
|
*/
|
|
|
|
#if (MOZILLA_MILESTONE >= 18)
|
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->mozilla),
|
|
|
|
"dom_mouse_click",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_dom_mouse_click_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
|
|
|
#endif /* MOZILLA_MILESTONE >= 18 */
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (view), view->details->mozilla, TRUE, TRUE, 1);
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
gtk_widget_show (view->details->mozilla);
|
2000-04-19 03:55:01 +00:00
|
|
|
|
[removed] [removed]
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_initialize),
(hardware_view_notify_location_change_callback):
* components/hardware/nautilus-hardware-view.h:
* components/help/hyperbola-nav-index.c:
(hyperbola_navigation_index_select_row):
* components/help/hyperbola-nav-search.c:
(hyperbola_navigation_search_select_row),
(hyperbola_navigation_search_new):
* components/html/ntl-web-browser.c: (browser_url_load_done),
(browser_vfs_callback), (browser_goto_url_real),
(browser_goto_url), (browser_select_url), (browser_title_changed),
(browser_notify_location_change), (make_obj):
* components/loser/content/main.c: (loser_make_object):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_initialize),
(loser_notify_location_change_callback):
* components/loser/content/nautilus-content-loser.h:
* components/loser/sidebar/main.c: (loser_make_object):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_initialize),
(loser_notify_location_change_callback):
* components/mozilla/main.c: (mozilla_make_object):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_request_location_change),
(mozilla_notify_location_change_callback),
(mozilla_title_changed_callback), (mozilla_link_message_callback):
* components/mozilla/nautilus-mozilla-content-view.h:
* components/music/main.c: (music_view_make_object):
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize), (click_column_callback),
(music_view_notify_location_change_callback),
(nautilus_music_view_drag_data_received):
* components/music/nautilus-music-view.h:
* components/rpmview/main.c: (rpm_view_make_object):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize),
(rpm_view_notify_location_change_callback):
* components/rpmview/nautilus-rpm-view.h:
* components/sample/main.c: (sample_make_object):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_initialize),
(sample_notify_location_change_callback):
* components/sample/nautilus-sample-content-view.h:
* components/services/startup/nautilus-view/main.c:
(services_make_object):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(go_to_uri), (nautilus_service_startup_view_initialize),
(service_main_notify_location_change_cb):
* components/services/startup/nautilus-view/nautilus-service-startup-view.h:
* libnautilus/Makefile.am:
* libnautilus/libnautilus.h:
* libnautilus/nautilus-content-view-frame.c: [removed]
* libnautilus/nautilus-content-view-frame.h: [removed]
* libnautilus/nautilus-view-component.idl:
* libnautilus/nautilus-view-frame-private.h:
* libnautilus/nautilus-view-frame.c:
(impl_Nautilus_View_save_state), (impl_Nautilus_View_load_state),
(impl_Nautilus_View_notify_location_change),
(impl_Nautilus_View_show_properties),
(impl_Nautilus_View_notify_selection_change),
(impl_Nautilus_View_stop_location_change),
(impl_Nautilus_View__destroy), (impl_Nautilus_View__create),
(nautilus_view_initialize_class), (nautilus_view_initialize),
(nautilus_view_new), (nautilus_view_new_from_bonobo_control),
(get_view_frame), (nautilus_view_request_location_change),
(nautilus_view_request_selection_change),
(nautilus_view_request_status_change),
(nautilus_view_request_progress_change),
(nautilus_view_request_title_change),
(nautilus_view_get_bonobo_control),
(nautilus_view_get_main_window):
* libnautilus/nautilus-view-frame.h:
* src/Makefile.am:
* src/file-manager/fm-directory-view.c: (get_bonobo_control),
(fm_directory_view_initialize), (display_selection_info),
(fm_directory_view_send_selection_change),
(notify_location_change_callback), (stop_location_change_callback),
(done_loading), (fm_directory_view_activate_file_internal),
(finish_loading_uri):
* src/file-manager/fm-directory-view.h:
* src/ntl-app.c: (impl_Nautilus_Application_create_object):
* src/ntl-content-view.c: [removed]
* src/ntl-content-view.h: [removed]
* src/ntl-uri-map.c: (make_oaf_query_with_known_mime_type),
(make_oaf_query_with_uri_scheme_only):
* src/ntl-view-frame-svr.c: (impl_Nautilus_ViewFrame__destroy),
(impl_Nautilus_ViewFrame__create),
(impl_Nautilus_ViewFrame__get_main_window),
(impl_Nautilus_ViewFrame_request_location_change),
(impl_Nautilus_ViewFrame_request_selection_change),
(impl_Nautilus_ViewFrame_request_status_change),
(impl_Nautilus_ViewFrame_request_progress_change),
(impl_Nautilus_ViewFrame_request_title_change):
* src/ntl-view-private.h:
* src/ntl-view.c: (nautilus_view_frame_class_init),
(nautilus_view_frame_set_arg), (nautilus_view_frame_get_arg),
(nautilus_view_frame_request_location_change),
(nautilus_view_frame_request_selection_change),
(nautilus_view_frame_request_status_change),
(nautilus_view_frame_request_progress_change),
(nautilus_view_frame_request_title_change),
(nautilus_view_frame_set_label), (nautilus_view_frame_activate):
* src/ntl-view.h:
* src/ntl-window-msgs.c: (nautilus_window_request_title_change),
(nautilus_window_load_meta_view),
(nautilus_window_request_location_change),
(nautilus_window_load_content_view):
* src/ntl-window-msgs.h:
* src/ntl-window-private.h:
* src/ntl-window.c:
(nautilus_window_request_title_change_callback),
(nautilus_window_connect_content_view),
(nautilus_window_real_set_content_view):
Got rid of ContentView and ContentViewFrame.
2000-05-25 01:49:32 +00:00
|
|
|
view->details->nautilus_view = nautilus_view_new (GTK_WIDGET (view));
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
gtk_signal_connect_while_alive (GTK_OBJECT (view->details->nautilus_view),
|
|
|
|
"load_location",
|
|
|
|
GTK_SIGNAL_FUNC (mozilla_load_location_callback),
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get notified when our bonobo control is activated so we
|
|
|
|
* can merge menu & toolbar items into Nautilus's UI.
|
|
|
|
*/
|
2000-09-05 10:59:43 +00:00
|
|
|
gtk_signal_connect_while_alive (
|
|
|
|
GTK_OBJECT (nautilus_view_get_bonobo_control (view->details->nautilus_view)),
|
|
|
|
"activate",
|
|
|
|
mozilla_merge_bonobo_items_callback,
|
|
|
|
view,
|
|
|
|
GTK_OBJECT (view->details->mozilla));
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
gtk_widget_show_all (GTK_WIDGET (view));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
nautilus_mozilla_content_view_destroy (GtkObject *object)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
2000-09-05 10:59:43 +00:00
|
|
|
|
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("%s()\n", __FUNCTION__);
|
|
|
|
#endif
|
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (object);
|
|
|
|
|
Removed a bunch of incorrect calls to bonobo_object_unref. An error in the
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_destroy):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_destroy):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_destroy):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_destroy):
* components/music/nautilus-music-view.c:
(nautilus_music_view_destroy):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_destroy):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_destroy):
* components/services/time/nautilus-view/trilobite-eazel-time-view.c:
(trilobite_eazel_time_view_destroy):
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_destroy):
Removed a bunch of incorrect calls to bonobo_object_unref.
An error in the sample can be an insidious thing.
* components/tree/main.c: (tree_object_destroyed),
(tree_make_object), (main): Removed some stray debugging stuff.
* libnautilus-extensions/Makefile.am: Got rid of the grid
* libnautilus-extensions/nautilus-icon-private.h: Got rid of the
grid.
* libnautilus-extensions/nautilus-icon-container.c:
(keyboard_icon_reveal_timeout_callback): Took out unneeded use of
thread locking macros. Maybe someday I'll regret this, but we can
add them back then.
(get_all_icon_bounds): Added shared function.
(update_scroll_region): Renamed set_scroll_region and made it use
the shared function. Also got rid of grid code.
(resort): Got rid of grid code.
(lay_down_icons): Got rid of grid code.
(relayout): Made it lay down new icons before doing any layout
work. Also made sure it doesn't do the resort while stretching.
(reload_icon_positions): Got rid of grid code.
(rubberband_select): Got rid of grid code. This was the one place
that it might have made things a little faster but probably not
due to the complexity of what it was doing.
(rubberband_timeout_callback): Took out unneeded use of thread
locking macros. Maybe someday I'll regret this, but we can add
them back then.
(destroy): Got rid of grid code.
(world_width_changed): Got rid of grid code.
(nautilus_icon_container_initialize): Got rid of grid code and
an extra idle cycle that wasn't needed.
(nautilus_icon_container_clear): Got rid of grid code and added
code to update the scroll region on clear.
(icon_destroy): Got rid of grid code.
(assign_icon_position), (finish_adding_icon),
(finish_adding_new_icons), (finish_adding_new_icons_callback),
(nautilus_icon_container_add): Replaced old idle code with
something specific to adding new icons. This does the proper
layout for manual as well as automatic layout cases.
* libnautilus-extensions/nautilus-background.h:
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_initialize_class): Made two signals instead
of one. One for when the background's settings change and another
for when the appearance changes.
(nautilus_background_set_color): Emit both signals.
(load_image_callback): Emit only the appearance change signal.
(nautilus_background_set_tile_image_uri): Emit both signals.
(nautilus_get_widget_background): Connect to the
appearance_changed signal.
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_connect_background_to_directory_metadata):
Connect to the settings_changed signal.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_real_merge_menus): Connect to the
settings_changed signal.
* src/nautilus-sidebar.c: (nautilus_sidebar_update_info): Connect
to the appearance_changed signal.
* components/music/nautilus-music-view.c:
(nautilus_music_view_set_up_background): Connect to the
settings_changed signal.
* HACKING: Gratuitious reformatting.
* RENAMING: Added notes about how we do renaming, at the request
of one of the hackers.
* nautilus-clean.sh: Added nautilus-tree-view to the things that
are killed, and made gratuitous changes to the script.
2000-06-27 00:52:50 +00:00
|
|
|
g_free (view->details->uri);
|
2000-04-19 03:55:01 +00:00
|
|
|
|
Removed a bunch of incorrect calls to bonobo_object_unref. An error in the
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_destroy):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_destroy):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_destroy):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_destroy):
* components/music/nautilus-music-view.c:
(nautilus_music_view_destroy):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_destroy):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_destroy):
* components/services/time/nautilus-view/trilobite-eazel-time-view.c:
(trilobite_eazel_time_view_destroy):
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_destroy):
Removed a bunch of incorrect calls to bonobo_object_unref.
An error in the sample can be an insidious thing.
* components/tree/main.c: (tree_object_destroyed),
(tree_make_object), (main): Removed some stray debugging stuff.
* libnautilus-extensions/Makefile.am: Got rid of the grid
* libnautilus-extensions/nautilus-icon-private.h: Got rid of the
grid.
* libnautilus-extensions/nautilus-icon-container.c:
(keyboard_icon_reveal_timeout_callback): Took out unneeded use of
thread locking macros. Maybe someday I'll regret this, but we can
add them back then.
(get_all_icon_bounds): Added shared function.
(update_scroll_region): Renamed set_scroll_region and made it use
the shared function. Also got rid of grid code.
(resort): Got rid of grid code.
(lay_down_icons): Got rid of grid code.
(relayout): Made it lay down new icons before doing any layout
work. Also made sure it doesn't do the resort while stretching.
(reload_icon_positions): Got rid of grid code.
(rubberband_select): Got rid of grid code. This was the one place
that it might have made things a little faster but probably not
due to the complexity of what it was doing.
(rubberband_timeout_callback): Took out unneeded use of thread
locking macros. Maybe someday I'll regret this, but we can add
them back then.
(destroy): Got rid of grid code.
(world_width_changed): Got rid of grid code.
(nautilus_icon_container_initialize): Got rid of grid code and
an extra idle cycle that wasn't needed.
(nautilus_icon_container_clear): Got rid of grid code and added
code to update the scroll region on clear.
(icon_destroy): Got rid of grid code.
(assign_icon_position), (finish_adding_icon),
(finish_adding_new_icons), (finish_adding_new_icons_callback),
(nautilus_icon_container_add): Replaced old idle code with
something specific to adding new icons. This does the proper
layout for manual as well as automatic layout cases.
* libnautilus-extensions/nautilus-background.h:
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_initialize_class): Made two signals instead
of one. One for when the background's settings change and another
for when the appearance changes.
(nautilus_background_set_color): Emit both signals.
(load_image_callback): Emit only the appearance change signal.
(nautilus_background_set_tile_image_uri): Emit both signals.
(nautilus_get_widget_background): Connect to the
appearance_changed signal.
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_connect_background_to_directory_metadata):
Connect to the settings_changed signal.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_real_merge_menus): Connect to the
settings_changed signal.
* src/nautilus-sidebar.c: (nautilus_sidebar_update_info): Connect
to the appearance_changed signal.
* components/music/nautilus-music-view.c:
(nautilus_music_view_set_up_background): Connect to the
settings_changed signal.
* HACKING: Gratuitious reformatting.
* RENAMING: Added notes about how we do renaming, at the request
of one of the hackers.
* nautilus-clean.sh: Added nautilus-tree-view to the things that
are killed, and made gratuitous changes to the script.
2000-06-27 00:52:50 +00:00
|
|
|
if (view->details->busy_cursor != NULL) {
|
2000-05-24 02:22:36 +00:00
|
|
|
gdk_cursor_destroy (view->details->busy_cursor);
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_free (view->details);
|
2000-04-19 05:06:01 +00:00
|
|
|
|
Removed a bunch of incorrect calls to bonobo_object_unref. An error in the
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_destroy):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_destroy):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_destroy):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_destroy):
* components/music/nautilus-music-view.c:
(nautilus_music_view_destroy):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_destroy):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_destroy):
* components/services/time/nautilus-view/trilobite-eazel-time-view.c:
(trilobite_eazel_time_view_destroy):
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_destroy):
Removed a bunch of incorrect calls to bonobo_object_unref.
An error in the sample can be an insidious thing.
* components/tree/main.c: (tree_object_destroyed),
(tree_make_object), (main): Removed some stray debugging stuff.
* libnautilus-extensions/Makefile.am: Got rid of the grid
* libnautilus-extensions/nautilus-icon-private.h: Got rid of the
grid.
* libnautilus-extensions/nautilus-icon-container.c:
(keyboard_icon_reveal_timeout_callback): Took out unneeded use of
thread locking macros. Maybe someday I'll regret this, but we can
add them back then.
(get_all_icon_bounds): Added shared function.
(update_scroll_region): Renamed set_scroll_region and made it use
the shared function. Also got rid of grid code.
(resort): Got rid of grid code.
(lay_down_icons): Got rid of grid code.
(relayout): Made it lay down new icons before doing any layout
work. Also made sure it doesn't do the resort while stretching.
(reload_icon_positions): Got rid of grid code.
(rubberband_select): Got rid of grid code. This was the one place
that it might have made things a little faster but probably not
due to the complexity of what it was doing.
(rubberband_timeout_callback): Took out unneeded use of thread
locking macros. Maybe someday I'll regret this, but we can add
them back then.
(destroy): Got rid of grid code.
(world_width_changed): Got rid of grid code.
(nautilus_icon_container_initialize): Got rid of grid code and
an extra idle cycle that wasn't needed.
(nautilus_icon_container_clear): Got rid of grid code and added
code to update the scroll region on clear.
(icon_destroy): Got rid of grid code.
(assign_icon_position), (finish_adding_icon),
(finish_adding_new_icons), (finish_adding_new_icons_callback),
(nautilus_icon_container_add): Replaced old idle code with
something specific to adding new icons. This does the proper
layout for manual as well as automatic layout cases.
* libnautilus-extensions/nautilus-background.h:
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_initialize_class): Made two signals instead
of one. One for when the background's settings change and another
for when the appearance changes.
(nautilus_background_set_color): Emit both signals.
(load_image_callback): Emit only the appearance change signal.
(nautilus_background_set_tile_image_uri): Emit both signals.
(nautilus_get_widget_background): Connect to the
appearance_changed signal.
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_connect_background_to_directory_metadata):
Connect to the settings_changed signal.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_real_merge_menus): Connect to the
settings_changed signal.
* src/nautilus-sidebar.c: (nautilus_sidebar_update_info): Connect
to the appearance_changed signal.
* components/music/nautilus-music-view.c:
(nautilus_music_view_set_up_background): Connect to the
settings_changed signal.
* HACKING: Gratuitious reformatting.
* RENAMING: Added notes about how we do renaming, at the request
of one of the hackers.
* nautilus-clean.sh: Added nautilus-tree-view to the things that
are killed, and made gratuitous changes to the script.
2000-06-27 00:52:50 +00:00
|
|
|
if (GTK_OBJECT_CLASS (parent_class)->destroy) {
|
2000-04-19 05:06:01 +00:00
|
|
|
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
|
Removed a bunch of incorrect calls to bonobo_object_unref. An error in the
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_destroy):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_destroy):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_destroy):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_destroy):
* components/music/nautilus-music-view.c:
(nautilus_music_view_destroy):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_destroy):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_destroy):
* components/services/time/nautilus-view/trilobite-eazel-time-view.c:
(trilobite_eazel_time_view_destroy):
* components/tree/nautilus-tree-view.c:
(nautilus_tree_view_destroy):
Removed a bunch of incorrect calls to bonobo_object_unref.
An error in the sample can be an insidious thing.
* components/tree/main.c: (tree_object_destroyed),
(tree_make_object), (main): Removed some stray debugging stuff.
* libnautilus-extensions/Makefile.am: Got rid of the grid
* libnautilus-extensions/nautilus-icon-private.h: Got rid of the
grid.
* libnautilus-extensions/nautilus-icon-container.c:
(keyboard_icon_reveal_timeout_callback): Took out unneeded use of
thread locking macros. Maybe someday I'll regret this, but we can
add them back then.
(get_all_icon_bounds): Added shared function.
(update_scroll_region): Renamed set_scroll_region and made it use
the shared function. Also got rid of grid code.
(resort): Got rid of grid code.
(lay_down_icons): Got rid of grid code.
(relayout): Made it lay down new icons before doing any layout
work. Also made sure it doesn't do the resort while stretching.
(reload_icon_positions): Got rid of grid code.
(rubberband_select): Got rid of grid code. This was the one place
that it might have made things a little faster but probably not
due to the complexity of what it was doing.
(rubberband_timeout_callback): Took out unneeded use of thread
locking macros. Maybe someday I'll regret this, but we can add
them back then.
(destroy): Got rid of grid code.
(world_width_changed): Got rid of grid code.
(nautilus_icon_container_initialize): Got rid of grid code and
an extra idle cycle that wasn't needed.
(nautilus_icon_container_clear): Got rid of grid code and added
code to update the scroll region on clear.
(icon_destroy): Got rid of grid code.
(assign_icon_position), (finish_adding_icon),
(finish_adding_new_icons), (finish_adding_new_icons_callback),
(nautilus_icon_container_add): Replaced old idle code with
something specific to adding new icons. This does the proper
layout for manual as well as automatic layout cases.
* libnautilus-extensions/nautilus-background.h:
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_initialize_class): Made two signals instead
of one. One for when the background's settings change and another
for when the appearance changes.
(nautilus_background_set_color): Emit both signals.
(load_image_callback): Emit only the appearance change signal.
(nautilus_background_set_tile_image_uri): Emit both signals.
(nautilus_get_widget_background): Connect to the
appearance_changed signal.
* libnautilus-extensions/nautilus-directory-background.c:
(nautilus_connect_background_to_directory_metadata):
Connect to the settings_changed signal.
* src/file-manager/fm-directory-view.c:
(fm_directory_view_real_merge_menus): Connect to the
settings_changed signal.
* src/nautilus-sidebar.c: (nautilus_sidebar_update_info): Connect
to the appearance_changed signal.
* components/music/nautilus-music-view.c:
(nautilus_music_view_set_up_background): Connect to the
settings_changed signal.
* HACKING: Gratuitious reformatting.
* RENAMING: Added notes about how we do renaming, at the request
of one of the hackers.
* nautilus-clean.sh: Added nautilus-tree-view to the things that
are killed, and made gratuitous changes to the script.
2000-06-27 00:52:50 +00:00
|
|
|
}
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2000-05-24 02:21:34 +00:00
|
|
|
* nautilus_mozilla_content_view_get_nautilus_view:
|
2000-04-19 03:55:01 +00:00
|
|
|
*
|
2000-05-24 02:21:34 +00:00
|
|
|
* Return the NautilusView object associated with this view; this
|
2000-04-19 03:55:01 +00:00
|
|
|
* is needed to export the view via CORBA/Bonobo.
|
2000-05-24 02:21:34 +00:00
|
|
|
* @view: NautilusMozillaContentView to get the nautilus_view from..
|
2000-04-19 03:55:01 +00:00
|
|
|
*
|
|
|
|
**/
|
[removed] [removed]
* components/hardware/nautilus-hardware-view.c:
(nautilus_hardware_view_initialize),
(hardware_view_notify_location_change_callback):
* components/hardware/nautilus-hardware-view.h:
* components/help/hyperbola-nav-index.c:
(hyperbola_navigation_index_select_row):
* components/help/hyperbola-nav-search.c:
(hyperbola_navigation_search_select_row),
(hyperbola_navigation_search_new):
* components/html/ntl-web-browser.c: (browser_url_load_done),
(browser_vfs_callback), (browser_goto_url_real),
(browser_goto_url), (browser_select_url), (browser_title_changed),
(browser_notify_location_change), (make_obj):
* components/loser/content/main.c: (loser_make_object):
* components/loser/content/nautilus-content-loser.c:
(nautilus_content_loser_initialize),
(loser_notify_location_change_callback):
* components/loser/content/nautilus-content-loser.h:
* components/loser/sidebar/main.c: (loser_make_object):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(nautilus_sidebar_loser_initialize),
(loser_notify_location_change_callback):
* components/mozilla/main.c: (mozilla_make_object):
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_request_location_change),
(mozilla_notify_location_change_callback),
(mozilla_title_changed_callback), (mozilla_link_message_callback):
* components/mozilla/nautilus-mozilla-content-view.h:
* components/music/main.c: (music_view_make_object):
* components/music/nautilus-music-view.c:
(nautilus_music_view_initialize), (click_column_callback),
(music_view_notify_location_change_callback),
(nautilus_music_view_drag_data_received):
* components/music/nautilus-music-view.h:
* components/rpmview/main.c: (rpm_view_make_object):
* components/rpmview/nautilus-rpm-view.c:
(nautilus_rpm_view_initialize),
(rpm_view_notify_location_change_callback):
* components/rpmview/nautilus-rpm-view.h:
* components/sample/main.c: (sample_make_object):
* components/sample/nautilus-sample-content-view.c:
(nautilus_sample_content_view_initialize),
(sample_notify_location_change_callback):
* components/sample/nautilus-sample-content-view.h:
* components/services/startup/nautilus-view/main.c:
(services_make_object):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(go_to_uri), (nautilus_service_startup_view_initialize),
(service_main_notify_location_change_cb):
* components/services/startup/nautilus-view/nautilus-service-startup-view.h:
* libnautilus/Makefile.am:
* libnautilus/libnautilus.h:
* libnautilus/nautilus-content-view-frame.c: [removed]
* libnautilus/nautilus-content-view-frame.h: [removed]
* libnautilus/nautilus-view-component.idl:
* libnautilus/nautilus-view-frame-private.h:
* libnautilus/nautilus-view-frame.c:
(impl_Nautilus_View_save_state), (impl_Nautilus_View_load_state),
(impl_Nautilus_View_notify_location_change),
(impl_Nautilus_View_show_properties),
(impl_Nautilus_View_notify_selection_change),
(impl_Nautilus_View_stop_location_change),
(impl_Nautilus_View__destroy), (impl_Nautilus_View__create),
(nautilus_view_initialize_class), (nautilus_view_initialize),
(nautilus_view_new), (nautilus_view_new_from_bonobo_control),
(get_view_frame), (nautilus_view_request_location_change),
(nautilus_view_request_selection_change),
(nautilus_view_request_status_change),
(nautilus_view_request_progress_change),
(nautilus_view_request_title_change),
(nautilus_view_get_bonobo_control),
(nautilus_view_get_main_window):
* libnautilus/nautilus-view-frame.h:
* src/Makefile.am:
* src/file-manager/fm-directory-view.c: (get_bonobo_control),
(fm_directory_view_initialize), (display_selection_info),
(fm_directory_view_send_selection_change),
(notify_location_change_callback), (stop_location_change_callback),
(done_loading), (fm_directory_view_activate_file_internal),
(finish_loading_uri):
* src/file-manager/fm-directory-view.h:
* src/ntl-app.c: (impl_Nautilus_Application_create_object):
* src/ntl-content-view.c: [removed]
* src/ntl-content-view.h: [removed]
* src/ntl-uri-map.c: (make_oaf_query_with_known_mime_type),
(make_oaf_query_with_uri_scheme_only):
* src/ntl-view-frame-svr.c: (impl_Nautilus_ViewFrame__destroy),
(impl_Nautilus_ViewFrame__create),
(impl_Nautilus_ViewFrame__get_main_window),
(impl_Nautilus_ViewFrame_request_location_change),
(impl_Nautilus_ViewFrame_request_selection_change),
(impl_Nautilus_ViewFrame_request_status_change),
(impl_Nautilus_ViewFrame_request_progress_change),
(impl_Nautilus_ViewFrame_request_title_change):
* src/ntl-view-private.h:
* src/ntl-view.c: (nautilus_view_frame_class_init),
(nautilus_view_frame_set_arg), (nautilus_view_frame_get_arg),
(nautilus_view_frame_request_location_change),
(nautilus_view_frame_request_selection_change),
(nautilus_view_frame_request_status_change),
(nautilus_view_frame_request_progress_change),
(nautilus_view_frame_request_title_change),
(nautilus_view_frame_set_label), (nautilus_view_frame_activate):
* src/ntl-view.h:
* src/ntl-window-msgs.c: (nautilus_window_request_title_change),
(nautilus_window_load_meta_view),
(nautilus_window_request_location_change),
(nautilus_window_load_content_view):
* src/ntl-window-msgs.h:
* src/ntl-window-private.h:
* src/ntl-window.c:
(nautilus_window_request_title_change_callback),
(nautilus_window_connect_content_view),
(nautilus_window_real_set_content_view):
Got rid of ContentView and ContentViewFrame.
2000-05-25 01:49:32 +00:00
|
|
|
NautilusView *
|
2000-05-24 02:21:34 +00:00
|
|
|
nautilus_mozilla_content_view_get_nautilus_view (NautilusMozillaContentView *view)
|
2000-04-19 03:55:01 +00:00
|
|
|
{
|
2000-05-24 02:22:36 +00:00
|
|
|
return view->details->nautilus_view;
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
2000-09-01 00:52:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* mozilla_vfs_read_callback:
|
|
|
|
*
|
|
|
|
* Read data from buffer and copy into mozilla stream.
|
|
|
|
**/
|
|
|
|
|
|
|
|
static char vfs_read_buf[40960];
|
|
|
|
|
|
|
|
static void
|
|
|
|
mozilla_vfs_read_callback (GnomeVFSAsyncHandle *handle, GnomeVFSResult result, gpointer buffer,
|
|
|
|
GnomeVFSFileSize bytes_requested,
|
|
|
|
GnomeVFSFileSize bytes_read,
|
|
|
|
gpointer data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view = data;
|
|
|
|
|
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("mozilla_vfs_read_callback: %ld/%ld bytes\n", (long) bytes_read, (long) bytes_requested);
|
|
|
|
#endif
|
2000-09-30 00:35:31 +00:00
|
|
|
nautilus_view_report_load_underway (view->details->nautilus_view);
|
2000-09-01 00:52:46 +00:00
|
|
|
if (bytes_read != 0) {
|
|
|
|
gtk_moz_embed_append_data (GTK_MOZ_EMBED (view->details->mozilla), buffer, bytes_read);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bytes_read == 0 || result != GNOME_VFS_OK) {
|
|
|
|
gtk_moz_embed_close_stream (GTK_MOZ_EMBED (view->details->mozilla));
|
|
|
|
gnome_vfs_async_close (handle, (GnomeVFSAsyncCloseCallback) gtk_true, NULL);
|
|
|
|
nautilus_view_report_load_complete (view->details->nautilus_view);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
gnome_vfs_async_read (handle, vfs_read_buf, sizeof (vfs_read_buf), mozilla_vfs_read_callback, view);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* mozilla_vfs_callback:
|
|
|
|
*
|
|
|
|
* Callback for gnome_vfs_async_open. Attempt to read data from handle
|
|
|
|
* and pass to mozilla streaming callback.
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
static void
|
|
|
|
mozilla_vfs_callback (GnomeVFSAsyncHandle *handle, GnomeVFSResult result, gpointer data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view = data;
|
|
|
|
|
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("mozilla_vfs_callback, result was %s\n", gnome_vfs_result_to_string (result));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (result != GNOME_VFS_OK)
|
|
|
|
{
|
|
|
|
nautilus_view_report_load_failed (view->details->nautilus_view);
|
|
|
|
gtk_moz_embed_close_stream (GTK_MOZ_EMBED (view->details->mozilla));
|
|
|
|
} else {
|
|
|
|
gtk_moz_embed_open_stream (GTK_MOZ_EMBED (view->details->mozilla), "file://", "text/html");
|
|
|
|
gnome_vfs_async_read (handle, vfs_read_buf, sizeof (vfs_read_buf), mozilla_vfs_read_callback, view);
|
|
|
|
}
|
|
|
|
}
|
2000-04-19 03:55:01 +00:00
|
|
|
/**
|
|
|
|
* nautilus_mozilla_content_view_load_uri:
|
|
|
|
*
|
|
|
|
* Load the resource pointed to by the specified URI.
|
2000-05-24 02:21:34 +00:00
|
|
|
* @view: NautilusMozillaContentView to get the nautilus_view from.
|
2000-04-19 03:55:01 +00:00
|
|
|
*
|
|
|
|
**/
|
|
|
|
void
|
|
|
|
nautilus_mozilla_content_view_load_uri (NautilusMozillaContentView *view,
|
|
|
|
const char *uri)
|
|
|
|
{
|
2000-09-01 00:52:46 +00:00
|
|
|
GnomeVFSAsyncHandle *async_handle;
|
2000-09-30 00:35:31 +00:00
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
g_assert (uri != NULL);
|
|
|
|
|
2000-09-29 01:17:04 +00:00
|
|
|
view->details->got_called_by_nautilus = TRUE;
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
if (view->details->uri) {
|
|
|
|
g_free (view->details->uri);
|
2000-04-19 12:01:28 +00:00
|
|
|
}
|
2000-05-17 12:37:08 +00:00
|
|
|
|
2000-05-31 17:18:22 +00:00
|
|
|
view->details->uri = g_strdup (uri);
|
2000-04-19 12:01:28 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
#ifdef DEBUG_ramiro
|
2000-05-24 02:22:36 +00:00
|
|
|
g_print ("nautilus_mozilla_content_view_load_uri (%s)\n", view->details->uri);
|
2000-05-09 22:35:45 +00:00
|
|
|
#endif
|
2000-09-01 00:52:46 +00:00
|
|
|
/* If the request is http, pass the uri to the mozilla component. Otherwise, stream the data
|
|
|
|
* into mozilla.
|
|
|
|
*/
|
|
|
|
if (strncmp (uri, "http:", 5) == 0) {
|
|
|
|
gtk_moz_embed_load_url (GTK_MOZ_EMBED (view->details->mozilla), view->details->uri);
|
|
|
|
} else {
|
2000-09-30 00:35:31 +00:00
|
|
|
nautilus_view_report_load_underway (view->details->nautilus_view);
|
2000-09-01 00:52:46 +00:00
|
|
|
gnome_vfs_async_open (&async_handle, uri, GNOME_VFS_OPEN_READ, mozilla_vfs_callback, view);
|
|
|
|
}
|
2000-09-30 00:35:31 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
mozilla_content_view_set_busy_cursor (NautilusMozillaContentView *view)
|
|
|
|
{
|
|
|
|
g_return_if_fail (NAUTILUS_IS_MOZILLA_CONTENT_VIEW (view));
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
if (!view->details->busy_cursor) {
|
|
|
|
view->details->busy_cursor = gdk_cursor_new (GDK_WATCH);
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (view->details->busy_cursor != NULL);
|
|
|
|
g_assert (GTK_WIDGET_REALIZED (GTK_WIDGET (view->details->mozilla)));
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
gdk_window_set_cursor (GTK_WIDGET (view->details->mozilla)->window,
|
|
|
|
view->details->busy_cursor);
|
2000-05-09 22:35:45 +00:00
|
|
|
|
|
|
|
gdk_flush ();
|
|
|
|
}
|
2000-04-19 12:01:28 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
static void
|
|
|
|
mozilla_content_view_clear_busy_cursor (NautilusMozillaContentView *view)
|
|
|
|
{
|
|
|
|
g_return_if_fail (NAUTILUS_IS_MOZILLA_CONTENT_VIEW (view));
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_WIDGET_REALIZED (GTK_WIDGET (view->details->mozilla)));
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
gdk_window_set_cursor (GTK_WIDGET (view->details->mozilla)->window, NULL);
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
Some build fixes.
* acconfig.h:
* configure.in:
Removed the NAUTILUS_PREFIX that I added. I did it wrong.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_pixmap_file):
* components/hardware/nautilus-hardware-view.c:
(setup_overview_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title), (setup_signup_form), (setup_config_form):
* libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf):
* libnautilus-extensions/nautilus-icon-factory.c:
(make_full_icon_path):
* src/nautilus-application.c: (display_caveat):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(nautilus_emblem_dialog_new), (make_category_link):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize):
Replaced most uses of gnome_pixmap_file on "nautilus/"
with a call to a new nautilus_pixmap_file in an attempt to
make installations where nautilus has a different prefix
from gnome-libs work. I now think this is a waste of time,
but Mathieu Lacage says this is still an improvement.
* components/help/Makefile.am:
* components/help/hyperbola-filefmt.c: (fmt_map_entry):
Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX.
* components/websearch/ntl-web-search.c:
(web_search_populate_engines):
Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX.
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_set_busy_cursor),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_clear_busy_cursor),
(mozilla_load_location_callback), (bonobo_mozilla_callback),
(mozilla_merge_bonobo_items_callback),
(mozilla_title_changed_callback),
(mozilla_location_changed_callback), (mozilla_net_status_callback),
(mozilla_link_message_callback), (mozilla_progress_callback),
(mozilla_open_uri_callback):
Took a cut at fixing the Mozilla component for the new API.
Ramiro will have to take care of the rest.
* components/services/install/lib/Makefile.am:
* components/services/time/command-line/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/time/service/Makefile.am:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/sample/command-line/Makefile.am:
* components/services/trilobite/sample/service/Makefile.am:
* libnautilus/Makefile.am:
Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested
in the form of a patch by Martijn van Beers.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory),
(nautilus_get_pixmap_directory):
* libnautilus-extensions/nautilus-link-set.c:
(get_link_set_document):
* src/Makefile.am:
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_data_get), (make_drag_image),
(get_xml_path), (make_properties_from_directory):
* src/nautilus-link-set-window.c: (get_link_set_names):
* src/file-manager/Makefile.am:
* src/file-manager/fm-properties-window.c: (get_property_names):
Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_uri_from_local_path): Added a new helper function for
use when you have a path and need a URI. This does a better job
than just adding a "file://" on the front.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c:
(get_first_callback), (nautilus_gtk_container_get_first_child):
* src/nautilus-window-toolbars.c: (setup_button):
* src/nautilus-window.c:
(replace_special_current_view_in_content_view_menu):
Implemented the first_child function and used it where appropriate.
* libnautilus-extensions/nautilus-preferences-item.c:
(add_icon_themes): Use nautilus_get_pixmap_directory intead of
misusing gnome_pixmap_file by calling it on a directory name.
* nautilus-installer/src/support.c: (create_pixmap),
(create_image): Added FIXMEs since it isn't clear if this code
will work with a Nautilus prefix that's not the same as the
gnome-libs prefix.
* Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
|
|
|
mozilla_load_location_callback (NautilusView *nautilus_view,
|
|
|
|
const char *location,
|
|
|
|
NautilusMozillaContentView *view)
|
2000-04-19 03:55:01 +00:00
|
|
|
{
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (nautilus_view == view->details->nautilus_view);
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-06-13 22:10:05 +00:00
|
|
|
nautilus_view_report_load_underway (nautilus_view);
|
|
|
|
nautilus_mozilla_content_view_load_uri (view, location);
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-10-09 18:12:52 +00:00
|
|
|
bonobo_mozilla_callback (BonoboUIComponent *ui, gpointer user_data, const char *verb)
|
2000-04-19 03:55:01 +00:00
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
2000-10-09 18:12:52 +00:00
|
|
|
|
|
|
|
g_assert (BONOBO_IS_UI_COMPONENT (ui));
|
|
|
|
g_assert (verb != NULL);
|
|
|
|
|
|
|
|
g_message ("called bonobo_mozilla_callback");
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-10-09 18:12:52 +00:00
|
|
|
/* FIXME bugzilla.eazel.com 2281:
|
|
|
|
* All this code is just here as a sample placeholder, and needs to
|
|
|
|
* go soon. The following code in particular does nothing at all. It
|
|
|
|
* started life as a copy/paste remnant from nautilus-sample-view.
|
|
|
|
*/
|
|
|
|
if (strcmp (verb, "Mozilla Test Menu Item") == 0) {
|
|
|
|
g_message ("%s\n\nYou selected the Mozilla menu item.", view->details->uri);
|
2000-04-19 03:55:01 +00:00
|
|
|
} else {
|
2000-10-09 18:12:52 +00:00
|
|
|
g_assert (strcmp (verb, "Mozilla Test Dock Item") == 0);
|
|
|
|
g_message ("%s\n\nYou clicked the Mozilla toolbar button.", view->details->uri);
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
#if 0
|
|
|
|
/*
|
|
|
|
* This is an example of how you could redirect Nautilus to a component:
|
|
|
|
*/
|
|
|
|
nautilus_view_open_location (view->details->nautilus_view, "eazel-summary:");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/*
|
|
|
|
* This is an example of how you could stream stuff into the current mozilla widget:
|
|
|
|
*/
|
2000-08-31 22:05:28 +00:00
|
|
|
{
|
|
|
|
char *text1 = "<html>";
|
|
|
|
char *text2 = "<a href=\"http://www.gnome.org\">http://www.gnome.org</a>";
|
|
|
|
char *text3 = "</html>";
|
|
|
|
|
|
|
|
gtk_moz_embed_open_stream (GTK_MOZ_EMBED(view->details->mozilla), "file://", "text/html");
|
|
|
|
|
|
|
|
gtk_moz_embed_append_data (GTK_MOZ_EMBED(view->details->mozilla), text1, strlen (text1));
|
|
|
|
gtk_moz_embed_append_data (GTK_MOZ_EMBED(view->details->mozilla), text2, strlen (text2));
|
|
|
|
gtk_moz_embed_append_data (GTK_MOZ_EMBED(view->details->mozilla), text3, strlen (text3));
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-08-31 22:05:28 +00:00
|
|
|
gtk_moz_embed_close_stream (GTK_MOZ_EMBED(view->details->mozilla));
|
|
|
|
}
|
2000-09-05 10:59:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/*
|
|
|
|
* This is an example of how you could make the current mozilla widget load a url:
|
|
|
|
*/
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
gtk_moz_embed_load_url (GTK_MOZ_EMBED (view->details->mozilla), "http://www.gnome.org/");
|
2000-08-31 22:05:28 +00:00
|
|
|
#endif
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-04-19 03:55:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
mozilla_merge_bonobo_items_callback (BonoboObject *control, gboolean state, gpointer user_data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
Cut over to HEAD of Bonobo. This check-in includes all the changes
needed to compile and run, but there are many things wrong
visually that may take a while to get fixed.
* src/nautilus-window-menus.c: (file_menu_new_window_callback),
(file_menu_close_window_callback),
(file_menu_close_all_windows_callback),
(file_menu_toggle_find_mode_callback),
(file_menu_web_search_callback), (edit_menu_undo_callback),
(edit_menu_cut_callback), (edit_menu_copy_callback),
(edit_menu_paste_callback), (edit_menu_clear_callback),
(go_menu_back_callback), (go_menu_forward_callback),
(go_menu_up_callback), (go_menu_home_callback),
(go_menu_forget_history_callback), (view_menu_reload_callback),
(view_menu_show_hide_sidebar_callback),
(view_menu_show_hide_tool_bar_callback),
(view_menu_show_hide_location_bar_callback),
(view_menu_show_hide_status_bar_callback),
(nautilus_window_update_show_hide_menu_items),
(view_menu_zoom_in_callback), (view_menu_zoom_out_callback),
(view_menu_zoom_normal_callback),
(bookmarks_menu_add_bookmark_callback),
(bookmarks_menu_edit_bookmarks_callback),
(user_level_customize_callback), (customize_callback),
(change_appearance_callback), (help_menu_about_nautilus_callback),
(help_menu_nautilus_feedback_callback), (switch_to_user_level),
(user_level_menu_item_callback), (append_placeholder),
(append_separator), (append_bookmark_to_menu),
(create_menu_item_from_node), (remove_bookmarks_after),
(remove_underline_accelerator_from_menu_title),
(new_top_level_menu), (add_user_level_menu_item),
(nautilus_window_initialize_menus),
(nautilus_window_update_find_menu_item),
(update_user_level_menu_items), (convert_verb_to_user_level),
(convert_user_level_to_verb), (update_preferences_dialog_title):
* src/nautilus-window.c: (nautilus_window_clear_status),
(nautilus_window_set_status), (install_status_bar),
(nautilus_window_constructed), (nautilus_window_set_arg),
(nautilus_window_get_arg), (nautilus_window_destroy),
(nautilus_window_allow_back), (nautilus_window_allow_forward),
(nautilus_window_allow_up), (nautilus_window_allow_reload),
(nautilus_window_zoom_level_changed_callback),
(nautilus_window_set_content_view_widget), (show_dock_item),
(hide_dock_item), (dock_item_showing),
(nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar),
(nautilus_window_tool_bar_showing),
(nautilus_window_hide_status_bar),
(nautilus_window_show_status_bar),
(nautilus_window_status_bar_showing):
Convert to new API. Some is disabled with #ifdef UIH.
* Makefile.am:
* configure.in:
Turned off build of the idl directory, build components after src.
* components/adapter/main.c:
* components/notes/nautilus-notes.c:
* components/sample/main.c:
* libnautilus-extensions/nautilus-font-picker.c:
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-password-dialog.c:
* libnautilus-extensions/nautilus-preferences-item.c:
* libnautilus/nautilus-undo-transaction.c:
* libnautilus/nautilus-undo.c:
* src/nautilus-application.c:
* src/nautilus-history-frame.c:
* src/nautilus-link-set-window.c:
* src/nautilus-main.c:
* src/nautilus-shell.c:
* src/nautilus-sidebar.c:
* src/nautilus-view-frame-corba.c:
* src/nautilus-zoomable-frame-corba.c:
* test/test-nautilus-font-picker.c:
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-preferences.c:
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Fixed includes.
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Turned off localization of some strings in tests.
* components/adapter/nautilus-adapter-control-embed-strategy.c:
(nautilus_adapter_control_embed_strategy_new):
* components/adapter/nautilus-adapter-control-embed-strategy.h:
* components/adapter/nautilus-adapter-embed-strategy.c:
(nautilus_adapter_embed_strategy_get):
* components/adapter/nautilus-adapter-embed-strategy.h:
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter-embeddable-embed-strategy.h:
Embedding code now deals with Bonobo_UIContainer, not
Bonobo_UIHandler.
* components/adapter/nautilus-adapter.c: (nautilus_adapter_new):
This code not only had to be changed to deal with the
Bonobo_UIContainer instead of Bonobo_UIHandler, but it also needed
to deal with the containing item (was remote_ui_handler), not the
local component.
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter.c:
BonoboContainer was renamed BonoboItemContainer.
* components/history/nautilus-history-view.c:
Remove unused BonoboUIHandler * field.
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/mozilla/Makefile.am:
* components/sample/Makefile.am:
* src/Makefile.am:
* src/file-manager/Makefile.am:
Added the necessary defines and build rules to install ui.xml
files and locate them from the C code.
* src/file-manager/nautilus-directory-view-ui.xml:
* src/file-manager/nautilus-icon-view-ui.xml:
* src/file-manager/nautilus-search-list-view-ui.xml:
* src/nautilus-shell-ui.xml:
Added definitions of user interface.
* components/loser/content/nautilus-content-loser-ui.xml:
* components/loser/sidebar/nautilus-sidebar-loser-ui.xml:
* components/mozilla/nautilus-mozilla-ui.xml:
* components/sample/nautilus-sample-content-view-ui.xml:
Added empty placeholders for user interface.
* components/loser/content/nautilus-content-loser.c:
(loser_merge_bonobo_items_callback):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(loser_merge_bonobo_items_callback):
* components/mozilla/nautilus-mozilla-content-view.c:
(mozilla_merge_bonobo_items_callback):
* components/sample/nautilus-sample-content-view.c:
(sample_merge_bonobo_items_callback):
Use nautilus_view_set_up_ui to get the user interface from a
ui.xml file. Put #ifdef UIH around old code to make the items work
that still needs to be visited.
* libnautilus-extensions/nautilus-bonobo-extensions.c:
* libnautilus-extensions/nautilus-bonobo-extensions.h:
* libnautilus-extensions/nautilus-undo-manager.c:
* libnautilus-extensions/nautilus-undo-manager.h:
* libnautilus/nautilus-clipboard.c: (add_menu_items_callback),
(remove_menu_items_callback),
(nautilus_clipboard_set_up_editable_from_bonobo_control):
* libnautilus/nautilus-clipboard.h:
Wrapped code in ifdef UIH to disable it until it can be converted
to the new Bonobo.
* libnautilus-extensions/nautilus-caption-table.h:
* libnautilus-extensions/nautilus-caption.h:
* libnautilus-extensions/nautilus-font-picker.h:
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-radio-button-group.h:
* src/nautilus-about.h:
Got rid of any cases where headers include the omnibus header
<gnome.h>. These made the conversion process harder, which is why
we fixed them.
* libnautilus/libnautilus.h:
Got rid of cases where headers include the omnibus header
<bonobo.h>.
* libnautilus/nautilus-view.h:
* libnautilus/nautilus-view.c: (nautilus_view_set_up_ui):
Added a helper function to make it easy for Nautilus components to
load their UI and get it attached to the Nautilus:View object.
* nautilus.spec.in: Install the nautilus-*-ui.xml files too.
* src/file-manager/fm-directory-view.h:
* src/file-manager/fm-directory-view.c:
(bonobo_menu_select_all_callback),
(bonobo_menu_empty_trash_callback),
(bonobo_control_activate_callback): Convert to new API.
(fm_directory_view_get_bonobo_ui_container): Name and purpose
changed slightly for new API.
(fm_directory_view_real_merge_menus): Merge with new API.
(fm_directory_view_real_update_menus): Disabled this code for now.
* src/file-manager/fm-icon-view.c: (fm_icon_view_destroy): Destroy
icon view's own component at destroy time.
(context_menu_layout_radio_item_callback),
(append_one_context_menu_layout_item),
(fm_icon_view_create_background_context_menu_items),
(update_layout_menus): Convert to new API, disable some with
#ifdef UIH.
(get_sort_criterion_by_verb),
(set_sort_criterion_by_verb), (sort_callback): Convert to new API.
(fm_icon_view_merge_menus): Merge with new API, creating our own
UI component separate from the directory view's.
(fm_icon_view_update_menus): Disable with #ifdef UIH.
* src/file-manager/fm-search-list-view.h:
* src/file-manager/fm-search-list-view.c:
(fm_search_list_view_initialize_class),
(fm_search_list_view_initialize), (real_destroy),
(indexing_info_callback), (real_merge_menus), (real_update_menus):
Add code necessary to use a separate UI component, and disabled
the actual menu set-up code with #ifdef UIH. This required adding
a details struct.
* src/nautilus-desktop-window.c: (realize): Turned off the code
that hides the desktop elements.
* src/nautilus-window-private.h:
* src/nautilus-view-frame.h:
* src/nautilus-view-frame.c: (nautilus_view_frame_destroy),
(nautilus_view_frame_new), (nautilus_view_frame_load_client):
* src/nautilus-window-manage-views.c: (load_content_view),
(nautilus_window_set_sidebar_panels):
Change to use Bonobo_UIContainer instead of Bonobo_UIHandler.
* src/nautilus-window-toolbars.c: (remember_buttons),
(nautilus_window_initialize_toolbars): Leave this code around and
change it enough to compile and run, even though it's creating a
second, invisible toolbar.
* src/nautilus-window.h: Change to be a BonoboWin subclass instead
of a GnomeApp subclass.
2000-10-05 23:47:54 +00:00
|
|
|
BonoboUIComponent *ui_component;
|
2000-10-09 18:12:52 +00:00
|
|
|
BonoboUIVerb verbs [] = {
|
|
|
|
BONOBO_UI_VERB ("Mozilla Test Menu Item", bonobo_mozilla_callback),
|
|
|
|
BONOBO_UI_VERB ("Mozilla Test Dock Item", bonobo_mozilla_callback),
|
|
|
|
BONOBO_UI_VERB_END
|
|
|
|
};
|
2000-04-19 03:55:01 +00:00
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
|
|
|
if (state) {
|
Cut over to HEAD of Bonobo. This check-in includes all the changes
needed to compile and run, but there are many things wrong
visually that may take a while to get fixed.
* src/nautilus-window-menus.c: (file_menu_new_window_callback),
(file_menu_close_window_callback),
(file_menu_close_all_windows_callback),
(file_menu_toggle_find_mode_callback),
(file_menu_web_search_callback), (edit_menu_undo_callback),
(edit_menu_cut_callback), (edit_menu_copy_callback),
(edit_menu_paste_callback), (edit_menu_clear_callback),
(go_menu_back_callback), (go_menu_forward_callback),
(go_menu_up_callback), (go_menu_home_callback),
(go_menu_forget_history_callback), (view_menu_reload_callback),
(view_menu_show_hide_sidebar_callback),
(view_menu_show_hide_tool_bar_callback),
(view_menu_show_hide_location_bar_callback),
(view_menu_show_hide_status_bar_callback),
(nautilus_window_update_show_hide_menu_items),
(view_menu_zoom_in_callback), (view_menu_zoom_out_callback),
(view_menu_zoom_normal_callback),
(bookmarks_menu_add_bookmark_callback),
(bookmarks_menu_edit_bookmarks_callback),
(user_level_customize_callback), (customize_callback),
(change_appearance_callback), (help_menu_about_nautilus_callback),
(help_menu_nautilus_feedback_callback), (switch_to_user_level),
(user_level_menu_item_callback), (append_placeholder),
(append_separator), (append_bookmark_to_menu),
(create_menu_item_from_node), (remove_bookmarks_after),
(remove_underline_accelerator_from_menu_title),
(new_top_level_menu), (add_user_level_menu_item),
(nautilus_window_initialize_menus),
(nautilus_window_update_find_menu_item),
(update_user_level_menu_items), (convert_verb_to_user_level),
(convert_user_level_to_verb), (update_preferences_dialog_title):
* src/nautilus-window.c: (nautilus_window_clear_status),
(nautilus_window_set_status), (install_status_bar),
(nautilus_window_constructed), (nautilus_window_set_arg),
(nautilus_window_get_arg), (nautilus_window_destroy),
(nautilus_window_allow_back), (nautilus_window_allow_forward),
(nautilus_window_allow_up), (nautilus_window_allow_reload),
(nautilus_window_zoom_level_changed_callback),
(nautilus_window_set_content_view_widget), (show_dock_item),
(hide_dock_item), (dock_item_showing),
(nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar),
(nautilus_window_tool_bar_showing),
(nautilus_window_hide_status_bar),
(nautilus_window_show_status_bar),
(nautilus_window_status_bar_showing):
Convert to new API. Some is disabled with #ifdef UIH.
* Makefile.am:
* configure.in:
Turned off build of the idl directory, build components after src.
* components/adapter/main.c:
* components/notes/nautilus-notes.c:
* components/sample/main.c:
* libnautilus-extensions/nautilus-font-picker.c:
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-password-dialog.c:
* libnautilus-extensions/nautilus-preferences-item.c:
* libnautilus/nautilus-undo-transaction.c:
* libnautilus/nautilus-undo.c:
* src/nautilus-application.c:
* src/nautilus-history-frame.c:
* src/nautilus-link-set-window.c:
* src/nautilus-main.c:
* src/nautilus-shell.c:
* src/nautilus-sidebar.c:
* src/nautilus-view-frame-corba.c:
* src/nautilus-zoomable-frame-corba.c:
* test/test-nautilus-font-picker.c:
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-preferences.c:
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Fixed includes.
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Turned off localization of some strings in tests.
* components/adapter/nautilus-adapter-control-embed-strategy.c:
(nautilus_adapter_control_embed_strategy_new):
* components/adapter/nautilus-adapter-control-embed-strategy.h:
* components/adapter/nautilus-adapter-embed-strategy.c:
(nautilus_adapter_embed_strategy_get):
* components/adapter/nautilus-adapter-embed-strategy.h:
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter-embeddable-embed-strategy.h:
Embedding code now deals with Bonobo_UIContainer, not
Bonobo_UIHandler.
* components/adapter/nautilus-adapter.c: (nautilus_adapter_new):
This code not only had to be changed to deal with the
Bonobo_UIContainer instead of Bonobo_UIHandler, but it also needed
to deal with the containing item (was remote_ui_handler), not the
local component.
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter.c:
BonoboContainer was renamed BonoboItemContainer.
* components/history/nautilus-history-view.c:
Remove unused BonoboUIHandler * field.
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/mozilla/Makefile.am:
* components/sample/Makefile.am:
* src/Makefile.am:
* src/file-manager/Makefile.am:
Added the necessary defines and build rules to install ui.xml
files and locate them from the C code.
* src/file-manager/nautilus-directory-view-ui.xml:
* src/file-manager/nautilus-icon-view-ui.xml:
* src/file-manager/nautilus-search-list-view-ui.xml:
* src/nautilus-shell-ui.xml:
Added definitions of user interface.
* components/loser/content/nautilus-content-loser-ui.xml:
* components/loser/sidebar/nautilus-sidebar-loser-ui.xml:
* components/mozilla/nautilus-mozilla-ui.xml:
* components/sample/nautilus-sample-content-view-ui.xml:
Added empty placeholders for user interface.
* components/loser/content/nautilus-content-loser.c:
(loser_merge_bonobo_items_callback):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(loser_merge_bonobo_items_callback):
* components/mozilla/nautilus-mozilla-content-view.c:
(mozilla_merge_bonobo_items_callback):
* components/sample/nautilus-sample-content-view.c:
(sample_merge_bonobo_items_callback):
Use nautilus_view_set_up_ui to get the user interface from a
ui.xml file. Put #ifdef UIH around old code to make the items work
that still needs to be visited.
* libnautilus-extensions/nautilus-bonobo-extensions.c:
* libnautilus-extensions/nautilus-bonobo-extensions.h:
* libnautilus-extensions/nautilus-undo-manager.c:
* libnautilus-extensions/nautilus-undo-manager.h:
* libnautilus/nautilus-clipboard.c: (add_menu_items_callback),
(remove_menu_items_callback),
(nautilus_clipboard_set_up_editable_from_bonobo_control):
* libnautilus/nautilus-clipboard.h:
Wrapped code in ifdef UIH to disable it until it can be converted
to the new Bonobo.
* libnautilus-extensions/nautilus-caption-table.h:
* libnautilus-extensions/nautilus-caption.h:
* libnautilus-extensions/nautilus-font-picker.h:
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-radio-button-group.h:
* src/nautilus-about.h:
Got rid of any cases where headers include the omnibus header
<gnome.h>. These made the conversion process harder, which is why
we fixed them.
* libnautilus/libnautilus.h:
Got rid of cases where headers include the omnibus header
<bonobo.h>.
* libnautilus/nautilus-view.h:
* libnautilus/nautilus-view.c: (nautilus_view_set_up_ui):
Added a helper function to make it easy for Nautilus components to
load their UI and get it attached to the Nautilus:View object.
* nautilus.spec.in: Install the nautilus-*-ui.xml files too.
* src/file-manager/fm-directory-view.h:
* src/file-manager/fm-directory-view.c:
(bonobo_menu_select_all_callback),
(bonobo_menu_empty_trash_callback),
(bonobo_control_activate_callback): Convert to new API.
(fm_directory_view_get_bonobo_ui_container): Name and purpose
changed slightly for new API.
(fm_directory_view_real_merge_menus): Merge with new API.
(fm_directory_view_real_update_menus): Disabled this code for now.
* src/file-manager/fm-icon-view.c: (fm_icon_view_destroy): Destroy
icon view's own component at destroy time.
(context_menu_layout_radio_item_callback),
(append_one_context_menu_layout_item),
(fm_icon_view_create_background_context_menu_items),
(update_layout_menus): Convert to new API, disable some with
#ifdef UIH.
(get_sort_criterion_by_verb),
(set_sort_criterion_by_verb), (sort_callback): Convert to new API.
(fm_icon_view_merge_menus): Merge with new API, creating our own
UI component separate from the directory view's.
(fm_icon_view_update_menus): Disable with #ifdef UIH.
* src/file-manager/fm-search-list-view.h:
* src/file-manager/fm-search-list-view.c:
(fm_search_list_view_initialize_class),
(fm_search_list_view_initialize), (real_destroy),
(indexing_info_callback), (real_merge_menus), (real_update_menus):
Add code necessary to use a separate UI component, and disabled
the actual menu set-up code with #ifdef UIH. This required adding
a details struct.
* src/nautilus-desktop-window.c: (realize): Turned off the code
that hides the desktop elements.
* src/nautilus-window-private.h:
* src/nautilus-view-frame.h:
* src/nautilus-view-frame.c: (nautilus_view_frame_destroy),
(nautilus_view_frame_new), (nautilus_view_frame_load_client):
* src/nautilus-window-manage-views.c: (load_content_view),
(nautilus_window_set_sidebar_panels):
Change to use Bonobo_UIContainer instead of Bonobo_UIHandler.
* src/nautilus-window-toolbars.c: (remember_buttons),
(nautilus_window_initialize_toolbars): Leave this code around and
change it enough to compile and run, even though it's creating a
second, invisible toolbar.
* src/nautilus-window.h: Change to be a BonoboWin subclass instead
of a GnomeApp subclass.
2000-10-05 23:47:54 +00:00
|
|
|
/* Load the UI from the XML file. */
|
2000-10-07 01:03:56 +00:00
|
|
|
ui_component = nautilus_view_set_up_ui (view->details->nautilus_view,
|
Cut over to HEAD of Bonobo. This check-in includes all the changes
needed to compile and run, but there are many things wrong
visually that may take a while to get fixed.
* src/nautilus-window-menus.c: (file_menu_new_window_callback),
(file_menu_close_window_callback),
(file_menu_close_all_windows_callback),
(file_menu_toggle_find_mode_callback),
(file_menu_web_search_callback), (edit_menu_undo_callback),
(edit_menu_cut_callback), (edit_menu_copy_callback),
(edit_menu_paste_callback), (edit_menu_clear_callback),
(go_menu_back_callback), (go_menu_forward_callback),
(go_menu_up_callback), (go_menu_home_callback),
(go_menu_forget_history_callback), (view_menu_reload_callback),
(view_menu_show_hide_sidebar_callback),
(view_menu_show_hide_tool_bar_callback),
(view_menu_show_hide_location_bar_callback),
(view_menu_show_hide_status_bar_callback),
(nautilus_window_update_show_hide_menu_items),
(view_menu_zoom_in_callback), (view_menu_zoom_out_callback),
(view_menu_zoom_normal_callback),
(bookmarks_menu_add_bookmark_callback),
(bookmarks_menu_edit_bookmarks_callback),
(user_level_customize_callback), (customize_callback),
(change_appearance_callback), (help_menu_about_nautilus_callback),
(help_menu_nautilus_feedback_callback), (switch_to_user_level),
(user_level_menu_item_callback), (append_placeholder),
(append_separator), (append_bookmark_to_menu),
(create_menu_item_from_node), (remove_bookmarks_after),
(remove_underline_accelerator_from_menu_title),
(new_top_level_menu), (add_user_level_menu_item),
(nautilus_window_initialize_menus),
(nautilus_window_update_find_menu_item),
(update_user_level_menu_items), (convert_verb_to_user_level),
(convert_user_level_to_verb), (update_preferences_dialog_title):
* src/nautilus-window.c: (nautilus_window_clear_status),
(nautilus_window_set_status), (install_status_bar),
(nautilus_window_constructed), (nautilus_window_set_arg),
(nautilus_window_get_arg), (nautilus_window_destroy),
(nautilus_window_allow_back), (nautilus_window_allow_forward),
(nautilus_window_allow_up), (nautilus_window_allow_reload),
(nautilus_window_zoom_level_changed_callback),
(nautilus_window_set_content_view_widget), (show_dock_item),
(hide_dock_item), (dock_item_showing),
(nautilus_window_hide_tool_bar), (nautilus_window_show_tool_bar),
(nautilus_window_tool_bar_showing),
(nautilus_window_hide_status_bar),
(nautilus_window_show_status_bar),
(nautilus_window_status_bar_showing):
Convert to new API. Some is disabled with #ifdef UIH.
* Makefile.am:
* configure.in:
Turned off build of the idl directory, build components after src.
* components/adapter/main.c:
* components/notes/nautilus-notes.c:
* components/sample/main.c:
* libnautilus-extensions/nautilus-font-picker.c:
* libnautilus-extensions/nautilus-global-preferences.c:
* libnautilus-extensions/nautilus-password-dialog.c:
* libnautilus-extensions/nautilus-preferences-item.c:
* libnautilus/nautilus-undo-transaction.c:
* libnautilus/nautilus-undo.c:
* src/nautilus-application.c:
* src/nautilus-history-frame.c:
* src/nautilus-link-set-window.c:
* src/nautilus-main.c:
* src/nautilus-shell.c:
* src/nautilus-sidebar.c:
* src/nautilus-view-frame-corba.c:
* src/nautilus-zoomable-frame-corba.c:
* test/test-nautilus-font-picker.c:
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-preferences.c:
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Fixed includes.
* test/test-nautilus-image.c: (create_font_picker_frame):
* test/test-nautilus-label.c: (create_font_picker_frame):
* test/test-nautilus-widgets.c: (radio_group_load_it_up):
Turned off localization of some strings in tests.
* components/adapter/nautilus-adapter-control-embed-strategy.c:
(nautilus_adapter_control_embed_strategy_new):
* components/adapter/nautilus-adapter-control-embed-strategy.h:
* components/adapter/nautilus-adapter-embed-strategy.c:
(nautilus_adapter_embed_strategy_get):
* components/adapter/nautilus-adapter-embed-strategy.h:
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter-embeddable-embed-strategy.h:
Embedding code now deals with Bonobo_UIContainer, not
Bonobo_UIHandler.
* components/adapter/nautilus-adapter.c: (nautilus_adapter_new):
This code not only had to be changed to deal with the
Bonobo_UIContainer instead of Bonobo_UIHandler, but it also needed
to deal with the containing item (was remote_ui_handler), not the
local component.
* components/adapter/nautilus-adapter-embeddable-embed-strategy.c:
(nautilus_adapter_embeddable_embed_strategy_new):
* components/adapter/nautilus-adapter.c:
BonoboContainer was renamed BonoboItemContainer.
* components/history/nautilus-history-view.c:
Remove unused BonoboUIHandler * field.
* components/loser/content/Makefile.am:
* components/loser/sidebar/Makefile.am:
* components/mozilla/Makefile.am:
* components/sample/Makefile.am:
* src/Makefile.am:
* src/file-manager/Makefile.am:
Added the necessary defines and build rules to install ui.xml
files and locate them from the C code.
* src/file-manager/nautilus-directory-view-ui.xml:
* src/file-manager/nautilus-icon-view-ui.xml:
* src/file-manager/nautilus-search-list-view-ui.xml:
* src/nautilus-shell-ui.xml:
Added definitions of user interface.
* components/loser/content/nautilus-content-loser-ui.xml:
* components/loser/sidebar/nautilus-sidebar-loser-ui.xml:
* components/mozilla/nautilus-mozilla-ui.xml:
* components/sample/nautilus-sample-content-view-ui.xml:
Added empty placeholders for user interface.
* components/loser/content/nautilus-content-loser.c:
(loser_merge_bonobo_items_callback):
* components/loser/sidebar/nautilus-sidebar-loser.c:
(loser_merge_bonobo_items_callback):
* components/mozilla/nautilus-mozilla-content-view.c:
(mozilla_merge_bonobo_items_callback):
* components/sample/nautilus-sample-content-view.c:
(sample_merge_bonobo_items_callback):
Use nautilus_view_set_up_ui to get the user interface from a
ui.xml file. Put #ifdef UIH around old code to make the items work
that still needs to be visited.
* libnautilus-extensions/nautilus-bonobo-extensions.c:
* libnautilus-extensions/nautilus-bonobo-extensions.h:
* libnautilus-extensions/nautilus-undo-manager.c:
* libnautilus-extensions/nautilus-undo-manager.h:
* libnautilus/nautilus-clipboard.c: (add_menu_items_callback),
(remove_menu_items_callback),
(nautilus_clipboard_set_up_editable_from_bonobo_control):
* libnautilus/nautilus-clipboard.h:
Wrapped code in ifdef UIH to disable it until it can be converted
to the new Bonobo.
* libnautilus-extensions/nautilus-caption-table.h:
* libnautilus-extensions/nautilus-caption.h:
* libnautilus-extensions/nautilus-font-picker.h:
* libnautilus-extensions/nautilus-preferences-group.h:
* libnautilus-extensions/nautilus-preferences-item.h:
* libnautilus-extensions/nautilus-radio-button-group.h:
* src/nautilus-about.h:
Got rid of any cases where headers include the omnibus header
<gnome.h>. These made the conversion process harder, which is why
we fixed them.
* libnautilus/libnautilus.h:
Got rid of cases where headers include the omnibus header
<bonobo.h>.
* libnautilus/nautilus-view.h:
* libnautilus/nautilus-view.c: (nautilus_view_set_up_ui):
Added a helper function to make it easy for Nautilus components to
load their UI and get it attached to the Nautilus:View object.
* nautilus.spec.in: Install the nautilus-*-ui.xml files too.
* src/file-manager/fm-directory-view.h:
* src/file-manager/fm-directory-view.c:
(bonobo_menu_select_all_callback),
(bonobo_menu_empty_trash_callback),
(bonobo_control_activate_callback): Convert to new API.
(fm_directory_view_get_bonobo_ui_container): Name and purpose
changed slightly for new API.
(fm_directory_view_real_merge_menus): Merge with new API.
(fm_directory_view_real_update_menus): Disabled this code for now.
* src/file-manager/fm-icon-view.c: (fm_icon_view_destroy): Destroy
icon view's own component at destroy time.
(context_menu_layout_radio_item_callback),
(append_one_context_menu_layout_item),
(fm_icon_view_create_background_context_menu_items),
(update_layout_menus): Convert to new API, disable some with
#ifdef UIH.
(get_sort_criterion_by_verb),
(set_sort_criterion_by_verb), (sort_callback): Convert to new API.
(fm_icon_view_merge_menus): Merge with new API, creating our own
UI component separate from the directory view's.
(fm_icon_view_update_menus): Disable with #ifdef UIH.
* src/file-manager/fm-search-list-view.h:
* src/file-manager/fm-search-list-view.c:
(fm_search_list_view_initialize_class),
(fm_search_list_view_initialize), (real_destroy),
(indexing_info_callback), (real_merge_menus), (real_update_menus):
Add code necessary to use a separate UI component, and disabled
the actual menu set-up code with #ifdef UIH. This required adding
a details struct.
* src/nautilus-desktop-window.c: (realize): Turned off the code
that hides the desktop elements.
* src/nautilus-window-private.h:
* src/nautilus-view-frame.h:
* src/nautilus-view-frame.c: (nautilus_view_frame_destroy),
(nautilus_view_frame_new), (nautilus_view_frame_load_client):
* src/nautilus-window-manage-views.c: (load_content_view),
(nautilus_window_set_sidebar_panels):
Change to use Bonobo_UIContainer instead of Bonobo_UIHandler.
* src/nautilus-window-toolbars.c: (remember_buttons),
(nautilus_window_initialize_toolbars): Leave this code around and
change it enough to compile and run, even though it's creating a
second, invisible toolbar.
* src/nautilus-window.h: Change to be a BonoboWin subclass instead
of a GnomeApp subclass.
2000-10-05 23:47:54 +00:00
|
|
|
DATADIR,
|
|
|
|
"nautilus-mozilla-ui.xml",
|
|
|
|
"nautilus-mozilla");
|
2000-04-19 03:55:01 +00:00
|
|
|
|
2000-10-09 18:12:52 +00:00
|
|
|
bonobo_ui_component_add_verb_list_with_data (ui_component, verbs, view);
|
2000-04-19 03:55:01 +00:00
|
|
|
} else {
|
|
|
|
/* Do nothing. */
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Note that we do nothing if state is FALSE. Nautilus content views are activated
|
|
|
|
* when installed, but never explicitly deactivated. When the view changes to another,
|
|
|
|
* the content view object is destroyed, which ends up calling bonobo_ui_handler_unset_container,
|
|
|
|
* which removes its merged menu & toolbar items.
|
|
|
|
*/
|
|
|
|
}
|
2000-04-19 05:06:01 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
/* Mozilla embed widget callbacks */
|
|
|
|
static void
|
2000-05-17 12:37:08 +00:00
|
|
|
mozilla_title_changed_callback (GtkMozEmbed *mozilla, gpointer user_data)
|
2000-05-09 22:35:45 +00:00
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
char *new_title;
|
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-17 12:37:08 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
new_title = gtk_moz_embed_get_title (GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-10-03 21:02:19 +00:00
|
|
|
if (new_title != NULL && strcmp (new_title, "") != 0) {
|
|
|
|
nautilus_view_set_title (view->details->nautilus_view,
|
|
|
|
new_title);
|
|
|
|
}
|
2000-05-09 22:35:45 +00:00
|
|
|
|
|
|
|
g_free (new_title);
|
|
|
|
}
|
|
|
|
|
2000-08-10 13:40:07 +00:00
|
|
|
static gboolean
|
|
|
|
mozilla_uris_differ_only_by_fragment_identifier (const char *uri1, const char *uri2)
|
|
|
|
{
|
|
|
|
char *uri1_hash;
|
|
|
|
char *uri2_hash;
|
2000-10-07 22:54:46 +00:00
|
|
|
gboolean ret = FALSE;
|
2000-08-10 13:40:07 +00:00
|
|
|
|
|
|
|
uri1_hash = strchr (uri1, '#');
|
|
|
|
uri2_hash = strchr (uri2, '#');
|
|
|
|
|
|
|
|
if (uri1_hash == NULL && uri2_hash == NULL) {
|
|
|
|
/* neither has a fragment identifier - return true
|
|
|
|
* only if they match exactly
|
|
|
|
*/
|
2000-10-07 22:54:46 +00:00
|
|
|
ret = (strcasecmp (uri1, uri2) == 0);
|
|
|
|
} else if (uri1_hash == NULL) {
|
2000-08-10 13:40:07 +00:00
|
|
|
/* only the second has an fragment identifier - return
|
|
|
|
* true only if the part before the fragment
|
|
|
|
* identifier matches the first URI
|
|
|
|
*/
|
2000-10-07 22:54:46 +00:00
|
|
|
ret = (strncasecmp (uri1, uri2, uri2_hash - uri2) == 0);
|
|
|
|
} else if (uri2_hash == NULL) {
|
2000-08-10 13:40:07 +00:00
|
|
|
/* only the first has a fragment identifier - return
|
|
|
|
* true only if the part before the fragment
|
|
|
|
* identifier matches the second URI
|
|
|
|
*/
|
2000-10-07 22:54:46 +00:00
|
|
|
ret = (strncasecmp (uri1, uri2, uri1_hash - uri1) == 0);
|
|
|
|
} else if (uri1_hash - uri1 == uri2_hash - uri2) {
|
2000-08-10 13:40:07 +00:00
|
|
|
/* both have a fragment identifier - return true only
|
|
|
|
* if the parts before the fragment identifier match
|
|
|
|
*/
|
2000-10-07 22:54:46 +00:00
|
|
|
ret = (strncasecmp (uri1, uri2, uri1_hash - uri1) == 0);
|
2000-08-10 13:40:07 +00:00
|
|
|
}
|
2000-10-07 22:54:46 +00:00
|
|
|
|
|
|
|
if (ret) {
|
|
|
|
g_print("%s: returning TRUE for URI's '%s' and '%s'\n", __FUNCTION__, uri1, uri2);
|
|
|
|
}
|
2000-08-10 13:40:07 +00:00
|
|
|
|
2000-10-07 22:54:46 +00:00
|
|
|
return ret;
|
2000-08-10 13:40:07 +00:00
|
|
|
}
|
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
static void
|
2000-05-17 12:37:08 +00:00
|
|
|
mozilla_location_changed_callback (GtkMozEmbed *mozilla, gpointer user_data)
|
2000-05-09 22:35:45 +00:00
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
char *new_location;
|
|
|
|
|
2000-08-10 13:40:07 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-09 23:18:55 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
new_location = gtk_moz_embed_get_location (GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-09 23:18:55 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
#ifdef DEBUG_ramiro
|
2000-05-17 12:37:08 +00:00
|
|
|
g_print ("mozilla_location_changed_callback (%s)\n", new_location);
|
2000-05-09 22:35:45 +00:00
|
|
|
#endif
|
2000-05-09 23:18:55 +00:00
|
|
|
|
2000-08-10 13:40:07 +00:00
|
|
|
/* If we only changed anchors in the same page, we should
|
|
|
|
report some fake progress to Nautilus. */
|
|
|
|
|
|
|
|
if (mozilla_uris_differ_only_by_fragment_identifier (view->details->uri,
|
|
|
|
new_location)) {
|
|
|
|
nautilus_view_report_load_underway (view->details->nautilus_view);
|
|
|
|
nautilus_view_report_load_complete (view->details->nautilus_view);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (view->details->uri) {
|
|
|
|
g_free (view->details->uri);
|
|
|
|
}
|
|
|
|
|
|
|
|
view->details->uri = new_location;
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
#if defined(DEBUG_ramiro) && (MOZILLA_MILESTONE >= 17)
|
2000-08-09 07:58:55 +00:00
|
|
|
|
|
|
|
#define PRINT_FLAG(bits, mask, message) \
|
|
|
|
G_STMT_START { \
|
|
|
|
if ((bits) & (mask)) { \
|
|
|
|
g_print ("%s ", (message)); \
|
|
|
|
} \
|
|
|
|
} G_STMT_END
|
|
|
|
|
|
|
|
static void
|
|
|
|
debug_print_state_flags (gint state_flags)
|
|
|
|
{
|
|
|
|
g_print ("state_flags = ");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_START, "start");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_REDIRECTING, "redirecting");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_TRANSFERRING, "transferring");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_NEGOTIATING, "negotiating");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_STOP, "stop");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_IS_REQUEST, "is_request");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_IS_DOCUMENT, "is_document");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_IS_NETWORK, "is_network");
|
|
|
|
PRINT_FLAG (state_flags, GTK_MOZ_EMBED_FLAG_IS_WINDOW, "is_window");
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
static void
|
2000-08-09 07:58:55 +00:00
|
|
|
debug_print_status_flags (guint status_flags)
|
|
|
|
{
|
|
|
|
g_print ("status_flags = ");
|
|
|
|
PRINT_FLAG (status_flags, GTK_MOZ_EMBED_STATUS_FAILED_DNS, "failed_dns");
|
|
|
|
PRINT_FLAG (status_flags, GTK_MOZ_EMBED_STATUS_FAILED_CONNECT, "failed_connect");
|
|
|
|
PRINT_FLAG (status_flags, GTK_MOZ_EMBED_STATUS_FAILED_TIMEOUT, "failed_timeout");
|
|
|
|
PRINT_FLAG (status_flags, GTK_MOZ_EMBED_STATUS_FAILED_USERCANCELED, "failed_usercanceled");
|
|
|
|
g_print ("\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
#if (MOZILLA_MILESTONE >= 17)
|
2000-08-09 07:58:55 +00:00
|
|
|
static void
|
|
|
|
mozilla_net_state_callback (GtkMozEmbed *mozilla,
|
|
|
|
gint state_flags,
|
|
|
|
guint status_flags,
|
|
|
|
gpointer user_data)
|
2000-05-09 22:35:45 +00:00
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-17 12:37:08 +00:00
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
#if defined(DEBUG_ramiro) && (MOZILLA_MILESTONE >= 17)
|
2000-08-09 07:58:55 +00:00
|
|
|
g_print ("%s\n", __FUNCTION__);
|
|
|
|
debug_print_state_flags (state_flags);
|
|
|
|
debug_print_status_flags (status_flags);
|
|
|
|
g_print ("\n\n");
|
|
|
|
#endif
|
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
/* win_start */
|
2000-08-09 07:58:55 +00:00
|
|
|
if (state_flags & GTK_MOZ_EMBED_FLAG_START) {
|
2000-05-09 22:35:45 +00:00
|
|
|
mozilla_content_view_set_busy_cursor (view);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* win_stop */
|
2000-08-09 07:58:55 +00:00
|
|
|
if (state_flags & GTK_MOZ_EMBED_FLAG_STOP) {
|
2000-05-09 22:35:45 +00:00
|
|
|
mozilla_content_view_clear_busy_cursor (view);
|
|
|
|
}
|
2000-08-09 07:58:55 +00:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
static void
|
|
|
|
mozilla_net_status_callback (GtkMozEmbed *mozilla, gint flags, gpointer user_data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-08-09 07:58:55 +00:00
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
2000-05-09 22:35:45 +00:00
|
|
|
|
2000-08-09 07:58:55 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-09 22:35:45 +00:00
|
|
|
|
|
|
|
/* win_start */
|
2000-05-25 02:33:15 +00:00
|
|
|
if (flags & GTK_MOZ_EMBED_FLAG_WIN_START) {
|
2000-08-09 07:58:55 +00:00
|
|
|
mozilla_content_view_set_busy_cursor (view);
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* win_stop */
|
2000-05-25 02:33:15 +00:00
|
|
|
if (flags & GTK_MOZ_EMBED_FLAG_WIN_STOP) {
|
2000-08-09 07:58:55 +00:00
|
|
|
mozilla_content_view_clear_busy_cursor (view);
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
}
|
2000-08-09 07:58:55 +00:00
|
|
|
#endif
|
2000-05-09 22:35:45 +00:00
|
|
|
|
|
|
|
static void
|
2000-05-17 12:37:08 +00:00
|
|
|
mozilla_link_message_callback (GtkMozEmbed *mozilla, gpointer user_data)
|
2000-05-09 22:35:45 +00:00
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
char *link_message;
|
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-17 12:37:08 +00:00
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
link_message = gtk_moz_embed_get_link_message (GTK_MOZ_EMBED (view->details->mozilla));
|
Some build fixes.
* acconfig.h:
* configure.in:
Removed the NAUTILUS_PREFIX that I added. I did it wrong.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_pixmap_file):
* components/hardware/nautilus-hardware-view.c:
(setup_overview_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title), (setup_signup_form), (setup_config_form):
* libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf):
* libnautilus-extensions/nautilus-icon-factory.c:
(make_full_icon_path):
* src/nautilus-application.c: (display_caveat):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(nautilus_emblem_dialog_new), (make_category_link):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize):
Replaced most uses of gnome_pixmap_file on "nautilus/"
with a call to a new nautilus_pixmap_file in an attempt to
make installations where nautilus has a different prefix
from gnome-libs work. I now think this is a waste of time,
but Mathieu Lacage says this is still an improvement.
* components/help/Makefile.am:
* components/help/hyperbola-filefmt.c: (fmt_map_entry):
Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX.
* components/websearch/ntl-web-search.c:
(web_search_populate_engines):
Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX.
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_set_busy_cursor),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_clear_busy_cursor),
(mozilla_load_location_callback), (bonobo_mozilla_callback),
(mozilla_merge_bonobo_items_callback),
(mozilla_title_changed_callback),
(mozilla_location_changed_callback), (mozilla_net_status_callback),
(mozilla_link_message_callback), (mozilla_progress_callback),
(mozilla_open_uri_callback):
Took a cut at fixing the Mozilla component for the new API.
Ramiro will have to take care of the rest.
* components/services/install/lib/Makefile.am:
* components/services/time/command-line/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/time/service/Makefile.am:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/sample/command-line/Makefile.am:
* components/services/trilobite/sample/service/Makefile.am:
* libnautilus/Makefile.am:
Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested
in the form of a patch by Martijn van Beers.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory),
(nautilus_get_pixmap_directory):
* libnautilus-extensions/nautilus-link-set.c:
(get_link_set_document):
* src/Makefile.am:
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_data_get), (make_drag_image),
(get_xml_path), (make_properties_from_directory):
* src/nautilus-link-set-window.c: (get_link_set_names):
* src/file-manager/Makefile.am:
* src/file-manager/fm-properties-window.c: (get_property_names):
Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_uri_from_local_path): Added a new helper function for
use when you have a path and need a URI. This does a better job
than just adding a "file://" on the front.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c:
(get_first_callback), (nautilus_gtk_container_get_first_child):
* src/nautilus-window-toolbars.c: (setup_button):
* src/nautilus-window.c:
(replace_special_current_view_in_content_view_menu):
Implemented the first_child function and used it where appropriate.
* libnautilus-extensions/nautilus-preferences-item.c:
(add_icon_themes): Use nautilus_get_pixmap_directory intead of
misusing gnome_pixmap_file by calling it on a directory name.
* nautilus-installer/src/support.c: (create_pixmap),
(create_image): Added FIXMEs since it isn't clear if this code
will work with a Nautilus prefix that's not the same as the
gnome-libs prefix.
* Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
|
|
|
nautilus_view_report_status (view->details->nautilus_view,
|
|
|
|
link_message);
|
2000-05-09 22:35:45 +00:00
|
|
|
g_free (link_message);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2000-05-17 12:37:08 +00:00
|
|
|
mozilla_progress_callback (GtkMozEmbed *mozilla,
|
2000-05-09 22:35:45 +00:00
|
|
|
gint current_progress,
|
2000-10-07 22:54:46 +00:00
|
|
|
gint max_progress,
|
2000-05-09 22:35:45 +00:00
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-17 12:37:08 +00:00
|
|
|
|
2000-05-09 22:35:45 +00:00
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("mozilla_progress_callback (max = %d, current = %d)\n", max_progress, current_progress);
|
|
|
|
#endif
|
|
|
|
|
2000-08-04 23:40:25 +00:00
|
|
|
if (max_progress == current_progress || max_progress == 0) {
|
|
|
|
nautilus_view_report_load_complete (view->details->nautilus_view);
|
Some build fixes.
* acconfig.h:
* configure.in:
Removed the NAUTILUS_PREFIX that I added. I did it wrong.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_pixmap_file):
* components/hardware/nautilus-hardware-view.c:
(setup_overview_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title), (setup_signup_form), (setup_config_form):
* libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf):
* libnautilus-extensions/nautilus-icon-factory.c:
(make_full_icon_path):
* src/nautilus-application.c: (display_caveat):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(nautilus_emblem_dialog_new), (make_category_link):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize):
Replaced most uses of gnome_pixmap_file on "nautilus/"
with a call to a new nautilus_pixmap_file in an attempt to
make installations where nautilus has a different prefix
from gnome-libs work. I now think this is a waste of time,
but Mathieu Lacage says this is still an improvement.
* components/help/Makefile.am:
* components/help/hyperbola-filefmt.c: (fmt_map_entry):
Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX.
* components/websearch/ntl-web-search.c:
(web_search_populate_engines):
Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX.
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_set_busy_cursor),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_clear_busy_cursor),
(mozilla_load_location_callback), (bonobo_mozilla_callback),
(mozilla_merge_bonobo_items_callback),
(mozilla_title_changed_callback),
(mozilla_location_changed_callback), (mozilla_net_status_callback),
(mozilla_link_message_callback), (mozilla_progress_callback),
(mozilla_open_uri_callback):
Took a cut at fixing the Mozilla component for the new API.
Ramiro will have to take care of the rest.
* components/services/install/lib/Makefile.am:
* components/services/time/command-line/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/time/service/Makefile.am:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/sample/command-line/Makefile.am:
* components/services/trilobite/sample/service/Makefile.am:
* libnautilus/Makefile.am:
Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested
in the form of a patch by Martijn van Beers.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory),
(nautilus_get_pixmap_directory):
* libnautilus-extensions/nautilus-link-set.c:
(get_link_set_document):
* src/Makefile.am:
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_data_get), (make_drag_image),
(get_xml_path), (make_properties_from_directory):
* src/nautilus-link-set-window.c: (get_link_set_names):
* src/file-manager/Makefile.am:
* src/file-manager/fm-properties-window.c: (get_property_names):
Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_uri_from_local_path): Added a new helper function for
use when you have a path and need a URI. This does a better job
than just adding a "file://" on the front.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c:
(get_first_callback), (nautilus_gtk_container_get_first_child):
* src/nautilus-window-toolbars.c: (setup_button):
* src/nautilus-window.c:
(replace_special_current_view_in_content_view_menu):
Implemented the first_child function and used it where appropriate.
* libnautilus-extensions/nautilus-preferences-item.c:
(add_icon_themes): Use nautilus_get_pixmap_directory intead of
misusing gnome_pixmap_file by calling it on a directory name.
* nautilus-installer/src/support.c: (create_pixmap),
(create_image): Added FIXMEs since it isn't clear if this code
will work with a Nautilus prefix that's not the same as the
gnome-libs prefix.
* Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
|
|
|
} else {
|
2000-08-04 23:40:25 +00:00
|
|
|
nautilus_view_report_load_progress (view->details->nautilus_view,
|
|
|
|
current_progress / max_progress);
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
2000-05-17 12:37:08 +00:00
|
|
|
}
|
|
|
|
|
2000-09-29 01:17:04 +00:00
|
|
|
|
2000-05-17 12:37:08 +00:00
|
|
|
static gint
|
|
|
|
mozilla_open_uri_callback (GtkMozEmbed *mozilla,
|
|
|
|
const char *uri,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
2000-09-29 01:17:04 +00:00
|
|
|
gint abort_uri_open;
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
static gboolean do_nothing = FALSE;
|
2000-05-17 12:37:08 +00:00
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
2000-05-24 02:22:36 +00:00
|
|
|
g_assert (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla));
|
2000-05-17 12:37:08 +00:00
|
|
|
|
|
|
|
/* Determine whether we want to abort this uri load */
|
2000-09-29 01:17:04 +00:00
|
|
|
abort_uri_open = mozilla_is_uri_handled_by_nautilus (uri);
|
|
|
|
|
2000-05-17 12:37:08 +00:00
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("mozilla_open_uri_callback (uri = %s) abort = %s\n",
|
|
|
|
uri,
|
|
|
|
abort_uri_open ? "TRUE" : "FALSE");
|
|
|
|
#endif
|
|
|
|
|
2000-09-29 01:17:04 +00:00
|
|
|
if (do_nothing == TRUE) {
|
|
|
|
do_nothing = FALSE;
|
|
|
|
view->details->got_called_by_nautilus = FALSE;
|
|
|
|
} else if (view->details->got_called_by_nautilus == TRUE) {
|
|
|
|
view->details->got_called_by_nautilus = FALSE;
|
|
|
|
} else {
|
|
|
|
/* set it so that we load next time we are called. */
|
|
|
|
do_nothing = TRUE;
|
|
|
|
abort_uri_open = TRUE;
|
2000-09-05 10:59:43 +00:00
|
|
|
bonobo_object_ref (BONOBO_OBJECT (view->details->nautilus_view));
|
Some build fixes.
* acconfig.h:
* configure.in:
Removed the NAUTILUS_PREFIX that I added. I did it wrong.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_pixmap_file):
* components/hardware/nautilus-hardware-view.c:
(setup_overview_form):
* components/services/startup/nautilus-view/nautilus-service-startup-view.c:
(setup_form_title), (setup_signup_form), (setup_config_form):
* libnautilus-extensions/nautilus-icon-canvas-item.c: (map_pixbuf):
* libnautilus-extensions/nautilus-icon-factory.c:
(make_full_icon_path):
* src/nautilus-application.c: (display_caveat):
* src/nautilus-property-browser.c:
(nautilus_property_browser_initialize),
(nautilus_emblem_dialog_new), (make_category_link):
* src/nautilus-zoom-control.c: (nautilus_zoom_control_initialize):
Replaced most uses of gnome_pixmap_file on "nautilus/"
with a call to a new nautilus_pixmap_file in an attempt to
make installations where nautilus has a different prefix
from gnome-libs work. I now think this is a waste of time,
but Mathieu Lacage says this is still an improvement.
* components/help/Makefile.am:
* components/help/hyperbola-filefmt.c: (fmt_map_entry):
Use HYPERBOLA_DATADIR instead of NAUTILUS_PREFIX.
* components/websearch/ntl-web-search.c:
(web_search_populate_engines):
Use WEB_SEARCH_DATADIR instead of NAUTILUS_PREFIX.
* components/mozilla/nautilus-mozilla-content-view.c:
(nautilus_mozilla_content_view_initialize),
(mozilla_content_view_set_busy_cursor),
(mozilla_content_view_request_progress_change),
(mozilla_content_view_clear_busy_cursor),
(mozilla_load_location_callback), (bonobo_mozilla_callback),
(mozilla_merge_bonobo_items_callback),
(mozilla_title_changed_callback),
(mozilla_location_changed_callback), (mozilla_net_status_callback),
(mozilla_link_message_callback), (mozilla_progress_callback),
(mozilla_open_uri_callback):
Took a cut at fixing the Mozilla component for the new API.
Ramiro will have to take care of the rest.
* components/services/install/lib/Makefile.am:
* components/services/time/command-line/Makefile.am:
* components/services/time/nautilus-view/Makefile.am:
* components/services/time/service/Makefile.am:
* components/services/trilobite/libtrilobite/Makefile.am:
* components/services/trilobite/sample/command-line/Makefile.am:
* components/services/trilobite/sample/service/Makefile.am:
* libnautilus/Makefile.am:
Updated all ORBit IDL compiles to use IDL_CFLAGS as suggested
in the form of a patch by Martijn van Beers.
* libnautilus-extensions/Makefile.am:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_user_main_directory),
(nautilus_get_pixmap_directory):
* libnautilus-extensions/nautilus-link-set.c:
(get_link_set_document):
* src/Makefile.am:
* src/nautilus-property-browser.c:
(nautilus_property_browser_drag_data_get), (make_drag_image),
(get_xml_path), (make_properties_from_directory):
* src/nautilus-link-set-window.c: (get_link_set_names):
* src/file-manager/Makefile.am:
* src/file-manager/fm-properties-window.c: (get_property_names):
Used NAUTILUS_DATADIR and DATADIR instead of NAUTILUS_PREFIX.
* libnautilus-extensions/nautilus-file-utilities.h:
* libnautilus-extensions/nautilus-file-utilities.c:
(nautilus_get_uri_from_local_path): Added a new helper function for
use when you have a path and need a URI. This does a better job
than just adding a "file://" on the front.
* libnautilus-extensions/nautilus-gtk-extensions.h:
* libnautilus-extensions/nautilus-gtk-extensions.c:
(get_first_callback), (nautilus_gtk_container_get_first_child):
* src/nautilus-window-toolbars.c: (setup_button):
* src/nautilus-window.c:
(replace_special_current_view_in_content_view_menu):
Implemented the first_child function and used it where appropriate.
* libnautilus-extensions/nautilus-preferences-item.c:
(add_icon_themes): Use nautilus_get_pixmap_directory intead of
misusing gnome_pixmap_file by calling it on a directory name.
* nautilus-installer/src/support.c: (create_pixmap),
(create_image): Added FIXMEs since it isn't clear if this code
will work with a Nautilus prefix that's not the same as the
gnome-libs prefix.
* Makefile.am: Tweaked white space.
2000-06-13 19:05:33 +00:00
|
|
|
nautilus_view_open_location (view->details->nautilus_view, uri);
|
2000-09-05 10:59:43 +00:00
|
|
|
bonobo_object_unref (BONOBO_OBJECT (view->details->nautilus_view));
|
2000-05-17 12:37:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return abort_uri_open;
|
2000-05-09 22:35:45 +00:00
|
|
|
}
|
|
|
|
|
2000-09-05 10:59:43 +00:00
|
|
|
/*
|
|
|
|
* For M18, we peek dom events to deal with eazel: uris (and all other special uris)
|
|
|
|
*/
|
|
|
|
#if (MOZILLA_MILESTONE >= 18)
|
|
|
|
static gint
|
|
|
|
mozilla_dom_mouse_click_callback (GtkMozEmbed *mozilla,
|
|
|
|
gpointer dom_event,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
NautilusMozillaContentView *view;
|
|
|
|
char *href;
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_MOZ_EMBED (mozilla), TRUE);
|
|
|
|
g_return_val_if_fail (dom_event != NULL, TRUE);
|
|
|
|
g_return_val_if_fail (NAUTILUS_IS_MOZILLA_CONTENT_VIEW (user_data), TRUE);
|
|
|
|
|
|
|
|
view = NAUTILUS_MOZILLA_CONTENT_VIEW (user_data);
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_MOZ_EMBED (mozilla) == GTK_MOZ_EMBED (view->details->mozilla), TRUE);
|
|
|
|
|
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("%s (%p)\n", __FUNCTION__, dom_event);
|
|
|
|
#endif
|
|
|
|
|
2000-10-07 22:54:46 +00:00
|
|
|
if (mozilla_events_is_in_form_POST_submit (dom_event)) {
|
|
|
|
g_print ("%s: is a POST submit\n", __FUNCTION__);
|
|
|
|
/*blatant lie*/
|
|
|
|
view->details->got_called_by_nautilus = TRUE;
|
|
|
|
} else {
|
|
|
|
g_print ("%s: is NOT a POST submit\n", __FUNCTION__);
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-10-07 22:54:46 +00:00
|
|
|
href = mozilla_events_get_href_for_mouse_event (dom_event);
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-10-07 22:54:46 +00:00
|
|
|
/*
|
|
|
|
* The return value over here needs to be psychoanlized some.
|
|
|
|
* In theory, a return value of NS_OK, which is 0 (yes, zero)
|
|
|
|
* in the Mozilla universe means that the dom event got handled
|
|
|
|
*
|
|
|
|
* Need to look at the gtkmozembed.cpp code more carefully.
|
|
|
|
*/
|
2000-09-05 10:59:43 +00:00
|
|
|
|
2000-10-07 22:54:46 +00:00
|
|
|
if (href && mozilla_is_uri_handled_by_nautilus (href)) {
|
|
|
|
#ifdef DEBUG_ramiro
|
|
|
|
g_print ("%s() href = %s\n", __FUNCTION__, href);
|
|
|
|
#endif
|
|
|
|
bonobo_object_ref (BONOBO_OBJECT (view->details->nautilus_view));
|
|
|
|
nautilus_view_open_location (view->details->nautilus_view, href);
|
|
|
|
bonobo_object_unref (BONOBO_OBJECT (view->details->nautilus_view));
|
|
|
|
g_free (href);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2000-09-05 10:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
#endif /* MOZILLA_MILESTONE >= 18 */
|
|
|
|
|
2000-07-26 00:16:26 +00:00
|
|
|
/*
|
|
|
|
* The issue here is that mozilla handles some protocols "natively" just as nautilus
|
|
|
|
* does thanks to gnome-vfs magic.
|
|
|
|
*
|
|
|
|
* The embedded mozilla beast provides a mechanism for aborting url loading (ie, the
|
|
|
|
* thing that happens when a user boinks on a hyperlink).
|
|
|
|
*
|
|
|
|
* We use this feature to abort uri loads for the following protocol(s):
|
|
|
|
*
|
|
|
|
*/
|
2000-06-02 10:44:30 +00:00
|
|
|
static char *handled_by_nautilus[] =
|
|
|
|
{
|
2000-09-05 10:59:43 +00:00
|
|
|
"ftp",
|
|
|
|
"eazel",
|
2000-09-29 01:17:04 +00:00
|
|
|
"eazel",
|
2000-09-28 00:03:19 +00:00
|
|
|
"eazel-install",
|
|
|
|
"eazel-pw",
|
|
|
|
"eazel-services",
|
2000-09-05 10:59:43 +00:00
|
|
|
"man",
|
|
|
|
"info",
|
|
|
|
"help"
|
2000-06-02 10:44:30 +00:00
|
|
|
};
|
|
|
|
|
2000-07-26 00:16:26 +00:00
|
|
|
#define num_handled_by_nautilus (sizeof (handled_by_nautilus) / sizeof ((handled_by_nautilus)[0]))
|
2000-06-02 10:44:30 +00:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
mozilla_is_uri_handled_by_nautilus (const char *uri)
|
|
|
|
{
|
|
|
|
guint i;
|
|
|
|
|
|
|
|
g_return_val_if_fail (uri != NULL, TRUE);
|
|
|
|
|
|
|
|
for (i = 0; i < num_handled_by_nautilus; i++) {
|
|
|
|
if (strlen (uri) >= strlen (handled_by_nautilus[i])
|
|
|
|
&& (strncmp (uri, handled_by_nautilus[i], strlen (handled_by_nautilus[i])) == 0)) {
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2000-04-19 05:06:01 +00:00
|
|
|
GtkType
|
|
|
|
nautilus_mozilla_content_view_get_type (void)
|
|
|
|
{
|
|
|
|
static GtkType mozilla_content_view_type = 0;
|
|
|
|
|
|
|
|
if (!mozilla_content_view_type)
|
|
|
|
{
|
|
|
|
static const GtkTypeInfo mozilla_content_view_info =
|
|
|
|
{
|
|
|
|
"NautilusMozillaContentView",
|
|
|
|
sizeof (NautilusMozillaContentView),
|
|
|
|
sizeof (NautilusMozillaContentViewClass),
|
|
|
|
(GtkClassInitFunc) nautilus_mozilla_content_view_initialize_class,
|
|
|
|
(GtkObjectInitFunc) nautilus_mozilla_content_view_initialize,
|
|
|
|
/* reserved_1 */ NULL,
|
|
|
|
/* reserved_2 */ NULL,
|
|
|
|
(GtkClassInitFunc) NULL,
|
|
|
|
};
|
|
|
|
|
|
|
|
mozilla_content_view_type = gtk_type_unique (GTK_TYPE_VBOX, &mozilla_content_view_info);
|
|
|
|
}
|
|
|
|
|
|
|
|
return mozilla_content_view_type;
|
|
|
|
}
|