diff options
author | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-05-27 12:17:20 +0000 |
---|---|---|
committer | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-05-27 12:17:20 +0000 |
commit | a15fd9f88189602a9b39f7d3e640571a96210037 (patch) | |
tree | 37e32d2953daaeb5b23ace82d12660933fe50e00 /components | |
parent | 97fabc0a4719a3d5f5d1c39d287c4d6844dd5078 (diff) | |
download | nautilus-a15fd9f88189602a9b39f7d3e640571a96210037.tar.gz |
components/history/ntl-history-view.c ->
* Renamed files as follows, as per RENAMING:
components/history/ntl-history-view.c -> components/history/nautilus-history-view.c
components/history/ntl-history-view.oafinfo -> components/history/nautilus-history-view.oafinfo
components/notes/ntl-notes.c -> components/notes/nautilus-notes.c
components/notes/ntl-notes.oafinfo -> components/notes/nautilus-notes.oafinfo
libnautilus-extensions/gtkscrollframe.c -> libnautilus-extensions/nautilus-scroll-frame.c
libnautilus-extensions/gtkscrollframe.h -> libnautilus-extensions/nautilus-scroll-frame.h
libnautilus/nautilus-view-frame.c -> libnautilus/nautilus-view.c
libnautilus/nautilus-view-frame.h -> libnautilus/nautilus-view.h
src/nautilus-index-tabs.c -> src/nautilus-sidebar-tabs.c
src/nautilus-index-tabs.h -> src/nautilus-sidebar-tabs.h
src/nautilus-index-title.c -> src/nautilus-sidebar-title.c
src/nautilus-index-title.h -> src/nautilus-sidebar-title.h
src/nautilus-zoomable-frame-svr.c -> src/nautilus-zoomable-frame-corba.c
src/ntl-app.c -> src/nautilus-application.c
src/ntl-app.h -> src/nautilus-application.h
src/ntl-index-panel.c -> src/nautilus-sidebar.c
src/ntl-index-panel.h -> src/nautilus-sidebar.h
src/ntl-main.c -> src/nautilus-main.c
src/ntl-miniicon.c -> libnautilus-extensions/nautilus-mini-icon.c
src/ntl-miniicon.h -> libnautilus-extensions/nautilus-mini-icon.h
src/ntl-uri-map.c -> src/nautilus-applicable-views.c
src/ntl-uri-map.h -> src/nautilus-applicable-views.h
src/ntl-view-bonobo-control.c -> src/nautilus-view-frame-bonobo-control.c
src/ntl-view-bonobo-subdoc.c -> src/nautilus-view-frame-bonobo-embeddable.c
src/ntl-view-frame-svr.c -> src/nautilus-view-frame-corba.c
src/ntl-view-nautilus.c -> src/nautilus-view-frame-nautilus-view.c
src/ntl-view-private.h -> src/nautilus-view-frame-private.h
src/ntl-view.c -> src/nautilus-view-frame.c
src/ntl-view.h -> src/nautilus-view-frame.h
src/ntl-window-msgs.c -> src/nautilus-window-manage-views.c
src/ntl-window-msgs.h -> src/nautilus-window-manage-views.h
src/ntl-window-private.h -> src/nautilus-window-private.h
src/ntl-window-state.c -> src/nautilus-window-state.c
src/ntl-window-state.h -> src/nautilus-window-state.h
src/ntl-window.c -> src/nautilus-window.c
src/ntl-window.h -> src/nautilus-window.h
* components/history/Makefile.am, components/notes/Makefile.am,
libnautilus-extensions/Makefile.am, libnautilus/Makefile.am,
po/POTFILES.in, src/Makefile.am,
components/hardware/nautilus-hardware-view.h,
components/loser/content/nautilus-content-loser.h,
components/loser/sidebar/nautilus-sidebar-loser.h,
components/mozilla/nautilus-mozilla-content-view.h,
components/music/nautilus-music-view.h,
components/rpmview/nautilus-rpm-view.h,
components/sample/nautilus-sample-content-view.h,
components/services/startup/nautilus-view/nautilus-service-startup-view.h,
libnautilus/libnautilus.h, src/nautilus-desktop-window.h,
src/nautilus-window-menus.c, src/nautilus-window-toolbars.c,
src/file-manager/fm-directory-view.h : Updated for renamings.
* RENAMING: removed old renamings
Diffstat (limited to 'components')
24 files changed, 36 insertions, 598 deletions
diff --git a/components/hardware/nautilus-hardware-view.h b/components/hardware/nautilus-hardware-view.h index 54c17c706..27f32d21c 100644 --- a/components/hardware/nautilus-hardware-view.h +++ b/components/hardware/nautilus-hardware-view.h @@ -25,7 +25,7 @@ #ifndef NAUTILUS_HARDWARE_VIEW_H #define NAUTILUS_HARDWARE_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtkeventbox.h> diff --git a/components/history/Makefile.am b/components/history/Makefile.am index 0b2eca09e..d7c2bc499 100644 --- a/components/history/Makefile.am +++ b/components/history/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS=ntl-history-view +bin_PROGRAMS=nautilus-history-view INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GNOMEUI_CFLAGS) $(GCONF_CFLAGS) $(BONOBO_CFLAGS) $(WERROR) @@ -11,8 +11,8 @@ LDADD=\ $(GCONF_LIBS) \ $(GNOMEUI_LIBS) -ntl_history_view_SOURCES=ntl-history-view.c +nautilus_history_view_SOURCES=nautilus-history-view.c oafdir=$(datadir)/oaf -oaf_DATA=ntl-history-view.oafinfo +oaf_DATA=nautilus-history-view.oafinfo EXTRA_DIST=$(oaf_DATA) diff --git a/components/history/Nautilus_View_history.oaf.in b/components/history/Nautilus_View_history.oaf.in index 20c62ee0d..579092e0a 100644 --- a/components/history/Nautilus_View_history.oaf.in +++ b/components/history/Nautilus_View_history.oaf.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="ntl-history-view"> +<oaf_server iid="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="nautilus-history-view"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for history views"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> +<oaf_server iid="OAFIID:nautilus_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/history/Nautilus_View_history.server.in b/components/history/Nautilus_View_history.server.in index 20c62ee0d..579092e0a 100644 --- a/components/history/Nautilus_View_history.server.in +++ b/components/history/Nautilus_View_history.server.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="ntl-history-view"> +<oaf_server iid="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="nautilus-history-view"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for history views"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> +<oaf_server iid="OAFIID:nautilus_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/history/Nautilus_View_history.server.in.in b/components/history/Nautilus_View_history.server.in.in index 20c62ee0d..579092e0a 100644 --- a/components/history/Nautilus_View_history.server.in.in +++ b/components/history/Nautilus_View_history.server.in.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="ntl-history-view"> +<oaf_server iid="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="nautilus-history-view"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for history views"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> +<oaf_server iid="OAFIID:nautilus_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/history/nautilus-history-view.c b/components/history/nautilus-history-view.c index 5d35a4d68..b07d98a9f 100644 --- a/components/history/nautilus-history-view.c +++ b/components/history/nautilus-history-view.c @@ -216,7 +216,7 @@ make_obj(BonoboGenericFactory *Factory, const char *goad_id, gpointer closure) GtkCList *clist; HistoryView *hview; - g_return_val_if_fail(!strcmp(goad_id, "OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb"), NULL); + g_return_val_if_fail(!strcmp(goad_id, "OAFIID:nautilus_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb"), NULL); hview = g_new0(HistoryView, 1); @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) BonoboGenericFactory *factory; CORBA_ORB orb; - gnome_init_with_popt_table("ntl-history-view", VERSION, + gnome_init_with_popt_table("nautilus-history-view", VERSION, argc, argv, oaf_popt_options, 0, NULL); orb = oaf_init (argc, argv); @@ -276,7 +276,7 @@ int main(int argc, char *argv[]) bonobo_init(orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); gnome_vfs_init (); - factory = bonobo_generic_factory_new_multi("OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e", make_obj, NULL); + factory = bonobo_generic_factory_new_multi("OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e", make_obj, NULL); do { bonobo_main(); diff --git a/components/history/nautilus-history-view.oafinfo b/components/history/nautilus-history-view.oafinfo index 20c62ee0d..579092e0a 100644 --- a/components/history/nautilus-history-view.oafinfo +++ b/components/history/nautilus-history-view.oafinfo @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="ntl-history-view"> +<oaf_server iid="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="nautilus-history-view"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for history views"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> +<oaf_server iid="OAFIID:nautilus_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:nautilus_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/history/ntl-history-view.c b/components/history/ntl-history-view.c deleted file mode 100644 index 5d35a4d68..000000000 --- a/components/history/ntl-history-view.c +++ /dev/null @@ -1,286 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ - -/* - * Nautilus - * - * Copyright (C) 1999, 2000 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU 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 - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Author: Elliot Lee <sopwith@redhat.com> - * - */ - -#include <config.h> - -#include <gnome.h> -#include <libnautilus/libnautilus.h> -#include <libnautilus-extensions/nautilus-bookmark.h> -#include <libnautilus-extensions/nautilus-icon-factory.h> -#include <nautilus-widgets/nautilus-preferences.h> -#include <libgnome/gnome-i18n.h> -#include <libgnomevfs/gnome-vfs-init.h> -#include <libgnomevfs/gnome-vfs-uri.h> -#include <liboaf/liboaf.h> - -typedef struct { - NautilusView *view; - - GtkCList *clist; - - gint notify_count; - - BonoboUIHandler *uih; -} HistoryView; - -#define HISTORY_VIEW_COLUMN_ICON 0 -#define HISTORY_VIEW_COLUMN_NAME 1 -#define HISTORY_VIEW_COLUMN_COUNT 2 - -static const NautilusBookmark * -get_bookmark_from_row (GtkCList *clist, int row) -{ - g_assert (NAUTILUS_IS_BOOKMARK (gtk_clist_get_row_data (clist, row))); - return NAUTILUS_BOOKMARK (gtk_clist_get_row_data (clist, row)); -} - -static const char * -get_uri_from_row (GtkCList *clist, int row) -{ - return nautilus_bookmark_get_uri (get_bookmark_from_row (clist, row)); -} - - -static void -install_icon (GtkCList *clist, gint row) -{ - GdkPixmap *pixmap; - GdkBitmap *bitmap; - const NautilusBookmark *bookmark; - - bookmark = get_bookmark_from_row (clist, row); - if (!nautilus_bookmark_get_pixmap_and_mask (bookmark, - NAUTILUS_ICON_SIZE_SMALLER, - &pixmap, - &bitmap)) - { - return; - } - - gtk_clist_set_pixmap (clist, - row, - HISTORY_VIEW_COLUMN_ICON, - pixmap, - bitmap); -} - -static void -history_view_update_icons (GtkCList *clist) -{ - int row; - - for (row = 0; row < clist->rows; ++row) - { - install_icon (clist, row); - } -} - -static void -hyperbola_navigation_history_notify_location_change (NautilusView *view, - Nautilus_NavigationInfo *loci, - HistoryView *hview) -{ - char *cols[HISTORY_VIEW_COLUMN_COUNT]; - int new_rownum; - GtkCList *clist; - NautilusBookmark *bookmark; - int i; - GnomeVFSURI *vfs_uri; - char *short_name; - - hview->notify_count++; - - clist = hview->clist; - gtk_clist_freeze(clist); - - /* FIXME bugzilla.eazel.com 206: - * Get the bookmark info from the Nautilus window instead of - * keeping a parallel mechanism here. That will get us the right - * short name for different locations. - */ - vfs_uri = gnome_vfs_uri_new (loci->requested_uri); - if (vfs_uri == NULL) { - short_name = g_strdup (loci->requested_uri); - } else { - short_name = gnome_vfs_uri_extract_short_name (vfs_uri); - gnome_vfs_uri_unref (vfs_uri); - } - bookmark = nautilus_bookmark_new (loci->requested_uri, short_name); - g_free (short_name); - - - - /* If a bookmark for this location was already in list, remove it - * (no duplicates in list, new one goes at top) - */ - for (i = 0; i < clist->rows; ++i) - { - if (nautilus_bookmark_compare_with (get_bookmark_from_row (clist, i), - bookmark) - == 0) - { - gtk_clist_remove (clist, i); - /* Since we check with each insertion, no need to check further */ - break; - } - } - - cols[HISTORY_VIEW_COLUMN_ICON] = NULL; - /* Ugh. Gotta cast away the const */ - cols[HISTORY_VIEW_COLUMN_NAME] = (char *)nautilus_bookmark_get_name (bookmark); - new_rownum = gtk_clist_prepend(clist, cols); - gtk_clist_set_row_data_full (clist, - new_rownum, - bookmark, - (GtkDestroyNotify)gtk_object_unref); - install_icon (clist, new_rownum); - - gtk_clist_columns_autosize(clist); - - if(gtk_clist_row_is_visible(clist, new_rownum) != GTK_VISIBILITY_FULL) - gtk_clist_moveto(clist, new_rownum, -1, 0.5, 0.0); - - gtk_clist_select_row(clist, new_rownum, 0); - - gtk_clist_thaw(clist); - - hview->notify_count--; -} - -static void -hyperbola_navigation_history_select_row(GtkCList *clist, gint row, gint column, GdkEvent *event, - HistoryView *hview) -{ - Nautilus_NavigationRequestInfo reqi; - - if(hview->notify_count > 0) - return; - - /* First row is always current location, by definition, so don't activate */ - if (row == 0) - return; - - /* FIXME bugzilla.eazel.com 702: There are bugs here if you drag up & down */ - - gtk_clist_freeze(clist); - - if(gtk_clist_row_is_visible(clist, row) != GTK_VISIBILITY_FULL) - gtk_clist_moveto(clist, row, -1, 0.5, 0.0); - - /* FIXME bugzilla.eazel.com 706: - * gotta cast away const because requested_uri isn't defined correctly */ - reqi.requested_uri = (char *)get_uri_from_row (clist, row); - reqi.new_window_requested = FALSE; - - nautilus_view_request_location_change(hview->view, &reqi); - - gtk_clist_thaw(clist); -} - -static int object_count = 0; - -static void -do_destroy(GtkObject *obj, HistoryView *hview) -{ - object_count--; - if(object_count <= 0) - gtk_main_quit(); -} - -static BonoboObject * -make_obj(BonoboGenericFactory *Factory, const char *goad_id, gpointer closure) -{ - GtkWidget *wtmp; - GtkCList *clist; - HistoryView *hview; - - g_return_val_if_fail(!strcmp(goad_id, "OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb"), NULL); - - hview = g_new0(HistoryView, 1); - - /* create interface */ - clist = GTK_CLIST (gtk_clist_new (HISTORY_VIEW_COLUMN_COUNT)); - gtk_clist_column_titles_hide (clist); - gtk_clist_set_row_height (clist, NAUTILUS_ICON_SIZE_SMALLER); - gtk_clist_set_selection_mode(clist, GTK_SELECTION_BROWSE); - gtk_clist_columns_autosize(clist); - wtmp = gtk_scrolled_window_new(gtk_clist_get_hadjustment(clist), - gtk_clist_get_vadjustment(clist)); - gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(wtmp), - GTK_POLICY_AUTOMATIC, - GTK_POLICY_AUTOMATIC); - gtk_container_add(GTK_CONTAINER(wtmp), GTK_WIDGET (clist)); - - gtk_widget_show_all(wtmp); - - /* create object */ - hview->view = nautilus_view_new (wtmp); - gtk_signal_connect (GTK_OBJECT (hview->view), "destroy", do_destroy, hview); - object_count++; - - hview->clist = (GtkCList *)clist; - - /* handle events */ - gtk_signal_connect(GTK_OBJECT(hview->view), "notify_location_change", hyperbola_navigation_history_notify_location_change, hview); - gtk_signal_connect(GTK_OBJECT(clist), "select_row", hyperbola_navigation_history_select_row, hview); - - gtk_signal_connect_object_while_alive (nautilus_icon_factory_get (), - "icons_changed", - history_view_update_icons, - GTK_OBJECT (hview->clist)); - - - return BONOBO_OBJECT (hview->view); -} - -int main(int argc, char *argv[]) -{ - gboolean preferences_succeeded; - BonoboGenericFactory *factory; - CORBA_ORB orb; - - gnome_init_with_popt_table("ntl-history-view", VERSION, - argc, argv, - oaf_popt_options, 0, NULL); - orb = oaf_init (argc, argv); - - /* FIXME bugzilla.eazel.com 672: Need better error reporting if this - * fails. But is it too early to post a dialog here? Does every user - * of NautilusPreferences have to deal with this; - */ - preferences_succeeded = nautilus_preferences_initialize (argc, argv); - g_assert (preferences_succeeded); - - bonobo_init(orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); - gnome_vfs_init (); - - factory = bonobo_generic_factory_new_multi("OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e", make_obj, NULL); - - do { - bonobo_main(); - } while(object_count > 0); - - return 0; -} diff --git a/components/history/ntl-history-view.oafinfo b/components/history/ntl-history-view.oafinfo deleted file mode 100644 index 20c62ee0d..000000000 --- a/components/history/ntl-history-view.oafinfo +++ /dev/null @@ -1,26 +0,0 @@ -<oaf_info> - -<oaf_server iid="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e" type="exe" location="ntl-history-view"> -<oaf_attribute name="repo_ids" type="stringv"> -<item value="IDL:GNOME/GenericFactory:1.0"/> -</oaf_attribute> -<oaf_attribute name="description" type="string" value="Factory for history views"/> -</oaf_server> - -<oaf_server iid="OAFIID:ntl_history_view:a7a85bdd-2ecf-4bc1-be7c-ed328a29aacb" type="factory" location="OAFIID:ntl_history_view_factory:912d6634-d18f-40b6-bb83-bdfe16f1d15e"> -<oaf_attribute name="repo_ids" type="stringv"> -<item value="IDL:Bonobo/Control:1.0"/> -<item value="IDL:Bonobo/Unknown:1.0"/> -<item value="IDL:Nautilus/MetaView:1.0"/> -<item value="IDL:Nautilus/View:1.0"/> -</oaf_attribute> -<oaf_attribute name="description" type="string" value="History sidebar panel for Nautilus"/> -<oaf_attribute name="name" type="string" value="History sidebar panel"/> -<oaf_attribute name="nautilus:sidebar_panel_name" type="string" value="History"/> -<oaf_attribute name="nautilus:recommended_uri_schemes" type="stringv"> -<item value="*"/> -</oaf_attribute> - -</oaf_server> - -</oaf_info> diff --git a/components/loser/content/nautilus-content-loser.h b/components/loser/content/nautilus-content-loser.h index 75304cf09..71a09f2c0 100644 --- a/components/loser/content/nautilus-content-loser.h +++ b/components/loser/content/nautilus-content-loser.h @@ -28,7 +28,7 @@ #ifndef NAUTILUS_CONTENT_LOSER_H #define NAUTILUS_CONTENT_LOSER_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtklabel.h> typedef struct NautilusContentLoser NautilusContentLoser; diff --git a/components/loser/sidebar/nautilus-sidebar-loser.h b/components/loser/sidebar/nautilus-sidebar-loser.h index e8caee1d5..602c122b4 100644 --- a/components/loser/sidebar/nautilus-sidebar-loser.h +++ b/components/loser/sidebar/nautilus-sidebar-loser.h @@ -28,7 +28,7 @@ #ifndef NAUTILUS_SIDEBAR_LOSER_H #define NAUTILUS_SIDEBAR_LOSER_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtklabel.h> typedef struct NautilusSidebarLoser NautilusSidebarLoser; diff --git a/components/mozilla/nautilus-mozilla-content-view.h b/components/mozilla/nautilus-mozilla-content-view.h index c1bda4db4..321554f35 100644 --- a/components/mozilla/nautilus-mozilla-content-view.h +++ b/components/mozilla/nautilus-mozilla-content-view.h @@ -26,7 +26,7 @@ #ifndef NAUTILUS_MOZILLA_CONTENT_VIEW_H #define NAUTILUS_MOZILLA_CONTENT_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtkvbox.h> typedef struct NautilusMozillaContentView NautilusMozillaContentView; diff --git a/components/music/nautilus-music-view.h b/components/music/nautilus-music-view.h index 3406ceecf..f46a46a51 100644 --- a/components/music/nautilus-music-view.h +++ b/components/music/nautilus-music-view.h @@ -25,7 +25,7 @@ #ifndef NAUTILUS_MUSIC_VIEW_H #define NAUTILUS_MUSIC_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtkeventbox.h> diff --git a/components/notes/Makefile.am b/components/notes/Makefile.am index aec441838..a0f6186cb 100644 --- a/components/notes/Makefile.am +++ b/components/notes/Makefile.am @@ -1,4 +1,4 @@ -bin_PROGRAMS=ntl-notes +bin_PROGRAMS=nautilus-notes INCLUDES=\ -I$(top_srcdir) \ @@ -19,9 +19,9 @@ LDADD=\ $(GCONF_LIBS) \ $(GNOMEUI_LIBS) -ntl_notes_SOURCES=ntl-notes.c +nautilus_notes_SOURCES=nautilus-notes.c oafdir=$(datadir)/oaf -oaf_DATA=ntl-notes.oafinfo +oaf_DATA=nautilus-notes.oafinfo EXTRA_DIST=$(oaf_DATA) diff --git a/components/notes/Nautilus_View_notes.oaf.in b/components/notes/Nautilus_View_notes.oaf.in index 33cb97cfa..cfdea0873 100644 --- a/components/notes/Nautilus_View_notes.oaf.in +++ b/components/notes/Nautilus_View_notes.oaf.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="ntl-notes"> +<oaf_server iid="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="nautilus-notes"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for annotation view"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> +<oaf_server iid="OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/notes/Nautilus_View_notes.server.in b/components/notes/Nautilus_View_notes.server.in index 33cb97cfa..cfdea0873 100644 --- a/components/notes/Nautilus_View_notes.server.in +++ b/components/notes/Nautilus_View_notes.server.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="ntl-notes"> +<oaf_server iid="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="nautilus-notes"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for annotation view"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> +<oaf_server iid="OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/notes/Nautilus_View_notes.server.in.in b/components/notes/Nautilus_View_notes.server.in.in index 33cb97cfa..cfdea0873 100644 --- a/components/notes/Nautilus_View_notes.server.in.in +++ b/components/notes/Nautilus_View_notes.server.in.in @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="ntl-notes"> +<oaf_server iid="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="nautilus-notes"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for annotation view"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> +<oaf_server iid="OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/notes/nautilus-notes.c b/components/notes/nautilus-notes.c index 22356a39c..c91027baa 100644 --- a/components/notes/nautilus-notes.c +++ b/components/notes/nautilus-notes.c @@ -144,7 +144,7 @@ make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer cl Notes *notes; NautilusBackground *background; - g_return_val_if_fail (strcmp (goad_id, "OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185") == 0, NULL); + g_return_val_if_fail (strcmp (goad_id, "OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185") == 0, NULL); notes = g_new0 (Notes, 1); notes->uri = g_strdup (""); @@ -202,7 +202,7 @@ main(int argc, char *argv[]) /* initialize CORBA and Bonobo */ - gnome_init_with_popt_table("ntl-notes", VERSION, + gnome_init_with_popt_table("nautilus-notes", VERSION, argc, argv, oaf_popt_options, 0, NULL); orb = oaf_init (argc, argv); @@ -214,7 +214,7 @@ main(int argc, char *argv[]) gnome_vfs_init (); factory = bonobo_generic_factory_new_multi - ("OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0", + ("OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0", make_notes_view, NULL); do { diff --git a/components/notes/nautilus-notes.oafinfo b/components/notes/nautilus-notes.oafinfo index 33cb97cfa..cfdea0873 100644 --- a/components/notes/nautilus-notes.oafinfo +++ b/components/notes/nautilus-notes.oafinfo @@ -1,13 +1,13 @@ <oaf_info> -<oaf_server iid="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="ntl-notes"> +<oaf_server iid="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="nautilus-notes"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:GNOME/GenericFactory:1.0"/> </oaf_attribute> <oaf_attribute name="description" type="string" value="Factory for annotation view"/> </oaf_server> -<oaf_server iid="OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> +<oaf_server iid="OAFIID:nautilus_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:nautilus_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> <oaf_attribute name="repo_ids" type="stringv"> <item value="IDL:Bonobo/Control:1.0"/> <item value="IDL:Bonobo/Unknown:1.0"/> diff --git a/components/notes/ntl-notes.c b/components/notes/ntl-notes.c deleted file mode 100644 index 22356a39c..000000000 --- a/components/notes/ntl-notes.c +++ /dev/null @@ -1,225 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ - -/* - * Nautilus - * - * Copyright (C) 2000 Eazel, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 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 - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this library; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Author: Andy Hertzfeld <andy@eazel.com> - * - */ - -/* annotation metaview - allows you to annotate a directory or file */ - -#include <config.h> - -#include <libnautilus/libnautilus.h> -#include <libnautilus-extensions/nautilus-metadata.h> -#include <gnome.h> -#include <libgnomevfs/gnome-vfs.h> -#include <liboaf/liboaf.h> -#include <limits.h> -#include <ctype.h> -#include <libnautilus-extensions/nautilus-background.h> -#include <libnautilus-extensions/nautilus-file.h> -#include <libnautilus-extensions/nautilus-debug.h> -#include <libnautilus/nautilus-clipboard.h> - -#define NOTES_DEFAULT_BACKGROUND_COLOR "rgb:FFFF/FFFF/BBBB" - - -typedef struct { - NautilusView *view; - GtkWidget *note_text_field; - char *uri; - NautilusFile *file; -} Notes; - -static int notes_object_count = 0; - -static void -finish_loading_note (NautilusFile *file, - gpointer callback_data) -{ - Notes *notes; - int position; - char *notes_text; - - g_assert (NAUTILUS_IS_FILE (file)); - - notes = callback_data; - g_assert (notes->file == file); - - notes_text = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_ANNOTATION, ""); - position = 0; - gtk_editable_insert_text (GTK_EDITABLE (notes->note_text_field), - notes_text, - strlen (notes_text), - &position); - g_free (notes_text); -} - -static void -done_with_file (Notes *notes) -{ - nautilus_file_cancel_callback (notes->file, finish_loading_note, notes); - nautilus_file_unref (notes->file); -} - -static void -notes_load_metainfo (Notes *notes) -{ - gtk_editable_delete_text (GTK_EDITABLE (notes->note_text_field), 0, -1); - - done_with_file (notes); - notes->file = nautilus_file_get (notes->uri); - if (notes->file == NULL) { - return; - } - nautilus_file_call_when_ready (notes->file, NULL, TRUE, finish_loading_note, notes); -} - -/* save the metainfo corresponding to the current uri, if any, into the text field */ - -static void -notes_save_metainfo (Notes *notes) -{ - char *notes_text; - - if (notes->file == NULL) { - return; - } - - notes_text = gtk_editable_get_chars (GTK_EDITABLE (notes->note_text_field), 0 , -1); - nautilus_file_set_metadata (notes->file, NAUTILUS_METADATA_KEY_ANNOTATION, NULL, notes_text); - g_free (notes_text); -} - -static void -notes_notify_location_change (NautilusView *view, - Nautilus_NavigationInfo *loci, - Notes *notes) -{ - if (strcmp (notes->uri, loci->requested_uri) != 0) { - notes_save_metainfo (notes); - g_free (notes->uri); - notes->uri = g_strdup (loci->requested_uri); - notes_load_metainfo (notes); - } -} - - - -static void -do_destroy (GtkObject *obj, Notes *notes) -{ - done_with_file (notes); - g_free (notes->uri); - g_free (notes); - - notes_object_count--; - if (notes_object_count <= 0) { - gtk_main_quit(); - } -} - -static BonoboObject * -make_notes_view (BonoboGenericFactory *Factory, const char *goad_id, gpointer closure) -{ - GtkWidget *vbox; - Notes *notes; - NautilusBackground *background; - - g_return_val_if_fail (strcmp (goad_id, "OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185") == 0, NULL); - notes = g_new0 (Notes, 1); - notes->uri = g_strdup (""); - - /* allocate a vbox to hold all of the UI elements */ - - vbox = gtk_vbox_new (FALSE, 0); - - /* create the text container */ - - notes->note_text_field = gtk_text_new (NULL, NULL); - gtk_text_set_editable (GTK_TEXT (notes->note_text_field), TRUE); - gtk_box_pack_start (GTK_BOX (vbox), notes->note_text_field, TRUE, TRUE, 0); - background = nautilus_get_widget_background (notes->note_text_field); - nautilus_background_set_color (background, NOTES_DEFAULT_BACKGROUND_COLOR); - - gtk_widget_show_all (vbox); - - /* Create CORBA object. */ - notes->view = nautilus_view_new (vbox); - gtk_signal_connect (GTK_OBJECT (notes->view), "destroy", do_destroy, notes); - - notes_object_count++; - - /* handle events */ - gtk_signal_connect (GTK_OBJECT (notes->view), "notify_location_change", - notes_notify_location_change, notes); - - /* handle selections */ - nautilus_clipboard_set_up_editable - (GTK_EDITABLE (notes->note_text_field), - nautilus_view_get_bonobo_control (notes->view)); - - return BONOBO_OBJECT (notes->view); -} - -int -main(int argc, char *argv[]) -{ - BonoboGenericFactory *factory; - CORBA_ORB orb; - - /* Make criticals and warnings stop in the debugger if NAUTILUS_DEBUG is set. - * Unfortunately, this has to be done explicitly for each domain. - */ - if (getenv("NAUTILUS_DEBUG") != NULL) { - nautilus_make_warnings_and_criticals_stop_in_debugger - (G_LOG_DOMAIN, g_log_domain_glib, "Gdk", "Gtk", "GnomeVFS", "GnomeUI", "Bonobo", NULL); - } - - /* Initialize gettext support */ -#ifdef ENABLE_NLS /* sadly we need this ifdef because otherwise the following get empty statement warnings */ - bindtextdomain (PACKAGE, GNOMELOCALEDIR); - textdomain (PACKAGE); -#endif - - /* initialize CORBA and Bonobo */ - - gnome_init_with_popt_table("ntl-notes", VERSION, - argc, argv, - oaf_popt_options, 0, NULL); - orb = oaf_init (argc, argv); - - bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL); - - /* initialize gnome-vfs, etc */ - g_thread_init (NULL); - gnome_vfs_init (); - - factory = bonobo_generic_factory_new_multi - ("OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0", - make_notes_view, NULL); - - do { - bonobo_main(); - } while (notes_object_count > 0); - - return EXIT_SUCCESS; -} diff --git a/components/notes/ntl-notes.oafinfo b/components/notes/ntl-notes.oafinfo deleted file mode 100644 index 33cb97cfa..000000000 --- a/components/notes/ntl-notes.oafinfo +++ /dev/null @@ -1,25 +0,0 @@ -<oaf_info> - -<oaf_server iid="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0" type="exe" location="ntl-notes"> -<oaf_attribute name="repo_ids" type="stringv"> -<item value="IDL:GNOME/GenericFactory:1.0"/> -</oaf_attribute> -<oaf_attribute name="description" type="string" value="Factory for annotation view"/> -</oaf_server> - -<oaf_server iid="OAFIID:ntl_notes_view:7f04c3cb-df79-4b9a-a577-38b19ccd4185" type="factory" location="OAFIID:ntl_notes_view_factory:4b39e388-3ca2-4d68-9f3d-c137ee62d5b0"> -<oaf_attribute name="repo_ids" type="stringv"> -<item value="IDL:Bonobo/Control:1.0"/> -<item value="IDL:Bonobo/Unknown:1.0"/> -<item value="IDL:Nautilus/MetaView:1.0"/> -<item value="IDL:Nautilus/View:1.0"/> -</oaf_attribute> -<oaf_attribute name="description" type="string" value="Notes sidebar panel for Nautilus"/> -<oaf_attribute name="name" type="string" value="Notes sidebar panel"/> -<oaf_attribute name="nautilus:sidebar_panel_name" type="string" value="Notes"/> -<oaf_attribute name="nautilus:recommended_uri_schemes" type="stringv"> -<item value="*"/> -</oaf_attribute> -</oaf_server> - -</oaf_info> diff --git a/components/rpmview/nautilus-rpm-view.h b/components/rpmview/nautilus-rpm-view.h index 7281c132c..31f80f2f6 100644 --- a/components/rpmview/nautilus-rpm-view.h +++ b/components/rpmview/nautilus-rpm-view.h @@ -25,7 +25,7 @@ #ifndef NAUTILUS_RPM_VIEW_H #define NAUTILUS_RPM_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtkeventbox.h> diff --git a/components/sample/nautilus-sample-content-view.h b/components/sample/nautilus-sample-content-view.h index 2a8a89150..58dc91763 100644 --- a/components/sample/nautilus-sample-content-view.h +++ b/components/sample/nautilus-sample-content-view.h @@ -29,7 +29,7 @@ #ifndef NAUTILUS_SAMPLE_CONTENT_VIEW_H #define NAUTILUS_SAMPLE_CONTENT_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtklabel.h> typedef struct NautilusSampleContentView NautilusSampleContentView; diff --git a/components/services/startup/nautilus-view/nautilus-service-startup-view.h b/components/services/startup/nautilus-view/nautilus-service-startup-view.h index 4d6b088a3..c18bdb203 100644 --- a/components/services/startup/nautilus-view/nautilus-service-startup-view.h +++ b/components/services/startup/nautilus-view/nautilus-service-startup-view.h @@ -28,7 +28,7 @@ #ifndef NAUTILUS_SERVICE_STARTUP_VIEW_H #define NAUTILUS_SERVICE_STARTUP_VIEW_H -#include <libnautilus/nautilus-view-frame.h> +#include <libnautilus/nautilus-view.h> #include <gtk/gtk.h> typedef struct _NautilusServicesContentView NautilusServicesContentView; |