From 385e331d87ff34059fcc2bae1b67704f536c54e3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 8 Jan 2008 17:42:52 +0000 Subject: [PATCH] 2.21.2 --- .cvsignore | 2 +- extensiondir.patch | 12 - nautilus-2.10.0-desktop-memory-saver.patch | 564 ------ nautilus-2.10.0-fix-default-font.patch | 22 - nautilus-2.12.1-format.patch | 175 -- nautilus-2.12.1-stretch.patch | 346 ---- nautilus-2.13-format.patch | 55 - nautilus-2.14.1-about.patch | 12 - nautilus-2.15.2-format.patch | 55 - nautilus-2.15.90-background.patch | 77 - nautilus-2.16.0-model-crash.patch | 196 --- nautilus-2.16.0-selinux.patch | 1710 ------------------- nautilus-2.16.2-directory-unref-crash.patch | 20 - nautilus-2.16.2-dynamic-search.patch | 326 ---- nautilus-2.16.2-icons-overlap-revert.patch | 117 -- nautilus-2.16.2-searchengine-order.patch | 28 - nautilus-2.20-async_thumbnail_fixes.patch | 157 -- nautilus-2.20-make-audio-preview-work.patch | 252 --- nautilus-2.20.0-small-font-fix.patch | 12 - nautilus-desktop-keynav.patch | 59 - nautilus-tooltips.patch | 459 ----- nautilus.spec | 15 +- sources | 2 +- 23 files changed, 10 insertions(+), 4663 deletions(-) delete mode 100644 extensiondir.patch delete mode 100644 nautilus-2.10.0-desktop-memory-saver.patch delete mode 100644 nautilus-2.10.0-fix-default-font.patch delete mode 100644 nautilus-2.12.1-format.patch delete mode 100644 nautilus-2.12.1-stretch.patch delete mode 100644 nautilus-2.13-format.patch delete mode 100644 nautilus-2.14.1-about.patch delete mode 100644 nautilus-2.15.2-format.patch delete mode 100644 nautilus-2.15.90-background.patch delete mode 100644 nautilus-2.16.0-model-crash.patch delete mode 100644 nautilus-2.16.0-selinux.patch delete mode 100644 nautilus-2.16.2-directory-unref-crash.patch delete mode 100644 nautilus-2.16.2-dynamic-search.patch delete mode 100644 nautilus-2.16.2-icons-overlap-revert.patch delete mode 100644 nautilus-2.16.2-searchengine-order.patch delete mode 100644 nautilus-2.20-async_thumbnail_fixes.patch delete mode 100644 nautilus-2.20-make-audio-preview-work.patch delete mode 100644 nautilus-2.20.0-small-font-fix.patch delete mode 100644 nautilus-desktop-keynav.patch delete mode 100644 nautilus-tooltips.patch diff --git a/.cvsignore b/.cvsignore index f510f5f..01c1d55 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -nautilus-2.21.1.tar.bz2 +nautilus-2.21.2.tar.bz2 diff --git a/extensiondir.patch b/extensiondir.patch deleted file mode 100644 index 823d5d5..0000000 --- a/extensiondir.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up nautilus-2.21.1/libnautilus-extension/libnautilus-extension.pc.in.extensiondir nautilus-2.21.1/libnautilus-extension/libnautilus-extension.pc.in ---- nautilus-2.21.1/libnautilus-extension/libnautilus-extension.pc.in.extensiondir 2007-12-23 19:19:33.000000000 -0500 -+++ nautilus-2.21.1/libnautilus-extension/libnautilus-extension.pc.in 2007-12-23 19:20:04.000000000 -0500 -@@ -2,7 +2,7 @@ prefix=@prefix@ - exec_prefix=@exec_prefix@ - libdir=@libdir@ - includedir=@includedir@ --extensiondir=@libdir@/nautilus/extensions-1.0 -+extensiondir=@libdir@/nautilus/extensions-2.0 - - Name: libnautilus-extension - Description: A library to create Nautilus view extensions diff --git a/nautilus-2.10.0-desktop-memory-saver.patch b/nautilus-2.10.0-desktop-memory-saver.patch deleted file mode 100644 index 574010d..0000000 --- a/nautilus-2.10.0-desktop-memory-saver.patch +++ /dev/null @@ -1,564 +0,0 @@ -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-directory-background.c,v -retrieving revision 1.95 -diff -u -p -r1.95 nautilus-directory-background.c ---- libnautilus-private/nautilus-directory-background.c 31 Jan 2005 19:35:24 -0000 1.95 -+++ libnautilus-private/nautilus-directory-background.c 15 Mar 2005 11:38:55 -0000 -@@ -35,8 +35,6 @@ - #include "nautilus-metadata.h" - #include "nautilus-file-attributes.h" - #include --#include --#include - #include - #include - #include -@@ -55,59 +53,11 @@ static void saved_settings_changed_callb - - static void nautilus_file_background_receive_gconf_changes (EelBackground *background); - --static void nautilus_file_update_root_pixmaps (EelBackground *background); -- - static void nautilus_file_background_write_desktop_settings (char *color, - char *image, - EelBackgroundImagePlacement placement); - static void nautilus_file_background_theme_changed (gpointer user_data); - --static void --screen_size_changed (GdkScreen *screen, NautilusIconContainer *icon_container) --{ -- EelBackground *background; -- -- background = eel_get_widget_background (GTK_WIDGET (icon_container)); -- -- nautilus_file_update_root_pixmaps (background); --} -- --static void --remove_connection (NautilusIconContainer *icon_container, GdkScreen *screen) --{ -- g_signal_handlers_disconnect_by_func -- (screen, -- G_CALLBACK (screen_size_changed), -- icon_container); --} -- --static void --desktop_background_realized (NautilusIconContainer *icon_container, void *disconnect_signal) --{ -- EelBackground *background; -- -- if (GPOINTER_TO_INT (disconnect_signal)) { -- g_signal_handlers_disconnect_by_func -- (icon_container, -- G_CALLBACK (desktop_background_realized), -- disconnect_signal); -- } -- -- background = eel_get_widget_background (GTK_WIDGET (icon_container)); -- -- g_object_set_data (G_OBJECT (background), "icon_container", (gpointer) icon_container); -- -- g_object_set_data (G_OBJECT (background), "screen", -- gtk_widget_get_screen (GTK_WIDGET (icon_container))); -- -- nautilus_file_update_root_pixmaps (background); -- -- g_signal_connect (gtk_widget_get_screen (GTK_WIDGET (icon_container)), "size_changed", -- G_CALLBACK (screen_size_changed), icon_container); -- g_signal_connect (icon_container, "unrealize", G_CALLBACK (remove_connection), -- gtk_widget_get_screen (GTK_WIDGET (icon_container))); --} -- - void - nautilus_connect_desktop_background_to_file_metadata (NautilusIconContainer *icon_container, - NautilusFile *file) -@@ -115,9 +65,9 @@ nautilus_connect_desktop_background_to_f - EelBackground *background; - - background = eel_get_widget_background (GTK_WIDGET (icon_container)); -- eel_background_set_is_constant_size (background, TRUE); - -- g_object_set_data (G_OBJECT (background), "is_desktop", (gpointer)1); -+ eel_background_set_is_constant_size (background, TRUE); -+ eel_background_set_desktop (background, GTK_WIDGET (icon_container), TRUE); - - /* Strictly speaking, we don't need to know about metadata changes, since - * the desktop setting aren't stored there. But, hooking up to metadata -@@ -129,22 +79,9 @@ nautilus_connect_desktop_background_to_f - */ - nautilus_connect_background_to_file_metadata (GTK_WIDGET (icon_container), file, NAUTILUS_DND_ACTION_SET_AS_FOLDER_BACKGROUND); - -- if (GTK_WIDGET_REALIZED (icon_container)) { -- desktop_background_realized (icon_container, GINT_TO_POINTER (FALSE)); -- } else { -- g_signal_connect (icon_container, "realize", -- G_CALLBACK (desktop_background_realized), GINT_TO_POINTER (TRUE)); -- } -- - nautilus_file_background_receive_gconf_changes (background); - } - --static gboolean --background_is_desktop (EelBackground *background) --{ -- return g_object_get_data (G_OBJECT (background), "is_desktop") != 0; --} -- - static void - nautilus_file_background_get_default_settings (char **color, - char **image, -@@ -357,15 +294,31 @@ static void - desktop_background_destroyed_callback (EelBackground *background, void *georgeWBush) - { - guint notification_id; -+ guint notification_timeout_id; - - notification_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (background), "desktop_gconf_notification")); - eel_gconf_notification_remove (notification_id); -+ -+ notification_timeout_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (background), "desktop_gconf_notification_timeout")); -+ g_source_remove (notification_timeout_id); - } - - static void - desktop_background_gconf_notify_cb (GConfClient *client, guint notification_id, GConfEntry *entry, gpointer data) - { -- call_settings_changed (EEL_BACKGROUND (data)); -+ EelBackground *background; -+ guint notification_timeout_id; -+ -+ background = EEL_BACKGROUND (data); -+ /* -+ * Wallpaper capplet changes picture, background color and placement with -+ * gconf_change_set API, but unfortunately, this operation is not atomic in -+ * GConf as it should be. So we update background after small timeout to -+ * let GConf change all values. -+ */ -+ notification_timeout_id = g_timeout_add (300, (GSourceFunc) call_settings_changed, background); -+ -+ g_object_set_data (G_OBJECT (background), "desktop_gconf_notification_timeout", GUINT_TO_POINTER (notification_timeout_id)); - } - - static void -@@ -382,190 +335,6 @@ nautilus_file_background_receive_gconf_c - G_CALLBACK (desktop_background_destroyed_callback), NULL); - } - --/* Create a persistent pixmap. We create a separate display -- * and set the closedown mode on it to RetainPermanent -- * (copied from gnome-source/control-panels/capplets/background-properties/render-background.c) -- */ --static GdkPixmap * --make_root_pixmap (GdkScreen *screen, gint width, gint height) --{ -- Display *display; -- const char *display_name; -- Pixmap result; -- GdkPixmap *gdk_pixmap; -- int screen_num; -- -- screen_num = gdk_screen_get_number (screen); -- -- gdk_flush (); -- -- display_name = gdk_display_get_name (gdk_screen_get_display (screen)); -- display = XOpenDisplay (display_name); -- -- if (display == NULL) { -- g_warning ("Unable to open display '%s' when setting background pixmap\n", -- (display_name) ? display_name : "NULL"); -- return NULL; -- } -- -- XSetCloseDownMode (display, RetainPermanent); -- -- result = XCreatePixmap (display, -- RootWindow (display, screen_num), -- width, height, -- DefaultDepth (display, screen_num)); -- -- XCloseDisplay (display); -- -- gdk_pixmap = gdk_pixmap_foreign_new (result); -- gdk_drawable_set_colormap (GDK_DRAWABLE (gdk_pixmap), -- gdk_drawable_get_colormap (gdk_screen_get_root_window (screen))); -- -- return gdk_pixmap; --} -- --/* Set the root pixmap, and properties pointing to it. We -- * do this atomically with XGrabServer to make sure that -- * we won't leak the pixmap if somebody else it setting -- * it at the same time. (This assumes that they follow the -- * same conventions we do -- * (copied from gnome-source/control-panels/capplets/background-properties/render-background.c) -- */ --static void --set_root_pixmap (GdkPixmap *pixmap, GdkScreen *screen) --{ -- int result; -- gint format; -- gulong nitems; -- gulong bytes_after; -- guchar *data_esetroot; -- Pixmap pixmap_id; -- Atom type; -- Display *display; -- int screen_num; -- -- screen_num = gdk_screen_get_number (screen); -- -- data_esetroot = NULL; -- display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen)); -- -- XGrabServer (display); -- -- result = XGetWindowProperty (display, RootWindow (display, screen_num), -- gdk_x11_get_xatom_by_name ("ESETROOT_PMAP_ID"), -- 0L, 1L, False, XA_PIXMAP, -- &type, &format, &nitems, &bytes_after, -- &data_esetroot); -- -- if (data_esetroot != NULL) { -- if (result == Success && type == XA_PIXMAP && format == 32 && nitems == 1) { -- gdk_error_trap_push (); -- XKillClient (display, *(Pixmap *)data_esetroot); -- gdk_flush (); -- gdk_error_trap_pop (); -- } -- XFree (data_esetroot); -- } -- -- pixmap_id = GDK_WINDOW_XWINDOW (pixmap); -- -- XChangeProperty (display, RootWindow (display, screen_num), -- gdk_x11_get_xatom_by_name ("ESETROOT_PMAP_ID"), XA_PIXMAP, -- 32, PropModeReplace, -- (guchar *) &pixmap_id, 1); -- XChangeProperty (display, RootWindow (display, screen_num), -- gdk_x11_get_xatom_by_name ("_XROOTPMAP_ID"), XA_PIXMAP, -- 32, PropModeReplace, -- (guchar *) &pixmap_id, 1); -- -- XSetWindowBackgroundPixmap (display, RootWindow (display, screen_num), pixmap_id); -- XClearWindow (display, RootWindow (display, screen_num)); -- -- XUngrabServer (display); -- -- XFlush (display); --} -- --/* Free the root pixmap */ --static void --image_loading_done_callback (EelBackground *background, gboolean successful_load, void *disconnect_signal) --{ -- int entire_width; -- int entire_height; -- int pixmap_width; -- int pixmap_height; -- GdkGC *gc; -- GdkPixmap *pixmap; -- GdkWindow *background_window; -- GdkScreen *screen; -- GdkColor parsed_color; -- char * color_string; -- -- if (GPOINTER_TO_INT (disconnect_signal)) { -- g_signal_handlers_disconnect_by_func -- (background, -- G_CALLBACK (image_loading_done_callback), -- disconnect_signal); -- } -- -- screen = g_object_get_data (G_OBJECT (background), "screen"); -- if (screen == NULL) { -- return; -- } -- entire_width = gdk_screen_get_width (screen); -- entire_height = gdk_screen_get_height (screen); -- -- if (eel_background_get_suggested_pixmap_size (background, entire_width, entire_height, -- &pixmap_width, &pixmap_height)) { -- eel_background_pre_draw (background, entire_width, entire_height); -- /* image resize may have forced us to reload the image */ -- if (!eel_background_is_loaded (background)) { -- g_signal_connect (background, "image_loading_done", -- G_CALLBACK (image_loading_done_callback), -- GINT_TO_POINTER (TRUE)); -- return; -- } -- } else { -- pixmap_width = pixmap_height = 1; -- -- background_window = gdk_screen_get_root_window (screen); -- color_string = eel_background_get_color (background); -- -- if (background_window != NULL && color_string != NULL) { -- if (eel_gdk_color_parse (color_string, &parsed_color)) { -- gdk_rgb_find_color (gdk_drawable_get_colormap (background_window), &parsed_color); -- gdk_window_set_background (background_window, &parsed_color); -- } -- } -- g_free (color_string); -- } -- -- pixmap = make_root_pixmap (screen, pixmap_width, pixmap_height); -- if (pixmap == NULL) { -- return; -- } -- -- gc = gdk_gc_new (pixmap); -- eel_background_draw (background, pixmap, gc, -- 0, 0, 0, 0, -- pixmap_width, pixmap_height); -- g_object_unref (gc); -- set_root_pixmap (pixmap, screen); -- g_object_unref (pixmap); --} -- --static void --nautilus_file_update_root_pixmaps (EelBackground *background) --{ -- if (eel_background_is_loaded (background)) { -- image_loading_done_callback (background, TRUE, GINT_TO_POINTER (FALSE)); -- } else { -- g_signal_connect (background, "image_loading_done", -- G_CALLBACK (image_loading_done_callback), -- GINT_TO_POINTER (TRUE)); -- } --} -- - /* return true if the background is not in the default state */ - gboolean - nautilus_file_background_is_set (EelBackground *background) -@@ -603,7 +372,7 @@ background_changed_callback (EelBackgrou - color = eel_background_get_color (background); - image = eel_background_get_image_uri (background); - -- if (background_is_desktop (background)) { -+ if (eel_background_is_desktop (background)) { - nautilus_file_background_write_desktop_settings (color, image, eel_background_get_image_placement (background)); - } else { - /* Block the other handler while we are writing metadata so it doesn't -@@ -657,10 +426,6 @@ background_changed_callback (EelBackgrou - - g_free (color); - g_free (image); -- -- if (background_is_desktop (background)) { -- nautilus_file_update_root_pixmaps (background); -- } - } - - static gboolean -@@ -677,7 +442,7 @@ initialize_background_from_settings (Nau - g_assert (g_object_get_data (G_OBJECT (background), "eel_background_file") - == file); - -- if (background_is_desktop (background)) { -+ if (eel_background_is_desktop (background)) { - nautilus_file_background_read_desktop_settings (&color, &image, &placement); - } else { - color = nautilus_file_get_metadata (file, -@@ -715,7 +480,7 @@ initialize_background_from_settings (Nau - - old_image = eel_background_get_image_uri (background); - if (eel_strcmp (image, old_image) != 0) { -- if (background_is_desktop(background)) { -+ if (eel_background_is_desktop(background)) { - eel_background_set_image_uri_sync (background, image); - } - else { -@@ -750,10 +515,6 @@ saved_settings_changed_callback (Nautilu - { - gboolean changed; - changed = initialize_background_from_settings (file, background); -- -- if (changed && background_is_desktop (background)) { -- nautilus_file_update_root_pixmaps (background); -- } - } - - /* handle the theme changing */ -@@ -778,7 +539,7 @@ background_reset_callback (EelBackground - char *color; - char *image; - -- if (background_is_desktop (background)) { -+ if (eel_background_is_desktop (background)) { - nautilus_file_background_write_desktop_default_settings (); - } else { - /* Block the other handler while we are writing metadata so it doesn't -Index: nautilus-icon-dnd.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-dnd.c,v -retrieving revision 1.141 -diff -u -p -r1.141 nautilus-icon-dnd.c ---- libnautilus-private/nautilus-icon-dnd.c 13 Jan 2005 13:27:51 -0000 1.141 -+++ libnautilus-private/nautilus-icon-dnd.c 15 Mar 2005 11:38:55 -0000 -@@ -536,7 +534,7 @@ get_background_drag_action (NautilusIcon - - if (action == GDK_ACTION_ASK) { - valid_actions = NAUTILUS_DND_ACTION_SET_AS_FOLDER_BACKGROUND; -- if (g_object_get_data (G_OBJECT (eel_get_widget_background (GTK_WIDGET (container))), "is_desktop") == 0) { -+ if (!eel_background_is_desktop (eel_get_widget_background (GTK_WIDGET (container)))) { - valid_actions |= NAUTILUS_DND_ACTION_SET_AS_GLOBAL_BACKGROUND; - } - -Index: libnautilus-private/nautilus-window-info.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-window-info.c,v -retrieving revision 1.2 -diff -u -p -r1.2 nautilus-window-info.c ---- libnautilus-private/nautilus-window-info.c 22 Nov 2004 15:24:36 -0000 1.2 -+++ libnautilus-private/nautilus-window-info.c 18 Mar 2005 23:28:15 -0000 -@@ -168,6 +168,14 @@ nautilus_window_info_open_location (Naut - } - - void -+nautilus_window_info_show_window (NautilusWindowInfo *window) -+{ -+ g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window)); -+ -+ (* NAUTILUS_WINDOW_INFO_GET_IFACE (window)->show_window) (window); -+} -+ -+void - nautilus_window_info_close (NautilusWindowInfo *window) - { - g_return_if_fail (NAUTILUS_IS_WINDOW_INFO (window)); -Index: libnautilus-private/nautilus-window-info.h -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-window-info.h,v -retrieving revision 1.2 -diff -u -p -r1.2 nautilus-window-info.h ---- libnautilus-private/nautilus-window-info.h 22 Nov 2004 15:24:36 -0000 1.2 -+++ libnautilus-private/nautilus-window-info.h 18 Mar 2005 23:28:15 -0000 -@@ -127,6 +127,7 @@ struct _NautilusWindowInfoIface - NautilusWindowOpenMode mode, - NautilusWindowOpenFlags flags, - GList *selection); -+ void (* show_window) (NautilusWindowInfo *window); - void (* close_window) (NautilusWindowInfo *window); - GtkUIManager * (* get_ui_manager) (NautilusWindowInfo *window); - }; -@@ -144,6 +145,7 @@ void nautil - NautilusWindowOpenMode mode, - NautilusWindowOpenFlags flags, - GList *selection); -+void nautilus_window_info_show_window (NautilusWindowInfo *window); - void nautilus_window_info_close (NautilusWindowInfo *window); - void nautilus_window_info_set_status (NautilusWindowInfo *window, - const char *status); -Index: src/nautilus-window-manage-views.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v -retrieving revision 1.347 -diff -u -p -r1.347 nautilus-window-manage-views.c ---- src/nautilus-window-manage-views.c 14 Feb 2005 10:59:23 -0000 1.347 -+++ src/nautilus-window-manage-views.c 18 Mar 2005 23:28:15 -0000 -@@ -1106,11 +1106,6 @@ location_has_really_changed (NautilusWin - - free_location_change (window); - -- nautilus_window_update_title (window); -- nautilus_window_update_icon (window); -- -- gtk_widget_show (GTK_WIDGET (window)); -- - if (location_copy != NULL) { - g_signal_emit_by_name (window, "loading_uri", - location_copy); -Index: src/nautilus-window.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-window.c,v -retrieving revision 1.443 -diff -u -p -r1.443 nautilus-window.c ---- src/nautilus-window.c 22 Feb 2005 08:46:38 -0000 1.443 -+++ src/nautilus-window.c 18 Mar 2005 23:28:16 -0000 -@@ -559,6 +559,26 @@ nautilus_window_finalize (GObject *objec - } - - void -+nautilus_window_show_window (NautilusWindow *window) -+{ -+ g_return_if_fail (NAUTILUS_IS_WINDOW (window)); -+ -+ EEL_CALL_METHOD (NAUTILUS_WINDOW_CLASS, window, -+ show_window, (window)); -+ -+ nautilus_window_update_title (window); -+ nautilus_window_update_icon (window); -+ -+ gtk_widget_show (GTK_WIDGET (window)); -+ -+ if (window->details->viewed_file) { -+ if (NAUTILUS_IS_SPATIAL_WINDOW (window)) { -+ nautilus_file_set_has_open_window (window->details->viewed_file, TRUE); -+ } -+ } -+} -+ -+void - nautilus_window_close (NautilusWindow *window) - { - g_return_if_fail (NAUTILUS_IS_WINDOW (window)); -@@ -1186,9 +1206,6 @@ nautilus_window_set_viewed_file (Nautilu - } - - if (file != NULL) { -- if (NAUTILUS_IS_SPATIAL_WINDOW (window)) { -- nautilus_file_set_has_open_window (file, TRUE); -- } - attributes = NAUTILUS_FILE_ATTRIBUTE_DISPLAY_NAME | NAUTILUS_FILE_ATTRIBUTE_SLOW_MIME_TYPE; - nautilus_file_monitor_add (file, window, attributes); - } -@@ -1407,6 +1424,7 @@ nautilus_window_info_iface_init (Nautilu - iface->report_selection_changed = nautilus_window_report_selection_changed; - iface->report_view_failed = nautilus_window_report_view_failed; - iface->open_location = nautilus_window_open_location_full; -+ iface->show_window = nautilus_window_show_window; - iface->close_window = nautilus_window_close; - iface->set_status = nautilus_window_set_status; - iface->get_window_type = nautilus_window_get_window_type; -Index: src/nautilus-window.h -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-window.h,v -retrieving revision 1.117 -diff -u -p -r1.117 nautilus-window.h ---- src/nautilus-window.h 22 Nov 2004 15:24:37 -0000 1.117 -+++ src/nautilus-window.h 18 Mar 2005 23:28:16 -0000 -@@ -74,6 +74,7 @@ typedef struct { - gboolean active); - void (* prompt_for_location) (NautilusWindow *window); - void (* get_default_size) (NautilusWindow *window, guint *default_width, guint *default_height); -+ void (* show_window) (NautilusWindow *window); - void (* close) (NautilusWindow *window); - - /* Signals used only for keybindings */ -@@ -110,6 +111,7 @@ struct NautilusWindow { - }; - - GType nautilus_window_get_type (void); -+void nautilus_window_show_window (NautilusWindow *window); - void nautilus_window_close (NautilusWindow *window); - char * nautilus_window_get_location (NautilusWindow *window); - void nautilus_window_go_to (NautilusWindow *window, -Index: src/file-manager/fm-directory-view.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v -retrieving revision 1.662 -diff -u -p -r1.662 fm-directory-view.c ---- src/file-manager/fm-directory-view.c 12 Mar 2005 11:45:12 -0000 1.662 -+++ src/file-manager/fm-directory-view.c 18 Mar 2005 23:28:16 -0000 -@@ -7069,6 +7069,9 @@ finish_loading (FMDirectoryView *view) - * Subclasses use this to know that the new metadata is now available. - */ - fm_directory_view_begin_loading (view); -+ -+ /* Assume we have now all information to show window */ -+ nautilus_window_info_show_window (view->details->window); - - if (nautilus_directory_are_all_files_seen (view->details->model)) { - schedule_idle_display_of_pending_files (view); diff --git a/nautilus-2.10.0-fix-default-font.patch b/nautilus-2.10.0-fix-default-font.patch deleted file mode 100644 index 0b6599d..0000000 --- a/nautilus-2.10.0-fix-default-font.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- libnautilus-private/apps_nautilus_preferences.schemas.in.orig 2005-05-10 14:39:57.000000000 -0400 -+++ libnautilus-private/apps_nautilus_preferences.schemas.in 2005-05-10 14:39:45.000000000 -0400 -@@ -295,7 +295,7 @@ - string - Sans 10 - -- Sans 10 -+ Sans 10 - Desktop font - - The font description used for the icons on the desktop. ---- po/zh_TW.po.orig 2005-05-10 14:27:10.000000000 -0400 -+++ po/zh_TW.po 2005-05-10 14:27:30.000000000 -0400 -@@ -924,7 +924,7 @@ - #. Translators: please note this can choose the default font and the size. e.g. "Monospace 8". Please do not translate "Sans". In most cases, this should be left alone. - #: ../libnautilus-private/apps_nautilus_preferences.schemas.in.h:70 - msgid "Sans 10" --msgstr "AR PL KaitiM Big5 10" -+msgstr "Sans 10" - - #: ../libnautilus-private/apps_nautilus_preferences.schemas.in.h:71 - msgid "Show folders first in windows" diff --git a/nautilus-2.12.1-format.patch b/nautilus-2.12.1-format.patch deleted file mode 100644 index 2e53a48..0000000 --- a/nautilus-2.12.1-format.patch +++ /dev/null @@ -1,175 +0,0 @@ ---- nautilus-2.12.1/src/file-manager/fm-actions.h.format 2005-07-01 06:22:19.000000000 -0400 -+++ nautilus-2.12.1/src/file-manager/fm-actions.h 2005-10-27 14:35:29.000000000 -0400 -@@ -57,6 +57,7 @@ - #define FM_ACTION_MOUNT_VOLUME "Mount Volume" - #define FM_ACTION_UNMOUNT_VOLUME "Unmount Volume" - #define FM_ACTION_EJECT_VOLUME "Eject Volume" -+#define FM_ACTION_FORMAT_VOLUME "Format Volume" - #define FM_ACTION_SCRIPTS "Scripts" - #define FM_ACTION_NEW_DOCUMENTS "New Documents" - #define FM_ACTION_NEW_EMPTY_FILE "New Empty File" ---- nautilus-2.12.1/src/file-manager/fm-directory-view.c.format 2005-09-27 04:31:43.000000000 -0400 -+++ nautilus-2.12.1/src/file-manager/fm-directory-view.c 2005-10-27 23:14:56.000000000 -0400 -@@ -377,6 +377,8 @@ - gpointer data); - static void action_unmount_volume_callback (GtkAction *action, - gpointer data); -+static void action_format_volume_callback (GtkAction *action, -+ gpointer data); - - /* location popup-related actions */ - -@@ -5796,6 +5798,43 @@ - nautilus_file_list_free (selection); - } - -+static void -+action_format_volume_callback (GtkAction *action, -+ gpointer data) -+{ -+ NautilusFile *file; -+ GList *selection, *l; -+ GnomeVFSDrive *drive; -+ char *device_path; -+ char *cmdline; -+ FMDirectoryView *view; -+ -+ view = FM_DIRECTORY_VIEW (data); -+ -+ selection = fm_directory_view_get_selection (view); -+ for (l = selection; l != NULL; l = l->next) { -+ file = NAUTILUS_FILE (l->data); -+ -+ if (nautilus_file_has_drive (file)) { -+ drive = nautilus_file_get_drive (file); -+ device_path = gnome_vfs_drive_get_device_path (drive); -+ -+ if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) { -+ -+ -+ cmdline = g_strconcat ("gfloppy ", device_path, NULL); -+ } -+ else { -+ cmdline = g_strconcat ("userformat ", device_path, NULL); -+ } -+ g_spawn_command_line_async (cmdline, NULL); -+ g_free (cmdline); -+ g_free (device_path); -+ } -+ } -+ nautilus_file_list_free (selection); -+} -+ - static void - action_eject_volume_callback (GtkAction *action, - gpointer data) -@@ -6218,6 +6257,10 @@ - N_("_Eject"), NULL, /* label, accelerator */ - N_("Eject the selected volume"), /* tooltip */ - G_CALLBACK (action_eject_volume_callback) }, -+ { "Format Volume", NULL, /* name, stock id */ -+ N_("_Format"), NULL, /* label, accelerator */ -+ N_("Format the selected volume"), /* tooltip */ -+ G_CALLBACK (action_format_volume_callback) }, - { "OpenCloseParent", NULL, /* name, stock id */ - N_("Open File and Close window"), "Down", /* label, accelerator */ - NULL, /* tooltip */ -@@ -6457,7 +6500,8 @@ - gboolean *show_mount, - gboolean *show_unmount, - gboolean *show_eject, -- gboolean *show_connect) -+ gboolean *show_connect, -+ gboolean *show_format) - { - GnomeVFSVolume *volume; - GnomeVFSDrive *drive; -@@ -6467,6 +6511,7 @@ - *show_unmount = FALSE; - *show_eject = FALSE; - *show_connect = FALSE; -+ *show_format = FALSE; - - if (nautilus_file_has_volume (file)) { - *show_unmount = TRUE; -@@ -6476,11 +6521,18 @@ - } else if (nautilus_file_has_drive (file)) { - drive = nautilus_file_get_drive (file); - *show_eject = eject_for_type (gnome_vfs_drive_get_device_type (drive)); -+ if ((gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY && -+ g_find_program_in_path ("gfloppy")) || -+ g_find_program_in_path ("userformat")) { -+ *show_format = TRUE; -+ } - if (gnome_vfs_drive_is_mounted (drive)) { - *show_unmount = TRUE; -+ *show_format = FALSE; - } else { - *show_mount = TRUE; - } -+ - } else if (nautilus_file_is_nautilus_link (file)) { - uri = nautilus_file_get_activation_uri (file); - if (uri != NULL && -@@ -6507,32 +6559,38 @@ - gboolean show_unmount; - gboolean show_eject; - gboolean show_connect; -+ gboolean show_format; - GtkAction *action; - - show_mount = (selection != NULL); - show_unmount = (selection != NULL); - show_eject = (selection != NULL); - show_connect = (selection != NULL && selection_count == 1); -+ show_format = (selection != NULL && selection_count == 1); - - for (l = selection; l != NULL && (show_mount || show_unmount -- || show_eject || show_connect); -+ || show_eject || show_connect -+ || show_format); - l = l->next) { - gboolean show_mount_one; - gboolean show_unmount_one; - gboolean show_eject_one; - gboolean show_connect_one; -+ gboolean show_format_one; - - file = NAUTILUS_FILE (l->data); - file_should_show_foreach (file, - &show_mount_one, - &show_unmount_one, - &show_eject_one, -- &show_connect_one); -+ &show_connect_one, -+ &show_format_one); - - show_mount &= show_mount_one; - show_unmount &= show_unmount_one; - show_eject &= show_eject_one; - show_connect &= show_connect_one; -+ show_format &= show_format_one; - } - - /* We don't want both eject and unmount, since eject -@@ -6556,6 +6614,10 @@ - action = gtk_action_group_get_action (view->details->dir_action_group, - FM_ACTION_EJECT_VOLUME); - gtk_action_set_visible (action, show_eject); -+ -+ action = gtk_action_group_get_action (view->details->dir_action_group, -+ FM_ACTION_FORMAT_VOLUME); -+ gtk_action_set_visible (action, show_format); - } - - static void ---- nautilus-2.12.1/src/file-manager/nautilus-directory-view-ui.xml.format 2005-10-03 03:45:27.000000000 -0400 -+++ nautilus-2.12.1/src/file-manager/nautilus-directory-view-ui.xml 2005-10-27 14:35:29.000000000 -0400 -@@ -147,6 +147,7 @@ - - - -+ - - - diff --git a/nautilus-2.12.1-stretch.patch b/nautilus-2.12.1-stretch.patch deleted file mode 100644 index 8422ee3..0000000 --- a/nautilus-2.12.1-stretch.patch +++ /dev/null @@ -1,346 +0,0 @@ ---- nautilus-2.12.1/src/nautilus-window-manage-views.c.stretch 2005-07-11 04:37:43.000000000 -0400 -+++ nautilus-2.12.1/src/nautilus-window-manage-views.c 2005-10-27 14:35:29.000000000 -0400 -@@ -1532,10 +1532,7 @@ - action = gtk_action_group_get_action (window->details->main_action_group, - NAUTILUS_ACTION_ZOOM_NORMAL); - gtk_action_set_visible (action, supports_zooming); -- gtk_action_set_sensitive (action, -- TRUE); -- -- /* FIXME bugzilla.gnome.org 43442: Desensitize "Zoom Normal"? */ -+ gtk_action_set_sensitive (action, supports_zooming); - } - - static void ---- nautilus-2.12.1/libnautilus-private/nautilus-icon-canvas-item.h.stretch 2005-06-22 12:25:45.000000000 -0400 -+++ nautilus-2.12.1/libnautilus-private/nautilus-icon-canvas-item.h 2005-10-27 14:35:29.000000000 -0400 -@@ -84,7 +84,8 @@ - gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item, - ArtIRect canvas_rect); - gboolean nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item, -- ArtPoint world_point); -+ ArtPoint world_point, -+ GtkCornerType *corner); - void nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item); - ArtDRect nautilus_icon_canvas_item_get_icon_rectangle (const NautilusIconCanvasItem *item); - ArtDRect nautilus_icon_canvas_item_get_text_rectangle (const NautilusIconCanvasItem *item); ---- nautilus-2.12.1/libnautilus-private/nautilus-icon-container.c.stretch 2005-10-03 04:00:26.000000000 -0400 -+++ nautilus-2.12.1/libnautilus-private/nautilus-icon-container.c 2005-10-27 14:45:53.000000000 -0400 -@@ -3367,6 +3367,8 @@ - NautilusIcon *icon; - ArtPoint world_point; - GtkWidget *toplevel; -+ GtkCornerType corner; -+ GdkCursor *cursor; - - details = container->details; - icon = details->stretch_icon; -@@ -3374,11 +3376,27 @@ - /* Check if we hit the stretch handles. */ - world_point.x = details->drag_x; - world_point.y = details->drag_y; -- if (!nautilus_icon_canvas_item_hit_test_stretch_handles -- (icon->item, world_point)) { -+ if (!nautilus_icon_canvas_item_hit_test_stretch_handles (icon->item, world_point, &corner)) { - return FALSE; - } - -+ switch (corner) { -+ case GTK_CORNER_TOP_LEFT: -+ cursor = gdk_cursor_new (GDK_TOP_LEFT_CORNER); -+ break; -+ case GTK_CORNER_BOTTOM_LEFT: -+ cursor = gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER); -+ break; -+ case GTK_CORNER_TOP_RIGHT: -+ cursor = gdk_cursor_new (GDK_TOP_RIGHT_CORNER); -+ break; -+ case GTK_CORNER_BOTTOM_RIGHT: -+ cursor = gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER); -+ break; -+ default: -+ cursor = NULL; -+ break; -+ } - /* Set up the dragging. */ - details->drag_state = DRAG_STATE_STRETCH; - eel_canvas_w2c (EEL_CANVAS (container), -@@ -3396,8 +3414,10 @@ - eel_canvas_item_grab (EEL_CANVAS_ITEM (icon->item), - (GDK_POINTER_MOTION_MASK - | GDK_BUTTON_RELEASE_MASK), -- NULL, -+ cursor, - GDK_CURRENT_TIME); -+ if (cursor) -+ gdk_cursor_unref (cursor); - - /* Ensure the window itself is focused.. */ - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container)); -@@ -3458,6 +3478,43 @@ - } - } - -+static gboolean -+keyboard_stretching (NautilusIconContainer *container, -+ GdkEventKey *event) -+{ -+ NautilusIcon *icon; -+ guint size; -+ -+ icon = container->details->stretch_icon; -+ -+ if (icon == NULL || !icon->is_selected) { -+ return FALSE; -+ } -+ -+ icon_get_size (container, icon, &size); -+ -+ switch (event->keyval) { -+ case GDK_equal: -+ case GDK_plus: -+ case GDK_KP_Add: -+ icon_set_size (container, icon, size + 5, FALSE, FALSE); -+ break; -+ case GDK_minus: -+ case GDK_KP_Subtract: -+ icon_set_size (container, icon, size - 5, FALSE, FALSE); -+ break; -+ case GDK_0: -+ case GDK_KP_0: -+ nautilus_icon_container_move_icon (container, icon, -+ icon->x, icon->y, -+ 1.0, 1.0, -+ FALSE, TRUE, TRUE); -+ break; -+ } -+ -+ return TRUE; -+} -+ - static void - ungrab_stretch_icon (NautilusIconContainer *container) - { -@@ -3489,7 +3546,7 @@ - redo_layout (container); - } - --static void -+static gboolean - undo_stretching (NautilusIconContainer *container) - { - NautilusIcon *stretched_icon; -@@ -3497,7 +3554,7 @@ - stretched_icon = container->details->stretch_icon; - - if (stretched_icon == NULL) { -- return; -+ return FALSE; - } - - if (container->details->drag_state == DRAG_STATE_STRETCH) { -@@ -3519,6 +3576,8 @@ - container->details->stretch_icon = NULL; - emit_stretch_ended (container, stretched_icon); - redo_layout (container); -+ -+ return TRUE; - } - - static gboolean -@@ -3857,9 +3916,19 @@ - - handled = TRUE; - break; -- case GDK_Escape: -- undo_stretching (container); -- handled = TRUE; -+ case GDK_Escape: -+ handled = undo_stretching (container); -+ break; -+ case GDK_plus: -+ case GDK_minus: -+ case GDK_equal: -+ case GDK_KP_Add: -+ case GDK_KP_Subtract: -+ case GDK_0: -+ case GDK_KP_0: -+ if (event->state & GDK_CONTROL_MASK) { -+ handled = keyboard_stretching (container, event); -+ } - break; - case GDK_F10: - /* handle Ctrl+F10 because we want to display the ---- nautilus-2.12.1/libnautilus-private/nautilus-icon-canvas-item.c.stretch 2005-09-26 11:30:05.000000000 -0400 -+++ nautilus-2.12.1/libnautilus-private/nautilus-icon-canvas-item.c 2005-10-27 14:35:29.000000000 -0400 -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -209,7 +210,8 @@ - GdkGC *gc); - - static gboolean hit_test_stretch_handle (NautilusIconCanvasItem *item, -- ArtIRect canvas_rect); -+ ArtIRect canvas_rect, -+ GtkCornerType *corner); - static void clear_rounded_corners (GdkPixbuf *destination_pixbuf, - GdkPixbuf *corner_pixbuf, - int corner_size); -@@ -1152,12 +1154,30 @@ - draw_or_measure_label_text (item, drawable, create_mask, icon_rect); - } - -+static GdkPixbuf * -+get_knob_pixbuf (void) -+{ -+ GdkPixbuf *knob_pixbuf; -+ char *knob_filename; -+ -+ knob_pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), -+ "stock-nautilus-knob", -+ 8, 0, NULL); -+ if (!knob_pixbuf) { -+ knob_filename = nautilus_pixmap_file ("knob.png"); -+ knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL); -+ g_free (knob_filename); -+ } -+ -+ return knob_pixbuf; -+} -+ - static void - draw_stretch_handles (NautilusIconCanvasItem *item, GdkDrawable *drawable, - const ArtIRect *rect) - { -+ GtkWidget *widget; - GdkGC *gc; -- char *knob_filename; - GdkPixbuf *knob_pixbuf; - GdkBitmap *stipple; - int knob_width, knob_height; -@@ -1166,17 +1186,27 @@ - return; - } - -+ widget = GTK_WIDGET (EEL_CANVAS_ITEM (item)->canvas); -+ - gc = gdk_gc_new (drawable); - -- knob_filename = nautilus_pixmap_file ("knob.png"); -- knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL); -+ knob_pixbuf = get_knob_pixbuf (); - knob_width = gdk_pixbuf_get_width (knob_pixbuf); - knob_height = gdk_pixbuf_get_height (knob_pixbuf); - - stipple = eel_stipple_bitmap_for_screen ( - gdk_drawable_get_screen (GDK_DRAWABLE (drawable))); - -- /* first draw the box */ -+ /* first draw the box */ -+ gdk_gc_set_rgb_fg_color (gc, &widget->style->white); -+ gdk_draw_rectangle -+ (drawable, gc, FALSE, -+ rect->x0, -+ rect->y0, -+ rect->x1 - rect->x0 - 1, -+ rect->y1 - rect->y0 - 1); -+ -+ gdk_gc_set_rgb_fg_color (gc, &widget->style->black); - gdk_gc_set_stipple (gc, stipple); - gdk_gc_set_fill (gc, GDK_STIPPLED); - gdk_draw_rectangle -@@ -1192,8 +1222,6 @@ - draw_pixbuf (knob_pixbuf, drawable, rect->x0, rect->y1 - knob_height); - draw_pixbuf (knob_pixbuf, drawable, rect->x1 - knob_width, rect->y0); - draw_pixbuf (knob_pixbuf, drawable, rect->x1 - knob_width, rect->y1 - knob_height); -- -- g_free (knob_filename); - g_object_unref (knob_pixbuf); - - g_object_unref (gc); -@@ -1828,7 +1856,7 @@ - } - - /* Check for hits in the stretch handles. */ -- if (hit_test_stretch_handle (icon_item, canvas_rect)) { -+ if (hit_test_stretch_handle (icon_item, canvas_rect, NULL)) { - return TRUE; - } - -@@ -2055,12 +2083,13 @@ - /* Check if one of the stretch handles was hit. */ - static gboolean - hit_test_stretch_handle (NautilusIconCanvasItem *item, -- ArtIRect probe_canvas_rect) -+ ArtIRect probe_canvas_rect, -+ GtkCornerType *corner) - { - ArtIRect icon_rect; -- char *knob_filename; - GdkPixbuf *knob_pixbuf; - int knob_width, knob_height; -+ int hit_corner; - - g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), FALSE); - -@@ -2075,24 +2104,36 @@ - return FALSE; - } - -- knob_filename = nautilus_pixmap_file ("knob.png"); -- knob_pixbuf = gdk_pixbuf_new_from_file (knob_filename, NULL); -+ -+ knob_pixbuf = get_knob_pixbuf (); - knob_width = gdk_pixbuf_get_width (knob_pixbuf); - knob_height = gdk_pixbuf_get_height (knob_pixbuf); -+ g_object_unref (knob_pixbuf); - -- g_free (knob_filename); -- g_object_unref (knob_pixbuf); -- - /* Check for hits in the stretch handles. */ -- return (probe_canvas_rect.x0 < icon_rect.x0 + knob_width -- || probe_canvas_rect.x1 >= icon_rect.x1 - knob_width) -- && (probe_canvas_rect.y0 < icon_rect.y0 + knob_height -- || probe_canvas_rect.y1 >= icon_rect.y1 - knob_height); -+ hit_corner = -1; -+ if (probe_canvas_rect.x0 < icon_rect.x0 + knob_width) { -+ if (probe_canvas_rect.y0 < icon_rect.y0 + knob_height) -+ hit_corner = GTK_CORNER_TOP_LEFT; -+ else if (probe_canvas_rect.y1 >= icon_rect.y1 - knob_height) -+ hit_corner = GTK_CORNER_BOTTOM_LEFT; -+ } -+ else if (probe_canvas_rect.x1 >= icon_rect.x1 - knob_width) { -+ if (probe_canvas_rect.y0 < icon_rect.y0 + knob_height) -+ hit_corner = GTK_CORNER_TOP_RIGHT; -+ else if (probe_canvas_rect.y1 >= icon_rect.y1 - knob_height) -+ hit_corner = GTK_CORNER_BOTTOM_RIGHT; -+ } -+ if (corner) -+ *corner = hit_corner; -+ -+ return hit_corner != -1; - } - - gboolean - nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item, -- ArtPoint world_point) -+ ArtPoint world_point, -+ GtkCornerType *corner) - { - ArtIRect canvas_rect; - -@@ -2105,7 +2146,7 @@ - &canvas_rect.y0); - canvas_rect.x1 = canvas_rect.x0 + 1; - canvas_rect.y1 = canvas_rect.y0 + 1; -- return hit_test_stretch_handle (item, canvas_rect); -+ return hit_test_stretch_handle (item, canvas_rect, corner); - } - - /* nautilus_icon_canvas_item_hit_test_rectangle diff --git a/nautilus-2.13-format.patch b/nautilus-2.13-format.patch deleted file mode 100644 index 1392003..0000000 --- a/nautilus-2.13-format.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- nautilus-2.13.92/src/file-manager/fm-directory-view.c.format 2006-03-06 10:19:21.000000000 -0500 -+++ nautilus-2.13.92/src/file-manager/fm-directory-view.c 2006-03-06 10:24:40.000000000 -0500 -@@ -6269,6 +6269,8 @@ - GList *selection, *l; - GnomeVFSDrive *drive; - FMDirectoryView *view; -+ char *device_path; -+ char *cmdline; - - view = FM_DIRECTORY_VIEW (data); - -@@ -6278,9 +6280,18 @@ - - if (nautilus_file_has_drive (file)) { - drive = nautilus_file_get_drive (file); -+ device_path = gnome_vfs_drive_get_device_path (drive); -+ - if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) { -- g_spawn_command_line_async ("gfloppy", NULL); -+ cmdline = g_strconcat ("gfloppy ", device_path, NULL); -+ - } -+ else { -+ cmdline = g_strconcat ("userformat ", device_path, NULL); -+ } -+ g_spawn_command_line_async (cmdline, NULL); -+ g_free (cmdline); -+ g_free (device_path); - } - } - nautilus_file_list_free (selection); -@@ -7021,16 +7032,18 @@ - } else if (nautilus_file_has_drive (file)) { - drive = nautilus_file_get_drive (file); - *show_eject = eject_for_type (gnome_vfs_drive_get_device_type (drive)); -+ if ((gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY && -+ g_find_program_in_path ("gfloppy")) || -+ g_find_program_in_path ("userformat")) { -+ *show_format = TRUE; -+ } -+ - if (gnome_vfs_drive_is_mounted (drive)) { - *show_unmount = TRUE; -+ *show_format = FALSE; - } else { - *show_mount = TRUE; - } -- -- if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY && -- g_find_program_in_path ("gfloppy")) { -- *show_format = TRUE; -- } - } else if (nautilus_file_is_nautilus_link (file)) { - uri = nautilus_file_get_activation_uri (file); - if (uri != NULL && diff --git a/nautilus-2.14.1-about.patch b/nautilus-2.14.1-about.patch deleted file mode 100644 index 064213c..0000000 --- a/nautilus-2.14.1-about.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- nautilus-2.14.1/src/nautilus-window-menus.c.about 2006-05-12 00:16:23.000000000 -0400 -+++ nautilus-2.14.1/src/nautilus-window-menus.c 2006-05-12 00:17:54.000000000 -0400 -@@ -482,6 +482,9 @@ - - gtk_window_set_transient_for (GTK_WINDOW (about), GTK_WINDOW (user_data)); - -+ g_signal_connect (G_OBJECT (about), "response", -+ G_CALLBACK (gtk_widget_destroy), NULL); -+ - eel_add_weak_pointer (&about); - } - diff --git a/nautilus-2.15.2-format.patch b/nautilus-2.15.2-format.patch deleted file mode 100644 index ec023bf..0000000 --- a/nautilus-2.15.2-format.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- nautilus-2.15.2/src/file-manager/fm-directory-view.c.format 2006-06-13 10:35:04.000000000 -0400 -+++ nautilus-2.15.2/src/file-manager/fm-directory-view.c 2006-06-13 10:49:07.000000000 -0400 -@@ -6315,6 +6315,8 @@ - GList *selection, *l; - GnomeVFSDrive *drive; - FMDirectoryView *view; -+ char *device_path; -+ char *cmdline; - - view = FM_DIRECTORY_VIEW (data); - -@@ -6324,9 +6326,18 @@ - - if (nautilus_file_has_drive (file)) { - drive = nautilus_file_get_drive (file); -+ device_path = gnome_vfs_drive_get_device_path (drive); -+ - if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY) { -- g_spawn_command_line_async ("gfloppy", NULL); -+ cmdline = g_strconcat ("gfloppy ", device_path, NULL); -+ - } -+ else { -+ cmdline = g_strconcat ("userformat ", device_path, NULL); -+ } -+ g_spawn_command_line_async (cmdline, NULL); -+ g_free (cmdline); -+ g_free (device_path); - } - } - nautilus_file_list_free (selection); -@@ -7188,17 +7199,18 @@ - } else if (nautilus_file_has_drive (file)) { - drive = nautilus_file_get_drive (file); - *show_eject = eject_for_type (gnome_vfs_drive_get_device_type (drive)); -+ if ((gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY && -+ g_find_program_in_path ("gfloppy")) || -+ g_find_program_in_path ("userformat")) { -+ *show_format = TRUE; -+ } - if (gnome_vfs_drive_is_mounted (drive)) { - *show_unmount = TRUE; -+ *show_format = FALSE; - } else { - *show_mount = TRUE; - } - -- if (gnome_vfs_drive_get_device_type (drive) == GNOME_VFS_DEVICE_TYPE_FLOPPY && -- !gnome_vfs_drive_is_mounted (drive) && -- g_find_program_in_path ("gfloppy")) { -- *show_format = TRUE; -- } - } else if (nautilus_file_is_nautilus_link (file)) { - uri = nautilus_file_get_activation_uri (file); - if (uri != NULL && diff --git a/nautilus-2.15.90-background.patch b/nautilus-2.15.90-background.patch deleted file mode 100644 index faec188..0000000 --- a/nautilus-2.15.90-background.patch +++ /dev/null @@ -1,77 +0,0 @@ ---- nautilus-2.15.90/libnautilus-private/nautilus-directory-background.c.background 2006-08-04 14:58:29.000000000 -0400 -+++ nautilus-2.15.90/libnautilus-private/nautilus-directory-background.c 2006-08-04 14:59:03.000000000 -0400 -@@ -442,14 +442,13 @@ - g_free (image); - } - --static gboolean -+static void - initialize_background_from_settings (NautilusFile *file, - EelBackground *background) - { - char *color, *old_color; - char *image, *old_image; - EelBackgroundImagePlacement placement, old_placement; -- gboolean changed; - - g_assert (NAUTILUS_IS_FILE (file)); - g_assert (EEL_IS_BACKGROUND (background)); -@@ -482,33 +481,14 @@ - G_CALLBACK (background_changed_callback), - file); - -- -- changed = FALSE; -- -- old_color = eel_background_get_color (background); -- if (eel_strcmp (color, old_color) != 0) { -- eel_background_set_color (background, color); -- changed = TRUE; -+ eel_background_set_color (background, color); -+ if (eel_background_is_desktop(background)) { -+ eel_background_set_image_uri_sync (background, image); - } -- g_free (old_color); -- -- old_image = eel_background_get_image_uri (background); -- if (eel_strcmp (image, old_image) != 0) { -- if (eel_background_is_desktop(background)) { -- eel_background_set_image_uri_sync (background, image); -- } -- else { -- eel_background_set_image_uri (background, image); -- } -- changed = TRUE; -- } -- g_free (old_image); -- -- old_placement = eel_background_get_image_placement (background); -- if (old_placement != placement) { -- eel_background_set_image_placement (background, placement); -- changed = TRUE; -+ else { -+ eel_background_set_image_uri (background, image); - } -+ eel_background_set_image_placement (background, placement); - - /* Unblock the handler. */ - g_signal_handlers_unblock_by_func -@@ -518,8 +498,6 @@ - - g_free (color); - g_free (image); -- -- return changed; - } - - /* handle the file changed signal */ -@@ -527,8 +505,7 @@ - saved_settings_changed_callback (NautilusFile *file, - EelBackground *background) - { -- gboolean changed; -- changed = initialize_background_from_settings (file, background); -+ initialize_background_from_settings (file, background); - } - - /* handle the theme changing */ diff --git a/nautilus-2.16.0-model-crash.patch b/nautilus-2.16.0-model-crash.patch deleted file mode 100644 index bf95c3e..0000000 --- a/nautilus-2.16.0-model-crash.patch +++ /dev/null @@ -1,196 +0,0 @@ -Index: src/nautilus-places-sidebar.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-places-sidebar.c,v -retrieving revision 1.24 -retrieving revision 1.25 -diff -u -p -r1.24 -r1.25 ---- src/nautilus-places-sidebar.c 24 Jul 2006 22:45:37 -0000 1.24 -+++ src/nautilus-places-sidebar.c 13 Sep 2006 20:09:19 -0000 1.25 -@@ -128,12 +128,12 @@ enum { - }; - - /* Target types for dragging from the shortcuts list */ --static const GtkTargetEntry shortcuts_source_targets[] = { -+static const GtkTargetEntry nautilus_shortcuts_source_targets[] = { - { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW } - }; - - /* Target types for dropping into the shortcuts list */ --static const GtkTargetEntry shortcuts_drop_targets [] = { -+static const GtkTargetEntry nautilus_shortcuts_drop_targets [] = { - { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, GTK_TREE_MODEL_ROW }, - { "text/uri-list", 0, TEXT_URI_LIST } - }; -@@ -143,27 +143,27 @@ typedef struct { - GtkTreeModelFilter parent; - - NautilusPlacesSidebar *sidebar; --} ShortcutsModelFilter; -+} NautilusShortcutsModelFilter; - - typedef struct { - GtkTreeModelFilterClass parent_class; --} ShortcutsModelFilterClass; -+} NautilusShortcutsModelFilterClass; - --#define SHORTCUTS_MODEL_FILTER_TYPE (_shortcuts_model_filter_get_type ()) --#define SHORTCUTS_MODEL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHORTCUTS_MODEL_FILTER_TYPE, ShortcutsModelFilter)) -+#define NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE (_nautilus_shortcuts_model_filter_get_type ()) -+#define NAUTILUS_SHORTCUTS_MODEL_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE, NautilusShortcutsModelFilter)) - --GType _shortcuts_model_filter_get_type (void); --static void shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface); -+GType _nautilus_shortcuts_model_filter_get_type (void); -+static void nautilus_shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface); - --G_DEFINE_TYPE_WITH_CODE (ShortcutsModelFilter, -- _shortcuts_model_filter, -+G_DEFINE_TYPE_WITH_CODE (NautilusShortcutsModelFilter, -+ _nautilus_shortcuts_model_filter, - GTK_TYPE_TREE_MODEL_FILTER, - G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_DRAG_SOURCE, -- shortcuts_model_filter_drag_source_iface_init)); -+ nautilus_shortcuts_model_filter_drag_source_iface_init)); - --static GtkTreeModel *shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, -- GtkTreeModel *child_model, -- GtkTreePath *root); -+static GtkTreeModel *nautilus_shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, -+ GtkTreeModel *child_model, -+ GtkTreePath *root); - - G_DEFINE_TYPE_WITH_CODE (NautilusPlacesSidebar, nautilus_places_sidebar, GTK_TYPE_SCROLLED_WINDOW, - G_IMPLEMENT_INTERFACE (NAUTILUS_TYPE_SIDEBAR, -@@ -383,9 +383,9 @@ update_places_cb (gpointer data) - } - - static gboolean --shortcuts_row_separator_func (GtkTreeModel *model, -- GtkTreeIter *iter, -- gpointer data) -+nautilus_shortcuts_row_separator_func (GtkTreeModel *model, -+ GtkTreeIter *iter, -+ gpointer data) - { - PlaceType type; - -@@ -1512,7 +1512,7 @@ nautilus_places_sidebar_init (NautilusPl - G_CALLBACK (bookmarks_editing_canceled), sidebar); - - gtk_tree_view_set_row_separator_func (tree_view, -- shortcuts_row_separator_func, -+ nautilus_shortcuts_row_separator_func, - NULL, - NULL); - -@@ -1528,9 +1528,9 @@ nautilus_places_sidebar_init (NautilusPl - GDK_TYPE_PIXBUF, - G_TYPE_INT - ); -- sidebar->filter_model = shortcuts_model_filter_new (sidebar, -- GTK_TREE_MODEL (sidebar->store), -- NULL); -+ sidebar->filter_model = nautilus_shortcuts_model_filter_new (sidebar, -+ GTK_TREE_MODEL (sidebar->store), -+ NULL); - - gtk_tree_view_set_model (tree_view, sidebar->filter_model); - gtk_container_add (GTK_CONTAINER (sidebar), GTK_WIDGET (tree_view)); -@@ -1549,12 +1549,12 @@ nautilus_places_sidebar_init (NautilusPl - - gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tree_view), - GDK_BUTTON1_MASK, -- shortcuts_source_targets, -- G_N_ELEMENTS (shortcuts_source_targets), -+ nautilus_shortcuts_source_targets, -+ G_N_ELEMENTS (nautilus_shortcuts_source_targets), - GDK_ACTION_MOVE); - gtk_drag_dest_set (GTK_WIDGET (tree_view), - 0, -- shortcuts_drop_targets, G_N_ELEMENTS (shortcuts_drop_targets), -+ nautilus_shortcuts_drop_targets, G_N_ELEMENTS (nautilus_shortcuts_drop_targets), - GDK_ACTION_MOVE | GDK_ACTION_COPY | GDK_ACTION_LINK); - - g_signal_connect (tree_view, "key-press-event", -@@ -1731,27 +1731,27 @@ nautilus_places_sidebar_register (void) - /* Drag and drop interfaces */ - - static void --_shortcuts_model_filter_class_init (ShortcutsModelFilterClass *class) -+_nautilus_shortcuts_model_filter_class_init (NautilusShortcutsModelFilterClass *class) - { - } - - static void --_shortcuts_model_filter_init (ShortcutsModelFilter *model) -+_nautilus_shortcuts_model_filter_init (NautilusShortcutsModelFilter *model) - { - model->sidebar = NULL; - } - - /* GtkTreeDragSource::row_draggable implementation for the shortcuts filter model */ - static gboolean --shortcuts_model_filter_row_draggable (GtkTreeDragSource *drag_source, -- GtkTreePath *path) -+nautilus_shortcuts_model_filter_row_draggable (GtkTreeDragSource *drag_source, -+ GtkTreePath *path) - { -- ShortcutsModelFilter *model; -+ NautilusShortcutsModelFilter *model; - int pos; - int bookmarks_pos; - int num_bookmarks; - -- model = SHORTCUTS_MODEL_FILTER (drag_source); -+ model = NAUTILUS_SHORTCUTS_MODEL_FILTER (drag_source); - - pos = *gtk_tree_path_get_indices (path); - bookmarks_pos = get_bookmark_index (model->sidebar->tree_view); -@@ -1762,13 +1762,13 @@ shortcuts_model_filter_row_draggable (Gt - - /* GtkTreeDragSource::drag_data_get implementation for the shortcuts filter model */ - static gboolean --shortcuts_model_filter_drag_data_get (GtkTreeDragSource *drag_source, -- GtkTreePath *path, -- GtkSelectionData *selection_data) -+nautilus_shortcuts_model_filter_drag_data_get (GtkTreeDragSource *drag_source, -+ GtkTreePath *path, -+ GtkSelectionData *selection_data) - { -- ShortcutsModelFilter *model; -+ NautilusShortcutsModelFilter *model; - -- model = SHORTCUTS_MODEL_FILTER (drag_source); -+ model = NAUTILUS_SHORTCUTS_MODEL_FILTER (drag_source); - - /* FIXME */ - -@@ -1777,20 +1777,20 @@ shortcuts_model_filter_drag_data_get (Gt - - /* Fill the GtkTreeDragSourceIface vtable */ - static void --shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface) -+nautilus_shortcuts_model_filter_drag_source_iface_init (GtkTreeDragSourceIface *iface) - { -- iface->row_draggable = shortcuts_model_filter_row_draggable; -- iface->drag_data_get = shortcuts_model_filter_drag_data_get; -+ iface->row_draggable = nautilus_shortcuts_model_filter_row_draggable; -+ iface->drag_data_get = nautilus_shortcuts_model_filter_drag_data_get; - } - - static GtkTreeModel * --shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, -- GtkTreeModel *child_model, -- GtkTreePath *root) -+nautilus_shortcuts_model_filter_new (NautilusPlacesSidebar *sidebar, -+ GtkTreeModel *child_model, -+ GtkTreePath *root) - { -- ShortcutsModelFilter *model; -+ NautilusShortcutsModelFilter *model; - -- model = g_object_new (SHORTCUTS_MODEL_FILTER_TYPE, -+ model = g_object_new (NAUTILUS_SHORTCUTS_MODEL_FILTER_TYPE, - "child-model", child_model, - "virtual-root", root, - NULL); diff --git a/nautilus-2.16.0-selinux.patch b/nautilus-2.16.0-selinux.patch deleted file mode 100644 index 3f46426..0000000 --- a/nautilus-2.16.0-selinux.patch +++ /dev/null @@ -1,1710 +0,0 @@ -Index: libnautilus-private/nautilus-file-operations.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v -retrieving revision 1.214 -diff -u -p -r1.214 nautilus-file-operations.c ---- libnautilus-private/nautilus-file-operations.c 23 Aug 2006 09:07:15 -0000 1.214 -+++ libnautilus-private/nautilus-file-operations.c 19 Sep 2006 15:23:27 -0000 -@@ -62,6 +62,10 @@ - #include "nautilus-trash-monitor.h" - #include "nautilus-file-utilities.h" - -+#ifdef HAVE_SELINUX -+#include -+#endif -+ - typedef enum TransferKind TransferKind; - typedef struct TransferInfo TransferInfo; - typedef struct IconPositionIterator IconPositionIterator; -@@ -2908,6 +2912,7 @@ struct RecursivePermissionsInfo { - GnomeVFSFilePermissions file_mask; - GnomeVFSFilePermissions dir_permissions; - GnomeVFSFilePermissions dir_mask; -+ char *context; - NautilusSetPermissionsCallback callback; - gpointer callback_data; - }; -@@ -2935,6 +2940,8 @@ set_permissions_set_file_info (GnomeVFSA - GnomeVFSURI *uri; - char *uri_str; - struct FileInfo *file_info; -+ int flags; -+ int options; - - info = callback_data; - -@@ -2965,10 +2972,18 @@ set_permissions_set_file_info (GnomeVFSA - vfs_info->permissions = - (file_info->permissions & ~info->file_mask) | - info->file_permissions; -+ flags = GNOME_VFS_SET_FILE_INFO_PERMISSIONS; -+ options = GNOME_VFS_FILE_INFO_DEFAULT; -+ if (info->context) { -+ flags |= GNOME_VFS_SET_FILE_INFO_SELINUX_CONTEXT; -+ vfs_info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_SELINUX_CONTEXT; -+ options |= GNOME_VFS_FILE_INFO_GET_SELINUX_CONTEXT; -+ g_free (vfs_info->selinux_context); -+ vfs_info->selinux_context = g_strdup (info->context); -+ } - - gnome_vfs_async_set_file_info (&info->handle, uri, vfs_info, -- GNOME_VFS_SET_FILE_INFO_PERMISSIONS, -- GNOME_VFS_FILE_INFO_DEFAULT, -+ flags, options, - GNOME_VFS_PRIORITY_DEFAULT, - set_permissions_set_file_info, - info); -@@ -2976,7 +2991,6 @@ set_permissions_set_file_info (GnomeVFSA - gnome_vfs_file_info_unref (vfs_info); - g_free (file_info->name); - g_free (file_info); -- - } - - static void -@@ -3021,13 +3035,11 @@ set_permissions_got_files (GnomeVFSAsync - } - } - -- - if (result != GNOME_VFS_OK) { - /* Finished with this dir, work on the files */ - info->current_file = NULL; - set_permissions_set_file_info (NULL, GNOME_VFS_OK, NULL, info); - } -- - } - - /* Also called for the toplevel dir */ -@@ -3039,7 +3051,8 @@ set_permissions_load_dir (GnomeVFSAsyncH - { - struct RecursivePermissionsInfo *info; - char *uri_str; -- -+ int options; -+ - info = callback_data; - - if (result == GNOME_VFS_OK && handle != NULL) { -@@ -3048,9 +3061,13 @@ set_permissions_load_dir (GnomeVFSAsyncH - g_free (uri_str); - } - -+ options = GNOME_VFS_FILE_INFO_DEFAULT; -+ if (info->context) { -+ options |= GNOME_VFS_FILE_INFO_GET_SELINUX_CONTEXT; -+ } - gnome_vfs_async_load_directory_uri (&info->handle, - info->current_dir, -- GNOME_VFS_FILE_INFO_DEFAULT, -+ options, - 50, - GNOME_VFS_PRIORITY_DEFAULT, - set_permissions_got_files, -@@ -3062,6 +3079,8 @@ set_permissions_run (struct RecursivePer - { - struct DirInfo *dir_info; - GnomeVFSFileInfo *vfs_info; -+ int flags; -+ int options; - - gnome_vfs_uri_unref (info->current_dir); - -@@ -3069,6 +3088,7 @@ set_permissions_run (struct RecursivePer - /* No more directories, finished! */ - info->callback (info->callback_data); - /* All parts of info should be freed now */ -+ g_free (info->context); - g_free (info); - return; - } -@@ -3083,12 +3103,18 @@ set_permissions_run (struct RecursivePer - vfs_info->permissions = - (dir_info->permissions & ~info->dir_mask) | - info->dir_permissions; -- -- gnome_vfs_async_set_file_info (&info->handle, -- info->current_dir, -- vfs_info, -- GNOME_VFS_SET_FILE_INFO_PERMISSIONS, -- GNOME_VFS_FILE_INFO_DEFAULT, -+ flags = GNOME_VFS_SET_FILE_INFO_PERMISSIONS; -+ options = GNOME_VFS_FILE_INFO_DEFAULT; -+ if (info->context) { -+ flags |= GNOME_VFS_SET_FILE_INFO_SELINUX_CONTEXT; -+ vfs_info->valid_fields |= GNOME_VFS_FILE_INFO_FIELDS_SELINUX_CONTEXT; -+ options |= GNOME_VFS_FILE_INFO_GET_SELINUX_CONTEXT; -+ g_free (vfs_info->selinux_context); -+ vfs_info->selinux_context = g_strdup (info->context); -+ } -+ -+ gnome_vfs_async_set_file_info (&info->handle, info->current_dir, -+ vfs_info, flags, options, - GNOME_VFS_PRIORITY_DEFAULT, - set_permissions_load_dir, - info); -@@ -3103,6 +3129,7 @@ nautilus_file_set_permissions_recursive - GnomeVFSFilePermissions file_mask, - GnomeVFSFilePermissions dir_permissions, - GnomeVFSFilePermissions dir_mask, -+ const char *context, - NautilusSetPermissionsCallback callback, - gpointer callback_data) - { -@@ -3116,6 +3143,22 @@ nautilus_file_set_permissions_recursive - info->file_mask = file_mask; - info->dir_permissions = dir_permissions; - info->dir_mask = dir_mask; -+ if (context) { -+ char *rcontext; -+ -+ rcontext = info->context = NULL; -+#ifdef HAVE_SELINUX -+ /* this is really const, but prototype is wrong, *sigh* */ -+ if (selinux_trans_to_raw_context((char *)context, &rcontext)) { -+ g_error ("selinux_trans_to_raw_context: failed to allocate bytes"); -+ return; -+ } -+ info->context = g_strdup (rcontext); -+ freecon (rcontext); -+#endif -+ } else { -+ info->context = NULL; -+ } - info->callback = callback; - info->callback_data = callback_data; - -@@ -3123,6 +3166,8 @@ nautilus_file_set_permissions_recursive - - if (info->current_dir == NULL) { - info->callback (info->callback_data); -+ /* All parts of info should be freed now */ -+ g_free (info->context); - g_free (info); - return; - } -Index: libnautilus-private/nautilus-file-operations.h -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.h,v -retrieving revision 1.23 -diff -u -p -r1.23 nautilus-file-operations.h ---- libnautilus-private/nautilus-file-operations.h 16 Jun 2006 14:19:55 -0000 1.23 -+++ libnautilus-private/nautilus-file-operations.h 19 Sep 2006 15:23:27 -0000 -@@ -76,6 +76,7 @@ void nautilus_file_set_permissions_recur - GnomeVFSFilePermissions file_mask, - GnomeVFSFilePermissions folder_permissions, - GnomeVFSFilePermissions folder_mask, -+ const char *context, - NautilusSetPermissionsCallback callback, - gpointer callback_data); - -Index: libnautilus-private/nautilus-file.c -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v -retrieving revision 1.390 -diff -u -p -r1.390 nautilus-file.c ---- libnautilus-private/nautilus-file.c 25 Jul 2006 14:18:03 -0000 1.390 -+++ libnautilus-private/nautilus-file.c 19 Sep 2006 15:23:27 -0000 -@@ -3567,7 +3567,7 @@ nautilus_file_can_get_selinux_context (N - * context - * @file: NautilusFile representing the file in question. - * -- * Returns: Newly allocated string ready to display to the user. -+ * Returns: Newly allocated string ready to display to the user, or NULL. - * - **/ - char * -@@ -3600,6 +3600,133 @@ nautilus_file_get_selinux_context (Nauti - return translated; - } - -+/** -+ * nautilus_file_get_selinux_matchpathcon: -+ * -+ * Get a user-displayable string representing a file's default selinux -+ * context (as from matchpathcon). Only works on local files. -+ * @file: NautilusFile representing the file in question. -+ * -+ * Returns: Newly allocated string ready to display to the user, or NULL. -+ * -+ **/ -+char * -+nautilus_file_get_selinux_matchpathcon (NautilusFile *file) -+{ -+ char *translated; -+ char *raw; -+ char *uri; -+ char *fname; -+ -+ g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL); -+ -+ translated = NULL; -+#ifdef HAVE_SELINUX -+ uri = nautilus_file_get_uri (file); -+ fname = gnome_vfs_get_local_path_from_uri (uri); -+ -+ if (!fname) { -+ return NULL; -+ } -+ -+ raw = NULL; -+ if (matchpathcon (fname, file->details->info->permissions, &raw) == 0) { -+ if (selinux_raw_to_trans_context (raw, &translated) == 0) { -+ char *tmp; -+ tmp = g_strdup (translated); -+ freecon (translated); -+ translated = tmp; -+ } -+ freecon (raw); -+ } -+ -+ g_free (fname); -+ g_free (uri); -+#endif -+ -+ return translated; -+} -+ -+static void -+set_selinux_context_callback (GnomeVFSAsyncHandle *handle, -+ GnomeVFSResult result, -+ GnomeVFSFileInfo *new_info, -+ gpointer callback_data) -+{ -+ set_permissions_callback (handle, result, new_info, callback_data); -+} -+ -+void -+nautilus_file_set_selinux_context (NautilusFile *file, -+ const char *selinux_context, -+ NautilusFileOperationCallback callback, -+ gpointer callback_data) -+{ -+ Operation *op; -+ GnomeVFSURI *vfs_uri; -+ GnomeVFSFileInfo *partial_file_info; -+ GnomeVFSFileInfoOptions options; -+ char *rcontext; -+ -+ rcontext = NULL; -+ -+ /* this is probably mostly right... */ -+ if (!nautilus_file_can_set_permissions (file)) { -+ /* Claim that something changed even if the permission change failed. -+ * This makes it easier for some clients who see the "reverting" -+ * to the old permissions as "changing back". -+ */ -+ nautilus_file_changed (file); -+ (* callback) (file, GNOME_VFS_ERROR_ACCESS_DENIED, callback_data); -+ return; -+ } -+ -+ /* Test the permissions-haven't-changed case explicitly -+ * because we don't want to send the file-changed signal if -+ * nothing changed. -+ */ -+ if (!strcmp(selinux_context, file->details->info->selinux_context)) { -+ (* callback) (file, GNOME_VFS_OK, callback_data); -+ return; -+ } -+ -+#ifdef HAVE_SELINUX -+ /* this is really const, but prototype is wrong, *sigh* */ -+ if (selinux_trans_to_raw_context((char *)selinux_context, &rcontext)) { -+ (* callback) (file, GNOME_VFS_ERROR_NO_MEMORY, callback_data); -+ return; -+ } -+ selinux_context = rcontext; -+#endif -+ -+ /* Set up a context change operation. */ -+ op = operation_new (file, callback, callback_data); -+ op->use_slow_mime = file->details->got_slow_mime_type; -+ -+ options = NAUTILUS_FILE_DEFAULT_FILE_INFO_OPTIONS; -+ if (op->use_slow_mime) { -+ options |= GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE; -+ } -+ /* Change the file-on-disk context. */ -+ partial_file_info = gnome_vfs_file_info_new (); -+ g_free (partial_file_info->selinux_context); -+ partial_file_info->selinux_context = g_strdup (selinux_context); -+ vfs_uri = nautilus_file_get_gnome_vfs_uri (file); -+ gnome_vfs_async_set_file_info (&op->handle, -+ vfs_uri, partial_file_info, -+ GNOME_VFS_SET_FILE_INFO_SELINUX_CONTEXT, -+ options, -+ GNOME_VFS_PRIORITY_DEFAULT, -+ set_selinux_context_callback, op); -+ gnome_vfs_file_info_unref (partial_file_info); -+ gnome_vfs_uri_unref (vfs_uri); -+ -+#ifdef HAVE_SELINUX -+ freecon (rcontext); -+#endif -+} -+ -+ - static char * - get_real_name (const char *name, const char *gecos) - { -@@ -3802,7 +3929,7 @@ set_owner_and_group_callback (GnomeVFSAs - GnomeVFSResult result, - GnomeVFSFileInfo *new_info, - gpointer callback_data) --{ -+{ /* FIXME: this is identical to set_permissions_callback */ - Operation *op; - - op = callback_data; -Index: libnautilus-private/nautilus-file.h -=================================================================== -RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.h,v -retrieving revision 1.113 -diff -u -p -r1.113 nautilus-file.h ---- libnautilus-private/nautilus-file.h 16 Jun 2006 15:02:57 -0000 1.113 -+++ libnautilus-private/nautilus-file.h 19 Sep 2006 15:23:27 -0000 -@@ -200,6 +200,7 @@ GList * nautilus_get_all - GList * nautilus_file_get_settable_group_names (NautilusFile *file); - gboolean nautilus_file_can_get_selinux_context (NautilusFile *file); - char * nautilus_file_get_selinux_context (NautilusFile *file); -+char * nautilus_file_get_selinux_matchpathcon (NautilusFile *file); - - /* "Capabilities". */ - gboolean nautilus_file_can_read (NautilusFile *file); -@@ -226,6 +227,10 @@ void nautilus_file_se - GnomeVFSFilePermissions permissions, - NautilusFileOperationCallback callback, - gpointer callback_data); -+void nautilus_file_set_selinux_context (NautilusFile *file, -+ const char *selinux_context, -+ NautilusFileOperationCallback callback, -+ gpointer callback_data); - void nautilus_file_rename (NautilusFile *file, - const char *new_name, - NautilusFileOperationCallback callback, -Index: src/file-manager/fm-error-reporting.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-error-reporting.c,v -retrieving revision 1.43 -diff -u -p -r1.43 fm-error-reporting.c ---- src/file-manager/fm-error-reporting.c 18 Mar 2006 07:27:37 -0000 1.43 -+++ src/file-manager/fm-error-reporting.c 19 Sep 2006 15:23:27 -0000 -@@ -251,6 +251,38 @@ fm_report_error_setting_permissions (Nau - g_free (message); - } - -+void -+fm_report_error_setting_selinux (NautilusFile *file, -+ GnomeVFSResult error, -+ GtkWindow *parent_window) -+{ -+ char *file_name; -+ char *message; -+ -+ if (error == GNOME_VFS_OK) { -+ return; -+ } -+ -+ file_name = nautilus_file_get_display_name (file); -+ -+ switch (error) { -+ case GNOME_VFS_ERROR_READ_ONLY_FILE_SYSTEM: -+ message = g_strdup_printf (_("Couldn't change the SELinux security context of \"%s\" because it is on a read-only disk"), -+ file_name); -+ break; -+ default: -+ /* We should invent decent error messages for every case we actually experience. */ -+ g_warning ("Hit unhandled case %d (%s) in fm_report_error_setting_permissions", -+ error, gnome_vfs_result_to_string (error)); -+ message = g_strdup_printf (_("Sorry, couldn't change the permissions of \"%s\"."), file_name); -+ } -+ -+ eel_show_error_dialog (_("The SELinux security context could not be changed."), message, parent_window); -+ -+ g_free (file_name); -+ g_free (message); -+} -+ - typedef struct _FMRenameData { - char *name; - NautilusFileOperationCallback callback; -Index: src/file-manager/fm-error-reporting.h -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-error-reporting.h,v -retrieving revision 1.12 -diff -u -p -r1.12 fm-error-reporting.h ---- src/file-manager/fm-error-reporting.h 21 Feb 2006 15:10:43 -0000 1.12 -+++ src/file-manager/fm-error-reporting.h 19 Sep 2006 15:23:27 -0000 -@@ -39,7 +39,10 @@ void fm_report_error_renaming_file - GnomeVFSResult error_code, - GtkWindow *parent_window); - void fm_report_error_setting_permissions (NautilusFile *file, -- GnomeVFSResult error_code, -+ GnomeVFSResult error_code, -+ GtkWindow *parent_window); -+void fm_report_error_setting_selinux (NautilusFile *file, -+ GnomeVFSResult error_code, - GtkWindow *parent_window); - void fm_report_error_setting_owner (NautilusFile *file, - GnomeVFSResult error_code, -Index: src/file-manager/fm-properties-window.c -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/fm-properties-window.c,v -retrieving revision 1.235 -diff -u -p -r1.235 fm-properties-window.c ---- src/file-manager/fm-properties-window.c 21 Aug 2006 09:42:22 -0000 1.235 -+++ src/file-manager/fm-properties-window.c 19 Sep 2006 15:23:27 -0000 -@@ -83,6 +83,10 @@ - #include - #include - -+#ifdef HAVE_SELINUX -+# include -+#endif -+ - #define PREVIEW_IMAGE_WIDTH 96 - - #define ROW_PAD 6 -@@ -102,7 +106,7 @@ struct FMPropertiesWindowDetails { - - GtkWidget *icon_button; - GtkWidget *icon_image; -- GtkWidget *icon_chooser; -+ GtkWidget *icon_chooser; - - GtkWidget *name_label; - GtkWidget *name_field; -@@ -124,12 +128,15 @@ struct FMPropertiesWindowDetails { - unsigned int owner_change_timeout; - - GList *permission_buttons; -- GList *permission_combos; -+ GList *permission_combos; /* how is this deallocated???? */ -+ GList *selinux_combo; - GHashTable *initial_permissions; - gboolean has_recursive_apply; - - GList *value_fields; - -+ GList *edit_fields; -+ - GList *mime_list; - - gboolean deep_count_finished; -@@ -208,6 +215,10 @@ static void permission_combo_update - GtkComboBox *combo); - static void value_field_update (FMPropertiesWindow *window, - GtkLabel *field); -+static void edit_field_update (FMPropertiesWindow *window, -+ GtkEntry *field); -+static void popup_field_update (FMPropertiesWindow *window, -+ GtkComboBox *entry); - static void properties_window_update (FMPropertiesWindow *window, - GList *files); - static void is_directory_ready_callback (NautilusFile *file, -@@ -235,10 +246,32 @@ static GtkLabel *attach_ellipsizing_valu - int row, - int column, - const char *initial_text); -+static void attach_selinux_data_edit_field (GtkEntry *entry, -+ char *attr_value, -+ char *def_attr_value); -+static void attach_selinux_data_popup_field (GtkComboBox *comb, -+ char *attr_val, -+ char *def_attr_val); -+ - - G_DEFINE_TYPE (FMPropertiesWindow, fm_properties_window, GTK_TYPE_WINDOW); - #define parent_class fm_properties_window_parent_class - -+static void -+maybe_gtk_entry_set_text (GtkEntry *entry, const char *val) -+{ -+ char *old_val; -+ -+ g_assert (GTK_IS_ENTRY (entry)); -+ -+ old_val = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); -+ -+ if (strcmp (old_val, val) != 0) { -+ gtk_entry_set_text (entry, val); -+ } -+ g_free(old_val); -+} -+ - static gboolean - is_multi_file_window (FMPropertiesWindow *window) - { -@@ -259,6 +292,39 @@ is_multi_file_window (FMPropertiesWindow - return FALSE; - } - -+static gboolean -+multi_have_same_selinux_context (FMPropertiesWindow *window) -+{ -+ GList *l; -+ char *cntx; -+ -+ cntx = NULL; -+ for (l = window->details->original_files; l != NULL; l = l->next) { -+ NautilusFile *file; -+ -+ file = NAUTILUS_FILE (l->data); -+ if (!nautilus_file_is_gone (file)) { -+ char *tmp; -+ -+ tmp = nautilus_file_get_string_attribute_with_default (file, "selinux_context"); -+ if (!cntx) { -+ cntx = tmp; -+ } else if (strcmp (cntx, tmp)) { -+ g_free (tmp); -+ g_free (cntx); -+ return FALSE; -+ } -+ else { -+ g_free (tmp); -+ } -+ } -+ } -+ -+ g_free (cntx); -+ -+ return TRUE; -+} -+ - static int - get_not_gone_original_file_count (FMPropertiesWindow *window) - { -@@ -494,7 +560,7 @@ fm_properties_window_drag_data_received - return; - } - -- uris = g_strsplit (selection_data->data, "\r\n", 0); -+ uris = g_strsplit ((char *) selection_data->data, "\r\n", 0); - exactly_one = uris[0] != NULL && (uris[1] == NULL || uris[1][0] == '\0'); - - -@@ -575,7 +641,7 @@ create_image_widget (FMPropertiesWindow - - static void - set_name_field (FMPropertiesWindow *window, const gchar *original_name, -- const gchar *name) -+ const gchar *name) - { - gboolean new_widget; - gboolean use_label; -@@ -641,11 +707,7 @@ set_name_field (FMPropertiesWindow *wind - * currently showing. This causes minimal ripples (e.g. - * selection change). - */ -- gchar *displayed_name = gtk_editable_get_chars (GTK_EDITABLE (window->details->name_field), 0, -1); -- if (strcmp (displayed_name, name) != 0) { -- gtk_entry_set_text (GTK_ENTRY (window->details->name_field), name); -- } -- g_free (displayed_name); -+ maybe_gtk_entry_set_text (GTK_ENTRY (window->details->name_field), name); - } - } - } -@@ -721,7 +783,6 @@ static void - name_field_restore_original_name (NautilusEntry *name_field) - { - const char *original_name; -- char *displayed_name; - - original_name = (const char *) g_object_get_data (G_OBJECT (name_field), - "original_name"); -@@ -730,14 +791,8 @@ name_field_restore_original_name (Nautil - return; - } - -- displayed_name = gtk_editable_get_chars (GTK_EDITABLE (name_field), 0, -1); -- -- if (strcmp (original_name, displayed_name) != 0) { -- gtk_entry_set_text (GTK_ENTRY (name_field), original_name); -- } -+ maybe_gtk_entry_set_text (GTK_ENTRY (name_field), original_name); - nautilus_entry_select_all (name_field); -- -- g_free (displayed_name); - } - - static void -@@ -850,7 +905,7 @@ file_has_keyword (NautilusFile *file, co - word = g_list_find_custom (keywords, keyword, (GCompareFunc) strcmp); - eel_g_list_free_deep (keywords); - -- return (word != NULL); -+ return word != NULL; - } - - static void -@@ -1117,7 +1172,7 @@ mime_list_equal (GList *a, GList *b) - b = b->next; - } - -- return (a == b); -+ return a == b; - } - - static GList * -@@ -1199,6 +1254,14 @@ properties_window_update (FMPropertiesWi - for (l = window->details->value_fields; l != NULL; l = l->next) { - value_field_update (window, GTK_LABEL (l->data)); - } -+ -+ for (l = window->details->edit_fields; l != NULL; l = l->next) { -+ edit_field_update (window, GTK_ENTRY (l->data)); -+ } -+ -+ for (l = window->details->selinux_combo; l != NULL; l = l->next) { -+ popup_field_update (window, GTK_COMBO_BOX (l->data)); -+ } - } - - mime_list = get_mime_list (window); -@@ -1379,6 +1442,111 @@ value_field_update (FMPropertiesWindow * - ellipsize_text); - } - -+static void -+edit_field_update_internal (GtkEntry *entry, -+ GList *file_list) -+{ -+ const char *attr_name; -+ char *attr_value; -+ char *def_attr_value; -+ char *inconsistent_string; -+ -+ g_assert (GTK_IS_ENTRY (entry)); -+ -+ attr_name = g_object_get_data (G_OBJECT (entry), "file_attribute"); -+ inconsistent_string = g_object_get_data (G_OBJECT (entry), -+ "inconsistent_string"); -+ def_attr_value = g_object_get_data (G_OBJECT (entry), -+ "matchpathcon_cntx"); -+ -+ attr_value = file_list_get_string_attribute (file_list, attr_name, -+ inconsistent_string); -+ -+ maybe_gtk_entry_set_text (GTK_ENTRY (entry), attr_value); -+ -+ /* JFIXME: this isn't generic, *sigh* ... */ -+ attach_selinux_data_edit_field (entry, attr_value, def_attr_value); -+ g_free (attr_value); -+} -+ -+static void -+edit_field_update (FMPropertiesWindow *window, GtkEntry *entry) -+{ -+ gboolean use_original; -+ -+ if (gtk_widget_is_focus (GTK_WIDGET (entry))) { -+ return; -+ } -+ -+ use_original = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (entry), "show_original")); -+ -+ edit_field_update_internal (entry, -+ (use_original ? -+ window->details->original_files : -+ window->details->target_files)); -+} -+ -+static void -+popup_field_update_internal (GtkComboBox *combo, -+ GList *file_list) -+{ -+ const char *attr_name; -+ char *attr_value; -+ char *def_attr_value; -+ char *inconsistent_string; -+ char *cntx_type; -+ GtkTreeIter iter; -+ -+ g_assert (GTK_IS_COMBO_BOX (combo)); -+ -+ if (gtk_widget_is_focus (GTK_WIDGET (combo))) { -+ return; -+ } -+ -+ attr_name = g_object_get_data (G_OBJECT (combo), "file_attribute"); -+ inconsistent_string = g_object_get_data (G_OBJECT (combo), -+ "inconsistent_string"); -+ def_attr_value = g_object_get_data (G_OBJECT (combo), -+ "matchpathcon_cntx"); -+ -+ attr_value = file_list_get_string_attribute (file_list, attr_name, -+ inconsistent_string); -+ -+ /* JFIXME: this isn't generic, *sigh* ... */ -+ -+ if (gtk_combo_box_get_active_iter (combo, &iter)) { -+ GtkTreeModel *model = gtk_combo_box_get_model (combo); -+ -+ /* don't update, if it's identical */ -+ gtk_tree_model_get (model, &iter, 0, &cntx_type, -1); -+ if (cntx_type && strcmp (cntx_type, attr_value) == 0) { -+ g_free (attr_value); -+ return; -+ } -+ } -+ -+ attach_selinux_data_popup_field (combo, attr_value, def_attr_value); -+ -+ g_free (attr_value); -+} -+ -+static void -+popup_field_update (FMPropertiesWindow *window, GtkComboBox *combo) -+{ -+ gboolean use_original; -+ -+ if (window->details->selinux_combo) { -+ return; /* FIXME: must be true: horrible UI, if working */ -+ } -+ -+ use_original = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo), "show_original")); -+ -+ popup_field_update_internal (combo, -+ (use_original ? -+ window->details->original_files : -+ window->details->target_files)); -+} -+ - static GtkLabel * - attach_label (GtkTable *table, - int row, -@@ -1430,6 +1598,45 @@ attach_value_label (GtkTable *table, - return attach_label (table, row, column, initial_text, FALSE, FALSE, FALSE, TRUE, FALSE); - } - -+static GtkEntry * -+attach_edit (GtkTable *table, -+ int row, -+ int column, -+ const char *initial_text, -+ gboolean right_aligned, -+ gboolean bold, -+ gboolean ellipsize_text, -+ gboolean selectable, -+ gboolean mnemonic) -+{ -+ GtkWidget *entry_field; -+ -+ entry_field = nautilus_entry_new (); -+ gtk_entry_set_text (GTK_ENTRY (entry_field), initial_text); -+ -+ gtk_entry_set_alignment (GTK_ENTRY (entry_field), right_aligned ? 1 : 0); -+ gtk_widget_show (entry_field); -+ gtk_table_attach (table, entry_field, -+ column, column + 1, -+ row, row + 1, -+ ellipsize_text -+ ? GTK_FILL | GTK_EXPAND -+ : GTK_FILL, -+ 0, -+ 0, 0); -+ -+ return GTK_ENTRY (entry_field); -+} -+ -+static GtkEntry * -+attach_edit_label (GtkTable *table, -+ int row, -+ int column, -+ const char *initial_text) -+{ -+ return attach_edit (table, row, column, initial_text, FALSE, FALSE, FALSE, TRUE, FALSE); -+} -+ - static GtkLabel * - attach_ellipsizing_value_label (GtkTable *table, - int row, -@@ -1489,6 +1696,673 @@ attach_value_field (FMPropertiesWindow * - } - - static void -+start_long_operation (FMPropertiesWindow *window) -+{ -+ if (window->details->long_operation_underway == 0) { -+ /* start long operation */ -+ GdkCursor * cursor; -+ -+ cursor = gdk_cursor_new (GDK_WATCH); -+ gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor); -+ gdk_cursor_unref (cursor); -+ } -+ window->details->long_operation_underway ++; -+} -+ -+static void -+end_long_operation (FMPropertiesWindow *window) -+{ -+ if (GTK_WIDGET (window)->window != NULL && -+ window->details->long_operation_underway == 1) { -+ /* finished !! */ -+ gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL); -+ } -+ window->details->long_operation_underway--; -+} -+ -+static void -+selinux_change_callback (NautilusFile *file, GnomeVFSResult result, gpointer callback_data) -+{ -+ FMPropertiesWindow *window; -+ g_assert (callback_data != NULL); -+ -+ window = FM_PROPERTIES_WINDOW (callback_data); -+ end_long_operation (window); -+ -+ /* Report the error if it's an error. */ -+ fm_report_error_setting_selinux (file, result, NULL); -+ -+ g_object_unref (window); -+} -+ -+static void -+selinux_done_editing (FMPropertiesWindow *window, char *selinux_context) -+{ -+ GList *l; -+ -+ /* Accept changes. */ -+ for (l = window->details->target_files; l != NULL; l = l->next) { -+ NautilusFile *file; -+ -+ file = NAUTILUS_FILE (l->data); -+ -+ start_long_operation (window); -+ g_object_ref (window); -+ nautilus_file_set_selinux_context (file, selinux_context, -+ selinux_change_callback, -+ window); -+ } -+} -+ -+static gboolean -+selinux_focus_out (NautilusEntry *entry, GdkEventFocus *event, gpointer cb_data) -+{ -+ g_assert (NAUTILUS_IS_ENTRY (entry)); -+ g_assert (FM_IS_PROPERTIES_WINDOW (cb_data)); -+ -+ if (GTK_WIDGET_SENSITIVE (entry)) { -+ char *tmp; -+ -+ tmp = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); -+ selinux_done_editing (FM_PROPERTIES_WINDOW (cb_data), tmp); -+ g_free (tmp); -+ } -+ -+ return FALSE; -+} -+ -+static void -+selinux_entry_activate (NautilusEntry *entry, gpointer cb_data) -+{ -+ char *tmp; -+ -+ g_assert (NAUTILUS_IS_ENTRY (entry)); -+ g_assert (FM_IS_PROPERTIES_WINDOW (cb_data)); -+ -+ tmp = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1); -+ selinux_done_editing (FM_PROPERTIES_WINDOW (cb_data), tmp); -+ g_free (tmp); -+ -+ nautilus_entry_select_all_at_idle (entry); -+} -+ -+/* NOTE: This modifies cntx */ -+static void -+selinux_split_cntx (char *cntx, -+ const char **ret_attr_u, -+ const char **ret_attr_r, -+ const char **ret_attr_t, -+ const char **ret_attr_s) -+{ -+ const char *attr_u; -+ const char *attr_r; -+ const char *attr_t; -+ const char *attr_s; -+ -+ attr_u = cntx; -+ if (!(attr_r = strchr (attr_u, ':'))) { -+ attr_r = "object_r"; /* shouldn't happen */ -+ } else { -+ *((char *)attr_r++) = 0; -+ } -+ -+ if (!(attr_t = strchr (attr_r, ':'))) { -+ attr_t = "file_t"; /* shouldn't happen */ -+ } else { -+ *((char *)attr_t++) = 0; -+ } -+ -+ if ((attr_s = strchr (attr_t, ':'))) { -+ *((char *)attr_s++) = 0; -+ } -+ -+ *ret_attr_u = attr_u; -+ *ret_attr_r = attr_r; -+ *ret_attr_t = attr_t; -+ *ret_attr_s = attr_s; -+} -+ -+static void -+selinux_popup_activate (GtkComboBox *comb, gpointer cb_data) -+{ -+ char *cntx_type; -+ char *orig_type; -+ const char *attr_u; -+ const char *attr_r; -+ const char *attr_t; -+ const char *attr_s; -+ char *tmp; -+ GtkTreeIter iter; -+ -+ g_assert (GTK_IS_COMBO_BOX (comb)); -+ g_assert (FM_IS_PROPERTIES_WINDOW (cb_data)); -+ -+ if (!gtk_combo_box_get_active_iter (comb, &iter)) { -+ return; -+ } else { -+ -+ GtkTreeModel *model = gtk_combo_box_get_model (comb); -+ gtk_tree_model_get (model, &iter, 0, &cntx_type, -1); -+ } -+ -+ if (!(orig_type = g_object_get_data (G_OBJECT (comb), -+ "original_cntx"))) { -+ return; -+ } -+ orig_type = g_strdup (orig_type); -+ -+ selinux_split_cntx (orig_type, &attr_u, &attr_r, &attr_t, &attr_s); -+ tmp = g_strjoin (":", attr_u, attr_r, cntx_type, attr_s, NULL); -+ g_free (orig_type); -+ -+ selinux_done_editing (FM_PROPERTIES_WINDOW (cb_data), tmp); -+ g_free (tmp); -+} -+ -+static char * -+cust_type_next_line (GIOChannel *ioc_ctypes) -+{ -+ char *data; -+ gsize term; -+ GError *errc; -+ -+ data = NULL; -+ term = 0; -+ errc = NULL; -+ -+ if (G_IO_STATUS_NORMAL == g_io_channel_read_line (ioc_ctypes, &data, -+ NULL, &term, &errc)) { -+ data[term] = 0; -+ return data; -+ } -+ -+ return NULL; -+} -+ -+static GSList * -+selinux__type_list (void) -+{ -+ static GSList *cust_types; -+ static time_t file_mtime; -+ const char *fname_ctypes; -+ struct stat buf; -+ GIOChannel *ioc_ctypes; -+ GError *errc; -+ GSList *scan; -+ int fd; -+ -+#ifndef HAVE_SELINUX -+ if (cust_types) { -+ return cust_types; -+ } -+#else -+ fname_ctypes = selinux_customizable_types_path (); -+ if (cust_types && file_mtime && !stat (fname_ctypes, &buf) && -+ (file_mtime == buf.st_mtime)) { -+ return cust_types; -+ } -+#endif -+ -+ if (cust_types) { -+ for (scan = cust_types; scan; scan = scan->next) { -+ g_free (scan->data); -+ } -+ g_slist_free (cust_types); -+ cust_types = NULL; -+ } -+ -+ cust_types = g_slist_prepend (cust_types, g_strdup ("tmp_t")); -+ cust_types = g_slist_prepend (cust_types, g_strdup ("user_home_t")); -+ /* cust_types = g_slist_prepend (cust_types, g_strdup ("user_tmp_t")); */ -+ -+#ifdef HAVE_SELINUX -+ /* read types, one per line... */ -+ fname_ctypes = selinux_customizable_types_path (); -+ errc = NULL; -+ if ((ioc_ctypes = g_io_channel_new_file (fname_ctypes, "r", &errc))) { -+ char *data = NULL; -+ -+ while ((data = cust_type_next_line (ioc_ctypes))) { -+ cust_types = g_slist_prepend (cust_types, data); -+ } -+ -+ fd = g_io_channel_unix_get_fd (ioc_ctypes); -+ if (!fstat (fd, &buf)) { -+ file_mtime = buf.st_mtime; -+ } -+ -+ g_io_channel_unref (ioc_ctypes); -+ } -+#endif -+ -+ return cust_types; -+} -+ -+static void -+attach_selinux_data_edit_field (GtkEntry *entry, -+ char *attr_val, char *def_attr_val) -+{ -+ GtkEntryCompletion *comp; -+ GtkCellRenderer *cell; -+ const char *attr_u; -+ const char *attr_r; -+ const char *attr_t; -+ const char *attr_s; -+ const char *dattr_u; -+ const char *dattr_r; -+ const char *dattr_t; -+ const char *dattr_s; -+ GtkListStore *store; -+ GtkTreeIter iter; -+ GSList *scan; -+ int width; -+ int owidth; -+ int twidth; -+ -+ attr_val = g_strdup (attr_val); /* so we can alter it... */ -+ def_attr_val = g_strdup (def_attr_val); /* so we can alter it... */ -+ -+ /* do completion, so you don't have to type everything... */ -+ comp = gtk_entry_completion_new (); -+ store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); -+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), -+ 0, GTK_SORT_ASCENDING); -+ -+ gtk_entry_completion_set_model (comp, GTK_TREE_MODEL (store)); -+ cell = gtk_cell_renderer_pixbuf_new (); -+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (comp), cell, FALSE); -+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (comp), cell, -+ "stock-id", 1, NULL); -+ gtk_entry_completion_set_text_column (comp, 0); -+ gtk_entry_set_completion (entry, comp); -+ -+ /* FIXME: default doesn't do the right thing, should it? */ -+ owidth = gtk_entry_get_width_chars (entry); -+ width = owidth; -+ -+ selinux_split_cntx (attr_val, &attr_u, &attr_r, &attr_t, &attr_s); -+ dattr_u = dattr_r = dattr_t = dattr_s = NULL; -+ if (def_attr_val) { -+ selinux_split_cntx (def_attr_val, &dattr_u, &dattr_r, -+ &dattr_t, &dattr_s); -+ } -+ -+ /* don't do it twice... */ -+ if (attr_t && dattr_t && !strcmp (attr_t, dattr_t)) { -+ dattr_t = NULL; -+ } -+ -+ if (attr_t) { -+ /* highlight just the type to the end, so we can easily change it -+ * FIXME: we also highlight any Sensitivity/MCS but completion will -+ * let people put it back, and that's the only way we get completion -+ * at all -- This sucks and we need to remove Sensitivity/MCS from -+ * the edit box. Yah, more UI. */ -+ int beg = attr_t - attr_u; -+ gtk_editable_select_region (GTK_EDITABLE (entry), beg, -1); -+ } -+ -+ for (scan = selinux__type_list(); scan; scan = scan->next) { -+ char *tmp; -+ -+ if (attr_t && !strcmp (attr_t, scan->data)) -+ continue; /* don't have two entries */ -+ -+ if (dattr_t && !strcmp (dattr_t, scan->data)) -+ continue; /* don't have two entries */ -+ -+ gtk_list_store_append (store, &iter); -+ tmp = g_strjoin (":", attr_u, attr_r, scan->data, attr_s, NULL); -+ gtk_list_store_set (store, &iter, 0, tmp, -1); -+ -+ twidth = strlen (tmp); -+ width = MAX (twidth, width); -+ -+ g_free (tmp); -+ } -+ -+ if (dattr_t) { -+ char *tmp; -+ -+ gtk_list_store_append (store, &iter); -+ tmp = g_strjoin (":", dattr_u, dattr_r, dattr_t, dattr_s, NULL); -+ gtk_list_store_set (store, &iter, 0, tmp, -+ 1, GTK_STOCK_HOME, -1); -+ -+ twidth = strlen (tmp); -+ width = MAX (twidth, width); -+ -+ g_free (tmp); -+ } -+ -+ if (attr_t) { -+ char *tmp; -+ -+ gtk_list_store_append (store, &iter); -+ tmp = g_strjoin (":", attr_u, attr_r, attr_t, attr_s, NULL); -+ gtk_list_store_set (store, &iter, 0, tmp, 1, GTK_STOCK_OK, -1); -+ -+ twidth = strlen (tmp); -+ width = MAX (twidth, width); -+ -+ g_free (tmp); -+ } -+ -+ g_free (attr_val); -+ g_free (def_attr_val); -+ g_object_unref (G_OBJECT (store)); -+ g_object_unref (G_OBJECT (comp)); -+ -+ if (width != owidth) { -+ gtk_entry_set_width_chars (entry, width + 2); -+ } -+} -+ -+# define HACK_TYPE(x, y) \ -+ else if (!strcmp (nice_type, x)) nice_type = y -+ -+/* hack to convert a selinux_context type into a readable string for the -+ user */ -+static const char * -+selinux__hack_conv_type (const char *type) -+{ /* FIXME: hack attack, but nowhere else to put it. Because mathpathcon -+ * here now probably want a bunch of other types? */ -+ const char *nice_type; -+ -+ nice_type = type; -+ -+ if (0) { } -+ -+ HACK_TYPE("cupsd_etc_t", _("CUPS printer configuration")); -+ HACK_TYPE("cupsd_rw_etc_t", _("CUPS printer configuration (rw)")); -+ HACK_TYPE("cupsd_tmp_t", _("CUPS temporary data")); -+ HACK_TYPE("dhcp_etc_t", _("DHCP configuration")); -+ HACK_TYPE("dictd_etc_t", _("Dictd configuration")); -+ HACK_TYPE("dnssec_t", _("DNS secret")); -+ HACK_TYPE("etc_t", _("System configuration")); -+ HACK_TYPE("etc_aliases_t", _("Email aliases configuration")); -+ HACK_TYPE("etc_runtime_t", _("System configuration (rw)")); -+ HACK_TYPE("cvs_data_t", _("Read and write from CVS daemon")); -+ HACK_TYPE("httpd_config_t", _("Apache-httpd configuration")); -+ HACK_TYPE("httpd_php_tmp_t", -+ _("Apache-httpd PHP module temporary data")); -+ HACK_TYPE("httpd_sys_content_t", -+ _("Read from all httpd scripts and the daemon")); -+ HACK_TYPE("httpd_sys_htaccess_t", -+ _("Apache-httpd .htaccess configuration")); -+ HACK_TYPE("httpd_sys_script_exec_t", -+ _("CGI programs with default access")); -+ HACK_TYPE("httpd_sys_script_ra_t", -+ _("CGI programs can read and append")); -+ HACK_TYPE("httpd_sys_script_ro_t", -+ _("CGI programs can read")); -+ HACK_TYPE("httpd_sys_script_rw_t", -+ _("CGI programs can read and write")); -+ HACK_TYPE("httpd_unconfined_script_exec_t", -+ _("CGI programs without any SELinux protection")); -+ HACK_TYPE("httpd_tmp_t", _("Apache-httpd temporary data")); -+ HACK_TYPE("ice_tmp_t", _("ICE temporary data")); -+ HACK_TYPE("locale_t", _("Locale data")); -+ HACK_TYPE("mysql_tmp_t", _("MySQL temporary data")); -+ HACK_TYPE("named_conf_t", _("Nameserver configuration")); -+ HACK_TYPE("net_conf_t", _("Network configuration")); -+ HACK_TYPE("postgresql_tmp_t", _("Postgresql temporary data")); -+ HACK_TYPE("public_content_rw_t", -+ _("Read and write from CIFS/ftp/http/nfs/rsync")); -+ HACK_TYPE("public_content_t", _("Read from CIFS/ftp/http/nfs/rsync")); -+ HACK_TYPE("samba_etc_t", _("Samba configuration")); -+ HACK_TYPE("samba_share_t", _("Shared via CIFS (samba)")); -+ HACK_TYPE("staff_home_t", _("Staff user data")); -+ HACK_TYPE("staff_home_dir_t", _("Staff user home directory")); -+ HACK_TYPE("swapfile_t", _("System swapfile")); -+ HACK_TYPE("sysadm_home_t", _("Sysadmin user data")); -+ HACK_TYPE("sysadm_home_dir_t", _("Sysadmin user home directory")); -+ HACK_TYPE("system_cron_spool_t", _("Cron data")); -+ HACK_TYPE("tmp_t", _("Temporary data")); -+ HACK_TYPE("user_tmp_t", _("User temporary data")); -+ HACK_TYPE("user_home_t", _("User data")); -+ HACK_TYPE("user_home_dir_t", _("User home directory")); -+ HACK_TYPE("var_log_t", _("Logfile")); -+ HACK_TYPE("xen_image_t", _("Xen image")); -+ -+ return nice_type; -+} -+#undef HACK_TYPE -+ -+static void -+attach_selinux_data_popup_field (GtkComboBox *comb, -+ char *attr_val, -+ char *def_attr_val) -+{ -+ const char *attr_u; -+ const char *attr_r; -+ const char *attr_t; -+ const char *attr_s; -+ const char *dattr_u; -+ const char *dattr_r; -+ const char *dattr_t; -+ const char *dattr_s; -+ GtkListStore *store; -+ GtkTreeIter iter; -+ GSList *scan; -+ -+ attr_val = g_strdup (attr_val); /* so we can alter it... */ -+ def_attr_val = g_strdup (def_attr_val); -+ -+ /* do completion, so you don't have to type everything... */ -+ store = gtk_list_store_new (3, G_TYPE_STRING, -+ G_TYPE_STRING, G_TYPE_STRING); -+ gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), -+ 1, GTK_SORT_ASCENDING); -+ -+ gtk_combo_box_set_model (comb, GTK_TREE_MODEL (store)); -+ -+ selinux_split_cntx (attr_val, &attr_u, &attr_r, &attr_t, &attr_s); -+ dattr_u = dattr_r = dattr_t = dattr_s = NULL; -+ if (def_attr_val) { -+ selinux_split_cntx (def_attr_val, &dattr_u, &dattr_r, -+ &dattr_t, &dattr_s); -+ } -+ /* don't do it twice... */ -+ if (attr_t && dattr_t && !strcmp (attr_t, dattr_t)) { -+ dattr_t = NULL; -+ } -+ -+ for (scan = selinux__type_list(); scan; scan = scan->next) { -+ const char *nice_type; -+ -+ if (attr_t && !strcmp (attr_t, scan->data)) -+ continue; /* don't have two entries */ -+ -+ if (dattr_t && !strcmp (dattr_t, scan->data)) -+ continue; /* don't have two entries */ -+ -+ nice_type = selinux__hack_conv_type(scan->data); -+ -+ gtk_list_store_append (store, &iter); -+ gtk_list_store_set (store, &iter, 0, scan->data, -+ 1, nice_type, -1); -+ } -+ -+ if (dattr_t) { -+ const char *nice_type; -+ -+ gtk_list_store_append (store, &iter); -+ nice_type = selinux__hack_conv_type(dattr_t); -+ gtk_list_store_set (store, &iter, 0, dattr_t, 1, nice_type, -+ 2, GTK_STOCK_HOME, -1); -+ } -+ -+ if (attr_t) { -+ const char *nice_type; -+ -+ gtk_list_store_append (store, &iter); -+ nice_type = selinux__hack_conv_type(attr_t); -+ gtk_list_store_set (store, &iter, 0, attr_t, 1, nice_type, -+ 2, GTK_STOCK_OK, -1); -+ gtk_combo_box_set_active_iter (comb, &iter); -+ } -+ -+ g_free (attr_val); -+ g_free (def_attr_val); -+ g_object_unref (G_OBJECT (store)); -+} -+ -+static char * -+selinux__matchpathcon (GList *file_list) -+{ -+ GList *scan; -+ -+ for (scan = file_list; scan != NULL; scan = scan->next) { -+ NautilusFile *file; -+ -+ file = NAUTILUS_FILE (scan->data); -+ if (!nautilus_file_is_gone (file)) { -+ return nautilus_file_get_selinux_matchpathcon (file); -+ } -+ } -+ -+ return NULL; -+} -+ -+static void -+attach_selinux_edit_field (FMPropertiesWindow *window, -+ GtkTable *table, -+ int row, -+ int column, -+ const char *file_attribute_name, -+ const char *inconsistent_string, -+ gboolean show_original, -+ GtkLabel *lab_title) -+{ -+ GtkEntry *entry; -+ GList *file_list; -+ char *attr_value; -+ char *def_attr_value; -+ -+ if (show_original) { -+ file_list = window->details->original_files; -+ } else { -+ file_list = window->details->target_files; -+ } -+ -+ attr_value = file_list_get_string_attribute (file_list, -+ file_attribute_name, -+ inconsistent_string); -+ if ( strcmp (attr_value, inconsistent_string) && -+ !strcmp (file_attribute_name, "selinux_context")) { -+ def_attr_value = selinux__matchpathcon (file_list); -+ } else { -+ def_attr_value = NULL; -+ } -+ -+ entry = attach_edit_label (table, row, column, attr_value); -+ gtk_label_set_mnemonic_widget (GTK_LABEL (lab_title), -+ GTK_WIDGET (entry)); -+ -+ /* Stash a copy of the file attribute name in this field for the callback's sake. */ -+ g_object_set_data_full (G_OBJECT (entry), "file_attribute", -+ g_strdup (file_attribute_name), g_free); -+ -+ g_object_set_data_full (G_OBJECT (entry), "inconsistent_string", -+ g_strdup (inconsistent_string), g_free); -+ -+ g_object_set_data (G_OBJECT (entry), "show_original", GINT_TO_POINTER (show_original)); -+ g_object_set_data (G_OBJECT (entry), "ellipsize_text", GINT_TO_POINTER (FALSE)); -+ -+ g_signal_connect_object (entry, "focus_out_event", -+ G_CALLBACK (selinux_focus_out), window, 0); -+ g_signal_connect_object (entry, "activate", -+ G_CALLBACK (selinux_entry_activate), window,0); -+ -+ attach_selinux_data_edit_field (entry, attr_value, def_attr_value); -+ -+ g_object_set_data_full (G_OBJECT (entry), "original_cntx", attr_value, -+ g_free); -+ -+ g_object_set_data_full (G_OBJECT (entry), "matchpathcon_cntx", -+ def_attr_value, g_free); -+ -+ window->details->edit_fields = g_list_prepend (window->details->edit_fields, -+ entry); -+} -+ -+static void -+attach_selinux_popup_field (FMPropertiesWindow *window, -+ GtkTable *table, -+ int row, -+ int column, -+ const char *file_attribute_name, -+ const char *inconsistent_string, -+ gboolean show_original, -+ GtkLabel *lab_title) -+{ -+ GtkWidget *comb; -+ GtkCellRenderer *cell; -+ GList *file_list; -+ char *attr_value; -+ char *def_attr_value; -+ -+ if (show_original) { -+ file_list = window->details->original_files; -+ } else { -+ file_list = window->details->target_files; -+ } -+ -+ attr_value = file_list_get_string_attribute (file_list, -+ file_attribute_name, -+ inconsistent_string); -+ if ( strcmp (attr_value, inconsistent_string) && -+ !strcmp (file_attribute_name, "selinux_context")) { -+ def_attr_value = selinux__matchpathcon (file_list); -+ } else { -+ def_attr_value = NULL; -+ } -+ -+ comb = gtk_combo_box_new (); -+ -+ gtk_table_attach (table, comb, column, column + 1, row, row + 1, -+ GTK_FILL, 0, 0, 0); -+ -+ -+ gtk_label_set_mnemonic_widget (GTK_LABEL (lab_title), comb); -+ -+ /* Stash a copy of the file attribute name in this field for the callback's sake. */ -+ g_object_set_data_full (G_OBJECT (comb), "file_attribute", -+ g_strdup (file_attribute_name), g_free); -+ -+ g_object_set_data (G_OBJECT (comb), "show_original", GINT_TO_POINTER (show_original)); -+ -+ attach_selinux_data_popup_field (GTK_COMBO_BOX (comb), -+ attr_value, def_attr_value); -+ -+ g_signal_connect_object (comb, "changed", -+ G_CALLBACK (selinux_popup_activate), window, 0); -+ -+ g_object_set_data_full (G_OBJECT (comb), "original_cntx", attr_value, -+ g_free); -+ -+ g_object_set_data_full (G_OBJECT (comb), "matchpathcon_cntx", -+ def_attr_value, g_free); -+ -+ cell = gtk_cell_renderer_pixbuf_new (); -+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (comb), cell, FALSE); -+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (comb), cell, -+ "stock-id", 2, NULL); -+ cell = gtk_cell_renderer_text_new (); -+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (comb), cell, FALSE); -+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (comb), cell, -+ "text", 1, NULL); -+ gtk_widget_show (comb); -+ -+ g_assert (! window->details->selinux_combo); -+ -+ window->details->selinux_combo = -+ g_list_prepend (window->details->selinux_combo, comb); -+ -+} -+ -+static void - attach_ellipsizing_value_field (FMPropertiesWindow *window, - GtkTable *table, - int row, -@@ -2425,7 +3299,7 @@ append_title_value_pair (FMPropertiesWin - gboolean show_original) - { - guint last_row; -- -+ - last_row = append_title_field (table, title, NULL); - attach_value_field (window, table, last_row, VALUE_COLUMN, - file_attribute_name, -@@ -2436,6 +3310,36 @@ append_title_value_pair (FMPropertiesWin - } - - static guint -+append_title_selinux_edit_pair (FMPropertiesWindow *window, -+ GtkTable *table, -+ const char *title, -+ const char *file_attribute_name, -+ const char *inconsistent_state, -+ gboolean show_original) -+{ -+ guint last_row; -+ GtkLabel *lab_title; -+ -+ lab_title = NULL; -+ last_row = append_title_field (table, title, &lab_title); -+ -+ if (window->details->advanced_permissions) { -+ attach_selinux_edit_field (window, table, last_row, -+ VALUE_COLUMN, file_attribute_name, -+ inconsistent_state, -+ show_original, lab_title); -+ } else { -+ -+ attach_selinux_popup_field (window, table, last_row, -+ VALUE_COLUMN, file_attribute_name, -+ inconsistent_state, -+ show_original, lab_title); -+ } -+ -+ return last_row; -+} -+ -+static guint - append_title_and_ellipsizing_value (FMPropertiesWindow *window, - GtkTable *table, - const char *title, -@@ -2893,31 +3797,6 @@ create_emblems_page (FMPropertiesWindow - } - - static void --start_long_operation (FMPropertiesWindow *window) --{ -- if (window->details->long_operation_underway == 0) { -- /* start long operation */ -- GdkCursor * cursor; -- -- cursor = gdk_cursor_new (GDK_WATCH); -- gdk_window_set_cursor (GTK_WIDGET (window)->window, cursor); -- gdk_cursor_unref (cursor); -- } -- window->details->long_operation_underway ++; --} -- --static void --end_long_operation (FMPropertiesWindow *window) --{ -- if (GTK_WIDGET (window)->window != NULL && -- window->details->long_operation_underway == 1) { -- /* finished !! */ -- gdk_window_set_cursor (GTK_WIDGET (window)->window, NULL); -- } -- window->details->long_operation_underway--; --} -- --static void - permission_change_callback (NautilusFile *file, GnomeVFSResult result, gpointer callback_data) - { - FMPropertiesWindow *window; -@@ -4035,14 +4914,16 @@ apply_recursive_clicked (GtkWidget *recu - GnomeVFSFilePermissions file_permission, file_permission_mask; - GnomeVFSFilePermissions dir_permission, dir_permission_mask; - GnomeVFSFilePermissions vfs_mask, vfs_new_perm, p; -- GtkWidget *button, *combo; -+ char *context; -+ GtkWidget *button; -+ GtkComboBox *combo; - gboolean active, is_folder, is_special, use_original; - GList *l; - GtkTreeModel *model; - GtkTreeIter iter; - PermissionType type; - int new_perm, mask; -- -+ - file_permission = 0; - file_permission_mask = 0; - dir_permission = 0; -@@ -4079,9 +4960,9 @@ apply_recursive_clicked (GtkWidget *recu - } - /* Simple mode, minus exec checkbox */ - for (l = window->details->permission_combos; l != NULL; l = l->next) { -- combo = l->data; -+ combo = GTK_COMBO_BOX (l->data); - -- if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter)) { -+ if (!gtk_combo_box_get_active_iter (combo, &iter)) { - continue; - } - -@@ -4089,7 +4970,7 @@ apply_recursive_clicked (GtkWidget *recu - is_folder = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (combo), - "is-folder")); - -- model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo)); -+ model = gtk_combo_box_get_model (combo); - gtk_tree_model_get (model, &iter, 1, &new_perm, 2, &use_original, -1); - if (use_original) { - continue; -@@ -4112,12 +4993,53 @@ apply_recursive_clicked (GtkWidget *recu - } - } - -+ /* get the SELinux context... */ -+ context = NULL; -+ if (window->details->advanced_permissions && -+ window->details->edit_fields) { /* advanced mode */ -+ GtkEditable *efield; -+ -+ efield = window->details->edit_fields->data; -+ context = gtk_editable_get_chars (GTK_EDITABLE (efield), 0, -1); -+ } else if (!window->details->advanced_permissions && -+ window->details->selinux_combo) { /* simple mode */ -+ char *cntx_type; -+ char *orig_type; -+ const char *attr_u; -+ const char *attr_r; -+ const char *attr_t; -+ const char *attr_s; -+ -+ combo = GTK_COMBO_BOX (window->details->selinux_combo->data); -+ -+ if (!gtk_combo_box_get_active_iter (combo, &iter)) { -+ return; -+ } else { -+ GtkTreeModel *model = gtk_combo_box_get_model (combo); -+ gtk_tree_model_get (model, &iter, 0, &cntx_type, -1); -+ } -+ if (!(orig_type = g_object_get_data (G_OBJECT (combo), -+ "original_cntx"))) { -+ return; -+ } -+ -+ orig_type = g_strdup (orig_type); -+ -+ selinux_split_cntx (orig_type, -+ &attr_u, &attr_r, &attr_t, &attr_s); -+ context = g_strjoin (":", -+ attr_u, attr_r, cntx_type, attr_s, NULL); -+ g_free (orig_type); -+ } -+ - for (l = window->details->target_files; l != NULL; l = l->next) { - NautilusFile *file; - char *uri; - - file = NAUTILUS_FILE (l->data); - -+ /* assume permissions setting allows context setting... -+ * we can't really do much else due to race conditions anyway */ - if (nautilus_file_is_directory (file) && - nautilus_file_can_set_permissions (file)) { - uri = nautilus_file_get_uri (file); -@@ -4128,11 +5050,13 @@ apply_recursive_clicked (GtkWidget *recu - file_permission_mask, - dir_permission, - dir_permission_mask, -+ context, - set_recursive_permissions_done, - window); - g_free (uri); - } - } -+ g_free (context); - } - - static void -@@ -4179,11 +5103,20 @@ create_permissions_page (FMPropertiesWin - } - - gtk_table_set_row_spacing (page_table, page_table->nrows - 1, 18); -- -- append_title_value_pair -- (window, page_table, _("SELinux Context:"), -- "selinux_context", _("--"), -- FALSE); -+ -+ if (!is_multi_file_window (window) || -+ multi_have_same_selinux_context (window)) -+ append_title_selinux_edit_pair -+ (window, page_table, _("_SELinux Context:"), -+ "selinux_context", _("--"), -+ FALSE); -+ else /* Static text in this case. */ -+ append_title_value_pair (window, page_table, -+ _("_SELinux Context:"), -+ "selinux_context", _("--"), -+ FALSE); -+ -+ - append_title_value_pair - (window, page_table, _("Last changed:"), - "date_permissions", _("--"), diff --git a/nautilus-2.16.2-directory-unref-crash.patch b/nautilus-2.16.2-directory-unref-crash.patch deleted file mode 100644 index 02d957c..0000000 --- a/nautilus-2.16.2-directory-unref-crash.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- nautilus-2.16.2/libnautilus-private/nautilus-directory-async.c.crash 2006-11-13 12:43:34.000000000 +0100 -+++ nautilus-2.16.2/libnautilus-private/nautilus-directory-async.c 2006-11-13 12:45:21.000000000 +0100 -@@ -1858,6 +1858,8 @@ - directory = NAUTILUS_DIRECTORY (callback_data); - directory->details->call_ready_idle_id = 0; - -+ nautilus_directory_ref (directory); -+ - callback = NULL; - while (1) { - /* Check if any callbacks are non-active and call them if they are. */ -@@ -1886,6 +1888,8 @@ - update_metadata_monitors (directory); - - nautilus_directory_async_state_changed (directory); -+ -+ nautilus_directory_unref (directory); - - return FALSE; - } diff --git a/nautilus-2.16.2-dynamic-search.patch b/nautilus-2.16.2-dynamic-search.patch deleted file mode 100644 index 5bae842..0000000 --- a/nautilus-2.16.2-dynamic-search.patch +++ /dev/null @@ -1,326 +0,0 @@ ---- nautilus-2.16.2/configure.in.dynamic-search 2006-11-06 12:12:05.000000000 -0500 -+++ nautilus-2.16.2/configure.in 2006-11-14 01:41:48.000000000 -0500 -@@ -230,42 +230,12 @@ - dnl search implementations - dnl **************************** - --AM_CONDITIONAL(HAVE_TRACKER, false) -+# We hardcode beagle and tracker use and then load it dynamically -+AM_CONDITIONAL(HAVE_TRACKER, true) -+AC_DEFINE(HAVE_TRACKER, 1, [Define to enable tracker support]) - --dnl libtracker checking -- --AC_ARG_ENABLE(tracker, [ --disable-tracker build without tracker support]) --msg_tracker=no --if test "x$enable_tracker" != "xno"; then -- PKG_CHECK_MODULES(TRACKER, tracker >= tracker_minver, [ -- AM_CONDITIONAL(HAVE_TRACKER, true) -- AC_DEFINE(HAVE_TRACKER, 1, [Define to enable tracker support]) -- ] -- msg_tracker=yes, -- [AM_CONDITIONAL(HAVE_TRACKER, false)]) -- AC_SUBST(TRACKER_CFLAGS) -- AC_SUBST(TRACKER_LIBS) --fi -- --dnl ========================================================================== -- -- --AM_CONDITIONAL(HAVE_BEAGLE, false) -- --dnl libbeagle checking -- --AC_ARG_ENABLE(beagle, [ --disable-beagle build without beagle support]) --msg_beagle=no --if test "x$enable_beagle" != "xno"; then -- PKG_CHECK_MODULES(BEAGLE, libbeagle-0.0 >= beagle_minver, [ -- AM_CONDITIONAL(HAVE_BEAGLE, true) -- AC_DEFINE(HAVE_BEAGLE, 1, [Define to enable beagle support]) -- ] -- msg_beagle=yes, -- [AM_CONDITIONAL(HAVE_BEAGLE, false)]) -- AC_SUBST(BEAGLE_CFLAGS) -- AC_SUBST(BEAGLE_LIBS) --fi -+AM_CONDITIONAL(HAVE_BEAGLE, true) -+AC_DEFINE(HAVE_BEAGLE, 1, [Define to enable beagle support]) - - dnl ========================================================================== - ---- nautilus-2.16.2/libnautilus-private/nautilus-search-engine-beagle.c.dynamic-search 2006-08-07 06:34:30.000000000 -0400 -+++ nautilus-2.16.2/libnautilus-private/nautilus-search-engine-beagle.c 2006-11-14 01:38:25.000000000 -0500 -@@ -23,10 +23,20 @@ - - #include - #include "nautilus-search-engine-beagle.h" --#include - - #include - #include -+#include -+ -+typedef struct _BeagleHit BeagleHit; -+typedef struct _BeagleQuery BeagleQuery; -+typedef struct _BeagleClient BeagleClient; -+typedef struct _BeagleRequest BeagleRequest; -+typedef struct _BeagleFinishedResponse BeagleFinishedResponse; -+typedef struct _BeagleHitsAddedResponse BeagleHitsAddedResponse; -+typedef struct _BeagleQueryPartProperty BeagleQueryPartProperty; -+typedef struct _BeagleQueryPart BeagleQueryPart; -+typedef struct _BeagleHitsSubtractedResponse BeagleHitsSubtractedResponse; - - struct NautilusSearchEngineBeagleDetails { - BeagleClient *client; -@@ -37,6 +47,127 @@ - gboolean query_finished; - }; - -+/* We dlopen() all the following from libbeagle at runtime */ -+#define BEAGLE_HIT(x) ((BeagleHit *)(x)) -+#define BEAGLE_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), beagle_request_get_type(), BeagleRequest)) -+#define BEAGLE_QUERY_PART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), beagle_query_part_get_type(), BeagleQueryPart)) -+ -+typedef enum { -+ BEAGLE_QUERY_PART_LOGIC_REQUIRED = 1, -+ BEAGLE_QUERY_PART_LOGIC_PROHIBITED = 2 -+} BeagleQueryPartLogic; -+ -+typedef enum { -+ BEAGLE_PROPERTY_TYPE_UNKNOWN = 0, -+ BEAGLE_PROPERTY_TYPE_TEXT = 1, -+ BEAGLE_PROPERTY_TYPE_KEYWORD = 2, -+ BEAGLE_PROPERTY_TYPE_DATE = 3, -+ BEAGLE_PROPERTY_TYPE_LAST = 4 -+} BeaglePropertyType; -+ -+/* *static* wrapper function pointers */ -+static gboolean (*beagle_client_send_request_async) (BeagleClient *client, -+ BeagleRequest *request, -+ GError **err) = NULL; -+static G_CONST_RETURN char *(*beagle_hit_get_uri) (BeagleHit *hit) = NULL; -+static GSList *(*beagle_hits_added_response_get_hits) (BeagleHitsAddedResponse *response) = NULL; -+static BeagleQuery *(*beagle_query_new) (void) = NULL; -+static void (*beagle_query_add_text) (BeagleQuery *query, -+ const char *str) = NULL; -+static void (*beagle_query_add_hit_type) (BeagleQuery *query, -+ const char *hit_type) = NULL; -+static BeagleQueryPartProperty *(*beagle_query_part_property_new) (void) = NULL; -+static void (*beagle_query_part_set_logic) (BeagleQueryPart *part, -+ BeagleQueryPartLogic logic) = NULL; -+static void (*beagle_query_part_property_set_key) (BeagleQueryPartProperty *part, -+ const char *key) = NULL; -+static void (*beagle_query_part_property_set_value) (BeagleQueryPartProperty *part, -+ const char * value) = NULL; -+static void (*beagle_query_part_property_set_property_type) (BeagleQueryPartProperty *part, -+ BeaglePropertyType prop_type) = NULL; -+static void (*beagle_query_add_part) (BeagleQuery *query, -+ BeagleQueryPart *part) = NULL; -+static GType (*beagle_request_get_type) (void) = NULL; -+static GType (*beagle_query_part_get_type) (void) = NULL; -+static gboolean (*beagle_util_daemon_is_running) (void) = NULL; -+static BeagleClient *(*beagle_client_new_real) (const char *client_name) = NULL; -+static void (*beagle_query_set_max_hits) (BeagleQuery *query, -+ int max_hits) = NULL; -+static void (*beagle_query_add_mime_type) (BeagleQuery *query, -+ const char *mime_type) = NULL; -+static GSList *(*beagle_hits_subtracted_response_get_uris) (BeagleHitsSubtractedResponse *response) = NULL; -+ -+static struct BeagleDlMapping -+{ -+ const char *fn_name; -+ gpointer *fn_ptr_ref; -+} beagle_dl_mapping[] = -+{ -+#define MAP(a) { #a, (gpointer *)&a } -+ MAP (beagle_client_send_request_async), -+ MAP (beagle_hit_get_uri), -+ MAP (beagle_hits_added_response_get_hits), -+ MAP (beagle_query_new), -+ MAP (beagle_query_add_text), -+ MAP (beagle_query_add_hit_type), -+ MAP (beagle_query_part_property_new), -+ MAP (beagle_query_part_set_logic), -+ MAP (beagle_query_part_property_set_key), -+ MAP (beagle_query_part_property_set_value), -+ MAP (beagle_query_part_property_set_property_type), -+ MAP (beagle_query_add_part), -+ MAP (beagle_request_get_type), -+ MAP (beagle_query_part_get_type), -+ MAP (beagle_util_daemon_is_running), -+ MAP (beagle_query_set_max_hits), -+ MAP (beagle_query_add_mime_type), -+ MAP (beagle_hits_subtracted_response_get_uris), -+#undef MAP -+ { "beagle_client_new", (gpointer *)&beagle_client_new_real }, -+}; -+ -+static void -+open_libbeagle (void) -+{ -+ static gboolean done = FALSE; -+ -+ if (!done) -+ { -+ int i; -+ GModule *beagle; -+ -+ done = TRUE; -+ -+ beagle = g_module_open ("libbeagle.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); -+ if (!beagle) -+ return; -+ -+ for (i = 0; i < G_N_ELEMENTS (beagle_dl_mapping); i++) -+ { -+ if (!g_module_symbol (beagle, beagle_dl_mapping[i].fn_name, -+ beagle_dl_mapping[i].fn_ptr_ref)) -+ { -+ g_warning ("Missing symbol '%s' in libbeagle\n", -+ beagle_dl_mapping[i].fn_name); -+ g_module_close (beagle); -+ -+ for (i = 0; i < G_N_ELEMENTS (beagle_dl_mapping); i++) -+ beagle_dl_mapping[i].fn_ptr_ref = NULL; -+ -+ return; -+ } -+ } -+ } -+} -+ -+static BeagleClient * -+beagle_client_new (const char *client_name) -+{ -+ if (beagle_client_new_real) -+ return beagle_client_new_real (client_name); -+ -+ return NULL; -+} - - static void nautilus_search_engine_beagle_class_init (NautilusSearchEngineBeagleClass *class); - static void nautilus_search_engine_beagle_init (NautilusSearchEngineBeagle *engine); -@@ -274,8 +405,11 @@ - { - NautilusSearchEngineBeagle *engine; - BeagleClient *client; -+ -+ open_libbeagle (); - -- if (!beagle_util_daemon_is_running ()) { -+ if (beagle_util_daemon_is_running == NULL || -+ !beagle_util_daemon_is_running ()) { - /* check whether daemon is running as beagle_client_new - * doesn't fail when a stale socket file exists */ - return NULL; ---- nautilus-2.16.2/libnautilus-private/nautilus-search-engine-tracker.c.dynamic-search 2006-11-14 01:39:07.000000000 -0500 -+++ nautilus-2.16.2/libnautilus-private/nautilus-search-engine-tracker.c 2006-11-14 01:40:36.000000000 -0500 -@@ -23,12 +23,94 @@ - - #include - #include "nautilus-search-engine-tracker.h" --#include -+#include - #include - #include - #include - - -+typedef struct _TrackerClient TrackerClient; -+ -+typedef void (*TrackerArrayReply) (char **result, GError *error, gpointer user_data); -+ -+static TrackerClient * (*tracker_connect) (gboolean enable_warnings) = NULL; -+static void (*tracker_disconnect) (TrackerClient *client) = NULL; -+static void (*tracker_cancel_last_call) (TrackerClient *client) = NULL; -+ -+static void (*tracker_search_metadata_by_text_async) (TrackerClient *client, -+ const char *query, -+ TrackerArrayReply callback, -+ gpointer user_data) = NULL; -+static void (*tracker_search_metadata_by_text_and_mime_async) (TrackerClient *client, -+ const char *query, -+ const char **mimes, -+ TrackerArrayReply callback, -+ gpointer user_data) = NULL; -+static void (*tracker_search_metadata_by_text_and_location_async) (TrackerClient *client, -+ const char *query, -+ const char *location, -+ TrackerArrayReply callback, -+ gpointer user_data) = NULL; -+static void (*tracker_search_metadata_by_text_and_mime_and_location_async) (TrackerClient *client, -+ const char *query, -+ const char **mimes, -+ const char *location, -+ TrackerArrayReply callback, -+ gpointer user_data) = NULL; -+ -+ -+static struct TrackerDlMapping -+{ -+ const char *fn_name; -+ gpointer *fn_ptr_ref; -+} tracker_dl_mapping[] = -+{ -+#define MAP(a) { #a, (gpointer *)&a } -+ MAP (tracker_connect), -+ MAP (tracker_disconnect), -+ MAP (tracker_cancel_last_call), -+ MAP (tracker_search_metadata_by_text_async), -+ MAP (tracker_search_metadata_by_text_and_mime_async), -+ MAP (tracker_search_metadata_by_text_and_location_async), -+ MAP (tracker_search_metadata_by_text_and_mime_and_location_async) -+#undef MAP -+}; -+ -+ -+static void -+open_libtracker (void) -+{ -+ static gboolean done = FALSE; -+ -+ if (!done) -+ { -+ int i; -+ GModule *tracker; -+ -+ done = TRUE; -+ -+ tracker = g_module_open ("libtrackerclient.so.0", G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL); -+ if (!tracker) -+ return; -+ -+ for (i = 0; i < G_N_ELEMENTS (tracker_dl_mapping); i++) -+ { -+ if (!g_module_symbol (tracker, tracker_dl_mapping[i].fn_name, -+ tracker_dl_mapping[i].fn_ptr_ref)) -+ { -+ g_warning ("Missing symbol '%s' in libtracker\n", -+ tracker_dl_mapping[i].fn_name); -+ g_module_close (tracker); -+ -+ for (i = 0; i < G_N_ELEMENTS (tracker_dl_mapping); i++) -+ tracker_dl_mapping[i].fn_ptr_ref = NULL; -+ -+ return; -+ } -+ } -+ } -+} -+ - - struct NautilusSearchEngineTrackerDetails { - NautilusQuery *query; -@@ -260,6 +342,12 @@ - NautilusSearchEngineTracker *engine; - TrackerClient *tracker_client; - -+ open_libtracker (); -+ -+ if (!tracker_connect) { -+ return NULL; -+ } -+ - tracker_client = tracker_connect (FALSE); - - if (!tracker_client) { diff --git a/nautilus-2.16.2-icons-overlap-revert.patch b/nautilus-2.16.2-icons-overlap-revert.patch deleted file mode 100644 index 0096f96..0000000 --- a/nautilus-2.16.2-icons-overlap-revert.patch +++ /dev/null @@ -1,117 +0,0 @@ ---- nautilus-2.16.2/libnautilus-private/nautilus-icon-container.c.icons 2006-11-07 10:22:42.000000000 +0100 -+++ nautilus-2.16.2/libnautilus-private/nautilus-icon-container.c 2006-11-08 11:23:30.000000000 +0100 -@@ -287,8 +287,6 @@ - int x1, y1, x2, y2; - int container_x, container_y, container_width, container_height; - -- icon->has_lazy_position = FALSE; -- - if (icon->x == x && icon->y == y) { - return; - } -@@ -349,7 +347,7 @@ - if (icon->y == ICON_UNPOSITIONED_VALUE) { - icon->y = 0; - } -- -+ - eel_canvas_item_move (EEL_CANVAS_ITEM (icon->item), - x - icon->x, - y - icon->y); -@@ -5735,13 +5733,9 @@ - new_icons = g_list_reverse (new_icons); - no_position_icons = semi_position_icons = NULL; - for (p = new_icons; p != NULL; p = p->next) { -- gboolean has_lazy_position; -- - icon = p->data; -- has_lazy_position = icon->has_lazy_position; -- - if (assign_icon_position (container, icon)) { -- if (!container->details->is_reloading && !container->details->auto_layout && has_lazy_position) { -+ if (!container->details->auto_layout && icon->has_lazy_position) { - semi_position_icons = g_list_prepend (semi_position_icons, icon); - } - } else { -@@ -5774,7 +5768,6 @@ - for (p = semi_position_icons; p != NULL; p = p->next) { - NautilusIcon *icon; - int x, y; -- NautilusIconPosition position; - - icon = p->data; - x = icon->x; -@@ -5787,10 +5780,9 @@ - - placement_grid_mark_icon (grid, icon); - -- position.x = icon->x; -- position.y = icon->y; -- g_signal_emit (container, signals[ICON_POSITION_CHANGED], 0, -- icon->data, &position); -+ /* ensure that next time we run this code, the formerly semi-positioned -+ * icons are treated as being positioned. */ -+ icon->has_lazy_position = FALSE; - } - - placement_grid_free (grid); -@@ -6690,15 +6682,6 @@ - } - } - --void --nautilus_icon_container_set_is_reloading (NautilusIconContainer *container, -- gboolean is_reloading) --{ -- g_return_if_fail (NAUTILUS_IS_ICON_CONTAINER (container)); -- -- container->details->is_reloading = is_reloading; --} -- - gboolean - nautilus_icon_container_is_auto_layout (NautilusIconContainer *container) - { ---- nautilus-2.16.2/src/file-manager/fm-icon-view.c.icons 2006-11-07 10:22:42.000000000 +0100 -+++ nautilus-2.16.2/src/file-manager/fm-icon-view.c 2006-11-08 11:23:29.000000000 +0100 -@@ -531,12 +531,22 @@ - file_has_lazy_position (FMDirectoryView *view, - NautilusFile *file) - { -+ gboolean lazy_position; -+ - /* For volumes (i.e. cdrom icon) we use lazy positioning so that when - * an old cdrom gets re-mounted in a place that now has another -- * icon we don't overlap that one. -+ * icon we don't overlap that one. We don't do this in general though, -+ * as it can cause icons moving around. - */ -+ lazy_position = nautilus_file_has_volume (file); -+ if (lazy_position && fm_directory_view_get_loading (view)) { -+ /* if volumes are loaded during directory load, don't mark them -+ * as lazy. This is wrong for files that were mounted during user -+ * log-off, but it is right for files that were mounted during login. */ -+ lazy_position = FALSE; -+ } - -- return NAUTILUS_IS_DESKTOP_ICON_FILE (file); -+ return lazy_position; - } - - static void -@@ -1082,8 +1092,6 @@ - file = fm_directory_view_get_directory_as_file (view); - icon_container = GTK_WIDGET (get_icon_container (icon_view)); - -- nautilus_icon_container_set_is_reloading (NAUTILUS_ICON_CONTAINER (icon_container), TRUE); -- - nautilus_icon_container_set_allow_moves (NAUTILUS_ICON_CONTAINER (icon_container), - fm_directory_view_get_allow_moves (view)); - -@@ -1158,7 +1166,6 @@ - FMIconView *icon_view; - - icon_view = FM_ICON_VIEW (view); -- nautilus_icon_container_set_is_reloading (get_icon_container (icon_view), FALSE); - } - - static NautilusZoomLevel diff --git a/nautilus-2.16.2-searchengine-order.patch b/nautilus-2.16.2-searchengine-order.patch deleted file mode 100644 index 8bf4115..0000000 --- a/nautilus-2.16.2-searchengine-order.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- nautilus-2.16.2/libnautilus-private/nautilus-search-engine.c.order 2006-11-22 13:19:49.000000000 +0100 -+++ nautilus-2.16.2/libnautilus-private/nautilus-search-engine.c 2006-11-22 13:20:03.000000000 +0100 -@@ -126,19 +126,20 @@ - { - NautilusSearchEngine *engine; - --#ifdef HAVE_TRACKER -- engine = nautilus_search_engine_tracker_new (); -+#ifdef HAVE_BEAGLE -+ engine = nautilus_search_engine_beagle_new (); - if (engine) { - return engine; - } - #endif -- --#ifdef HAVE_BEAGLE -- engine = nautilus_search_engine_beagle_new (); -+ -+#ifdef HAVE_TRACKER -+ engine = nautilus_search_engine_tracker_new (); - if (engine) { - return engine; - } - #endif -+ - engine = nautilus_search_engine_simple_new (); - return engine; - } diff --git a/nautilus-2.20-async_thumbnail_fixes.patch b/nautilus-2.20-async_thumbnail_fixes.patch deleted file mode 100644 index acd94ed..0000000 --- a/nautilus-2.20-async_thumbnail_fixes.patch +++ /dev/null @@ -1,157 +0,0 @@ -Index: libnautilus-private/nautilus-icon-factory.c -=================================================================== ---- libnautilus-private/nautilus-icon-factory.c (.../tags/NAUTILUS_2_20_0) (revision 13249) -+++ libnautilus-private/nautilus-icon-factory.c (.../branches/gnome-2-20) (revision 13249) -@@ -200,7 +200,7 @@ - const char *modifier, - guint nominal_size, - gboolean force_nominal); --static void nautilus_icon_factory_clear (void); -+static void nautilus_icon_factory_clear (gboolean clear_pathnames); - - GNOME_CLASS_BOILERPLATE (NautilusIconFactory, - nautilus_icon_factory, -@@ -270,7 +270,7 @@ - { - NautilusIconFactory *factory; - -- nautilus_icon_factory_clear (); -+ nautilus_icon_factory_clear (FALSE); - - factory = user_data; - -@@ -384,9 +384,21 @@ - goto out; - } - -+ if (!gdk_pixbuf_get_has_alpha (pixbuf)) { -+ /* we don't own the pixbuf, but nautilus_thumbnail_frame_image() assumes so and unrefs it. */ -+ g_object_ref (pixbuf); -+ -+ nautilus_thumbnail_frame_image (&pixbuf); -+ /* at this point, we own a pixbuf, which is the framed version of the passed-in pixbuf. */ -+ } -+ - cached_icon = cache_icon_new (pixbuf, NULL, scale_x, scale_y); - cached_icon->mtime = statbuf.st_mtime; - -+ if (!gdk_pixbuf_get_has_alpha (pixbuf)) { -+ g_object_unref (pixbuf); -+ } -+ - if (cached_icon != NULL) { - key = g_new (CacheKey, 1); - key->name = g_strdup (path); -@@ -714,9 +726,23 @@ - return TRUE; - } - --/* Reset the cache to the default state. */ -+static gboolean -+remove_non_pathnames (gpointer _key, gpointer value, gpointer user_data) -+{ -+ CacheKey *key = _key; -+ -+ if (key->name && key->name[0] == '/') { -+ return FALSE; -+ } -+ -+ return TRUE; /* Tell the caller to remove the hash table entry. */ -+} -+ -+/* Reset the cache to the default state. -+ Clear pathnames can be set to FALSE which means we only clear icon names, not -+ absolute pathnames. This is useful to avoid throwing away all loaded thumbnails. */ - static void --nautilus_icon_factory_clear (void) -+nautilus_icon_factory_clear (gboolean clear_pathnames) - { - NautilusIconFactory *factory; - CircularList *head; -@@ -724,24 +750,25 @@ - factory = get_icon_factory (); - - g_hash_table_foreach_remove (factory->icon_cache, -- remove_all, -+ clear_pathnames ? remove_all : remove_non_pathnames, - NULL); - - /* Empty out the recently-used list. */ - head = &factory->recently_used_dummy_head; - -- /* fallback_icon hangs around, but we don't know if it -- * was ever inserted in the list -- */ -- g_assert (factory->recently_used_count == 0 || -- factory->recently_used_count == 1); -- -- if (factory->recently_used_count == 1) { -- /* make sure this one is the fallback_icon */ -- g_assert (head->next == head->prev); -- g_assert (&factory->fallback_icon->recently_used_node == head->next); -+ if (clear_pathnames) { -+ /* fallback_icon hangs around, but we don't know if it -+ * was ever inserted in the list -+ */ -+ g_assert (factory->recently_used_count == 0 || -+ factory->recently_used_count == 1); -+ if (factory->recently_used_count == 1) { -+ /* make sure this one is the fallback_icon */ -+ g_assert (head->next == head->prev); -+ g_assert (&factory->fallback_icon->recently_used_node == head->next); -+ } - } -- -+ - } - - static void -@@ -794,7 +821,7 @@ - * signal to mean only "thumbnails might have changed" if this ends up being slow - * for some reason. - */ -- nautilus_icon_factory_clear (); -+ nautilus_icon_factory_clear (TRUE); - g_signal_emit (global_icon_factory, - signals[ICONS_CHANGED], 0); - } -@@ -808,7 +835,7 @@ - * signal to mean only "thumbnails might have changed" if this ends up being slow - * for some reason. - */ -- nautilus_icon_factory_clear (); -+ nautilus_icon_factory_clear (TRUE); - g_signal_emit (global_icon_factory, - signals[ICONS_CHANGED], 0); - } -@@ -818,7 +845,7 @@ - { - show_image_thumbs = eel_preferences_get_enum (NAUTILUS_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS); - -- nautilus_icon_factory_clear (); -+ nautilus_icon_factory_clear (TRUE); - /* If the user disabled thumbnailing, remove all outstanding thumbnails */ - if (show_image_thumbs == NAUTILUS_SPEED_TRADEOFF_NEVER) { - nautilus_thumbnail_remove_all_from_queue (); -@@ -836,7 +863,7 @@ - /* We don't know which data changed, so we have to assume that - * any or all icons might have changed. - */ -- nautilus_icon_factory_clear (); -+ nautilus_icon_factory_clear (FALSE); - g_signal_emit (get_icon_factory (), - signals[ICONS_CHANGED], 0); - } -Index: libnautilus-private/nautilus-directory-async.c -=================================================================== ---- libnautilus-private/nautilus-directory-async.c (.../tags/NAUTILUS_2_20_0) (revision 13249) -+++ libnautilus-private/nautilus-directory-async.c (.../branches/gnome-2-20) (revision 13249) -@@ -594,7 +594,7 @@ - NAUTILUS_FILE_ATTRIBUTE_FILE_TYPE | - NAUTILUS_FILE_ATTRIBUTE_DIRECTORY_ITEM_MIME_TYPES; - -- nautilus_directory_invalidate_file_attributes (dir, attrs); -+ nautilus_directory_force_reload_internal (dir, attrs); - } - - void diff --git a/nautilus-2.20-make-audio-preview-work.patch b/nautilus-2.20-make-audio-preview-work.patch deleted file mode 100644 index d9c719b..0000000 --- a/nautilus-2.20-make-audio-preview-work.patch +++ /dev/null @@ -1,252 +0,0 @@ ---- src/file-manager/fm-icon-view.c 2007/10/21 22:34:58 1.1 -+++ src/file-manager/fm-icon-view.c 2007/10/21 22:42:05 -@@ -24,6 +24,7 @@ - - #include - #include "fm-icon-view.h" -+#include "nautilus-audio-mime-types.h" - - #include "fm-actions.h" - #include "fm-icon-container.h" -@@ -165,7 +166,6 @@ static const SortCriterion sort_criteria - - static gboolean default_sort_in_reverse_order = FALSE; - static int preview_sound_auto_value; --static gboolean gnome_esd_enabled_auto_value; - - #if USE_OLD_AUDIO_PREVIEW - static pid_t audio_preview_pid = 0; -@@ -1747,6 +1747,28 @@ band_select_ended_callback (NautilusIcon - - /* handle the preview signal by inspecting the mime type. For now, we only preview local sound files. */ - -+#if USE_OLD_AUDIO_PREVIEW -+static char * -+get_preview_command (void) -+{ -+ char *command; -+ -+ command = g_find_program_in_path ("totem-audio-preview"); -+ if (command) -+ return command; -+ command = g_find_program_in_path ("gst-launch-0.10"); -+ if (command) { -+ char *new_cmd; -+ -+ new_cmd = g_strdup_printf ("%s playbin uri=fd://0", command); -+ g_free (command); -+ return new_cmd; -+ } -+ -+ return NULL; -+} -+#endif /* USE_OLD_AUDIO_PREVIEW */ -+ - /* here's the timer task that actually plays the file using mpg123, ogg123 or play. */ - /* FIXME bugzilla.gnome.org 41258: we should get the application from our mime-type stuff */ - static gboolean -@@ -1757,50 +1779,27 @@ play_file (gpointer callback_data) - FMIconView *icon_view; - FILE *sound_process; - char *file_uri; -- char *suffix; -- char *mime_type; -- const char *command_str; -- gboolean is_mp3; -- gboolean is_ogg; -+ char *command_str; - pid_t mp3_pid; - - GnomeVFSResult result; - GnomeVFSHandle *handle; - char *buffer; -- const char *audio_device = NULL; - GnomeVFSFileSize bytes_read; - -- audio_device = g_getenv ("AUDIODEV"); - icon_view = FM_ICON_VIEW (callback_data); -+ -+ command_str = get_preview_command (); -+ if (command_str == NULL) -+ return FALSE; - - file = icon_view->details->audio_preview_file; - file_uri = nautilus_file_get_uri (file); -- mime_type = nautilus_file_get_mime_type (file); -- is_mp3 = eel_strcasecmp (mime_type, "audio/mpeg") == 0; -- is_ogg = eel_strcasecmp (mime_type, "application/ogg") == 0 || -- eel_strcasecmp (mime_type, "application/x-ogg") == 0; - - mp3_pid = fork (); - if (mp3_pid == (pid_t) 0) { - /* Set the group (session) id to this process for future killing. */ - setsid(); -- if (is_mp3) { -- command_str = "mpg123 -y -q -"; -- } else if (is_ogg) { -- command_str = "ogg123 -q -"; -- } else { -- suffix = strrchr(file_uri, '.'); -- if (suffix == NULL) { -- suffix = "wav"; -- } else { -- suffix += 1; /* skip the period */ -- } -- if (audio_device) { -- command_str = g_strdup_printf("play -d %s -t %s -", audio_device, suffix); -- } else { -- command_str = g_strdup_printf("play -t %s -", suffix); -- } -- } - - /* read the file with gnome-vfs, feeding it to the sound player's standard input */ - /* First, open the file. */ -@@ -1851,7 +1850,7 @@ play_file (gpointer callback_data) - } - - g_free (file_uri); -- g_free (mime_type); -+ g_free (command_str); - - icon_view->details->audio_preview_timeout = 0; - #else -@@ -1923,15 +1922,30 @@ preview_audio (FMIconView *icon_view, Na - } - - static gboolean --should_preview_sound (NautilusFile *file) -+sound_preview_type_supported (NautilusFile *file) - { -- char *uri; -+ char *mime_type; -+ guint i; - -- /* Check gnome config sound preference */ -- if (!gnome_esd_enabled_auto_value) { -+ mime_type = nautilus_file_get_mime_type (file); -+ if (mime_type == NULL) - return FALSE; -+ for (i = 0; i < G_N_ELEMENTS (audio_mime_types); i++) { -+ GnomeVFSMimeEquivalence equivalence = gnome_vfs_mime_type_get_equivalence (mime_type, audio_mime_types[i]); -+ if (equivalence == GNOME_VFS_MIME_IDENTICAL || equivalence == GNOME_VFS_MIME_PARENT) { -+ g_free (mime_type); -+ return TRUE; -+ } - } - -+ return FALSE; -+} -+ -+static gboolean -+should_preview_sound (NautilusFile *file) -+{ -+ char *uri; -+ - uri = nautilus_file_get_uri (file); - if (uri && eel_istr_has_prefix (uri, "burn:")) { - g_free (uri); -@@ -1957,10 +1971,7 @@ can_play_sound (void) - int open_result; - - #if USE_OLD_AUDIO_PREVIEW -- /* first see if there's already one in progress; if so, return true */ -- if (audio_preview_pid > 0) { -- return TRUE; -- } -+ return TRUE; - #endif - - /* Now check and see if system has audio out capabilites */ -@@ -1981,25 +1992,17 @@ icon_container_preview_callback (Nautilu - FMIconView *icon_view) - { - int result; -- char *mime_type, *file_name, *message; -+ char *file_name, *message; - - result = 0; - - /* preview files based on the mime_type. */ - /* at first, we just handle sounds */ - if (should_preview_sound (file)) { -- mime_type = nautilus_file_get_mime_type (file); -- -- if ((eel_istr_has_prefix (mime_type, "audio/") -- || eel_istr_has_prefix (mime_type, "application/ogg") -- || eel_istr_has_prefix (mime_type, "application/x-ogg")) -- && eel_strcasecmp (mime_type, "audio/x-pn-realaudio") != 0 -- && eel_strcasecmp (mime_type, "audio/x-mpegurl") != 0 -- && can_play_sound ()) { -+ if (sound_preview_type_supported (file) && can_play_sound ()) { - result = 1; - preview_audio (icon_view, file, start_flag); - } -- g_free (mime_type); - } - - /* Display file name in status area at low zoom levels, since -@@ -2708,10 +2711,6 @@ fm_icon_view_init (FMIconView *icon_view - eel_preferences_add_auto_enum (NAUTILUS_PREFERENCES_PREVIEW_SOUND, - &preview_sound_auto_value); - -- eel_preferences_monitor_directory ("/desktop/gnome/sound"); -- eel_preferences_add_auto_boolean ("/desktop/gnome/sound/enable_esd", -- &gnome_esd_enabled_auto_value); -- - setup_sound_preview = TRUE; - } - ---- src/file-manager/nautilus-audio-mime-types.h 2007/10/21 22:36:41 1.1 -+++ src/file-manager/nautilus-audio-mime-types.h 2007/10/21 22:36:50 -@@ -0,0 +1,41 @@ -+/* generated with mime-types-include.sh in the totem module, don't edit or -+ commit in the nautilus module without filing a bug against totem */ -+static char *audio_mime_types[] = { -+"audio/3gpp", -+"audio/ac3", -+"audio/AMR", -+"audio/AMR-WB", -+"audio/basic", -+"audio/mp4", -+"audio/mpeg", -+"audio/mpegurl", -+"audio/ogg", -+"audio/vnd.rn-realaudio", -+"audio/x-ape", -+"audio/x-flac", -+"audio/x-it", -+"audio/x-m4a", -+"audio/x-matroska", -+"audio/x-mod", -+"audio/x-mp3", -+"audio/x-mpeg", -+"audio/x-mpegurl", -+"audio/x-ms-asf", -+"audio/x-ms-asx", -+"audio/x-ms-wax", -+"audio/x-ms-wma", -+"audio/x-musepack", -+"audio/x-pn-aiff", -+"audio/x-pn-au", -+"audio/x-pn-wav", -+"audio/x-pn-windows-acm", -+"audio/x-realaudio", -+"audio/x-real-audio", -+"audio/x-sbc", -+"audio/x-scpls", -+"audio/x-tta", -+"audio/x-wav", -+"audio/x-wav", -+"audio/x-wavpack", -+"audio/x-vorbis", -+}; ---- src/file-manager/Makefile.am 2007/10/21 22:36:41 1.1 -+++ src/file-manager/Makefile.am 2007/10/21 22:36:50 -@@ -38,6 +38,7 @@ libnautilus_file_manager_la_SOURCES= \ - fm-tree-model.h \ - fm-tree-view.c \ - fm-tree-view.h \ -+ nautilus-audio-mime-types.h \ - $(NULL) - - EMPTY_VIEW_SOURCES = \ diff --git a/nautilus-2.20.0-small-font-fix.patch b/nautilus-2.20.0-small-font-fix.patch deleted file mode 100644 index 1d16ae1..0000000 --- a/nautilus-2.20.0-small-font-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up nautilus-2.20.0/src/nautilus-sidebar-title.c.small-font nautilus-2.20.0/src/nautilus-sidebar-title.c ---- nautilus-2.20.0/src/nautilus-sidebar-title.c.small-font 2007-10-02 21:04:51.000000000 -0400 -+++ nautilus-2.20.0/src/nautilus-sidebar-title.c 2007-10-02 21:16:36.000000000 -0400 -@@ -364,7 +364,7 @@ update_title_font (NautilusSidebarTitle - title_font = pango_font_description_copy (style->font_desc); - - max_style_font_size = pango_font_description_get_size (title_font) * 1.8 / PANGO_SCALE; -- if (max_style_font_size < MIN_TITLE_FONT_SIZE) { -+ if (max_style_font_size < MIN_TITLE_FONT_SIZE + 1) { - max_style_font_size = MIN_TITLE_FONT_SIZE + 1; - } - diff --git a/nautilus-desktop-keynav.patch b/nautilus-desktop-keynav.patch deleted file mode 100644 index 84e0847..0000000 --- a/nautilus-desktop-keynav.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: src/nautilus-shell-ui.xml -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-shell-ui.xml,v -retrieving revision 1.115 -diff -u -p -r1.115 nautilus-shell-ui.xml ---- src/nautilus-shell-ui.xml 29 Jul 2004 22:31:42 -0000 1.115 -+++ src/nautilus-shell-ui.xml 7 Sep 2004 12:25:22 -0000 -@@ -40,6 +40,7 @@ - - - -+ - - - -Index: src/nautilus-spatial-window-ui.xml -=================================================================== -RCS file: /cvs/gnome/nautilus/src/nautilus-spatial-window-ui.xml,v -retrieving revision 1.12 -diff -u -p -r1.12 nautilus-spatial-window-ui.xml ---- src/nautilus-spatial-window-ui.xml 29 Jul 2004 22:31:42 -0000 1.12 -+++ src/nautilus-spatial-window-ui.xml 7 Sep 2004 12:25:22 -0000 -@@ -8,6 +8,7 @@ - - - -+ - - - -Index: src/file-manager/nautilus-directory-view-ui.xml -=================================================================== -RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v -retrieving revision 1.68 -diff -u -p -r1.68 nautilus-directory-view-ui.xml ---- src/file-manager/nautilus-directory-view-ui.xml 12 Aug 2004 20:12:36 -0000 1.68 -+++ src/file-manager/nautilus-directory-view-ui.xml 7 Sep 2004 12:25:22 -0000 -@@ -97,9 +97,21 @@ - - - -+ - - - -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ - - - diff --git a/nautilus-tooltips.patch b/nautilus-tooltips.patch deleted file mode 100644 index c4afa11..0000000 --- a/nautilus-tooltips.patch +++ /dev/null @@ -1,459 +0,0 @@ -Index: src/nautilus-window-private.h -=================================================================== ---- src/nautilus-window-private.h (revision 13010) -+++ src/nautilus-window-private.h (revision 13011) -@@ -123,7 +123,6 @@ - - /* Toolbar */ - GtkWidget *toolbar; -- GtkTooltips *tooltips; - GtkWidget *location_bar; - - guint extensions_toolbar_merge_id; -Index: src/nautilus-navigation-window.c -=================================================================== ---- src/nautilus-navigation-window.c (revision 13010) -+++ src/nautilus-navigation-window.c (revision 13011) -@@ -182,8 +182,8 @@ - "active", location_button_should_be_active (window), - NULL); - -- gtk_tooltips_set_tip (window->details->tooltips, button, -- _("Toggle between button and text-based location bar"), NULL); -+ gtk_widget_set_tooltip_text (button, -+ _("Toggle between button and text-based location bar")); - - g_signal_connect (button, "toggled", - G_CALLBACK (location_button_toggled_cb), window); -@@ -199,12 +199,8 @@ - GtkWidget *view_as_menu_vbox; - GtkToolItem *item; - GtkWidget *hbox, *vbox, *eventbox, *extras_vbox; -- -- window->details = g_new0 (NautilusNavigationWindowDetails, 1); - -- window->details->tooltips = gtk_tooltips_new (); -- g_object_ref (window->details->tooltips); -- gtk_object_sink (GTK_OBJECT (window->details->tooltips)); -+ window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, NAUTILUS_TYPE_NAVIGATION_WINDOW, NautilusNavigationWindowDetails); - - window->details->content_paned = nautilus_horizontal_splitter_new (); - gtk_table_attach (GTK_TABLE (NAUTILUS_WINDOW (window)->details->table), -@@ -696,11 +692,6 @@ - - window->details->content_paned = NULL; - -- if (window->details->tooltips) { -- g_object_unref (window->details->tooltips); -- window->details->tooltips = NULL; -- } -- - GTK_OBJECT_CLASS (parent_class)->destroy (object); - } - -@@ -715,8 +706,6 @@ - nautilus_navigation_window_clear_back_list (window); - nautilus_navigation_window_clear_forward_list (window); - -- g_free (window->details); -- - G_OBJECT_CLASS (parent_class)->finalize (object); - } - -@@ -1591,4 +1580,6 @@ - NAUTILUS_WINDOW_CLASS (class)->get_icon_name = real_get_icon_name; - NAUTILUS_WINDOW_CLASS (class)->get_default_size = real_get_default_size; - NAUTILUS_WINDOW_CLASS (class)->close = real_window_close; -+ -+ g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (NautilusNavigationWindowDetails)); - } -Index: src/nautilus-navigation-window.h -=================================================================== ---- src/nautilus-navigation-window.h (revision 13010) -+++ src/nautilus-navigation-window.h (revision 13011) -@@ -72,8 +72,6 @@ - - /* Widgets to keep track of (for state changes, etc) */ - GtkWidget *zoom_control; -- -- GtkTooltips *tooltips; - }; - - -Index: src/nautilus-navigation-action.c -=================================================================== ---- src/nautilus-navigation-action.c (revision 13010) -+++ src/nautilus-navigation-action.c (revision 13011) -@@ -176,31 +176,20 @@ - } - } - --static gboolean --set_tooltip_callback (GtkMenuToolButton *proxy, -- GtkTooltips *tooltips, -- const char *tip, -- const char *tip_private, -- NautilusNavigationAction *action) --{ -- gtk_menu_tool_button_set_arrow_tooltip (proxy, tooltips, -- action->priv->arrow_tooltip, -- NULL); -- -- return FALSE; --} -- - static void - connect_proxy (GtkAction *action, GtkWidget *proxy) - { -- GtkWidget *menu; -- - if (GTK_IS_MENU_TOOL_BUTTON (proxy)) { -+ NautilusNavigationAction *naction = NAUTILUS_NAVIGATION_ACTION (action); -+ GtkMenuToolButton *button = GTK_MENU_TOOL_BUTTON (proxy); -+ GtkWidget *menu; -+ -+ /* set an empty menu, so the arrow button becomes sensitive */ - menu = gtk_menu_new (); -- gtk_menu_tool_button_set_menu (GTK_MENU_TOOL_BUTTON (proxy), -- menu); -- g_signal_connect (proxy, "set-tooltip", -- G_CALLBACK (set_tooltip_callback), action); -+ gtk_menu_tool_button_set_menu (button, menu); -+ -+ gtk_menu_tool_button_set_arrow_tooltip_text (button, -+ naction->priv->arrow_tooltip); - - g_signal_connect (proxy, "show-menu", - G_CALLBACK (show_menu_callback), action); -@@ -213,7 +202,6 @@ - disconnect_proxy (GtkAction *action, GtkWidget *proxy) - { - if (GTK_IS_MENU_TOOL_BUTTON (proxy)) { -- g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (set_tooltip_callback), action); - g_signal_handlers_disconnect_by_func (proxy, G_CALLBACK (show_menu_callback), action); - } - -Index: src/nautilus-trash-bar.c -=================================================================== ---- src/nautilus-trash-bar.c (revision 13010) -+++ src/nautilus-trash-bar.c (revision 13011) -@@ -33,7 +33,6 @@ - - struct NautilusTrashBarPrivate - { -- GtkTooltips *tooltips; - GtkWidget *button; - }; - -@@ -74,20 +73,6 @@ - } - - static void --nautilus_trash_bar_finalize (GObject *object) --{ -- NautilusTrashBar *bar; -- -- bar = NAUTILUS_TRASH_BAR (object); -- -- if (bar->priv->tooltips != NULL) { -- g_object_unref (bar->priv->tooltips); -- } -- -- G_OBJECT_CLASS (nautilus_trash_bar_parent_class)->finalize (object); --} -- --static void - nautilus_trash_bar_trash_state_changed (NautilusTrashMonitor *trash_monitor, - gboolean state, - gpointer data) -@@ -107,7 +92,6 @@ - - object_class = G_OBJECT_CLASS (klass); - -- object_class->finalize = nautilus_trash_bar_finalize; - object_class->get_property = nautilus_trash_bar_get_property; - object_class->set_property = nautilus_trash_bar_set_property; - -@@ -144,15 +128,9 @@ - - gtk_widget_set_sensitive (bar->priv->button, - !nautilus_trash_monitor_is_empty ()); -+ gtk_widget_set_tooltip_text (bar->priv->button, -+ _("Delete all items in the Trash")); - -- bar->priv->tooltips = gtk_tooltips_new (); -- g_object_ref_sink (bar->priv->tooltips); -- -- gtk_tooltips_set_tip (GTK_TOOLTIPS (bar->priv->tooltips), -- bar->priv->button, -- _("Delete all items in the Trash"), -- NULL); -- - g_signal_connect (bar->priv->button, - "clicked", - G_CALLBACK (empty_trash_callback), -Index: src/nautilus-query-editor.c -=================================================================== ---- src/nautilus-query-editor.c (revision 13010) -+++ src/nautilus-query-editor.c (revision 13011) -@@ -45,7 +45,6 @@ - #include "gtk/gtkscrolledwindow.h" - #include - #include "gtk/gtkcelllayout.h" --#include "gtk/gtktooltips.h" - #include "gtk/gtkcellrenderertext.h" - #include - #include -@@ -87,7 +86,6 @@ - gboolean is_visible; - GtkWidget *invisible_vbox; - GtkWidget *visible_vbox; -- GtkTooltips *tooltips; - - GList *rows; - -@@ -179,11 +177,6 @@ - eel_remove_weak_pointer (&editor->details->bar); - } - -- if (editor->details->tooltips) { -- g_object_unref (editor->details->tooltips); -- editor->details->tooltips = NULL; -- } -- - EEL_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); - } - -@@ -931,9 +924,8 @@ - - g_signal_connect (button, "clicked", - G_CALLBACK (remove_row_cb), row); -- -- gtk_tooltips_set_tip (editor->details->tooltips, button, -- _("Remove this criterion from the search"), NULL); -+ gtk_widget_set_tooltip_text (button, -+ _("Remove this criterion from the search")); - - gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); - -@@ -991,12 +983,8 @@ - g_signal_connect (button, "clicked", - G_CALLBACK (edit_clicked), editor); - -- editor->details->tooltips = gtk_tooltips_new (); -- g_object_ref (editor->details->tooltips); -- gtk_object_sink (GTK_OBJECT (editor->details->tooltips)); -- -- gtk_tooltips_set_tip (editor->details->tooltips, button, -- _("Edit the saved search"), NULL); -+ gtk_widget_set_tooltip_text (button, -+ _("Edit the saved search")); - } - - void -@@ -1026,8 +1014,8 @@ - - gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); - -- gtk_tooltips_set_tip (editor->details->tooltips, button, -- _("Add a new criterion to this search"), NULL); -+ gtk_widget_set_tooltip_text (button, -+ _("Add a new criterion to this search")); - - if (!editor->details->is_indexed) { - if (use_go) { -@@ -1036,10 +1024,10 @@ - button = gtk_button_new_with_label (_("Reload")); - } - gtk_widget_show (button); -+ -+ gtk_widget_set_tooltip_text (button, -+ _("Perform or update the search")); - -- gtk_tooltips_set_tip (editor->details->tooltips, button, -- _("Perform or update the search"), NULL); -- - g_signal_connect (button, "clicked", - G_CALLBACK (go_search_cb), editor); - -Index: src/nautilus-side-pane.c -=================================================================== ---- src/nautilus-side-pane.c (revision 13010) -+++ src/nautilus-side-pane.c (revision 13011) -@@ -36,7 +36,6 @@ - #include - #include - #include --#include - #include - #include - -@@ -56,14 +55,13 @@ - GtkWidget *title_hbox; - GtkWidget *title_label; - GtkWidget *shortcut_box; -- GtkTooltips *tooltips; - GList *panels; - }; - --static void nautilus_side_pane_class_init (GtkObjectClass *object_klass); --static void nautilus_side_pane_init (GtkObject *object); --static void nautilus_side_pane_destroy (GtkObject *object); --static void nautilus_side_pane_finalize (GObject *object); -+static void nautilus_side_pane_class_init (NautilusSidePaneClass *klass); -+static void nautilus_side_pane_init (GObject *object); -+static void nautilus_side_pane_dispose (GObject *object); -+static void nautilus_side_pane_finalize (GObject *object); - - enum { - CLOSE_REQUESTED, -@@ -96,7 +94,7 @@ - { - g_free (panel->title); - g_free (panel->tooltip); -- g_free (panel); -+ g_slice_free (SidePanel, panel); - } - - static void -@@ -162,24 +160,21 @@ - - /* initializing the class object by installing the operations we override */ - static void --nautilus_side_pane_class_init (GtkObjectClass *object_klass) -+nautilus_side_pane_class_init (NautilusSidePaneClass *klass) - { -- GtkWidgetClass *widget_class; - GObjectClass *gobject_class; -+ GtkWidgetClass *widget_class; -+ -+ gobject_class = G_OBJECT_CLASS (klass); -+ widget_class = GTK_WIDGET_CLASS (klass); - -- NautilusSidePaneClass *klass; -- -- widget_class = GTK_WIDGET_CLASS (object_klass); -- klass = NAUTILUS_SIDE_PANE_CLASS (object_klass); -- gobject_class = G_OBJECT_CLASS (object_klass); -- - gobject_class->finalize = nautilus_side_pane_finalize; -- object_klass->destroy = nautilus_side_pane_destroy; -+ gobject_class->dispose = nautilus_side_pane_dispose; - widget_class->size_allocate = nautilus_side_pane_size_allocate; - - signals[CLOSE_REQUESTED] = g_signal_new - ("close_requested", -- G_TYPE_FROM_CLASS (object_klass), -+ G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NautilusSidePaneClass, - close_requested), -@@ -188,13 +183,15 @@ - G_TYPE_NONE, 0); - signals[SWITCH_PAGE] = g_signal_new - ("switch_page", -- G_TYPE_FROM_CLASS (object_klass), -+ G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (NautilusSidePaneClass, - switch_page), - NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, 1, GTK_TYPE_WIDGET); -+ -+ g_type_class_add_private (gobject_class, sizeof (NautilusSidePaneDetails)); - } - - static void -@@ -313,7 +310,7 @@ - } - - static void --nautilus_side_pane_init (GtkObject *object) -+nautilus_side_pane_init (GObject *object) - { - NautilusSidePane *side_pane; - GtkWidget *frame; -@@ -326,7 +323,7 @@ - - side_pane = NAUTILUS_SIDE_PANE (object); - -- side_pane->details = g_new0 (NautilusSidePaneDetails, 1); -+ side_pane->details = G_TYPE_INSTANCE_GET_PRIVATE (object, NAUTILUS_TYPE_SIDE_PANE, NautilusSidePaneDetails); - - frame = gtk_frame_new (NULL); - side_pane->details->title_frame = frame; -@@ -419,16 +416,12 @@ - - gtk_widget_show (side_pane->details->menu); - -- side_pane->details->tooltips = gtk_tooltips_new (); -- g_object_ref (side_pane->details->tooltips); -- gtk_object_sink (GTK_OBJECT (side_pane->details->tooltips)); -- -- gtk_tooltips_set_tip (side_pane->details->tooltips, close_button, -- _("Close the side pane"), NULL); -+ gtk_widget_set_tooltip_text (close_button, -+ _("Close the side pane")); - } - - static void --nautilus_side_pane_destroy (GtkObject *object) -+nautilus_side_pane_dispose (GObject *object) - { - NautilusSidePane *side_pane; - -@@ -439,12 +432,7 @@ - side_pane->details->menu = NULL; - } - -- if (side_pane->details->tooltips) { -- g_object_unref (side_pane->details->tooltips); -- side_pane->details->tooltips = NULL; -- } -- -- EEL_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object)); -+ EEL_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); - } - - static void -@@ -461,8 +449,6 @@ - - g_list_free (side_pane->details->panels); - -- g_free (side_pane->details); -- - EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object)); - } - -@@ -487,7 +473,7 @@ - g_return_if_fail (title != NULL); - g_return_if_fail (tooltip != NULL); - -- panel = g_new0 (SidePanel, 1); -+ panel = g_slice_new0 (SidePanel); - panel->title = g_strdup (title); - panel->tooltip = g_strdup (tooltip); - panel->widget = widget; -@@ -597,7 +583,7 @@ - g_signal_connect (button, "clicked", - G_CALLBACK (shortcut_clicked_callback), side_pane); - -- gtk_tooltips_set_tip (side_pane->details->tooltips, button, panel->tooltip, NULL); -+ gtk_widget_set_tooltip_text (button, panel->tooltip); - - image = gtk_image_new_from_pixbuf (pixbuf); - gtk_widget_show (image); -Index: configure.in -=================================================================== ---- configure.in (revision 13010) -+++ configure.in (revision 13011) -@@ -14,7 +14,7 @@ - m4_define(gnome_vfs_minver, 2.14.2) - m4_define(orbit_minver, 2.4.0) - m4_define(pango_minver, 1.1.2) --m4_define(gtk_minver, 2.10.0) -+m4_define(gtk_minver, 2.11.6) - m4_define(rsvg_minver, 2.0.1) - m4_define(xml_minver, 2.4.7) - m4_define(startup_notification_minver, 0.8) diff --git a/nautilus.spec b/nautilus.spec index 0ad0728..202969d 100644 --- a/nautilus.spec +++ b/nautilus.spec @@ -1,4 +1,4 @@ -%define glib2_version 2.15.0 +%define glib2_version 2.15.1 %define pango_version 1.1.3 %define gtk2_version 2.11.6 %define libgnomeui_version 2.6.0 @@ -14,11 +14,12 @@ %define startup_notification_version 0.5 %define libexif_version 0.5.12 %define gconf_version 2.14 +%define exempi_version 1.99.5 Name: nautilus Summary: Nautilus is a file manager for GNOME -Version: 2.21.1 -Release: 2%{?dist} +Version: 2.21.2 +Release: 1%{?dist} License: GPLv2+ Group: User Interface/Desktops Source: http://download.gnome.org/sources/%{name}/2.21/%{name}-%{version}.tar.bz2 @@ -57,6 +58,7 @@ BuildRequires: desktop-file-utils >= %{desktop_file_utils_version} BuildRequires: libtool >= 1.4.2-10 BuildRequires: startup-notification-devel >= %{startup_notification_version} BuildRequires: libexif-devel >= %{libexif_version} +BuildRequires: exempi-devel >= %{exempi_version} BuildRequires: gettext # For intltool: BuildRequires: perl(XML::Parser) >= 2.31-16 @@ -81,9 +83,6 @@ Patch6: nautilus-2.21.1-dynamic-search.patch Patch7: rtl-fix.patch -# http://bugzilla.gnome.org/show_bug.cgi?id=505331 -Patch8: extensiondir.patch - %description Nautilus integrates access to files, applications, media, Internet-based resources and the Web. Nautilus delivers a dynamic and @@ -118,7 +117,6 @@ for writing nautilus extensions. #%patch5 -p1 -b .selinux %patch6 -p1 -b .dynamic-search %patch7 -p1 -b .rtl-fix -%patch8 -p1 -b .extensiondir %build @@ -227,6 +225,9 @@ fi %{_libdir}/*.so %changelog +* Tue Jan 8 2008 Matthias Clasen - 2.21.2-1 +- Update to 2.21.2 + * Sun Dec 23 2007 Matthias Clasen - 2.21.1-2 - Fix extensiondir diff --git a/sources b/sources index 0fd7766..e5fcc62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c52c447617196434fc0fc81b48610f65 nautilus-2.21.1.tar.bz2 +fa82ba45ba503a42caf51a82cf87b47a nautilus-2.21.2.tar.bz2