Should not show tab in Properties window, when there is only one tab

Bug #683617 reported by Andreas Nilsson
52
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Banshee
Fix Released
Low
One Hundred Papercuts
Fix Released
Low
William Friesen
banshee (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: banshee

(real bug is https://bugzilla.gnome.org/show_bug.cgi?id=615797 but filing it here too so we can track it as a papercut)

The track properties dialog sports a tabbed interface, but there is only one tab, so that looks odd and it makes it not really a tabbed interface. It also looks a bit odd.

This is probably happening because it's pretty much shares everything with the Edit Track dialog, including this tab.

We probably should special case a single tab.

Revision history for this message
Vish (vish) wrote :
Changed in banshee (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in hundredpapercuts:
assignee: nobody → Papercuts Ninja (papercuts-ninja)
importance: Undecided → Low
milestone: none → nt1-music
status: New → Triaged
Vish (vish)
summary: - There is just one tab in Properties, that looks slightly odd
+ Should not show tab, when there is only one tab in Properties window
summary: - Should not show tab, when there is only one tab in Properties window
+ Should not show tab when there is only one tab in Properties window
summary: - Should not show tab when there is only one tab in Properties window
+ Should not show tab in Properties window, when there is only one tab
Revision history for this message
Zachary (zachary418) wrote :

Since the Track Editor contains the Track Properties tab anyway, this window is redundant. It would be more compact to remove this separate window altogether and rename Edit Track Information to something like Track Info.

Revision history for this message
Buttink (buttink) wrote :

This is all that should be needed for the simple fix

git diff
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDia
index 949489b..8290213 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.TrackEditor/TrackEditorDialog.cs
@@ -257,6 +257,10 @@ namespace Banshee.Gui.TrackEditor
             if (page_to_focus != null) {
                 notebook.CurrentPage = notebook.PageNum (page_to_focus);
             }
+
+ if (pages.Count < 2) {
+ notebook.ShowTabs = false;
+ }
         }

         private void BuildFooter ()
diff --git a/src/Hyena b/src/Hyena
--- a/src/Hyena
+++ b/src/Hyena
@@ -1 +1 @@
-Subproject commit 507573f2b0b1a462df491bb236bba9a3e86e2869
+Subproject commit 507573f2b0b1a462df491bb236bba9a3e86e2869-dirty

I'd do it myself, but I'm having problems with autoconf and can't run it to test it. Another solution would be to have the same Dialog for both, but just make "Properties" start on the "Properties" tab.

Revision history for this message
Vish (vish) wrote :

@Buttink , Can you submit that patch on : https://bugzilla.gnome.org/show_bug.cgi?id=615797 ? The Banshee developers can comment on the patch.

Revision history for this message
William Friesen (william-friesen) wrote :

I've tested the above patch, and it seems that pages.Count is not a direct indicator of the pages that will be shown. When I ran it, pages.Count gave the value 2, when there was only 1 tab showing. Also, when viewing the "Edit Track Information" dialog, pages.Count was 5, when only 4 tabs were showing.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

A crude method of counting the visible would be to declare an integer, and increment it every time page.Widget.Show() is called in the BuildNotebook() function.

Revision history for this message
Chow Loong Jin (hyperair) wrote :

Er I mean visible pages.

Revision history for this message
Buttink (buttink) wrote :

@Vish will do. But first, I'm going to try and find a way to easily find the number of visible pages. Also, get autoconf to work so I can test it. :)

Revision history for this message
William Friesen (william-friesen) wrote :

For me, the extra tab that was hiding came from the Podcasts extension. When added to the notebook, this had the property Order = 40, which duplicated the Order value of a previous page in the notebook. I have submitted a patch to the banshee bug that determines the amount of visible pages by counting the unique page.Order values, and calls notebook.ShowTabs when there is only one visible page.

Revision history for this message
Vish (vish) wrote :

Buttink, if you are having any trouble or have any questions, send a mail to Papercuts Ninja team: <https://launchpad.net/~papercuts-ninja> .

Changed in hundredpapercuts:
status: Triaged → Fix Committed
Revision history for this message
Vish (vish) wrote :

Nice work William Friesen !

Changed in hundredpapercuts:
assignee: Papercuts Ninja (papercuts-ninja) → William Friesen (william-friesen)
Changed in banshee (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Vish (vish) wrote :

@Buttink, Seems William got to the bug, no worries, banshee has other papercuts too.

Buttink/ William , feel free to knock off any of the other banshee bugs ;-) > https://launchpad.net/hundredpapercuts/+milestone/nt1-music .

Changed in banshee:
importance: Unknown → Low
status: Unknown → Fix Released
Changed in hundredpapercuts:
status: Fix Committed → Fix Released
Changed in banshee (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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