Music folder appears twice in File selection dialog

Bug #316959 reported by scott_lemke
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GTK+
Fix Released
Medium
One Hundred Papercuts
Fix Released
Low
Timothy Arceri
Rhythmbox
Expired
Low
gtk+2.0 (Ubuntu)
Fix Released
Undecided
Unassigned
gtk+3.0 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

On a clean and updated install of Intrepid, if you open Rhythmbox, select Import Folder, and then look on the quick list to the left hand side of the chooser box, you will see Music twice. The first time where I think Network should be, then the 2nd time where it should be with home directories.

Attached is a screenshot of what I am seeing.

Revision history for this message
scott_lemke (scott-mppf) wrote :
Revision history for this message
Ben Nieman (thespy0) wrote :

All you have to do is right-click on the unwanted music folder, and select Remove.

Changed in rhythmbox:
assignee: nobody → thespy0
Revision history for this message
Ben Nieman (thespy0) wrote :

Thank you for your report, unfortunately it is not a bug, so it must be removed.

Changed in rhythmbox:
status: New → Invalid
Revision history for this message
Tim Sharitt (tsharitt) wrote :

I can verify the same bug in jaunty. Rhythm box version 0.11.6svn20090108-0ubuntu1. On my system, clicking on the second one highlights the first one.

Ben Nieman (thespy0)
Changed in rhythmbox:
status: Invalid → Confirmed
Revision history for this message
Tim Sharitt (tsharitt) wrote :

I can't remove either Music folder

Revision history for this message
Ben Nieman (thespy0) wrote :

I'm sorry. I understood the post incorrectly. That is a normal occurrence not a bug.

Revision history for this message
scott_lemke (scott-mppf) wrote :

My findings follow what Tim Sharitt is finding as well, I cannot remove the first one in the list, the one under CD-RW/DVD+-RW Drive in my screenshot, and attempting to select the 2nd one, under Documents, appears to instantly highlight the first one.

This does not seem like a normal operating thing to me.

Revision history for this message
Ben Nieman (thespy0) wrote :

It is the same on my system

Ben Nieman (thespy0)
Changed in rhythmbox:
assignee: thespy0 → nobody
Revision history for this message
Tim Sharitt (tsharitt) wrote :

This seems to be due to rhythmbox adding the users music folder to the bookmarks when opening the file chooser. If the line
gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog),
           rb_music_dir (),
           NULL);
is removed from widgets/rb-dialog.c, the problem goes away. If the Music bookmark isn't already set, it is placed in the file chooser window and appers only once.
I don't really know if there should be a check to see if the folder already exists, and I don't know if it should be done by rhythmbox or gtk+. I think this is more of an issue with gtk than rhythmbox, as any application adding a bookmark which already exists would cause the same problem.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

could somebody having this issue send it to bugzilla.gnome.org ? for forwarding instructions please have a look to https://wiki.ubuntu.com/Bugs/Upstream/GNOME ; thanks in advance.

Revision history for this message
Tim Sharitt (tsharitt) wrote :

Filled bug in gnome bugzilla

Changed in rhythmbox:
importance: Undecided → Unknown
status: New → Unknown
Changed in rhythmbox:
status: Unknown → New
Changed in rhythmbox:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Confirmed → Triaged
Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks you for sent it there.

Changed in rhythmbox:
importance: Unknown → Low
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → Low
milestone: none → raring-round-1
Changed in hundredpapercuts:
assignee: nobody → Papercuts Ninja (papercuts-ninja)
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote :

Another issue I've noticed is that only the first entry can be clicked. Any attempt to click on the second entry results in the first one being selected. I think that Rhythmbox simply shouldn't be adding this bookmark if it's going to cause problems, both from technical and usability perspectives.

Comment #9 proposes what I think could be a very simple fix for this, provided the code hasn't changed so much in the two and half years since it was posted.

Revision history for this message
Timothy Arceri (t-fridey) wrote :

Hi Chris, This is a GTK bug rather than a specific Rhythmbox issue. The upstream GTK bug I've linked describes the same thing happening in Totem. I'll have a look to see if I can fix this in GTK.

Changed in hundredpapercuts:
status: Confirmed → Triaged
assignee: Papercuts Ninja (papercuts-ninja) → Timothy Arceri (t-fridey)
Revision history for this message
Andrew McCarthy (andrewmccarthy) wrote :

Removing the code as in comment #9 removes the "Music" entry from the upper section. I can't determine where the list in the lower section is generated, although the documentation (http://developer.gnome.org/gtk/2.24/GtkFileChooser.html#GtkFileChooser.description) suggests it can come from "various sources". Perhaps somebody who understands Gnome better can find it. Unless we can determine at runtime that there is a duplicate entry, it may happen that bluntly removing the code actually removes the only copy of that entry.

Revision history for this message
Timothy Arceri (t-fridey) wrote :

Removing the code as in comment #9 just hides the real problem. As I said the real bug is in GTK

Changed in gtk:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in rhythmbox (Ubuntu):
status: Triaged → Invalid
Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote :

Comment from the developer:

"This no longer occurs with the new import dialog. I'll have to work
out whether I actually wanted that to happen or whether I just didn't
bother to keep the code that adds the shortcut for the Music folder."

Timothy, what's your take on this?

Changed in rhythmbox:
status: New → Expired
Revision history for this message
Timothy Arceri (t-fridey) wrote :

Chris, that may be so but we should still attempt to fix the bug in GTK so that it doesn't happen again in future and so it fixes any issues with other applications i.e Totem.

From what I can make out in the code here is the problem:

gtk_file_chooser_add_shortcut_folder is implemented in http://git.gnome.org/browse/gtk+/tree/gtk/gtkfilechooserdefault.c as

gtk_file_chooser_default_add_shortcut_folder (GtkFileChooser *chooser, GFile *file, GError **error)

Priority is given to any shortcuts added by the application over any bookmarks added at construction time (see line: 8002 if (pos >= 0 && pos < shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR)) )

This shows that any existing bookmarks are ignored and the shortcut is added anyway. The problem appears to be that the duplicate bookmark is not then removed. Note that if you drag and drop one of the other bookmarks than the duplicate correctly disappears. So there seems to be code on the bookmarks side that checks for duplicates, the problem is they have already been created before the shortcut is added.

I tried splitting up the above if statement and adding an else to the second condition where I attempt to remove the bookmark based on the pos but I'm having real trouble building GTK on my machine which I'm not sure I can resolve.

Changed in gtk+3.0 (Ubuntu):
importance: Undecided → Low
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote : Re: [Bug 316959] Re: Music folder appears twice in Rhythmbox

Timothy, what are the issues? If you can upload the code you're working on
somewhere (Launchpad, Github, etc) or simply share it with Ubuntu One, then
I can try building it myself.

Revision history for this message
Timothy Arceri (t-fridey) wrote : Re: Music folder appears twice in Rhythmbox

Hi Chris,
              I managed to figure out my build issues and have submitted a patch to the upstream gtk bug. I've also asked for a review on the GTK dev mailing list so fingers crossed someone takes a look at it.

Changed in hundredpapercuts:
status: Triaged → In Progress
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote : Re: [Bug 316959] Re: Music folder appears twice in Rhythmbox

Excellent! Thanks for your work Timothy :)

On 31 October 2012 20:39, Timothy Arceri <email address hidden> wrote:

> Hi Chris,
> I managed to figure out my build issues and have submitted a
> patch to the upstream gtk bug. I've also asked for a review on the GTK dev
> mailing list so fingers crossed someone takes a look at it.
>
>
> ** Changed in: hundredpapercuts
> Status: Triaged => In Progress
>
> --
> You received this bug notification because you are subscribed to One
> Hundred Paper Cuts.
> Matching subscriptions: Papercut bug mail
> https://bugs.launchpad.net/bugs/316959
>
> Title:
> Music folder appears twice in Rhythmbox
>
> Status in GTK+ GUI Toolkit:
> Confirmed
> Status in One Hundred Paper Cuts:
> In Progress
> Status in The Rhythmbox Music Management Application:
> Expired
> Status in “gtk+3.0” package in Ubuntu:
> Confirmed
> Status in “rhythmbox” package in Ubuntu:
> Invalid
>
> Bug description:
> On a clean and updated install of Intrepid, if you open Rhythmbox,
> select Import Folder, and then look on the quick list to the left hand
> side of the chooser box, you will see Music twice. The first time
> where I think Network should be, then the 2nd time where it should be
> with home directories.
>
> Attached is a screenshot of what I am seeing.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gtk/+bug/316959/+subscriptions
>

summary: - Music folder appears twice in Rhythmbox
+ Music folder appears twice in Totem
Changed in hundredpapercuts:
milestone: raring-round-1 → raring-misc
summary: - Music folder appears twice in Totem
+ Music folder appears twice in File selection dialog
Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Fix Committed
Changed in hundredpapercuts:
status: In Progress → Fix Committed
Changed in gtk+2.0 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Timothy Arceri (t-fridey) wrote :

my fix has been committed upstream to master, 3.6 and 2.24

Changed in gtk:
status: Confirmed → Fix Released
Changed in hundredpapercuts:
milestone: raring-misc → raring-gtk
no longer affects: rhythmbox (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gtk+3.0 - 3.6.4-0ubuntu1

---------------
gtk+3.0 (3.6.4-0ubuntu1) raring; urgency=low

  [ Sebastien Bacher ]
  * debian/patches/git_dont_duplicate_bookmark.patch:
    - "Remove bookmark duplicate of shortcut" (lp: #316959)

  [ Robert Ancell ]
  * New upstream release
  * debian/control.in:
    - Add ${shlibs:Depends} Depends to libgtk-3-bin
  * debian/libgtk-3-bin.install:
    - Install gtk-launch man page.
  * debian/libgtk-3-dev.install:
    - Install gtkbuilder.rng RELAX NG schema file which can be used to
      validate GtkBuilder ui files.
 -- Robert Ancell <email address hidden> Thu, 10 Jan 2013 17:05:45 +1300

Changed in gtk+3.0 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote :

Changing the status back to Fix Committed until the fix is released for gtk+-2.0 as welll.

Changed in hundredpapercuts:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
Changed in hundredpapercuts:
milestone: raring-gtk → papercuts-s-gtk
Changed in hundredpapercuts:
milestone: papercuts-s-gtk → none
Changed in hundredpapercuts:
status: Fix Committed → Fix Released
Changed in gtk+2.0 (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.