After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326173 - Copy disc... option in right click menu over blank cd is not useful.
Copy disc... option in right click menu over blank cd is not useful.
Status: RESOLVED FIXED
Product: nautilus-cd-burner
Classification: Deprecated
Component: cd-burner
2.15.x
Other All
: Normal minor
: ---
Assigned To: Nautilus CD Burner Maintainers
Nautilus CD Burner Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-08 04:59 UTC by Alberto Ruiz
Modified: 2006-08-04 18:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Fix for this bug (4.94 KB, patch)
2006-05-18 22:33 UTC, Fabio Bonelli
none Details | Review
New patch (5.11 KB, patch)
2006-05-19 11:57 UTC, Fabio Bonelli
needs-work Details | Review
patch (5.28 KB, patch)
2006-07-26 18:22 UTC, William Jon McCann
committed Details | Review

Description Alberto Ruiz 2006-01-08 04:59:49 UTC
The Copy disc... option of the right click menu over a blank cd is not useful,
so it might be hidden of the menu if the cd is blank.

Other information:
Comment 1 Fabio Bonelli 2006-05-18 22:33:57 UTC
Created attachment 65797 [details] [review]
Fix for this bug
Comment 2 Bastien Nocera 2006-05-19 09:43:45 UTC
I think that the option should be hidden, instead of disabled if there's a blank CD in the drive, and it should also hide the entry if the drive is empty.
Comment 3 Fabio Bonelli 2006-05-19 11:57:51 UTC
Created attachment 65820 [details] [review]
New patch

This patch disables the item for empty drives as well.

I don't agree with you about removing the menu item, the HIG says "Do not add or remove individual menu items while the application is running, make them insensitive instead."
(http://developer.gnome.org/projects/gup/hig/2.0/menus-types.html)
Comment 4 Bastien Nocera 2006-05-19 12:05:58 UTC
This is a contextual menu, not a "proper" application menu.

For instance, right-click on the background (ie. not on a file) in nautilus. Do you see "Move to trash"? Right-click on a file, you will see "Move to trash".
Comment 5 Fabio Bonelli 2006-05-19 12:24:08 UTC
I think that that parallelism is not fair: you are comparing two semantically different objects and, because of this, the context changes and so does the contextual menu (of course).

In my opinion, the mounted disc icon and the drive icon is nearly the same place/thing to the user, it just gives a little clue when a disc is present.
Comment 6 Bastien Nocera 2006-07-26 08:51:18 UTC
Jon, what's your take on this?
I guess that it should also disable/hide the menu item if there's no disc in the drive.

This was also reported downstream:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=171030
Comment 7 William Jon McCann 2006-07-26 17:29:17 UTC
Comment on attachment 65820 [details] [review]
New patch


>+		volumes = gnome_vfs_drive_get_mounted_volumes (drive);
>+		vol = g_list_nth_data (volumes, 0);

Why do you assume that the current volume is the 0th in the list of mounted volumes?  That doesn't seem right.

>+		/* Check if the volume is blank, in that case set the "Copy disc"
>+		 * menu item to insensitive */
>+		if (vol) {

Please use an explicit != NULL check here.  We should only check boolean values for truth.

>+                        if (dbus_error_is_set (&error)) {
>+				g_warning ("%s\n", error.message);
>+				dbus_error_free (&error);
>+
>+				goto out;
>+                        }

Seems like an indentation problem here.

>+			if (is_blank) {
>+				value = g_new0 (GValue, 1);
>+
>+				g_value_init (value, G_TYPE_BOOLEAN);
>+				g_value_set_boolean (value, FALSE);
>+
>+				g_object_set_property (G_OBJECT (item), "sensitive", value);
>+
>+				g_free (value);
>+			}

Why not just use:
g_object_set (item, "sensitive", !is_blank, NULL);

That said, I think we should not show it instead of making it insensitive.  For example, we wouldn't show the "Mount Drive" option if the drive is already mounted (or we shouldn't).

>+out:
>+		gnome_vfs_drive_volume_list_free (volumes);
>+

I think you also need to unref the volumes.
Comment 8 William Jon McCann 2006-07-26 17:44:36 UTC
Sorry, I was thinking about gnome_vfs_volume_monitor_get_mounted_volumes() your usage of gnome_vfs_drive_get_mounted_volumes seems fine.  And also fine on the free/unref.
Comment 9 William Jon McCann 2006-07-26 18:22:12 UTC
Created attachment 69681 [details] [review]
patch

How about this one?
Comment 10 Matthias Clasen 2006-08-04 17:34:14 UTC
Looks fine to me. Can this  go into 2.16 ?
Comment 11 William Jon McCann 2006-08-04 18:02:06 UTC
Yes.