Author: freetz Date: Sun May 21 10:44:31 2006 GMT Module: SOURCES Tag: HEAD ---- Log message: - bugfixes (gnome cvs stable gnome-2-14 branch) http://bugzilla.gnome.org/show_bug.cgi?id=339965 http://bugzilla.gnome.org/show_bug.cgi?id=338377 http://bugzilla.gnome.org/show_bug.cgi?id=331810 rel.2, STBR
---- Files affected: SOURCES: nautilus-copy_label.patch (NONE -> 1.1) (NEW), nautilus-dnd-user-owned.patch (NONE -> 1.1) (NEW), nautilus-dont_delete_wrong_bookmark.patch (NONE -> 1.1) (NEW), nautilus-exif_taken_date.patch (NONE -> 1.1) (NEW), nautilus-fix_sftp_ftp_permissions_display.patch (NONE -> 1.1) (NEW), nautilus-fix_slow_filesystems_crasher.patch (NONE -> 1.1) (NEW), nautilus-make_open_folder_translatable.patch (NONE -> 1.1) (NEW), nautilus-sort_volumes_list.patch (NONE -> 1.1) (NEW), nautilus-width_of_text_selection.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: SOURCES/nautilus-copy_label.patch diff -u /dev/null SOURCES/nautilus-copy_label.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-copy_label.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,41 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file-operations.c,v +retrieving revision 1.207 +retrieving revision 1.207.2.1 +diff -u -r1.207 -r1.207.2.1 +--- nautilus-file-operations.c 2006/03/20 15:47:55 1.207 ++++ libnautilus-private/nautilus-file-operations.c 2006/05/08 23:05:30 1.207.2.1 +@@ -575,22 +575,17 @@ + /* fall through */ + case GNOME_VFS_XFER_PHASE_COPYING: + if (transfer_info->progress_dialog != NULL) { +- if (progress_info->bytes_copied == 0) { +- progress_dialog_set_to_from_item_text +- (transfer_info->progress_dialog, +- transfer_info->progress_verb, +- progress_info->source_name, +- progress_info->target_name, +- progress_info->file_index, +- progress_info->file_size); +- } else { +- nautilus_file_operations_progress_update_sizes +- (transfer_info->progress_dialog, +- MIN (progress_info->bytes_copied, +- progress_info->bytes_total), +- MIN (progress_info->total_bytes_copied, +- progress_info->bytes_total)); +- } ++ progress_dialog_set_to_from_item_text (transfer_info->progress_dialog, ++ transfer_info->progress_verb, ++ progress_info->source_name, ++ progress_info->target_name, ++ progress_info->file_index, ++ progress_info->file_size); ++ nautilus_file_operations_progress_update_sizes (transfer_info->progress_dialog, ++ MIN (progress_info->bytes_copied, ++ progress_info->bytes_total), ++ MIN (progress_info->total_bytes_copied, ++ progress_info->bytes_total)); + } + return 1; + ================================================================ Index: SOURCES/nautilus-dnd-user-owned.patch diff -u /dev/null SOURCES/nautilus-dnd-user-owned.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-dnd-user-owned.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,67 @@ +Index: libnautilus-private/nautilus-dnd.c +=================================================================== +RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-dnd.c,v +retrieving revision 1.24 +diff -u -p -r1.24 nautilus-dnd.c +--- libnautilus-private/nautilus-dnd.c 18 Mar 2006 07:13:49 -0000 1.24 ++++ libnautilus-private/nautilus-dnd.c 20 Apr 2006 11:19:18 -0000 +@@ -302,6 +302,26 @@ nautilus_drag_default_drop_action_for_ur + return context->suggested_action; + } + ++static gboolean ++uri_is_user_owned (GnomeVFSURI *uri) ++{ ++ gboolean user_owned; ++ ++ user_owned = FALSE; ++ ++ if (uri != NULL && !strcmp (gnome_vfs_uri_get_scheme (uri), "file")) { ++ GnomeVFSFileInfo *info; ++ ++ info = gnome_vfs_file_info_new (); ++ if (gnome_vfs_get_file_info_uri (uri, info, GNOME_VFS_FILE_INFO_GET_ACCESS_RIGHTS) == GNOME_VFS_OK) { ++ user_owned = (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_IDS) && ++ geteuid () == info->uid; ++ } ++ gnome_vfs_file_info_unref (info); ++ } ++ ++ return user_owned; ++} + + void + nautilus_drag_default_drop_action_for_icons (GdkDragContext *context, +@@ -385,11 +405,12 @@ nautilus_drag_default_drop_action_for_ic + if (dropped_uri != NULL) { + gnome_vfs_check_same_fs_uris (dropped_uri, target_uri, &same_fs); + target_is_source_parent = gnome_vfs_uri_is_parent (target_uri, dropped_uri, FALSE); +- gnome_vfs_uri_unref (dropped_uri); + } +- gnome_vfs_uri_unref (target_uri); +- +- if (same_fs || target_is_source_parent) { ++ ++ if ((same_fs || target_is_source_parent) && ++ /* use copy by default when dragging from user-owned location ++ * to location owned by somebody else */ ++ !(uri_is_user_owned (dropped_uri) && !uri_is_user_owned (target_uri))) { + if (actions & GDK_ACTION_MOVE) { + *action = GDK_ACTION_MOVE; + } else { +@@ -402,6 +423,15 @@ nautilus_drag_default_drop_action_for_ic + *action = context->suggested_action; + } + } ++ ++ if (dropped_uri != NULL) { ++ gnome_vfs_uri_unref (dropped_uri); ++ } ++ ++ if (target_uri != NULL) { ++ gnome_vfs_uri_unref (target_uri); ++ } ++ + } + + /* Encode a "x-special/gnome-icon-list" selection. ================================================================ Index: SOURCES/nautilus-dont_delete_wrong_bookmark.patch diff -u /dev/null SOURCES/nautilus-dont_delete_wrong_bookmark.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-dont_delete_wrong_bookmark.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,30 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/src/nautilus-places-sidebar.c,v +retrieving revision 1.17 +retrieving revision 1.18 +diff -u -r1.17 -r1.18 +--- nautilus-places-sidebar.c 2006/04/07 00:17:11 1.17 ++++ src/nautilus-places-sidebar.c 2006/04/15 16:19:44 1.18 +@@ -961,6 +961,7 @@ + { + GtkTreeIter iter; + GtkTreeSelection *selection; ++ PlaceType type; + int index; + + selection = gtk_tree_view_get_selection (sidebar->tree_view); +@@ -970,6 +971,14 @@ + } + + gtk_tree_model_get (GTK_TREE_MODEL (sidebar->store), &iter, ++ PLACES_SIDEBAR_COLUMN_ROW_TYPE, &type, ++ -1); ++ ++ if (type != PLACES_BOOKMARK) { ++ return; ++ } ++ ++ gtk_tree_model_get (GTK_TREE_MODEL (sidebar->store), &iter, + PLACES_SIDEBAR_COLUMN_INDEX, &index, + -1); + ================================================================ Index: SOURCES/nautilus-exif_taken_date.patch diff -u /dev/null SOURCES/nautilus-exif_taken_date.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-exif_taken_date.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,43 @@ +diff -Nur nautilus-2.14.1/src/nautilus-image-properties-page.c nautilus-2.14.1.new/src/nautilus-image-properties-page.c +--- nautilus-2.14.1/src/nautilus-image-properties-page.c 2006-03-18 07:45:15.000000000 +0100 ++++ nautilus-2.14.1.new/src/nautilus-image-properties-page.c 2006-05-09 17:53:34.000000000 +0200 +@@ -191,7 +191,7 @@ + return utf8_value; + } + +-static void ++static gboolean + append_tag_value_pair (GString *string, ExifData *data, ExifTag tag, gchar *description) + { + char *utf_attribute; +@@ -203,13 +203,14 @@ + if ((utf_attribute == NULL) || (utf_value == NULL)) { + g_free (utf_attribute); + g_free (utf_value); +- return; ++ return FALSE; + } + + g_string_append_printf (string, "<b>%s:</b> %s\n", (description != NULL) ? description : utf_attribute, utf_value); + + g_free (utf_attribute); + g_free (utf_value); ++ return TRUE; + } + + static void +@@ -218,7 +219,13 @@ + if (exifdata->ifd[0] && exifdata->ifd[0]->count) { + append_tag_value_pair (string, exifdata, EXIF_TAG_MAKE, _("Camera Brand")); + append_tag_value_pair (string, exifdata, EXIF_TAG_MODEL, _("Camera Model")); +- append_tag_value_pair (string, exifdata, EXIF_TAG_DATE_TIME, _("Date Taken")); ++ ++ /* Choose which date to show in order of relevance */ ++ if (!append_tag_value_pair (string, exifdata, EXIF_TAG_DATE_TIME_ORIGINAL, _("Date Taken"))) ++ { ++ append_tag_value_pair (string, exifdata, EXIF_TAG_DATE_TIME, _("Date Modified")); ++ } ++ + append_tag_value_pair (string, exifdata, EXIF_TAG_EXPOSURE_TIME, _("Exposure Time")); + append_tag_value_pair (string, exifdata, EXIF_TAG_EXPOSURE_PROGRAM, _("Exposure Program")); + append_tag_value_pair (string, exifdata, EXIF_TAG_APERTURE_VALUE, _("Aperture Value")); ================================================================ Index: SOURCES/nautilus-fix_sftp_ftp_permissions_display.patch diff -u /dev/null SOURCES/nautilus-fix_sftp_ftp_permissions_display.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-fix_sftp_ftp_permissions_display.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,71 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v +retrieving revision 1.386 +retrieving revision 1.386.2.1 +diff -u -r1.386 -r1.386.2.1 +--- nautilus-file.c 2006/04/18 16:54:31 1.386 ++++ libnautilus-private/nautilus-file.c 2006/04/27 14:01:24 1.386.2.1 +@@ -671,7 +671,7 @@ + /* File system does not provide permission bits. + * Can't determine specific permissions, do not deny permission at all. + */ +- if (!nautilus_file_can_get_permissions (file)) { ++ if (nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_ACCESS)) { + return FALSE; + } + +@@ -3409,7 +3409,7 @@ + gboolean + nautilus_file_can_get_permissions (NautilusFile *file) + { +- return !nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_ACCESS); ++ return !nautilus_file_info_missing (file, GNOME_VFS_FILE_INFO_FIELDS_PERMISSIONS); + } + + /** +@@ -3429,29 +3429,27 @@ + { + uid_t user_id; + +- /* Not allowed to set the permissions if we can't +- * even read them. This can happen on non-UNIX file +- * systems. +- */ +- if (!nautilus_file_can_get_permissions (file)) { +- return FALSE; +- } ++ if (file->details->info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_IDS) { ++ /* Check the user. */ ++ user_id = geteuid(); + +- /* Check the user. */ +- user_id = geteuid(); ++ /* Owner is allowed to set permissions. */ ++ if (user_id == (uid_t) file->details->info->uid) { ++ return TRUE; ++ } + +- /* Owner is allowed to set permissions. */ +- if (user_id == (uid_t) file->details->info->uid) { +- return TRUE; +- } ++ /* Root is also allowed to set permissions. */ ++ if (user_id == 0) { ++ return TRUE; ++ } + +- /* Root is also allowed to set permissions. */ +- if (user_id == 0) { +- return TRUE; ++ /* Nobody else is allowed. */ ++ return FALSE; + } + +- /* Nobody else is allowed. */ +- return FALSE; ++ /* pretend to have full chmod rights when no info is available, relevant when ++ * the FS can't provide ownership info, for instance for FTP */ ++ return TRUE; + } + + GnomeVFSFilePermissions ================================================================ Index: SOURCES/nautilus-fix_slow_filesystems_crasher.patch diff -u /dev/null SOURCES/nautilus-fix_slow_filesystems_crasher.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-fix_slow_filesystems_crasher.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,15 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/src/nautilus-window-manage-views.c,v +retrieving revision 1.365 +retrieving revision 1.365.2.1 +diff -u -r1.365 -r1.365.2.1 +--- nautilus-window-manage-views.c 2006/03/18 07:13:52 1.365 ++++ src/nautilus-window-manage-views.c 2006/05/08 23:17:09 1.365.2.1 +@@ -960,6 +960,7 @@ + + /* We disconnected this, so we need to re-connect it */ + viewed_file = nautilus_file_get (window->details->location); ++ nautilus_window_set_viewed_file (window, viewed_file); + nautilus_file_monitor_add (viewed_file, &window->details->viewed_file, 0); + g_signal_connect_object (viewed_file, "changed", + G_CALLBACK (viewed_file_changed_callback), window, 0); ================================================================ Index: SOURCES/nautilus-make_open_folder_translatable.patch diff -u /dev/null SOURCES/nautilus-make_open_folder_translatable.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-make_open_folder_translatable.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,30 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/nautilus-folder-handler.desktop.in,v +retrieving revision 1.6 +retrieving revision 1.6.2.1 +diff -u -r1.6 -r1.6.2.1 +--- nautilus-folder-handler.desktop.in 2006/03/19 14:23:39 1.6 ++++ nautilus/nautilus-folder-handler.desktop.in 2006/05/17 17:07:13 1.6.2.1 +@@ -1,6 +1,6 @@ + [Desktop Entry] + Encoding=UTF-8 +-Name=Open Folder ++_Name=Open Folder + TryExec=nautilus + Exec=nautilus --no-desktop %U + NoDisplay=true +=================================================================== +RCS file: /cvs/gnome/nautilus/po/POTFILES.in,v +retrieving revision 1.166 +retrieving revision 1.166.2.1 +diff -u -r1.166 -r1.166.2.1 +--- POTFILES.in 2006/03/18 07:13:49 1.166 ++++ po/POTFILES.in 2006/05/17 17:07:14 1.166.2.1 +@@ -36,6 +36,7 @@ + libnautilus-private/nautilus-undo-signal-handlers.c + nautilus-computer.desktop.in + nautilus-file-management-properties.desktop.in ++nautilus-folder-handler.desktop.in + nautilus-home.desktop.in + nautilus.desktop.in + src/Nautilus_shell.server.in ================================================================ Index: SOURCES/nautilus-sort_volumes_list.patch diff -u /dev/null SOURCES/nautilus-sort_volumes_list.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-sort_volumes_list.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,15 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/src/file-manager/fm-tree-view.c,v +retrieving revision 1.24 +retrieving revision 1.25 +diff -u -r1.24 -r1.25 +--- fm-tree-view.c 2006/03/18 07:27:37 1.24 ++++ src/file-manager/fm-tree-view.c 2006/04/25 12:25:20 1.25 +@@ -1251,6 +1251,7 @@ + + volume_monitor = gnome_vfs_get_volume_monitor (); + volumes = gnome_vfs_volume_monitor_get_mounted_volumes (volume_monitor); ++ volumes = g_list_sort (volumes, (GCompareFunc) gnome_vfs_volume_compare); + for (l = volumes; l != NULL; l = l->next) { + add_root_for_volume (view, l->data); + gnome_vfs_volume_unref (l->data); ================================================================ Index: SOURCES/nautilus-width_of_text_selection.patch diff -u /dev/null SOURCES/nautilus-width_of_text_selection.patch:1.1 --- /dev/null Sun May 21 12:44:31 2006 +++ SOURCES/nautilus-width_of_text_selection.patch Sun May 21 12:44:26 2006 @@ -0,0 +1,108 @@ +=================================================================== +RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-canvas-item.c,v +retrieving revision 1.200 +retrieving revision 1.200.2.1 +diff -u -r1.200 -r1.200.2.1 +--- nautilus-icon-canvas-item.c 2006/04/18 16:54:31 1.200 ++++ libnautilus-private/nautilus-icon-canvas-item.c 2006/04/26 15:00:23 1.200.2.1 +@@ -80,6 +80,7 @@ + NautilusEmblemAttachPoints *attach_points; + + /* Size of the text at current font. */ ++ int text_dx; + int text_width; + int text_height; + +@@ -715,20 +716,22 @@ + { + ArtIRect text_rectangle; + double pixels_per_unit; +- double text_width, text_height; ++ double text_width, text_height, text_dx; + + pixels_per_unit = EEL_CANVAS_ITEM (item)->canvas->pixels_per_unit; + if (canvas_coords) { + text_width = item->details->text_width; + text_height = item->details->text_height; ++ text_dx = item->details->text_dx; + } else { + text_width = item->details->text_width / pixels_per_unit; + text_height = item->details->text_height / pixels_per_unit; ++ text_dx = item->details->text_dx / pixels_per_unit; + } + + if (NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas)->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) { + text_rectangle.x0 = icon_rectangle.x1; +- text_rectangle.x1 = text_rectangle.x0 + text_width; ++ text_rectangle.x1 = text_rectangle.x0 + text_dx + text_width; + text_rectangle.y0 = (icon_rectangle.y0 + icon_rectangle.y1) / 2- (int) text_height / 2; + text_rectangle.y1 = text_rectangle.y0 + text_height + LABEL_OFFSET / pixels_per_unit; + } else { +@@ -923,13 +926,17 @@ + static void + layout_get_full_size (PangoLayout *layout, + int *width, +- int *height) ++ int *height, ++ int *dx) + { + PangoRectangle logical_rect; ++ int total_width; + + pango_layout_get_extents (layout, NULL, &logical_rect); +- *width = (logical_rect.x + logical_rect.width + PANGO_SCALE / 2) / PANGO_SCALE; +- *height = (logical_rect.y + logical_rect.height + PANGO_SCALE / 2) / PANGO_SCALE; ++ *width = (logical_rect.width + PANGO_SCALE / 2) / PANGO_SCALE; ++ total_width = (logical_rect.x + logical_rect.width + PANGO_SCALE / 2) / PANGO_SCALE; ++ *dx = total_width - *width; ++ *height = (logical_rect.height + PANGO_SCALE / 2) / PANGO_SCALE; + } + + +@@ -941,8 +948,8 @@ + { + NautilusIconCanvasItemDetails *details; + NautilusIconContainer *container; +- guint editable_height, editable_width; +- guint additional_height, additional_width; ++ guint editable_height, editable_width, editable_dx; ++ guint additional_height, additional_width, additional_dx; + EelCanvasItem *canvas_item; + PangoLayout *editable_layout; + PangoLayout *additional_layout; +@@ -1000,8 +1007,10 @@ + + editable_width = 0; + editable_height = 0; ++ editable_dx = 0; + additional_width = 0; + additional_height = 0; ++ additional_dx = 0; + + max_text_width = floor (nautilus_icon_canvas_item_get_max_text_width (item)); + +@@ -1011,15 +1020,21 @@ + + if (have_editable) { + editable_layout = get_label_layout (&details->editable_text_layout, item, details->editable_text); +- layout_get_full_size (editable_layout, &editable_width, &editable_height); ++ layout_get_full_size (editable_layout, &editable_width, &editable_height, &editable_dx); + } + + if (have_additional) { + additional_layout = get_label_layout (&details->additional_text_layout, item, details->additional_text); +- layout_get_full_size (additional_layout, &additional_width, &additional_height); ++ layout_get_full_size (additional_layout, &additional_width, &additional_height, &additional_dx); + } + +- details->text_width = MAX (editable_width, additional_width); ++ if (editable_width > additional_width) { ++ details->text_width = editable_width; ++ details->text_dx = editable_dx; ++ } else { ++ details->text_width = additional_width; ++ details->text_dx = additional_dx; ++ } + + if (have_additional) { + details->text_height = editable_height + LABEL_LINE_SPACING + additional_height; ================================================================ _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit