This commit is contained in:
Matthias Clasen 2008-01-08 17:42:52 +00:00
parent 2dfc0814fa
commit 385e331d87
23 changed files with 10 additions and 4663 deletions

View File

@ -1 +1 @@
nautilus-2.21.1.tar.bz2
nautilus-2.21.2.tar.bz2

View File

@ -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

View File

@ -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 <eel/eel-string.h>
-#include <X11/Xatom.h>
-#include <gdk/gdkx.h>
#include <gtk/gtkmain.h>
#include <gtk/gtksignal.h>
#include <libgnome/gnome-config.h>
@@ -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);

View File

@ -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 @@
<type>string</type>
<default>Sans 10</default>
<locale name="C">
- <default><!-- 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. -->Sans 10</default>
+ <default><!-- Translators: please note this can choose the size. e.g. "Sans 15". Please do not change "Sans", only change the size if you need to. In most cases, this should be left alone. -->Sans 10</default>
<short>Desktop font</short>
<long>
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"

View File

@ -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"), "<alt><shift>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 @@
<menuitem name="Mount Volume" action="Mount Volume"/>
<menuitem name="Unmount Volume" action="Unmount Volume"/>
<menuitem name="Eject Volume" action="Eject Volume"/>
+ <menuitem name="Format Volume" action="Format Volume"/>
</placeholder>
<menuitem name="Connect To Server Link" action="Connect To Server Link"/>
</popup>

View File

@ -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 <eel/eel-accessibility.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtksignal.h>
+#include <gdk/gdk.h>
#include <libart_lgpl/art_rgb.h>
#include <libart_lgpl/art_rgb_affine.h>
#include <libart_lgpl/art_rgb_rgba_affine.h>
@@ -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

View File

@ -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 &&

View File

@ -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);
}

View File

@ -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 &&

View File

@ -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 */

View File

@ -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);

File diff suppressed because it is too large Load Diff

View File

@ -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;
}

View File

@ -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 <config.h>
#include "nautilus-search-engine-beagle.h"
-#include <beagle/beagle.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-glib-extensions.h>
+#include <gmodule.h>
+
+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 <config.h>
#include "nautilus-search-engine-tracker.h"
-#include <tracker.h>
+#include <gmodule.h>
#include <libgnomevfs/gnome-vfs-utils.h>
#include <eel/eel-gtk-macros.h>
#include <eel/eel-glib-extensions.h>
+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) {

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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 <config.h>
#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 = \

View File

@ -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;
}

View File

@ -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 @@
<accel name="*Control*equal" verb="Zoom In"/>
<accel name="*Control**Shift*plus" verb="Zoom In"/>
<accel name="BackSpace" verb="Up"/>
+ <accel name="*Control*r" verb="Reload"/>
</keybindings>
<menu>
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 @@
<keybindings>
<accel name="*Alt**Shift*Up" verb="UpCloseCurrent"/>
<accel name="*Shift*BackSpace" verb="UpCloseCurrent"/>
+ <accel name="*Alt*Home" verb="Home"/>
</keybindings>
<menu>
<submenu name="File">
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 @@
<accel name="KP_Delete" verb="Trash"/>
<accel name="Delete" verb="Trash"/>
<accel name="*Shift*KP_Delete" verb="Delete"/>
+ <accel name="*Shift*Delete" verb="Delete"/>
<accel name="*Alt*Down" verb="Open"/>
<accel name="*Alt**Shift*Down" verb="OpenCloseParent"/>
<accel name="*Control*i" verb="Properties"/>
+ <accel name="*Shift**Control*n" verb="New Folder"/>
+ <accel name="*Control*o" verb="Open"/>
+ <accel name="*Control**Shift*o" verb="OpenAlternate"/>
+ <accel name="*Alt*Return" verb="Properties"/>
+ <accel name="*Control*x" verb="Cut Files"/>
+ <accel name="*Control*c" verb="Copy Files"/>
+ <accel name="*Control*v" verb="Paste Files"/>
+ <accel name="*Control*m" verb="Create Link"/>
+ <accel name="F2" verb="Rename"/>
+ <accel name="*Control*a" verb="Select All"/>
+ <accel name="*Control*s" verb="Select Pattern"/>
</keybindings>
<menu>
<submenu name="File">

View File

@ -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 <gtk/gtkfilechooserbutton.h>
#include "gtk/gtkcelllayout.h"
-#include "gtk/gtktooltips.h"
#include "gtk/gtkcellrenderertext.h"
#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-mime-info.h>
@@ -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 <gtk/gtkimagemenuitem.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkstock.h>
-#include <gtk/gtktooltips.h>
#include <gtk/gtktogglebutton.h>
#include <glib/gi18n.h>
@@ -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)

View File

@ -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 <mclasen@redhat.com> - 2.21.2-1
- Update to 2.21.2
* Sun Dec 23 2007 Matthias Clasen <mclasen@redhat.com> - 2.21.1-2
- Fix extensiondir

View File

@ -1 +1 @@
c52c447617196434fc0fc81b48610f65 nautilus-2.21.1.tar.bz2
fa82ba45ba503a42caf51a82cf87b47a nautilus-2.21.2.tar.bz2