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 635780 - Selecting source category expands source selector to entire window
Selecting source category expands source selector to entire window
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Linux
: Normal normal
: 1.x
Assigned To: Alex Launi
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-25 15:37 UTC by Alex Launi
Modified: 2010-12-02 04:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The expanded source selector (148.82 KB, image/png)
2010-11-25 15:37 UTC, Alex Launi
  Details
Sets the treeview SelectionFunc to not allow GroupSources as valid selections (1.82 KB, patch)
2010-11-25 18:03 UTC, Alex Launi
none Details | Review
Makes keyboard scrolling on the source selector skip group sources completely (4.88 KB, patch)
2010-11-25 19:14 UTC, Alex Launi
needs-work Details | Review
Update for alexk's review (3.50 KB, patch)
2010-11-26 01:38 UTC, Alex Launi
needs-work Details | Review
Fix expand on click regression (3.54 KB, patch)
2010-12-01 18:16 UTC, Alex Launi
accepted-commit_now Details | Review

Description Alex Launi 2010-11-25 15:37:53 UTC
Created attachment 175240 [details]
The expanded source selector

If using the keyboard to navigate the source selector, when one of the categories is selection, the source selector expands to take the full Banshee window
Comment 1 Alex Launi 2010-11-25 18:03:37 UTC
Created attachment 175262 [details] [review]
Sets the treeview SelectionFunc to not allow GroupSources as valid selections
Comment 2 Alex Launi 2010-11-25 19:14:33 UTC
Created attachment 175271 [details] [review]
Makes keyboard scrolling on the source selector skip group sources completely
Comment 3 Alexander Kojevnikov 2010-11-26 01:11:26 UTC
Review of attachment 175271 [details] [review]:

The patch works, but it introduces a regression -- when clicking on the divider the source panel expands for a short moment.

::: src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ +91,3 @@
 
+            Selection.SelectFunction = (selection, model, path, selected) =>
+            {

Move `{` to the line above: `=> {`

@@ +219,3 @@
+        protected override bool OnKeyPressEvent (Gdk.EventKey press)
+        {
+            Source source;

It's not C, define variable as you need them. Also, use `var`.

@@ +236,3 @@
+                movedCursor = true;
+            }
+            /*

Remove commented out code.

@@ +421,2 @@
             Source new_source = store.GetValue (iter, (int)SourceModel.Columns.Source) as Source;
+            

Trailing whitespace.

::: src/Extensions/Banshee.Podcasting/Makefile.am
@@ +30,2 @@
 	Banshee.Podcasting.Gui/PodcastSourceContents.cs \
+	Banshee.Podcasting.Gui/PodcastUnheardFilterView.cs \

Commit this separately.
Comment 4 Alex Launi 2010-11-26 01:34:22 UTC
::: src/Extensions/Banshee.Podcasting/Makefile.am
@@ +30,2 @@
     Banshee.Podcasting.Gui/PodcastSourceContents.cs \
+    Banshee.Podcasting.Gui/PodcastUnheardFilterView.cs \

Commit this separately.

I don't know where this came from. MD must have done it for me and I didn't notice. Sorry!

Everything else is now fixed.
Comment 5 Alex Launi 2010-11-26 01:38:30 UTC
Created attachment 175284 [details] [review]
Update for alexk's review
Comment 6 Alexander Kojevnikov 2010-11-28 06:04:34 UTC
Review of attachment 175284 [details] [review]:

I'm still seeing the regression mentioned in the previous review: try clicking on the divider with your mouse, the source tree expands for 100-200 ms.

::: src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
@@ +222,3 @@
+
+            Selection.GetSelected (out iter);
+            Treepath path = store.GetPath (iter);

Should be `TreePath`. Or just use `var`.
Comment 7 Alex Launi 2010-11-30 19:01:25 UTC
I don't understand what divider you're talking about. I've clicked all over the source view and can't get it to expand.
Comment 8 Alex Launi 2010-12-01 18:16:50 UTC
Created attachment 175643 [details] [review]
Fix expand on click regression
Comment 9 Alexander Kojevnikov 2010-12-02 01:15:09 UTC
Review of attachment 175643 [details] [review]:

Looks good, please commit.